@web3auth/modal 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -0
- package/dist/modal.cjs.js +1145 -0
- package/dist/modal.cjs.js.map +1 -0
- package/dist/modal.esm.js +860 -0
- package/dist/modal.esm.js.map +1 -0
- package/dist/modal.umd.min.js +3 -0
- package/dist/modal.umd.min.js.LICENSE.txt +99 -0
- package/dist/modal.umd.min.js.map +1 -0
- package/dist/types/config.d.ts +6 -0
- package/dist/types/default.d.ts +6 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/interface.d.ts +8 -0
- package/dist/types/modalManager.d.ts +67 -0
- package/dist/types/utils.d.ts +9 -0
- package/package.json +65 -0
- package/src/config.ts +93 -0
- package/src/default.ts +47 -0
- package/src/index.ts +3 -0
- package/src/interface.ts +9 -0
- package/src/modalManager.ts +351 -0
- package/src/utils.ts +21 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see modal.umd.min.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Modal=t():e.Modal=t()}(self,(()=>(()=>{var e,t,r={19752:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Common=void 0;const i=r(45372),o=r(97108),a=r(22699),s=r(24579),c=r(73192),u=r(14002),l=r(27623),f=r(86369),d=r(43925),h=r(90649),p=r(12188);class g extends a.EventEmitter{constructor(e){super(),this._eips=[],this._customChains=e.customChains??[],this._chainParams=this.setChain(e.chain),this.DEFAULT_HARDFORK=this._chainParams.defaultHardfork??h.Hardfork.Merge,this._hardfork=this.DEFAULT_HARDFORK,void 0!==e.hardfork&&this.setHardfork(e.hardfork),e.eips&&this.setEIPs(e.eips)}static custom(e,t={}){const r=t.baseChain??"mainnet",n={...g._getChainParams(r)};if(n.name="custom-chain","string"!=typeof e)return new g({chain:{...n,...e},...t});if(e===h.CustomChain.PolygonMainnet)return g.custom({name:h.CustomChain.PolygonMainnet,chainId:137,networkId:137},t);if(e===h.CustomChain.PolygonMumbai)return g.custom({name:h.CustomChain.PolygonMumbai,chainId:80001,networkId:80001},t);if(e===h.CustomChain.ArbitrumRinkebyTestnet)return g.custom({name:h.CustomChain.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611},t);if(e===h.CustomChain.xDaiChain)return g.custom({name:h.CustomChain.xDaiChain,chainId:100,networkId:100},t);if(e===h.CustomChain.OptimisticKovan)return g.custom({name:h.CustomChain.OptimisticKovan,chainId:69,networkId:69},{hardfork:h.Hardfork.Berlin,...t});if(e===h.CustomChain.OptimisticEthereum)return g.custom({name:h.CustomChain.OptimisticEthereum,chainId:10,networkId:10},{hardfork:h.Hardfork.Berlin,...t});throw new Error(`Custom chain ${e} not supported`)}static isSupportedChainId(e){const t=this._getInitializedChains();return Boolean(t.names[e.toString()])}static _getChainParams(e,t){const r=this._getInitializedChains(t);if("number"==typeof e||"bigint"==typeof e){if(e=e.toString(),r.names[e])return r[r.names[e]];throw new Error(`Chain with ID ${e} not supported`)}if(void 0!==r[e])return r[e];throw new Error(`Chain with name ${e} not supported`)}setChain(e){if("number"==typeof e||"bigint"==typeof e||"string"==typeof e)this._chainParams=g._getChainParams(e,this._customChains);else{if("object"!=typeof e)throw new Error("Wrong input format");{if(this._customChains.length>0)throw new Error("Chain must be a string, number, or bigint when initialized with customChains passed in");const t=["networkId","genesis","hardforks","bootstrapNodes"];for(const r of t)if(!(r in e))throw new Error(`Missing required chain parameter: ${r}`);this._chainParams=e}}for(const e of this.hardforks())if(void 0===e.block)throw new Error("Hardfork cannot have undefined block number");return this._chainParams}setHardfork(e){let t=!1;for(const r of p.hardforks)r[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),t=!0);if(!t)throw new Error(`Hardfork with name ${e} not supported`)}getHardforkByBlockNumber(e,t){e=(0,i.toType)(e,i.TypeOutput.BigInt),t=(0,i.toType)(t,i.TypeOutput.BigInt);let r,n,o,a=h.Hardfork.Chainstart;for(const i of this.hardforks())if(null!==i.block)e>=BigInt(i.block)&&(a=i.name),!t||"string"!=typeof i.ttd&&"bigint"!=typeof i.ttd||(t>=BigInt(i.ttd)?r=i.name:n=o),o=i.name;else if(null!=t&&void 0!==i.ttd&&null!==i.ttd&&t>=BigInt(i.ttd))return i.name;if(t){let i=`block number: ${e} (-> ${a}), `;if(void 0!==r&&!this.hardforkGteHardfork(a,r))throw i+=`total difficulty: ${t} (-> ${r})`,new Error(`HF determined by block number is lower than the minimum total difficulty HF: ${i}`);if(void 0!==n&&!this.hardforkGteHardfork(n,a))throw i+=`total difficulty: ${t} (-> ${n})`,new Error(`Maximum HF determined by total difficulty is lower than the block number HF: ${i}`)}return a}setHardforkByBlockNumber(e,t){const r=this.getHardforkByBlockNumber(e,t);return this.setHardfork(r),r}_getHardfork(e){const t=this.hardforks();for(const r of t)if(r.name===e)return r;return null}setEIPs(e=[]){for(const t of e){if(!(t in d.EIPs))throw new Error(`${t} not supported`);const r=this.gteHardfork(d.EIPs[t].minimumHardfork);if(!r)throw new Error(`${t} cannot be activated on hardfork ${this.hardfork()}, minimumHardfork: ${r}`);if(void 0!==d.EIPs[t].requiredEIPs)for(const r of d.EIPs[t].requiredEIPs)if(!e.includes(r)&&!this.isActivatedEIP(r))throw new Error(`${t} requires EIP ${r}, but is not included in the EIP list`)}this._eips=e}param(e,t){let r;for(const n of this._eips)if(r=this.paramByEIP(e,t,n),void 0!==r)return r;return this.paramByHardfork(e,t,this._hardfork)}paramByHardfork(e,t,r){let n=null;for(const i of p.hardforks){if("eips"in i[1]){const r=i[1].eips;for(const i of r){const r=this.paramByEIP(e,t,i);n="bigint"==typeof r?r:n}}else{if(void 0===i[1][e])throw new Error(`Topic ${e} not defined`);void 0!==i[1][e][t]&&(n=i[1][e][t].v)}if(i[0]===r)break}return BigInt(n??0)}paramByEIP(e,t,r){if(!(r in d.EIPs))throw new Error(`${r} not supported`);const n=d.EIPs[r];if(!(e in n))throw new Error(`Topic ${e} not defined`);if(void 0===n[e][t])return;const i=n[e][t].v;return BigInt(i)}paramByBlock(e,t,r,n){const i=this.getHardforkByBlockNumber(r,n);return this.paramByHardfork(e,t,i)}isActivatedEIP(e){if(this.eips().includes(e))return!0;for(const t of p.hardforks){const r=t[1];if(this.gteHardfork(r.name)&&"eips"in r&&r.eips.includes(e))return!0}return!1}hardforkIsActiveOnBlock(e,t){t=(0,i.toType)(t,i.TypeOutput.BigInt),e=e??this._hardfork;const r=this.hardforkBlock(e);return"bigint"==typeof r&&r!==BigInt(0)&&t>=r}activeOnBlock(e){return this.hardforkIsActiveOnBlock(null,e)}hardforkGteHardfork(e,t){e=e??this._hardfork;const r=this.hardforks();let n=-1,i=-1,o=0;for(const a of r)a.name===e&&(n=o),a.name===t&&(i=o),o+=1;return n>=i&&-1!==i}gteHardfork(e){return this.hardforkGteHardfork(null,e)}hardforkBlock(e){e=e??this._hardfork;const t=this._getHardfork(e)?.block;return null==t?null:BigInt(t)}eipBlock(e){for(const t of p.hardforks){const r=t[1];if("eips"in r&&r.eips.includes(e))return this.hardforkBlock(t[0])}return null}hardforkTTD(e){e=e??this._hardfork;const t=this._getHardfork(e)?.ttd;return null==t?null:BigInt(t)}isHardforkBlock(e,t){e=(0,i.toType)(e,i.TypeOutput.BigInt),t=t??this._hardfork;const r=this.hardforkBlock(t);return"bigint"==typeof r&&r!==BigInt(0)&&r===e}nextHardforkBlock(e){e=e??this._hardfork;const t=this.hardforkBlock(e);return null===t?null:this.hardforks().reduce(((e,r)=>{const n=BigInt("number"!=typeof r.block?0:r.block);return n>t&&null===e?n:e}),null)}isNextHardforkBlock(e,t){e=(0,i.toType)(e,i.TypeOutput.BigInt),t=t??this._hardfork;const r=this.nextHardforkBlock(t);return null!==r&&r===e}_calcForkHash(e,t){let r=n.alloc(0),a=0;for(const t of this.hardforks()){const i=t.block;if("number"==typeof i&&0!==i&&i!==a){const e=n.from(i.toString(16).padStart(16,"0"),"hex");r=n.concat([r,e])}if(t.name===e)break;"number"==typeof i&&(a=i)}const s=n.concat([t,r]);return`0x${(0,i.intToBuffer)((0,o.buf)(s)>>>0).toString("hex")}`}forkHash(e,t){e=e??this._hardfork;const r=this._getHardfork(e);if(null===r||null===r?.block&&void 0===r?.ttd)throw new Error("No fork hash calculation possible for future hardfork");if(null!=r?.forkHash)return r.forkHash;if(!t)throw new Error("genesisHash required for forkHash calculation");return this._calcForkHash(e,t)}hardforkForForkHash(e){const t=this.hardforks().filter((t=>t.forkHash===e));return t.length>=1?t[t.length-1]:null}genesis(){return this._chainParams.genesis}hardforks(){return this._chainParams.hardforks}bootstrapNodes(){return this._chainParams.bootstrapNodes}dnsNetworks(){return this._chainParams.dnsNetworks}hardfork(){return this._hardfork}chainId(){return BigInt(this._chainParams.chainId)}chainName(){return this._chainParams.name}networkId(){return BigInt(this._chainParams.networkId)}eips(){return this._eips}consensusType(){const e=this.hardfork();let t;for(const r of p.hardforks)if("consensus"in r[1]&&(t=r[1].consensus.type),r[0]===e)break;return t??this._chainParams.consensus.type}consensusAlgorithm(){const e=this.hardfork();let t;for(const r of p.hardforks)if("consensus"in r[1]&&(t=r[1].consensus.algorithm),r[0]===e)break;return t??this._chainParams.consensus.algorithm}consensusConfig(){const e=this.hardfork();let t;for(const r of p.hardforks)if("consensus"in r[1]&&(t=r[1].consensus[r[1].consensus.algorithm]),r[0]===e)break;return t??this._chainParams.consensus[this.consensusAlgorithm()]}copy(){const e=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return e.removeAllListeners(),e}static _getInitializedChains(e){const t={};for(const[e,r]of Object.entries(h.Chain))t[r]=e.toLowerCase();const r={mainnet:c,ropsten:l,rinkeby:u,goerli:s,sepolia:f};if(e)for(const n of e){const{name:e}=n;t[n.chainId.toString()]=e,r[e]=n}return r.names=t,r}}t.Common=g},43925:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIPs=void 0,t.EIPs={1153:r(59765),1559:r(59659),2315:r(609),2537:r(34335),2565:r(40354),2718:r(43928),2929:r(10810),2930:r(33501),3074:r(96973),3198:r(24984),3529:r(3573),3540:r(36685),3541:r(96309),3554:r(93609),3607:r(4204),3651:r(69727),3670:r(18038),3675:r(33021),3855:r(94222),3860:r(54359),4345:r(58444),4399:r(46401),5133:r(29694)}},90649:(e,t)=>{"use strict";var r,n,i,o,a;Object.defineProperty(t,"__esModule",{value:!0}),t.CustomChain=t.ConsensusAlgorithm=t.ConsensusType=t.Hardfork=t.Chain=void 0,(a=t.Chain||(t.Chain={}))[a.Mainnet=1]="Mainnet",a[a.Ropsten=3]="Ropsten",a[a.Rinkeby=4]="Rinkeby",a[a.Goerli=5]="Goerli",a[a.Sepolia=11155111]="Sepolia",(o=t.Hardfork||(t.Hardfork={})).Chainstart="chainstart",o.Homestead="homestead",o.Dao="dao",o.TangerineWhistle="tangerineWhistle",o.SpuriousDragon="spuriousDragon",o.Byzantium="byzantium",o.Constantinople="constantinople",o.Petersburg="petersburg",o.Istanbul="istanbul",o.MuirGlacier="muirGlacier",o.Berlin="berlin",o.London="london",o.ArrowGlacier="arrowGlacier",o.GrayGlacier="grayGlacier",o.MergeForkIdTransition="mergeForkIdTransition",o.Merge="merge",o.Shanghai="shanghai",(i=t.ConsensusType||(t.ConsensusType={})).ProofOfStake="pos",i.ProofOfWork="pow",i.ProofOfAuthority="poa",(n=t.ConsensusAlgorithm||(t.ConsensusAlgorithm={})).Ethash="ethash",n.Clique="clique",n.Casper="casper",(r=t.CustomChain||(t.CustomChain={})).PolygonMainnet="polygon-mainnet",r.PolygonMumbai="polygon-mumbai",r.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",r.xDaiChain="x-dai-chain",r.OptimisticKovan="optimistic-kovan",r.OptimisticEthereum="optimistic-ethereum"},12188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=void 0,t.hardforks=[["chainstart",r(80021)],["homestead",r(72001)],["dao",r(75774)],["tangerineWhistle",r(70116)],["spuriousDragon",r(40610)],["byzantium",r(21773)],["constantinople",r(29517)],["petersburg",r(76694)],["istanbul",r(23316)],["muirGlacier",r(68288)],["berlin",r(45515)],["london",r(46497)],["shanghai",r(23317)],["arrowGlacier",r(98874)],["grayGlacier",r(13292)],["mergeForkIdTransition",r(76552)],["merge",r(69024)]]},31664:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(19752),t),i(r(90649),t),i(r(13732),t)},13732:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},57256:(e,t)=>{"use strict";function r(e){if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++)t.push(r(e[n]));const n=d(...t);return d(o(n.length,192),n)}const t=m(e);return 1===t.length&&t[0]<128?t:d(o(t.length,128),t)}function n(e,t,r){if(r>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function i(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function o(e,t){if(e<56)return Uint8Array.from([e+t]);const r=p(e),n=p(t+55+r.length/2);return Uint8Array.from(f(n+r))}function a(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);const r=s(m(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}function s(e){let t,r,o,a,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,o=128===l?Uint8Array.from([]):n(e,1,t),2===t&&o[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:o,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=i(n(e,1,r)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return o=n(e,r,t+r),{data:o,remainder:e.slice(t+r)}}if(l<=247){for(t=l-191,a=n(e,1,t);a.length;)c=s(a),u.push(c.data),a=c.remainder;return{data:u,remainder:e.slice(t)}}{if(r=l-246,t=i(n(e,1,r)),t<56)throw new Error("invalid RLP: encoded list too short");const o=r+t;if(o>e.length)throw new Error("invalid RLP: total length is larger than the data");for(a=n(e,r,o);a.length;)c=s(a),u.push(c.data),a=c.remainder;return{data:u,remainder:e.slice(o)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.RLP=t.utils=t.decode=t.encode=void 0,t.encode=r,t.decode=a;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let r=0;r<e.length;r++)t+=c[e[r]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function f(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r;t[r]=l(e.slice(n,n+2))}return t}function d(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}function h(e){return(new TextEncoder).encode(e)}function p(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function g(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function m(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return g(e)?f((t="string"!=typeof(r=e)?r:g(r)?r.slice(2):r).length%2?`0${t}`:t):h(e);var t,r;if("number"==typeof e||"bigint"==typeof e)return e?f(p(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:d,hexToBytes:f,utf8ToBytes:h},t.RLP={encode:r,decode:a}},37967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTransaction=void 0;const n=r(31664),i=r(45372),o=r(40636);t.BaseTransaction=class{constructor(e,t){this.cache={hash:void 0,dataFee:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=n.Chain.Mainnet,this.DEFAULT_HARDFORK=n.Hardfork.Merge;const{nonce:r,gasLimit:o,to:a,value:s,data:c,v:u,r:l,s:f,type:d}=e;this._type=Number((0,i.bufferToBigInt)((0,i.toBuffer)(d))),this.txOptions=t;const h=(0,i.toBuffer)(""===a?"0x":a),p=(0,i.toBuffer)(""===u?"0x":u),g=(0,i.toBuffer)(""===l?"0x":l),m=(0,i.toBuffer)(""===f?"0x":f);this.nonce=(0,i.bufferToBigInt)((0,i.toBuffer)(""===r?"0x":r)),this.gasLimit=(0,i.bufferToBigInt)((0,i.toBuffer)(""===o?"0x":o)),this.to=h.length>0?new i.Address(h):void 0,this.value=(0,i.bufferToBigInt)((0,i.toBuffer)(""===s?"0x":s)),this.data=(0,i.toBuffer)(""===c?"0x":c),this.v=p.length>0?(0,i.bufferToBigInt)(p):void 0,this.r=g.length>0?(0,i.bufferToBigInt)(g):void 0,this.s=m.length>0?(0,i.bufferToBigInt)(m):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0)}get type(){return this._type}supports(e){return this.activeCapabilities.includes(e)}validate(e=!1){const t=[];return this.getBaseFee()>this.gasLimit&&t.push(`gasLimit is too low. given ${this.gasLimit}, need at least ${this.getBaseFee()}`),this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),e?t:0===t.length}_validateYParity(){const{v:e}=this;if(void 0!==e&&e!==BigInt(0)&&e!==BigInt(1)){const e=this._errorMsg("The y-parity of the transaction should either be 0 or 1");throw new Error(e)}}_validateHighS(){const{s:e}=this;if(this.common.gteHardfork("homestead")&&void 0!==e&&e>i.SECP256K1_ORDER_DIV_2){const e=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(e)}}getBaseFee(){const e=this.common.param("gasPrices","tx");let t=this.getDataFee();if(e&&(t+=e),this.common.gteHardfork("homestead")&&this.toCreationAddress()){const e=this.common.param("gasPrices","txCreation");e&&(t+=e)}return t}getDataFee(){const e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero");let r=BigInt(0);for(let n=0;n<this.data.length;n++)0===this.data[n]?r+=e:r+=t;if((void 0===this.to||null===this.to)&&this.common.isActivatedEIP(3860)){const e=BigInt(Math.ceil(this.data.length/32));r+=this.common.param("gasPrices","initCodeWordCost")*e}return r}toCreationAddress(){return void 0===this.to||0===this.to.buf.length}isSigned(){const{v:e,r:t,s:r}=this;return void 0!==e&&void 0!==t&&void 0!==r}verifySignature(){try{const e=this.getSenderPublicKey();return 0!==(0,i.unpadBuffer)(e).length}catch(e){return!1}}getSenderAddress(){return new i.Address((0,i.publicToAddress)(this.getSenderPublicKey()))}sign(e){if(32!==e.length){const e=this._errorMsg("Private key must be 32 bytes in length.");throw new Error(e)}let t=!1;0===this.type&&this.common.gteHardfork("spuriousDragon")&&!this.supports(o.Capability.EIP155ReplayProtection)&&(this.activeCapabilities.push(o.Capability.EIP155ReplayProtection),t=!0);const r=this.getMessageToSign(!0),{v:n,r:a,s}=(0,i.ecsign)(r,e),c=this._processSignature(n,a,s);if(t){const e=this.activeCapabilities.indexOf(o.Capability.EIP155ReplayProtection);e>-1&&this.activeCapabilities.splice(e,1)}return c}_getCommon(e,t){if(void 0!==t){const r=(0,i.bufferToBigInt)((0,i.toBuffer)(t));if(e){if(e.chainId()!==r){const e=this._errorMsg("The chain ID does not match the chain ID of Common");throw new Error(e)}return e.copy()}return n.Common.isSupportedChainId(r)?new n.Common({chain:r,hardfork:this.DEFAULT_HARDFORK}):n.Common.custom({name:"custom-chain",networkId:r,chainId:r},{baseChain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}return e?.copy()??new n.Common({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}_validateCannotExceedMaxInteger(e,t=256,r=!1){for(const[n,o]of Object.entries(e))switch(t){case 64:if(r){if(void 0!==o&&o>=i.MAX_UINT64){const e=this._errorMsg(`${n} cannot equal or exceed MAX_UINT64 (2^64-1), given ${o}`);throw new Error(e)}}else if(void 0!==o&&o>i.MAX_UINT64){const e=this._errorMsg(`${n} cannot exceed MAX_UINT64 (2^64-1), given ${o}`);throw new Error(e)}break;case 256:if(r){if(void 0!==o&&o>=i.MAX_INTEGER){const e=this._errorMsg(`${n} cannot equal or exceed MAX_INTEGER (2^256-1), given ${o}`);throw new Error(e)}}else if(void 0!==o&&o>i.MAX_INTEGER){const e=this._errorMsg(`${n} cannot exceed MAX_INTEGER (2^256-1), given ${o}`);throw new Error(e)}break;default:{const e=this._errorMsg("unimplemented bits value");throw new Error(e)}}}_getSharedErrorPostfix(){let e="";try{e=this.isSigned()?(0,i.bufferToHex)(this.hash()):"not available (unsigned)"}catch(t){e="error"}let t="";try{t=this.isSigned().toString()}catch(t){e="error"}let r="";try{r=this.common.hardfork()}catch(e){r="error"}let n=`tx type=${this.type} hash=${e} nonce=${this.nonce} value=${this.value} `;return n+=`signed=${t} hf=${r}`,n}}},45716:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.FeeMarketEIP1559Transaction=void 0;const i=r(57256),o=r(45372),a=r(1115),s=r(37967),c=r(18284),u=n.from(2..toString(16).padStart(2,"0"),"hex");class l extends s.BaseTransaction{constructor(e,t={}){super({...e,type:2},t),this.DEFAULT_HARDFORK="london";const{chainId:r,accessList:n,maxFeePerGas:i,maxPriorityFeePerGas:a}=e;if(this.common=this._getCommon(t.common,r),this.chainId=this.common.chainId(),!1===this.common.isActivatedEIP(1559))throw new Error("EIP-1559 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);const s=c.AccessLists.getAccessListData(n??[]);if(this.accessList=s.accessList,this.AccessListJSON=s.AccessListJSON,c.AccessLists.verifyAccessList(this.accessList),this.maxFeePerGas=(0,o.bufferToBigInt)((0,o.toBuffer)(""===i?"0x":i)),this.maxPriorityFeePerGas=(0,o.bufferToBigInt)((0,o.toBuffer)(""===a?"0x":a)),this._validateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),this.gasLimit*this.maxFeePerGas>o.MAX_INTEGER){const e=this._errorMsg("gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)");throw new Error(e)}if(this.maxFeePerGas<this.maxPriorityFeePerGas){const e=this._errorMsg("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)");throw new Error(e)}this._validateYParity(),this._validateHighS(),this.common.isActivatedEIP(3860)&&(0,c.checkMaxInitCodeSize)(this.common,this.data.length),(t?.freeze??1)&&Object.freeze(this)}static fromTxData(e,t={}){return new l(e,t)}static fromSerializedTx(e,t={}){if(!e.slice(0,1).equals(u))throw new Error(`Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: 2, received: ${e.slice(0,1).toString("hex")}`);const r=(0,o.arrToBufArr)(i.RLP.decode(e.slice(1)));if(!Array.isArray(r))throw new Error("Invalid serialized tx input: must be array");return l.fromValuesArray(r,t)}static fromValuesArray(e,t={}){if(9!==e.length&&12!==e.length)throw new Error("Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).");const[r,n,i,a,s,c,u,f,d,h,p,g]=e;return(0,o.validateNoLeadingZeroes)({nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:a,gasLimit:s,value:u,v:h,r:p,s:g}),new l({chainId:(0,o.bufferToBigInt)(r),nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:a,gasLimit:s,to:c,value:u,data:f,accessList:d??[],v:void 0!==h?(0,o.bufferToBigInt)(h):void 0,r:p,s:g},t)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let e=super.getDataFee();return e+=BigInt(c.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:e,hardfork:this.common.hardfork()}),e}getUpfrontCost(e=BigInt(0)){const t=this.maxPriorityFeePerGas,r=this.maxFeePerGas-e,n=(t<r?t:r)+e;return this.gasLimit*n+this.value}raw(){return[(0,o.bigIntToUnpaddedBuffer)(this.chainId),(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,o.bigIntToUnpaddedBuffer)(this.maxFeePerGas),(0,o.bigIntToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bigIntToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,o.bigIntToUnpaddedBuffer)(this.v):n.from([]),void 0!==this.r?(0,o.bigIntToUnpaddedBuffer)(this.r):n.from([]),void 0!==this.s?(0,o.bigIntToUnpaddedBuffer)(this.s):n.from([])]}serialize(){const e=this.raw();return n.concat([u,n.from(i.RLP.encode((0,o.bufArrToArr)(e)))])}getMessageToSign(e=!0){const t=this.raw().slice(0,9),r=n.concat([u,n.from(i.RLP.encode((0,o.bufArrToArr)(t)))]);return e?n.from((0,a.keccak256)(r)):r}hash(){if(!this.isSigned()){const e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=n.from((0,a.keccak256)(this.serialize()))),this.cache.hash):n.from((0,a.keccak256)(this.serialize()))}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const e=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(e)}const e=this.getMessageToVerifySignature(),{v:t,r,s:n}=this;this._validateHighS();try{return(0,o.ecrecover)(e,t+BigInt(27),(0,o.bigIntToUnpaddedBuffer)(r),(0,o.bigIntToUnpaddedBuffer)(n))}catch(e){const t=this._errorMsg("Invalid Signature");throw new Error(t)}}_processSignature(e,t,r){const n={...this.txOptions,common:this.common};return l.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:e-BigInt(27),r:(0,o.bufferToBigInt)(t),s:(0,o.bufferToBigInt)(r)},n)}toJSON(){const e=c.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,o.bigIntToHex)(this.chainId),nonce:(0,o.bigIntToHex)(this.nonce),maxPriorityFeePerGas:(0,o.bigIntToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,o.bigIntToHex)(this.maxFeePerGas),gasLimit:(0,o.bigIntToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bigIntToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,o.bigIntToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bigIntToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bigIntToHex)(this.s):void 0}}errorStr(){let e=this._getSharedErrorPostfix();return e+=` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`,e}_errorMsg(e){return`${e} (${this.errorStr()})`}}t.FeeMarketEIP1559Transaction=l},49733:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.AccessListEIP2930Transaction=void 0;const i=r(57256),o=r(45372),a=r(1115),s=r(37967),c=r(18284),u=n.from(1..toString(16).padStart(2,"0"),"hex");class l extends s.BaseTransaction{constructor(e,t={}){super({...e,type:1},t),this.DEFAULT_HARDFORK="berlin";const{chainId:r,accessList:n,gasPrice:i}=e;if(this.common=this._getCommon(t.common,r),this.chainId=this.common.chainId(),!this.common.isActivatedEIP(2930))throw new Error("EIP-2930 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([2718,2930]);const a=c.AccessLists.getAccessListData(n??[]);if(this.accessList=a.accessList,this.AccessListJSON=a.AccessListJSON,c.AccessLists.verifyAccessList(this.accessList),this.gasPrice=(0,o.bufferToBigInt)((0,o.toBuffer)(""===i?"0x":i)),this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),this.gasPrice*this.gasLimit>o.MAX_INTEGER){const e=this._errorMsg("gasLimit * gasPrice cannot exceed MAX_INTEGER");throw new Error(e)}this._validateYParity(),this._validateHighS(),this.common.isActivatedEIP(3860)&&(0,c.checkMaxInitCodeSize)(this.common,this.data.length),(t?.freeze??1)&&Object.freeze(this)}static fromTxData(e,t={}){return new l(e,t)}static fromSerializedTx(e,t={}){if(!e.slice(0,1).equals(u))throw new Error(`Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: 1, received: ${e.slice(0,1).toString("hex")}`);const r=(0,o.arrToBufArr)(i.RLP.decode(Uint8Array.from(e.slice(1))));if(!Array.isArray(r))throw new Error("Invalid serialized tx input: must be array");return l.fromValuesArray(r,t)}static fromValuesArray(e,t={}){if(8!==e.length&&11!==e.length)throw new Error("Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).");const[r,n,i,a,s,c,u,f,d,h,p]=e;return(0,o.validateNoLeadingZeroes)({nonce:n,gasPrice:i,gasLimit:a,value:c,v:d,r:h,s:p}),new l({chainId:(0,o.bufferToBigInt)(r),nonce:n,gasPrice:i,gasLimit:a,to:s,value:c,data:u,accessList:f??[],v:void 0!==d?(0,o.bufferToBigInt)(d):void 0,r:h,s:p},t)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let e=super.getDataFee();return e+=BigInt(c.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:e,hardfork:this.common.hardfork()}),e}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}raw(){return[(0,o.bigIntToUnpaddedBuffer)(this.chainId),(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.gasPrice),(0,o.bigIntToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bigIntToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,o.bigIntToUnpaddedBuffer)(this.v):n.from([]),void 0!==this.r?(0,o.bigIntToUnpaddedBuffer)(this.r):n.from([]),void 0!==this.s?(0,o.bigIntToUnpaddedBuffer)(this.s):n.from([])]}serialize(){const e=this.raw();return n.concat([u,n.from(i.RLP.encode((0,o.bufArrToArr)(e)))])}getMessageToSign(e=!0){const t=this.raw().slice(0,8),r=n.concat([u,n.from(i.RLP.encode((0,o.bufArrToArr)(t)))]);return e?n.from((0,a.keccak256)(r)):r}hash(){if(!this.isSigned()){const e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=n.from((0,a.keccak256)(this.serialize()))),this.cache.hash):n.from((0,a.keccak256)(this.serialize()))}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const e=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(e)}const e=this.getMessageToVerifySignature(),{v:t,r,s:n}=this;this._validateHighS();try{return(0,o.ecrecover)(e,t+BigInt(27),(0,o.bigIntToUnpaddedBuffer)(r),(0,o.bigIntToUnpaddedBuffer)(n))}catch(e){const t=this._errorMsg("Invalid Signature");throw new Error(t)}}_processSignature(e,t,r){const n={...this.txOptions,common:this.common};return l.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:e-BigInt(27),r:(0,o.bufferToBigInt)(t),s:(0,o.bufferToBigInt)(r)},n)}toJSON(){const e=c.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,o.bigIntToHex)(this.chainId),nonce:(0,o.bigIntToHex)(this.nonce),gasPrice:(0,o.bigIntToHex)(this.gasPrice),gasLimit:(0,o.bigIntToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bigIntToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,o.bigIntToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bigIntToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bigIntToHex)(this.s):void 0}}errorStr(){let e=this._getSharedErrorPostfix();return e+=` gasPrice=${this.gasPrice} accessListCount=${this.accessList?.length??0}`,e}_errorMsg(e){return`${e} (${this.errorStr()})`}}t.AccessListEIP2930Transaction=l},34670:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionFactory=t.Transaction=t.AccessListEIP2930Transaction=t.FeeMarketEIP1559Transaction=void 0;var o=r(45716);Object.defineProperty(t,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return o.FeeMarketEIP1559Transaction}});var a=r(49733);Object.defineProperty(t,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return a.AccessListEIP2930Transaction}});var s=r(41247);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return s.Transaction}});var c=r(30921);Object.defineProperty(t,"TransactionFactory",{enumerable:!0,get:function(){return c.TransactionFactory}}),i(r(40636),t)},41247:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=void 0;const i=r(57256),o=r(45372),a=r(1115),s=r(37967),c=r(40636),u=r(18284);function l(e,t){const r=Number(e),n=2*Number(t);return r===n+35||r===n+36}class f extends s.BaseTransaction{constructor(e,t={}){if(super({...e,type:0},t),this.common=this._validateTxV(this.v,t.common),this.gasPrice=(0,o.bufferToBigInt)((0,o.toBuffer)(""===e.gasPrice?"0x":e.gasPrice)),this.gasPrice*this.gasLimit>o.MAX_INTEGER){const e=this._errorMsg("gas limit * gasPrice cannot exceed MAX_INTEGER (2^256-1)");throw new Error(e)}this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),this.common.gteHardfork("spuriousDragon")&&(this.isSigned()?l(this.v,this.common.chainId())&&this.activeCapabilities.push(c.Capability.EIP155ReplayProtection):this.activeCapabilities.push(c.Capability.EIP155ReplayProtection)),this.common.isActivatedEIP(3860)&&(0,u.checkMaxInitCodeSize)(this.common,this.data.length),(t?.freeze??1)&&Object.freeze(this)}static fromTxData(e,t={}){return new f(e,t)}static fromSerializedTx(e,t={}){const r=(0,o.arrToBufArr)(i.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(r))throw new Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(r,t)}static fromValuesArray(e,t={}){if(6!==e.length&&9!==e.length)throw new Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");const[r,n,i,a,s,c,u,l,d]=e;return(0,o.validateNoLeadingZeroes)({nonce:r,gasPrice:n,gasLimit:i,value:s,v:u,r:l,s:d}),new f({nonce:r,gasPrice:n,gasLimit:i,to:a,value:s,data:c,v:u,r:l,s:d},t)}raw(){return[(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.gasPrice),(0,o.bigIntToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bigIntToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,o.bigIntToUnpaddedBuffer)(this.v):n.from([]),void 0!==this.r?(0,o.bigIntToUnpaddedBuffer)(this.r):n.from([]),void 0!==this.s?(0,o.bigIntToUnpaddedBuffer)(this.s):n.from([])]}serialize(){return n.from(i.RLP.encode((0,o.bufArrToArr)(this.raw())))}_getMessageToSign(){const e=[(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.gasPrice),(0,o.bigIntToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bigIntToUnpaddedBuffer)(this.value),this.data];return this.supports(c.Capability.EIP155ReplayProtection)&&(e.push((0,o.toBuffer)(this.common.chainId())),e.push((0,o.unpadBuffer)((0,o.toBuffer)(0))),e.push((0,o.unpadBuffer)((0,o.toBuffer)(0)))),e}getMessageToSign(e=!0){const t=this._getMessageToSign();return e?n.from((0,a.keccak256)(i.RLP.encode((0,o.bufArrToArr)(t)))):t}getDataFee(){return this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork()?this.cache.dataFee.value:(Object.isFrozen(this)&&(this.cache.dataFee={value:super.getDataFee(),hardfork:this.common.hardfork()}),super.getDataFee())}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}hash(){if(!this.isSigned()){const e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=n.from((0,a.keccak256)(i.RLP.encode((0,o.bufArrToArr)(this.raw()))))),this.cache.hash):n.from((0,a.keccak256)(i.RLP.encode((0,o.bufArrToArr)(this.raw()))))}getMessageToVerifySignature(){if(!this.isSigned()){const e=this._errorMsg("This transaction is not signed");throw new Error(e)}const e=this._getMessageToSign();return n.from((0,a.keccak256)(i.RLP.encode((0,o.bufArrToArr)(e))))}getSenderPublicKey(){const e=this.getMessageToVerifySignature(),{v:t,r,s:n}=this;this._validateHighS();try{return(0,o.ecrecover)(e,t,(0,o.bigIntToUnpaddedBuffer)(r),(0,o.bigIntToUnpaddedBuffer)(n),this.supports(c.Capability.EIP155ReplayProtection)?this.common.chainId():void 0)}catch(e){const t=this._errorMsg("Invalid Signature");throw new Error(t)}}_processSignature(e,t,r){this.supports(c.Capability.EIP155ReplayProtection)&&(e+=this.common.chainId()*BigInt(2)+BigInt(8));const n={...this.txOptions,common:this.common};return f.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:e,r:(0,o.bufferToBigInt)(t),s:(0,o.bufferToBigInt)(r)},n)}toJSON(){return{nonce:(0,o.bigIntToHex)(this.nonce),gasPrice:(0,o.bigIntToHex)(this.gasPrice),gasLimit:(0,o.bigIntToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bigIntToHex)(this.value),data:"0x"+this.data.toString("hex"),v:void 0!==this.v?(0,o.bigIntToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bigIntToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bigIntToHex)(this.s):void 0}}_validateTxV(e,t){let r;const n=void 0!==e?Number(e):void 0;if(void 0!==n&&n<37&&27!==n&&28!==n)throw new Error(`Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ${n}`);if(void 0!==n&&0!==n&&(!t||t.gteHardfork("spuriousDragon"))&&27!==n&&28!==n)if(t){if(!l(BigInt(n),t.chainId()))throw new Error(`Incompatible EIP155-based V ${n} and chain id ${t.chainId()}. See the Common parameter of the Transaction constructor to set the chain id.`)}else{let e;e=(n-35)%2==0?35:36,r=BigInt(n-e)/BigInt(2)}return this._getCommon(t,r)}errorStr(){let e=this._getSharedErrorPostfix();return e+=` gasPrice=${this.gasPrice}`,e}_errorMsg(e){return`${e} (${this.errorStr()})`}}t.Transaction=f},30921:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionFactory=void 0;const i=r(45372),o=r(45716),a=r(49733),s=r(41247);t.TransactionFactory=class{constructor(){}static fromTxData(e,t={}){if("type"in e&&void 0!==e.type){const r=Number((0,i.bufferToBigInt)((0,i.toBuffer)(e.type)));if(0===r)return s.Transaction.fromTxData(e,t);if(1===r)return a.AccessListEIP2930Transaction.fromTxData(e,t);if(2===r)return o.FeeMarketEIP1559Transaction.fromTxData(e,t);throw new Error(`Tx instantiation with type ${r} not supported`)}return s.Transaction.fromTxData(e,t)}static fromSerializedData(e,t={}){if(e[0]<=127){let r;switch(e[0]){case 1:r=2930;break;case 2:r=1559;break;default:throw new Error(`TypedTransaction with ID ${e[0]} unknown`)}return 1559===r?o.FeeMarketEIP1559Transaction.fromSerializedTx(e,t):a.AccessListEIP2930Transaction.fromSerializedTx(e,t)}return s.Transaction.fromSerializedTx(e,t)}static fromBlockBodyData(e,t={}){if(n.isBuffer(e))return this.fromSerializedData(e,t);if(Array.isArray(e))return s.Transaction.fromValuesArray(e,t);throw new Error("Cannot decode transaction: unknown type input")}}},40636:(e,t)=>{"use strict";function r(e){if(0===e.length)return!0;const t=e[0];return!!Array.isArray(t)}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessList=t.isAccessListBuffer=t.Capability=void 0,(n=t.Capability||(t.Capability={}))[n.EIP155ReplayProtection=155]="EIP155ReplayProtection",n[n.EIP1559FeeMarket=1559]="EIP1559FeeMarket",n[n.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",n[n.EIP2930AccessLists=2930]="EIP2930AccessLists",t.isAccessListBuffer=r,t.isAccessList=function(e){return!r(e)}},18284:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessLists=t.checkMaxInitCodeSize=void 0;const n=r(45372),i=r(40636);t.checkMaxInitCodeSize=function(e,t){const r=e.param("vm","maxInitCodeSize");if(r&&BigInt(t)>r)throw new Error(`the initcode size of this transaction is too large: it is ${t} while the max is ${e.param("vm","maxInitCodeSize")}`)},t.AccessLists=class{static getAccessListData(e){let t,r;if((0,i.isAccessList)(e)){t=e;const i=[];for(let t=0;t<e.length;t++){const r=e[t],o=(0,n.toBuffer)(r.address),a=[];for(let e=0;e<r.storageKeys.length;e++)a.push((0,n.toBuffer)(r.storageKeys[e]));i.push([o,a])}r=i}else{r=e??[];const i=[];for(let e=0;e<r.length;e++){const t=r[e],o=(0,n.bufferToHex)(t[0]),a=[];for(let e=0;e<t[1].length;e++)a.push((0,n.bufferToHex)(t[1][e]));const s={address:o,storageKeys:a};i.push(s)}t=i}return{AccessListJSON:t,accessList:r}}static verifyAccessList(e){for(let t=0;t<e.length;t++){const r=e[t],n=r[0],i=r[1];if(void 0!==r[2])throw new Error("Access list item cannot have 3 elements. It can only have an address, and an array of storage slots.");if(20!==n.length)throw new Error("Invalid EIP-2930 transaction: address length should be 20 bytes");for(let e=0;e<i.length;e++)if(32!==i[e].length)throw new Error("Invalid EIP-2930 transaction: storage slot length should be 32 bytes")}}static getAccessListJSON(e){const t=[];for(let r=0;r<e.length;r++){const i=e[r],o={address:"0x"+(0,n.setLengthLeft)(i[0],20).toString("hex"),storageKeys:[]},a=i[1];for(let e=0;e<a.length;e++){const t=a[e];o.storageKeys.push("0x"+(0,n.setLengthLeft)(t,32).toString("hex"))}t.push(o)}return t}static getDataFeeEIP2930(e,t){const r=t.param("gasPrices","accessListStorageKeyCost"),n=t.param("gasPrices","accessListAddressCost");let i=0;for(let t=0;t<e.length;t++)i+=e[t][1].length;return e.length*Number(n)+i*Number(r)}}},54706:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.convertSlimAccount=t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;const i=r(57256),o=r(1115),a=r(80101),s=r(10144),c=r(85766),u=r(38127),l=r(38707),f=r(34243),d=BigInt(0);class h{constructor(e=d,t=d,r=u.KECCAK256_RLP,n=u.KECCAK256_NULL){this.nonce=e,this.balance=t,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(e){const{nonce:t,balance:r,storageRoot:n,codeHash:i}=e;return new h(void 0!==t?(0,c.bufferToBigInt)((0,c.toBuffer)(t)):void 0,void 0!==r?(0,c.bufferToBigInt)((0,c.toBuffer)(r)):void 0,void 0!==n?(0,c.toBuffer)(n):void 0,void 0!==i?(0,c.toBuffer)(i):void 0)}static fromRlpSerializedAccount(e){const t=(0,c.arrToBufArr)(i.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,r,n,i]=e;return new h((0,c.bufferToBigInt)(t),(0,c.bufferToBigInt)(r),n,i)}_validate(){if(this.nonce<d)throw new Error("nonce must be greater than zero");if(this.balance<d)throw new Error("balance must be greater than zero");if(32!==this.storageRoot.length)throw new Error("storageRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")}raw(){return[(0,c.bigIntToUnpaddedBuffer)(this.nonce),(0,c.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return n.from(i.RLP.encode((0,c.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(u.KECCAK256_NULL)}isEmpty(){return this.balance===d&&this.nonce===d&&this.codeHash.equals(u.KECCAK256_NULL)}}t.Account=h,t.isValidAddress=function(e){try{(0,l.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,l.assertIsHexString)(e);const r=(0,f.stripHexPrefix)(e).toLowerCase();let i="";void 0!==t&&(i=(0,c.bufferToBigInt)((0,c.toBuffer)(t)).toString()+"0x");const a=n.from(i+r,"utf8"),u=(0,s.bytesToHex)((0,o.keccak256)(a));let d="0x";for(let e=0;e<r.length;e++)parseInt(u[e],16)>=8?d+=r[e].toUpperCase():d+=r[e];return d},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){return(0,l.assertIsBuffer)(e),(0,l.assertIsBuffer)(t),(0,c.bufferToBigInt)(t)===BigInt(0)?n.from((0,o.keccak256)(i.RLP.encode((0,c.bufArrToArr)([e,null])))).slice(-20):n.from((0,o.keccak256)(i.RLP.encode((0,c.bufArrToArr)([e,t])))).slice(-20)},t.generateAddress2=function(e,t,r){if((0,l.assertIsBuffer)(e),(0,l.assertIsBuffer)(t),(0,l.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");const i=(0,o.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,o.keccak256)(r)]));return(0,c.toBuffer)(i).slice(-20)},t.isValidPrivate=function(e){return a.utils.isValidPrivateKey(e)},t.isValidPublic=function(e,t=!1){if((0,l.assertIsBuffer)(e),64===e.length)try{return a.Point.fromHex(n.concat([n.from([4]),e])),!0}catch(e){return!1}if(!t)return!1;try{return a.Point.fromHex(e),!0}catch(e){return!1}},t.pubToAddress=function(e,t=!1){if((0,l.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from(a.Point.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return n.from((0,o.keccak256)(e)).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,l.assertIsBuffer)(e),n.from(a.Point.fromPrivateKey(e).toRawBytes(!1).slice(1))},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,l.assertIsBuffer)(e),64!==e.length&&(e=n.from(a.Point.fromHex(e).toRawBytes(!1).slice(1))),e},t.zeroAddress=function(){const e=(0,c.zeros)(20);return(0,c.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,l.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e},t.convertSlimAccount=function(e){const t=[e[0],e[1],e[2],e[3]];return 0===(0,c.arrToBufArr)(e[2]).length&&(t[2]=u.KECCAK256_RLP),0===(0,c.arrToBufArr)(e[3]).length&&(t[3]=u.KECCAK256_NULL),(0,c.arrToBufArr)(i.RLP.encode(t))}},38515:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;const i=r(54706),o=r(85766);class a{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.buf=e}static zero(){return new a((0,o.zeros)(20))}static fromString(e){if(!(0,i.isValidAddress)(e))throw new Error("Invalid address");return new a((0,o.toBuffer)(e))}static fromPublicKey(e){if(!n.isBuffer(e))throw new Error("Public key should be Buffer");const t=(0,i.pubToAddress)(e);return new a(t)}static fromPrivateKey(e){if(!n.isBuffer(e))throw new Error("Private key should be Buffer");const t=(0,i.privateToAddress)(e);return new a(t)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new a((0,i.generateAddress)(e.buf,(0,o.bigIntToBuffer)(t)))}static generate2(e,t,r){if(!n.isBuffer(t))throw new Error("Expected salt to be a Buffer");if(!n.isBuffer(r))throw new Error("Expected initCode to be a Buffer");return new a((0,i.generateAddress2)(e.buf,t,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(a.zero())}isPrecompileOrSystemAddress(){const e=(0,o.bufferToBigInt)(this.buf),t=BigInt(0),r=BigInt("0xffff");return e>=t&&e<=r}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return n.from(this.buf)}}t.Address=a},85766:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.bigIntToUnpaddedBuffer=t.bigIntToHex=t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.short=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToInt=t.bigIntToBuffer=t.bufferToBigInt=t.bufferToHex=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;const i=r(38707),o=r(34243);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},t.intToBuffer=function(e){const r=(0,t.intToHex)(e);return n.from((0,o.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};const a=function(e,r,n){const i=(0,t.zeros)(r);return n?e.length<r?(e.copy(i),i):e.slice(0,r):e.length<r?(e.copy(i,r-e.length),i):e.slice(-r)};t.setLengthLeft=function(e,t){return(0,i.assertIsBuffer)(e),a(e,t,!1)},t.setLengthRight=function(e,t){return(0,i.assertIsBuffer)(e),a(e,t,!0)};const s=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};function c(e){const r=(0,t.bufferToHex)(e);return"0x"===r?BigInt(0):BigInt(r)}function u(e){return(0,t.toBuffer)("0x"+e.toString(16))}t.unpadBuffer=function(e){return(0,i.assertIsBuffer)(e),s(e)},t.unpadArray=function(e){return(0,i.assertIsArray)(e),s(e)},t.unpadHexString=function(e){return(0,i.assertIsHexString)(e),e=(0,o.stripHexPrefix)(e),"0x"+s(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,o.isHexString)(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return n.from((0,o.padToEven)((0,o.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if("bigint"==typeof e){if(e<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t="0"+t),n.from(t,"hex")}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.bufferToBigInt=c,t.bigIntToBuffer=u,t.bufferToInt=function(e){const t=Number(c(e));if(!Number.isSafeInteger(t))throw new Error("Number exceeds 53 bits");return t},t.fromSigned=function(e){return BigInt.asIntN(256,c(e))},t.toUnsigned=function(e){return u(BigInt.asUintN(256,e))},t.addHexPrefix=function(e){return"string"!=typeof e||(0,o.isHexPrefixed)(e)?e:"0x"+e},t.short=function(e,t=50){const r=n.isBuffer(e)?e.toString("hex"):e;return r.length<=t?r:r.slice(0,t)+"…"},t.toUtf8=function(e){if((e=(0,o.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return`0x${e.toString("hex")}`;if(e instanceof Array){const r=[];for(let n=0;n<e.length;n++)r.push((0,t.baToJSON)(e[n]));return r}},t.validateNoLeadingZeroes=function(e){for(const[t,r]of Object.entries(e))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${t} cannot have leading zeroes, received: ${r.toString("hex")}`)},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(t??[])},t.bigIntToHex=e=>"0x"+e.toString(16),t.bigIntToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)(u(e))}},38127:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RLP_EMPTY_STRING=t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.SECP256K1_ORDER_DIV_2=t.SECP256K1_ORDER=t.MAX_INTEGER_BIGINT=t.MAX_INTEGER=t.MAX_UINT64=void 0;const n=r(48834),i=r(80101);t.MAX_UINT64=BigInt("0xffffffffffffffff"),t.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MAX_INTEGER_BIGINT=BigInt(2)**BigInt(256)-BigInt(1),t.SECP256K1_ORDER=i.CURVE.n,t.SECP256K1_ORDER_DIV_2=i.CURVE.n/BigInt(2),t.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex"),t.RLP_EMPTY_STRING=n.Buffer.from([128])},38707:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;const i=r(34243);t.assertIsHexString=function(e){if(!(0,i.isHexString)(e))throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)},t.assertIsBuffer=function(e){if(!n.isBuffer(e))throw new Error(`This method only supports Buffer but input was: ${e}`)},t.assertIsArray=function(e){if(!Array.isArray(e))throw new Error(`This method only supports number arrays but input was: ${e}`)},t.assertIsString=function(e){if("string"!=typeof e)throw new Error(`This method only supports strings but input was: ${e}`)}},45372:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.toAscii=t.stripHexPrefix=t.padToEven=t.isHexString=t.isHexPrefixed=t.getKeys=t.getBinarySize=t.fromUtf8=t.fromAscii=t.arrayContainsArray=void 0,i(r(38127),t),i(r(54706),t),i(r(38515),t),i(r(2074),t),i(r(85766),t),i(r(82103),t);var o=r(34243);Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}})},34243:(e,t,r)=>{"use strict";var n=r(48834).Buffer;function i(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}function o(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=i,t.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return i(e)?e.slice(2):e},t.padToEven=o,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved "+typeof e);return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===r?"some":"every"]((t=>e.indexOf(t)>=0))},t.toAscii=function(e){let t="",r=0;const n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2){const n=parseInt(e.substr(r,2),16);t+=String.fromCharCode(n)}return t},t.fromUtf8=function(e){return`0x${o(n.from(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}`},t.fromAscii=function(e){let t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r).toString(16);t+=n.length<2?`0${n}`:n}return`0x${t}`},t.getKeys=function(e,t,r){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const n=[];for(let i=0;i<e.length;i++){let o=e[i][t];if(!0!==r||o){if("string"!=typeof o)throw new Error("invalid abi - expected type 'string', received "+typeof o)}else o="";n.push(o)}return n},t.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||void 0!==t&&t>0&&e.length!==2+2*t)}},2074:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;const i=r(1115),o=r(80101),a=r(85766),s=r(38127),c=r(38707);function u(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function l(e){return e===BigInt(0)||e===BigInt(1)}t.ecsign=function(e,t,r){const[i,a]=(0,o.signSync)(e,t,{recovered:!0,der:!1});return{r:n.from(i.slice(0,32)),s:n.from(i.slice(32,64)),v:void 0===r?BigInt(a+27):BigInt(a+35)+BigInt(r)*BigInt(2)}},t.ecrecover=function(e,t,r,i,s){const c=n.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(i,32)],64),f=u(t,s);if(!l(f))throw new Error("Invalid signature v value");const d=(0,o.recoverPublicKey)(e,c,Number(f));return n.from(d.slice(1))},t.toRpcSig=function(e,t,r,i){if(!l(u(e,i)))throw new Error("Invalid signature v value");return(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(r,32),(0,a.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,i){if(!l(u(e,i)))throw new Error("Invalid signature v value");let o=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(o=n.from(r),o[0]|=128),(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(o,32)]))},t.fromRpcSig=function(e){const t=(0,a.toBuffer)(e);let r,n,i;if(t.length>=65)r=t.slice(0,32),n=t.slice(32,64),i=(0,a.bufferToBigInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),n=t.slice(32,64),i=BigInt((0,a.bufferToInt)(t.slice(32,33))>>7),n[0]&=127}return i<27&&(i+=BigInt(27)),{v:i,r,s:n}},t.isValidSignature=function(e,t,r,n=!0,i){if(32!==t.length||32!==r.length)return!1;if(!l(u(e,i)))return!1;const o=(0,a.bufferToBigInt)(t),c=(0,a.bufferToBigInt)(r);return!(o===BigInt(0)||o>=s.SECP256K1_ORDER||c===BigInt(0)||c>=s.SECP256K1_ORDER||n&&c>=s.SECP256K1_ORDER_DIV_2)},t.hashPersonalMessage=function(e){(0,c.assertIsBuffer)(e);const t=n.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return n.from((0,i.keccak256)(n.concat([t,e])))}},82103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=void 0;const n=r(85766),i=r(34243);var o;!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(o=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,i.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const r=(0,n.toBuffer)(e);switch(t){case o.Buffer:return r;case o.BigInt:return(0,n.bufferToBigInt)(r);case o.Number:{const e=(0,n.bufferToBigInt)(r);if(e>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(e)}case o.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error("unknown outputType")}}},16050:e=>{"use strict";e.exports=function({mustBeMetaMask:e=!1,silent:t=!1,timeout:r=3e3}={}){!function(){if("boolean"!=typeof e)throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if("boolean"!=typeof t)throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if("number"!=typeof r)throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}();let n=!1;return new Promise((i=>{function o(){if(n)return;n=!0,window.removeEventListener("ethereum#initialized",o);const{ethereum:r}=window;if(!r||e&&!r.isMetaMask){const n=e&&r?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum.";!t&&console.error("@metamask/detect-provider:",n),i(null)}else i(r)}window.ethereum?o():(window.addEventListener("ethereum#initialized",o,{once:!0}),setTimeout((()=>{o()}),r))}))}},92517:function(e,t,r){"use strict";var n=r(48834).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getEncryptionPublicKey=t.decryptSafely=t.decrypt=t.encryptSafely=t.encrypt=void 0;const s=a(r(10717)),c=a(r(251)),u=r(65491);function l({publicKey:e,data:t,version:r}){if((0,u.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,u.isNullish)(t))throw new Error("Missing data parameter");if((0,u.isNullish)(r))throw new Error("Missing version parameter");if("x25519-xsalsa20-poly1305"===r){if("string"!=typeof t)throw new Error("Message data must be given as a string");const r=s.box.keyPair();let n;try{n=c.decodeBase64(e)}catch(e){throw new Error("Bad public key")}const i=c.decodeUTF8(t),o=s.randomBytes(s.box.nonceLength),a=s.box(i,o,n,r.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:c.encodeBase64(o),ephemPublicKey:c.encodeBase64(r.publicKey),ciphertext:c.encodeBase64(a)}}throw new Error("Encryption type/version not supported")}function f({encryptedData:e,privateKey:t}){if((0,u.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,u.isNullish)(t))throw new Error("Missing privateKey parameter");if("x25519-xsalsa20-poly1305"===e.version){const r=d(t),n=s.box.keyPair.fromSecretKey(r).secretKey,i=c.decodeBase64(e.nonce),o=c.decodeBase64(e.ciphertext),a=c.decodeBase64(e.ephemPublicKey),u=s.box.open(o,i,a,n);let l;try{l=c.encodeUTF8(u)}catch(e){throw new Error("Decryption failed.")}if(l)return l;throw new Error("Decryption failed.")}throw new Error("Encryption type/version not supported.")}function d(e){const t=n.from(e,"hex").toString("base64");return c.decodeBase64(t)}t.encrypt=l,t.encryptSafely=function({publicKey:e,data:t,version:r}){if((0,u.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,u.isNullish)(t))throw new Error("Missing data parameter");if((0,u.isNullish)(r))throw new Error("Missing version parameter");if("object"==typeof t&&"toJSON"in t)throw new Error("Cannot encrypt with toJSON property. Please remove toJSON property");const i={data:t,padding:""},o=n.byteLength(JSON.stringify(i),"utf-8")%2048;let a=0;return o>0&&(a=2048-o-16),i.padding="0".repeat(a),l({publicKey:e,data:JSON.stringify(i),version:r})},t.decrypt=f,t.decryptSafely=function({encryptedData:e,privateKey:t}){if((0,u.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,u.isNullish)(t))throw new Error("Missing privateKey parameter");return JSON.parse(f({encryptedData:e,privateKey:t})).data},t.getEncryptionPublicKey=function(e){const t=d(e),r=s.box.keyPair.fromSecretKey(t).publicKey;return c.encodeBase64(r)}},18345:function(e,t,r){"use strict";var n=r(48834).Buffer,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rawEncode=t.parseNumber=t.solidityPack=void 0;const o=r(45372),a=r(81538),s=i(r(62197)),c=r(65491);function u(e){return e.lastIndexOf("]")===e.length-1}function l(e){const t=e.match(/(.*)\[(.*?)\]$/u);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function f(e){return parseInt(/^\D+(\d+)$/u.exec(e)[1],10)}function d(e){const t=typeof e;if("string"===t)return(0,o.isHexPrefixed)(e)?new s.default((0,a.stripHexPrefix)(e),16):new s.default(e,10);if("number"===t)return new s.default(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function h(e,t,r){let i,a;if(u(e)){const r=e.replace(/\[.*?\]/u,"");if(!u(r)){const r=l(e);if("dynamic"!==r&&0!==r&&t.length>r)throw new Error(`Elements exceed array size: ${r}`)}const i=t.map((function(e){return h(r,e,256)}));return n.concat(i)}if("bytes"===e)return t;if("string"===e)return n.from(t,"utf8");if("bool"===e){r=r||8;const e=Array(r/4).join("0");return n.from(t?`${e}1`:`${e}0`,"hex")}if("address"===e){let e=20;return r&&(e=r/8),(0,o.setLengthLeft)((0,o.toBuffer)(t),e)}if(e.startsWith("bytes")){if(i=f(e),i<1||i>32)throw new Error(`Invalid bytes<N> width: ${i}`);return"number"==typeof t&&(t=(0,c.normalize)(t)),(0,o.setLengthRight)((0,o.toBuffer)(t),i)}if(e.startsWith("uint")){if(i=f(e),i%8||i<8||i>256)throw new Error(`Invalid uint<N> width: ${i}`);if(a=d(t),a.bitLength()>i)throw new Error(`Supplied uint exceeds width: ${i} vs ${a.bitLength()}`);return r=r||i,a.toArrayLike(n,"be",r/8)}if(e.startsWith("int")){if(i=f(e),i%8||i<8||i>256)throw new Error(`Invalid int<N> width: ${i}`);if(a=d(t),a.bitLength()>i)throw new Error(`Supplied int exceeds width: ${i} vs ${a.bitLength()}`);return r=r||i,a.toTwos(i).toArrayLike(n,"be",r/8)}throw new Error(`Unsupported or invalid type: ${e}`)}function p(e){return e.startsWith("int[")?`int256${e.slice(3)}`:"int"===e?"int256":e.startsWith("uint[")?`uint256${e.slice(4)}`:"uint"===e?"uint256":e.startsWith("fixed[")?`fixed128x128${e.slice(5)}`:"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?`ufixed128x128${e.slice(6)}`:"ufixed"===e?"ufixed128x128":e}function g(e,t){let r,i,a,h;if("address"===e)return g("uint160",d(t));if("bool"===e)return g("uint8",t?1:0);if("string"===e)return g("bytes",n.from(t,"utf8"));if(u(e)){if(void 0===t.length)throw new Error("Not an array?");if(r=l(e),"dynamic"!==r&&0!==r&&t.length>r)throw new Error(`Elements exceed array size: ${r}`);for(h in a=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof t&&(t=JSON.parse(t)),t)Object.prototype.hasOwnProperty.call(t,h)&&a.push(g(e,t[h]));if("dynamic"===r){const e=g("uint256",t.length);a.unshift(e)}return n.concat(a)}if("bytes"===e)return t=n.from(t),a=n.concat([g("uint256",t.length),t]),t.length%32!=0&&(a=n.concat([a,(0,o.zeros)(32-t.length%32)])),a;if(e.startsWith("bytes")){if(r=f(e),r<1||r>32)throw new Error(`Invalid bytes<N> width: ${r}`);return"number"==typeof t&&(t=(0,c.normalize)(t)),(0,o.setLengthRight)((0,o.toBuffer)(t),32)}if(e.startsWith("uint")){if(r=f(e),r%8||r<8||r>256)throw new Error(`Invalid uint<N> width: ${r}`);if(i=d(t),i.bitLength()>r)throw new Error(`Supplied uint exceeds width: ${r} vs ${i.bitLength()}`);if(i<0)throw new Error("Supplied uint is negative");return i.toArrayLike(n,"be",32)}if(e.startsWith("int")){if(r=f(e),r%8||r<8||r>256)throw new Error(`Invalid int<N> width: ${r}`);if(i=d(t),i.bitLength()>r)throw new Error(`Supplied int exceeds width: ${r} vs ${i.bitLength()}`);return i.toTwos(256).toArrayLike(n,"be",32)}if(e.startsWith("ufixed")){if(r=y(e),i=d(t),i<0)throw new Error("Supplied ufixed is negative");return g("uint256",i.mul(new s.default(2).pow(new s.default(r[1]))))}if(e.startsWith("fixed"))return r=y(e),g("int256",d(t).mul(new s.default(2).pow(new s.default(r[1]))));throw new Error(`Unsupported or invalid type: ${e}`)}function m(e){return"string"===e||"bytes"===e||"dynamic"===l(e)}function y(e){const t=/^\D+(\d+)x(\d+)$/u.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}t.solidityPack=function(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");const r=[];for(let n=0;n<e.length;n++){const i=p(e[n]),o=t[n];r.push(h(i,o,null))}return n.concat(r)},t.parseNumber=d,t.rawEncode=function(e,t){const r=[],i=[];let o=0;e.forEach((function(e){if(u(e)){const t=l(e);o+="dynamic"!==t?32*t:32}else o+=32}));for(let n=0;n<e.length;n++){const a=p(e[n]),s=g(a,t[n]);m(a)?(r.push(g("uint256",o)),i.push(s),o+=s.length):r.push(s)}return n.concat(r.concat(i))}},50539:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.concatSig=void 0,i(r(91695),t),i(r(5190),t),i(r(92517),t);var o=r(65491);Object.defineProperty(t,"concatSig",{enumerable:!0,get:function(){return o.concatSig}}),Object.defineProperty(t,"normalize",{enumerable:!0,get:function(){return o.normalize}})},91695:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractPublicKey=t.recoverPersonalSignature=t.personalSign=void 0;const n=r(45372),i=r(65491);function o(e,t){const r=(0,n.hashPersonalMessage)((0,i.legacyToBuffer)(e));return(0,i.recoverPublicKey)(r,t)}t.personalSign=function({privateKey:e,data:t}){if((0,i.isNullish)(t))throw new Error("Missing data parameter");if((0,i.isNullish)(e))throw new Error("Missing privateKey parameter");const r=(0,i.legacyToBuffer)(t),o=(0,n.hashPersonalMessage)(r),a=(0,n.ecsign)(o,e);return(0,i.concatSig)((0,n.toBuffer)(a.v),a.r,a.s)},t.recoverPersonalSignature=function({data:e,signature:t}){if((0,i.isNullish)(e))throw new Error("Missing data parameter");if((0,i.isNullish)(t))throw new Error("Missing signature parameter");const r=o(e,t),a=(0,n.publicToAddress)(r);return(0,n.bufferToHex)(a)},t.extractPublicKey=function({data:e,signature:t}){if((0,i.isNullish)(e))throw new Error("Missing data parameter");if((0,i.isNullish)(t))throw new Error("Missing signature parameter");return`0x${o(e,t).toString("hex")}`}},5190:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedSignature=t.signTypedData=t.typedSignatureHash=t.TypedDataUtils=t.TYPED_MESSAGE_SCHEMA=t.SignTypedDataVersion=void 0;const i=r(81538),o=r(45372),a=r(1115),s=r(18345),c=r(65491);var u;function l(e,t){if(!Object.keys(u).includes(e))throw new Error(`Invalid version: '${e}'`);if(t&&!t.includes(e))throw new Error(`SignTypedDataVersion not allowed: '${e}'. Allowed versions are: ${t.join(", ")}`)}function f(e,t,r,h,p){if(l(p,[u.V3,u.V4]),void 0!==e[r])return["bytes32",p===u.V4&&null==h?"0x0000000000000000000000000000000000000000000000000000000000000000":(0,o.arrToBufArr)((0,a.keccak256)(d(r,h,e,p)))];if(void 0===h)throw new Error(`missing value for field ${t} of type ${r}`);if("bytes"===r)return h="number"==typeof h?(0,c.numberToBuffer)(h):(0,i.isHexString)(h)?(0,c.numberToBuffer)(parseInt(h,16)):n.from(h,"utf8"),["bytes32",(0,o.arrToBufArr)((0,a.keccak256)(h))];if("string"===r)return h="number"==typeof h?(0,c.numberToBuffer)(h):n.from(null!=h?h:"","utf8"),["bytes32",(0,o.arrToBufArr)((0,a.keccak256)(h))];if(r.lastIndexOf("]")===r.length-1){if(p===u.V3)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");const n=r.slice(0,r.lastIndexOf("[")),i=h.map((r=>f(e,t,n,r,p)));return["bytes32",(0,o.arrToBufArr)((0,a.keccak256)((0,s.rawEncode)(i.map((([e])=>e)),i.map((([,e])=>e)))))]}return[r,h]}function d(e,t,r,n){l(n,[u.V3,u.V4]);const i=["bytes32"],o=[m(e,r)];for(const a of r[e]){if(n===u.V3&&void 0===t[a.name])continue;const[e,s]=f(r,a.name,a.type,t[a.name],n);i.push(e),o.push(s)}return(0,s.rawEncode)(i,o)}function h(e,t){let r="";const n=p(e,t);n.delete(e);const i=[e,...Array.from(n).sort()];for(const e of i){if(!t[e])throw new Error(`No type definition specified: ${e}`);r+=`${e}(${t[e].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`}return r}function p(e,t,r=new Set){if([e]=e.match(/^\w*/u),r.has(e)||void 0===t[e])return r;r.add(e);for(const n of t[e])p(n.type,t,r);return r}function g(e,t,r,n){return l(n,[u.V3,u.V4]),(0,o.arrToBufArr)((0,a.keccak256)(d(e,t,r,n)))}function m(e,t){const r=n.from(h(e,t),"utf-8");return(0,o.arrToBufArr)((0,a.keccak256)(r))}function y(e){const r={};for(const n in t.TYPED_MESSAGE_SCHEMA.properties)e[n]&&(r[n]=e[n]);return"types"in r&&(r.types=Object.assign({EIP712Domain:[]},r.types)),r}function b(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!("length"in e)||!e.length)throw t;const r=e.map((function(e){return"bytes"!==e.type?e.value:(0,c.legacyToBuffer)(e.value)})),n=e.map((function(e){return e.type})),i=e.map((function(e){if(!e.name)throw t;return`${e.type} ${e.name}`}));return(0,o.arrToBufArr)((0,a.keccak256)((0,s.solidityPack)(["bytes32","bytes32"],[(0,a.keccak256)((0,s.solidityPack)(new Array(e.length).fill("string"),i)),(0,a.keccak256)((0,s.solidityPack)(n,r))])))}!function(e){e.V1="V1",e.V3="V3",e.V4="V4"}(u=t.SignTypedDataVersion||(t.SignTypedDataVersion={})),t.TYPED_MESSAGE_SCHEMA={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},t.TypedDataUtils={encodeData:d,encodeType:h,findTypeDependencies:p,hashStruct:g,hashType:m,sanitizeData:y,eip712Hash:function(e,t){l(t,[u.V3,u.V4]);const r=y(e),i=[n.from("1901","hex")];return i.push(g("EIP712Domain",r.domain,r.types,t)),"EIP712Domain"!==r.primaryType&&i.push(g(r.primaryType,r.message,r.types,t)),(0,o.arrToBufArr)((0,a.keccak256)(n.concat(i)))}},t.typedSignatureHash=function(e){const t=b(e);return(0,o.bufferToHex)(t)},t.signTypedData=function({privateKey:e,data:r,version:n}){if(l(n),(0,c.isNullish)(r))throw new Error("Missing data parameter");if((0,c.isNullish)(e))throw new Error("Missing private key parameter");const i=n===u.V1?b(r):t.TypedDataUtils.eip712Hash(r,n),a=(0,o.ecsign)(i,e);return(0,c.concatSig)((0,o.toBuffer)(a.v),a.r,a.s)},t.recoverTypedSignature=function({data:e,signature:r,version:n}){if(l(n),(0,c.isNullish)(e))throw new Error("Missing data parameter");if((0,c.isNullish)(r))throw new Error("Missing signature parameter");const i=n===u.V1?b(e):t.TypedDataUtils.eip712Hash(e,n),a=(0,c.recoverPublicKey)(i,r),s=(0,o.publicToAddress)(a);return(0,o.bufferToHex)(s)}},65491:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.numberToBuffer=t.normalize=t.recoverPublicKey=t.concatSig=t.legacyToBuffer=t.isNullish=t.padWithZeroes=void 0;const i=r(45372),o=r(81538);function a(e,t){if(""!==e&&!/^[a-f0-9]+$/iu.test(e))throw new Error(`Expected an unprefixed hex string. Received: ${e}`);if(t<0)throw new Error(`Expected a non-negative integer target length. Received: ${t}`);return String.prototype.padStart.call(e,t,"0")}t.padWithZeroes=a,t.isNullish=function(e){return null==e},t.legacyToBuffer=function(e){return"string"!=typeof e||(0,o.isHexString)(e)?(0,i.toBuffer)(e):n.from(e)},t.concatSig=function(e,t,r){const n=(0,i.fromSigned)(t),s=(0,i.fromSigned)(r),c=(0,i.bufferToInt)(e),u=a((0,i.toUnsigned)(n).toString("hex"),64),l=a((0,i.toUnsigned)(s).toString("hex"),64),f=(0,o.stripHexPrefix)((0,o.intToHex)(c));return(0,i.addHexPrefix)(u.concat(l,f))},t.recoverPublicKey=function(e,t){const r=(0,i.fromRpcSig)(t);return(0,i.ecrecover)(e,r.v,r.r,r.s)},t.normalize=function(e){if(e){if("number"==typeof e){if(e<0)return"0x";const t=(0,i.toBuffer)(e);e=(0,i.bufferToHex)(t)}if("string"!=typeof e){let t="eth-sig-util.normalize() requires hex string or integer input.";throw t+=` received ${typeof e}: ${e}`,new Error(t)}return(0,i.addHexPrefix)(e.toLowerCase())}},t.numberToBuffer=function(e){const t=e.toString(16),r=t.length%2?"0":"";return n.from(r+t,"hex")}},37532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComposedStore=void 0;const n=r(77634);class i extends n.ObservableStore{constructor(e){super({}),this._children=e||{},Object.keys(this._children).forEach((e=>{const t=this._children[e];this._addChild(e,t)}))}_addChild(e,t){const r=t=>{const r=this.getState();r[e]=t,this.putState(r)};t.subscribe(r),r(t.getState())}}t.ComposedStore=i},84196:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergedStore=void 0;const n=r(77634);class i extends n.ObservableStore{constructor(e=[]){super({}),this._children=e,e.forEach((e=>this._addChild(e))),this._updateWholeState()}_addChild(e){e.subscribe((()=>this._updateWholeState()))}_updateWholeState(){const e=this._children.map((e=>e.getState())),t=Object.assign({},...e);this.putState(t)}}t.MergedStore=i},77634:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableStore=void 0;const i=n(r(63795));class o extends i.default{constructor(e){super(),this._state=e||{}}getState(){return this._getState()}putState(e){this._putState(e),this.emit("update",e)}updateState(e){if(e&&"object"==typeof e){const t=this.getState();this.putState(Object.assign(Object.assign({},t),e))}else this.putState(e)}subscribe(e){this.on("update",e)}unsubscribe(e){this.removeListener("update",e)}_getState(){return this._state}_putState(e){this._state=e}}t.ObservableStore=o},5451:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storeAsStream=void 0;const n=r(54851);class i extends n.Duplex{constructor(e){super({objectMode:!0}),this.resume(),this.handler=e=>this.push(e),this.obsStore=e,this.obsStore.subscribe(this.handler)}pipe(e,t){const r=super.pipe(e,t);return e.write(this.obsStore.getState()),r}_write(e,t,r){this.obsStore.putState(e),r()}_read(e){}_destroy(e,t){this.obsStore.unsubscribe(this.handler),super._destroy(e,t)}}t.storeAsStream=function(e){return new i(e)}},90190:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(5451),t),i(r(37532),t),i(r(84196),t),i(r(77634),t),i(r(43121),t)},43121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storeTransformStream=void 0;const n=r(34603);t.storeTransformStream=function(e){return n.obj(((t,r,n)=>{try{return void n(null,e(t))}catch(e){return void n(e)}}))}},76892:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},16477:(e,t,r)=>{"use strict";var n=r(82884),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var o=Object.create(r(7646));o.inherits=r(91285);var a=r(55098),s=r(72294);o.inherits(f,a);for(var c=i(s.prototype),u=0;u<c.length;u++){var l=c[u];f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||n.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},21936:(e,t,r)=>{"use strict";e.exports=o;var n=r(45949),i=Object.create(r(7646));function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(91285),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},55098:(e,t,r)=>{"use strict";var n=r(34406),i=r(82884);e.exports=v;var o,a=r(76892);v.ReadableState=b,r(22699).EventEmitter;var s=function(e,t){return e.listeners(t).length},c=r(47582),u=r(77834).Buffer,l=r.g.Uint8Array||function(){},f=Object.create(r(7646));f.inherits=r(91285);var d=r(31850),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var p,g=r(64527),m=r(51919);f.inherits(v,c);var y=["error","close","destroy","pause","resume"];function b(e,t){e=e||{};var n=t instanceof(o=o||r(16477));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,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.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(22509).s),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function v(e){if(o=o||r(16477),!(this instanceof v))return new v(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function w(e,t,r,n,i){var o,a=e._readableState;return null===t?(a.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,x(e)}}(e,a)):(i||(o=function(e,t){var r,n;return n=t,u.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):A(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?A(e,a,t,!1):S(e,a)):A(e,a,t,!1))):n||(a.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function A(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&x(e)),S(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=m.destroy,v.prototype._undestroy=m.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),w(this,e,t,!1,r)},v.prototype.unshift=function(e){return w(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(e){return p||(p=r(22509).s),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var _=8388608;function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(k,e):k(e))}function k(e){h("emit readable"),e.emit("readable"),I(e)}function S(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function P(e){h("readable nexttick read 0"),e.read(0)}function O(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0==(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0==(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t),n}(e,t.buffer,t.decoder),r);var r}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(M,t,e))}function M(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function R(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}v.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):x(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&T(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",i=!0),t.ended||t.reading?h("reading or ended",i=!1):i&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?B(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&T(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var c=t&&!1===t.end||e===n.stdout||e===n.stderr?b:u;function u(){h("onend"),e.end()}o.endEmitted?i.nextTick(c):r.once("end",c),e.on("unpipe",(function t(n,i){h("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,h("cleanup"),e.removeListener("close",m),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",g),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",b),r.removeListener("data",p),f=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,I(e))}}(r);e.on("drain",l);var f=!1,d=!1;function p(t){h("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==R(o.pipes,e))&&!f&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function g(t){h("onerror",t),b(),e.removeListener("error",g),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",y),b()}function y(){h("onfinish"),e.removeListener("close",m),b()}function b(){h("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events.error?a(e._events.error)?e._events.error.unshift(r):e._events.error=[r,e._events.error]:e.on(t,r)}(e,"error",g),e.once("close",m),e.once("finish",y),e.emit("pipe",r),o.flowing||(h("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var a=R(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},v.prototype.on=function(e,t){var r=c.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&x(this):i.nextTick(P,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(O,e,t))}(this,e)),this},v.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){h("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<y.length;o++)e.on(y[o],this.emit.bind(this,y[o]));return this._read=function(t){h("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=B},45949:(e,t,r)=>{"use strict";e.exports=a;var n=r(16477),i=Object.create(r(7646));function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){c(e,t,r)})):c(this,null,null)}function c(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(91285),i.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},72294:(e,t,r)=>{"use strict";var n=r(34406),i=r(82884);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var a,s=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?setImmediate:i.nextTick;y.WritableState=m;var c=Object.create(r(7646));c.inherits=r(91285);var u,l={deprecate:r(5803)},f=r(47582),d=r(77834).Buffer,h=r.g.Uint8Array||function(){},p=r(51919);function g(){}function m(e,t){a=a||r(16477),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var c=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=c||0===c?c:n&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,o);else{var a=A(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),n?s(v,e,r,a,o):v(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function y(e){if(a=a||r(16477),!(u.call(y,this)||this instanceof a))return new y(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function b(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function v(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,c=!0;r;)i[s]=r,r.isBuf||(c=!1),r=r.next,s+=1;i.allBuffers=c,b(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,f=r.callback;if(b(e,t,!1,t.objectMode?1:u.length,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function A(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=A(t);return r&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(_,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}c.inherits(y,f),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===y&&e&&e._writableState instanceof m}})):u=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,d.isBuffer(n)||n instanceof h);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=g),o.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(n,a),o=!1),o}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r)),t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,s,n,i,o);return c}(this,o,s,e,t,r)),a},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||w(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=p.destroy,y.prototype._undestroy=p.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}},64527:(e,t,r)=>{"use strict";var n=r(77834).Buffer,i=r(88143);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i=n.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=i,r=a,o.data.copy(t,r),a+=o.data.length,o=o.next;return i},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},51919:(e,t,r)=>{"use strict";var n=r(82884);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),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.finished=!1,this._writableState.errorEmitted=!1)}}},47582:(e,t,r)=>{e.exports=r(22699).EventEmitter},95098:(e,t,r)=>{(t=e.exports=r(55098)).Stream=t,t.Readable=t,t.Writable=r(72294),t.Duplex=r(16477),t.Transform=r(45949),t.PassThrough=r(21936)},22509:(e,t,r)=>{"use strict";var n=r(77834).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},34603:(e,t,r)=>{var n=r(34406),i=r(95098).Transform,o=r(43335).inherits,a=r(51960);function s(e){i.call(this,e),this._destroyed=!1}function c(e,t,r){r(null,e)}function u(e){return function(t,r,n){return"function"==typeof t&&(n=r,r=t,t={}),"function"!=typeof r&&(r=c),"function"!=typeof n&&(n=null),e(t,r,n)}}o(s,i),s.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;n.nextTick((function(){e&&t.emit("error",e),t.emit("close")}))}},e.exports=u((function(e,t,r){var n=new s(e);return n._transform=t,r&&(n._flush=r),n})),e.exports.ctor=u((function(e,t,r){function n(t){if(!(this instanceof n))return new n(t);this.options=a(e,t),s.call(this,this.options)}return o(n,s),n.prototype._transform=t,r&&(n.prototype._flush=r),n})),e.exports.obj=u((function(e,t,r){var n=new s(a({objectMode:!0,highWaterMark:16},e));return n._transform=t,r&&(n._flush=r),n}))},63795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(22699);function i(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class o extends n.EventEmitter{emit(e,...t){let r="error"===e;const n=this._events;if(void 0!==n)r=r&&void 0===n.error;else if(!r)return!1;if(r){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}const o=n[e];if(void 0===o)return!1;if("function"==typeof o)i(o,this,t);else{const e=o.length,r=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(o);for(let n=0;n<e;n+=1)i(r[n],this,t)}return!0}}t.default=o},96346:(e,t,r)=>{"use strict";t._O=t.Jq=t.KB=t.u8=t.cv=void 0,t.Ik=t.A9=t.n_=t.gM=void 0;const n=r(48834);function i(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}function o(e){return i(e),n.Buffer.from(e.buffer,e.byteOffset,e.length)}class a{constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}}function s(e,t){return t.property?e+"["+t.property+"]":e}class c extends a{isCount(){throw new Error("ExternalLayout is abstract")}}class u extends c{constructor(e,t=0,r){if(!(e instanceof a))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,r||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof l||this.layout instanceof f}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,r=0){return this.layout.encode(e,t,r+this.offset)}}class l extends a{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return o(e).readUIntLE(t,this.span)}encode(e,t,r=0){return o(t).writeUIntLE(e,r,this.span),this.span}}class f extends a{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return o(e).readUIntBE(t,this.span)}encode(e,t,r=0){return o(t).writeUIntBE(e,r,this.span),this.span}}const d=Math.pow(2,32);function h(e){const t=Math.floor(e/d);return{hi32:t,lo32:e-t*d}}function p(e,t){return e*d+t}class g extends a{constructor(e){super(8,e)}decode(e,t=0){const r=o(e),n=r.readUInt32LE(t);return p(r.readUInt32LE(t+4),n)}encode(e,t,r=0){const n=h(e),i=o(t);return i.writeUInt32LE(n.lo32,r),i.writeUInt32LE(n.hi32,r+4),8}}class m extends a{constructor(e){super(8,e)}decode(e,t=0){const r=o(e),n=r.readUInt32LE(t);return p(r.readInt32LE(t+4),n)}encode(e,t,r=0){const n=h(e),i=o(t);return i.writeUInt32LE(n.lo32,r),i.writeInt32LE(n.hi32,r+4),8}}class y extends a{constructor(e,t,r){if(!(e instanceof a))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof c&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;!(t instanceof c)&&0<e.span&&(n=t*e.span),super(n,r),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0,n=this.count;if(n instanceof c&&(n=n.decode(e,t)),0<this.elementLayout.span)r=n*this.elementLayout.span;else{let i=0;for(;i<n;)r+=this.elementLayout.getSpan(e,t+r),++i}return r}decode(e,t=0){const r=[];let n=0,i=this.count;for(i instanceof c&&(i=i.decode(e,t));n<i;)r.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),n+=1;return r}encode(e,t,r=0){const n=this.elementLayout,i=e.reduce(((e,i)=>e+n.encode(i,t,r+e)),0);return this.count instanceof c&&this.count.encode(e.length,t,r),i}}class b extends a{constructor(e,t,r){if(!Array.isArray(e)||!e.reduce(((e,t)=>e&&t instanceof a),!0))throw new TypeError("fields must be array of Layout instances");"boolean"==typeof t&&void 0===r&&(r=t,t=void 0);for(const t of e)if(0>t.span&&void 0===t.property)throw new Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=e.reduce(((e,t)=>e+t.getSpan()),0)}catch(e){}super(n,t),this.fields=e,this.decodePrefixes=!!r}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce(((r,n)=>{const i=n.getSpan(e,t);return t+=i,r+i}),0)}catch(e){throw new RangeError("indeterminate span")}return r}decode(e,t=0){i(e);const r=this.makeDestinationObject();for(const n of this.fields)if(void 0!==n.property&&(r[n.property]=n.decode(e,t)),t+=n.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return r}encode(e,t,r=0){const n=r;let i=0,o=0;for(const n of this.fields){let a=n.span;if(o=0<a?a:0,void 0!==n.property){const i=e[n.property];void 0!==i&&(o=n.encode(i,t,r),0>a&&(a=n.getSpan(t,r)))}i=r,r+=a}return i+o-n}fromArray(e){const t=this.makeDestinationObject();for(const r of this.fields)void 0!==r.property&&0<e.length&&(t[r.property]=e.shift());return t}layoutFor(e){if("string"!=typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!=typeof e)throw new TypeError("property must be string");let t=0;for(const r of this.fields){if(r.property===e)return t;0>r.span?t=-1:0<=t&&(t+=r.span)}}}class v extends a{constructor(e,t){if(!(e instanceof c&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;e instanceof c||(r=e),super(r,t),this.length=e}getSpan(e,t){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),r}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),o(e).slice(t,t+r)}encode(e,t,r){let n=this.length;if(this.length instanceof c&&(n=e.length),!(e instanceof Uint8Array&&n===e.length))throw new TypeError(s("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(r+n>t.length)throw new RangeError("encoding overruns Uint8Array");const i=o(e);return o(t).write(i.toString("hex"),r,n,"hex"),this.length instanceof c&&this.length.encode(n,t,r),n}}t.cv=(e,t,r)=>new u(e,t,r),t.u8=e=>new l(1,e),t.KB=e=>new l(2,e),t.Jq=e=>new l(4,e),t._O=e=>new g(e),t.gM=e=>new m(e),t.n_=(e,t,r)=>new b(e,t,r),t.A9=(e,t,r)=>new y(e,t,r),t.Ik=(e,t)=>new v(e,t)},48638:(e,t,r)=>{"use strict";r.d(t,{ew:()=>mo,RG:()=>yo,nh:()=>Gr});var n=r(94796);function i(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function o(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}const a={number:i,bool:function(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)},bytes:o,hash:function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");i(e.outputLen),i(e.blockLen)},exists:function(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},output:function(e,t){o(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}},s=a,c=("object"==typeof self&&"crypto"in self&&self.crypto,e=>new DataView(e.buffer,e.byteOffset,e.byteLength)),u=(e,t)=>e<<32-t|e>>>t;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");function l(e){if("string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new TypeError("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)}(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));class f{clone(){return this._cloneInto()}}function d(e){const t=t=>e().update(l(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}class h extends f{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=c(this.buffer)}update(e){s.exists(this);const{view:t,buffer:r,blockLen:n}=this,i=(e=l(e)).length;for(let o=0;o<i;){const a=Math.min(n-this.pos,i-o);if(a!==n)r.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===n&&(this.process(t,0),this.pos=0);else{const t=c(e);for(;n<=i-o;o+=n)this.process(t,o)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){s.exists(this),s.output(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:i}=this;let{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>n-o&&(this.process(r,0),o=0);for(let e=o;e<n;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),a=Number(r>>i&o),s=Number(r&o),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,s,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);const a=c(e);this.get().forEach(((e,t)=>a.setUint32(4*t,e,i)))}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:a}=this;return e.length=n,e.pos=a,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}const p=BigInt(2**32-1),g=BigInt(32);function m(e,t=!1){return t?{h:Number(e&p),l:Number(e>>g&p)}:{h:0|Number(e>>g&p),l:0|Number(e&p)}}const y=function(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:a}=m(e[i],t);[r[i],n[i]]=[o,a]}return[r,n]},b=(e,t,r)=>e>>>r,v=(e,t,r)=>e<<32-r|t>>>r,w=(e,t,r)=>e>>>r|t<<32-r,A=(e,t,r)=>e<<32-r|t>>>r,_=(e,t,r)=>e<<64-r|t>>>r-32,E=(e,t,r)=>e>>>r-32|t<<64-r,x=(e,t,r)=>e<<r|t>>>32-r,k=(e,t,r)=>t<<r|e>>>32-r,S=(e,t,r)=>t<<r-32|e>>>64-r,C=(e,t,r)=>e<<r-32|t>>>64-r,P=function(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}},O=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),I=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,B=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),T=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0,M=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0,R=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0),[N,j]=y(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))),L=new Uint32Array(80),U=new Uint32Array(80);class D extends h{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:a,Dl:s,Eh:c,El:u,Fh:l,Fl:f,Gh:d,Gl:h,Hh:p,Hl:g}=this;return[e,t,r,n,i,o,a,s,c,u,l,f,d,h,p,g]}set(e,t,r,n,i,o,a,s,c,u,l,f,d,h,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|f,this.Gh=0|d,this.Gl=0|h,this.Hh=0|p,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)L[r]=e.getUint32(t),U[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|L[e-15],r=0|U[e-15],n=w(t,r,1)^w(t,r,8)^b(t,r,7),i=A(t,r,1)^A(t,r,8)^v(t,r,7),o=0|L[e-2],a=0|U[e-2],s=w(o,a,19)^_(o,a,61)^b(o,a,6),c=A(o,a,19)^E(o,a,61)^v(o,a,6),u=B(i,c,U[e-7],U[e-16]),l=T(u,n,s,L[e-7],L[e-16]);L[e]=0|l,U[e]=0|u}let{Ah:r,Al:n,Bh:i,Bl:o,Ch:a,Cl:s,Dh:c,Dl:u,Eh:l,El:f,Fh:d,Fl:h,Gh:p,Gl:g,Hh:m,Hl:y}=this;for(let e=0;e<80;e++){const t=w(l,f,14)^w(l,f,18)^_(l,f,41),b=A(l,f,14)^A(l,f,18)^E(l,f,41),v=l&d^~l&p,x=R(y,b,f&h^~f&g,j[e],U[e]),k=M(x,m,t,v,N[e],L[e]),S=0|x,C=w(r,n,28)^_(r,n,34)^_(r,n,39),B=A(r,n,28)^E(r,n,34)^E(r,n,39),T=r&i^r&a^i&a,D=n&o^n&s^o&s;m=0|p,y=0|g,p=0|d,g=0|h,d=0|l,h=0|f,({h:l,l:f}=P(0|c,0|u,0|k,0|S)),c=0|a,u=0|s,a=0|i,s=0|o,i=0|r,o=0|n;const F=O(S,B,D);r=I(F,k,C,T),n=0|F}({h:r,l:n}=P(0|this.Ah,0|this.Al,0|r,0|n)),({h:i,l:o}=P(0|this.Bh,0|this.Bl,0|i,0|o)),({h:a,l:s}=P(0|this.Ch,0|this.Cl,0|a,0|s)),({h:c,l:u}=P(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:f}=P(0|this.Eh,0|this.El,0|l,0|f)),({h:d,l:h}=P(0|this.Fh,0|this.Fl,0|d,0|h)),({h:p,l:g}=P(0|this.Gh,0|this.Gl,0|p,0|g)),({h:m,l:y}=P(0|this.Hh,0|this.Hl,0|m,0|y)),this.set(r,n,i,o,a,s,c,u,l,f,d,h,p,g,m,y)}roundClean(){L.fill(0),U.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class F extends D{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class z extends D{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const Z=d((()=>new D));d((()=>new F)),d((()=>new z));var H=r(77378),q=r.t(H,2);const W=BigInt(0),K=BigInt(1),V=BigInt(2),G=BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),$=Object.freeze({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),l:G,n:G,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")}),J=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),Y=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),X=(BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742"),BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235")),Q=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),ee=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),te=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952");class re{constructor(e,t,r,n){this.x=e,this.y=t,this.z=r,this.t=n}static fromAffine(e){if(!(e instanceof ce))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return e.equals(ce.ZERO)?re.ZERO:new re(e.x,e.y,K,we(e.x*e.y))}static toAffineBatch(e){const t=function(e,t=$.P){const r=new Array(e.length),n=Ae(e.reduce(((e,n,i)=>n===W?e:(r[i]=e,we(e*n,t))),K),t);return e.reduceRight(((e,n,i)=>n===W?e:(r[i]=we(e*r[i],t),we(e*n,t))),n),r}(e.map((e=>e.z)));return e.map(((e,r)=>e.toAffine(t[r])))}static normalizeZ(e){return this.toAffineBatch(e).map(this.fromAffine)}equals(e){ne(e);const{x:t,y:r,z:n}=this,{x:i,y:o,z:a}=e,s=we(t*a),c=we(i*n),u=we(r*a),l=we(o*n);return s===c&&u===l}negate(){return new re(we(-this.x),this.y,this.z,we(-this.t))}double(){const{x:e,y:t,z:r}=this,{a:n}=$,i=we(e*e),o=we(t*t),a=we(V*we(r*r)),s=we(n*i),c=e+t,u=we(we(c*c)-i-o),l=s+o,f=l-a,d=s-o,h=we(u*f),p=we(l*d),g=we(u*d),m=we(f*l);return new re(h,p,m,g)}add(e){ne(e);const{x:t,y:r,z:n,t:i}=this,{x:o,y:a,z:s,t:c}=e,u=we((r-t)*(a+o)),l=we((r+t)*(a-o)),f=we(l-u);if(f===W)return this.double();const d=we(n*V*c),h=we(i*V*s),p=h+d,g=l+u,m=h-d,y=we(p*f),b=we(g*m),v=we(p*m),w=we(f*g);return new re(y,b,w,v)}subtract(e){return this.add(e.negate())}precomputeWindow(e){const t=1+256/e,r=[];let n=this,i=n;for(let o=0;o<t;o++){i=n,r.push(i);for(let t=1;t<2**(e-1);t++)i=i.add(n),r.push(i);n=i.double()}return r}wNAF(e,t){!t&&this.equals(re.BASE)&&(t=ce.BASE);const r=t&&t._WINDOW_SIZE||1;if(256%r)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let n=t&&se.get(t);n||(n=this.precomputeWindow(r),t&&1!==r&&(n=re.normalizeZ(n),se.set(t,n)));let i=re.ZERO,o=re.ZERO;const a=1+256/r,s=2**(r-1),c=BigInt(2**r-1),u=2**r,l=BigInt(r);for(let t=0;t<a;t++){const r=t*s;let a=Number(e&c);if(e>>=l,a>s&&(a-=u,e+=K),0===a){let e=n[r];t%2&&(e=e.negate()),o=o.add(e)}else{let e=n[r+Math.abs(a)-1];a<0&&(e=e.negate()),i=i.add(e)}}return re.normalizeZ([i,o])[0]}multiply(e,t){return this.wNAF(Ce(e,$.l),t)}multiplyUnsafe(e){let t=Ce(e,$.l,!1);const r=re.BASE,n=re.ZERO;if(t===W)return n;if(this.equals(n)||t===K)return this;if(this.equals(r))return this.wNAF(t);let i=n,o=this;for(;t>W;)t&K&&(i=i.add(o)),o=o.double(),t>>=K;return i}isSmallOrder(){return this.multiplyUnsafe($.h).equals(re.ZERO)}isTorsionFree(){return this.multiplyUnsafe($.l).equals(re.ZERO)}toAffine(e=Ae(this.z)){const{x:t,y:r,z:n}=this,i=we(t*e),o=we(r*e);if(we(n*e)!==K)throw new Error("invZ was invalid");return new ce(i,o)}fromRistrettoBytes(){oe()}toRistrettoBytes(){oe()}fromRistrettoHash(){oe()}}function ne(e){if(!(e instanceof re))throw new TypeError("ExtendedPoint expected")}function ie(e){if(!(e instanceof ae))throw new TypeError("RistrettoPoint expected")}function oe(){throw new Error("Legacy method: switch to RistrettoPoint")}re.BASE=new re($.Gx,$.Gy,K,we($.Gx*$.Gy)),re.ZERO=new re(W,K,K,W);class ae{constructor(e){this.ep=e}static calcElligatorRistrettoMap(e){const{d:t}=$,r=we(Y*e*e),n=we((r+K)*ee);let i=BigInt(-1);const o=we((i-t*r)*we(r+t));let{isValid:a,value:s}=Ee(n,o),c=we(s*e);me(c)||(c=we(-c)),a||(s=c),a||(i=r);const u=we(i*(r-K)*te-o),l=s*s,f=we((s+s)*o),d=we(u*X),h=we(K-l),p=we(K+l);return new re(we(f*p),we(h*d),we(d*p),we(f*h))}static hashToCurve(e){const t=ve((e=Se(e,64)).slice(0,32)),r=this.calcElligatorRistrettoMap(t),n=ve(e.slice(32,64)),i=this.calcElligatorRistrettoMap(n);return new ae(r.add(i))}static fromHex(e){e=Se(e,32);const{a:t,d:r}=$,n="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",i=ve(e);if(!function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(ge(i),e)||me(i))throw new Error(n);const o=we(i*i),a=we(K+t*o),s=we(K-t*o),c=we(a*a),u=we(s*s),l=we(t*r*c-u),{isValid:f,value:d}=xe(we(l*u)),h=we(d*s),p=we(d*h*l);let g=we((i+i)*h);me(g)&&(g=we(-g));const m=we(a*p),y=we(g*m);if(!f||me(y)||m===W)throw new Error(n);return new ae(new re(g,m,K,y))}toRawBytes(){let{x:e,y:t,z:r,t:n}=this.ep;const i=we(we(r+t)*we(r-t)),o=we(e*t),a=we(o*o),{value:s}=xe(we(i*a)),c=we(s*i),u=we(s*o),l=we(c*u*n);let f;if(me(n*l)){let r=we(t*Y),n=we(e*Y);e=r,t=n,f=we(c*Q)}else f=u;me(e*l)&&(t=we(-t));let d=we((r-t)*f);return me(d)&&(d=we(-d)),ge(d)}toHex(){return de(this.toRawBytes())}toString(){return this.toHex()}equals(e){ie(e);const t=this.ep,r=e.ep,n=we(t.x*r.y)===we(t.y*r.x),i=we(t.y*r.y)===we(t.x*r.x);return n||i}add(e){return ie(e),new ae(this.ep.add(e.ep))}subtract(e){return ie(e),new ae(this.ep.subtract(e.ep))}multiply(e){return new ae(this.ep.multiply(e))}multiplyUnsafe(e){return new ae(this.ep.multiplyUnsafe(e))}}ae.BASE=new ae(re.BASE),ae.ZERO=new ae(re.ZERO);const se=new WeakMap;class ce{constructor(e,t){this.x=e,this.y=t}_setWindowSize(e){this._WINDOW_SIZE=e,se.delete(this)}static fromHex(e,t=!0){const{d:r,P:n}=$,i=(e=Se(e,32)).slice();i[31]=-129&e[31];const o=ye(i);if(t&&o>=n)throw new Error("Expected 0 < hex < P");if(!t&&o>=J)throw new Error("Expected 0 < hex < 2**256");const a=we(o*o),s=we(a-K),c=we(r*a+K);let{isValid:u,value:l}=Ee(s,c);if(!u)throw new Error("Point.fromHex: invalid y coordinate");const f=(l&K)===K;return 0!=(128&e[31])!==f&&(l=we(-l)),new ce(l,o)}static async fromPrivateKey(e){return(await Te(e)).point}toRawBytes(){const e=ge(this.y);return e[31]|=this.x&K?128:0,e}toHex(){return de(this.toRawBytes())}toX25519(){const{y:e}=this;return ge(we((K+e)*Ae(K-e)))}isTorsionFree(){return re.fromAffine(this).isTorsionFree()}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new ce(we(-this.x),this.y)}add(e){return re.fromAffine(this).add(re.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return re.fromAffine(this).multiply(e,this).toAffine()}}ce.BASE=new ce($.Gx,$.Gy),ce.ZERO=new ce(W,K);class ue{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromHex(e){const t=Se(e,64),r=ce.fromHex(t.slice(0,32),!1),n=ye(t.slice(32,64));return new ue(r,n)}assertValidity(){const{r:e,s:t}=this;if(!(e instanceof ce))throw new Error("Expected Point instance");return Ce(t,$.l,!1),this}toRawBytes(){const e=new Uint8Array(64);return e.set(this.r.toRawBytes()),e.set(ge(this.s),32),e}toHex(){return de(this.toRawBytes())}}function le(...e){if(!e.every((e=>e instanceof Uint8Array)))throw new Error("Expected Uint8Array list");if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}const fe=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function de(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=fe[e[r]];return t}function he(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");t[r]=o}return t}function pe(e){return he(e.toString(16).padStart(64,"0"))}function ge(e){return pe(e).reverse()}function me(e){return(we(e)&K)===K}function ye(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");return BigInt("0x"+de(Uint8Array.from(e).reverse()))}const be=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function ve(e){return we(ye(e)&be)}function we(e,t=$.P){const r=e%t;return r>=W?r:t+r}function Ae(e,t=$.P){if(e===W||t<=W)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=we(e,t),n=t,i=W,o=K,a=K,s=W;for(;r!==W;){const e=n/r,t=n%r,c=i-a*e,u=o-s*e;n=r,r=t,i=a,o=s,a=c,s=u}if(n!==K)throw new Error("invert: does not exist");return we(i,t)}function _e(e,t){const{P:r}=$;let n=e;for(;t-- >W;)n*=n,n%=r;return n}function Ee(e,t){const r=we(t*t*t),n=we(r*r*t);let i=we(e*r*function(e){const{P:t}=$,r=BigInt(5),n=BigInt(10),i=BigInt(20),o=BigInt(40),a=BigInt(80),s=e*e%t*e%t,c=_e(s,V)*s%t,u=_e(c,K)*e%t,l=_e(u,r)*u%t,f=_e(l,n)*l%t,d=_e(f,i)*f%t,h=_e(d,o)*d%t,p=_e(h,a)*h%t,g=_e(p,a)*h%t,m=_e(g,n)*l%t;return{pow_p_5_8:_e(m,V)*e%t,b2:s}}(e*n).pow_p_5_8);const o=we(t*i*i),a=i,s=we(i*Y),c=o===e,u=o===we(-e),l=o===we(-e*Y);return c&&(i=a),(u||l)&&(i=s),me(i)&&(i=we(-i)),{isValid:c||u,value:i}}function xe(e){return Ee(K,e)}function ke(e){return we(ye(e),$.l)}function Se(e,t){const r=e instanceof Uint8Array?Uint8Array.from(e):he(e);if("number"==typeof t&&r.length!==t)throw new Error(`Expected ${t} bytes`);return r}function Ce(e,t,r=!0){if(!t)throw new TypeError("Specify max value");if("number"==typeof e&&Number.isSafeInteger(e)&&(e=BigInt(e)),"bigint"==typeof e&&e<t)if(r){if(W<e)return e}else if(W<=e)return e;throw new TypeError("Expected valid scalar: 0 < scalar < max")}function Pe(e){if(32!==(e="bigint"==typeof e||"number"==typeof e?pe(Ce(e,J)):Se(e)).length)throw new Error("Expected 32 bytes");return e}function Oe(e){const t=function(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}(e.slice(0,32)),r=e.slice(32,64),n=ke(t),i=ce.BASE.multiply(n),o=i.toRawBytes();return{head:t,prefix:r,scalar:n,point:i,pointBytes:o}}let Ie;function Be(...e){if("function"!=typeof Ie)throw new Error("utils.sha512Sync must be set to use sync methods");return Ie(...e)}async function Te(e){return Oe(await Ue.sha512(Pe(e)))}function Me(e){return Oe(Be(Pe(e)))}const Re=function(e){return Me(e).pointBytes},Ne=function(e,t){e=Se(e);const{prefix:r,scalar:n,pointBytes:i}=Me(t),o=ke(Be(r,e)),a=ce.BASE.multiply(o),s=we(o+ke(Be(a.toRawBytes(),i,e))*n,$.l);return new ue(a,s).toRawBytes()},je=function(e,t,r){const{r:n,SB:i,msg:o,pub:a}=function(e,t,r){t=Se(t),r instanceof ce||(r=ce.fromHex(r,!1));const{r:n,s:i}=e instanceof ue?e.assertValidity():ue.fromHex(e);return{r:n,s:i,SB:re.BASE.multiplyUnsafe(i),pub:r,msg:t}}(e,t,r),s=Be(n.toRawBytes(),a.toRawBytes(),o);return function(e,t,r,n){const i=ke(n),o=re.fromAffine(e).multiplyUnsafe(i);return re.fromAffine(t).add(o).subtract(r).multiplyUnsafe($.h).equals(re.ZERO)}(a,n,i,s)};ce.BASE._setWindowSize(8);const Le={node:q,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0},Ue={bytesToHex:de,hexToBytes:he,concatBytes:le,getExtendedPublicKey:Te,mod:we,invert:Ae,TORSION_SUBGROUP:["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"],hashToPrivateScalar:e=>{if((e=Se(e)).length<40||e.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return we(ye(e),$.l-K)+K},randomBytes:(e=32)=>{if(Le.web)return Le.web.getRandomValues(new Uint8Array(e));if(Le.node){const{randomBytes:t}=Le.node;return new Uint8Array(t(e).buffer)}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>Ue.randomBytes(32),sha512:async(...e)=>{const t=le(...e);if(Le.web){const e=await Le.web.subtle.digest("SHA-512",t.buffer);return new Uint8Array(e)}if(Le.node)return Uint8Array.from(Le.node.createHash("sha512").update(t).digest());throw new Error("The environment doesn't have sha512 function")},precompute(e=8,t=ce.BASE){const r=t.equals(ce.BASE)?t:new ce(t.x,t.y);return r._setWindowSize(e),r.multiply(V),r},sha512Sync:void 0};Object.defineProperties(Ue,{sha512Sync:{configurable:!1,get:()=>Ie,set(e){Ie||(Ie=e)}}});var De=r(62197),Fe=r.n(De),ze=r(12833),Ze=r.n(ze);const He=(e,t,r)=>e&t^e&r^t&r,qe=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]),We=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ke=new Uint32Array(64);class Ve extends h{constructor(){super(64,32,8,!1),this.A=0|We[0],this.B=0|We[1],this.C=0|We[2],this.D=0|We[3],this.E=0|We[4],this.F=0|We[5],this.G=0|We[6],this.H=0|We[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[e,t,r,n,i,o,a,s]}set(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)Ke[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=Ke[e-15],r=Ke[e-2],n=u(t,7)^u(t,18)^t>>>3,i=u(r,17)^u(r,19)^r>>>10;Ke[e]=i+Ke[e-7]+n+Ke[e-16]|0}let{A:r,B:n,C:i,D:o,E:a,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){const t=l+(u(a,6)^u(a,11)^u(a,25))+((f=a)&s^~f&c)+qe[e]+Ke[e]|0,d=(u(r,2)^u(r,13)^u(r,22))+He(r,n,i)|0;l=c,c=s,s=a,a=o+t|0,o=i,i=n,n=r,r=t+d|0}var f;r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(r,n,i,o,a,s,c,l)}roundClean(){Ke.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Ge=d((()=>new Ve));var $e=r(83871),Je=r(96346),Ye=r(41528);class Xe extends TypeError{constructor(e,t){let r;const{message:n,...i}=e,{path:o}=e;super(0===o.length?n:"At path: "+o.join(".")+" -- "+n),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>{var n;return null!=(n=r)?n:r=[e,...t()]}}}function Qe(e){return"object"==typeof e&&null!=e}function et(e){return"string"==typeof e?JSON.stringify(e):""+e}function tt(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:s,message:c="Expected a value of type `"+a+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+et(n)+"`"}=e;return{value:n,type:a,refinement:s,key:i[i.length-1],path:i,branch:o,...e,message:c}}function*rt(e,t,r,n){var i;Qe(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const i of e){const e=tt(i,t,r,n);e&&(yield e)}}function*nt(e,t,r={}){const{path:n=[],branch:i=[e],coerce:o=!1,mask:a=!1}=r,s={path:n,branch:i};if(o&&(e=t.coercer(e,s),a&&"type"!==t.type&&Qe(t.schema)&&Qe(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let c=!0;for(const r of t.validator(e,s))c=!1,yield[r,void 0];for(let[r,u,l]of t.entries(e,s)){const t=nt(u,l,{path:void 0===r?n:[...n,r],branch:void 0===r?i:[...i,u],coerce:o,mask:a});for(const n of t)n[0]?(c=!1,yield[n[0],void 0]):o&&(u=n[1],void 0===r?e=u:e instanceof Map?e.set(r,u):e instanceof Set?e.add(u):Qe(e)&&(e[r]=u))}if(c)for(const r of t.refiner(e,s))c=!1,yield[r,void 0];c&&(yield[void 0,e])}class it{constructor(e){const{type:t,schema:r,validator:n,refiner:i,coercer:o=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=o,this.validator=n?(e,t)=>rt(n(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>rt(i(e,t),t,this,e):()=>[]}assert(e){return function(e,t){const r=st(e,t);if(r[0])throw r[0]}(e,this)}create(e){return ot(e,this)}is(e){return at(e,this)}mask(e){return function(e,t){const r=st(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}(e,this)}validate(e,t={}){return st(e,this,t)}}function ot(e,t){const r=st(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}function at(e,t){return!st(e,t)[0]}function st(e,t,r={}){const n=nt(e,t,r),i=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);return i[0]?[new Xe(i[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]:[void 0,i[1]]}function ct(e,t){return new it({type:e,schema:null,validator:t})}function ut(e){return new it({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||"Expected an array value, but received: "+et(e)})}function lt(){return ct("boolean",(e=>"boolean"==typeof e))}function ft(e){return ct("instance",(t=>t instanceof e||"Expected a `"+e.name+"` instance, but received: "+et(t)))}function dt(e){const t=et(e),r=typeof e;return new it({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||"Expected the literal `"+t+"`, but received: "+et(r)})}function ht(e){return new it({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function pt(){return ct("number",(e=>"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+et(e)))}function gt(e){return new it({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function mt(e,t){return new it({type:"record",schema:null,*entries(r){if(Qe(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>Qe(e)||"Expected an object, but received: "+et(e)})}function yt(){return ct("string",(e=>"string"==typeof e||"Expected a string, but received: "+et(e)))}function bt(e){const t=ct("never",(()=>!1));return new it({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator:e=>Array.isArray(e)||"Expected an array, but received: "+et(e)})}function vt(e){const t=Object.keys(e);return new it({type:"type",schema:e,*entries(r){if(Qe(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>Qe(e)||"Expected an object, but received: "+et(e)})}function wt(e){const t=e.map((e=>e.type)).join(" | ");return new it({type:"union",schema:null,validator(r,n){const i=[];for(const t of e){const[...e]=nt(r,t,n),[o]=e;if(!o[0])return[];for(const[t]of e)t&&i.push(t)}return["Expected the value to satisfy a union of `"+t+"`, but received: "+et(r),...i]}})}function At(){return ct("unknown",(()=>!0))}function _t(e,t,r){return new it({...e,coercer:(n,i)=>at(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}var Et=r(50714),xt=r(87414),kt=r.n(xt);const[St,Ct,Pt]=[[],[],[]],Ot=BigInt(0),It=BigInt(1),Bt=BigInt(2),Tt=BigInt(7),Mt=BigInt(256),Rt=BigInt(113);for(let e=0,t=It,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],St.push(2*(5*n+r)),Ct.push((e+1)*(e+2)/2%64);let i=Ot;for(let e=0;e<7;e++)t=(t<<It^(t>>Tt)*Rt)%Mt,t&Bt&&(i^=It<<(It<<BigInt(e))-It);Pt.push(i)}const[Nt,jt]=y(Pt,!0),Lt=(e,t,r)=>r>32?S(e,t,r):x(e,t,r),Ut=(e,t,r)=>r>32?C(e,t,r):k(e,t,r);class Dt extends f{constructor(e,t,r,n=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,s.number(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}keccak(){!function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],a=r[i+1],s=Lt(o,a,1)^r[n],c=Ut(o,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=s,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=Ct[r],o=Lt(t,i,n),a=Ut(t,i,n),s=St[r];t=e[s],i=e[s+1],e[s]=o,e[s+1]=a}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=Nt[n],e[1]^=jt[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){s.exists(this);const{blockLen:t,state:r}=this,n=(e=l(e)).length;for(let i=0;i<n;){const o=Math.min(t-this.pos,n-i);for(let t=0;t<o;t++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,0!=(128&t)&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){s.exists(this,!1),s.bytes(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return s.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(s.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new Dt(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}const Ft=(e,t,r)=>d((()=>new Dt(t,e,r))),zt=(Ft(6,144,28),Ft(6,136,32),Ft(6,104,48),Ft(6,72,64),Ft(1,144,28),Ft(1,136,32)),Zt=(Ft(1,104,48),Ft(1,72,64),(e,t,r)=>function(e){const t=(t,r)=>e(r).update(l(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}(((n={})=>new Dt(t,e,void 0===n.dkLen?r:n.dkLen,!0))));Zt(31,168,16),Zt(31,136,32);class Ht extends f{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,s.hash(e);const r=l(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return s.exists(this),this.iHash.update(e),this}digestInto(e){s.exists(this),s.bytes(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:a}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const qt=(e,t,r)=>new Ht(e,t).update(r).digest();qt.create=(e,t)=>new Ht(e,t);var Wt=r(69314),Kt=r.t(Wt,2);const Vt=BigInt(0),Gt=BigInt(1),$t=BigInt(2),Jt=BigInt(3),Yt=BigInt(8),Xt=Object.freeze({a:Vt,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:Gt,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});function Qt(e){const{a:t,b:r}=Xt,n=wr(e*e),i=wr(n*e);return wr(i+t*e+r)}const er=Xt.a===Vt;class tr extends Error{constructor(e){super(e)}}class rr{constructor(e,t,r){this.x=e,this.y=t,this.z=r}static fromAffine(e){if(!(e instanceof ir))throw new TypeError("JacobianPoint#fromAffine: expected Point");return new rr(e.x,e.y,Gt)}static toAffineBatch(e){const t=function(e,t=Xt.P){const r=new Array(e.length),n=_r(e.reduce(((e,n,i)=>n===Vt?e:(r[i]=e,wr(e*n,t))),Gt),t);return e.reduceRight(((e,n,i)=>n===Vt?e:(r[i]=wr(e*r[i],t),wr(e*n,t))),n),r}(e.map((e=>e.z)));return e.map(((e,r)=>e.toAffine(t[r])))}static normalizeZ(e){return rr.toAffineBatch(e).map(rr.fromAffine)}equals(e){if(!(e instanceof rr))throw new TypeError("JacobianPoint expected");const{x:t,y:r,z:n}=this,{x:i,y:o,z:a}=e,s=wr(n*n),c=wr(a*a),u=wr(t*c),l=wr(i*s),f=wr(wr(r*a)*c),d=wr(wr(o*n)*s);return u===l&&f===d}negate(){return new rr(this.x,wr(-this.y),this.z)}double(){const{x:e,y:t,z:r}=this,n=wr(e*e),i=wr(t*t),o=wr(i*i),a=e+i,s=wr($t*(wr(a*a)-n-o)),c=wr(Jt*n),u=wr(c*c),l=wr(u-$t*s),f=wr(c*(s-l)-Yt*o),d=wr($t*t*r);return new rr(l,f,d)}add(e){if(!(e instanceof rr))throw new TypeError("JacobianPoint expected");const{x:t,y:r,z:n}=this,{x:i,y:o,z:a}=e;if(i===Vt||o===Vt)return this;if(t===Vt||r===Vt)return e;const s=wr(n*n),c=wr(a*a),u=wr(t*c),l=wr(i*s),f=wr(wr(r*a)*c),d=wr(wr(o*n)*s),h=wr(l-u),p=wr(d-f);if(h===Vt)return p===Vt?this.double():rr.ZERO;const g=wr(h*h),m=wr(h*g),y=wr(u*g),b=wr(p*p-m-$t*y),v=wr(p*(y-b)-f*m),w=wr(n*a*h);return new rr(b,v,w)}subtract(e){return this.add(e.negate())}multiplyUnsafe(e){const t=rr.ZERO;if("bigint"==typeof e&&e===Vt)return t;let r=vr(e);if(r===Gt)return this;if(!er){let e=t,n=this;for(;r>Vt;)r&Gt&&(e=e.add(n)),n=n.double(),r>>=Gt;return e}let{k1neg:n,k1:i,k2neg:o,k2:a}=kr(r),s=t,c=t,u=this;for(;i>Vt||a>Vt;)i&Gt&&(s=s.add(u)),a&Gt&&(c=c.add(u)),u=u.double(),i>>=Gt,a>>=Gt;return n&&(s=s.negate()),o&&(c=c.negate()),c=new rr(wr(c.x*Xt.beta),c.y,c.z),s.add(c)}precomputeWindow(e){const t=er?128/e+1:256/e+1,r=[];let n=this,i=n;for(let o=0;o<t;o++){i=n,r.push(i);for(let t=1;t<2**(e-1);t++)i=i.add(n),r.push(i);n=i.double()}return r}wNAF(e,t){!t&&this.equals(rr.BASE)&&(t=ir.BASE);const r=t&&t._WINDOW_SIZE||1;if(256%r)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let n=t&&nr.get(t);n||(n=this.precomputeWindow(r),t&&1!==r&&(n=rr.normalizeZ(n),nr.set(t,n)));let i=rr.ZERO,o=rr.ZERO;const a=1+(er?128/r:256/r),s=2**(r-1),c=BigInt(2**r-1),u=2**r,l=BigInt(r);for(let t=0;t<a;t++){const r=t*s;let a=Number(e&c);if(e>>=l,a>s&&(a-=u,e+=Gt),0===a){let e=n[r];t%2&&(e=e.negate()),o=o.add(e)}else{let e=n[r+Math.abs(a)-1];a<0&&(e=e.negate()),i=i.add(e)}}return{p:i,f:o}}multiply(e,t){let r,n,i=vr(e);if(er){const{k1neg:e,k1:o,k2neg:a,k2:s}=kr(i);let{p:c,f:u}=this.wNAF(o,t),{p:l,f}=this.wNAF(s,t);e&&(c=c.negate()),a&&(l=l.negate()),l=new rr(wr(l.x*Xt.beta),l.y,l.z),r=c.add(l),n=u.add(f)}else{const{p:e,f:o}=this.wNAF(i,t);r=e,n=o}return rr.normalizeZ([r,n])[0]}toAffine(e=_r(this.z)){const{x:t,y:r,z:n}=this,i=e,o=wr(i*i),a=wr(o*i),s=wr(t*o),c=wr(r*a);if(wr(n*i)!==Gt)throw new Error("invZ was invalid");return new ir(s,c)}}rr.BASE=new rr(Xt.Gx,Xt.Gy,Gt),rr.ZERO=new rr(Vt,Gt,Vt);const nr=new WeakMap;class ir{constructor(e,t){this.x=e,this.y=t}_setWindowSize(e){this._WINDOW_SIZE=e,nr.delete(this)}hasEvenY(){return this.y%$t===Vt}static fromCompressedHex(e){const t=32===e.length,r=yr(t?e:e.subarray(1));if(!Ir(r))throw new Error("Point is not on curve");let n=function(e){const{P:t}=Xt,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),s=BigInt(88),c=e*e*e%t,u=c*c*e%t,l=Ar(u,Jt)*u%t,f=Ar(l,Jt)*u%t,d=Ar(f,$t)*c%t,h=Ar(d,n)*d%t,p=Ar(h,i)*h%t,g=Ar(p,a)*p%t,m=Ar(g,s)*g%t,y=Ar(m,a)*p%t,b=Ar(y,Jt)*u%t,v=Ar(b,o)*h%t,w=Ar(v,r)*c%t;return Ar(w,$t)}(Qt(r));const i=(n&Gt)===Gt;t?i&&(n=wr(-n)):1==(1&e[0])!==i&&(n=wr(-n));const o=new ir(r,n);return o.assertValidity(),o}static fromUncompressedHex(e){const t=yr(e.subarray(1,33)),r=yr(e.subarray(33,65)),n=new ir(t,r);return n.assertValidity(),n}static fromHex(e){const t=br(e),r=t.length,n=t[0];if(32===r||33===r&&(2===n||3===n))return this.fromCompressedHex(t);if(65===r&&4===n)return this.fromUncompressedHex(t);throw new Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${r}`)}static fromPrivateKey(e){return ir.BASE.multiply(Tr(e))}static fromSignature(e,t,r){const n=function(e){const{n:t}=Xt,r=8*e.length-256;let n=yr(e);return r>0&&(n>>=BigInt(r)),n>=t&&(n-=t),n}(e=br(e)),{r:i,s:o}=function(e){if(e instanceof sr)return e.assertValidity(),e;try{return sr.fromDER(e)}catch(t){return sr.fromCompact(e)}}(t);if(0!==r&&1!==r)throw new Error("Cannot recover signature: invalid recovery bit");const a=1&r?"03":"02",s=ir.fromHex(a+dr(i)),{n:c}=Xt,u=_r(i,c),l=wr(-n*u,c),f=wr(o*u,c),d=ir.BASE.multiplyAndAddUnsafe(s,l,f);if(!d)throw new Error("Cannot recover signature: point at infinify");return d.assertValidity(),d}toRawBytes(e=!1){return mr(this.toHex(e))}toHex(e=!1){const t=dr(this.x);return e?`${this.hasEvenY()?"02":"03"}${t}`:`04${t}${dr(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const e="Point is not on elliptic curve",{x:t,y:r}=this;if(!Ir(t)||!Ir(r))throw new Error(e);const n=wr(r*r);if(wr(n-Qt(t))!==Vt)throw new Error(e)}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new ir(this.x,wr(-this.y))}double(){return rr.fromAffine(this).double().toAffine()}add(e){return rr.fromAffine(this).add(rr.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return rr.fromAffine(this).multiply(e,this).toAffine()}multiplyAndAddUnsafe(e,t,r){const n=rr.fromAffine(this),i=t===Vt||t===Gt||this!==ir.BASE?n.multiplyUnsafe(t):n.multiply(t),o=rr.fromAffine(e).multiplyUnsafe(r),a=i.add(o);return a.equals(rr.ZERO)?void 0:a.toAffine()}}function or(e){return Number.parseInt(e[0],16)>=8?"00"+e:e}function ar(e){if(e.length<2||2!==e[0])throw new Error(`Invalid signature integer tag: ${lr(e)}`);const t=e[1],r=e.subarray(2,t+2);if(!t||r.length!==t)throw new Error("Invalid signature integer: wrong length");if(0===r[0]&&r[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:yr(r),left:e.subarray(t+2)}}ir.BASE=new ir(Xt.Gx,Xt.Gy),ir.ZERO=new ir(Vt,Vt);class sr{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromCompact(e){const t=e instanceof Uint8Array,r="Signature.fromCompact";if("string"!=typeof e&&!t)throw new TypeError(`${r}: Expected string or Uint8Array`);const n=t?lr(e):e;if(128!==n.length)throw new Error(`${r}: Expected 64-byte hex`);return new sr(gr(n.slice(0,64)),gr(n.slice(64,128)))}static fromDER(e){const t=e instanceof Uint8Array;if("string"!=typeof e&&!t)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r,s:n}=function(e){if(e.length<2||48!=e[0])throw new Error(`Invalid signature tag: ${lr(e)}`);if(e[1]!==e.length-2)throw new Error("Invalid signature: incorrect length");const{data:t,left:r}=ar(e.subarray(2)),{data:n,left:i}=ar(r);if(i.length)throw new Error(`Invalid signature: left bytes after parsing: ${lr(i)}`);return{r:t,s:n}}(t?e:mr(e));return new sr(r,n)}static fromHex(e){return this.fromDER(e)}assertValidity(){const{r:e,s:t}=this;if(!Or(e))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Or(t))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const e=Xt.n>>Gt;return this.s>e}normalizeS(){return this.hasHighS()?new sr(this.r,Xt.n-this.s):this}toDERRawBytes(e=!1){return mr(this.toDERHex(e))}toDERHex(e=!1){const t=or(pr(this.s));if(e)return t;const r=or(pr(this.r)),n=pr(r.length/2),i=pr(t.length/2);return`30${pr(r.length/2+t.length/2+4)}02${n}${r}02${i}${t}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return mr(this.toCompactHex())}toCompactHex(){return dr(this.r)+dr(this.s)}}function cr(...e){if(!e.every((e=>e instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}const ur=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function lr(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");let t="";for(let r=0;r<e.length;r++)t+=ur[e[r]];return t}const fr=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function dr(e){if("bigint"!=typeof e)throw new Error("Expected bigint");if(!(Vt<=e&&e<fr))throw new Error("Expected number < 2^256");return e.toString(16).padStart(64,"0")}function hr(e){const t=mr(dr(e));if(32!==t.length)throw new Error("Error: expected 32 bytes");return t}function pr(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function gr(e){if("string"!=typeof e)throw new TypeError("hexToNumber: expected string, got "+typeof e);return BigInt(`0x${e}`)}function mr(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+e.length);const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");t[r]=o}return t}function yr(e){return gr(lr(e))}function br(e){return e instanceof Uint8Array?Uint8Array.from(e):mr(e)}function vr(e){if("number"==typeof e&&Number.isSafeInteger(e)&&e>0)return BigInt(e);if("bigint"==typeof e&&Or(e))return e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function wr(e,t=Xt.P){const r=e%t;return r>=Vt?r:t+r}function Ar(e,t){const{P:r}=Xt;let n=e;for(;t-- >Vt;)n*=n,n%=r;return n}function _r(e,t=Xt.P){if(e===Vt||t<=Vt)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=wr(e,t),n=t,i=Vt,o=Gt,a=Gt,s=Vt;for(;r!==Vt;){const e=n/r,t=n%r,c=i-a*e,u=o-s*e;n=r,r=t,i=a,o=s,a=c,s=u}if(n!==Gt)throw new Error("invert: does not exist");return wr(i,t)}const Er=(e,t)=>(e+t/$t)/t,xr={a1:BigInt("0x3086d221a7d46bcde86c90e49284eb15"),b1:-Gt*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),a2:BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),b2:BigInt("0x3086d221a7d46bcde86c90e49284eb15"),POW_2_128:BigInt("0x100000000000000000000000000000000")};function kr(e){const{n:t}=Xt,{a1:r,b1:n,a2:i,b2:o,POW_2_128:a}=xr,s=Er(o*e,t),c=Er(-n*e,t);let u=wr(e-s*r-c*i,t),l=wr(-s*n-c*o,t);const f=u>a,d=l>a;if(f&&(u=t-u),d&&(l=t-l),u>a||l>a)throw new Error("splitScalarEndo: Endomorphism failed, k="+e);return{k1neg:f,k1:u,k2neg:d,k2:l}}let Sr,Cr;class Pr{constructor(){this.v=new Uint8Array(32).fill(1),this.k=new Uint8Array(32).fill(0),this.counter=0}hmac(...e){return Ur.hmacSha256(this.k,...e)}hmacSync(...e){return Cr(this.k,...e)}checkSync(){if("function"!=typeof Cr)throw new tr("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(e=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),e),this.v=await this.hmac(this.v),0!==e.length&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),e),this.v=await this.hmac(this.v))}reseedSync(e=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),e),this.v=this.hmacSync(this.v),0!==e.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),e),this.v=this.hmacSync(this.v))}async generate(){return this.incr(),this.v=await this.hmac(this.v),this.v}generateSync(){return this.checkSync(),this.incr(),this.v=this.hmacSync(this.v),this.v}}function Or(e){return Vt<e&&e<Xt.n}function Ir(e){return Vt<e&&e<Xt.P}function Br(e,t,r){const n=yr(e);if(!Or(n))return;const{n:i}=Xt,o=ir.BASE.multiply(n),a=wr(o.x,i);if(a===Vt)return;const s=wr(_r(n,i)*wr(t+r*a,i),i);if(s===Vt)return;const c=new sr(a,s);return{sig:c,recovery:(o.x===c.r?0:2)|Number(o.y&Gt)}}function Tr(e){let t;if("bigint"==typeof e)t=e;else if("number"==typeof e&&Number.isSafeInteger(e)&&e>0)t=BigInt(e);else if("string"==typeof e){if(64!==e.length)throw new Error("Expected 32 bytes of private key");t=gr(e)}else{if(!(e instanceof Uint8Array))throw new TypeError("Expected valid private key");if(32!==e.length)throw new Error("Expected 32 bytes of private key");t=yr(e)}if(!Or(t))throw new Error("Expected private key: 0 < key < n");return t}function Mr(e){return yr(e.length>32?e.slice(0,32):e)}function Rr(e){const t=Mr(e),r=wr(t,Xt.n);return Nr(r<Vt?t:r)}function Nr(e){return hr(e)}ir.BASE._setWindowSize(8);const jr={node:Kt,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0},Lr={},Ur={bytesToHex:lr,hexToBytes:mr,concatBytes:cr,mod:wr,invert:_r,isValidPrivateKey(e){try{return Tr(e),!0}catch(e){return!1}},_bigintTo32Bytes:hr,_normalizePrivateKey:Tr,hashToPrivateKey:e=>{if((e=br(e)).length<40||e.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return hr(wr(yr(e),Xt.n-Gt)+Gt)},randomBytes:(e=32)=>{if(jr.web)return jr.web.getRandomValues(new Uint8Array(e));if(jr.node){const{randomBytes:t}=jr.node;return Uint8Array.from(t(e))}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>Ur.hashToPrivateKey(Ur.randomBytes(40)),sha256:async(...e)=>{if(jr.web){const t=await jr.web.subtle.digest("SHA-256",cr(...e));return new Uint8Array(t)}if(jr.node){const{createHash:t}=jr.node,r=t("sha256");return e.forEach((e=>r.update(e))),Uint8Array.from(r.digest())}throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(e,...t)=>{if(jr.web){const r=await jr.web.subtle.importKey("raw",e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=cr(...t),i=await jr.web.subtle.sign("HMAC",r,n);return new Uint8Array(i)}if(jr.node){const{createHmac:r}=jr.node,n=r("sha256",e);return t.forEach((e=>n.update(e))),Uint8Array.from(n.digest())}throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(e,...t)=>{let r=Lr[e];if(void 0===r){const t=await Ur.sha256(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=cr(t,t),Lr[e]=r}return Ur.sha256(r,...t)},taggedHashSync:(e,...t)=>{if("function"!=typeof Sr)throw new tr("sha256Sync is undefined, you need to set it");let r=Lr[e];if(void 0===r){const t=Sr(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=cr(t,t),Lr[e]=r}return Sr(r,...t)},precompute(e=8,t=ir.BASE){const r=t===ir.BASE?t:new ir(t.x,t.y);return r._setWindowSize(e),r.multiply(Jt),r}};Object.defineProperties(Ur,{sha256Sync:{configurable:!1,get:()=>Sr,set(e){Sr||(Sr=e)}},hmacSha256Sync:{configurable:!1,get:()=>Cr,set(e){Cr||(Cr=e)}}}),Ue.sha512Sync=(...e)=>Z(Ue.concatBytes(...e)),Ue.randomPrivateKey;const Dr=()=>{const e=Ue.randomPrivateKey(),t=Fr(e),r=new Uint8Array(64);return r.set(e),r.set(t,32),{publicKey:t,secretKey:r}},Fr=Re;function zr(e){try{return ce.fromHex(e,!0),!0}catch{return!1}}const Zr=(e,t)=>Ne(e,t.slice(0,32)),Hr=je,qr=e=>n.lW.isBuffer(e)?e:e instanceof Uint8Array?n.lW.from(e.buffer,e.byteOffset,e.byteLength):n.lW.from(e);const Wr=new Map,Kr=32;let Vr=1;class Gr extends class{constructor(e){Object.assign(this,e)}encode(){return n.lW.from((0,$e.serialize)(Wr,this))}static decode(e){return(0,$e.deserialize)(Wr,this,e)}static decodeUnchecked(e){return(0,$e.deserializeUnchecked)(Wr,this,e)}}{constructor(e){if(super({}),this._bn=void 0,function(e){return void 0!==e._bn}(e))this._bn=e._bn;else{if("string"==typeof e){const t=Ze().decode(e);if(t.length!=Kr)throw new Error("Invalid public key input");this._bn=new(Fe())(t)}else this._bn=new(Fe())(e);if(this._bn.byteLength()>32)throw new Error("Invalid public key input")}}static unique(){const e=new Gr(Vr);return Vr+=1,new Gr(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return Ze().encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){return this.toBuffer()}toBuffer(){const e=this._bn.toArrayLike(n.lW);if(e.length===Kr)return e;const t=n.lW.alloc(32);return e.copy(t,32-e.length),t}toString(){return this.toBase58()}static async createWithSeed(e,t,r){const i=n.lW.concat([e.toBuffer(),n.lW.from(t),r.toBuffer()]),o=Ge(i);return new Gr(o)}static createProgramAddressSync(e,t){let r=n.lW.alloc(0);e.forEach((function(e){if(e.length>32)throw new TypeError("Max seed length exceeded");r=n.lW.concat([r,qr(e)])})),r=n.lW.concat([r,t.toBuffer(),n.lW.from("ProgramDerivedAddress")]);const i=Ge(r);if(zr(i))throw new Error("Invalid seeds, address must fall off the curve");return new Gr(i)}static async createProgramAddress(e,t){return this.createProgramAddressSync(e,t)}static findProgramAddressSync(e,t){let r,i=255;for(;0!=i;){try{const o=e.concat(n.lW.from([i]));r=this.createProgramAddressSync(o,t)}catch(e){if(e instanceof TypeError)throw e;i--;continue}return[r,i]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,t){return this.findProgramAddressSync(e,t)}static isOnCurve(e){return zr(new Gr(e).toBytes())}}Gr.default=new Gr("11111111111111111111111111111111"),Wr.set(Gr,{kind:"struct",fields:[["_bn","u256"]]}),new Gr("BPFLoader1111111111111111111111111111111111");const $r=1232;class Jr extends Error{constructor(e){super(`Signature ${e} has expired: block height exceeded.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Jr.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class Yr extends Error{constructor(e,t){super(`Transaction was not confirmed in ${t.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${e} using the Solana Explorer or CLI tools.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Yr.prototype,"name",{value:"TransactionExpiredTimeoutError"});class Xr{constructor(e,t){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=e,this.accountKeysFromLookups=t}keySegments(){const e=[this.staticAccountKeys];return this.accountKeysFromLookups&&(e.push(this.accountKeysFromLookups.writable),e.push(this.accountKeysFromLookups.readonly)),e}get(e){for(const t of this.keySegments()){if(e<t.length)return t[e];e-=t.length}}get length(){return this.keySegments().flat().length}compileInstructions(e){if(this.length>256)throw new Error("Account index overflow encountered during compilation");const t=new Map;this.keySegments().flat().forEach(((e,r)=>{t.set(e.toBase58(),r)}));const r=e=>{const r=t.get(e.toBase58());if(void 0===r)throw new Error("Encountered an unknown instruction account key during compilation");return r};return e.map((e=>({programIdIndex:r(e.programId),accountKeyIndexes:e.keys.map((e=>r(e.pubkey))),data:e.data})))}}const Qr=(e="publicKey")=>Je.Ik(32,e),en=(e="string")=>{const t=Je.n_([Je.Jq("length"),Je.Jq("lengthPadding"),Je.Ik(Je.cv(Je.Jq(),-8),"chars")],e),r=t.decode.bind(t),i=t.encode.bind(t),o=t;return o.decode=(e,t)=>r(e,t).chars.toString(),o.encode=(e,t,r)=>{const o={chars:n.lW.from(e,"utf8")};return i(o,t,r)},o.alloc=e=>Je.Jq().span+Je.Jq().span+n.lW.from(e,"utf8").length,o};function tn(e,t){const r=e=>{if(e.span>=0)return e.span;if("function"==typeof e.alloc)return e.alloc(t[e.property]);if("count"in e&&"elementLayout"in e){const n=t[e.property];if(Array.isArray(n))return n.length*r(e.elementLayout)}else if("fields"in e)return tn({layout:e},t[e.property]);return 0};let n=0;return e.layout.fields.forEach((e=>{n+=r(e)})),n}function rn(e){let t=0,r=0;for(;;){let n=e.shift();if(t|=(127&n)<<7*r,r+=1,0==(128&n))break}return t}function nn(e,t){let r=t;for(;;){let t=127&r;if(r>>=7,0==r){e.push(t);break}t|=128,e.push(t)}}function on(e,t){if(!e)throw new Error(t||"Assertion failed")}class an{constructor(e,t){this.payer=void 0,this.keyMetaMap=void 0,this.payer=e,this.keyMetaMap=t}static compile(e,t){const r=new Map,n=e=>{const t=e.toBase58();let n=r.get(t);return void 0===n&&(n={isSigner:!1,isWritable:!1,isInvoked:!1},r.set(t,n)),n},i=n(t);i.isSigner=!0,i.isWritable=!0;for(const t of e){n(t.programId).isInvoked=!0;for(const e of t.keys){const t=n(e.pubkey);t.isSigner||(t.isSigner=e.isSigner),t.isWritable||(t.isWritable=e.isWritable)}}return new an(t,r)}getMessageComponents(){const e=[...this.keyMetaMap.entries()];on(e.length<=256,"Max static account keys length exceeded");const t=e.filter((([,e])=>e.isSigner&&e.isWritable)),r=e.filter((([,e])=>e.isSigner&&!e.isWritable)),n=e.filter((([,e])=>!e.isSigner&&e.isWritable)),i=e.filter((([,e])=>!e.isSigner&&!e.isWritable)),o={numRequiredSignatures:t.length+r.length,numReadonlySignedAccounts:r.length,numReadonlyUnsignedAccounts:i.length};{on(t.length>0,"Expected at least one writable signer key");const[e]=t[0];on(e===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}return[o,[...t.map((([e])=>new Gr(e))),...r.map((([e])=>new Gr(e))),...n.map((([e])=>new Gr(e))),...i.map((([e])=>new Gr(e)))]]}extractTableLookup(e){const[t,r]=this.drainKeysFoundInLookupTable(e.state.addresses,(e=>!e.isSigner&&!e.isInvoked&&e.isWritable)),[n,i]=this.drainKeysFoundInLookupTable(e.state.addresses,(e=>!e.isSigner&&!e.isInvoked&&!e.isWritable));if(0!==t.length||0!==n.length)return[{accountKey:e.key,writableIndexes:t,readonlyIndexes:n},{writable:r,readonly:i}]}drainKeysFoundInLookupTable(e,t){const r=new Array,n=new Array;for(const[i,o]of this.keyMetaMap.entries())if(t(o)){const t=new Gr(i),o=e.findIndex((e=>e.equals(t)));o>=0&&(on(o<256,"Max lookup table index exceeded"),r.push(o),n.push(t),this.keyMetaMap.delete(i))}return[r,n]}}class sn{constructor(e){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=e.header,this.accountKeys=e.accountKeys.map((e=>new Gr(e))),this.recentBlockhash=e.recentBlockhash,this.instructions=e.instructions,this.instructions.forEach((e=>this.indexToProgramIds.set(e.programIdIndex,this.accountKeys[e.programIdIndex])))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map((e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:Ze().decode(e.data)})))}get addressTableLookups(){return[]}getAccountKeys(){return new Xr(this.staticAccountKeys)}static compile(e){const t=an.compile(e.instructions,e.payerKey),[r,n]=t.getMessageComponents(),i=new Xr(n).compileInstructions(e.instructions).map((e=>({programIdIndex:e.programIdIndex,accounts:e.accountKeyIndexes,data:Ze().encode(e.data)})));return new sn({header:r,accountKeys:n,recentBlockhash:e.recentBlockhash,instructions:i})}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const t=this.header.numRequiredSignatures;return e>=this.header.numRequiredSignatures?e-t<this.accountKeys.length-t-this.header.numReadonlyUnsignedAccounts:e<t-this.header.numReadonlySignedAccounts}isProgramId(e){return this.indexToProgramIds.has(e)}programIds(){return[...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter(((e,t)=>!this.isProgramId(t)))}serialize(){const e=this.accountKeys.length;let t=[];nn(t,e);const r=this.instructions.map((e=>{const{accounts:t,programIdIndex:r}=e,i=Array.from(Ze().decode(e.data));let o=[];nn(o,t.length);let a=[];return nn(a,i.length),{programIdIndex:r,keyIndicesCount:n.lW.from(o),keyIndices:t,dataLength:n.lW.from(a),data:i}}));let i=[];nn(i,r.length);let o=n.lW.alloc($r);n.lW.from(i).copy(o);let a=i.length;r.forEach((e=>{const t=Je.n_([Je.u8("programIdIndex"),Je.Ik(e.keyIndicesCount.length,"keyIndicesCount"),Je.A9(Je.u8("keyIndex"),e.keyIndices.length,"keyIndices"),Je.Ik(e.dataLength.length,"dataLength"),Je.A9(Je.u8("userdatum"),e.data.length,"data")]).encode(e,o,a);a+=t})),o=o.slice(0,a);const s=Je.n_([Je.Ik(1,"numRequiredSignatures"),Je.Ik(1,"numReadonlySignedAccounts"),Je.Ik(1,"numReadonlyUnsignedAccounts"),Je.Ik(t.length,"keyCount"),Je.A9(Qr("key"),e,"keys"),Qr("recentBlockhash")]),c={numRequiredSignatures:n.lW.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:n.lW.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:n.lW.from([this.header.numReadonlyUnsignedAccounts]),keyCount:n.lW.from(t),keys:this.accountKeys.map((e=>qr(e.toBytes()))),recentBlockhash:Ze().decode(this.recentBlockhash)};let u=n.lW.alloc(2048);const l=s.encode(c,u);return o.copy(u,l),u.slice(0,l+o.length)}static from(e){let t=[...e];const r=t.shift();if(r!==(127&r))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const i=t.shift(),o=t.shift(),a=rn(t);let s=[];for(let e=0;e<a;e++){const e=t.slice(0,Kr);t=t.slice(Kr),s.push(new Gr(n.lW.from(e)))}const c=t.slice(0,Kr);t=t.slice(Kr);const u=rn(t);let l=[];for(let e=0;e<u;e++){const e=t.shift(),r=rn(t),i=t.slice(0,r);t=t.slice(r);const o=rn(t),a=t.slice(0,o),s=Ze().encode(n.lW.from(a));t=t.slice(o),l.push({programIdIndex:e,accounts:i,data:s})}const f={header:{numRequiredSignatures:r,numReadonlySignedAccounts:i,numReadonlyUnsignedAccounts:o},recentBlockhash:Ze().encode(n.lW.from(c)),accountKeys:s,instructions:l};return new sn(f)}}class cn{constructor(e){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=e.header,this.staticAccountKeys=e.staticAccountKeys,this.recentBlockhash=e.recentBlockhash,this.compiledInstructions=e.compiledInstructions,this.addressTableLookups=e.addressTableLookups}get version(){return 0}get numAccountKeysFromLookups(){let e=0;for(const t of this.addressTableLookups)e+=t.readonlyIndexes.length+t.writableIndexes.length;return e}getAccountKeys(e){let t;if(e&&"accountKeysFromLookups"in e&&e.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=e.accountKeysFromLookups.writable.length+e.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");t=e.accountKeysFromLookups}else if(e&&"addressLookupTableAccounts"in e&&e.addressLookupTableAccounts)t=this.resolveAddressTableLookups(e.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Xr(this.staticAccountKeys,t)}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const t=this.header.numRequiredSignatures,r=this.staticAccountKeys.length;return e>=r?e-r<this.addressTableLookups.reduce(((e,t)=>e+t.writableIndexes.length),0):e>=this.header.numRequiredSignatures?e-t<r-t-this.header.numReadonlyUnsignedAccounts:e<t-this.header.numReadonlySignedAccounts}resolveAddressTableLookups(e){const t={writable:[],readonly:[]};for(const r of this.addressTableLookups){const n=e.find((e=>e.key.equals(r.accountKey)));if(!n)throw new Error(`Failed to find address lookup table account for table key ${r.accountKey.toBase58()}`);for(const e of r.writableIndexes){if(!(e<n.state.addresses.length))throw new Error(`Failed to find address for index ${e} in address lookup table ${r.accountKey.toBase58()}`);t.writable.push(n.state.addresses[e])}for(const e of r.readonlyIndexes){if(!(e<n.state.addresses.length))throw new Error(`Failed to find address for index ${e} in address lookup table ${r.accountKey.toBase58()}`);t.readonly.push(n.state.addresses[e])}}return t}static compile(e){const t=an.compile(e.instructions,e.payerKey),r=new Array,n={writable:new Array,readonly:new Array},i=e.addressLookupTableAccounts||[];for(const e of i){const i=t.extractTableLookup(e);if(void 0!==i){const[e,{writable:t,readonly:o}]=i;r.push(e),n.writable.push(...t),n.readonly.push(...o)}}const[o,a]=t.getMessageComponents(),s=new Xr(a,n).compileInstructions(e.instructions);return new cn({header:o,staticAccountKeys:a,recentBlockhash:e.recentBlockhash,compiledInstructions:s,addressTableLookups:r})}serialize(){const e=Array();nn(e,this.staticAccountKeys.length);const t=this.serializeInstructions(),r=Array();nn(r,this.compiledInstructions.length);const n=this.serializeAddressTableLookups(),i=Array();nn(i,this.addressTableLookups.length);const o=Je.n_([Je.u8("prefix"),Je.n_([Je.u8("numRequiredSignatures"),Je.u8("numReadonlySignedAccounts"),Je.u8("numReadonlyUnsignedAccounts")],"header"),Je.Ik(e.length,"staticAccountKeysLength"),Je.A9(Qr(),this.staticAccountKeys.length,"staticAccountKeys"),Qr("recentBlockhash"),Je.Ik(r.length,"instructionsLength"),Je.Ik(t.length,"serializedInstructions"),Je.Ik(i.length,"addressTableLookupsLength"),Je.Ik(n.length,"serializedAddressTableLookups")]),a=new Uint8Array($r),s=o.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(e),staticAccountKeys:this.staticAccountKeys.map((e=>e.toBytes())),recentBlockhash:Ze().decode(this.recentBlockhash),instructionsLength:new Uint8Array(r),serializedInstructions:t,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:n},a);return a.slice(0,s)}serializeInstructions(){let e=0;const t=new Uint8Array($r);for(const r of this.compiledInstructions){const n=Array();nn(n,r.accountKeyIndexes.length);const i=Array();nn(i,r.data.length),e+=Je.n_([Je.u8("programIdIndex"),Je.Ik(n.length,"encodedAccountKeyIndexesLength"),Je.A9(Je.u8(),r.accountKeyIndexes.length,"accountKeyIndexes"),Je.Ik(i.length,"encodedDataLength"),Je.Ik(r.data.length,"data")]).encode({programIdIndex:r.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(n),accountKeyIndexes:r.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:r.data},t,e)}return t.slice(0,e)}serializeAddressTableLookups(){let e=0;const t=new Uint8Array($r);for(const r of this.addressTableLookups){const n=Array();nn(n,r.writableIndexes.length);const i=Array();nn(i,r.readonlyIndexes.length),e+=Je.n_([Qr("accountKey"),Je.Ik(n.length,"encodedWritableIndexesLength"),Je.A9(Je.u8(),r.writableIndexes.length,"writableIndexes"),Je.Ik(i.length,"encodedReadonlyIndexesLength"),Je.A9(Je.u8(),r.readonlyIndexes.length,"readonlyIndexes")]).encode({accountKey:r.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(n),writableIndexes:r.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:r.readonlyIndexes},t,e)}return t.slice(0,e)}static deserialize(e){let t=[...e];const r=t.shift(),n=127&r;on(r!==n,"Expected versioned message but received legacy message"),on(0===n,`Expected versioned message with version 0 but found version ${n}`);const i={numRequiredSignatures:t.shift(),numReadonlySignedAccounts:t.shift(),numReadonlyUnsignedAccounts:t.shift()},o=[],a=rn(t);for(let e=0;e<a;e++)o.push(new Gr(t.splice(0,Kr)));const s=Ze().encode(t.splice(0,Kr)),c=rn(t),u=[];for(let e=0;e<c;e++){const e=t.shift(),r=rn(t),n=t.splice(0,r),i=rn(t),o=new Uint8Array(t.splice(0,i));u.push({programIdIndex:e,accountKeyIndexes:n,data:o})}const l=rn(t),f=[];for(let e=0;e<l;e++){const e=new Gr(t.splice(0,Kr)),r=rn(t),n=t.splice(0,r),i=rn(t),o=t.splice(0,i);f.push({accountKey:e,writableIndexes:n,readonlyIndexes:o})}return new cn({header:i,staticAccountKeys:o,recentBlockhash:s,compiledInstructions:u,addressTableLookups:f})}}let un;!function(e){e[e.BLOCKHEIGHT_EXCEEDED=0]="BLOCKHEIGHT_EXCEEDED",e[e.PROCESSED=1]="PROCESSED",e[e.TIMED_OUT=2]="TIMED_OUT"}(un||(un={}));const ln=n.lW.alloc(64).fill(0);class fn{constructor(e){this.keys=void 0,this.programId=void 0,this.data=n.lW.alloc(0),this.programId=e.programId,this.keys=e.keys,e.data&&(this.data=e.data)}toJSON(){return{keys:this.keys.map((({pubkey:e,isSigner:t,isWritable:r})=>({pubkey:e.toJSON(),isSigner:t,isWritable:r}))),programId:this.programId.toJSON(),data:[...this.data]}}}class dn{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(e){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this._message=void 0,this._json=void 0,e)if(e.feePayer&&(this.feePayer=e.feePayer),e.signatures&&(this.signatures=e.signatures),Object.prototype.hasOwnProperty.call(e,"lastValidBlockHeight")){const{blockhash:t,lastValidBlockHeight:r}=e;this.recentBlockhash=t,this.lastValidBlockHeight=r}else{const{recentBlockhash:t,nonceInfo:r}=e;r&&(this.nonceInfo=r),this.recentBlockhash=t}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map((e=>e.toJSON())),signers:this.signatures.map((({publicKey:e})=>e.toJSON()))}}add(...e){if(0===e.length)throw new Error("No instructions");return e.forEach((e=>{"instructions"in e?this.instructions=this.instructions.concat(e.instructions):"data"in e&&"programId"in e&&"keys"in e?this.instructions.push(e):this.instructions.push(new fn(e))})),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let e,t,r;if(this.nonceInfo?(e=this.nonceInfo.nonce,t=this.instructions[0]!=this.nonceInfo.nonceInstruction?[this.nonceInfo.nonceInstruction,...this.instructions]:this.instructions):(e=this.recentBlockhash,t=this.instructions),!e)throw new Error("Transaction recentBlockhash required");if(t.length<1&&console.warn("No instructions provided"),this.feePayer)r=this.feePayer;else{if(!(this.signatures.length>0&&this.signatures[0].publicKey))throw new Error("Transaction fee payer required");r=this.signatures[0].publicKey}for(let e=0;e<t.length;e++)if(void 0===t[e].programId)throw new Error(`Transaction instruction index ${e} has undefined program id`);const n=[],i=[];t.forEach((e=>{e.keys.forEach((e=>{i.push({...e})}));const t=e.programId.toString();n.includes(t)||n.push(t)})),n.forEach((e=>{i.push({pubkey:new Gr(e),isSigner:!1,isWritable:!1})}));const o=[];i.forEach((e=>{const t=e.pubkey.toString(),r=o.findIndex((e=>e.pubkey.toString()===t));r>-1?(o[r].isWritable=o[r].isWritable||e.isWritable,o[r].isSigner=o[r].isSigner||e.isSigner):o.push(e)})),o.sort((function(e,t){return e.isSigner!==t.isSigner?e.isSigner?-1:1:e.isWritable!==t.isWritable?e.isWritable?-1:1:e.pubkey.toBase58().localeCompare(t.pubkey.toBase58())}));const a=o.findIndex((e=>e.pubkey.equals(r)));if(a>-1){const[e]=o.splice(a,1);e.isSigner=!0,e.isWritable=!0,o.unshift(e)}else o.unshift({pubkey:r,isSigner:!0,isWritable:!0});for(const e of this.signatures){const t=o.findIndex((t=>t.pubkey.equals(e.publicKey)));if(!(t>-1))throw new Error(`unknown signer: ${e.publicKey.toString()}`);o[t].isSigner||(o[t].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."))}let s=0,c=0,u=0;const l=[],f=[];o.forEach((({pubkey:e,isSigner:t,isWritable:r})=>{t?(l.push(e.toString()),s+=1,r||(c+=1)):(f.push(e.toString()),r||(u+=1))}));const d=l.concat(f),h=t.map((e=>{const{data:t,programId:r}=e;return{programIdIndex:d.indexOf(r.toString()),accounts:e.keys.map((e=>d.indexOf(e.pubkey.toString()))),data:Ze().encode(t)}}));return h.forEach((e=>{on(e.programIdIndex>=0),e.accounts.forEach((e=>on(e>=0)))})),new sn({header:{numRequiredSignatures:s,numReadonlySignedAccounts:c,numReadonlyUnsignedAccounts:u},accountKeys:d,recentBlockhash:e,instructions:h})}_compile(){const e=this.compileMessage(),t=e.accountKeys.slice(0,e.header.numRequiredSignatures);return this.signatures.length===t.length&&this.signatures.every(((e,r)=>t[r].equals(e.publicKey)))||(this.signatures=t.map((e=>({signature:null,publicKey:e})))),e}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(e){return(await e.getFeeForMessage(this.compileMessage())).value}setSigners(...e){if(0===e.length)throw new Error("No signers");const t=new Set;this.signatures=e.filter((e=>{const r=e.toString();return!t.has(r)&&(t.add(r),!0)})).map((e=>({signature:null,publicKey:e})))}sign(...e){if(0===e.length)throw new Error("No signers");const t=new Set,r=[];for(const n of e){const e=n.publicKey.toString();t.has(e)||(t.add(e),r.push(n))}this.signatures=r.map((e=>({signature:null,publicKey:e.publicKey})));const n=this._compile();this._partialSign(n,...r)}partialSign(...e){if(0===e.length)throw new Error("No signers");const t=new Set,r=[];for(const n of e){const e=n.publicKey.toString();t.has(e)||(t.add(e),r.push(n))}const n=this._compile();this._partialSign(n,...r)}_partialSign(e,...t){const r=e.serialize();t.forEach((e=>{const t=Zr(r,e.secretKey);this._addSignature(e.publicKey,qr(t))}))}addSignature(e,t){this._compile(),this._addSignature(e,t)}_addSignature(e,t){on(64===t.length);const r=this.signatures.findIndex((t=>e.equals(t.publicKey)));if(r<0)throw new Error(`unknown signer: ${e.toString()}`);this.signatures[r].signature=n.lW.from(t)}verifySignatures(){return this._verifySignatures(this.serializeMessage(),!0)}_verifySignatures(e,t){for(const{signature:r,publicKey:n}of this.signatures)if(null===r){if(t)return!1}else if(!Hr(r,e,n.toBuffer()))return!1;return!0}serialize(e){const{requireAllSignatures:t,verifySignatures:r}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},e),n=this.serializeMessage();if(r&&!this._verifySignatures(n,t))throw new Error("Signature verification failed");return this._serialize(n)}_serialize(e){const{signatures:t}=this,r=[];nn(r,t.length);const i=r.length+64*t.length+e.length,o=n.lW.alloc(i);return on(t.length<256),n.lW.from(r).copy(o,0),t.forEach((({signature:e},t)=>{null!==e&&(on(64===e.length,"signature has invalid length"),n.lW.from(e).copy(o,r.length+64*t))})),e.copy(o,r.length+64*t.length),on(o.length<=$r,`Transaction too large: ${o.length} > 1232`),o}get keys(){return on(1===this.instructions.length),this.instructions[0].keys.map((e=>e.pubkey))}get programId(){return on(1===this.instructions.length),this.instructions[0].programId}get data(){return on(1===this.instructions.length),this.instructions[0].data}static from(e){let t=[...e];const r=rn(t);let i=[];for(let e=0;e<r;e++){const e=t.slice(0,64);t=t.slice(64),i.push(Ze().encode(n.lW.from(e)))}return dn.populate(sn.from(t),i)}static populate(e,t=[]){const r=new dn;return r.recentBlockhash=e.recentBlockhash,e.header.numRequiredSignatures>0&&(r.feePayer=e.accountKeys[0]),t.forEach(((t,n)=>{const i={signature:t==Ze().encode(ln)?null:Ze().decode(t),publicKey:e.accountKeys[n]};r.signatures.push(i)})),e.instructions.forEach((t=>{const n=t.accounts.map((t=>{const n=e.accountKeys[t];return{pubkey:n,isSigner:r.signatures.some((e=>e.publicKey.toString()===n.toString()))||e.isAccountSigner(t),isWritable:e.isAccountWritable(t)}}));r.instructions.push(new fn({keys:n,programId:e.accountKeys[t.programIdIndex],data:Ze().decode(t.data)}))})),r._message=e,r._json=r.toJSON(),r}}const hn=new Gr("SysvarC1ock11111111111111111111111111111111"),pn=(new Gr("SysvarEpochSchedu1e111111111111111111111111"),new Gr("Sysvar1nstructions1111111111111111111111111"),new Gr("SysvarRecentB1ockHashes11111111111111111111")),gn=new Gr("SysvarRent111111111111111111111111111111111"),mn=(new Gr("SysvarRewards111111111111111111111111111111"),new Gr("SysvarS1otHashes111111111111111111111111111"),new Gr("SysvarS1otHistory11111111111111111111111111"),new Gr("SysvarStakeHistory1111111111111111111111111"));async function yn(e,t,r,n){const i=n&&{skipPreflight:n.skipPreflight,preflightCommitment:n.preflightCommitment||n.commitment,maxRetries:n.maxRetries,minContextSlot:n.minContextSlot},o=await e.sendTransaction(t,r,i),a=null!=t.recentBlockhash&&null!=t.lastValidBlockHeight?(await e.confirmTransaction({signature:o,blockhash:t.recentBlockhash,lastValidBlockHeight:t.lastValidBlockHeight},n&&n.commitment)).value:(await e.confirmTransaction(o,n&&n.commitment)).value;if(a.err)throw new Error(`Transaction ${o} failed (${JSON.stringify(a)})`);return o}function bn(e){return new Promise((t=>setTimeout(t,e)))}function vn(e,t){const r=e.layout.span>=0?e.layout.span:tn(e,t),i=n.lW.alloc(r),o=Object.assign({instruction:e.index},t);return e.layout.encode(o,i),i}const wn=Je._O("lamportsPerSignature"),An=Je.n_([Je.Jq("version"),Je.Jq("state"),Qr("authorizedPubkey"),Qr("nonce"),Je.n_([wn],"feeCalculator")]),_n=An.span;class En{constructor(e){this.authorizedPubkey=void 0,this.nonce=void 0,this.feeCalculator=void 0,this.authorizedPubkey=e.authorizedPubkey,this.nonce=e.nonce,this.feeCalculator=e.feeCalculator}static fromAccountData(e){const t=An.decode(qr(e),0);return new En({authorizedPubkey:new Gr(t.authorizedPubkey),nonce:new Gr(t.nonce).toString(),feeCalculator:t.feeCalculator})}}const xn=(8,e=>{const t=(0,Je.Ik)(8,e),{encode:r,decode:i}=(e=>({decode:e.decode.bind(e),encode:e.encode.bind(e)}))(t),o=t;return o.decode=(e,t)=>{const r=i(e,t);return(0,Ye.oU)(n.lW.from(r))},o.encode=(e,t,n)=>{const i=(0,Ye.k$)(e,8);return r(i,t,n)},o});const kn=Object.freeze({Create:{index:0,layout:Je.n_([Je.Jq("instruction"),Je.gM("lamports"),Je.gM("space"),Qr("programId")])},Assign:{index:1,layout:Je.n_([Je.Jq("instruction"),Qr("programId")])},Transfer:{index:2,layout:Je.n_([Je.Jq("instruction"),xn("lamports")])},CreateWithSeed:{index:3,layout:Je.n_([Je.Jq("instruction"),Qr("base"),en("seed"),Je.gM("lamports"),Je.gM("space"),Qr("programId")])},AdvanceNonceAccount:{index:4,layout:Je.n_([Je.Jq("instruction")])},WithdrawNonceAccount:{index:5,layout:Je.n_([Je.Jq("instruction"),Je.gM("lamports")])},InitializeNonceAccount:{index:6,layout:Je.n_([Je.Jq("instruction"),Qr("authorized")])},AuthorizeNonceAccount:{index:7,layout:Je.n_([Je.Jq("instruction"),Qr("authorized")])},Allocate:{index:8,layout:Je.n_([Je.Jq("instruction"),Je.gM("space")])},AllocateWithSeed:{index:9,layout:Je.n_([Je.Jq("instruction"),Qr("base"),en("seed"),Je.gM("space"),Qr("programId")])},AssignWithSeed:{index:10,layout:Je.n_([Je.Jq("instruction"),Qr("base"),en("seed"),Qr("programId")])},TransferWithSeed:{index:11,layout:Je.n_([Je.Jq("instruction"),xn("lamports"),en("seed"),Qr("programId")])},UpgradeNonceAccount:{index:12,layout:Je.n_([Je.Jq("instruction")])}});class Sn{constructor(){}static createAccount(e){const t=vn(kn.Create,{lamports:e.lamports,space:e.space,programId:qr(e.programId.toBuffer())});return new fn({keys:[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:t})}static transfer(e){let t,r;return"basePubkey"in e?(t=vn(kn.TransferWithSeed,{lamports:BigInt(e.lamports),seed:e.seed,programId:qr(e.programId.toBuffer())}),r=[{pubkey:e.fromPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]):(t=vn(kn.Transfer,{lamports:BigInt(e.lamports)}),r=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]),new fn({keys:r,programId:this.programId,data:t})}static assign(e){let t,r;return"basePubkey"in e?(t=vn(kn.AssignWithSeed,{base:qr(e.basePubkey.toBuffer()),seed:e.seed,programId:qr(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]):(t=vn(kn.Assign,{programId:qr(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]),new fn({keys:r,programId:this.programId,data:t})}static createAccountWithSeed(e){const t=vn(kn.CreateWithSeed,{base:qr(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:qr(e.programId.toBuffer())});let r=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!1,isWritable:!0}];return e.basePubkey!=e.fromPubkey&&r.push({pubkey:e.basePubkey,isSigner:!0,isWritable:!1}),new fn({keys:r,programId:this.programId,data:t})}static createNonceAccount(e){const t=new dn;"basePubkey"in e&&"seed"in e?t.add(Sn.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:_n,programId:this.programId})):t.add(Sn.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:_n,programId:this.programId}));const r={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return t.add(this.nonceInitialize(r)),t}static nonceInitialize(e){const t=vn(kn.InitializeNonceAccount,{authorized:qr(e.authorizedPubkey.toBuffer())}),r={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:pn,isSigner:!1,isWritable:!1},{pubkey:gn,isSigner:!1,isWritable:!1}],programId:this.programId,data:t};return new fn(r)}static nonceAdvance(e){const t=vn(kn.AdvanceNonceAccount),r={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:pn,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t};return new fn(r)}static nonceWithdraw(e){const t=vn(kn.WithdrawNonceAccount,{lamports:e.lamports});return new fn({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:pn,isSigner:!1,isWritable:!1},{pubkey:gn,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}static nonceAuthorize(e){const t=vn(kn.AuthorizeNonceAccount,{authorized:qr(e.newAuthorizedPubkey.toBuffer())});return new fn({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}static allocate(e){let t,r;return"basePubkey"in e?(t=vn(kn.AllocateWithSeed,{base:qr(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:qr(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]):(t=vn(kn.Allocate,{space:e.space}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]),new fn({keys:r,programId:this.programId,data:t})}}Sn.programId=new Gr("11111111111111111111111111111111");class Cn{constructor(){}static getMinNumSignatures(e){return 2*(Math.ceil(e/Cn.chunkSize)+1+1)}static async load(e,t,r,i,o){{const n=await e.getMinimumBalanceForRentExemption(o.length),a=await e.getAccountInfo(r.publicKey,"confirmed");let s=null;if(null!==a){if(a.executable)return console.error("Program load failed, account is already executable"),!1;a.data.length!==o.length&&(s=s||new dn,s.add(Sn.allocate({accountPubkey:r.publicKey,space:o.length}))),a.owner.equals(i)||(s=s||new dn,s.add(Sn.assign({accountPubkey:r.publicKey,programId:i}))),a.lamports<n&&(s=s||new dn,s.add(Sn.transfer({fromPubkey:t.publicKey,toPubkey:r.publicKey,lamports:n-a.lamports})))}else s=(new dn).add(Sn.createAccount({fromPubkey:t.publicKey,newAccountPubkey:r.publicKey,lamports:n>0?n:1,space:o.length,programId:i}));null!==s&&await yn(e,s,[t,r],{commitment:"confirmed"})}const a=Je.n_([Je.Jq("instruction"),Je.Jq("offset"),Je.Jq("bytesLength"),Je.Jq("bytesLengthPadding"),Je.A9(Je.u8("byte"),Je.cv(Je.Jq(),-8),"bytes")]),s=Cn.chunkSize;let c=0,u=o,l=[];for(;u.length>0;){const o=u.slice(0,s),f=n.lW.alloc(s+16);a.encode({instruction:0,offset:c,bytes:o,bytesLength:0,bytesLengthPadding:0},f);const d=(new dn).add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0}],programId:i,data:f});if(l.push(yn(e,d,[t,r],{commitment:"confirmed"})),e._rpcEndpoint.includes("solana.com")){const e=4;await bn(1e3/e)}c+=s,u=u.slice(s)}await Promise.all(l);{const o=Je.n_([Je.Jq("instruction")]),a=n.lW.alloc(o.span);o.encode({instruction:1},a);const s=(new dn).add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0},{pubkey:gn,isSigner:!1,isWritable:!1}],programId:i,data:a});await yn(e,s,[t,r],{commitment:"confirmed"})}return!0}}Cn.chunkSize=932,new Gr("BPFLoader2111111111111111111111111111111111");var Pn=Object.prototype.toString,On=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};function In(e,t){var r,n,i,o,a,s,c;if(!0===e)return"true";if(!1===e)return"false";switch(typeof e){case"object":if(null===e)return null;if(e.toJSON&&"function"==typeof e.toJSON)return In(e.toJSON(),t);if("[object Array]"===(c=Pn.call(e))){for(i="[",n=e.length-1,r=0;r<n;r++)i+=In(e[r],!0)+",";return n>-1&&(i+=In(e[r],!0)),i+"]"}if("[object Object]"===c){for(n=(o=On(e).sort()).length,i="",r=0;r<n;)void 0!==(s=In(e[a=o[r]],!1))&&(i&&(i+=","),i+=JSON.stringify(a)+":"+s),r++;return"{"+i+"}"}return JSON.stringify(e);case"function":case"undefined":return t?null:void 0;case"string":return JSON.stringify(e);default:return isFinite(e)?e:null}}var Bn=function(e){var t=In(e,!1);if(void 0!==t)return""+t};function Tn(e){let t=0;for(;e>1;)e/=2,t++;return t}class Mn{constructor(e,t,r,n,i){this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=e,this.leaderScheduleSlotOffset=t,this.warmup=r,this.firstNormalEpoch=n,this.firstNormalSlot=i}getEpoch(e){return this.getEpochAndSlotIndex(e)[0]}getEpochAndSlotIndex(e){if(e<this.firstNormalSlot){const r=Tn(0===(t=e+32+1)?1:(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,1+(t|=t>>32)))-Tn(32)-1;return[r,e-(this.getSlotsInEpoch(r)-32)]}{const t=e-this.firstNormalSlot,r=Math.floor(t/this.slotsPerEpoch);return[this.firstNormalEpoch+r,t%this.slotsPerEpoch]}var t}getFirstSlotInEpoch(e){return e<=this.firstNormalEpoch?32*(Math.pow(2,e)-1):(e-this.firstNormalEpoch)*this.slotsPerEpoch+this.firstNormalSlot}getLastSlotInEpoch(e){return this.getFirstSlotInEpoch(e)+this.getSlotsInEpoch(e)-1}getSlotsInEpoch(e){return e<this.firstNormalEpoch?Math.pow(2,e+Tn(32)):this.slotsPerEpoch}}class Rn extends Error{constructor(e,t){super(e),this.logs=void 0,this.logs=t}}class Nn extends Error{constructor({code:e,message:t,data:r},n){super(null!=n?`${n}: ${t}`:t),this.code=void 0,this.data=void 0,this.code=e,this.data=r,this.name="SolanaJSONRPCError"}}var jn=globalThis.fetch;class Ln{constructor(e){this.key=void 0,this.state=void 0,this.key=e.key,this.state=e.state}isActive(){const e=BigInt("0xffffffffffffffff");return this.state.deactivationSlot===e}static deserialize(e){const t=function(e,t){let r;try{r=e.layout.decode(t)}catch(e){throw new Error("invalid instruction; "+e)}if(r.typeIndex!==e.index)throw new Error(`invalid account data; account type mismatch ${r.typeIndex} != ${e.index}`);return r}(Un,e),r=e.length-56;on(r>=0,"lookup table is invalid"),on(r%32==0,"lookup table is invalid");const n=r/32,{addresses:i}=Je.n_([Je.A9(Qr(),n,"addresses")]).decode(e.slice(56));return{deactivationSlot:t.deactivationSlot,lastExtendedSlot:t.lastExtendedSlot,lastExtendedSlotStartIndex:t.lastExtendedStartIndex,authority:0!==t.authority.length?new Gr(t.authority[0]):void 0,addresses:i.map((e=>new Gr(e)))}}}const Un={index:1,layout:Je.n_([Je.Jq("typeIndex"),xn("deactivationSlot"),Je._O("lastExtendedSlot"),Je.u8("lastExtendedStartIndex"),Je.u8(),Je.A9(Qr(),Je.cv(Je.u8(),-1),"authority")])},Dn=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;const Fn=_t(ft(Gr),yt(),(e=>new Gr(e))),zn=bt([yt(),dt("base64")]),Zn=_t(ft(n.lW),zn,(e=>n.lW.from(e[0],"base64")));function Hn(e){let t,r;if("string"==typeof e)t=e;else if(e){const{commitment:n,...i}=e;t=n,r=i}return{commitment:t,config:r}}function qn(e){return wt([vt({jsonrpc:dt("2.0"),id:yt(),result:e}),vt({jsonrpc:dt("2.0"),id:yt(),error:vt({code:At(),message:yt(),data:gt(ct("any",(()=>!0)))})})])}const Wn=qn(At());function Kn(e){return _t(qn(e),Wn,(t=>"error"in t?t:{...t,result:ot(t.result,e)}))}function Vn(e){return Kn(vt({context:vt({slot:pt()}),value:e}))}function Gn(e){return vt({context:vt({slot:pt()}),value:e})}function $n(e,t){return 0===e?new cn({header:t.header,staticAccountKeys:t.accountKeys.map((e=>new Gr(e))),recentBlockhash:t.recentBlockhash,compiledInstructions:t.instructions.map((e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:Ze().decode(e.data)}))),addressTableLookups:t.addressTableLookups}):new sn(t)}const Jn=vt({foundation:pt(),foundationTerm:pt(),initial:pt(),taper:pt(),terminal:pt()}),Yn=Kn(ut(ht(vt({epoch:pt(),effectiveSlot:pt(),amount:pt(),postBalance:pt()})))),Xn=vt({epoch:pt(),slotIndex:pt(),slotsInEpoch:pt(),absoluteSlot:pt(),blockHeight:gt(pt()),transactionCount:gt(pt())}),Qn=vt({slotsPerEpoch:pt(),leaderScheduleSlotOffset:pt(),warmup:lt(),firstNormalEpoch:pt(),firstNormalSlot:pt()}),ei=mt(yt(),ut(pt())),ti=ht(wt([vt({}),yt()])),ri=vt({err:ti}),ni=dt("receivedSignature"),ii=vt({"solana-core":yt(),"feature-set":gt(pt())}),oi=Vn(vt({err:ht(wt([vt({}),yt()])),logs:ht(ut(yt())),accounts:gt(ht(ut(ht(vt({executable:lt(),owner:yt(),lamports:pt(),data:ut(yt()),rentEpoch:gt(pt())}))))),unitsConsumed:gt(pt()),returnData:gt(ht(vt({programId:yt(),data:bt([yt(),dt("base64")])})))})),ai=Vn(vt({byIdentity:mt(yt(),ut(pt())),range:vt({firstSlot:pt(),lastSlot:pt()})})),si=Kn(Jn),ci=Kn(Xn),ui=Kn(Qn),li=Kn(ei),fi=Kn(pt()),di=Vn(vt({total:pt(),circulating:pt(),nonCirculating:pt(),nonCirculatingAccounts:ut(Fn)})),hi=vt({amount:yt(),uiAmount:ht(pt()),decimals:pt(),uiAmountString:gt(yt())}),pi=Vn(ut(vt({address:Fn,amount:yt(),uiAmount:ht(pt()),decimals:pt(),uiAmountString:gt(yt())}))),gi=Vn(ut(vt({pubkey:Fn,account:vt({executable:lt(),owner:Fn,lamports:pt(),data:Zn,rentEpoch:pt()})}))),mi=vt({program:yt(),parsed:At(),space:pt()}),yi=Vn(ut(vt({pubkey:Fn,account:vt({executable:lt(),owner:Fn,lamports:pt(),data:mi,rentEpoch:pt()})}))),bi=Vn(ut(vt({lamports:pt(),address:Fn}))),vi=vt({executable:lt(),owner:Fn,lamports:pt(),data:Zn,rentEpoch:pt()}),wi=vt({pubkey:Fn,account:vi}),Ai=_t(wt([ft(n.lW),mi]),wt([zn,mi]),(e=>Array.isArray(e)?ot(e,Zn):e)),_i=vt({executable:lt(),owner:Fn,lamports:pt(),data:Ai,rentEpoch:pt()}),Ei=vt({pubkey:Fn,account:_i}),xi=vt({state:wt([dt("active"),dt("inactive"),dt("activating"),dt("deactivating")]),active:pt(),inactive:pt()}),ki=Kn(ut(vt({signature:yt(),slot:pt(),err:ti,memo:ht(yt()),blockTime:gt(ht(pt()))}))),Si=Kn(ut(vt({signature:yt(),slot:pt(),err:ti,memo:ht(yt()),blockTime:gt(ht(pt()))}))),Ci=vt({subscription:pt(),result:Gn(vi)}),Pi=vt({pubkey:Fn,account:vi}),Oi=vt({subscription:pt(),result:Gn(Pi)}),Ii=vt({parent:pt(),slot:pt(),root:pt()}),Bi=vt({subscription:pt(),result:Ii}),Ti=wt([vt({type:wt([dt("firstShredReceived"),dt("completed"),dt("optimisticConfirmation"),dt("root")]),slot:pt(),timestamp:pt()}),vt({type:dt("createdBank"),parent:pt(),slot:pt(),timestamp:pt()}),vt({type:dt("frozen"),slot:pt(),timestamp:pt(),stats:vt({numTransactionEntries:pt(),numSuccessfulTransactions:pt(),numFailedTransactions:pt(),maxTransactionsPerEntry:pt()})}),vt({type:dt("dead"),slot:pt(),timestamp:pt(),err:yt()})]),Mi=vt({subscription:pt(),result:Ti}),Ri=vt({subscription:pt(),result:Gn(wt([ri,ni]))}),Ni=vt({subscription:pt(),result:pt()}),ji=vt({pubkey:yt(),gossip:ht(yt()),tpu:ht(yt()),rpc:ht(yt()),version:ht(yt())}),Li=vt({votePubkey:yt(),nodePubkey:yt(),activatedStake:pt(),epochVoteAccount:lt(),epochCredits:ut(bt([pt(),pt(),pt()])),commission:pt(),lastVote:pt(),rootSlot:ht(pt())}),Ui=Kn(vt({current:ut(Li),delinquent:ut(Li)})),Di=wt([dt("processed"),dt("confirmed"),dt("finalized")]),Fi=vt({slot:pt(),confirmations:ht(pt()),err:ti,confirmationStatus:gt(Di)}),zi=Vn(ut(ht(Fi))),Zi=Kn(pt()),Hi=vt({accountKey:Fn,writableIndexes:ut(pt()),readonlyIndexes:ut(pt())}),qi=vt({signatures:ut(yt()),message:vt({accountKeys:ut(yt()),header:vt({numRequiredSignatures:pt(),numReadonlySignedAccounts:pt(),numReadonlyUnsignedAccounts:pt()}),instructions:ut(vt({accounts:ut(pt()),data:yt(),programIdIndex:pt()})),recentBlockhash:yt(),addressTableLookups:gt(ut(Hi))})}),Wi=vt({parsed:At(),program:yt(),programId:Fn}),Ki=vt({accounts:ut(Fn),data:yt(),programId:Fn}),Vi=_t(wt([Ki,Wi]),wt([vt({parsed:At(),program:yt(),programId:yt()}),vt({accounts:ut(yt()),data:yt(),programId:yt()})]),(e=>ot(e,"accounts"in e?Ki:Wi))),Gi=vt({signatures:ut(yt()),message:vt({accountKeys:ut(vt({pubkey:Fn,signer:lt(),writable:lt(),source:gt(wt([dt("transaction"),dt("lookupTable")]))})),instructions:ut(Vi),recentBlockhash:yt(),addressTableLookups:gt(ht(ut(Hi)))})}),$i=vt({accountIndex:pt(),mint:yt(),owner:gt(yt()),uiTokenAmount:hi}),Ji=vt({writable:ut(Fn),readonly:ut(Fn)}),Yi=vt({err:ti,fee:pt(),innerInstructions:gt(ht(ut(vt({index:pt(),instructions:ut(vt({accounts:ut(pt()),data:yt(),programIdIndex:pt()}))})))),preBalances:ut(pt()),postBalances:ut(pt()),logMessages:gt(ht(ut(yt()))),preTokenBalances:gt(ht(ut($i))),postTokenBalances:gt(ht(ut($i))),loadedAddresses:gt(Ji),computeUnitsConsumed:gt(pt())}),Xi=vt({err:ti,fee:pt(),innerInstructions:gt(ht(ut(vt({index:pt(),instructions:ut(Vi)})))),preBalances:ut(pt()),postBalances:ut(pt()),logMessages:gt(ht(ut(yt()))),preTokenBalances:gt(ht(ut($i))),postTokenBalances:gt(ht(ut($i))),loadedAddresses:gt(Ji),computeUnitsConsumed:gt(pt())}),Qi=wt([dt(0),dt("legacy")]),eo=Kn(ht(vt({blockhash:yt(),previousBlockhash:yt(),parentSlot:pt(),transactions:ut(vt({transaction:qi,meta:ht(Yi),version:gt(Qi)})),rewards:gt(ut(vt({pubkey:yt(),lamports:pt(),postBalance:ht(pt()),rewardType:ht(yt())}))),blockTime:ht(pt()),blockHeight:ht(pt())}))),to=Kn(ht(vt({blockhash:yt(),previousBlockhash:yt(),parentSlot:pt(),transactions:ut(vt({transaction:Gi,meta:ht(Xi),version:gt(Qi)})),rewards:gt(ut(vt({pubkey:yt(),lamports:pt(),postBalance:ht(pt()),rewardType:ht(yt())}))),blockTime:ht(pt()),blockHeight:ht(pt())}))),ro=Kn(ht(vt({blockhash:yt(),previousBlockhash:yt(),parentSlot:pt(),transactions:ut(vt({transaction:qi,meta:ht(Yi)})),rewards:gt(ut(vt({pubkey:yt(),lamports:pt(),postBalance:ht(pt()),rewardType:ht(yt())}))),blockTime:ht(pt())}))),no=Kn(ht(vt({blockhash:yt(),previousBlockhash:yt(),parentSlot:pt(),signatures:ut(yt()),blockTime:ht(pt())}))),io=Kn(ht(vt({slot:pt(),meta:Yi,blockTime:gt(ht(pt())),transaction:qi,version:gt(Qi)}))),oo=Kn(ht(vt({slot:pt(),transaction:Gi,meta:ht(Xi),blockTime:gt(ht(pt())),version:gt(Qi)}))),ao=Vn(vt({blockhash:yt(),feeCalculator:vt({lamportsPerSignature:pt()})})),so=Vn(vt({blockhash:yt(),lastValidBlockHeight:pt()})),co=Kn(ut(vt({slot:pt(),numTransactions:pt(),numSlots:pt(),samplePeriodSecs:pt()}))),uo=Vn(ht(vt({feeCalculator:vt({lamportsPerSignature:pt()})}))),lo=Kn(yt()),fo=Kn(yt()),ho=vt({err:ti,logs:ut(yt()),signature:yt()}),po=vt({result:Gn(ho),subscription:pt()}),go={"solana-client":"js/"+(null!=="0.0.0-development"?"0.0.0-development":"UNKNOWN")};class mo{constructor(e,t){let r,n,i,o,a;var s;this._commitment=void 0,this._confirmTransactionInitialTimeout=void 0,this._rpcEndpoint=void 0,this._rpcWsEndpoint=void 0,this._rpcClient=void 0,this._rpcRequest=void 0,this._rpcBatchRequest=void 0,this._rpcWebSocket=void 0,this._rpcWebSocketConnected=!1,this._rpcWebSocketHeartbeat=null,this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketGeneration=0,this._disableBlockhashCaching=!1,this._pollingBlockhash=!1,this._blockhashInfo={latestBlockhash:null,lastFetch:0,transactionSignatures:[],simulatedSignatures:[]},this._nextClientSubscriptionId=0,this._subscriptionDisposeFunctionsByClientSubscriptionId={},this._subscriptionCallbacksByServerSubscriptionId={},this._subscriptionsByHash={},this._subscriptionsAutoDisposedByRpc=new Set,t&&"string"==typeof t?this._commitment=t:t&&(this._commitment=t.commitment,this._confirmTransactionInitialTimeout=t.confirmTransactionInitialTimeout,r=t.wsEndpoint,n=t.httpHeaders,i=t.fetch,o=t.fetchMiddleware,a=t.disableRetryOnRateLimit),this._rpcEndpoint=function(e){if(!1===/^https?:/.test(e))throw new TypeError("Endpoint URL must start with `http:` or `https:`.");return e}(e),this._rpcWsEndpoint=r||function(e){const t=e.match(Dn);if(null==t)throw TypeError(`Failed to validate endpoint URL \`${e}\``);const[r,n,i,o]=t,a=e.startsWith("https:")?"wss:":"ws:",s=null==i?null:parseInt(i.slice(1),10);return`${a}//${n}${null==s?"":`:${s+1}`}${o}`}(e),this._rpcClient=function(e,t,r,n,i){const o=r||jn;let a;return n&&(a=async(e,t)=>{const r=await new Promise(((r,i)=>{try{n(e,t,((e,t)=>r([e,t])))}catch(e){i(e)}}));return await o(...r)}),new(kt())((async(r,n)=>{const s={method:"POST",body:r,agent:void 0,headers:Object.assign({"Content-Type":"application/json"},t||{},go)};try{let t,r=5,c=500;for(;t=a?await a(e,s):await o(e,s),429===t.status&&!0!==i&&(r-=1,0!==r);)console.log(`Server responded with ${t.status} ${t.statusText}. Retrying after ${c}ms delay...`),await bn(c),c*=2;const u=await t.text();t.ok?n(null,u):n(new Error(`${t.status} ${t.statusText}: ${u}`))}catch(e){e instanceof Error&&n(e)}}),{})}(e,n,i,o,a),this._rpcRequest=(s=this._rpcClient,(e,t)=>new Promise(((r,n)=>{s.request(e,t,((e,t)=>{e?n(e):r(t)}))}))),this._rpcBatchRequest=function(e){return t=>new Promise(((r,n)=>{0===t.length&&r([]);const i=t.map((t=>e.request(t.methodName,t.args)));e.request(i,((e,t)=>{e?n(e):r(t)}))}))}(this._rpcClient),this._rpcWebSocket=new Et.K(this._rpcWsEndpoint,{autoconnect:!1,max_reconnects:1/0}),this._rpcWebSocket.on("open",this._wsOnOpen.bind(this)),this._rpcWebSocket.on("error",this._wsOnError.bind(this)),this._rpcWebSocket.on("close",this._wsOnClose.bind(this)),this._rpcWebSocket.on("accountNotification",this._wsOnAccountNotification.bind(this)),this._rpcWebSocket.on("programNotification",this._wsOnProgramAccountNotification.bind(this)),this._rpcWebSocket.on("slotNotification",this._wsOnSlotNotification.bind(this)),this._rpcWebSocket.on("slotsUpdatesNotification",this._wsOnSlotUpdatesNotification.bind(this)),this._rpcWebSocket.on("signatureNotification",this._wsOnSignatureNotification.bind(this)),this._rpcWebSocket.on("rootNotification",this._wsOnRootNotification.bind(this)),this._rpcWebSocket.on("logsNotification",this._wsOnLogsNotification.bind(this))}get commitment(){return this._commitment}get rpcEndpoint(){return this._rpcEndpoint}async getBalanceAndContext(e,t){const{commitment:r,config:n}=Hn(t),i=this._buildArgs([e.toBase58()],r,void 0,n),o=ot(await this._rpcRequest("getBalance",i),Vn(pt()));if("error"in o)throw new Nn(o.error,`failed to get balance for ${e.toBase58()}`);return o.result}async getBalance(e,t){return await this.getBalanceAndContext(e,t).then((e=>e.value)).catch((t=>{throw new Error("failed to get balance of account "+e.toBase58()+": "+t)}))}async getBlockTime(e){const t=ot(await this._rpcRequest("getBlockTime",[e]),Kn(ht(pt())));if("error"in t)throw new Nn(t.error,`failed to get block time for slot ${e}`);return t.result}async getMinimumLedgerSlot(){const e=ot(await this._rpcRequest("minimumLedgerSlot",[]),Kn(pt()));if("error"in e)throw new Nn(e.error,"failed to get minimum ledger slot");return e.result}async getFirstAvailableBlock(){const e=ot(await this._rpcRequest("getFirstAvailableBlock",[]),fi);if("error"in e)throw new Nn(e.error,"failed to get first available block");return e.result}async getSupply(e){let t={};t="string"==typeof e?{commitment:e}:e?{...e,commitment:e&&e.commitment||this.commitment}:{commitment:this.commitment};const r=ot(await this._rpcRequest("getSupply",[t]),di);if("error"in r)throw new Nn(r.error,"failed to get supply");return r.result}async getTokenSupply(e,t){const r=this._buildArgs([e.toBase58()],t),n=ot(await this._rpcRequest("getTokenSupply",r),Vn(hi));if("error"in n)throw new Nn(n.error,"failed to get token supply");return n.result}async getTokenAccountBalance(e,t){const r=this._buildArgs([e.toBase58()],t),n=ot(await this._rpcRequest("getTokenAccountBalance",r),Vn(hi));if("error"in n)throw new Nn(n.error,"failed to get token account balance");return n.result}async getTokenAccountsByOwner(e,t,r){const{commitment:n,config:i}=Hn(r);let o=[e.toBase58()];"mint"in t?o.push({mint:t.mint.toBase58()}):o.push({programId:t.programId.toBase58()});const a=this._buildArgs(o,n,"base64",i),s=ot(await this._rpcRequest("getTokenAccountsByOwner",a),gi);if("error"in s)throw new Nn(s.error,`failed to get token accounts owned by account ${e.toBase58()}`);return s.result}async getParsedTokenAccountsByOwner(e,t,r){let n=[e.toBase58()];"mint"in t?n.push({mint:t.mint.toBase58()}):n.push({programId:t.programId.toBase58()});const i=this._buildArgs(n,r,"jsonParsed"),o=ot(await this._rpcRequest("getTokenAccountsByOwner",i),yi);if("error"in o)throw new Nn(o.error,`failed to get token accounts owned by account ${e.toBase58()}`);return o.result}async getLargestAccounts(e){const t={...e,commitment:e&&e.commitment||this.commitment},r=t.filter||t.commitment?[t]:[],n=ot(await this._rpcRequest("getLargestAccounts",r),bi);if("error"in n)throw new Nn(n.error,"failed to get largest accounts");return n.result}async getTokenLargestAccounts(e,t){const r=this._buildArgs([e.toBase58()],t),n=ot(await this._rpcRequest("getTokenLargestAccounts",r),pi);if("error"in n)throw new Nn(n.error,"failed to get token largest accounts");return n.result}async getAccountInfoAndContext(e,t){const{commitment:r,config:n}=Hn(t),i=this._buildArgs([e.toBase58()],r,"base64",n),o=ot(await this._rpcRequest("getAccountInfo",i),Vn(ht(vi)));if("error"in o)throw new Nn(o.error,`failed to get info about account ${e.toBase58()}`);return o.result}async getParsedAccountInfo(e,t){const{commitment:r,config:n}=Hn(t),i=this._buildArgs([e.toBase58()],r,"jsonParsed",n),o=ot(await this._rpcRequest("getAccountInfo",i),Vn(ht(_i)));if("error"in o)throw new Nn(o.error,`failed to get info about account ${e.toBase58()}`);return o.result}async getAccountInfo(e,t){try{return(await this.getAccountInfoAndContext(e,t)).value}catch(t){throw new Error("failed to get info about account "+e.toBase58()+": "+t)}}async getMultipleParsedAccounts(e,t){const{commitment:r,config:n}=Hn(t),i=e.map((e=>e.toBase58())),o=this._buildArgs([i],r,"jsonParsed",n),a=ot(await this._rpcRequest("getMultipleAccounts",o),Vn(ut(ht(_i))));if("error"in a)throw new Nn(a.error,`failed to get info for accounts ${i}`);return a.result}async getMultipleAccountsInfoAndContext(e,t){const{commitment:r,config:n}=Hn(t),i=e.map((e=>e.toBase58())),o=this._buildArgs([i],r,"base64",n),a=ot(await this._rpcRequest("getMultipleAccounts",o),Vn(ut(ht(vi))));if("error"in a)throw new Nn(a.error,`failed to get info for accounts ${i}`);return a.result}async getMultipleAccountsInfo(e,t){return(await this.getMultipleAccountsInfoAndContext(e,t)).value}async getStakeActivation(e,t,r){const{commitment:n,config:i}=Hn(t),o=this._buildArgs([e.toBase58()],n,void 0,{...i,epoch:null!=r?r:null==i?void 0:i.epoch}),a=ot(await this._rpcRequest("getStakeActivation",o),Kn(xi));if("error"in a)throw new Nn(a.error,`failed to get Stake Activation ${e.toBase58()}`);return a.result}async getProgramAccounts(e,t){const{commitment:r,config:n}=Hn(t),{encoding:i,...o}=n||{},a=this._buildArgs([e.toBase58()],r,i||"base64",o),s=ot(await this._rpcRequest("getProgramAccounts",a),Kn(ut(wi)));if("error"in s)throw new Nn(s.error,`failed to get accounts owned by program ${e.toBase58()}`);return s.result}async getParsedProgramAccounts(e,t){const{commitment:r,config:n}=Hn(t),i=this._buildArgs([e.toBase58()],r,"jsonParsed",n),o=ot(await this._rpcRequest("getProgramAccounts",i),Kn(ut(Ei)));if("error"in o)throw new Nn(o.error,`failed to get accounts owned by program ${e.toBase58()}`);return o.result}async confirmTransaction(e,t){let r,n;r="string"==typeof e?e:e.signature;try{n=Ze().decode(r)}catch(e){throw new Error("signature must be base58 encoded: "+r)}on(64===n.length,"signature has invalid length");const i=t||this.commitment;let o,a,s=!1;const c=new Promise(((e,t)=>{try{a=this.onSignature(r,((t,r)=>{a=void 0;const n={context:r,value:t};s=!0,e({__type:un.PROCESSED,response:n})}),i)}catch(e){t(e)}})),u=new Promise((r=>{if("string"==typeof e){let e=this._confirmTransactionInitialTimeout||6e4;switch(i){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":e=this._confirmTransactionInitialTimeout||3e4}o=setTimeout((()=>r({__type:un.TIMED_OUT,timeoutMs:e})),e)}else{let n=e;const i=async()=>{try{return await this.getBlockHeight(t)}catch(e){return-1}};(async()=>{let e=await i();if(!s){for(;e<=n.lastValidBlockHeight;){if(await bn(1e3),s)return;if(e=await i(),s)return}r({__type:un.BLOCKHEIGHT_EXCEEDED})}})()}}));let l;try{const e=await Promise.race([c,u]);switch(e.__type){case un.BLOCKHEIGHT_EXCEEDED:throw new Jr(r);case un.PROCESSED:l=e.response;break;case un.TIMED_OUT:throw new Yr(r,e.timeoutMs/1e3)}}finally{clearTimeout(o),a&&this.removeSignatureListener(a)}return l}async getClusterNodes(){const e=ot(await this._rpcRequest("getClusterNodes",[]),Kn(ut(ji)));if("error"in e)throw new Nn(e.error,"failed to get cluster nodes");return e.result}async getVoteAccounts(e){const t=this._buildArgs([],e),r=ot(await this._rpcRequest("getVoteAccounts",t),Ui);if("error"in r)throw new Nn(r.error,"failed to get vote accounts");return r.result}async getSlot(e){const{commitment:t,config:r}=Hn(e),n=this._buildArgs([],t,void 0,r),i=ot(await this._rpcRequest("getSlot",n),Kn(pt()));if("error"in i)throw new Nn(i.error,"failed to get slot");return i.result}async getSlotLeader(e){const{commitment:t,config:r}=Hn(e),n=this._buildArgs([],t,void 0,r),i=ot(await this._rpcRequest("getSlotLeader",n),Kn(yt()));if("error"in i)throw new Nn(i.error,"failed to get slot leader");return i.result}async getSlotLeaders(e,t){const r=[e,t],n=ot(await this._rpcRequest("getSlotLeaders",r),Kn(ut(Fn)));if("error"in n)throw new Nn(n.error,"failed to get slot leaders");return n.result}async getSignatureStatus(e,t){const{context:r,value:n}=await this.getSignatureStatuses([e],t);return on(1===n.length),{context:r,value:n[0]}}async getSignatureStatuses(e,t){const r=[e];t&&r.push(t);const n=ot(await this._rpcRequest("getSignatureStatuses",r),zi);if("error"in n)throw new Nn(n.error,"failed to get signature status");return n.result}async getTransactionCount(e){const{commitment:t,config:r}=Hn(e),n=this._buildArgs([],t,void 0,r),i=ot(await this._rpcRequest("getTransactionCount",n),Kn(pt()));if("error"in i)throw new Nn(i.error,"failed to get transaction count");return i.result}async getTotalSupply(e){return(await this.getSupply({commitment:e,excludeNonCirculatingAccountsList:!0})).value.total}async getInflationGovernor(e){const t=this._buildArgs([],e),r=ot(await this._rpcRequest("getInflationGovernor",t),si);if("error"in r)throw new Nn(r.error,"failed to get inflation");return r.result}async getInflationReward(e,t,r){const{commitment:n,config:i}=Hn(r),o=this._buildArgs([e.map((e=>e.toBase58()))],n,void 0,{...i,epoch:null!=t?t:null==i?void 0:i.epoch}),a=ot(await this._rpcRequest("getInflationReward",o),Yn);if("error"in a)throw new Nn(a.error,"failed to get inflation reward");return a.result}async getEpochInfo(e){const{commitment:t,config:r}=Hn(e),n=this._buildArgs([],t,void 0,r),i=ot(await this._rpcRequest("getEpochInfo",n),ci);if("error"in i)throw new Nn(i.error,"failed to get epoch info");return i.result}async getEpochSchedule(){const e=ot(await this._rpcRequest("getEpochSchedule",[]),ui);if("error"in e)throw new Nn(e.error,"failed to get epoch schedule");const t=e.result;return new Mn(t.slotsPerEpoch,t.leaderScheduleSlotOffset,t.warmup,t.firstNormalEpoch,t.firstNormalSlot)}async getLeaderSchedule(){const e=ot(await this._rpcRequest("getLeaderSchedule",[]),li);if("error"in e)throw new Nn(e.error,"failed to get leader schedule");return e.result}async getMinimumBalanceForRentExemption(e,t){const r=this._buildArgs([e],t),n=ot(await this._rpcRequest("getMinimumBalanceForRentExemption",r),Zi);return"error"in n?(console.warn("Unable to fetch minimum balance for rent exemption"),0):n.result}async getRecentBlockhashAndContext(e){const t=this._buildArgs([],e),r=ot(await this._rpcRequest("getRecentBlockhash",t),ao);if("error"in r)throw new Nn(r.error,"failed to get recent blockhash");return r.result}async getRecentPerformanceSamples(e){const t=ot(await this._rpcRequest("getRecentPerformanceSamples",e?[e]:[]),co);if("error"in t)throw new Nn(t.error,"failed to get recent performance samples");return t.result}async getFeeCalculatorForBlockhash(e,t){const r=this._buildArgs([e],t),n=ot(await this._rpcRequest("getFeeCalculatorForBlockhash",r),uo);if("error"in n)throw new Nn(n.error,"failed to get fee calculator");const{context:i,value:o}=n.result;return{context:i,value:null!==o?o.feeCalculator:null}}async getFeeForMessage(e,t){const r=e.serialize().toString("base64"),n=this._buildArgs([r],t),i=ot(await this._rpcRequest("getFeeForMessage",n),Vn(ht(pt())));if("error"in i)throw new Nn(i.error,"failed to get slot");if(null===i.result)throw new Error("invalid blockhash");return i.result}async getRecentBlockhash(e){try{return(await this.getRecentBlockhashAndContext(e)).value}catch(e){throw new Error("failed to get recent blockhash: "+e)}}async getLatestBlockhash(e){try{return(await this.getLatestBlockhashAndContext(e)).value}catch(e){throw new Error("failed to get recent blockhash: "+e)}}async getLatestBlockhashAndContext(e){const{commitment:t,config:r}=Hn(e),n=this._buildArgs([],t,void 0,r),i=ot(await this._rpcRequest("getLatestBlockhash",n),so);if("error"in i)throw new Nn(i.error,"failed to get latest blockhash");return i.result}async getVersion(){const e=ot(await this._rpcRequest("getVersion",[]),Kn(ii));if("error"in e)throw new Nn(e.error,"failed to get version");return e.result}async getGenesisHash(){const e=ot(await this._rpcRequest("getGenesisHash",[]),Kn(yt()));if("error"in e)throw new Nn(e.error,"failed to get genesis hash");return e.result}async getBlock(e,t){const{commitment:r,config:n}=Hn(t),i=this._buildArgsAtLeastConfirmed([e],r,void 0,n),o=ot(await this._rpcRequest("getBlock",i),eo);if("error"in o)throw new Nn(o.error,"failed to get confirmed block");const a=o.result;return a?{...a,transactions:a.transactions.map((({transaction:e,meta:t,version:r})=>({meta:t,transaction:{...e,message:$n(r,e.message)},version:r})))}:a}async getParsedBlock(e,t){const{commitment:r,config:n}=Hn(t),i=this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",n),o=ot(await this._rpcRequest("getBlock",i),to);if("error"in o)throw new Nn(o.error,"failed to get block");return o.result}async getBlockHeight(e){const{commitment:t,config:r}=Hn(e),n=this._buildArgs([],t,void 0,r),i=ot(await this._rpcRequest("getBlockHeight",n),Kn(pt()));if("error"in i)throw new Nn(i.error,"failed to get block height information");return i.result}async getBlockProduction(e){let t,r;if("string"==typeof e)r=e;else if(e){const{commitment:n,...i}=e;r=n,t=i}const n=this._buildArgs([],r,"base64",t),i=ot(await this._rpcRequest("getBlockProduction",n),ai);if("error"in i)throw new Nn(i.error,"failed to get block production information");return i.result}async getTransaction(e,t){const{commitment:r,config:n}=Hn(t),i=this._buildArgsAtLeastConfirmed([e],r,void 0,n),o=ot(await this._rpcRequest("getTransaction",i),io);if("error"in o)throw new Nn(o.error,"failed to get transaction");const a=o.result;return a?{...a,transaction:{...a.transaction,message:$n(a.version,a.transaction.message)}}:a}async getParsedTransaction(e,t){const{commitment:r,config:n}=Hn(t),i=this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",n),o=ot(await this._rpcRequest("getTransaction",i),oo);if("error"in o)throw new Nn(o.error,"failed to get transaction");return o.result}async getParsedTransactions(e,t){const{commitment:r,config:n}=Hn(t),i=e.map((e=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",n)})));return(await this._rpcBatchRequest(i)).map((e=>{const t=ot(e,oo);if("error"in t)throw new Nn(t.error,"failed to get transactions");return t.result}))}async getTransactions(e,t){const{commitment:r,config:n}=Hn(t),i=e.map((e=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([e],r,void 0,n)})));return(await this._rpcBatchRequest(i)).map((e=>{const t=ot(e,io);if("error"in t)throw new Nn(t.error,"failed to get transactions");const r=t.result;return r?{...r,transaction:{...r.transaction,message:$n(r.version,r.transaction.message)}}:r}))}async getConfirmedBlock(e,t){const r=this._buildArgsAtLeastConfirmed([e],t),n=ot(await this._rpcRequest("getConfirmedBlock",r),ro);if("error"in n)throw new Nn(n.error,"failed to get confirmed block");const i=n.result;if(!i)throw new Error("Confirmed block "+e+" not found");const o={...i,transactions:i.transactions.map((({transaction:e,meta:t})=>{const r=new sn(e.message);return{meta:t,transaction:{...e,message:r}}}))};return{...o,transactions:o.transactions.map((({transaction:e,meta:t})=>({meta:t,transaction:dn.populate(e.message,e.signatures)})))}}async getBlocks(e,t,r){const n=this._buildArgsAtLeastConfirmed(void 0!==t?[e,t]:[e],r),i=ot(await this._rpcRequest("getBlocks",n),Kn(ut(pt())));if("error"in i)throw new Nn(i.error,"failed to get blocks");return i.result}async getBlockSignatures(e,t){const r=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),n=ot(await this._rpcRequest("getBlock",r),no);if("error"in n)throw new Nn(n.error,"failed to get block");const i=n.result;if(!i)throw new Error("Block "+e+" not found");return i}async getConfirmedBlockSignatures(e,t){const r=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),n=ot(await this._rpcRequest("getConfirmedBlock",r),no);if("error"in n)throw new Nn(n.error,"failed to get confirmed block");const i=n.result;if(!i)throw new Error("Confirmed block "+e+" not found");return i}async getConfirmedTransaction(e,t){const r=this._buildArgsAtLeastConfirmed([e],t),n=ot(await this._rpcRequest("getConfirmedTransaction",r),io);if("error"in n)throw new Nn(n.error,"failed to get transaction");const i=n.result;if(!i)return i;const o=new sn(i.transaction.message),a=i.transaction.signatures;return{...i,transaction:dn.populate(o,a)}}async getParsedConfirmedTransaction(e,t){const r=this._buildArgsAtLeastConfirmed([e],t,"jsonParsed"),n=ot(await this._rpcRequest("getConfirmedTransaction",r),oo);if("error"in n)throw new Nn(n.error,"failed to get confirmed transaction");return n.result}async getParsedConfirmedTransactions(e,t){const r=e.map((e=>({methodName:"getConfirmedTransaction",args:this._buildArgsAtLeastConfirmed([e],t,"jsonParsed")})));return(await this._rpcBatchRequest(r)).map((e=>{const t=ot(e,oo);if("error"in t)throw new Nn(t.error,"failed to get confirmed transactions");return t.result}))}async getConfirmedSignaturesForAddress(e,t,r){let n={},i=await this.getFirstAvailableBlock();for(;!("until"in n)&&!(--t<=0||t<i);)try{const e=await this.getConfirmedBlockSignatures(t,"finalized");e.signatures.length>0&&(n.until=e.signatures[e.signatures.length-1].toString())}catch(e){if(e instanceof Error&&e.message.includes("skipped"))continue;throw e}let o=await this.getSlot("finalized");for(;!("before"in n||++r>o);)try{const e=await this.getConfirmedBlockSignatures(r);e.signatures.length>0&&(n.before=e.signatures[e.signatures.length-1].toString())}catch(e){if(e instanceof Error&&e.message.includes("skipped"))continue;throw e}return(await this.getConfirmedSignaturesForAddress2(e,n)).map((e=>e.signature))}async getConfirmedSignaturesForAddress2(e,t,r){const n=this._buildArgsAtLeastConfirmed([e.toBase58()],r,void 0,t),i=ot(await this._rpcRequest("getConfirmedSignaturesForAddress2",n),ki);if("error"in i)throw new Nn(i.error,"failed to get confirmed signatures for address");return i.result}async getSignaturesForAddress(e,t,r){const n=this._buildArgsAtLeastConfirmed([e.toBase58()],r,void 0,t),i=ot(await this._rpcRequest("getSignaturesForAddress",n),Si);if("error"in i)throw new Nn(i.error,"failed to get signatures for address");return i.result}async getAddressLookupTable(e,t){const{context:r,value:n}=await this.getAccountInfoAndContext(e,t);let i=null;return null!==n&&(i=new Ln({key:e,state:Ln.deserialize(n.data)})),{context:r,value:i}}async getNonceAndContext(e,t){const{context:r,value:n}=await this.getAccountInfoAndContext(e,t);let i=null;return null!==n&&(i=En.fromAccountData(n.data)),{context:r,value:i}}async getNonce(e,t){return await this.getNonceAndContext(e,t).then((e=>e.value)).catch((t=>{throw new Error("failed to get nonce for account "+e.toBase58()+": "+t)}))}async requestAirdrop(e,t){const r=ot(await this._rpcRequest("requestAirdrop",[e.toBase58(),t]),lo);if("error"in r)throw new Nn(r.error,`airdrop to ${e.toBase58()} failed`);return r.result}async _blockhashWithExpiryBlockHeight(e){if(!e){for(;this._pollingBlockhash;)await bn(100);const e=Date.now()-this._blockhashInfo.lastFetch>=3e4;if(null!==this._blockhashInfo.latestBlockhash&&!e)return this._blockhashInfo.latestBlockhash}return await this._pollNewBlockhash()}async _pollNewBlockhash(){this._pollingBlockhash=!0;try{const e=Date.now(),t=this._blockhashInfo.latestBlockhash,r=t?t.blockhash:null;for(let e=0;e<50;e++){const e=await this.getLatestBlockhash("finalized");if(r!==e.blockhash)return this._blockhashInfo={latestBlockhash:e,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]},e;await bn(200)}throw new Error(`Unable to obtain a new blockhash after ${Date.now()-e}ms`)}finally{this._pollingBlockhash=!1}}async getStakeMinimumDelegation(e){const{commitment:t,config:r}=Hn(e),n=this._buildArgs([],t,"base64",r),i=ot(await this._rpcRequest("getStakeMinimumDelegation",n),Vn(pt()));if("error"in i)throw new Nn(i.error,"failed to get stake minimum delegation");return i.result}async simulateTransaction(e,t,r){if("message"in e){const i=e.serialize(),o=n.lW.from(i).toString("base64");if(Array.isArray(t)||void 0!==r)throw new Error("Invalid arguments");const a=t||{};a.encoding="base64","commitment"in a||(a.commitment=this.commitment);const s=[o,a],c=ot(await this._rpcRequest("simulateTransaction",s),oi);if("error"in c)throw new Error("failed to simulate transaction: "+c.error.message);return c.result}let i;if(e instanceof dn){let t=e;i=new dn,i.feePayer=t.feePayer,i.instructions=e.instructions,i.nonceInfo=t.nonceInfo,i.signatures=t.signatures}else i=dn.populate(e),i._message=i._json=void 0;if(void 0!==t&&!Array.isArray(t))throw new Error("Invalid arguments");const o=t;if(i.nonceInfo&&o)i.sign(...o);else{let e=this._disableBlockhashCaching;for(;;){const t=await this._blockhashWithExpiryBlockHeight(e);if(i.lastValidBlockHeight=t.lastValidBlockHeight,i.recentBlockhash=t.blockhash,!o)break;if(i.sign(...o),!i.signature)throw new Error("!signature");const r=i.signature.toString("base64");if(!this._blockhashInfo.simulatedSignatures.includes(r)&&!this._blockhashInfo.transactionSignatures.includes(r)){this._blockhashInfo.simulatedSignatures.push(r);break}e=!0}}const a=i._compile(),s=a.serialize(),c=i._serialize(s).toString("base64"),u={encoding:"base64",commitment:this.commitment};if(r){const e=(Array.isArray(r)?r:a.nonProgramIds()).map((e=>e.toBase58()));u.accounts={encoding:"base64",addresses:e}}o&&(u.sigVerify=!0);const l=[c,u],f=ot(await this._rpcRequest("simulateTransaction",l),oi);if("error"in f){let e;if("data"in f.error&&(e=f.error.data.logs,e&&Array.isArray(e))){const t="\n ",r=t+e.join(t);console.error(f.error.message,r)}throw new Rn("failed to simulate transaction: "+f.error.message,e)}return f.result}async sendTransaction(e,t,r){if("version"in e){if(t&&Array.isArray(t))throw new Error("Invalid arguments");const n=e.serialize();return await this.sendRawTransaction(n,r)}if(void 0===t||!Array.isArray(t))throw new Error("Invalid arguments");const n=t;if(e.nonceInfo)e.sign(...n);else{let t=this._disableBlockhashCaching;for(;;){const r=await this._blockhashWithExpiryBlockHeight(t);if(e.lastValidBlockHeight=r.lastValidBlockHeight,e.recentBlockhash=r.blockhash,e.sign(...n),!e.signature)throw new Error("!signature");const i=e.signature.toString("base64");if(!this._blockhashInfo.transactionSignatures.includes(i)){this._blockhashInfo.transactionSignatures.push(i);break}t=!0}}const i=e.serialize();return await this.sendRawTransaction(i,r)}async sendRawTransaction(e,t){const r=qr(e).toString("base64");return await this.sendEncodedTransaction(r,t)}async sendEncodedTransaction(e,t){const r={encoding:"base64"},n=t&&t.skipPreflight,i=t&&t.preflightCommitment||this.commitment;t&&null!=t.maxRetries&&(r.maxRetries=t.maxRetries),t&&null!=t.minContextSlot&&(r.minContextSlot=t.minContextSlot),n&&(r.skipPreflight=n),i&&(r.preflightCommitment=i);const o=[e,r],a=ot(await this._rpcRequest("sendTransaction",o),fo);if("error"in a){let e;throw"data"in a.error&&(e=a.error.data.logs),new Rn("failed to send transaction: "+a.error.message,e)}return a.result}_wsOnOpen(){this._rpcWebSocketConnected=!0,this._rpcWebSocketHeartbeat=setInterval((()=>{this._rpcWebSocket.notify("ping").catch((()=>{}))}),5e3),this._updateSubscriptions()}_wsOnError(e){this._rpcWebSocketConnected=!1,console.error("ws error:",e.message)}_wsOnClose(e){this._rpcWebSocketConnected=!1,this._rpcWebSocketGeneration=(this._rpcWebSocketGeneration+1)%Number.MAX_SAFE_INTEGER,this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null),this._rpcWebSocketHeartbeat&&(clearInterval(this._rpcWebSocketHeartbeat),this._rpcWebSocketHeartbeat=null),1e3!==e?(this._subscriptionCallbacksByServerSubscriptionId={},Object.entries(this._subscriptionsByHash).forEach((([e,t])=>{this._subscriptionsByHash[e]={...t,state:"pending"}}))):this._updateSubscriptions()}async _updateSubscriptions(){if(0===Object.keys(this._subscriptionsByHash).length)return void(this._rpcWebSocketConnected&&(this._rpcWebSocketConnected=!1,this._rpcWebSocketIdleTimeout=setTimeout((()=>{this._rpcWebSocketIdleTimeout=null;try{this._rpcWebSocket.close()}catch(e){e instanceof Error&&console.log(`Error when closing socket connection: ${e.message}`)}}),500)));if(null!==this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketConnected=!0),!this._rpcWebSocketConnected)return void this._rpcWebSocket.connect();const e=this._rpcWebSocketGeneration,t=()=>e===this._rpcWebSocketGeneration;await Promise.all(Object.keys(this._subscriptionsByHash).map((async e=>{const r=this._subscriptionsByHash[e];if(void 0!==r)switch(r.state){case"pending":case"unsubscribed":if(0===r.callbacks.size)return delete this._subscriptionsByHash[e],"unsubscribed"===r.state&&delete this._subscriptionCallbacksByServerSubscriptionId[r.serverSubscriptionId],void await this._updateSubscriptions();await(async()=>{const{args:n,method:i}=r;try{this._subscriptionsByHash[e]={...r,state:"subscribing"};const t=await this._rpcWebSocket.call(i,n);this._subscriptionsByHash[e]={...r,serverSubscriptionId:t,state:"subscribed"},this._subscriptionCallbacksByServerSubscriptionId[t]=r.callbacks,await this._updateSubscriptions()}catch(o){if(o instanceof Error&&console.error(`${i} error for argument`,n,o.message),!t())return;this._subscriptionsByHash[e]={...r,state:"pending"},await this._updateSubscriptions()}})();break;case"subscribed":0===r.callbacks.size&&await(async()=>{const{serverSubscriptionId:n,unsubscribeMethod:i}=r;if(this._subscriptionsAutoDisposedByRpc.has(n))this._subscriptionsAutoDisposedByRpc.delete(n);else{this._subscriptionsByHash[e]={...r,state:"unsubscribing"};try{await this._rpcWebSocket.call(i,[n])}catch(n){if(n instanceof Error&&console.error(`${i} error:`,n.message),!t())return;return this._subscriptionsByHash[e]={...r,state:"subscribed"},void await this._updateSubscriptions()}}this._subscriptionsByHash[e]={...r,state:"unsubscribed"},await this._updateSubscriptions()})()}})))}_handleServerNotification(e,t){const r=this._subscriptionCallbacksByServerSubscriptionId[e];void 0!==r&&r.forEach((e=>{try{e(...t)}catch(e){console.error(e)}}))}_wsOnAccountNotification(e){const{result:t,subscription:r}=ot(e,Ci);this._handleServerNotification(r,[t.value,t.context])}_makeSubscription(e,t){const r=this._nextClientSubscriptionId++,n=Bn([e.method,t]),i=this._subscriptionsByHash[n];return void 0===i?this._subscriptionsByHash[n]={...e,args:t,callbacks:new Set([e.callback]),state:"pending"}:i.callbacks.add(e.callback),this._subscriptionDisposeFunctionsByClientSubscriptionId[r]=async()=>{delete this._subscriptionDisposeFunctionsByClientSubscriptionId[r];const t=this._subscriptionsByHash[n];on(void 0!==t,`Could not find a \`Subscription\` when tearing down client subscription #${r}`),t.callbacks.delete(e.callback),await this._updateSubscriptions()},this._updateSubscriptions(),r}onAccountChange(e,t,r){const n=this._buildArgs([e.toBase58()],r||this._commitment||"finalized","base64");return this._makeSubscription({callback:t,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},n)}async removeAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"account change")}_wsOnProgramAccountNotification(e){const{result:t,subscription:r}=ot(e,Oi);this._handleServerNotification(r,[{accountId:t.value.pubkey,accountInfo:t.value.account},t.context])}onProgramAccountChange(e,t,r,n){const i=this._buildArgs([e.toBase58()],r||this._commitment||"finalized","base64",n?{filters:n}:void 0);return this._makeSubscription({callback:t,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},i)}async removeProgramAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"program account change")}onLogs(e,t,r){const n=this._buildArgs(["object"==typeof e?{mentions:[e.toString()]}:e],r||this._commitment||"finalized");return this._makeSubscription({callback:t,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},n)}async removeOnLogsListener(e){await this._unsubscribeClientSubscription(e,"logs")}_wsOnLogsNotification(e){const{result:t,subscription:r}=ot(e,po);this._handleServerNotification(r,[t.value,t.context])}_wsOnSlotNotification(e){const{result:t,subscription:r}=ot(e,Bi);this._handleServerNotification(r,[t])}onSlotChange(e){return this._makeSubscription({callback:e,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}async removeSlotChangeListener(e){await this._unsubscribeClientSubscription(e,"slot change")}_wsOnSlotUpdatesNotification(e){const{result:t,subscription:r}=ot(e,Mi);this._handleServerNotification(r,[t])}onSlotUpdate(e){return this._makeSubscription({callback:e,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}async removeSlotUpdateListener(e){await this._unsubscribeClientSubscription(e,"slot update")}async _unsubscribeClientSubscription(e,t){const r=this._subscriptionDisposeFunctionsByClientSubscriptionId[e];r?await r():console.warn(`Ignored unsubscribe request because an active subscription with id \`${e}\` for '${t}' events could not be found.`)}_buildArgs(e,t,r,n){const i=t||this._commitment;if(i||r||n){let t={};r&&(t.encoding=r),i&&(t.commitment=i),n&&(t=Object.assign(t,n)),e.push(t)}return e}_buildArgsAtLeastConfirmed(e,t,r,n){const i=t||this._commitment;if(i&&!["confirmed","finalized"].includes(i))throw new Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`");return this._buildArgs(e,t,r,n)}_wsOnSignatureNotification(e){const{result:t,subscription:r}=ot(e,Ri);"receivedSignature"!==t.value&&this._subscriptionsAutoDisposedByRpc.add(r),this._handleServerNotification(r,"receivedSignature"===t.value?[{type:"received"},t.context]:[{type:"status",result:t.value},t.context])}onSignature(e,t,r){const n=this._buildArgs([e],r||this._commitment||"finalized"),i=this._makeSubscription({callback:(e,r)=>{if("status"===e.type){t(e.result,r);try{this.removeSignatureListener(i)}catch(e){}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},n);return i}onSignatureWithOptions(e,t,r){const{commitment:n,...i}={...r,commitment:r&&r.commitment||this._commitment||"finalized"},o=this._buildArgs([e],n,void 0,i),a=this._makeSubscription({callback:(e,r)=>{t(e,r);try{this.removeSignatureListener(a)}catch(e){}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},o);return a}async removeSignatureListener(e){await this._unsubscribeClientSubscription(e,"signature result")}_wsOnRootNotification(e){const{result:t,subscription:r}=ot(e,Ni);this._handleServerNotification(r,[t])}onRootChange(e){return this._makeSubscription({callback:e,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}async removeRootChangeListener(e){await this._unsubscribeClientSubscription(e,"root change")}}class yo{constructor(e){this._keypair=void 0,this._keypair=null!=e?e:Dr()}static generate(){return new yo(Dr())}static fromSecretKey(e,t){if(64!==e.byteLength)throw new Error("bad secret key size");const r=e.slice(32,64);if(!t||!t.skipValidation){const t=e.slice(0,32),n=Fr(t);for(let e=0;e<32;e++)if(r[e]!==n[e])throw new Error("provided secretKey is invalid")}return new yo({publicKey:r,secretKey:e})}static fromSeed(e){const t=Fr(e),r=new Uint8Array(64);return r.set(e),r.set(t,32),new yo({publicKey:t,secretKey:r})}get publicKey(){return new Gr(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}Object.freeze({CreateLookupTable:{index:0,layout:Je.n_([Je.Jq("instruction"),xn("recentSlot"),Je.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:Je.n_([Je.Jq("instruction")])},ExtendLookupTable:{index:2,layout:Je.n_([Je.Jq("instruction"),xn(),Je.A9(Qr(),Je.cv(Je.Jq(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:Je.n_([Je.Jq("instruction")])},CloseLookupTable:{index:4,layout:Je.n_([Je.Jq("instruction")])}});new Gr("AddressLookupTab1e1111111111111111111111111");Object.freeze({RequestUnits:{index:0,layout:Je.n_([Je.u8("instruction"),Je.Jq("units"),Je.Jq("additionalFee")])},RequestHeapFrame:{index:1,layout:Je.n_([Je.u8("instruction"),Je.Jq("bytes")])},SetComputeUnitLimit:{index:2,layout:Je.n_([Je.u8("instruction"),Je.Jq("units")])},SetComputeUnitPrice:{index:3,layout:Je.n_([Je.u8("instruction"),xn("microLamports")])}});new Gr("ComputeBudget111111111111111111111111111111");const bo=Je.n_([Je.u8("numSignatures"),Je.u8("padding"),Je.KB("signatureOffset"),Je.KB("signatureInstructionIndex"),Je.KB("publicKeyOffset"),Je.KB("publicKeyInstructionIndex"),Je.KB("messageDataOffset"),Je.KB("messageDataSize"),Je.KB("messageInstructionIndex")]);class vo{constructor(){}static createInstructionWithPublicKey(e){const{publicKey:t,message:r,signature:i,instructionIndex:o}=e;on(32===t.length,`Public Key must be 32 bytes but received ${t.length} bytes`),on(64===i.length,`Signature must be 64 bytes but received ${i.length} bytes`);const a=bo.span,s=a+t.length,c=s+i.length,u=n.lW.alloc(c+r.length),l=null==o?65535:o;return bo.encode({numSignatures:1,padding:0,signatureOffset:s,signatureInstructionIndex:l,publicKeyOffset:a,publicKeyInstructionIndex:l,messageDataOffset:c,messageDataSize:r.length,messageInstructionIndex:l},u),u.fill(t,a),u.fill(i,s),u.fill(r,c),new fn({keys:[],programId:vo.programId,data:u})}static createInstructionWithPrivateKey(e){const{privateKey:t,message:r,instructionIndex:n}=e;on(64===t.length,`Private key must be 64 bytes but received ${t.length} bytes`);try{const e=yo.fromSecretKey(t),i=e.publicKey.toBytes(),o=Zr(r,e.secretKey);return this.createInstructionWithPublicKey({publicKey:i,message:r,signature:o,instructionIndex:n})}catch(e){throw new Error(`Error creating instruction; ${e}`)}}}vo.programId=new Gr("Ed25519SigVerify111111111111111111111111111"),Ur.hmacSha256Sync=(e,...t)=>{const r=qt.create(Ge,e);return t.forEach((e=>r.update(e))),r.digest()};const wo=(e,t)=>function(e,t,r={}){const{seed:n,m:i,d:o}=function(e,t,r){if(null==e)throw new Error(`sign: expected valid message hash, not "${e}"`);const n=br(e),i=Tr(t),o=[Nr(i),Rr(n)];if(null!=r){!0===r&&(r=Ur.randomBytes(32));const e=br(r);if(32!==e.length)throw new Error("sign: Expected 32 bytes of extra data");o.push(e)}return{seed:cr(...o),m:Mr(n),d:i}}(e,t,r.extraEntropy);let a;const s=new Pr;for(s.reseedSync(n);!(a=Br(s.generateSync(),i,o));)s.reseedSync();return function(e,t){let{sig:r,recovery:n}=e;const{canonical:i,der:o,recovered:a}=Object.assign({canonical:!0,der:!0},t);i&&r.hasHighS()&&(r=r.normalizeS(),n^=1);const s=o?r.toDERRawBytes():r.toCompactRawBytes();return a?[s,n]:s}(a,r)}(e,t,{der:!1,recovered:!0});Ur.isValidPrivateKey;const Ao=Je.n_([Je.u8("numSignatures"),Je.KB("signatureOffset"),Je.u8("signatureInstructionIndex"),Je.KB("ethAddressOffset"),Je.u8("ethAddressInstructionIndex"),Je.KB("messageDataOffset"),Je.KB("messageDataSize"),Je.u8("messageInstructionIndex"),Je.Ik(20,"ethAddress"),Je.Ik(64,"signature"),Je.u8("recoveryId")]);class _o{constructor(){}static publicKeyToEthAddress(e){on(64===e.length,`Public key must be 64 bytes but received ${e.length} bytes`);try{return n.lW.from(zt(qr(e))).slice(-20)}catch(e){throw new Error(`Error constructing Ethereum address: ${e}`)}}static createInstructionWithPublicKey(e){const{publicKey:t,message:r,signature:n,recoveryId:i,instructionIndex:o}=e;return _o.createInstructionWithEthAddress({ethAddress:_o.publicKeyToEthAddress(t),message:r,signature:n,recoveryId:i,instructionIndex:o})}static createInstructionWithEthAddress(e){const{ethAddress:t,message:r,signature:i,recoveryId:o,instructionIndex:a=0}=e;let s;s="string"==typeof t?t.startsWith("0x")?n.lW.from(t.substr(2),"hex"):n.lW.from(t,"hex"):t,on(20===s.length,`Address must be 20 bytes but received ${s.length} bytes`);const c=12+s.length,u=c+i.length+1,l=n.lW.alloc(Ao.span+r.length);return Ao.encode({numSignatures:1,signatureOffset:c,signatureInstructionIndex:a,ethAddressOffset:12,ethAddressInstructionIndex:a,messageDataOffset:u,messageDataSize:r.length,messageInstructionIndex:a,signature:qr(i),ethAddress:qr(s),recoveryId:o},l),l.fill(qr(r),Ao.span),new fn({keys:[],programId:_o.programId,data:l})}static createInstructionWithPrivateKey(e){const{privateKey:t,message:r,instructionIndex:i}=e;on(32===t.length,`Private key must be 32 bytes but received ${t.length} bytes`);try{const e=qr(t),o=function(e,t=!1){return ir.fromPrivateKey(e).toRawBytes(t)}(e,!1).slice(1),a=n.lW.from(zt(qr(r))),[s,c]=wo(a,e);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:s,recoveryId:c,instructionIndex:i})}catch(e){throw new Error(`Error creating instruction; ${e}`)}}}_o.programId=new Gr("KeccakSecp256k11111111111111111111111111111");const Eo=new Gr("StakeConfig11111111111111111111111111111111");class xo{constructor(e,t,r){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=t,this.custodian=r}}xo.default=new xo(0,0,Gr.default);const ko=Object.freeze({Initialize:{index:0,layout:Je.n_([Je.Jq("instruction"),((e="authorized")=>Je.n_([Qr("staker"),Qr("withdrawer")],e))(),((e="lockup")=>Je.n_([Je.gM("unixTimestamp"),Je.gM("epoch"),Qr("custodian")],e))()])},Authorize:{index:1,layout:Je.n_([Je.Jq("instruction"),Qr("newAuthorized"),Je.Jq("stakeAuthorizationType")])},Delegate:{index:2,layout:Je.n_([Je.Jq("instruction")])},Split:{index:3,layout:Je.n_([Je.Jq("instruction"),Je.gM("lamports")])},Withdraw:{index:4,layout:Je.n_([Je.Jq("instruction"),Je.gM("lamports")])},Deactivate:{index:5,layout:Je.n_([Je.Jq("instruction")])},Merge:{index:7,layout:Je.n_([Je.Jq("instruction")])},AuthorizeWithSeed:{index:8,layout:Je.n_([Je.Jq("instruction"),Qr("newAuthorized"),Je.Jq("stakeAuthorizationType"),en("authoritySeed"),Qr("authorityOwner")])}});Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class So{constructor(){}static initialize(e){const{stakePubkey:t,authorized:r,lockup:n}=e,i=n||xo.default,o=vn(ko.Initialize,{authorized:{staker:qr(r.staker.toBuffer()),withdrawer:qr(r.withdrawer.toBuffer())},lockup:{unixTimestamp:i.unixTimestamp,epoch:i.epoch,custodian:qr(i.custodian.toBuffer())}}),a={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:gn,isSigner:!1,isWritable:!1}],programId:this.programId,data:o};return new fn(a)}static createAccountWithSeed(e){const t=new dn;t.add(Sn.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:this.space,programId:this.programId}));const{stakePubkey:r,authorized:n,lockup:i}=e;return t.add(this.initialize({stakePubkey:r,authorized:n,lockup:i}))}static createAccount(e){const t=new dn;t.add(Sn.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,lamports:e.lamports,space:this.space,programId:this.programId}));const{stakePubkey:r,authorized:n,lockup:i}=e;return t.add(this.initialize({stakePubkey:r,authorized:n,lockup:i}))}static delegate(e){const{stakePubkey:t,authorizedPubkey:r,votePubkey:n}=e,i=vn(ko.Delegate);return(new dn).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:hn,isSigner:!1,isWritable:!1},{pubkey:mn,isSigner:!1,isWritable:!1},{pubkey:Eo,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static authorize(e){const{stakePubkey:t,authorizedPubkey:r,newAuthorizedPubkey:n,stakeAuthorizationType:i,custodianPubkey:o}=e,a=vn(ko.Authorize,{newAuthorized:qr(n.toBuffer()),stakeAuthorizationType:i.index}),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:hn,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&s.push({pubkey:o,isSigner:!1,isWritable:!1}),(new dn).add({keys:s,programId:this.programId,data:a})}static authorizeWithSeed(e){const{stakePubkey:t,authorityBase:r,authoritySeed:n,authorityOwner:i,newAuthorizedPubkey:o,stakeAuthorizationType:a,custodianPubkey:s}=e,c=vn(ko.AuthorizeWithSeed,{newAuthorized:qr(o.toBuffer()),stakeAuthorizationType:a.index,authoritySeed:n,authorityOwner:qr(i.toBuffer())}),u=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:hn,isSigner:!1,isWritable:!1}];return s&&u.push({pubkey:s,isSigner:!1,isWritable:!1}),(new dn).add({keys:u,programId:this.programId,data:c})}static splitInstruction(e){const{stakePubkey:t,authorizedPubkey:r,splitStakePubkey:n,lamports:i}=e,o=vn(ko.Split,{lamports:i});return new fn({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static split(e){const t=new dn;return t.add(Sn.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:0,space:this.space,programId:this.programId})),t.add(this.splitInstruction(e))}static splitWithSeed(e){const{stakePubkey:t,authorizedPubkey:r,splitStakePubkey:n,basePubkey:i,seed:o,lamports:a}=e,s=new dn;return s.add(Sn.allocate({accountPubkey:n,basePubkey:i,seed:o,space:this.space,programId:this.programId})),s.add(this.splitInstruction({stakePubkey:t,authorizedPubkey:r,splitStakePubkey:n,lamports:a}))}static merge(e){const{stakePubkey:t,sourceStakePubKey:r,authorizedPubkey:n}=e,i=vn(ko.Merge);return(new dn).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:hn,isSigner:!1,isWritable:!1},{pubkey:mn,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static withdraw(e){const{stakePubkey:t,authorizedPubkey:r,toPubkey:n,lamports:i,custodianPubkey:o}=e,a=vn(ko.Withdraw,{lamports:i}),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:hn,isSigner:!1,isWritable:!1},{pubkey:mn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&s.push({pubkey:o,isSigner:!1,isWritable:!1}),(new dn).add({keys:s,programId:this.programId,data:a})}static deactivate(e){const{stakePubkey:t,authorizedPubkey:r}=e,n=vn(ko.Deactivate);return(new dn).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:hn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:n})}}So.programId=new Gr("Stake11111111111111111111111111111111111111"),So.space=200;const Co=Object.freeze({InitializeAccount:{index:0,layout:Je.n_([Je.Jq("instruction"),((e="voteInit")=>Je.n_([Qr("nodePubkey"),Qr("authorizedVoter"),Qr("authorizedWithdrawer"),Je.u8("commission")],e))()])},Authorize:{index:1,layout:Je.n_([Je.Jq("instruction"),Qr("newAuthorized"),Je.Jq("voteAuthorizationType")])},Withdraw:{index:3,layout:Je.n_([Je.Jq("instruction"),Je.gM("lamports")])},AuthorizeWithSeed:{index:10,layout:Je.n_([Je.Jq("instruction"),((e="voteAuthorizeWithSeedArgs")=>Je.n_([Je.Jq("voteAuthorizationType"),Qr("currentAuthorityDerivedKeyOwnerPubkey"),en("currentAuthorityDerivedKeySeed"),Qr("newAuthorized")],e))()])}});Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class Po{constructor(){}static initializeAccount(e){const{votePubkey:t,nodePubkey:r,voteInit:n}=e,i=vn(Co.InitializeAccount,{voteInit:{nodePubkey:qr(n.nodePubkey.toBuffer()),authorizedVoter:qr(n.authorizedVoter.toBuffer()),authorizedWithdrawer:qr(n.authorizedWithdrawer.toBuffer()),commission:n.commission}}),o={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:gn,isSigner:!1,isWritable:!1},{pubkey:hn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i};return new fn(o)}static createAccount(e){const t=new dn;return t.add(Sn.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.votePubkey,lamports:e.lamports,space:this.space,programId:this.programId})),t.add(this.initializeAccount({votePubkey:e.votePubkey,nodePubkey:e.voteInit.nodePubkey,voteInit:e.voteInit}))}static authorize(e){const{votePubkey:t,authorizedPubkey:r,newAuthorizedPubkey:n,voteAuthorizationType:i}=e,o=vn(Co.Authorize,{newAuthorized:qr(n.toBuffer()),voteAuthorizationType:i.index}),a=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:hn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return(new dn).add({keys:a,programId:this.programId,data:o})}static authorizeWithSeed(e){const{currentAuthorityDerivedKeyBasePubkey:t,currentAuthorityDerivedKeyOwnerPubkey:r,currentAuthorityDerivedKeySeed:n,newAuthorizedPubkey:i,voteAuthorizationType:o,votePubkey:a}=e,s=vn(Co.AuthorizeWithSeed,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:qr(r.toBuffer()),currentAuthorityDerivedKeySeed:n,newAuthorized:qr(i.toBuffer()),voteAuthorizationType:o.index}}),c=[{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:hn,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!0,isWritable:!1}];return(new dn).add({keys:c,programId:this.programId,data:s})}static withdraw(e){const{votePubkey:t,authorizedWithdrawerPubkey:r,lamports:n,toPubkey:i}=e,o=vn(Co.Withdraw,{lamports:n}),a=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return(new dn).add({keys:a,programId:this.programId,data:o})}static safeWithdraw(e,t,r){if(e.lamports>t-r)throw new Error("Withdraw will leave vote account with insuffcient funds.");return Po.withdraw(e)}}Po.programId=new Gr("Vote111111111111111111111111111111111111111"),Po.space=3731,new Gr("Va1idator1nfo111111111111111111111111111111"),vt({name:yt(),website:gt(yt()),details:gt(yt()),keybaseUsername:gt(yt())}),new Gr("Vote111111111111111111111111111111111111111"),Je.n_([Qr("nodePubkey"),Qr("authorizedWithdrawer"),Je.u8("commission"),Je._O(),Je.A9(Je.n_([Je._O("slot"),Je.Jq("confirmationCount")]),Je.cv(Je.Jq(),-8),"votes"),Je.u8("rootSlotValid"),Je._O("rootSlot"),Je._O(),Je.A9(Je.n_([Je._O("epoch"),Qr("authorizedVoter")]),Je.cv(Je.Jq(),-8),"authorizedVoters"),Je.n_([Je.A9(Je.n_([Qr("authorizedPubkey"),Je._O("epochOfLastAuthorizedSwitch"),Je._O("targetEpoch")]),32,"buf"),Je._O("idx"),Je.u8("isEmpty")],"priorVoters"),Je._O(),Je.A9(Je.n_([Je._O("epoch"),Je._O("credits"),Je._O("prevCredits")]),Je.cv(Je.Jq(),-8),"epochCredits"),Je.n_([Je._O("slot"),Je._O("timestamp")],"lastTimestamp")])},12833:(e,t,r)=>{var n=r(18166);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},94796:(e,t,r)=>{"use strict";const n=r(95766),i=r(62333),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=c,t.h2=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if($(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if($(e,ArrayBuffer)||e&&$(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&($(e,SharedArrayBuffer)||e&&$(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),s(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||$(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(i)return n?-1:K(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(u(e,o)===u(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+c>s&&(r=s-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(u(e,o+n)!==u(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function A(e,t,r,n){return G(K(t,e.length-r),e,r,n)}function _(e,t,r,n){return G(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return G(V(t),e,r,n)}function x(e,t,r,n){return G(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,c;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=C));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},c.allocUnsafe=function(e){return f(e)},c.allocUnsafeSlow=function(e){return f(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if($(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),$(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if($(t,Uint8Array))i+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):m.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if($(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),u=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==l[e]){o=u[e],a=l[e];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function P(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function O(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function I(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Y[e[n]];return i}function B(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function T(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i){Z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function N(e,t,r,n,i){Z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||T(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=c.isBuffer(e)?e:c.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const D={};function F(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function z(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Z(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||q(t,e.length-(r+1))}(n,i,o)}function H(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function K(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function V(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},8759:(e,t,r)=>{"use strict";r.d(t,{GA:()=>k,Nb:()=>E,Xj:()=>_,l:()=>P,qY:()=>b,v$:()=>R,vU:()=>x,xG:()=>p,yh:()=>N,zK:()=>S});var n=r(56666),i=r(17391),o=r(58094),a=r(23349),s=r.n(a),c=(r(72558),r(47144)),u=r(79640),l=r.n(u),f=(r(23460),r(77160),r(48834).Buffer);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}class p extends i.Ue{constructor(e){let{config:t={},state:r={}}=e;super(),(0,n.Z)(this,"defaultConfig",{}),(0,n.Z)(this,"defaultState",{}),(0,n.Z)(this,"disabled",!1),(0,n.Z)(this,"name","BaseController"),(0,n.Z)(this,"initialConfig",void 0),(0,n.Z)(this,"initialState",void 0),(0,n.Z)(this,"internalConfig",this.defaultConfig),(0,n.Z)(this,"internalState",this.defaultState),this.initialState=r,this.initialConfig=t}get config(){return this.internalConfig}get state(){return this.internalState}configure(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(arguments.length>2&&void 0!==arguments[2]&&!arguments[2])for(const t in e)void 0!==this.internalConfig[t]&&(this.internalConfig[t]=e[t],this[t]=e[t]);else{this.internalConfig=t?e:Object.assign(this.internalConfig,e);for(const e in this.internalConfig)void 0!==this.internalConfig[e]&&(this[e]=this.internalConfig[e])}}update(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.internalState=h(t?{}:h({},this.internalState),e),this.emit("store",this.internalState)}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}}const g=()=>!0,m=["newListener","removeListener"],y=e=>!m.includes(e);function b(e,t){let r=(t||{}).eventFilter||g;if("string"==typeof r&&"skipInternal"===r&&(r=y),"function"!=typeof r)throw new Error("createEventEmitterProxy - Invalid eventFilter");let n=e,i=e=>{const t=n;n=e,t.eventNames().filter(r).forEach((r=>{(function(e,t){return e.rawListeners(t)})(t,r).forEach((t=>e.on(r,t)))})),t.removeAllListeners()};return new Proxy({},{get:(e,t)=>"setTarget"===t?i:n[t],set:(e,t,r)=>"setTarget"===t?(i=r,!0):(n[t]=r,!0)})}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const A=s()();function _(e){const t=new i.Ue;return t.sendAsync=async t=>{const r=await e.handle(t);if(r.error){var n,i;const e=(0,o.Xy)(r.error,{fallbackError:{message:(null===(n=r.error)||void 0===n?void 0:n.message)||r.error.toString(),code:(null===(i=r.error)||void 0===i?void 0:i.code)||-32603}});throw o.Sy.rpc.internal(e)}return r.result},t.send=(t,r)=>{if("function"!=typeof r)throw new Error('Must provide callback to "send" method.');e.handle(t,r)},e.on&&e.on("notification",(e=>{t.emit("data",null,e)})),t.request=async e=>{const r=w(w({},e),{},{id:A(),jsonrpc:"2.0"});return await t.sendAsync(r)},t}const E={IFRAME_STATUS:"iframe_status",CREATE_WINDOW:"create_window",CLOSE_WINDOW:"close_window",USER_LOGGED_IN:"user_logged_in",USER_LOGGED_OUT:"user_logged_out"},x={LOGOUT:"logout",WALLET_INSTANCE_ID:"wallet_instance_id",USER_INFO:"user_info",SET_PROVIDER:"set_provider",TOPUP:"topup",IFRAME_STATUS:"iframe_status",OPENED_WINDOW:"opened_window",CLOSED_WINDOW:"closed_window",GET_PROVIDER_STATE:"get_provider_state",LOGIN_WITH_PRIVATE_KEY:"login_with_private_key"},k={GET_PROVIDER_STATE:"wallet_get_provider_state"},S={ACCOUNTS_CHANGED:"wallet_accounts_changed",CHAIN_CHANGED:"wallet_chain_changed",UNLOCK_STATE_CHANGED:"wallet_unlock_state_changed"};function C(e,t){if(""!==e&&!/^[a-f0-9]+$/iu.test(e))throw new Error("Expected an unprefixed hex string. Received: ".concat(e));if(t<0)throw new Error("Expected a non-negative integer target length. Received: ".concat(t));return String.prototype.padStart.call(e,t,"0")}const P=(e,t)=>{const r=f.from(e,"hex"),n=(0,c.stripHexPrefix)(t),i=(0,c.ecsign)(f.from(n,"hex"),r);return function(e,t,r){const n=(0,c.fromSigned)(t),i=(0,c.fromSigned)(r),o=(0,c.bufferToInt)(e),a=C((0,c.toUnsigned)(n).toString("hex"),64),s=C((0,c.toUnsigned)(i).toString("hex"),64),u=(0,c.stripHexPrefix)(function(e){const t=e.toString(16);return"0x".concat(t)}(o));return(0,c.addHexPrefix)(a.concat(s,u))}((0,c.intToBuffer)(i.v),i.r,i.s)};class O extends Error{}const I=["Gateway timeout","ETIMEDOUT","failed to parse response body","Failed to fetch"];function B(e){switch(e.status){case 405:throw o.Sy.rpc.methodNotFound();case 418:throw o.Sy.rpc.internal({message:"Request is being rate limited."});case 503:case 504:throw o.Sy.rpc.internal({message:"Gateway timeout. The request took too long to process.This can happen when querying over too wide a block range."})}}function T(e){return new Promise((t=>setTimeout(t,e)))}function M(e,t){if(200!==e.status)throw o.Sy.rpc.internal({message:"Non-200 status code: '".concat(e.status,"'"),data:t});if(t.error)throw o.Sy.rpc.internal({data:t.error});return t.result}function R(e){let{rpcTarget:t,originHttpHeaderKey:r}=e;return(0,i.Pk)((async(e,n,i)=>{const{fetchUrl:o,fetchParams:a}=function(e){let{req:t,rpcTarget:r,originHttpHeaderKey:n}=e;const i=new URL(r),o={id:t.id,jsonrpc:t.jsonrpc,method:t.method,params:t.params},a=t.origin,s={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)};return n&&a&&(s.headers[n]=a),{fetchUrl:i.href,fetchParams:s}}({req:e,rpcTarget:t,originHttpHeaderKey:r});for(let e=0;e<5;e++){try{const e=await fetch(o,a);B(e);const t=await e.json(),r=M(e,t);return void(n.result=r)}catch(e){const t=e.toString();if(!I.some((e=>t.includes(e))))throw e}await T(1e3)}}))}function N(e){return function(t,r,n){n((n=>{r.error&&l().warn("Error in RPC response:\n",r),t.isTorusInternal||(l().info("RPC (".concat(e.origin,"):"),t,"->",r),n())}))}}var j;!function(e){e.approved="approved",e.cancelled="cancelled",e.confirmed="confirmed",e.failed="failed",e.finalized="finalized",e.processed="processed",e.rejected="rejected",e.signed="signed",e.submitted="submitted",e.unapproved="unapproved",e.dropped="dropped",e.expired="expired"}(j||(j={}))},11249:(e,t,r)=>{"use strict";var n=r(48834).Buffer,i=new(0,r(87554).ec)("secp256k1"),o=r.g.crypto||r.g.msCrypto||{},a=o.subtle||o.webkitSubtle,s=r(5634);const c=n.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),u=n.alloc(32,0);function l(e,t){if(!e)throw new Error(t||"Assertion failed")}function f(e){return t=e,!(!n.isBuffer(t)||32!==t.length)&&e.compare(u)>0&&e.compare(c)<0;var t}function d(e){var t=new Uint8Array(e);return void 0===o.getRandomValues?n.from(s.randomBytes(e)):(o.getRandomValues(t),n.from(t))}function h(e){return new Promise((function(t){var r=s.createHash("sha512").update(e).digest();t(new Uint8Array(r))}))}function p(e){return function(t,r,i){return new Promise((function(o){if(a)return a.importKey("raw",r,{name:"AES-CBC"},!1,[e]).then((function(r){var n={name:"AES-CBC",iv:t};return a[e](n,r,i)})).then((function(e){o(n.from(new Uint8Array(e)))}));if("encrypt"===e){var c=s.createCipheriv("aes-256-cbc",r,t);let e=c.update(i),a=c.final();o(n.concat([e,a]))}else if("decrypt"===e){var u=s.createDecipheriv("aes-256-cbc",r,t);let e=u.update(i),a=u.final();o(n.concat([e,a]))}}))}}var g=p("encrypt"),m=p("decrypt"),y=t.rc=function(e){return l(32===e.length,"Bad private key"),l(f(e),"Bad private key"),n.from(i.keyFromPrivate(e).getPublic("arr"))};t.Xx=function(e,t){return new Promise((function(r){l(32===e.length,"Bad private key"),l(f(e),"Bad private key"),l(t.length>0,"Message should not be empty"),l(t.length<=32,"Message is too long"),r(n.from(i.sign(t,e,{canonical:!0}).toDER()))}))};var b=function(e,t){return new Promise((function(r){l(n.isBuffer(e),"Bad private key"),l(n.isBuffer(t),"Bad public key"),l(32===e.length,"Bad private key"),l(f(e),"Bad private key"),l(65===t.length||33===t.length,"Bad public key"),65===t.length&&l(4===t[0],"Bad public key"),33===t.length&&l(2===t[0]||3===t[0],"Bad public key");var o=i.keyFromPrivate(e),a=i.keyFromPublic(t),s=o.derive(a.getPublic());r(n.from(s.toArray()))}))};t.HI=function(e,t,r){var i,o,a,c;return r=r||{},new Promise((function(t){for(var n=r.ephemPrivateKey||d(32);!f(n);)n=r.ephemPrivateKey||d(32);o=y(n),t(b(n,e))})).then((function(e){return h(e)})).then((function(e){i=r.iv||d(16);var n=e.slice(0,32);return c=e.slice(32),g(i,n,t)})).then((function(e){a=e;var t=n.concat([i,o,a]);return function(e,t){return new Promise((function(r){var i=s.createHmac("sha256",n.from(e));i.update(t),r(i.digest())}))}(c,t)})).then((function(e){return{iv:i,ephemPublicKey:o,ciphertext:a,mac:e}}))},t.pe=function(e,t){var r;return b(e,t.ephemPublicKey).then((function(e){return h(e)})).then((function(e){r=e.slice(0,32);var i,o,a,c=e.slice(32),u=n.concat([t.iv,t.ephemPublicKey,t.ciphertext]);return i=c,o=u,a=t.mac,new Promise((function(e){var t=s.createHmac("sha256",n.from(i));t.update(o),e(function(e,t){if(e.length!==t.length)return!1;for(var r=0,n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}(t.digest(),a))}))})).then((function(e){return l(e,"Bad MAC"),m(t.iv,r,t.ciphertext)})).then((function(e){return n.from(new Uint8Array(e))}))}},23460:(e,t,r)=>{"use strict";r.d(t,{U2:()=>m,ut:()=>f,v_:()=>y});var n=r(56666),i=r(51344),o=r.n(i),a=r(79640);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const u=r.n(a)().getLogger("http-helpers");u.setLevel(a.levels.INFO);let l="torus-default";function f(e){l=e}async function d(e,t){let r=null;try{r=new URL(e)}catch(e){}return fetch(e,t)}function h(){const e={};return l&&(e["x-api-key"]=l),e}function p(e){u.info("Response: ".concat(e.status," ").concat(e.statusText)),u.info("Url: ".concat(e.url))}const g=(e,t)=>{const r=new Promise(((t,r)=>{const n=setTimeout((()=>{clearTimeout(n),r(new Error("Timed out in ".concat(e,"ms")))}),e)}));return Promise.race([t,r])},m=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n={mode:"cors",headers:{}};r.useAPIKey&&(n.headers=c(c({},n.headers),h()));const i=o()(n,t,{method:"GET"}),a=await d(e,i);if(a.ok)return a.json();throw p(a),a},y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i={mode:"cors",headers:{"Content-Type":"application/json; charset=utf-8"}};n.useAPIKey&&(i.headers=c(c({},i.headers),h()));const a=o()(i,r,{method:"POST"});return n.isUrlEncodedData?(a.body=t,"application/json; charset=utf-8"===a.headers["Content-Type"]&&delete a.headers["Content-Type"]):a.body=JSON.stringify(t),g(n.timeout||6e4,d(e,a).then((e=>{if(e.ok)return e.json();throw p(e),e})))}},99234:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getED25519Key:()=>s});var n=r(45429),i=r.n(n),o=r(48834).Buffer;const a=i().lowlevel;function s(e){let t;t="string"==typeof e?o.from(e,"hex"):e;const r=new Uint8Array(64),n=[a.gf(),a.gf(),a.gf(),a.gf()],i=new Uint8Array([...new Uint8Array(t),...new Uint8Array(32)]),s=new Uint8Array(32);a.crypto_hash(r,i,32),r[0]&=248,r[31]&=127,r[31]|=64,a.scalarbase(n,r),a.pack(s,n);for(let e=0;e<32;e+=1)i[e+32]=s[e];return{sk:o.from(i),pk:o.from(s)}}},17391:(e,t,r)=>{"use strict";r.d(t,{AP:()=>E,O4:()=>R,Pk:()=>S,Rq:()=>k,UZ:()=>O,Ue:()=>w,V2:()=>N,XR:()=>b,eI:()=>P,nE:()=>_,v0:()=>x,zc:()=>j});var n=r(56666),i=r(67525),o=r(17990),a=r(22699),s=r(77847),c=r.n(s),u=r(58094),l=r(18797),f=r.n(l),d=r(29928),h=r.n(d),p=r(3171),g=r.n(p);function m(){}const y="ACK";class b extends i.Duplex{constructor(e){let{name:t,target:r,targetWindow:i=window,targetOrigin:o="*"}=e;if(super({objectMode:!0}),(0,n.Z)(this,"_init",void 0),(0,n.Z)(this,"_haveSyn",void 0),(0,n.Z)(this,"_name",void 0),(0,n.Z)(this,"_target",void 0),(0,n.Z)(this,"_targetWindow",void 0),(0,n.Z)(this,"_targetOrigin",void 0),(0,n.Z)(this,"_onMessage",void 0),(0,n.Z)(this,"_synIntervalId",void 0),!t||!r)throw new Error("Invalid input.");this._init=!1,this._haveSyn=!1,this._name=t,this._target=r,this._targetWindow=i,this._targetOrigin=o,this._onMessage=this.onMessage.bind(this),this._synIntervalId=null,window.addEventListener("message",this._onMessage,!1),this._handShake()}_break(){this.cork(),this._write("BRK",null,m),this._haveSyn=!1,this._init=!1}_handShake(){this._write("SYN",null,m),this.cork()}_onData(e){if(this._init)if("BRK"===e)this._break();else try{this.push(e)}catch(e){this.emit("error",e)}else"SYN"===e?(this._haveSyn=!0,this._write(y,null,m)):e===y&&(this._init=!0,this._haveSyn||this._write(y,null,m),this.uncork())}_postMessage(e){const t=this._targetOrigin;this._targetWindow.postMessage({target:this._target,data:e},t)}onMessage(e){const t=e.data;"*"!==this._targetOrigin&&e.origin!==this._targetOrigin||e.source!==this._targetWindow||"object"!=typeof t||t.target!==this._name||!t.data||this._onData(t.data)}_read(){}_write(e,t,r){this._postMessage(e),r()}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}function v(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class w extends a.EventEmitter{emit(e){let t="error"===e;const r=this._events;if(void 0!==r)t=t&&void 0===r.error;else if(!t)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];if(t){let e;if(i.length>0&&([e]=i),e instanceof Error)throw e;const t=new Error("Unhandled error.".concat(e?" (".concat(e.message,")"):""));throw t.context=e,t}const a=r[e];if(void 0===a)return!1;if("function"==typeof a)v(a,this,i);else{const e=a.length,t=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(a);for(let r=0;r<e;r+=1)v(t[r],this,i)}return!0}}class A extends Error{constructor(e){let{code:t,message:r,data:i}=e;if(!Number.isInteger(t))throw new Error("code must be an integer");if(!r||"string"!=typeof r)throw new Error("message must be string");super(r),(0,n.Z)(this,"code",void 0),(0,n.Z)(this,"data",void 0),this.code=t,void 0!==i&&(this.data=i)}toString(){return c()({code:this.code,message:this.message,data:this.data,stack:this.stack})}}const _=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(n,i)=>{n||i.error?t(n||i.error):!r||Array.isArray(i)?e(i):e(i.result)}};function E(){const e={},t=new w,r=new i.Duplex({objectMode:!0,read:function(){return!1},write:function(r,n,i){let o;try{r.id?function(t){const r=e[t.id];if(!r)throw new Error('StreamMiddleware - Unknown response id "'.concat(t.id,'"'));delete e[t.id],Object.assign(r.res,t),setTimeout(r.end)}(r):function(e){t.emit("notification",e)}(r)}catch(e){o=e}i(o)}});return{events:t,middleware:(t,n,i,o)=>{r.push(t),e[t.id]={req:t,res:n,next:i,end:o}},stream:r}}function x(e){return(t,r,n,i)=>{const o=e[t.method];return void 0===o?n():"function"==typeof o?o(t,r,n,i):(r.result=o,i())}}function k(){return(e,t,r,n)=>{const i=e.id,a=(0,o.kb)();e.id=a,t.id=a,r((r=>{e.id=i,t.id=i,r()}))}}function S(e){return async(t,r,n,i)=>{let o;const a=new Promise((e=>{o=e}));let s=null,c=!1;const u=async()=>{c=!0,n((e=>{s=e,o()})),await a};try{await e(t,r,u),c?(await a,s(null)):i(null)}catch(e){s?s(e):i(e)}}}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}class P extends w{constructor(){super(),(0,n.Z)(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(e,t,r){const n=[];let i=null,o=!1;for(const a of r)if([i,o]=await P._runMiddleware(e,t,a,n),o)break;return[i,o,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((i=>{const o=e=>{const r=e||t.error;r&&(t.error=(0,u.Xy)(r)),i([r,!0])},a=e=>{t.error?o(t.error):(e&&("function"!=typeof e&&o(new A({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),n.push(e)),i([null,!1]))};try{r(e,t,a,o)}catch(e){o(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new A({code:-32603,message:"Response has no error or result for request"});if(!r)throw new A({code:-32603,message:"Nothing ended request"})}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[i,o,a]=await P._runAllMiddleware(e,t,this._middleware);return o?(await P._runReturnHandlers(a),n(i)):r((async e=>{try{await P._runReturnHandlers(a)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,r)=>{t(r)}))}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const e=new A({code:-32603,message:"request must be plain object"});return t(e,{id:void 0,jsonrpc:"2.0",error:e})}if("string"!=typeof e.method){const r=new A({code:-32603,message:"method must be string"});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),i={id:r.id,jsonrpc:r.jsonrpc};let o=null;try{await this._processRequest(r,i)}catch(e){o=e}return o&&(delete i.result,i.error||(i.error=(0,u.Xy)(o))),t(o,i)}async _processRequest(e,t){const[r,n,i]=await P._runAllMiddleware(e,t,this._middleware);if(P._checkForCompletion(e,t,n),await P._runReturnHandlers(i),r)throw r}}function O(e){const t=new P;return e.forEach((e=>t.push(e))),t.asMiddleware()}class I extends i.Duplex{constructor(e){let{parent:t,name:r}=e;super({objectMode:!0}),(0,n.Z)(this,"_parent",void 0),(0,n.Z)(this,"_name",void 0),this._parent=t,this._name=r}_read(){}_write(e,t,r){this._parent.push({name:this._name,data:e}),r()}}function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?B(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const M=Symbol("IGNORE_SUBSTREAM");class R extends i.Duplex{constructor(){super(T(T({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{objectMode:!0})),(0,n.Z)(this,"_substreams",void 0),(0,n.Z)(this,"getStream",void 0),this._substreams={}}createStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error('ObjectMultiplex - Substream for name "'.concat(e,'" already exists'));const t=new I({parent:this,name:e});return this._substreams[e]=t,function(e,r){const n=h()((e=>t.destroy(e||void 0)));f()(e,{readable:!1},n),f()(e,{writable:!1},n)}(this),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error('ObjectMultiplex - Substream for name "'.concat(e,'" already exists'));this._substreams[e]=M}_read(){}_write(e,t,r){const{name:n,data:i}=e;if(!n)return window.console.warn('ObjectMultiplex - malformed chunk without name "'.concat(e,'"')),r();const o=this._substreams[n];return o?(o!==M&&o.push(i),r()):(window.console.warn('ObjectMultiplex - orphaned data for stream "'.concat(n,'"')),r())}}function N(e){const t=new R;return t.getStream=function(e){return this._substreams[e]?this._substreams[e]:this.createStream(e)},g()(e,t,e,(e=>{e&&window.console.error(e)})),t}class j extends b{_postMessage(e){let t=this._targetOrigin;if("object"==typeof e){const r=e;if("object"==typeof r.data){const e=r.data;if(Array.isArray(e.params)&&e.params.length>0){const r=e.params[0];r._origin&&(t=r._origin),r._origin=window.location.origin}}}this._targetWindow.postMessage({target:this._target,data:e},t)}}},17990:(e,t,r)=>{"use strict";r.d(t,{KO:()=>h,kb:()=>u,sX:()=>d,tH:()=>f,zc:()=>p});var n=r(95003),i=r.n(n),o=r(89487),a=r.n(o),s=r(77270),c=r.n(s);r(48834).Buffer;const u=()=>i()(32).toString("hex");class l extends URL{constructor(){super(...arguments),_defineProperty(this,"hashParams",new URLSearchParams)}toString(){return this.hash=this.hashParams.toString(),super.toString.call(this)}}const f=a();function d(e){return f.decode(e)}const h=c();function p(e){return f.encode(JSON.stringify(e))}},74187:(e,t,r)=>{"use strict";r.d(t,{$e:()=>y,Gv:()=>S,ZP:()=>D,dr:()=>A,hG:()=>E,x7:()=>_});var n=r(79640),i=r.n(n),o=r(56666),a=r(11249),s=r(23460),c=r(17391),u=r(17990),l=r(51344),f=r.n(l),d=r(3171),h=r.n(d),p=r(48834).Buffer;const g="openlogin-modal",m="openlogin_store",y={POPUP:"popup",REDIRECT:"redirect"},b="popup",v="redirect",w="jrpc",A={MAINNET:"mainnet",TESTNET:"testnet",CYAN:"cyan",DEVELOPMENT:"development",SK_TESTNET:"sk_testnet"},_={SECP256K1:"secp256k1",ED25519:"ed25519"},E={GOOGLE:"google",FACEBOOK:"facebook",REDDIT:"reddit",DISCORD:"discord",TWITCH:"twitch",APPLE:"apple",LINE:"line",GITHUB:"github",KAKAO:"kakao",LINKEDIN:"linkedin",TWITTER:"twitter",WEIBO:"weibo",WECHAT:"wechat",EMAIL_PASSWORDLESS:"email_passwordless",WEBAUTHN:"webauthn",JWT:"jwt"};i().setLevel("error");var x=i().getLogger("openlogin");async function k(){return new Promise((e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",(()=>{e()}))}))}function S(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t={},r=new URL(window.location.href);r.searchParams.forEach(((e,r)=>{"result"!==r&&(t[r]=e)}));const n=r.searchParams.get("result");if(n)try{const e=JSON.parse((0,u.sX)(n));Object.keys(e).forEach((r=>{t[r]=e[r]}))}catch(e){x.error(e)}const i=r.hash.substring(1),o=new URL("".concat(window.location.origin,"/?").concat(i));o.searchParams.forEach(((e,r)=>{"result"!==r&&(t[r]=e)}));const a=o.searchParams.get("result");if(a)try{const e=JSON.parse((0,u.sX)(a));Object.keys(e).forEach((r=>{t[r]=e[r]}))}catch(e){x.error(e)}if(e){const e=window.location.origin+window.location.pathname;window.history.replaceState(null,"",e)}return t}function C(e,t){return new Promise(((r,n)=>{if(!t)return void n(new Error("Unable to open window"));let i=!1;const o=setInterval((()=>{!i&&t.closed&&(clearInterval(o),n(new Error("user closed popup")))}),500),a=s=>{const{pid:c}=s.data;e===c&&(window.removeEventListener("message",a),i=!0,clearInterval(o),t.close(),s.data.data&&s.data.data.error?n(new Error(s.data.data.error)):r(s.data.data))};window.addEventListener("message",a)}))}function P(e){const{baseURL:t,query:r,hash:n}=e,i=new URL(t);if(r&&Object.keys(r).forEach((e=>{i.searchParams.append(e,r[e])})),n){const e=new URL(P({baseURL:t,query:n})).searchParams.toString();i.hash=e}return i.toString()}function O(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){return e&&(22===e.code||1014===e.code||"QuotaExceededErro r"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&r&&0!==n}}const I=O("sessionStorage"),B=O("localStorage");function T(){const e=void 0!==window.screenLeft?window.screenLeft:window.screenX,t=void 0!==window.screenTop?window.screenTop:window.screenY,r=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,n=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,i=Math.abs((r-1200)/2/1+e),o=Math.abs((n-700)/2/1+t);return"titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=".concat(700,",width=").concat(1200,",top=").concat(o,",left=").concat(i)}class M{constructor(e){(0,o.Z)(this,"modalUrl",void 0),(0,o.Z)(this,"iframeElem",void 0),(0,o.Z)(this,"initialized",!1),(0,o.Z)(this,"modalZIndex",99999),(0,o.Z)(this,"mux",void 0),(0,o.Z)(this,"verifierStream",void 0),this.modalUrl=e}async init(){await this.initIFrame(this.modalUrl),this.setupStream()}setupStream(){if(null===this.iframeElem)throw new Error("iframe is null");this.mux=(0,c.V2)(new c.zc({name:"modal_iframe_rpc",target:"modal_rpc",targetWindow:this.iframeElem.contentWindow,targetOrigin:new URL(this.modalUrl).origin})),this.verifierStream=this.mux.createStream("verifier")}async initIFrame(e){await k();const t=document.getElementById(g);return t&&(t.remove(),x.info("already initialized, removing previous modal iframe")),this.iframeElem=(e=>{const t=window.document.createElement("template"),r=e.trim();return t.innerHTML=r,t.content.firstChild})("<iframe\n id=".concat(g,'\n class="torusIframe"\n src="').concat(e,'"\n style="display: none; position: fixed; top: 0; right: 0; width: 100%;\n height: 100%; border: none; border-radius: 0; z-index: ').concat(this.modalZIndex.toString(),'"\n ></iframe>')),this._hideModal(),document.body.appendChild(this.iframeElem),new Promise((e=>{this.iframeElem.onload=()=>{this.initialized=!0,e()}}))}_showModal(){const e={display:"block",position:"fixed",width:"100%",height:"100%",top:"0px",right:"0px",left:"0px",bottom:"0px",border:"0"};e["z-index"]=this.modalZIndex,this.iframeElem.setAttribute("style",Object.entries(e).map((e=>{let[t,r]=e;return"".concat(t,":").concat(r)})).join(";"))}_hideModal(){const e={display:"none",position:"fixed",width:"100%",height:"100%",top:"0px",right:"0px",left:"0px",bottom:"0px",border:"0"};e["z-index"]=this.modalZIndex,this.iframeElem.setAttribute("style",Object.entries(e).map((e=>{let[t,r]=e;return"".concat(t,":").concat(r)})).join(";"))}async _prompt(e,t,r,n){this._showModal(),((e,t,r)=>{const n=i=>{r(i),e.removeListener(t,n)};e.on(t,n)})(this.verifierStream,"data",(e=>{this._hideModal(),n(e)})),this.verifierStream.write({name:"prompt",clientId:e,whiteLabel:t,loginConfig:r})}async cleanup(){await k();const e=document.getElementById(g);e&&(e.remove(),this.iframeElem=null),this.initialized=!1}}class R{constructor(){(0,o.Z)(this,"store",{})}getItem(e){return this.store[e]||null}setItem(e,t){this.store[e]=t}}class N{constructor(e,t){(0,o.Z)(this,"_storeKey",m),(0,o.Z)(this,"storage",void 0),this.storage=e,this._storeKey=t||m;try{e.getItem(t||m)||this.resetStore()}catch(e){}}static getInstance(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(!this.instance){let r=new R;"local"===t&&B&&(r=localStorage),"session"===t&&I&&(r=sessionStorage);const n=e?"".concat(m,"_").concat(e):m;this.instance=new this(r,n)}return this.instance}toJSON(){return this.storage.getItem(this._storeKey)}resetStore(){const e=this.getStore();return this.storage.setItem(this._storeKey,JSON.stringify({})),e}getStore(){return JSON.parse(this.storage.getItem(this._storeKey))}get(e){return JSON.parse(this.storage.getItem(this._storeKey))[e]}set(e,t){const r=JSON.parse(this.storage.getItem(this._storeKey));r[e]=t,this.storage.setItem(this._storeKey,JSON.stringify(r))}}(0,o.Z)(N,"instance",void 0);class j extends c.Ue{constructor(){super(...arguments),(0,o.Z)(this,"iframeElem",null),(0,o.Z)(this,"rpcStream",void 0),(0,o.Z)(this,"iframeUrl",void 0),(0,o.Z)(this,"rpcEngine",void 0),(0,o.Z)(this,"initialized",void 0),(0,o.Z)(this,"mux",void 0)}init(e){let{iframeElem:t,iframeUrl:r}=e;this.iframeElem=t,this.iframeUrl=r,this.setupStream(),this.initialized=!0}setupStream(){if(null===this.iframeElem)throw new Error("iframe is null");this.rpcStream=new c.zc({name:"embed_rpc",target:"iframe_rpc",targetWindow:this.iframeElem.contentWindow,targetOrigin:new URL(this.iframeUrl).origin}),this.mux=(0,c.V2)(this.rpcStream);const e=(0,c.AP)();h()(e.stream,this.mux.createStream("jrpc"),e.stream,(e=>{x.error("JRPC connection broken",e)}));const t=new c.eI;t.push((0,c.Rq)()),t.push(e.middleware),this.rpcEngine=t}cleanup(){this.iframeElem=null,this.initialized=!1}_rpcRequest(e,t){e.jsonrpc||(e.jsonrpc="2.0"),e.id||(e.id=(0,u.kb)()),this.rpcEngine.handle(e,t)}}function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}!function(e){try{if("undefined"==typeof document)return;const e=document.createElement("link");e.href="https://app.openlogin.com/sdk-modal",e.crossOrigin="anonymous",e.type="text/html",e.rel="prefetch",e.relList&&e.relList.supports&&e.relList.supports("prefetch")&&document.head.appendChild(e)}catch(e){x.error(e)}}();class D{constructor(e){var t,r,n,i,a,s,c,u,l,f,d;if((0,o.Z)(this,"provider",void 0),(0,o.Z)(this,"state",void 0),(0,o.Z)(this,"modal",void 0),this.provider=new Proxy(new j,{deleteProperty:()=>!0}),e._iframeUrl||(e.network===A.MAINNET?e._iframeUrl="https://app.openlogin.com":e.network===A.CYAN?e._iframeUrl="https://cyan.openlogin.com":e.network===A.TESTNET?e._iframeUrl="https://beta.openlogin.com":e.network===A.SK_TESTNET?e._iframeUrl="https://beta-sk.openlogin.com":e.network===A.DEVELOPMENT&&(e._iframeUrl="http://localhost:3000")),!e._iframeUrl)throw new Error("unspecified network and iframeUrl");this.modal=new M("".concat(e._iframeUrl,"/sdk-modal")),this.initState(U(U({},e),{},{no3PC:null!==(t=e.no3PC)&&void 0!==t&&t,_iframeUrl:e._iframeUrl,_startUrl:null!==(r=e._startUrl)&&void 0!==r?r:"".concat(e._iframeUrl,"/start"),_popupUrl:null!==(n=e._popupUrl)&&void 0!==n?n:"".concat(e._iframeUrl,"/popup-window"),redirectUrl:null!==(i=e.redirectUrl)&&void 0!==i?i:"".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname),uxMode:null!==(a=e.uxMode)&&void 0!==a?a:y.REDIRECT,replaceUrlOnRedirect:null===(s=e.replaceUrlOnRedirect)||void 0===s||s,originData:null!==(c=e.originData)&&void 0!==c?c:{[window.location.origin]:""},whiteLabel:null!==(u=e.whiteLabel)&&void 0!==u?u:{},loginConfig:null!==(l=e.loginConfig)&&void 0!==l?l:{},_storageServerUrl:null!==(f=e._storageServerUrl)&&void 0!==f?f:"https://broadcast-server.tor.us",storageKey:"session"===e.storageKey?"session":"local",_sessionNamespace:null!==(d=e._sessionNamespace)&&void 0!==d?d:""}))}get privKey(){return this.state.privKey?this.state.privKey.padStart(64,"0"):""}initState(e){this.state={uxMode:e.uxMode,network:e.network,store:N.getInstance(e._sessionNamespace,e.storageKey),iframeUrl:e._iframeUrl,startUrl:e._startUrl,popupUrl:e._popupUrl,clientId:e.clientId,redirectUrl:e.redirectUrl,replaceUrlOnRedirect:e.replaceUrlOnRedirect,originData:e.originData,loginConfig:e.loginConfig,support3PC:!e.no3PC,whiteLabel:e.whiteLabel,storageServerUrl:e._storageServerUrl,sessionNamespace:e._sessionNamespace}}async init(){this.state.network===A.TESTNET&&console.log("%c WARNING! You are on testnet. Please set network: 'mainnet' in production","color: #FF0000"),await Promise.all([this.modal.init(),this.updateOriginData()]),this.provider.init({iframeElem:this.modal.iframeElem,iframeUrl:this.state.iframeUrl});const e=S(this.state.replaceUrlOnRedirect);if(e.sessionId&&this.state.store.set("sessionId",e.sessionId),this._syncState(await this._getData()),this.state.support3PC){const e=await this._check3PCSupport();this.state.support3PC=!!e.support3PC}}async updateOriginData(){const e=JSON.parse(JSON.stringify(this.state.originData));Object.keys(e).forEach((t=>{""===e[t]&&delete e[t]}));const[t,r]=await Promise.all([this.getWhitelist(),this.getWhiteLabel()]);this._syncState({originData:U(U({},t),e),whiteLabel:U(U({},r),this.state.whiteLabel)})}async getWhitelist(){try{const{clientId:e}=this.state;if(!e)throw new Error("unspecified clientId");const t=new URL("https://api.developer.tor.us/whitelist");return t.searchParams.append("project_id",this.state.clientId),(await(0,s.U2)(t.href)).signed_urls}catch(e){return{}}}async getWhiteLabel(){try{const{clientId:e}=this.state;if(!e)throw new Error("unspecified clientId");const t=new URL("https://api.developer.tor.us/whitelabel");return t.searchParams.append("project_id",this.state.clientId),(await(0,s.U2)(t.href)).whiteLabel}catch(e){return{}}}async login(e){return null!=e&&e.loginProvider?this._selectedLogin(e):this._modal(e)}async _selectedLogin(e){const t={redirectUrl:this.state.redirectUrl},r=U(U({loginProvider:e.loginProvider},t),e),n=await this.request({method:"openlogin_login",allowedInteractions:[y.REDIRECT,y.POPUP],startUrl:this.state.startUrl,popupUrl:this.state.popupUrl,params:[r]});return this.state.privKey=n.privKey,n.store?this._syncState(n):this.state.privKey&&this.state.support3PC&&this._syncState(await this._getData()),{privKey:this.privKey}}async logout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};t.redirectUrl=this.state.redirectUrl,t._clientId=this.state.clientId,t.sessionId=this.state.store.get("sessionId"),e.clientId&&(t._clientId=e.clientId),void 0!==e.redirectUrl&&(t.redirectUrl=e.redirectUrl);const r=await this.request({method:"openlogin_logout",params:[t],startUrl:this.state.startUrl,popupUrl:this.state.popupUrl,allowedInteractions:[w]});return this.state.privKey="",r}async request(e){var t;const r=(0,u.kb)();let{params:n}=e;const i={};if(1!==n.length)throw new Error("request params array should have only one element");const{startUrl:o,popupUrl:s,method:c,allowedInteractions:l}=e;if(0===l.length)throw new Error("no allowed interactions");if(this.state.clientId&&(i._clientId=this.state.clientId),this.state.sessionNamespace&&(i._sessionNamespace=this.state.sessionNamespace),this.privKey){const e={clientId:i._clientId,timestamp:Date.now().toString()},t=await(0,a.Xx)(p.from(this.privKey,"hex"),p.from((0,u.KO)("keccak256").update(JSON.stringify(e)).digest("hex"),"hex"));i._user=(0,a.rc)(p.from(this.privKey,"hex")).toString("hex"),i._userSig=u.tH.encode(t),i._userData=e}if(i._originData=this.state.originData,i._whiteLabelData=this.state.whiteLabel,i._loginConfig=this.state.loginConfig,i._sessionId=this.state.store.get("sessionId"),!i._sessionId){const e=(0,u.kb)();i._sessionId=e,this.state.store.set("sessionId",e)}if(n=[U(U({},i),n[0])],l.includes(w))return this._jrpcRequest({method:c,params:n});if(n[0]._origin=new URL(null!==(t=n[0].redirectUrl)&&void 0!==t?t:this.state.redirectUrl).origin,this.state.support3PC&&(await this._setPIDData(r,n),n=[{}]),!o||!s)throw new Error("no url for redirect / popup flow");if(this.state.uxMode===y.REDIRECT){if(l.includes(v))return setTimeout((()=>{window.location.href=P({baseURL:o,hash:{b64Params:(0,u.zc)(n[0]),_pid:r,_method:c}})}),50),{};if(l.includes(b)){const e=new URL(P({baseURL:s,hash:{b64Params:(0,u.zc)(n[0]),_pid:r,_method:c}})),t=window.open(e.toString(),"_blank",T());return C(r,t)}}else{if(l.includes(b)){const e=new URL(P({baseURL:s,hash:{b64Params:(0,u.zc)(n[0]),_pid:r,_method:c}})),t=window.open(e.toString(),"_blank",T());return C(r,t)}if(l.includes(v))return setTimeout((()=>{window.location.href=P({baseURL:o,hash:{b64Params:(0,u.zc)(n[0]),_pid:r,_method:c}})}),50),null}throw new Error("no matching allowed interactions")}async _jrpcRequest(e){if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("invalid request args");const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw new Error("invalid request method");if(void 0===r||!Array.isArray(r))throw new Error("invalid request params");return 0===r.length&&r.push({}),new Promise(((e,n)=>{this.provider._rpcRequest({method:t,params:r},(0,c.nE)(e,n))}))}async _check3PCSupport(){return this._jrpcRequest({method:"openlogin_check_3PC_support",params:[{_originData:this.state.originData}]})}async _setPIDData(e,t){await this.request({allowedInteractions:[w],method:"openlogin_set_pid_data",params:[{pid:e,data:t[0]}]})}async _getData(){return this.request({allowedInteractions:[w],method:"openlogin_get_data",params:[{}]})}_syncState(e){if(e.store){if("object"!=typeof e.store)throw new Error("expected store to be an object");Object.keys(e.store).forEach((t=>{this.state.store.set(t,e.store[t])}))}const{store:t}=this.state;this.state=U(U(U({},this.state),e),{},{store:t})}async _modal(e){return new Promise(((t,r)=>{this.modal._prompt(this.state.clientId,this.state.whiteLabel,this.state.loginConfig,(async n=>{if(n.cancel)r(new Error("user canceled login"));else try{const r=await this._selectedLogin(f()(e,n));t(r)}catch(e){r(e)}}))}))}async _cleanup(){await this.modal.cleanup(),this.provider.cleanup()}async encrypt(e,t){let r=t;if(r||(r=this.privKey),!/^[0-9a-fA-f]{64}$/.exec(r))throw""===r||void 0===r?new Error("private key cannot be empty"):new Error("invalid private key in encrypt");return(0,a.HI)((0,a.rc)(p.from(r,"hex")),e)}async decrypt(e,t){let r=t;if(r||(r=this.privKey),!/^[0-9a-fA-f]{64}$/.exec(r))throw""===r||void 0===r?new Error("private key cannot be empty"):new Error("invalid private key in decrypt");return(0,a.pe)(p.from(r,"hex"),e)}async getUserInfo(){if(this.privKey){const e=this.state.store.getStore();return{email:e.email||"",name:e.name||"",profileImage:e.profileImage||"",aggregateVerifier:e.aggregateVerifier||"",verifier:e.verifier||"",verifierId:e.verifierId||"",typeOfLogin:e.typeOfLogin||"",dappShare:e.dappShare||"",idToken:e.idToken||"",oAuthIdToken:e.oAuthIdToken||"",oAuthAccessToken:e.oAuthAccessToken||""}}throw new Error("user should be logged in to fetch userInfo")}async getEncodedLoginUrl(e){const{redirectUrl:t}=e,{clientId:r}=this.state;this.state.originData[origin]||await this.updateOriginData();const n=U({_clientId:r,_origin:new URL(t).origin,_originData:this.state.originData,redirectUrl:t},e),i={b64Params:(0,u.zc)(n),_method:"openlogin_login"};return P({baseURL:"".concat(this.state.iframeUrl,"/start"),hash:i})}}},45429:(e,t,r)=>{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var a=t(),s=t([1]),c=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function g(e,t,r,n,i){var o,a=0;for(o=0;o<i;o++)a|=e[t+o]^r[n+o];return(1&a-1>>>8)-1}function m(e,t,r,n){return g(e,t,r,n,16)}function y(e,t,r,n){return g(e,t,r,n,32)}function b(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,A=o,_=a,E=s,x=c,k=u,S=l,C=f,P=d,O=h,I=p,B=g,T=m,M=y,R=b,N=v,j=w,L=0;L<20;L+=2)A^=(i=(M^=(i=(O^=(i=(k^=(i=A+M|0)<<7|i>>>25)+A|0)<<9|i>>>23)+k|0)<<13|i>>>19)+O|0)<<18|i>>>14,S^=(i=(_^=(i=(R^=(i=(I^=(i=S+_|0)<<7|i>>>25)+S|0)<<9|i>>>23)+I|0)<<13|i>>>19)+R|0)<<18|i>>>14,B^=(i=(C^=(i=(E^=(i=(N^=(i=B+C|0)<<7|i>>>25)+B|0)<<9|i>>>23)+N|0)<<13|i>>>19)+E|0)<<18|i>>>14,j^=(i=(T^=(i=(P^=(i=(x^=(i=j+T|0)<<7|i>>>25)+j|0)<<9|i>>>23)+x|0)<<13|i>>>19)+P|0)<<18|i>>>14,A^=(i=(x^=(i=(E^=(i=(_^=(i=A+x|0)<<7|i>>>25)+A|0)<<9|i>>>23)+_|0)<<13|i>>>19)+E|0)<<18|i>>>14,S^=(i=(k^=(i=(P^=(i=(C^=(i=S+k|0)<<7|i>>>25)+S|0)<<9|i>>>23)+C|0)<<13|i>>>19)+P|0)<<18|i>>>14,B^=(i=(I^=(i=(O^=(i=(T^=(i=B+I|0)<<7|i>>>25)+B|0)<<9|i>>>23)+T|0)<<13|i>>>19)+O|0)<<18|i>>>14,j^=(i=(N^=(i=(R^=(i=(M^=(i=j+N|0)<<7|i>>>25)+j|0)<<9|i>>>23)+M|0)<<13|i>>>19)+R|0)<<18|i>>>14;A=A+o|0,_=_+a|0,E=E+s|0,x=x+c|0,k=k+u|0,S=S+l|0,C=C+f|0,P=P+d|0,O=O+h|0,I=I+p|0,B=B+g|0,T=T+m|0,M=M+y|0,R=R+b|0,N=N+v|0,j=j+w|0,e[0]=A>>>0&255,e[1]=A>>>8&255,e[2]=A>>>16&255,e[3]=A>>>24&255,e[4]=_>>>0&255,e[5]=_>>>8&255,e[6]=_>>>16&255,e[7]=_>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=x>>>0&255,e[13]=x>>>8&255,e[14]=x>>>16&255,e[15]=x>>>24&255,e[16]=k>>>0&255,e[17]=k>>>8&255,e[18]=k>>>16&255,e[19]=k>>>24&255,e[20]=S>>>0&255,e[21]=S>>>8&255,e[22]=S>>>16&255,e[23]=S>>>24&255,e[24]=C>>>0&255,e[25]=C>>>8&255,e[26]=C>>>16&255,e[27]=C>>>24&255,e[28]=P>>>0&255,e[29]=P>>>8&255,e[30]=P>>>16&255,e[31]=P>>>24&255,e[32]=O>>>0&255,e[33]=O>>>8&255,e[34]=O>>>16&255,e[35]=O>>>24&255,e[36]=I>>>0&255,e[37]=I>>>8&255,e[38]=I>>>16&255,e[39]=I>>>24&255,e[40]=B>>>0&255,e[41]=B>>>8&255,e[42]=B>>>16&255,e[43]=B>>>24&255,e[44]=T>>>0&255,e[45]=T>>>8&255,e[46]=T>>>16&255,e[47]=T>>>24&255,e[48]=M>>>0&255,e[49]=M>>>8&255,e[50]=M>>>16&255,e[51]=M>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=j>>>0&255,e[61]=j>>>8&255,e[62]=j>>>16&255,e[63]=j>>>24&255}(e,t,r,n)}function v(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,A=0;A<20;A+=2)o^=(i=(y^=(i=(h^=(i=(u^=(i=o+y|0)<<7|i>>>25)+o|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,l^=(i=(a^=(i=(b^=(i=(p^=(i=l+a|0)<<7|i>>>25)+l|0)<<9|i>>>23)+p|0)<<13|i>>>19)+b|0)<<18|i>>>14,g^=(i=(f^=(i=(s^=(i=(v^=(i=g+f|0)<<7|i>>>25)+g|0)<<9|i>>>23)+v|0)<<13|i>>>19)+s|0)<<18|i>>>14,w^=(i=(m^=(i=(d^=(i=(c^=(i=w+m|0)<<7|i>>>25)+w|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,o^=(i=(c^=(i=(s^=(i=(a^=(i=o+c|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+s|0)<<18|i>>>14,l^=(i=(u^=(i=(d^=(i=(f^=(i=l+u|0)<<7|i>>>25)+l|0)<<9|i>>>23)+f|0)<<13|i>>>19)+d|0)<<18|i>>>14,g^=(i=(p^=(i=(h^=(i=(m^=(i=g+p|0)<<7|i>>>25)+g|0)<<9|i>>>23)+m|0)<<13|i>>>19)+h|0)<<18|i>>>14,w^=(i=(v^=(i=(b^=(i=(y^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+y|0)<<13|i>>>19)+b|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=h>>>0&255,e[25]=h>>>8&255,e[26]=h>>>16&255,e[27]=h>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function A(e,t,r,n,i,o,a){var s,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=o[c];for(;i>=64;){for(b(l,u,a,w),c=0;c<64;c++)e[t+c]=r[n+c]^l[c];for(s=1,c=8;c<16;c++)s=s+(255&u[c])|0,u[c]=255&s,s>>>=8;i-=64,t+=64,n+=64}if(i>0)for(b(l,u,a,w),c=0;c<i;c++)e[t+c]=r[n+c]^l[c];return 0}function _(e,t,r,n,i){var o,a,s=new Uint8Array(16),c=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=n[a];for(;r>=64;){for(b(c,s,i,w),a=0;a<64;a++)e[t+a]=c[a];for(o=1,a=8;a<16;a++)o=o+(255&s[a])|0,s[a]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(b(c,s,i,w),a=0;a<r;a++)e[t+a]=c[a];return 0}function E(e,t,r,n,i){var o=new Uint8Array(32);v(o,n,i,w);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=n[s+16];return _(e,t,r,a,o)}function x(e,t,r,n,i,o,a){var s=new Uint8Array(32);v(s,o,a,w);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=o[u+16];return A(e,t,r,n,i,c,s)}var k=function(e){var t,r,n,i,o,a,s,c;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,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function S(e,t,r,n,i,o){var a=new k(o);return a.update(r,n,i),a.finish(e,t),0}function C(e,t,r,n,i,o){var a=new Uint8Array(16);return S(a,0,r,n,i,o),m(e,t,a,0)}function P(e,t,r,n,i){var o;if(r<32)return-1;for(x(e,0,t,0,r,n,i),S(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function O(e,t,r,n,i){var o,a=new Uint8Array(32);if(r<32)return-1;if(E(a,0,32,n,i),0!==C(t,16,t,32,r-32,a))return-1;for(x(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function I(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function B(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function T(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function M(e,r){var n,i,o,a=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(B(s),B(s),B(s),i=0;i<2;i++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),o=a[15]>>16&1,a[14]&=65535,T(s,a,1-o)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function R(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return M(r,e),M(n,t),y(r,0,n,0)}function N(e){var t=new Uint8Array(32);return M(t,e),1&t[0]}function j(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function U(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function D(e,t,r){var n,i,o=0,a=0,s=0,c=0,u=0,l=0,f=0,d=0,h=0,p=0,g=0,m=0,y=0,b=0,v=0,w=0,A=0,_=0,E=0,x=0,k=0,S=0,C=0,P=0,O=0,I=0,B=0,T=0,M=0,R=0,N=0,j=r[0],L=r[1],U=r[2],D=r[3],F=r[4],z=r[5],Z=r[6],H=r[7],q=r[8],W=r[9],K=r[10],V=r[11],G=r[12],$=r[13],J=r[14],Y=r[15];o+=(n=t[0])*j,a+=n*L,s+=n*U,c+=n*D,u+=n*F,l+=n*z,f+=n*Z,d+=n*H,h+=n*q,p+=n*W,g+=n*K,m+=n*V,y+=n*G,b+=n*$,v+=n*J,w+=n*Y,a+=(n=t[1])*j,s+=n*L,c+=n*U,u+=n*D,l+=n*F,f+=n*z,d+=n*Z,h+=n*H,p+=n*q,g+=n*W,m+=n*K,y+=n*V,b+=n*G,v+=n*$,w+=n*J,A+=n*Y,s+=(n=t[2])*j,c+=n*L,u+=n*U,l+=n*D,f+=n*F,d+=n*z,h+=n*Z,p+=n*H,g+=n*q,m+=n*W,y+=n*K,b+=n*V,v+=n*G,w+=n*$,A+=n*J,_+=n*Y,c+=(n=t[3])*j,u+=n*L,l+=n*U,f+=n*D,d+=n*F,h+=n*z,p+=n*Z,g+=n*H,m+=n*q,y+=n*W,b+=n*K,v+=n*V,w+=n*G,A+=n*$,_+=n*J,E+=n*Y,u+=(n=t[4])*j,l+=n*L,f+=n*U,d+=n*D,h+=n*F,p+=n*z,g+=n*Z,m+=n*H,y+=n*q,b+=n*W,v+=n*K,w+=n*V,A+=n*G,_+=n*$,E+=n*J,x+=n*Y,l+=(n=t[5])*j,f+=n*L,d+=n*U,h+=n*D,p+=n*F,g+=n*z,m+=n*Z,y+=n*H,b+=n*q,v+=n*W,w+=n*K,A+=n*V,_+=n*G,E+=n*$,x+=n*J,k+=n*Y,f+=(n=t[6])*j,d+=n*L,h+=n*U,p+=n*D,g+=n*F,m+=n*z,y+=n*Z,b+=n*H,v+=n*q,w+=n*W,A+=n*K,_+=n*V,E+=n*G,x+=n*$,k+=n*J,S+=n*Y,d+=(n=t[7])*j,h+=n*L,p+=n*U,g+=n*D,m+=n*F,y+=n*z,b+=n*Z,v+=n*H,w+=n*q,A+=n*W,_+=n*K,E+=n*V,x+=n*G,k+=n*$,S+=n*J,C+=n*Y,h+=(n=t[8])*j,p+=n*L,g+=n*U,m+=n*D,y+=n*F,b+=n*z,v+=n*Z,w+=n*H,A+=n*q,_+=n*W,E+=n*K,x+=n*V,k+=n*G,S+=n*$,C+=n*J,P+=n*Y,p+=(n=t[9])*j,g+=n*L,m+=n*U,y+=n*D,b+=n*F,v+=n*z,w+=n*Z,A+=n*H,_+=n*q,E+=n*W,x+=n*K,k+=n*V,S+=n*G,C+=n*$,P+=n*J,O+=n*Y,g+=(n=t[10])*j,m+=n*L,y+=n*U,b+=n*D,v+=n*F,w+=n*z,A+=n*Z,_+=n*H,E+=n*q,x+=n*W,k+=n*K,S+=n*V,C+=n*G,P+=n*$,O+=n*J,I+=n*Y,m+=(n=t[11])*j,y+=n*L,b+=n*U,v+=n*D,w+=n*F,A+=n*z,_+=n*Z,E+=n*H,x+=n*q,k+=n*W,S+=n*K,C+=n*V,P+=n*G,O+=n*$,I+=n*J,B+=n*Y,y+=(n=t[12])*j,b+=n*L,v+=n*U,w+=n*D,A+=n*F,_+=n*z,E+=n*Z,x+=n*H,k+=n*q,S+=n*W,C+=n*K,P+=n*V,O+=n*G,I+=n*$,B+=n*J,T+=n*Y,b+=(n=t[13])*j,v+=n*L,w+=n*U,A+=n*D,_+=n*F,E+=n*z,x+=n*Z,k+=n*H,S+=n*q,C+=n*W,P+=n*K,O+=n*V,I+=n*G,B+=n*$,T+=n*J,M+=n*Y,v+=(n=t[14])*j,w+=n*L,A+=n*U,_+=n*D,E+=n*F,x+=n*z,k+=n*Z,S+=n*H,C+=n*q,P+=n*W,O+=n*K,I+=n*V,B+=n*G,T+=n*$,M+=n*J,R+=n*Y,w+=(n=t[15])*j,a+=38*(_+=n*U),s+=38*(E+=n*D),c+=38*(x+=n*F),u+=38*(k+=n*z),l+=38*(S+=n*Z),f+=38*(C+=n*H),d+=38*(P+=n*q),h+=38*(O+=n*W),p+=38*(I+=n*K),g+=38*(B+=n*V),m+=38*(T+=n*G),y+=38*(M+=n*$),b+=38*(R+=n*J),v+=38*(N+=n*Y),o=(n=(o+=38*(A+=n*L))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=f,e[7]=d,e[8]=h,e[9]=p,e[10]=g,e[11]=m,e[12]=y,e[13]=b,e[14]=v,e[15]=w}function F(e,t){D(e,t,t)}function z(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&D(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function Z(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)F(i,i),1!==n&&D(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function H(e,r,n){var i,o,a=new Uint8Array(32),s=new Float64Array(80),u=t(),l=t(),f=t(),d=t(),h=t(),p=t();for(o=0;o<31;o++)a[o]=r[o];for(a[31]=127&r[31]|64,a[0]&=248,j(s,n),o=0;o<16;o++)l[o]=s[o],d[o]=u[o]=f[o]=0;for(u[0]=d[0]=1,o=254;o>=0;--o)T(u,l,i=a[o>>>3]>>>(7&o)&1),T(f,d,i),L(h,u,f),U(u,u,f),L(f,l,d),U(l,l,d),F(d,h),F(p,u),D(u,f,u),D(f,l,h),L(h,u,f),U(u,u,f),F(l,u),U(f,d,p),D(u,f,c),L(u,u,d),D(f,f,u),D(u,d,p),D(d,l,s),F(l,h),T(u,l,i),T(f,d,i);for(o=0;o<16;o++)s[o+16]=u[o],s[o+32]=f[o],s[o+48]=l[o],s[o+64]=d[o];var g=s.subarray(32),m=s.subarray(16);return z(g,g),D(m,m,g),M(e,m),0}function q(e,t){return H(e,t,o)}function W(e,t){return n(t,32),q(e,t)}function K(e,t,r){var n=new Uint8Array(32);return H(n,r,t),v(e,i,n,w)}k.prototype.blocks=function(e,t,r){for(var n,i,o,a,s,c,u,l,f,d,h,p,g,m,y,b,v,w,A,_=this.fin?0:2048,E=this.h[0],x=this.h[1],k=this.h[2],S=this.h[3],C=this.h[4],P=this.h[5],O=this.h[6],I=this.h[7],B=this.h[8],T=this.h[9],M=this.r[0],R=this.r[1],N=this.r[2],j=this.r[3],L=this.r[4],U=this.r[5],D=this.r[6],F=this.r[7],z=this.r[8],Z=this.r[9];r>=16;)d=f=0,d+=(E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*M,d+=(x+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*Z),d+=(k+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*z),d+=(S+=8191&(o>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),f=(d+=(C+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*D))>>>13,d&=8191,d+=(P+=s>>>1&8191)*(5*U),d+=(O+=8191&(s>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*L),d+=(I+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*j),d+=(B+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*N),h=f+=(d+=(T+=l>>>5|_)*(5*R))>>>13,h+=E*R,h+=x*M,h+=k*(5*Z),h+=S*(5*z),f=(h+=C*(5*F))>>>13,h&=8191,h+=P*(5*D),h+=O*(5*U),h+=I*(5*L),h+=B*(5*j),f+=(h+=T*(5*N))>>>13,h&=8191,p=f,p+=E*N,p+=x*R,p+=k*M,p+=S*(5*Z),f=(p+=C*(5*z))>>>13,p&=8191,p+=P*(5*F),p+=O*(5*D),p+=I*(5*U),p+=B*(5*L),g=f+=(p+=T*(5*j))>>>13,g+=E*j,g+=x*N,g+=k*R,g+=S*M,f=(g+=C*(5*Z))>>>13,g&=8191,g+=P*(5*z),g+=O*(5*F),g+=I*(5*D),g+=B*(5*U),m=f+=(g+=T*(5*L))>>>13,m+=E*L,m+=x*j,m+=k*N,m+=S*R,f=(m+=C*M)>>>13,m&=8191,m+=P*(5*Z),m+=O*(5*z),m+=I*(5*F),m+=B*(5*D),y=f+=(m+=T*(5*U))>>>13,y+=E*U,y+=x*L,y+=k*j,y+=S*N,f=(y+=C*R)>>>13,y&=8191,y+=P*M,y+=O*(5*Z),y+=I*(5*z),y+=B*(5*F),b=f+=(y+=T*(5*D))>>>13,b+=E*D,b+=x*U,b+=k*L,b+=S*j,f=(b+=C*N)>>>13,b&=8191,b+=P*R,b+=O*M,b+=I*(5*Z),b+=B*(5*z),v=f+=(b+=T*(5*F))>>>13,v+=E*F,v+=x*D,v+=k*U,v+=S*L,f=(v+=C*j)>>>13,v&=8191,v+=P*N,v+=O*R,v+=I*M,v+=B*(5*Z),w=f+=(v+=T*(5*z))>>>13,w+=E*z,w+=x*F,w+=k*D,w+=S*U,f=(w+=C*L)>>>13,w&=8191,w+=P*j,w+=O*N,w+=I*R,w+=B*M,A=f+=(w+=T*(5*Z))>>>13,A+=E*Z,A+=x*z,A+=k*F,A+=S*D,f=(A+=C*U)>>>13,A&=8191,A+=P*L,A+=O*j,A+=I*N,A+=B*R,E=d=8191&(f=(f=((f+=(A+=T*M)>>>13)<<2)+f|0)+(d&=8191)|0),x=h+=f>>>=13,k=p&=8191,S=g&=8191,C=m&=8191,P=y&=8191,O=b&=8191,I=v&=8191,B=w&=8191,T=A&=8191,t+=16,r-=16;this.h[0]=E,this.h[1]=x,this.h[2]=k,this.h[3]=S,this.h[4]=C,this.h[5]=P,this.h[6]=O,this.h[7]=I,this.h[8]=B,this.h[9]=T},k.prototype.finish=function(e,t){var r,n,i,o,a=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this.h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|a[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},k.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var V=P,G=O,$=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function J(e,t,r,n){for(var i,o,a,s,c,u,l,f,d,h,p,g,m,y,b,v,w,A,_,E,x,k,S,C,P,O,I=new Int32Array(16),B=new Int32Array(16),T=e[0],M=e[1],R=e[2],N=e[3],j=e[4],L=e[5],U=e[6],D=e[7],F=t[0],z=t[1],Z=t[2],H=t[3],q=t[4],W=t[5],K=t[6],V=t[7],G=0;n>=128;){for(_=0;_<16;_++)E=8*_+G,I[_]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],B[_]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(_=0;_<80;_++)if(i=T,o=M,a=R,s=N,c=j,u=L,l=U,d=F,h=z,p=Z,g=H,m=q,y=W,b=K,S=65535&(k=V),C=k>>>16,P=65535&(x=D),O=x>>>16,S+=65535&(k=(q>>>14|j<<18)^(q>>>18|j<<14)^(j>>>9|q<<23)),C+=k>>>16,P+=65535&(x=(j>>>14|q<<18)^(j>>>18|q<<14)^(q>>>9|j<<23)),O+=x>>>16,S+=65535&(k=q&W^~q&K),C+=k>>>16,P+=65535&(x=j&L^~j&U),O+=x>>>16,S+=65535&(k=$[2*_+1]),C+=k>>>16,P+=65535&(x=$[2*_]),O+=x>>>16,x=I[_%16],C+=(k=B[_%16])>>>16,P+=65535&x,O+=x>>>16,P+=(C+=(S+=65535&k)>>>16)>>>16,S=65535&(k=A=65535&S|C<<16),C=k>>>16,P=65535&(x=w=65535&P|(O+=P>>>16)<<16),O=x>>>16,S+=65535&(k=(F>>>28|T<<4)^(T>>>2|F<<30)^(T>>>7|F<<25)),C+=k>>>16,P+=65535&(x=(T>>>28|F<<4)^(F>>>2|T<<30)^(F>>>7|T<<25)),O+=x>>>16,C+=(k=F&z^F&Z^z&Z)>>>16,P+=65535&(x=T&M^T&R^M&R),O+=x>>>16,f=65535&(P+=(C+=(S+=65535&k)>>>16)>>>16)|(O+=P>>>16)<<16,v=65535&S|C<<16,S=65535&(k=g),C=k>>>16,P=65535&(x=s),O=x>>>16,C+=(k=A)>>>16,P+=65535&(x=w),O+=x>>>16,M=i,R=o,N=a,j=s=65535&(P+=(C+=(S+=65535&k)>>>16)>>>16)|(O+=P>>>16)<<16,L=c,U=u,D=l,T=f,z=d,Z=h,H=p,q=g=65535&S|C<<16,W=m,K=y,V=b,F=v,_%16==15)for(E=0;E<16;E++)x=I[E],S=65535&(k=B[E]),C=k>>>16,P=65535&x,O=x>>>16,x=I[(E+9)%16],S+=65535&(k=B[(E+9)%16]),C+=k>>>16,P+=65535&x,O+=x>>>16,w=I[(E+1)%16],S+=65535&(k=((A=B[(E+1)%16])>>>1|w<<31)^(A>>>8|w<<24)^(A>>>7|w<<25)),C+=k>>>16,P+=65535&(x=(w>>>1|A<<31)^(w>>>8|A<<24)^w>>>7),O+=x>>>16,w=I[(E+14)%16],C+=(k=((A=B[(E+14)%16])>>>19|w<<13)^(w>>>29|A<<3)^(A>>>6|w<<26))>>>16,P+=65535&(x=(w>>>19|A<<13)^(A>>>29|w<<3)^w>>>6),O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,I[E]=65535&P|O<<16,B[E]=65535&S|C<<16;S=65535&(k=F),C=k>>>16,P=65535&(x=T),O=x>>>16,x=e[0],C+=(k=t[0])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[0]=T=65535&P|O<<16,t[0]=F=65535&S|C<<16,S=65535&(k=z),C=k>>>16,P=65535&(x=M),O=x>>>16,x=e[1],C+=(k=t[1])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[1]=M=65535&P|O<<16,t[1]=z=65535&S|C<<16,S=65535&(k=Z),C=k>>>16,P=65535&(x=R),O=x>>>16,x=e[2],C+=(k=t[2])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[2]=R=65535&P|O<<16,t[2]=Z=65535&S|C<<16,S=65535&(k=H),C=k>>>16,P=65535&(x=N),O=x>>>16,x=e[3],C+=(k=t[3])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[3]=N=65535&P|O<<16,t[3]=H=65535&S|C<<16,S=65535&(k=q),C=k>>>16,P=65535&(x=j),O=x>>>16,x=e[4],C+=(k=t[4])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[4]=j=65535&P|O<<16,t[4]=q=65535&S|C<<16,S=65535&(k=W),C=k>>>16,P=65535&(x=L),O=x>>>16,x=e[5],C+=(k=t[5])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[5]=L=65535&P|O<<16,t[5]=W=65535&S|C<<16,S=65535&(k=K),C=k>>>16,P=65535&(x=U),O=x>>>16,x=e[6],C+=(k=t[6])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[6]=U=65535&P|O<<16,t[6]=K=65535&S|C<<16,S=65535&(k=V),C=k>>>16,P=65535&(x=D),O=x>>>16,x=e[7],C+=(k=t[7])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[7]=D=65535&P|O<<16,t[7]=V=65535&S|C<<16,G+=128,n-=128}return n}function Y(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),a=new Uint8Array(256),s=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,J(i,o,t,r),r%=128,n=0;n<r;n++)a[n]=t[s-r+n];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,p(a,r-8,s/536870912|0,s<<3),J(i,o,a,r),n=0;n<8;n++)p(e,8*n,i[n],o[n]);return 0}function X(e,r){var n=t(),i=t(),o=t(),a=t(),s=t(),c=t(),u=t(),f=t(),d=t();U(n,e[1],e[0]),U(d,r[1],r[0]),D(n,n,d),L(i,e[0],e[1]),L(d,r[0],r[1]),D(i,i,d),D(o,e[3],r[3]),D(o,o,l),D(a,e[2],r[2]),L(a,a,a),U(s,i,n),U(c,a,o),L(u,a,o),L(f,i,n),D(e[0],s,c),D(e[1],f,u),D(e[2],u,c),D(e[3],s,f)}function Q(e,t,r){var n;for(n=0;n<4;n++)T(e[n],t[n],r)}function ee(e,r){var n=t(),i=t(),o=t();z(o,r[2]),D(n,r[0],o),D(i,r[1],o),M(e,i),e[31]^=N(n)<<7}function te(e,t,r){var n,i;for(I(e[0],a),I(e[1],s),I(e[2],s),I(e[3],a),i=255;i>=0;--i)Q(e,t,n=r[i/8|0]>>(7&i)&1),X(t,e),X(e,e),Q(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];I(n[0],f),I(n[1],d),I(n[2],s),D(n[3],f,d),te(e,n,r)}function ne(e,r,i){var o,a=new Uint8Array(64),s=[t(),t(),t(),t()];for(i||n(r,32),Y(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,re(s,a),ee(e,s),o=0;o<32;o++)r[o+32]=e[o];return 0}var ie=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 oe(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*ie[i-(n-32)],r=Math.floor((t[i]+128)/256),t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ie[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ie[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ae(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}function se(e,r,n,i){var o,a,s=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),f=[t(),t(),t(),t()];Y(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64;var d=n+64;for(o=0;o<n;o++)e[64+o]=r[o];for(o=0;o<32;o++)e[32+o]=s[32+o];for(Y(u,e.subarray(32),n+32),ae(u),re(f,u),ee(e,f),o=32;o<64;o++)e[o]=i[o];for(Y(c,e,n+64),ae(c),o=0;o<64;o++)l[o]=0;for(o=0;o<32;o++)l[o]=u[o];for(o=0;o<32;o++)for(a=0;a<32;a++)l[o+a]+=c[o]*s[a];return oe(e.subarray(32),l),d}function ce(e,r,n,i){var o,c=new Uint8Array(32),l=new Uint8Array(64),f=[t(),t(),t(),t()],d=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),i=t(),o=t(),c=t(),l=t(),f=t(),d=t();return I(e[2],s),j(e[1],r),F(o,e[1]),D(c,o,u),U(o,o,e[2]),L(c,e[2],c),F(l,c),F(f,l),D(d,f,l),D(n,d,o),D(n,n,c),Z(n,n),D(n,n,o),D(n,n,c),D(n,n,c),D(e[0],n,c),F(i,e[0]),D(i,i,c),R(i,o)&&D(e[0],e[0],h),F(i,e[0]),D(i,i,c),R(i,o)?-1:(N(e[0])===r[31]>>7&&U(e[0],a,e[0]),D(e[3],e[0],e[1]),0)}(d,i))return-1;for(o=0;o<n;o++)e[o]=r[o];for(o=0;o<32;o++)e[o+32]=i[o];if(Y(l,e,n),ae(l),te(f,d,l),re(d,r.subarray(32)),X(f,d),ee(c,f),n-=64,y(r,0,c,0)){for(o=0;o<n;o++)e[o]=0;return-1}for(o=0;o<n;o++)e[o]=r[o+64];return n}var ue=64,le=32,fe=64;function de(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function he(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function pe(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:v,crypto_stream_xor:x,crypto_stream:E,crypto_stream_salsa20_xor:A,crypto_stream_salsa20:_,crypto_onetimeauth:S,crypto_onetimeauth_verify:C,crypto_verify_16:m,crypto_verify_32:y,crypto_secretbox:P,crypto_secretbox_open:O,crypto_scalarmult:H,crypto_scalarmult_base:q,crypto_box_beforenm:K,crypto_box_afternm:V,crypto_box:function(e,t,r,n,i,o){var a=new Uint8Array(32);return K(a,i,o),V(e,t,r,n,a)},crypto_box_open:function(e,t,r,n,i,o){var a=new Uint8Array(32);return K(a,i,o),G(e,t,r,n,a)},crypto_box_keypair:W,crypto_hash:Y,crypto_sign:se,crypto_sign_keypair:ne,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ue,crypto_sign_PUBLICKEYBYTES:le,crypto_sign_SECRETKEYBYTES:fe,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ie,pack:ee,pack25519:M,unpack25519:j,M:D,A:L,S:F,Z:U,pow2523:Z,add:X,set25519:I,modL:oe,scalarmult:te,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){he(e,t,r),de(r,t);for(var n=new Uint8Array(32+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+32]=e[o];return P(i,n,n.length,t,r),i.subarray(16)},e.secretbox.open=function(e,t,r){he(e,t,r),de(r,t);for(var n=new Uint8Array(16+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+16]=e[o];return n.length<32||0!==O(i,n,n.length,t,r)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(he(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return H(r,e,t),r},e.scalarMult.base=function(e){if(he(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return q(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox(t,r,o)},e.box.before=function(e,t){he(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return K(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox.open(t,r,o)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return W(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(he(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return q(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(he(e,t),t.length!==fe)throw new Error("bad secret key size");var r=new Uint8Array(ue+e.length);return se(r,e,e.length,t),r},e.sign.open=function(e,t){if(he(e,t),t.length!==le)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ce(r,e,e.length,t);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},e.sign.detached=function(t,r){for(var n=e.sign(t,r),i=new Uint8Array(ue),o=0;o<i.length;o++)i[o]=n[o];return i},e.sign.detached.verify=function(e,t,r){if(he(e,t,r),t.length!==ue)throw new Error("bad signature size");if(r.length!==le)throw new Error("bad public key size");var n,i=new Uint8Array(ue+e.length),o=new Uint8Array(ue+e.length);for(n=0;n<ue;n++)i[n]=t[n];for(n=0;n<e.length;n++)i[n+ue]=e[n];return ce(o,i,i.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(fe);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(he(e),e.length!==fe)throw new Error("bad secret key size");for(var t=new Uint8Array(le),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(he(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),r=new Uint8Array(fe),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=le,e.sign.secretKeyLength=fe,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){he(e);var t=new Uint8Array(64);return Y(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return he(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===g(e,0,t,0,e.length)},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,r){var n,i=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=i[n];pe(i)})):(t=r(58722))&&t.randomBytes&&e.setPRNG((function(e,r){var n,i=t.randomBytes(r);for(n=0;n<r;n++)e[n]=i[n];pe(i)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},45086:(e,t,r)=>{"use strict";function n(){return(null===r.g||void 0===r.g?void 0:r.g.crypto)||(null===r.g||void 0===r.g?void 0:r.g.msCrypto)||{}}function i(){const e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=i,t.isBrowserCryptoAvailable=function(){return!!n()&&!!i()}},64250:(e,t,r)=>{"use strict";var n=r(34406);function i(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function o(){return void 0!==n&&void 0!==n.versions&&void 0!==n.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=i,t.isNode=o,t.isBrowser=function(){return!i()&&!o()}},5010:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45086),t),i(r(64250),t)},8199:e=>{"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},34748:(e,t,r)=>{"use strict";const n=r(57785),i=r(15554),o=r(15452);function a(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function s(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function c(e,t){return t.decode?i(e):e}function u(e){return Array.isArray(e)?e.sort():"object"==typeof e?u(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function f(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function d(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function h(e,t){a((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const i="string"==typeof r&&r.split("").indexOf(e.arrayFormatSeparator)>-1?r.split(e.arrayFormatSeparator).map((t=>c(t,e))):null===r?r:c(r,e);n[t]=i};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const i of e.split("&")){let[e,a]=o(t.decode?i.replace(/\+/g," "):i,"=");a=void 0===a?null:["comma","separator"].includes(t.arrayFormat)?a:c(a,t),r(c(e,t),a,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=d(r[e],t);else n[e]=d(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=u(r):e[t]=r,e}),Object.create(null))}t.extract=f,t.parse=h,t.stringify=(e,t)=>{if(!e)return"";a((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[s(t,e),"[",i,"]"].join("")]:[...r,[s(t,e),"[",s(i,e),"]=",s(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[s(t,e),"[]"].join("")]:[...r,[s(t,e),"[]=",s(n,e)].join("")];case"comma":case"separator":return t=>(r,n)=>null==n||0===n.length?r:0===r.length?[[s(t,e),"=",s(n,e)].join("")]:[[r,s(n,e)].join(e.arrayFormatSeparator)];default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,s(t,e)]:[...r,[s(t,e),"=",s(n,e)].join("")]}}(t),i={};for(const t of Object.keys(e))r(t)||(i[t]=e[t]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((r=>{const i=e[r];return void 0===i?"":null===i?s(r,t):Array.isArray(i)?i.reduce(n(r),[]).join("&"):s(r,t)+"="+s(i,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=o(e,"#");return Object.assign({url:r.split("?")[0]||"",query:h(f(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:c(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=l(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),a=Object.assign(o,e.query);let c=t.stringify(a,r);c&&(c=`?${c}`);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u=`#${s(e.fragmentIdentifier,r)}`),`${n}${c}${u}`}},4997:(e,t)=>{"use strict";function r(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function n(e){const t=r(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=n,t.getDocumentOrThrow=function(){return n("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return n("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return n("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return n("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return n("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},51726:(e,t,r)=>{"use strict";t.D=void 0;const n=r(4997);t.D=function(){let e,t;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(e){return null}function r(...t){const r=e.getElementsByTagName("meta");for(let e=0;e<r.length;e++){const n=r[e],i=["itemprop","property","name"].map((e=>n.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=n.getAttribute("content");if(e)return e}}return""}const i=function(){let t=r("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:r("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const r=e.getElementsByTagName("link"),n=[];for(let e=0;e<r.length;e++){const i=r[e],o=i.getAttribute("rel");if(o&&o.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let r=t.protocol+"//"+t.host;if(0===e.indexOf("/"))r+=e;else{const n=t.pathname.split("/");n.pop(),r+=n.join("/")+"/"+e}n.push(r)}else if(0===e.indexOf("//")){const r=t.protocol+e;n.push(r)}else n.push(e)}}return n}(),name:i}}},22812:(e,t,r)=>{"use strict";const n=t;n.bignum=r(62197),n.define=r(45192).define,n.base=r(84798),n.constants=r(96906),n.decoders=r(18211),n.encoders=r(89116)},45192:(e,t,r)=>{"use strict";const n=r(89116),i=r(18211),o=r(91285);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){const t=this.name;function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},47362:(e,t,r)=>{"use strict";const n=r(91285),i=r(80126).b,o=r(27654).Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return s.isEncoderBuffer(e)||(e=new s(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),t.C=a,a.isDecoderBuffer=function(e){return e instanceof a||"object"==typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){const t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=s,s.isEncoderBuffer=function(e){return e instanceof s||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},s.prototype.join=function(e,t){return e||(e=o.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},84798:(e,t,r)=>{"use strict";const n=t;n.Reporter=r(80126).b,n.DecoderBuffer=r(47362).C,n.EncoderBuffer=r(47362).R,n.Node=r(80847)},80847:(e,t,r)=>{"use strict";const n=r(80126).b,i=r(47362).R,o=r(47362).C,a=r(79561),s=["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"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function u(e,t,r){const n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=u;const l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){const e=this._baseState,t={};l.forEach((function(r){t[r]=e[r]}));const r=new this.constructor(t.parent);return r._baseState=t,r},u.prototype._wrap=function(){const e=this._baseState;c.forEach((function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},u.prototype._init=function(e){const t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),a.equal(t.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(e){const t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);const n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){u.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){u.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}})),u.prototype.use=function(e){a(e);const t=this._baseState;return a(null===t.use),t.use=e,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(e){const t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},u.prototype.explicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},u.prototype.implicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},u.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},u.prototype.key=function(e){const t=this._baseState;return a(null===t.key),t.key=e,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(e){const t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},u.prototype.contains=function(e){const t=this._baseState;return a(null===t.use),t.contains=e,this},u.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(a=this._peekTag(e,n,r.any),e.isError(a))return a}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(n)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?i=e.raw(t):e=n}if(t&&t.track&&null!==r.tag&&t.track(e.path(),n,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(n,t)}}return r.obj&&a&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},u.prototype._decodeGeneric=function(e,t,r){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},u.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},u.prototype._decodeChoice=function(e,t){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(o){const a=e.save(),s=r.choice[o];try{const r=s._decode(e,t);if(e.isError(r))return!1;n={type:o,value:r},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},u.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},u.prototype._encode=function(e,t,r){const n=this._baseState;if(null!==n.default&&n.default===e)return;const i=this._encodeValue(e,t,r);return void 0===i||this._skipDefault(i,t,r)?void 0:i},u.prototype._encodeValue=function(e,t,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);let o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)a=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");const n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(r){const n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),r))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(e,s,r,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},u.prototype._encodeChoice=function(e,t){const r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},u.prototype._encodePrimitive=function(e,t){const r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},u.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},u.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},80126:(e,t,r)=>{"use strict";const n=r(91285);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},4131:(e,t)=>{"use strict";function r(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.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"},t.tagByName=r(t.tag)},96906:(e,t,r)=>{"use strict";const n=t;n._reverse=function(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t},n.der=r(4131)},41066:(e,t,r)=>{"use strict";const n=r(91285),i=r(62197),o=r(47362).C,a=r(80847),s=r(4131);function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){a.call(this,"der",e)}function l(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=s.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function f(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let t=0;t<i;t++){n<<=8;const t=e.readUInt8(r);if(e.isError(t))return t;n|=t}return n}e.exports=c,c.prototype.decode=function(e,t){return o.isDecoderBuffer(e)||(e=new o(e,t)),this.tree._decode(e,t)},n(u,a),u.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;const n=e.save(),i=l(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},u.prototype._decodeTag=function(e,t,r){const n=l(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;let i=f(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');const o=e.save(),a=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(a)?a:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},u.prototype._skipUntilEnd=function(e,t){for(;;){const r=l(e,t);if(e.isError(r))return r;const n=f(e,r.primitive,t);if(e.isError(n))return n;let i;if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===r.tagStr)break}},u.prototype._decodeList=function(e,t,r,n){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const o=r.decode(e,"der",n);if(e.isError(o)&&t)break;i.push(o)}return i},u.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let r="";for(let e=0;e<t.length/2;e++)r+=String.fromCharCode(t.readUInt16BE(2*e));return r}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},u.prototype._decodeObjid=function(e,t,r){let n;const i=[];let o=0,a=0;for(;!e.isEmpty();)a=e.readUInt8(),o<<=7,o|=127&a,0==(128&a)&&(i.push(o),o=0);128&a&&i.push(o);const s=i[0]/40|0,c=i[0]%40;if(n=r?i:[s,c].concat(i.slice(1)),t){let e=t[n.join(" ")];void 0===e&&(e=t[n.join(".")]),void 0!==e&&(n=e)}return n},u.prototype._decodeTime=function(e,t){const r=e.raw().toString();let n,i,o,a,s,c;if("gentime"===t)n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),s=0|r.slice(10,12),c=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),c=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,a,s,c,0)},u.prototype._decodeNull=function(){return null},u.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},u.prototype._decodeInt=function(e,t){const r=e.raw();let n=new i(r);return t&&(n=t[n.toString(10)]||n),n},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},18211:(e,t,r)=>{"use strict";const n=t;n.der=r(41066),n.pem=r(63956)},63956:(e,t,r)=>{"use strict";const n=r(91285),i=r(27654).Buffer,o=r(41066);function a(e){o.call(this,e),this.enc="pem"}n(a,o),e.exports=a,a.prototype.decode=function(e,t){const r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let s=-1,c=-1;for(let e=0;e<r.length;e++){const t=r[e].match(a);if(null!==t&&t[2]===n){if(-1!==s){if("END"!==t[1])break;c=e;break}if("BEGIN"!==t[1])break;s=e}}if(-1===s||-1===c)throw new Error("PEM section not found for: "+n);const u=r.slice(s+1,c).join("");u.replace(/[^a-z0-9+/=]+/gi,"");const l=i.from(u,"base64");return o.prototype.decode.call(this,l,t)}},95758:(e,t,r)=>{"use strict";const n=r(91285),i=r(27654).Buffer,o=r(80847),a=r(4131);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.call(this,"der",e)}function u(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(c,o),c.prototype._encodeComposite=function(e,t,r,n){const o=function(e,t,r,n){let i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=a.tagClassByName[r||"universal"]<<6,i)}(e,t,r,this.reporter);if(n.length<128){const e=i.alloc(2);return e[0]=o,e[1]=n.length,this._createEncoderBuffer([e,n])}let s=1;for(let e=n.length;e>=256;e>>=8)s++;const c=i.alloc(2+s);c[0]=o,c[1]=128|s;for(let e=1+s,t=n.length;t>0;e--,t>>=8)c[e]=255&t;return this._createEncoderBuffer([c,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=i.alloc(2*e.length);for(let r=0;r<e.length;r++)t.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},c.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let t=0;t<e.length;t++){let r=e[t];for(n++;r>=128;r>>=7)n++}const o=i.alloc(n);let a=o.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(o[a--]=127&r;(r>>=7)>0;)o[a--]=128|127&r}return this._createEncoderBuffer(o)},c.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[u(n.getUTCFullYear()),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(n.getUTCFullYear()%100),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=i.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let t=e;t>=256;t>>=8)r++;const n=new Array(r);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0}},89116:(e,t,r)=>{"use strict";const n=t;n.der=r(95758),n.pem=r(99245)},99245:(e,t,r)=>{"use strict";const n=r(91285),i=r(95758);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){const r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"];for(let e=0;e<r.length;e+=64)n.push(r.slice(e,e+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},71696:(e,t,r)=>{"use strict";var n=r(34406);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o,a,s=r(47515).codes,c=s.ERR_AMBIGUOUS_ARGUMENT,u=s.ERR_INVALID_ARG_TYPE,l=s.ERR_INVALID_ARG_VALUE,f=s.ERR_INVALID_RETURN_VALUE,d=s.ERR_MISSING_ARGS,h=r(64082),p=r(43335).inspect,g=r(43335).types,m=g.isPromise,y=g.isRegExp,b=Object.assign?Object.assign:r(44956).assign,v=Object.is?Object.is:r(34679);function w(){var e=r(26796);o=e.isDeepEqual,a=e.isDeepStrictEqual}new Map;var A=!1,_=e.exports=S,E={};function x(e){if(e.message instanceof Error)throw e.message;throw new h(e)}function k(e,t,r,n){if(!r){var i=!1;if(0===t)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new h({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw o.generatedMessage=i,o}}function S(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];k.apply(void 0,[S,t.length].concat(t))}_.fail=function e(t,r,i,o,a){var s,c=arguments.length;if(0===c)s="Failed";else if(1===c)i=t,t=void 0;else{if(!1===A){A=!0;var u=n.emitWarning?n.emitWarning:console.warn.bind(console);u("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}2===c&&(o="!=")}if(i instanceof Error)throw i;var l={actual:t,expected:r,operator:void 0===o?"fail":o,stackStartFn:a||e};void 0!==i&&(l.message=i);var f=new h(l);throw s&&(f.message=s,f.generatedMessage=!0),f},_.AssertionError=h,_.ok=S,_.equal=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");t!=r&&x({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},_.notEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");t==r&&x({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},_.deepEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===o&&w(),o(t,r)||x({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},_.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===o&&w(),o(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},_.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===o&&w(),a(t,r)||x({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},_.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===o&&w(),a(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},_.strictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");v(t,r)||x({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},_.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");v(t,r)&&x({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var C=function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.forEach((function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&y(t[e])&&t[e].test(n[e])?i[e]=n[e]:i[e]=t[e])}))};function P(e,t,r,n,i,o){if(!(r in e)||!a(e[r],t[r])){if(!n){var s=new C(e,i),c=new C(t,i,e),u=new h({actual:s,expected:c,operator:"deepStrictEqual",stackStartFn:o});throw u.actual=e,u.expected=t,u.operator=o.name,u}x({actual:e,expected:t,message:n,operator:o.name,stackStartFn:o})}}function O(e,t,r,n){if("function"!=typeof t){if(y(t))return t.test(e);if(2===arguments.length)throw new u("expected",["Function","RegExp"],t);if("object"!==i(e)||null===e){var a=new h({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw a.operator=n.name,a}var s=Object.keys(t);if(t instanceof Error)s.push("name","message");else if(0===s.length)throw new l("error",t,"may not be an empty object");return void 0===o&&w(),s.forEach((function(i){"string"==typeof e[i]&&y(t[i])&&t[i].test(e[i])||P(e,t,i,r,s,n)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function I(e){if("function"!=typeof e)throw new u("fn","Function",e);try{e()}catch(e){return e}return E}function B(e){return m(e)||null!==e&&"object"===i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function T(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!B(t=e()))throw new f("instance of Promise","promiseFn",t)}else{if(!B(e))throw new u("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return E})).catch((function(e){return e}))}))}function M(e,t,r,n){if("string"==typeof r){if(4===arguments.length)throw new u("error",["Object","Error","Function","RegExp"],r);if("object"===i(t)&&null!==t){if(t.message===r)throw new c("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new c("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new u("error",["Object","Error","Function","RegExp"],r);if(t===E){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var a="rejects"===e.name?"rejection":"exception";x({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(a).concat(o),stackStartFn:e})}if(r&&!O(t,r,n,e))throw t}function R(e,t,r,n){if(t!==E){if("string"==typeof r&&(n=r,r=void 0),!r||O(t,r)){var i=n?": ".concat(n):".",o="doesNotReject"===e.name?"rejection":"exception";x({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function N(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];k.apply(void 0,[N,t.length].concat(t))}_.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];M.apply(void 0,[e,I(t)].concat(n))},_.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return T(t).then((function(t){return M.apply(void 0,[e,t].concat(n))}))},_.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];R.apply(void 0,[e,I(t)].concat(n))},_.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return T(t).then((function(t){return R.apply(void 0,[e,t].concat(n))}))},_.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===i(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=p(t);var n=new h({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),o=t.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var s=n.stack.split("\n"),c=0;c<a.length;c++){var u=s.indexOf(a[c]);if(-1!==u){s=s.slice(0,u);break}}n.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw n}},_.strict=b(N,_,{equal:_.strictEqual,deepEqual:_.deepStrictEqual,notEqual:_.notStrictEqual,notDeepEqual:_.notDeepStrictEqual}),_.strict.strict=_.strict},64082:(e,t,r)=>{"use strict";var n=r(34406);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?s(e):t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return l(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)},c(e)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function l(e,t,r){return l=u()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&f(i,r.prototype),i},l.apply(null,arguments)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}var p=r(43335).inspect,g=r(47515).codes.ERR_INVALID_ARG_TYPE;function m(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var y="",b="",v="",w="",A={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function E(e){return p(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var x=function(e){function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==h(e)||null===e)throw new g("options","Object",e);var i=e.message,o=e.operator,c=e.stackStartFn,u=e.actual,l=e.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=i)r=a(this,d(t).call(this,String(i)));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(y="[34m",b="[32m",w="[39m",v="[31m"):(y="",b="",w="",v="")),"object"===h(u)&&null!==u&&"object"===h(l)&&null!==l&&"stack"in u&&u instanceof Error&&"stack"in l&&l instanceof Error&&(u=_(u),l=_(l)),"deepStrictEqual"===o||"strictEqual"===o)r=a(this,d(t).call(this,function(e,t,r){var i="",o="",a=0,s="",c=!1,u=E(e),l=u.split("\n"),f=E(t).split("\n"),d=0,p="";if("strictEqual"===r&&"object"===h(e)&&"object"===h(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===l.length&&1===f.length&&l[0]!==f[0]){var g=l[0].length+f[0].length;if(g<=10){if(!("object"===h(e)&&null!==e||"object"===h(t)&&null!==t||0===e&&0===t))return"".concat(A[r],"\n\n")+"".concat(l[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r&&g<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;l[0][d]===f[0][d];)d++;d>2&&(p="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",d),"^"),d=0)}}for(var _=l[l.length-1],x=f[f.length-1];_===x&&(d++<2?s="\n ".concat(_).concat(s):i=_,l.pop(),f.pop(),0!==l.length&&0!==f.length);)_=l[l.length-1],x=f[f.length-1];var k=Math.max(l.length,f.length);if(0===k){var S=u.split("\n");if(S.length>30)for(S[26]="".concat(y,"...").concat(w);S.length>27;)S.pop();return"".concat(A.notIdentical,"\n\n").concat(S.join("\n"),"\n")}d>3&&(s="\n".concat(y,"...").concat(w).concat(s),c=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var C=0,P=A[r]+"\n".concat(b,"+ actual").concat(w," ").concat(v,"- expected").concat(w),O=" ".concat(y,"...").concat(w," Lines skipped");for(d=0;d<k;d++){var I=d-a;if(l.length<d+1)I>1&&d>2&&(I>4?(o+="\n".concat(y,"...").concat(w),c=!0):I>3&&(o+="\n ".concat(f[d-2]),C++),o+="\n ".concat(f[d-1]),C++),a=d,i+="\n".concat(v,"-").concat(w," ").concat(f[d]),C++;else if(f.length<d+1)I>1&&d>2&&(I>4?(o+="\n".concat(y,"...").concat(w),c=!0):I>3&&(o+="\n ".concat(l[d-2]),C++),o+="\n ".concat(l[d-1]),C++),a=d,o+="\n".concat(b,"+").concat(w," ").concat(l[d]),C++;else{var B=f[d],T=l[d],M=T!==B&&(!m(T,",")||T.slice(0,-1)!==B);M&&m(B,",")&&B.slice(0,-1)===T&&(M=!1,T+=","),M?(I>1&&d>2&&(I>4?(o+="\n".concat(y,"...").concat(w),c=!0):I>3&&(o+="\n ".concat(l[d-2]),C++),o+="\n ".concat(l[d-1]),C++),a=d,o+="\n".concat(b,"+").concat(w," ").concat(T),i+="\n".concat(v,"-").concat(w," ").concat(B),C+=2):(o+=i,i="",1!==I&&0!==d||(o+="\n ".concat(T),C++))}if(C>20&&d<k-2)return"".concat(P).concat(O,"\n").concat(o,"\n").concat(y,"...").concat(w).concat(i,"\n")+"".concat(y,"...").concat(w)}return"".concat(P).concat(c?O:"","\n").concat(o).concat(i).concat(s).concat(p)}(u,l,o)));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var p=A[o],x=E(u).split("\n");if("notStrictEqual"===o&&"object"===h(u)&&null!==u&&(p=A.notStrictEqualObject),x.length>30)for(x[26]="".concat(y,"...").concat(w);x.length>27;)x.pop();r=1===x.length?a(this,d(t).call(this,"".concat(p," ").concat(x[0]))):a(this,d(t).call(this,"".concat(p,"\n\n").concat(x.join("\n"),"\n")))}else{var k=E(u),S="",C=A[o];"notDeepEqual"===o||"notEqual"===o?(k="".concat(A[o],"\n\n").concat(k)).length>1024&&(k="".concat(k.slice(0,1021),"...")):(S="".concat(E(l)),k.length>512&&(k="".concat(k.slice(0,509),"...")),S.length>512&&(S="".concat(S.slice(0,509),"...")),"deepEqual"===o||"equal"===o?k="".concat(C,"\n\n").concat(k,"\n\nshould equal\n\n"):S=" ".concat(o," ").concat(S)),r=a(this,d(t).call(this,"".concat(k).concat(S)))}return Error.stackTraceLimit=f,r.generatedMessage=!i,Object.defineProperty(s(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=u,r.expected=l,r.operator=o,Error.captureStackTrace&&Error.captureStackTrace(s(r),c),r.stack,r.name="AssertionError",a(r)}var r,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,e),r=t,c=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:p.custom,value:function(e,t){return p(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}({},t,{customInspect:!1,depth:0}))}}],c&&o(r.prototype,c),t}(c(Error));e.exports=x},47515:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}var a,s,c={};function u(e,t,r){r||(r=Error);var a=function(r){function a(r,o,s){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),c=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,i(a).call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,o,s))),c.code=e,c}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(a,r),a}(r);c[e]=a}function l(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",(function(e,t,i){var o,s,c,u,f;if(void 0===a&&(a=r(71696)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(s="not ",t.substr(0,s.length)===s)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))c="The ".concat(e," ").concat(o," ").concat(l(t,"type"));else{var d=("number"!=typeof f&&(f=0),f+".".length>(u=e).length||-1===u.indexOf(".",f)?"argument":"property");c='The "'.concat(e,'" ').concat(d," ").concat(o," ").concat(l(t,"type"))}return c+". Received type ".concat(n(i))}),TypeError),u("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(43335));var i=s.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),u("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===a&&(a=r(71696)),a(t.length>0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=c},26796:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o=void 0!==/a/g.flags,a=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},s=function(e){var t=[];return e.forEach((function(e,r){return t.push([r,e])})),t},c=Object.is?Object.is:r(34679),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:r(74782);function f(e){return e.call.bind(e)}var d=f(Object.prototype.hasOwnProperty),h=f(Object.prototype.propertyIsEnumerable),p=f(Object.prototype.toString),g=r(43335).types,m=g.isAnyArrayBuffer,y=g.isArrayBufferView,b=g.isDate,v=g.isMap,w=g.isRegExp,A=g.isSet,_=g.isNativeError,E=g.isBoxedPrimitive,x=g.isNumberObject,k=g.isStringObject,S=g.isBooleanObject,C=g.isBigIntObject,P=g.isSymbolObject,O=g.isFloat32Array,I=g.isFloat64Array;function B(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function T(e){return Object.keys(e).filter(B).concat(u(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function M(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function R(e,t,r,n){if(e===t)return 0!==e||!r||c(e,t);if(r){if("object"!==i(e))return"number"==typeof e&&l(e)&&l(t);if("object"!==i(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==i(e))return(null===t||"object"!==i(t))&&e==t;if(null===t||"object"!==i(t))return!1}var a,s,u,f,d=p(e);if(d!==p(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var h=T(e),g=T(t);return h.length===g.length&&j(e,t,r,n,1,h)}if("[object Object]"===d&&(!v(e)&&v(t)||!A(e)&&A(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(w(e)){if(!w(t)||(u=e,f=t,!(o?u.source===f.source&&u.flags===f.flags:RegExp.prototype.toString.call(u)===RegExp.prototype.toString.call(f))))return!1}else if(_(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(y(e)){if(r||!O(e)&&!I(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===M(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var B=T(e),R=T(t);return B.length===R.length&&j(e,t,r,n,0,B)}if(A(e))return!(!A(t)||e.size!==t.size)&&j(e,t,r,n,2);if(v(e))return!(!v(t)||e.size!==t.size)&&j(e,t,r,n,3);if(m(e)){if(s=t,(a=e).byteLength!==s.byteLength||0!==M(new Uint8Array(a),new Uint8Array(s)))return!1}else if(E(e)&&!function(e,t){return x(e)?x(t)&&c(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):k(e)?k(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):S(e)?S(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):C(e)?C(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):P(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return j(e,t,r,n,0)}function N(e,t){return t.filter((function(t){return h(e,t)}))}function j(e,t,r,n,i,o){if(5===arguments.length){o=Object.keys(e);var a=Object.keys(t);if(o.length!==a.length)return!1}for(var s=0;s<o.length;s++)if(!d(t,o[s]))return!1;if(r&&5===arguments.length){var c=u(e);if(0!==c.length){var l=0;for(s=0;s<c.length;s++){var f=c[s];if(h(e,f)){if(!h(t,f))return!1;o.push(f),l++}else if(h(t,f))return!1}var p=u(t);if(c.length!==p.length&&N(t,p).length!==l)return!1}else{var g=u(t);if(0!==g.length&&0!==N(t,g).length)return!1}}if(0===o.length&&(0===i||1===i&&0===e.length||0===e.size))return!0;if(void 0===n)n={val1:new Map,val2:new Map,position:0};else{var m=n.val1.get(e);if(void 0!==m){var y=n.val2.get(t);if(void 0!==y)return m===y}n.position++}n.val1.set(e,n.position),n.val2.set(t,n.position);var b=Z(e,t,r,o,n,i);return n.val1.delete(e),n.val2.delete(t),b}function L(e,t,r,n){for(var i=a(e),o=0;o<i.length;o++){var s=i[o];if(R(t,s,r,n))return e.delete(s),!0}return!1}function U(e){switch(i(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(l(e))return!1}return!0}function D(e,t,r){var n=U(r);return null!=n?n:t.has(n)&&!e.has(n)}function F(e,t,r,n,i){var o=U(r);if(null!=o)return o;var a=t.get(o);return!(void 0===a&&!t.has(o)||!R(n,a,!1,i))&&!e.has(o)&&R(n,a,!1,i)}function z(e,t,r,n,i,o){for(var s=a(e),c=0;c<s.length;c++){var u=s[c];if(R(r,u,i,o)&&R(n,t.get(u),i,o))return e.delete(u),!0}return!1}function Z(e,t,r,o,c,u){var l=0;if(2===u){if(!function(e,t,r,n){for(var o=null,s=a(e),c=0;c<s.length;c++){var u=s[c];if("object"===i(u)&&null!==u)null===o&&(o=new Set),o.add(u);else if(!t.has(u)){if(r)return!1;if(!D(e,t,u))return!1;null===o&&(o=new Set),o.add(u)}}if(null!==o){for(var l=a(t),f=0;f<l.length;f++){var d=l[f];if("object"===i(d)&&null!==d){if(!L(o,d,r,n))return!1}else if(!r&&!e.has(d)&&!L(o,d,r,n))return!1}return 0===o.size}return!0}(e,t,r,c))return!1}else if(3===u){if(!function(e,t,r,o){for(var a=null,c=s(e),u=0;u<c.length;u++){var l=n(c[u],2),f=l[0],d=l[1];if("object"===i(f)&&null!==f)null===a&&(a=new Set),a.add(f);else{var h=t.get(f);if(void 0===h&&!t.has(f)||!R(d,h,r,o)){if(r)return!1;if(!F(e,t,f,d,o))return!1;null===a&&(a=new Set),a.add(f)}}}if(null!==a){for(var p=s(t),g=0;g<p.length;g++){var m=n(p[g],2),y=(f=m[0],m[1]);if("object"===i(f)&&null!==f){if(!z(a,e,f,y,r,o))return!1}else if(!(r||e.has(f)&&R(e.get(f),y,!1,o)||z(a,e,f,y,!1,o)))return!1}return 0===a.size}return!0}(e,t,r,c))return!1}else if(1===u)for(;l<e.length;l++){if(!d(e,l)){if(d(t,l))return!1;for(var f=Object.keys(e);l<f.length;l++){var h=f[l];if(!d(t,h)||!R(e[h],t[h],r,c))return!1}return f.length===Object.keys(t).length}if(!d(t,l)||!R(e[l],t[l],r,c))return!1}for(l=0;l<o.length;l++){var p=o[l];if(!R(e[p],t[p],r,c))return!1}return!0}e.exports={isDeepEqual:function(e,t){return R(e,t,!1)},isDeepStrictEqual:function(e,t){return R(e,t,!0)}}},52611:(e,t,r)=>{"use strict";r.d(t,{d:()=>p});var n=r(34795),i=r(9249),o=r(87371),a=r(80753),s=r(88106),c=r(11987),u=r(95058),l=r(56666),f=r(82841),d=r.n(f),h=r(27590);var p=function(e){(0,s.Z)(m,e);var t,r,f,p,g=(f=m,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,u.Z)(f);if(p){var r=(0,u.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,c.Z)(this,e)});function m(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.Z)(this,m),e=g.call(this),(0,l.Z)((0,a.Z)(e),"clientId",void 0),e.clientId=t.clientId,e}return(0,o.Z)(m,[{key:"authenticateUser",value:(r=(0,n.Z)(d().mark((function e(){var t,r,n,i,o,a,s,c,u,l;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.provider&&null!==(t=this.chainConfig)&&void 0!==t&&t.chainId){e.next=2;break}throw h.RM.notConnectedError();case 2:if(r=this.chainConfig,n=r.chainNamespace,i=r.chainId,this.status===h.MP.CONNECTED){e.next=5;break}throw h.RM.notConnectedError("Not connected with wallet, Please login/connect first");case 5:return e.next=7,this.provider.request({method:"eth_accounts"});case 7:if(!((o=e.sent)&&o.length>0)){e.next=26;break}if(!(a=(0,h.Cb)(o[0],this.name))){e.next=14;break}if((0,h.$E)(a)){e.next=14;break}return e.abrupt("return",{idToken:a});case 14:return s={domain:window.location.origin,uri:window.location.href,address:o[0],chainId:parseInt(i,16),version:"1",nonce:Math.random().toString(36).slice(2),issuedAt:(new Date).toISOString()},e.next=17,(0,h.tV)(s,n);case 17:return c=e.sent,e.next=20,this.provider.request({method:"personal_sign",params:[c,o[0]]});case 20:return u=e.sent,e.next=23,(0,h.rn)(n,u,c,this.name,this.sessionTime,this.clientId);case 23:return l=e.sent,(0,h.Fr)(o[0],this.name,l),e.abrupt("return",{idToken:l});case 26:throw h.RM.notConnectedError("Not connected with wallet, Please login/connect first");case 27:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"disconnect",value:(t=(0,n.Z)(d().mark((function e(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.status===h.MP.CONNECTED){e.next=2;break}throw h.RM.disconnectionError("Not connected with wallet");case 2:return e.next=4,this.provider.request({method:"eth_accounts"});case 4:(t=e.sent)&&t.length>0&&(0,h.qz)(t[0],this.name);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),m}(h.J5)},47320:(e,t,r)=>{"use strict";r.d(t,{v:()=>m});var n=r(34795),i=r(9249),o=r(87371),a=r(80753),s=r(88106),c=r(11987),u=r(95058),l=r(56666),f=r(82841),d=r.n(f),h=r(27590),p=r(17022),g=r.n(p);var m=function(e){(0,s.Z)(y,e);var t,r,f,p,m=(f=y,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,u.Z)(f);if(p){var r=(0,u.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,c.Z)(this,e)});function y(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.Z)(this,y),e=m.call(this),(0,l.Z)((0,a.Z)(e),"clientId",void 0),e.clientId=t.clientId,e}return(0,o.Z)(y,[{key:"authenticateUser",value:(r=(0,n.Z)(d().mark((function e(){var t,r,n,i,o,a,s,c,u,l,f;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.provider&&null!==(t=this.chainConfig)&&void 0!==t&&t.chainId){e.next=2;break}throw h.RM.notConnectedError();case 2:if(r=this.chainConfig,n=r.chainNamespace,i=r.chainId,this.status===h.MP.CONNECTED){e.next=5;break}throw h.RM.notConnectedError("Not connected with wallet, Please login/connect first");case 5:return e.next=7,this.provider.request({method:"getAccounts"});case 7:if(!((o=e.sent)&&o.length>0)){e.next=27;break}if(!(a=(0,h.Cb)(o[0],this.name))){e.next=14;break}if((0,h.$E)(a)){e.next=14;break}return e.abrupt("return",{idToken:a});case 14:return s={domain:window.location.origin,uri:window.location.href,address:o[0],chainId:parseInt(i,16),version:"1",nonce:Math.random().toString(36).slice(2),issuedAt:(new Date).toISOString()},e.next=17,(0,h.tV)(s,n);case 17:return c=e.sent,u=(new TextEncoder).encode(c),e.next=21,this.provider.request({method:"signMessage",params:{message:u,display:"utf8"}});case 21:return l=e.sent,e.next=24,(0,h.rn)(n,g().encode(l),c,this.name,this.sessionTime,this.clientId);case 24:return f=e.sent,(0,h.Fr)(o[0],this.name,f),e.abrupt("return",{idToken:f});case 27:throw h.RM.notConnectedError("Not connected with wallet, Please login/connect first");case 28:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"disconnect",value:(t=(0,n.Z)(d().mark((function e(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.status===h.MP.CONNECTED){e.next=2;break}throw h.RM.disconnectionError("Not connected with wallet");case 2:return e.next=4,this.provider.request({method:"getAccounts"});case 4:(t=e.sent)&&t.length>0&&(0,h.qz)(t[0],this.name);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),y}(h.J5)},9441:(e,t,r)=>{"use strict";r.r(t),r.d(t,{MetamaskAdapter:()=>y});var n=r(34795),i=r(9249),o=r(87371),a=r(80753),s=r(93069),c=r(88106),u=r(11987),l=r(95058),f=r(56666),d=r(82841),h=r.n(d),p=r(16050),g=r.n(p),m=r(27590);var y=function(e){(0,c.Z)(A,e);var t,r,d,p,y,b,v,w=(b=A,v=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,l.Z)(b);if(v){var r=(0,l.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,u.Z)(this,e)});function A(e){var t;return(0,i.Z)(this,A),t=w.call(this,e),(0,f.Z)((0,a.Z)(t),"adapterNamespace",m.yk.EIP155),(0,f.Z)((0,a.Z)(t),"currentChainNamespace",m.EN.EIP155),(0,f.Z)((0,a.Z)(t),"type",m.hN.EXTERNAL),(0,f.Z)((0,a.Z)(t),"name",m.rW.METAMASK),(0,f.Z)((0,a.Z)(t),"status",m.MP.NOT_READY),(0,f.Z)((0,a.Z)(t),"rehydrated",!1),(0,f.Z)((0,a.Z)(t),"metamaskProvider",null),t.chainConfig=(null==e?void 0:e.chainConfig)||null,t.sessionTime=(null==e?void 0:e.sessionTime)||86400,t}return(0,o.Z)(A,[{key:"provider",get:function(){return this.status===m.MP.CONNECTED&&this.metamaskProvider?this.metamaskProvider:null},set:function(e){throw new Error("Not implemented")}},{key:"init",value:(y=(0,n.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,s.Z)((0,l.Z)(A.prototype),"checkInitializationRequirements",this).call(this),e.next=3,g()({mustBeMetaMask:!0});case 3:if(this.metamaskProvider=e.sent,this.metamaskProvider){e.next=6;break}throw m.Ty.notInstalled("Metamask extension is not installed");case 6:if(this.status=m.MP.READY,this.emit(m.n2.READY,m.rW.METAMASK),e.prev=8,m.cM.debug("initializing metamask adapter"),!t.autoConnect){e.next=14;break}return this.rehydrated=!0,e.next=14,this.connect();case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(8),this.emit(m.n2.ERRORED,e.t0);case 19:case"end":return e.stop()}}),e,this,[[8,16]])}))),function(e){return y.apply(this,arguments)})},{key:"setAdapterSettings",value:function(e){this.status!==m.MP.READY&&(null!=e&&e.sessionTime&&(this.sessionTime=e.sessionTime),null!=e&&e.clientId&&(this.clientId=e.clientId))}},{key:"connect",value:(p=(0,n.Z)(h().mark((function e(){var t=this;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,s.Z)((0,l.Z)(A.prototype),"checkConnectionRequirements",this).call(this),this.chainConfig||(this.chainConfig=(0,m.h2)(m.EN.EIP155,1)),this.status=m.MP.CONNECTING,this.emit(m.n2.CONNECTING,{adapter:m.rW.METAMASK}),this.metamaskProvider){e.next=6;break}throw m.RM.notConnectedError("Not able to connect with metamask");case 6:return e.prev=6,e.next=9,this.metamaskProvider.request({method:"eth_requestAccounts"});case 9:if(this.metamaskProvider.chainId===this.chainConfig.chainId){e.next=13;break}return e.next=13,this.switchChain(this.chainConfig);case 13:if(this.status=m.MP.CONNECTED,this.provider){e.next=16;break}throw m.RM.notConnectedError("Failed to connect with provider");case 16:return this.provider.once("disconnect",(function(){t.disconnect()})),this.emit(m.n2.CONNECTED,{adapter:m.rW.METAMASK,reconnected:this.rehydrated}),e.abrupt("return",this.provider);case 21:throw e.prev=21,e.t0=e.catch(6),this.status=m.MP.READY,this.rehydrated=!1,this.emit(m.n2.ERRORED,e.t0),m.RM.connectionError("Failed to login with metamask wallet");case 27:case"end":return e.stop()}}),e,this,[[6,21]])}))),function(){return p.apply(this,arguments)})},{key:"disconnect",value:(d=(0,n.Z)(h().mark((function e(){var t,r,n=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{cleanup:!1},e.next=3,(0,s.Z)((0,l.Z)(A.prototype),"disconnect",this).call(this);case 3:null===(t=this.provider)||void 0===t||t.removeAllListeners(),r.cleanup?(this.status=m.MP.NOT_READY,this.metamaskProvider=null):this.status=m.MP.READY,this.rehydrated=!1,this.emit(m.n2.DISCONNECTED);case 7:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getUserInfo",value:(r=(0,n.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.status===m.MP.CONNECTED){e.next=2;break}throw m.RM.notConnectedError("Not connected with wallet, Please login/connect first");case 2:return e.abrupt("return",{});case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"switchChain",value:(t=(0,n.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.metamaskProvider){e.next=2;break}throw m.RM.notConnectedError("Not connected with wallet");case 2:return e.prev=2,e.next=5,this.metamaskProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:t.chainId}]});case 5:case 12:e.next=15;break;case 7:if(e.prev=7,e.t0=e.catch(2),4902!==e.t0.code){e.next=14;break}return e.next=12,this.metamaskProvider.request({method:"wallet_addEthereumChain",params:[{chainId:t.chainId,chainName:t.displayName,rpcUrls:[t.rpcTarget]}]});case 14:throw e.t0;case 15:case"end":return e.stop()}}),e,this,[[2,7]])}))),function(e){return t.apply(this,arguments)})}]),A}(r(52611).d)},260:(e,t,r)=>{"use strict";r.r(t),r.d(t,{OpenloginAdapter:()=>_,getOpenloginDefaultOptions:()=>v});var n=r(74187),i=r(27590),o=r(34795),a=r(9249),s=r(87371),c=r(80753),u=r(93069),l=r(88106),f=r(11987),d=r(95058),h=r(56666),p=r(82841),g=r.n(p),m=r(79744),y=r(51344),b=r.n(y),v=function(e,t){return{adapterSettings:{network:n.dr.MAINNET,clientId:"",uxMode:n.$e.POPUP},chainConfig:e?(0,i.h2)(e,t):null,loginSettings:{}}};function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){(0,h.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _=function(e){(0,l.Z)(C,e);var t,p,y,w,_,E,x,k,S=(x=C,k=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,d.Z)(x);if(k){var r=(0,d.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,f.Z)(this,e)});function C(e){var t,r,o,s,u;(0,a.Z)(this,C),u=S.call(this),(0,h.Z)((0,c.Z)(u),"name",i.rW.OPENLOGIN),(0,h.Z)((0,c.Z)(u),"adapterNamespace",i.yk.MULTICHAIN),(0,h.Z)((0,c.Z)(u),"type",i.hN.IN_APP),(0,h.Z)((0,c.Z)(u),"openloginInstance",null),(0,h.Z)((0,c.Z)(u),"clientId",void 0),(0,h.Z)((0,c.Z)(u),"status",i.MP.NOT_READY),(0,h.Z)((0,c.Z)(u),"currentChainNamespace",i.EN.EIP155),(0,h.Z)((0,c.Z)(u),"openloginOptions",void 0),(0,h.Z)((0,c.Z)(u),"loginSettings",{}),(0,h.Z)((0,c.Z)(u),"privKeyProvider",null),i.cM.debug("const openlogin adapter",e);var l=v(null===(t=e.chainConfig)||void 0===t?void 0:t.chainNamespace,null===(r=e.chainConfig)||void 0===r?void 0:r.chainId);if(u.openloginOptions=A(A({clientId:"",network:n.dr.MAINNET},l.adapterSettings),e.adapterSettings||{}),u.clientId=null===(o=e.adapterSettings)||void 0===o?void 0:o.clientId,u.loginSettings=A(A({},l.loginSettings),e.loginSettings),u.sessionTime=u.loginSettings.sessionTime||86400,null!==(s=e.chainConfig)&&void 0!==s&&s.chainNamespace){var f;u.currentChainNamespace=null===(f=e.chainConfig)||void 0===f?void 0:f.chainNamespace;var d=l.chainConfig?l.chainConfig:{};if(u.chainConfig=A(A({},d),null==e?void 0:e.chainConfig),i.cM.debug("const openlogin chainConfig",u.chainConfig),!u.chainConfig.rpcTarget&&e.chainConfig.chainNamespace!==i.EN.OTHER)throw i.Ty.invalidParams("rpcTarget is required in chainConfig")}return u}return(0,s.Z)(C,[{key:"chainConfigProxy",get:function(){return this.chainConfig?A({},this.chainConfig):null}},{key:"provider",get:function(){var e;return(null===(e=this.privKeyProvider)||void 0===e?void 0:e.provider)||null},set:function(e){throw new Error("Not implemented")}},{key:"init",value:(E=(0,o.Z)(g().mark((function e(t){var r,o,a;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,u.Z)((0,d.Z)(C.prototype),"checkInitializationRequirements",this).call(this),null!==(r=this.openloginOptions)&&void 0!==r&&r.clientId){e.next=3;break}throw i.Ty.invalidParams("clientId is required before openlogin's initialization");case 3:if(this.chainConfig){e.next=5;break}throw i.Ty.invalidParams("chainConfig is required before initialization");case 5:return o=!1,this.openloginOptions.uxMode===n.$e.REDIRECT&&(a=(0,n.Gv)(),Object.keys(a).length>0&&a._pid&&(o=!0)),this.openloginOptions=A(A({},this.openloginOptions),{},{replaceUrlOnRedirect:o}),this.openloginInstance=new n.ZP(this.openloginOptions),i.cM.debug("initializing openlogin adapter init"),e.next=12,this.openloginInstance.init();case 12:if(this.status=i.MP.READY,this.emit(i.n2.READY,i.rW.OPENLOGIN),e.prev=14,i.cM.debug("initializing openlogin adapter"),!this.openloginInstance.privKey||!t.autoConnect&&!o){e.next=19;break}return e.next=19,this.connect();case 19:e.next=25;break;case 21:e.prev=21,e.t0=e.catch(14),i.cM.error("Failed to connect with cached openlogin provider",e.t0),this.emit("ERRORED",e.t0);case 25:case"end":return e.stop()}}),e,this,[[14,21]])}))),function(e){return E.apply(this,arguments)})},{key:"connect",value:(_=(0,o.Z)(g().mark((function e(t){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,u.Z)((0,d.Z)(C.prototype),"checkConnectionRequirements",this).call(this),this.status=i.MP.CONNECTING,this.emit(i.n2.CONNECTING,A(A({},t),{},{adapter:i.rW.OPENLOGIN})),e.prev=3,e.next=6,this.connectWithProvider(t);case 6:return e.abrupt("return",this.provider);case 9:if(e.prev=9,e.t0=e.catch(3),i.cM.error("Failed to connect with openlogin provider",e.t0),this.status=i.MP.READY,this.emit(i.n2.ERRORED,e.t0),null===e.t0||void 0===e.t0||!e.t0.message.includes("user closed popup")){e.next=16;break}throw i.RM.popupClosed();case 16:throw i.RM.connectionError("Failed to login with openlogin");case 17:case"end":return e.stop()}}),e,this,[[3,9]])}))),function(e){return _.apply(this,arguments)})},{key:"disconnect",value:(w=(0,o.Z)(g().mark((function e(){var t,r=arguments;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]?r[0]:{cleanup:!1},this.status===i.MP.CONNECTED){e.next=3;break}throw i.RM.notConnectedError("Not connected with wallet");case 3:if(this.openloginInstance){e.next=5;break}throw i.Ty.notReady("openloginInstance is not ready");case 5:return e.next=7,this.openloginInstance.logout();case 7:t.cleanup?(this.status=i.MP.NOT_READY,this.openloginInstance=null,this.privKeyProvider=null):this.status=i.MP.READY,this.emit(i.n2.DISCONNECTED);case 9:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"authenticateUser",value:(y=(0,o.Z)(g().mark((function e(){var t;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.status===i.MP.CONNECTED){e.next=2;break}throw i.RM.notConnectedError("Not connected with wallet, Please login/connect first");case 2:return e.next=4,this.getUserInfo();case 4:return t=e.sent,e.abrupt("return",{idToken:t.idToken});case 6:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{key:"getUserInfo",value:(p=(0,o.Z)(g().mark((function e(){var t;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.status===i.MP.CONNECTED){e.next=2;break}throw i.RM.notConnectedError("Not connected with wallet");case 2:if(this.openloginInstance){e.next=4;break}throw i.Ty.notReady("openloginInstance is not ready");case 4:return e.next=6,this.openloginInstance.getUserInfo();case 6:return t=e.sent,e.abrupt("return",t);case 8:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"setAdapterSettings",value:function(e){if(this.status!==i.MP.READY){var t=v();this.openloginOptions=A(A(A({},t.adapterSettings),this.openloginOptions||{}),e),e.sessionTime&&(this.loginSettings=A(A({},this.loginSettings),{},{sessionTime:e.sessionTime})),e.clientId&&(this.clientId=e.clientId)}}},{key:"setChainConfig",value:function(e){(0,u.Z)((0,d.Z)(C.prototype),"setChainConfig",this).call(this,e),this.currentChainNamespace=e.chainNamespace}},{key:"connectWithProvider",value:(t=(0,o.Z)(g().mark((function e(t){var o,a,s,c,u,l,f,d;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.chainConfig){e.next=2;break}throw i.Ty.invalidParams("chainConfig is required before initialization");case 2:if(this.openloginInstance){e.next=4;break}throw i.Ty.notReady("openloginInstance is not ready");case 4:if(this.currentChainNamespace!==i.EN.SOLANA){e.next=12;break}return e.next=7,Promise.resolve().then(r.bind(r,20809));case 7:o=e.sent,a=o.SolanaPrivateKeyProvider,this.privKeyProvider=new a({config:{chainConfig:this.chainConfig}}),e.next=25;break;case 12:if(this.currentChainNamespace!==i.EN.EIP155){e.next=20;break}return e.next=15,Promise.resolve().then(r.bind(r,39364));case 15:s=e.sent,c=s.EthereumPrivateKeyProvider,this.privKeyProvider=new c({config:{chainConfig:this.chainConfig}}),e.next=25;break;case 20:if(this.currentChainNamespace!==i.EN.OTHER){e.next=24;break}this.privKeyProvider=new m.FL,e.next=25;break;case 24:throw new Error("Invalid chainNamespace: ".concat(this.currentChainNamespace," found while connecting to wallet"));case 25:if(this.openloginInstance.privKey||!t){e.next=29;break}return this.loginSettings.curve||(this.loginSettings.curve=this.currentChainNamespace===i.EN.SOLANA?n.x7.ED25519:n.x7.SECP256K1),e.next=29,this.openloginInstance.login(b()(this.loginSettings,{loginProvider:t.loginProvider},{extraLoginOptions:A(A({},t.extraLoginOptions||{}),{},{login_hint:t.login_hint||(null===(u=t.extraLoginOptions)||void 0===u?void 0:u.login_hint)})}));case 29:if(!(l=this.openloginInstance.privKey)){e.next=41;break}if(this.currentChainNamespace!==i.EN.SOLANA){e.next=37;break}return e.next=34,Promise.resolve().then(r.bind(r,99234));case 34:f=e.sent,d=f.getED25519Key,l=d(l).sk.toString("hex");case 37:return e.next=39,this.privKeyProvider.setupProvider(l);case 39:this.status=i.MP.CONNECTED,this.emit(i.n2.CONNECTED,{adapter:i.rW.OPENLOGIN,reconnected:!t});case 41:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),C}(i.J5)},55859:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PhantomAdapter:()=>v});var n=r(34795),i=r(9249),o=r(87371),a=r(80753),s=r(93069),c=r(88106),u=r(11987),l=r(95058),f=r(56666),d=r(82841),h=r.n(d),p=r(27590),g=r(47320),m=r(20809);function y(e,t,r){return new Promise((function(i,o){r>0?setTimeout((0,n.Z)(h().mark((function n(){var a;return h().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e();case 2:(a=n.sent)&&i(a),a||y(e,t,r-1).then((function(e){return i(e),e})).catch((function(e){return o(e)}));case 5:case"end":return n.stop()}}),n)}))),t):i(!1)}))}var b=function(){var e=(0,n.Z)(h().mark((function e(){var t,r,n=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.length>0&&void 0!==n[0]?n[0]:{interval:1e3,count:3},"undefined"==typeof window||null===(t=window.solana)||void 0===t||!t.isPhantom){e.next=4;break}return e.abrupt("return",window.solana);case 4:return e.next=6,y((function(){var e;return null===(e=window.solana)||void 0===e?void 0:e.isPhantom}),r.interval,r.count);case 6:if(!e.sent){e.next=9;break}return e.abrupt("return",window.solana);case 9:return e.abrupt("return",null);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();var v=function(e){(0,c.Z)(_,e);var t,r,d,g,y,v,w,A=(v=_,w=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,l.Z)(v);if(w){var r=(0,l.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,u.Z)(this,e)});function _(e){var t;return(0,i.Z)(this,_),t=A.call(this,e),(0,f.Z)((0,a.Z)(t),"name",p.rW.PHANTOM),(0,f.Z)((0,a.Z)(t),"adapterNamespace",p.yk.SOLANA),(0,f.Z)((0,a.Z)(t),"currentChainNamespace",p.EN.SOLANA),(0,f.Z)((0,a.Z)(t),"type",p.hN.EXTERNAL),(0,f.Z)((0,a.Z)(t),"status",p.MP.NOT_READY),(0,f.Z)((0,a.Z)(t),"_wallet",null),(0,f.Z)((0,a.Z)(t),"phantomProvider",null),(0,f.Z)((0,a.Z)(t),"rehydrated",!1),(0,f.Z)((0,a.Z)(t),"_onDisconnect",(function(){t._wallet&&(t._wallet.off("disconnect",t._onDisconnect),t.rehydrated=!1,t.status=t.status===p.MP.CONNECTED?p.MP.READY:p.MP.NOT_READY,t.emit(p.n2.DISCONNECTED))})),t.chainConfig=(null==e?void 0:e.chainConfig)||null,t.sessionTime=(null==e?void 0:e.sessionTime)||86400,t}return(0,o.Z)(_,[{key:"isWalletConnected",get:function(){var e;return!(null===(e=this._wallet)||void 0===e||!e.isConnected||this.status!==p.MP.CONNECTED)}},{key:"provider",get:function(){var e;return(null===(e=this.phantomProvider)||void 0===e?void 0:e.provider)||null},set:function(e){throw new Error("Not implemented")}},{key:"setAdapterSettings",value:function(e){this.status!==p.MP.READY&&(null!=e&&e.sessionTime&&(this.sessionTime=e.sessionTime),null!=e&&e.clientId&&(this.clientId=e.clientId))}},{key:"init",value:(y=(0,n.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,s.Z)((0,l.Z)(_.prototype),"checkInitializationRequirements",this).call(this),this.chainConfig||(this.chainConfig=(0,p.h2)(p.EN.SOLANA,"0x1")),e.next=4,b({interval:500,count:3});case 4:if(this._wallet=e.sent,this._wallet){e.next=7;break}throw p.Ty.notInstalled();case 7:if(this.phantomProvider=new m.PhantomInjectedProvider({config:{chainConfig:this.chainConfig}}),this.status=p.MP.READY,this.emit(p.n2.READY,p.rW.PHANTOM),e.prev=10,p.cM.debug("initializing phantom adapter"),!t.autoConnect){e.next=16;break}return this.rehydrated=!0,e.next=16,this.connect();case 16:e.next=22;break;case 18:e.prev=18,e.t0=e.catch(10),p.cM.error("Failed to connect with cached phantom provider",e.t0),this.emit("ERRORED",e.t0);case 22:case"end":return e.stop()}}),e,this,[[10,18]])}))),function(e){return y.apply(this,arguments)})},{key:"connect",value:(g=(0,n.Z)(h().mark((function e(){var t,r=this;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(0,s.Z)((0,l.Z)(_.prototype),"checkConnectionRequirements",this).call(this),this.status=p.MP.CONNECTING,this.emit(p.n2.CONNECTING,{adapter:p.rW.PHANTOM}),this._wallet){e.next=6;break}throw p.Ty.notInstalled();case 6:if(this._wallet.isConnected){e.next=23;break}return t=this._wallet._handleDisconnect,e.prev=8,e.next=11,new Promise((function(e,i){var o=function(){var t=(0,n.Z)(h().mark((function t(){return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.connectWithProvider(r._wallet);case 2:e(r.provider);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();if(!r._wallet)return i(p.Ty.notInstalled());r._wallet.once("connect",o),r._wallet._handleDisconnect=function(){i(p.Ty.windowClosed());for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.apply(r._wallet,n)},r._wallet.connect().catch((function(e){i(e)}))}));case 11:e.next=18;break;case 13:if(e.prev=13,e.t0=e.catch(8),!(e.t0 instanceof p.up)){e.next=17;break}throw e.t0;case 17:throw p.RM.connectionError(null===e.t0||void 0===e.t0?void 0:e.t0.message);case 18:return e.prev=18,this._wallet._handleDisconnect=t,e.finish(18);case 21:e.next=25;break;case 23:return e.next=25,this.connectWithProvider(this._wallet);case 25:if(this._wallet.publicKey){e.next=27;break}throw p.RM.connectionError();case 27:return this._wallet.on("disconnect",this._onDisconnect),e.abrupt("return",this.provider);case 31:throw e.prev=31,e.t1=e.catch(0),this.status=p.MP.READY,this.rehydrated=!1,this.emit(p.n2.ERRORED,e.t1),e.t1;case 37:case"end":return e.stop()}}),e,this,[[0,31],[8,13,18,21]])}))),function(){return g.apply(this,arguments)})},{key:"disconnect",value:(d=(0,n.Z)(h().mark((function e(){var t,r,n=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{cleanup:!1},e.next=3,(0,s.Z)((0,l.Z)(_.prototype),"disconnect",this).call(this);case 3:return e.prev=3,e.next=6,null===(r=this._wallet)||void 0===r?void 0:r.disconnect();case 6:t.cleanup&&(this.status=p.MP.NOT_READY,this.phantomProvider=null,this._wallet=null),this.emit(p.n2.DISCONNECTED),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),this.emit(p.n2.ERRORED,p.RM.disconnectionError(null===e.t0||void 0===e.t0?void 0:e.t0.message));case 13:case"end":return e.stop()}}),e,this,[[3,10]])}))),function(){return d.apply(this,arguments)})},{key:"getUserInfo",value:(r=(0,n.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isWalletConnected){e.next=2;break}throw p.RM.notConnectedError("Not connected with wallet, Please login/connect first");case 2:return e.abrupt("return",{});case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"connectWithProvider",value:(t=(0,n.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.phantomProvider){e.next=2;break}throw p.RM.connectionError("No phantom provider");case 2:return e.next=4,this.phantomProvider.setupProvider(t);case 4:return this.status=p.MP.CONNECTED,this.emit(p.n2.CONNECTED,{adapter:p.rW.PHANTOM,reconnected:this.rehydrated}),e.abrupt("return",this.provider);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),_}(g.v)},73466:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TorusWalletAdapter:()=>Pe});var n=r(34795),i=r(9249),o=r(87371),a=r(80753),s=r(93069),c=r(88106),u=r(11987),l=r(95058),f=r(56666),d=r(82841),h=r.n(d);var p=r(23460),g=r(17391),m=r(51344),y=r.n(m),b=r(90190),v=r(58094),w=r(69378),A=r.n(w),_=r(58607),E=r(3171),x=r.n(E),k=r(79640),S=r.n(k),C=r(16162),P=r.n(C),O=r(22699),I=r(48834).Buffer;const B={GOOGLE:"google",FACEBOOK:"facebook",TWITCH:"twitch",REDDIT:"reddit",DISCORD:"discord",EMAIL_PASSWORDLESS:"torus-auth0-email-passwordless"},T={[B.GOOGLE]:"tkey-google",[B.FACEBOOK]:"tkey-facebook",[B.TWITCH]:"tkey-twitch",[B.REDDIT]:"tkey-reddit",[B.DISCORD]:"tkey-discord",[B.EMAIL_PASSWORDLESS]:"tkey-auth0-email-passwordless"},M="moonpay",R="wyre",N="rampnetwork",j="xanpool",L="mercuryo",U="transak",D="mainnet",F="matic",z="bsc_mainnet",Z="avalanche_mainnet",H={PRODUCTION:"production",DEVELOPMENT:"development",BINANCE:"binance",TESTING:"testing",LRC:"lrc",BETA:"beta",BNB:"bnb",POLYGON:"polygon"},q={BOTTOM_LEFT:"bottom-left",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",TOP_RIGHT:"top-right"},W={[M]:["AUD","BGN","BRL","CAD","CHF","CNY","COP","CZK","DKK","DOP","EGP","EUR","GBP","HKD","HRK","IDR","ILS","JPY","JOD","KES","KRW","KWD","LKR","MAD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PKR","PLN","RON","RUB","SEK","SGD","THB","TRY","TWD","USD","VND","ZAR"],[R]:["USD","EUR","GBP","AUD","CAD","NZD","ARS","BRL","CHF","CLP","COP","CZK","DKK","HKD","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","PHP","PLN","SEK","THB","VND","ZAR"],[N]:["USD","EUR","GBP"],[j]:["SGD","HKD","THB","PHP","INR","IDR","MYR","AUD","NZD","KRW"],[L]:["EUR","USD","GBP","TRY","JPY","BRL","NGN","VND","MXN","KRW"],[U]:["ARS","AUD","BBD","BGN","BMD","BRL","CAD","CHF","CLP","CRC","CZK","DKK","DOP","EUR","FJD","FKP","GBP","GIP","HRK","HUF","IDR","ILS","ISK","JMD","JPY","KES","KRW","MDL","MXN","MYR","NOK","NZD","PEN","PHP","PLN","PYG","RON","SEK","SGD","THB","TRY","TZS","USD","ZAR"]},K=new Set(["ETH","USDT","USDC","TUSD","EOSDT","USD","DAI","GUSD","DKKT","PAX","ILS","RUB","BYN","EUR","GBP","JPY","KRW","PLN","MXN","AUD","BRL","CAD","CHF","KPW","LAK","LBP","LKR","XOF","CNHT","DOGE","UAH","TRY","HKD","XJP","SGD","USC","NZD","NGN","RUR","COP","GHS","EGP","IDR","BHD","CRC","PEN","AED","DOP","PKR","HUF","VND","XAR","LTC","RON","OMR","MYR","DKK","UGX","ZMW","SAR","SEK","GEL","RWF","IRR","TZS","CNY","VEF","BDT","HRK","CLP","THB","XAF","ARS","UYU","SZL","KZT","NOK","KES","PAB","INR","CZK","MAD","TWD","PHP","ZAR","BOB","CDF","DASH","VES","ISK","MWK","BAM","TTD","XRP","JOD","RSD","HNL","BGN","GTQ","BWP","XMR","MMK","QAR","AOA","KWD","MUR","WUSD","WEUR","WAVES","WTRY","LRD","LSL","LYD","AWG","MDL","BTO","EURS","CHFT","MKD","MNT","MOP","MRO","MVR","VOLLAR","CKUSD","KHR","VUV","BITCNY","QC","BBD","NAD","NPR","PGK","PYG","BIF","BMD","BND","XLM","BNB","SCR","BAT","CRO","HT","KCS","LEO","LINK","MKR","NPXS","OMG","REP","ZB","ZIL","ZRX","BCH","BZD","CUP","CVE","DJF","DZD","ERN","ETB","FJD","FKP","BUSD","ANCT","ALL","AMD","ANG","CNYX","IQD","UZS","TND","GGP","XAU","KGS","GIP","JMD","ZEC","USDP","BSV","EMC2","SNT","GTO","POWR","EUSD","EURT","BCY","BTS","ATM","BLOCKPAY","ARDR","AMP","B2X","BITGOLD","BITEUR","ATB","BITUSD","AGRS","DFXT","HIKEN","BIX","KNC","EOS","COB","COSS","BMH","NANO","BDG","BNT","XVG","LKK1Y","LKK","USDK","EURN","NZDT","JSE","GMD","GNF","GYD","YER","XPF","HTG","SLL","SOS","WST","SVC","SYP","NEO","KMF","JUMP","AYA","BLAST","WGR","BCN","BTG","URALS","INN","USDQ","CNH","HUSD","BKRW","NZDX","EURX","CADX","USDEX","JPYX","AUDX","VNDC","EON","GBPX","CHFX","USDJ","IDRT","USDS","USDN","BIDR","IDK","BSD","BTN","KYD","NIO","SBD","SDG","SHP","TOP","XCD","XCHF","CNYT","GYEN","ZUSD","GOLD","TRX","TRYB","PLATC","STRAX","UST","GLM","VAI","BRZ","DDRST","XAUT","MIM"]);function V(e){return W[e].filter((e=>K.has(e)))}const G={[M]:{line1:"Credit/ Debit Card/ Apple Pay",line2:"4.5% or 5 USD",line3:"2,000€/day, 10,000€/mo",supportPage:"https://help.moonpay.io/en/",minOrderValue:24.99,maxOrderValue:5e4,validCurrencies:V(M),validCryptoCurrenciesByChain:{[D]:[{value:"aave",display:"AAVE"},{value:"bat",display:"BAT"},{value:"dai",display:"DAI"},{value:"eth",display:"ETH"},{value:"mkr",display:"MKR"},{value:"matic",display:"MATIC"},{value:"usdt",display:"USDT"},{value:"usdc",display:"USDC"}],[F]:[{value:"eth_polygon",display:"ETH"},{value:"matic_polygon",display:"MATIC"},{value:"usdc_polygon",display:"USDC"}],[z]:[{value:"bnb_bsc",display:"BNB"},{value:"busd_bsc",display:"BUSD"}],[Z]:[{value:"avax_cchain",display:"AVAX"}]},includeFees:!0,api:!0,enforceMax:!1},[R]:{line1:"Apple Pay/ Debit/ Credit Card",line2:"4.9% + 30¢ or 5 USD",line3:"$250/day",supportPage:"https://support.sendwyre.com/en/",minOrderValue:5,maxOrderValue:500,validCurrencies:V(R),validCryptoCurrenciesByChain:{[D]:[{value:"AAVE",display:"AAVE"},{value:"BAT",display:"BAT"},{value:"BUSD",display:"BUSD"},{value:"DAI",display:"DAI"},{value:"ETH",display:"ETH"},{value:"MKR",display:"MKR"},{value:"UNI",display:"UNI"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"}],[F]:[{value:"MUSDC",display:"USDC"}],[Z]:[{value:"AVAXC",display:"AVAXC"}]},includeFees:!1,api:!0,enforceMax:!1},[N]:{line1:"Debit Card/ <br>Apple Pay/ Bank transfer",line2:"0.49% - 2.9%",line3:"5,000€/purchase, 20,000€/mo",supportPage:"https://instant.ramp.network/",minOrderValue:50,maxOrderValue:2e4,validCurrencies:V(N),validCryptoCurrenciesByChain:{[D]:[{value:"ETH",display:"ETH"},{value:"DAI",display:"DAI"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"}],[F]:[{value:"MATIC_DAI",display:"DAI"},{value:"MATIC_MATIC",display:"MATIC"},{value:"MATIC_USDC",display:"USDC"}],[Z]:[{value:"AVAX",display:"AVAX"}]},includeFees:!0,api:!0,receiveHint:"walletTopUp.receiveHintRamp",enforceMax:!1},[j]:{line1:"PayNow/ InstaPay/ FPS/ GoJekPay/ UPI/ PromptPay/ <br>ViettelPay/ DuitNow",line2:"2.5% buying, 3% selling",line3:"$2,500 / day",supportPage:"mailto:support@xanpool.com",minOrderValue:100,maxOrderValue:2500,validCurrencies:V(j),validCryptoCurrenciesByChain:{[D]:[{value:"ETH",display:"ETH"},{value:"USDT",display:"USDT"}]},includeFees:!0,api:!0,sell:!0,enforceMax:!1},[L]:{line1:"Credit/ Debit Card/ Apple Pay",line2:"3.95% or 4 USD",line3:"10,000€/day, 25,000€/mo",supportPage:"mailto:support@mercuryo.io",minOrderValue:30,maxOrderValue:5e3,validCurrencies:V(L),validCryptoCurrenciesByChain:{[D]:[{value:"ETH",display:"ETH"},{value:"BAT",display:"BAT"},{value:"USDT",display:"USDT"},{value:"DAI",display:"DAI"}],[z]:[{value:"BNB",display:"BNB"},{value:"BUSD",display:"BUSD"},{value:"1INCH",display:"1INCH"}]},includeFees:!0,api:!0,enforceMax:!1},[U]:{line1:"Apple & Google Pay / Credit/Debit Card<br/>Bangkok Bank Mobile & iPay<br/>Bank Transfer (sepa/gbp) / SCB Mobile & Easy",line2:"0.99% - 5.5% or 5 USD",line3:"$5,000/day, $28,000/mo",supportPage:"https://support.transak.com/hc/en-US",minOrderValue:30,maxOrderValue:500,validCurrencies:V(U),validCryptoCurrenciesByChain:{[D]:[{value:"AAVE",display:"AAVE"},{value:"DAI",display:"DAI"},{value:"ETH",display:"ETH"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"}],[F]:[{value:"AAVE",display:"AAVE"},{value:"DAI",display:"DAI"},{value:"MATIC",display:"MATIC"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"},{value:"WETH",display:"WETH"}],[z]:[{value:"BNB",display:"BNB"},{value:"BUSD",display:"BUSD"}],[Z]:[{value:"AVAX",display:"AVAX"}]},includeFees:!0,enforceMax:!0}};var $={supportedVerifierList:Object.values(B),paymentProviders:G,api:"https://api.tor.us",translations:{en:{embed:{continue:"Continue",actionRequired:"Authorization required",pendingAction:"Click continue to proceed with your request in a popup",cookiesRequired:"Cookies Required",enableCookies:"Please enable cookies in your browser preferences to access Torus",clickHere:"More Info"}},de:{embed:{continue:"Fortsetzen",actionRequired:"Autorisierung erforderlich",pendingAction:"Klicken Sie in einem Popup auf Weiter, um mit Ihrer Anfrage fortzufahren",cookiesRequired:"Cookies benötigt",enableCookies:"Bitte aktivieren Sie Cookies in Ihren Browsereinstellungen, um auf Torus zuzugreifen",clickHere:"Mehr Info"}},ja:{embed:{continue:"継続する",actionRequired:"認証が必要です",pendingAction:"続行をクリックして、ポップアップでリクエストを続行します",cookiesRequired:"必要なクッキー",enableCookies:"Torusにアクセスするには、ブラウザの設定でCookieを有効にしてください。",clickHere:"詳しくは"}},ko:{embed:{continue:"계속하다",actionRequired:"승인 필요",pendingAction:"팝업에서 요청을 진행하려면 계속을 클릭하십시오.",cookiesRequired:"쿠키 필요",enableCookies:"브라우저 환경 설정에서 쿠키를 활성화하여 Torus에 액세스하십시오.",clickHere:"더 많은 정보"}},zh:{embed:{continue:"继续",actionRequired:"需要授权",pendingAction:"单击继续以在弹出窗口中继续您的请求",cookiesRequired:"必填Cookie",enableCookies:"请在您的浏览器首选项中启用cookie以访问Torus。",clickHere:"更多信息"}}},prodTorusUrl:"",localStorageKeyPrefix:"torus-"};const J=e=>new Promise(((t,r)=>{null!=window.document.body?Promise.resolve(e()).then(t).catch(r):window.document.addEventListener("DOMContentLoaded",(()=>{Promise.resolve(e()).then(t).catch(r)}))})),Y=e=>{const t=window.document.createElement("template"),r=e.trim();return t.innerHTML=r,t.content.firstChild},X=(e,t,r)=>{const n=i=>{r(i),e.removeListener(t,n)};e.on(t,n)};var Q=S().getLogger("torus-embed"),ee={errors:{disconnected:()=>"Torus: Lost connection to Torus.",permanentlyDisconnected:()=>"Torus: Disconnected from iframe. Page reload required.",sendSiteMetadata:()=>"Torus: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:e=>`Torus: The Torus Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidOptions:(e,t)=>`Invalid options. Received: { maxEventListeners: ${e}, shouldSendMetadata: ${t} }`,invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`Torus: Connected to chain with ID "${e}".`},warnings:{enableDeprecation:'Torus: ""ethereum.enable()" is deprecated and may be removed in the future. Please use "ethereum.send("eth_requestAccounts")" instead. For more information, see: https://eips.ethereum.org/EIPS/eip-1102',sendDeprecation:'Torus: "ethereum.send(...)" is deprecated and may be removed in the future. Please use "ethereum.sendAsync(...)" or "ethereum.request(...)" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193',events:{close:'Torus: The event "close" is deprecated and may be removed in the future. Please use "disconnect" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193',data:'Torus: The event "data" is deprecated and will be removed in the future.Use "message" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message',networkChanged:'Torus: The event "networkChanged" is deprecated and may be removed in the future. Please use "chainChanged" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193',notification:'Torus: The event "notification" is deprecated and may be removed in the future. Please use "message" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193'},publicConfigStore:'Torus: The property "publicConfigStore" is deprecated and WILL be removed in the future.'}};const{paymentProviders:te}=$;function re(e,t,r){let n=`MetaMask: Lost connection to "${e}".`;null!=t&&t.stack&&(n+=`\n${t.stack}`),Q.warn(n),r&&r.listenerCount("error")>0&&r.emit("error",n)}const ne=()=>Math.random().toString(36).slice(2),ie=async(e,t)=>{let r,n;let i=t.version||"1.36.6";try{if(("binance"===e||"production"===e)&&!t.version){let e;e=$.prodTorusUrl?{data:$.prodTorusUrl}:await(0,p.U2)(`${$.api}/latestversion?name=@toruslabs/torus-embed&version=1.36.6`,{},{useAPIKey:!0}),i=e.data,$.prodTorusUrl=e.data}}catch(e){Q.error(e,"unable to fetch latest version")}switch(Q.info("version used: ",i),e){case"binance":r=`https://binance.tor.us/v${i}`,n="info";break;case"testing":r="https://testing.tor.us",n="debug";break;case"bnb":r="https://bnb.tor.us",n="error";break;case"polygon":r="https://polygon.tor.us",n="error";break;case"lrc":r="https://lrc.tor.us",n="debug";break;case"beta":r="https://beta.tor.us",n="debug";break;case"development":r="http://localhost:4050",n="debug";break;default:r=`https://app.tor.us/v${i}`,n="error"}return{torusUrl:r,logLevel:n}},oe=()=>{let e=window.navigator.language||"en-US";const t=e.split("-");return e=Object.prototype.hasOwnProperty.call($.translations,t[0])?t[0]:"en",e},ae=["eth_subscription"],se=()=>{},ce="directories=0,titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=660,width=375",ue="directories=0,titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=700,width=450";function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}g.Ue.defaultMaxListeners=100;const fe=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(n,i)=>n||i.error?t(n||i.error):!r||Array.isArray(i)?e(i):e(i.result)};class de extends g.Ue{constructor(e){let{maxEventListeners:t=100,shouldSendMetadata:r=!0,jsonRpcStreamName:n="provider"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(super(),(0,f.Z)(this,"chainId",void 0),(0,f.Z)(this,"selectedAddress",void 0),(0,f.Z)(this,"_rpcEngine",void 0),(0,f.Z)(this,"networkVersion",void 0),(0,f.Z)(this,"shouldSendMetadata",void 0),(0,f.Z)(this,"isTorus",void 0),(0,f.Z)(this,"_publicConfigStore",void 0),(0,f.Z)(this,"tryPreopenHandle",void 0),(0,f.Z)(this,"enable",void 0),(0,f.Z)(this,"_state",void 0),(0,f.Z)(this,"_jsonRpcConnection",void 0),(0,f.Z)(this,"_sentWarnings",{enable:!1,experimentalMethods:!1,send:!1,publicConfigStore:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}}),!(0,_.duplex)(e))throw new Error(ee.errors.invalidDuplexStream());this.isTorus=!0,this.setMaxListeners(t),this._state=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?le(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},de._defaultState),this.selectedAddress=null,this.networkVersion=null,this.chainId=null,this.shouldSendMetadata=r,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this),this._sendSync=this._sendSync.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this._warnOfDeprecation=this._warnOfDeprecation.bind(this),this._initializeState=this._initializeState.bind(this),this.request=this.request.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this);const i=new g.O4;x()(e,i,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this._publicConfigStore=new b.ObservableStore({storageKey:"Metamask-Config"}),x()(i.createStream("publicConfig"),(0,b.storeAsStream)(this._publicConfigStore),re.bind(this,"MetaMask PublicConfigStore")),i.ignoreStream("phishing"),this.on("connect",(()=>{this._state.isConnected=!0}));const o=(0,g.AP)();x()(o.stream,i.createStream(n),o.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider"));const a=new g.eI;a.push((0,g.Rq)()),a.push(((e,t,r)=>{"string"==typeof e.method&&e.method||(t.error=v.Sy.rpc.invalidRequest({message:"The request 'method' must be a non-empty string.",data:e})),r((e=>{const{error:r}=t;return r?(Q.error(`MetaMask - RPC Error: ${r.message}`,r),e()):e()}))})),a.push(o.middleware),this._rpcEngine=a,o.events.on("notification",(e=>{const{method:t,params:r}=e;"wallet_accountsChanged"===t?this._handleAccountsChanged(r):"wallet_unlockStateChanged"===t?this._handleUnlockStateChanged(r):"wallet_chainChanged"===t?this._handleChainChanged(r):ae.includes(e.method)&&(this.emit("data",e),this.emit("notification",r.result),this.emit("message",{type:t,data:r}))}))}get publicConfigStore(){return this._sentWarnings.publicConfigStore||(Q.warn(ee.warnings.publicConfigStore),this._sentWarnings.publicConfigStore=!0),this._publicConfigStore}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw v.Sy.rpc.invalidRequest({message:ee.errors.invalidRequestArgs(),data:e});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw v.Sy.rpc.invalidRequest({message:ee.errors.invalidRequestMethod(),data:e});if(void 0!==r&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw v.Sy.rpc.invalidRequest({message:ee.errors.invalidRequestParams(),data:e});return new Promise(((e,n)=>{this._rpcRequest({method:t,params:r},fe(e,n))}))}sendAsync(e,t){this._rpcRequest(e,t)}addListener(e,t){return this._warnOfDeprecation(e),super.addListener(e,t)}on(e,t){return this._warnOfDeprecation(e),super.on(e,t)}once(e,t){return this._warnOfDeprecation(e),super.once(e,t)}prependListener(e,t){return this._warnOfDeprecation(e),super.prependListener(e,t)}prependOnceListener(e,t){return this._warnOfDeprecation(e),super.prependOnceListener(e,t)}async _initializeState(){try{const{accounts:e,chainId:t,isUnlocked:r,networkVersion:n}=await this.request({method:"wallet_getProviderState"});this.emit("connect",{chainId:t}),this._handleChainChanged({chainId:t,networkVersion:n}),this._handleUnlockStateChanged({accounts:e,isUnlocked:r}),this._handleAccountsChanged(e)}catch(e){Q.error("MetaMask: Failed to get initial state. Please report this bug.",e)}finally{Q.info("initialized state"),this._state.initialized=!0,this.emit("_initialized")}}_rpcRequest(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t;const i=e;if(!Array.isArray(i))if(i.jsonrpc||(i.jsonrpc="2.0"),"eth_accounts"===i.method||"eth_requestAccounts"===i.method)n=(e,n)=>{this._handleAccountsChanged(n.result||[],"eth_accounts"===i.method,r),t(e,n)};else if("wallet_getProviderState"===i.method)return void this._rpcEngine.handle(e,n);this.tryPreopenHandle(i,n)}send(e,t){return this._sentWarnings.send||(Q.warn(ee.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof e||t&&!Array.isArray(t)?e&&"object"==typeof e&&"function"==typeof t?this._rpcRequest(e,t):this._sendSync(e):new Promise(((r,n)=>{try{this._rpcRequest({method:e,params:t},fe(r,n,!1))}catch(e){n(e)}}))}_sendSync(e){let t;switch(e.method){case"eth_accounts":t=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":t=this.selectedAddress||null;break;case"eth_uninstallFilter":this._rpcRequest(e,se),t=!0;break;case"net_version":t=this.networkVersion||null;break;default:throw new Error(ee.errors.unsupportedSync(e.method))}return{id:e.id,jsonrpc:e.jsonrpc,result:t}}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),Q.debug(ee.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new v.Cg(1013,t||ee.errors.disconnected()),Q.debug(r)):(r=new v.Cg(1011,t||ee.errors.permanentlyDisconnected()),Q.error(r),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleStreamDisconnect(e,t){re(e,t,this),this._handleDisconnect(!1,t?t.message:void 0)}_handleAccountsChanged(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e;Array.isArray(n)||(Q.error("MetaMask: Received non-array accounts parameter. Please report this bug.",n),n=[]);for(const t of e)if("string"!=typeof t){Q.error("MetaMask: Received non-string account. Please report this bug.",e),n=[];break}A()(this._state.accounts,n)||(t&&Array.isArray(this._state.accounts)&&this._state.accounts.length>0&&!r&&Q.error('MetaMask: "eth_accounts" unexpectedly updated accounts. Please report this bug.',n),this._state.accounts=n,this.emit("accountsChanged",n)),this.selectedAddress!==n[0]&&(this.selectedAddress=n[0]||null)}_handleChainChanged(){let{chainId:e,networkVersion:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e&&t?"loading"===t?this._handleDisconnect(!0):(this._handleConnect(e),e!==this.chainId&&(this.chainId=e,this._state.initialized&&this.emit("chainChanged",this.chainId))):Q.error("MetaMask: Received invalid network parameters. Please report this bug.",{chainId:e,networkVersion:t})}_handleUnlockStateChanged(){let{accounts:e,isUnlocked:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e||[])):Q.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.",{isUnlocked:t})}_warnOfDeprecation(e){!1===this._sentWarnings.events[e]&&(Q.warn(ee.warnings.events[e]),this._sentWarnings.events[e]=!0)}}(0,f.Z)(de,"_defaultState",{accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1,hasEmittedConnection:!1});const he=(e,t)=>{const r={};return e.algorithms.forEach((e=>{r[e]=P()(e).update(t,"utf8").digest("base64")})),r};class pe extends O.EventEmitter{constructor(e){let{url:t,target:r,features:n}=e;super(),(0,f.Z)(this,"url",void 0),(0,f.Z)(this,"target",void 0),(0,f.Z)(this,"features",void 0),(0,f.Z)(this,"window",void 0),(0,f.Z)(this,"windowTimer",void 0),(0,f.Z)(this,"iClosedWindow",void 0),this.url=t,this.target=r||"_blank",this.features=n||function(){const e=void 0!==window.screenLeft?window.screenLeft:window.screenX,t=void 0!==window.screenTop?window.screenTop:window.screenY,r=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,n=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,i=Math.abs((r-1200)/2/1+e);return`titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=700,width=1200,top=${Math.abs((n-700)/2/1+t)},left=${i}`}(),this.window=void 0,this.windowTimer=void 0,this.iClosedWindow=!1,this._setupTimer()}_setupTimer(){this.windowTimer=Number(setInterval((()=>{this.window&&this.window.closed&&(clearInterval(this.windowTimer),this.iClosedWindow||this.emit("close"),this.iClosedWindow=!1,this.window=void 0),void 0===this.window&&clearInterval(this.windowTimer)}),500))}open(){var e;return this.window=window.open(this.url.href,this.target,this.features),null!==(e=this.window)&&void 0!==e&&e.focus&&this.window.focus(),Promise.resolve()}close(){this.iClosedWindow=!0,this.window&&this.window.close()}redirect(e){e?window.location.replace(this.url.href):window.location.href=this.url.href}}function ge(e){return new Promise(((t,r)=>{try{const r=document.createElement("img");r.onload=()=>t(!0),r.onerror=()=>t(!1),r.src=e}catch(e){r(e)}}))}const me=e=>{const{document:t}=e,r=t.querySelector('head > meta[property="og:site_name"]');if(r)return r.content;const n=t.querySelector('head > meta[name="title"]');return n?n.content:t.title&&t.title.length>0?t.title:e.location.hostname};async function ye(e){const{document:t}=e;let r=t.querySelector('head > link[rel="shortcut icon"]');return r&&await ge(r.href)?r.href:(r=Array.from(t.querySelectorAll('head > link[rel="icon"]')).find((e=>Boolean(e.href))),r&&await ge(r.href)?r.href:null)}const be=["host","chainId","networkName"];function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ae={google:!0,facebook:!0,reddit:!0,twitch:!0,discord:!0},_e="sha384-Pb7G8rZSTSWFSNY/HIYqnbm70jkJYwOhspN6ORusS4aj/6/daesqQawTMemuq3jU",Ee=["eth_sendTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","eth_getEncryptionPublicKey","eth_decrypt"];!async function(){try{if("undefined"==typeof document)return;const e=document.createElement("link"),{torusUrl:t}=await ie("production",{check:!1,hash:_e,version:""});e.href=`${t}/popup`,e.crossOrigin="anonymous",e.type="text/html",e.rel="prefetch",e.relList&&e.relList.supports&&e.relList.supports("prefetch")&&document.head.appendChild(e)}catch(e){Q.warn(e)}}();class xe{constructor(){let{buttonPosition:e=q.BOTTOM_LEFT,buttonSize:t=56,modalZIndex:r=99999,apiKey:n="torus-default"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,f.Z)(this,"buttonPosition",q.BOTTOM_LEFT),(0,f.Z)(this,"buttonSize",void 0),(0,f.Z)(this,"torusUrl",void 0),(0,f.Z)(this,"torusIframe",void 0),(0,f.Z)(this,"styleLink",void 0),(0,f.Z)(this,"isLoggedIn",void 0),(0,f.Z)(this,"isInitialized",void 0),(0,f.Z)(this,"torusWidgetVisibility",void 0),(0,f.Z)(this,"torusAlert",void 0),(0,f.Z)(this,"apiKey",void 0),(0,f.Z)(this,"modalZIndex",void 0),(0,f.Z)(this,"alertZIndex",void 0),(0,f.Z)(this,"torusAlertContainer",void 0),(0,f.Z)(this,"isIframeFullScreen",void 0),(0,f.Z)(this,"whiteLabel",void 0),(0,f.Z)(this,"requestedVerifier",void 0),(0,f.Z)(this,"currentVerifier",void 0),(0,f.Z)(this,"embedTranslations",void 0),(0,f.Z)(this,"ethereum",void 0),(0,f.Z)(this,"provider",void 0),(0,f.Z)(this,"communicationMux",void 0),(0,f.Z)(this,"isLoginCallback",void 0),(0,f.Z)(this,"paymentProviders",$.paymentProviders),(0,f.Z)(this,"loginHint",""),(0,f.Z)(this,"useWalletConnect",void 0),(0,f.Z)(this,"isCustomLogin",!1),this.buttonPosition=e,this.buttonSize=t,this.torusUrl="",this.isLoggedIn=!1,this.isInitialized=!1,this.torusWidgetVisibility=!0,this.requestedVerifier="",this.currentVerifier="",this.apiKey=n,(0,p.ut)(n),this.modalZIndex=r,this.alertZIndex=r+1e3,this.isIframeFullScreen=!1}async init(){let{buildEnv:e=H.PRODUCTION,enableLogging:t=!1,enabledVerifiers:r=Ae,network:n={host:"mainnet",chainId:null,networkName:"",blockExplorer:"",ticker:"",tickerName:""},loginConfig:i={},showTorusButton:o=!0,integrity:a={check:!1,hash:_e,version:""},whiteLabel:s,skipTKey:c=!1,useWalletConnect:u=!1,mfaLevel:l="default"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.isInitialized)throw new Error("Already initialized");const{torusUrl:f,logLevel:d}=await ie(e,a);Q.info(f,"url loaded"),this.torusUrl=f,this.whiteLabel=s,this.useWalletConnect=u,this.isCustomLogin=!!(i&&Object.keys(i).length>0)||!!(s&&Object.keys(s).length>0),Q.setDefaultLevel(d),t?Q.enableAll():Q.disableAll(),this.torusWidgetVisibility=o;const h=new URL(f);h.pathname.endsWith("/")?h.pathname+="popup":h.pathname+="/popup",h.hash=`#isCustomLogin=${this.isCustomLogin}`,this.torusIframe=Y(`<iframe\n id="torusIframe"\n allow=${u?"camera":""}\n class="torusIframe"\n src="${h.href}"\n style="display: none; position: fixed; top: 0; right: 0; width: 100%;\n height: 100%; border: none; border-radius: 0; z-index: ${this.modalZIndex}"\n ></iframe>`),this.torusAlertContainer=Y('<div id="torusAlertContainer"></div>'),this.torusAlertContainer.style.display="none",this.torusAlertContainer.style.setProperty("z-index",this.alertZIndex.toString());const p=window.document.createElement("link");p.setAttribute("rel","stylesheet"),p.setAttribute("type","text/css"),p.setAttribute("href",`${f}/css/widget.css`),this.styleLink=p;const{defaultLanguage:g=oe(),customTranslations:m={}}=this.whiteLabel||{},b=y()($.translations,m)[g]||$.translations[oe()];this.embedTranslations=b.embed;const v=async()=>(await async function(){return new Promise((e=>{"loading"!==document.readyState?e():function(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];const a=()=>{r(...i),e.removeEventListener(t,a)};e.addEventListener(t,a)}(document,"DOMContentLoaded",e)}))}(),new Promise(((e,t)=>{this.torusIframe.onload=async()=>{this._setupWeb3();const o=this.communicationMux.getStream("init_stream");o.on("data",(r=>{const{name:n,data:i,error:o}=r;"init_complete"===n&&i.success?(this.isInitialized=!0,this._displayIframe(this.isIframeFullScreen),e(void 0)):o&&t(new Error(o))})),o.write({name:"init_stream",data:{enabledVerifiers:r,loginConfig:i,whiteLabel:this.whiteLabel,buttonPosition:this.buttonPosition,buttonSize:this.buttonSize,torusWidgetVisibility:this.torusWidgetVisibility,apiKey:this.apiKey,skipTKey:c,network:n,mfaLevel:l}})},window.document.head.appendChild(this.styleLink),window.document.body.appendChild(this.torusIframe),window.document.body.appendChild(this.torusAlertContainer)})));if("production"===e&&a.check){const e=`${f}/popup`,t=await fetch(e,{cache:"reload"});if("max-age=3600"!==t.headers.get("Cache-Control"))throw new Error(`Unexpected Cache-Control headers, got ${t.headers.get("Cache-Control")}`);const r=((e,t)=>{const r=(e=>({algorithms:e.algorithms||["sha256"],delimiter:e.delimiter||" ",full:e.full||!1}))(e),n={hashes:he(r,t),integrity:void 0};return n.integrity=((e,t)=>{let r="";return r+=Object.keys(t.hashes).map((e=>`${e}-${t.hashes[e]}`)).join(e.delimiter),r})(r,n),r.full?n:n.integrity})({algorithms:["sha384"]},await t.text());if(Q.info(r,"integrity"),r!==a.hash)throw this.clearInit(),new Error("Integrity check failed");await v()}else await v()}login(){let{verifier:e="",login_hint:t=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isInitialized)throw new Error("Call init() first");return this.requestedVerifier=e,this.loginHint=t,this.ethereum.enable()}logout(){return new Promise(((e,t)=>{if(!this.isLoggedIn)return void t(new Error("User has not logged in yet"));this.communicationMux.getStream("logout").write({name:"logOut"});const r=this.communicationMux.getStream("status");X(r,"data",(r=>{r.loggedIn?t(new Error("Some Error Occured")):(this.isLoggedIn=!1,this.currentVerifier="",this.requestedVerifier="",e())}))}))}async cleanUp(){this.isLoggedIn&&await this.logout(),this.clearInit()}clearInit(){function e(e){return e instanceof Element||e instanceof HTMLDocument}e(this.styleLink)&&window.document.body.contains(this.styleLink)&&(this.styleLink.remove(),this.styleLink=void 0),e(this.torusIframe)&&window.document.body.contains(this.torusIframe)&&(this.torusIframe.remove(),this.torusIframe=void 0),e(this.torusAlertContainer)&&window.document.body.contains(this.torusAlertContainer)&&(this.torusAlert=void 0,this.torusAlertContainer.remove(),this.torusAlertContainer=void 0),this.isInitialized=!1}hideTorusButton(){this.torusWidgetVisibility=!1,this._sendWidgetVisibilityStatus(!1),this._displayIframe()}showTorusButton(){this.torusWidgetVisibility=!0,this._sendWidgetVisibilityStatus(!0),this._displayIframe()}setProvider(e){let{host:t="mainnet",chainId:r=null,networkName:n=""}=e,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,be);return new Promise(((e,o)=>{const a=this.communicationMux.getStream("provider_change");X(a,"data",(t=>{const{err:r,success:n}=t.data;Q.info(t),r?o(r):n?e():o(new Error("some error occured"))}));const s=ne();this._handleWindow(s,{target:"_blank",features:ce}),a.write({name:"show_provider_change",data:{network:we({host:t,chainId:r,networkName:n},i),preopenInstanceId:s,override:!1}})}))}showWallet(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.communicationMux.getStream("show_wallet"),n=e?`/${e}`:"";r.write({name:"show_wallet",data:{path:n}}),X(r,"data",(e=>{if("show_wallet_instance"===e.name){const{instanceId:r}=e.data,i=new URL(`${this.torusUrl}/wallet${n}`);i.searchParams.append("integrity","true"),i.searchParams.append("instanceId",r),Object.keys(t).forEach((e=>{i.searchParams.append(e,t[e])})),i.hash=`#isCustomLogin=${this.isCustomLogin}`,new pe({url:i,features:"directories=0,titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=740,width=1315"}).open()}}))}async getPublicAddress(e){let{verifier:t,verifierId:r,isExtended:n=!1}=e;if(!$.supportedVerifierList.includes(t)||!T[t])throw new Error("Unsupported verifier");const i=t,o=T[t],a=new URL("https://api.tor.us/lookup/torus");return a.searchParams.append("verifier",o),a.searchParams.append("verifierId",r),a.searchParams.append("walletVerifier",i),a.searchParams.append("network","mainnet"),a.searchParams.append("isExtended",n.toString()),(0,p.U2)(a.href,{headers:{"Content-Type":"application/json; charset=utf-8"}},{useAPIKey:!0})}getUserInfo(e){return new Promise(((t,r)=>{if(this.isLoggedIn){const n=this.communicationMux.getStream("user_info_access");n.write({name:"user_info_access_request"});const i=n=>{const{name:i,data:{approved:o,payload:a,rejected:s,newRequest:c}}=n;if("user_info_access_response"===i)if(o)t(a);else if(s)r(new Error("User rejected the request"));else if(c){const n=this.communicationMux.getStream("user_info");X(n,"data",(e=>{"user_info_response"===e.name&&(e.data.approved?t(e.data.payload):r(new Error("User rejected the request")))}));const i=ne();this._handleWindow(i,{target:"_blank",features:ce}),n.write({name:"user_info_request",data:{message:e,preopenInstanceId:i}})}};X(n,"data",i)}else r(new Error("User has not logged in yet"))}))}initiateTopup(e,t){return new Promise(((r,n)=>{if(this.isInitialized){const{errors:i,isValid:o}=((e,t)=>{const r={};if(!e)return{errors:r,isValid:!0};if(e&&!te[e])return r.provider="Invalid Provider",{errors:r,isValid:0===Object.keys(r).length};const n=te[e],i=t||{};if(i.fiatValue){const e=+parseFloat(i.fiatValue.toString())||0;e<n.minOrderValue&&(r.fiatValue="Requested amount is lower than supported"),e>n.maxOrderValue&&n.enforceMax&&(r.fiatValue="Requested amount is higher than supported")}if(i.selectedCurrency&&!n.validCurrencies.includes(i.selectedCurrency)&&(r.selectedCurrency="Unsupported currency"),i.selectedCryptoCurrency){const t=Object.values(n.validCryptoCurrenciesByChain).flat().map((e=>e.value)),o=e===M?i.selectedCryptoCurrency.toLowerCase():i.selectedCryptoCurrency;t&&!t.includes(o)&&(r.selectedCryptoCurrency="Unsupported cryptoCurrency")}return{errors:r,isValid:0===Object.keys(r).length}})(e,t);if(!o)return void n(new Error(JSON.stringify(i)));const a=this.communicationMux.getStream("topup");X(a,"data",(e=>{"topup_response"===e.name&&(e.data.success?r(e.data.success):n(new Error(e.data.error)))}));const s=ne();this._handleWindow(s),a.write({name:"topup_request",data:{provider:e,params:t,preopenInstanceId:s}})}else n(new Error("Torus is not initialized yet"))}))}async loginWithPrivateKey(e){const{privateKey:t,userInfo:r}=e;return new Promise(((e,n)=>{if(this.isInitialized){if(32!==I.from(t,"hex").length)return void n(new Error("Invalid private key, Please provide a 32 byte valid secp25k1 private key"));const i=this.communicationMux.getStream("login_with_private_key");X(i,"data",(t=>{"login_with_private_key_response"===t.name&&(t.data.success?e(t.data.success):n(new Error(t.data.error)))})),i.write({name:"login_with_private_key_request",data:{privateKey:t,userInfo:r}})}else n(new Error("Torus is not initialized yet"))}))}async showWalletConnectScanner(){if(!this.useWalletConnect)throw new Error("Set `useWalletConnect` as true in init function options to use wallet connect scanner");return new Promise(((e,t)=>{if(this.isLoggedIn){const r=this.communicationMux.getStream("wallet_connect_stream");X(r,"data",(r=>{"wallet_connect_stream_res"===r.name&&(r.data.success?e(r.data.success):t(new Error(r.data.error)),this._displayIframe())})),r.write({name:"wallet_connect_stream_req"}),this._displayIframe(!0)}else t(new Error("User has not logged in yet"))}))}_handleWindow(e){let{url:t,target:r,features:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){const i=this.communicationMux.getStream("window"),o=new URL(t||`${this.torusUrl}/redirect?preopenInstanceId=${e}`);o.hash?o.hash+=`&isCustomLogin=${this.isCustomLogin}`:o.hash=`#isCustomLogin=${this.isCustomLogin}`;const a=new pe({url:o,target:r,features:n});if(a.open(),!a.window)return void this._createPopupBlockAlert(e,o.href);i.write({name:"opened_window",data:{preopenInstanceId:e}});const s=t=>{let{preopenInstanceId:r,close:n}=t;r===e&&n&&(a.close(),i.removeListener("data",s))};i.on("data",s),a.once("close",(()=>{i.write({data:{preopenInstanceId:e,closed:!0}}),i.removeListener("data",s)}))}}_setEmbedWhiteLabel(e){const{theme:t}=this.whiteLabel||{};if(t){const{isDark:r=!1,colors:n={}}=t;r&&e.classList.add("torus-dark"),n.torusBrand1&&e.style.setProperty("--torus-brand-1",n.torusBrand1),n.torusGray2&&e.style.setProperty("--torus-gray-2",n.torusGray2)}}_getLogoUrl(){var e,t;let r=`${this.torusUrl}/images/torus_icon-blue.svg`;var n,i;return r=null!==(e=this.whiteLabel)&&void 0!==e&&null!==(t=e.theme)&&void 0!==t&&t.isDark?(null===(n=this.whiteLabel)||void 0===n?void 0:n.logoLight)||r:(null===(i=this.whiteLabel)||void 0===i?void 0:i.logoDark)||r,r}_sendWidgetVisibilityStatus(e){this.communicationMux.getStream("torus-widget-visibility").write({data:e})}_displayIframe(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t={},r=this.buttonSize+14;if(e)t.display="block",t.width="100%",t.height="100%",t.top="0px",t.right="0px",t.left="0px",t.bottom="0px";else switch(t.display=this.torusWidgetVisibility?"block":"none",t.height=`${r}px`,t.width=`${r}px`,this.buttonPosition){case q.TOP_LEFT:t.top="0px",t.left="0px",t.right="auto",t.bottom="auto";break;case q.TOP_RIGHT:t.top="0px",t.right="0px",t.left="auto",t.bottom="auto";break;case q.BOTTOM_RIGHT:t.bottom="0px",t.right="0px",t.top="auto",t.left="auto";break;case q.BOTTOM_LEFT:default:t.bottom="0px",t.left="0px",t.top="auto",t.right="auto"}Object.assign(this.torusIframe.style,t),this.isIframeFullScreen=e}_setupWeb3(){Q.info("setupWeb3 running");const e=new g.XR({name:"embed_metamask",target:"iframe_metamask",targetWindow:this.torusIframe.contentWindow,targetOrigin:new URL(this.torusUrl).origin}),t=new g.XR({name:"embed_comm",target:"iframe_comm",targetWindow:this.torusIframe.contentWindow,targetOrigin:new URL(this.torusUrl).origin}),r=new de(e),n=e=>{const t=r[e];r[e]=function(e){if(e&&"eth_requestAccounts"===e)return r.enable();for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return t.apply(this,[e,...i])}};n("send"),n("sendAsync"),r.enable=()=>new Promise(((e,t)=>{r.sendAsync({jsonrpc:"2.0",id:ne(),method:"eth_requestAccounts",params:[]},((r,n)=>{const{result:i}=n||{};if(r)setTimeout((()=>{t(r)}),50);else if(Array.isArray(i)&&i.length>0){const r=()=>{if(""!==this.requestedVerifier&&this.currentVerifier!==this.requestedVerifier){const{requestedVerifier:r}=this;this.logout().then((n=>{this.requestedVerifier=r,this._showLoginPopup(!0,e,t)})).catch((e=>t(e)))}else e(i)};this.isLoggedIn?r():this.isLoginCallback=r}else this._showLoginPopup(!0,e,t)}))})),r.tryPreopenHandle=(e,t)=>{const n=e;if(!Array.isArray(n)&&Ee.includes(n.method)){const e=ne();this._handleWindow(e,{target:"_blank",features:ue}),n.preopenInstanceId=e}r._rpcEngine.handle(n,t)};const i=new Proxy(r,{deleteProperty:()=>!0});this.ethereum=i;const o=(0,g.V2)(t);this.communicationMux=o,o.getStream("window").on("data",(e=>{"create_window"===e.name&&this._createPopupBlockAlert(e.data.preopenInstanceId,e.data.url)})),o.getStream("widget").on("data",(e=>{const{data:t}=e;this._displayIframe(t)})),o.getStream("status").on("data",(e=>{e.loggedIn?(this.isLoggedIn=e.loggedIn,this.currentVerifier=e.verifier):this._displayIframe(),this.isLoginCallback&&(this.isLoginCallback(),delete this.isLoginCallback)})),this.provider=i,this.provider.shouldSendMetadata&&async function(e){try{const t=await(async()=>({name:me(window),icon:await ye(window)}))();e.handle({jsonrpc:"2.0",id:ne(),method:"wallet_sendDomainMetadata",params:t},se)}catch(e){Q.error({message:ee.errors.sendSiteMetadata(),originalError:e})}}(this.provider._rpcEngine),r._initializeState(),Q.debug("Torus - injected provider")}_showLoginPopup(e,t,r){const n=e=>{const{err:n,selectedAddress:i}=e;n?(Q.error(n),r&&r(n)):t&&t([i]),this.isIframeFullScreen&&this._displayIframe()},i=this.communicationMux.getStream("oauth");if(this.requestedVerifier){X(i,"data",n);const t=ne();this._handleWindow(t),i.write({name:"oauth",data:{calledFromEmbed:e,verifier:this.requestedVerifier,preopenInstanceId:t,login_hint:this.loginHint}})}else this._displayIframe(!0),X(i,"data",n),i.write({name:"oauth_modal",data:{calledFromEmbed:e}})}_createPopupBlockAlert(e,t){const r=this._getLogoUrl(),n=Y(`<div id="torusAlert" class="torus-alert--v2"><div id="torusAlert__logo"><img src="${r}" /></div><div><h1 id="torusAlert__title">${this.embedTranslations.actionRequired}</h1><p id="torusAlert__desc">${this.embedTranslations.pendingAction}</p></div></div>`),i=Y(`<div><a id="torusAlert__btn">${this.embedTranslations.continue}</a></div>`),o=Y('<div id="torusAlert__btn-container"></div>');o.appendChild(i),n.appendChild(o),this._setEmbedWhiteLabel(n),J((()=>{this.torusAlertContainer.style.display="block",this.torusAlertContainer.appendChild(n)})),J((()=>{i.addEventListener("click",(()=>{this._handleWindow(e,{url:t,target:"_blank",features:ue}),n.remove(),0===this.torusAlertContainer.children.length&&(this.torusAlertContainer.style.display="none")}))}))}}var ke=r(27590);function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Pe=function(e){(0,c.Z)(b,e);var t,r,d,p,g,m,y=(g=b,m=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,l.Z)(g);if(m){var r=(0,l.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,u.Z)(this,e)});function b(e){var t;return(0,i.Z)(this,b),t=y.call(this,e),(0,f.Z)((0,a.Z)(t),"name",ke.rW.TORUS_EVM),(0,f.Z)((0,a.Z)(t),"adapterNamespace",ke.yk.EIP155),(0,f.Z)((0,a.Z)(t),"currentChainNamespace",ke.EN.EIP155),(0,f.Z)((0,a.Z)(t),"type",ke.hN.EXTERNAL),(0,f.Z)((0,a.Z)(t),"status",ke.MP.NOT_READY),(0,f.Z)((0,a.Z)(t),"torusInstance",null),(0,f.Z)((0,a.Z)(t),"torusWalletOptions",void 0),(0,f.Z)((0,a.Z)(t),"initParams",void 0),(0,f.Z)((0,a.Z)(t),"loginSettings",{}),(0,f.Z)((0,a.Z)(t),"rehydrated",!1),t.torusWalletOptions=e.adapterSettings||{},t.initParams=e.initParams||{},t.loginSettings=e.loginSettings||{},t.chainConfig=e.chainConfig||null,t.sessionTime=e.sessionTime||86400,t}return(0,o.Z)(b,[{key:"provider",get:function(){return this.status===ke.MP.CONNECTED&&this.torusInstance?this.torusInstance.provider:null},set:function(e){throw new Error("Not implemented")}},{key:"init",value:(p=(0,n.Z)(h().mark((function e(t){var r,n,i,o,a,c,u,f,d,p,g,m,y,v;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,s.Z)((0,l.Z)(b.prototype),"checkInitializationRequirements",this).call(this),this.chainConfig?(f=this.chainConfig,d=f.chainId,p=f.blockExplorer,g=f.displayName,m=f.rpcTarget,y=f.ticker,v=f.tickerName,r={chainId:Number.parseInt(d,16),host:m,blockExplorer:p,networkName:g,ticker:y,tickerName:v}):(this.chainConfig=(0,ke.h2)(ke.EN.EIP155,1),n=this.chainConfig,i=n.blockExplorer,o=n.displayName,a=n.chainId,c=n.ticker,u=n.tickerName,r={chainId:Number.parseInt(a,16),host:"mainnet",blockExplorer:i,networkName:o,ticker:c,tickerName:u}),this.torusInstance=new xe(this.torusWalletOptions),ke.cM.debug("initializing torus evm adapter init"),e.next=6,this.torusInstance.init(Ce(Ce({showTorusButton:!1},this.initParams),{},{network:r}));case 6:if(this.status=ke.MP.READY,this.emit(ke.n2.READY,ke.rW.TORUS_EVM),e.prev=8,ke.cM.debug("initializing torus evm adapter"),!t.autoConnect){e.next=14;break}return this.rehydrated=!0,e.next=14,this.connect();case 14:e.next=20;break;case 16:e.prev=16,e.t0=e.catch(8),ke.cM.error("Failed to connect with torus evm provider",e.t0),this.emit(ke.n2.ERRORED,e.t0);case 20:case"end":return e.stop()}}),e,this,[[8,16]])}))),function(e){return p.apply(this,arguments)})},{key:"connect",value:(d=(0,n.Z)(h().mark((function e(){var t,r,n,i,o,a,c,u,f,d;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,s.Z)((0,l.Z)(b.prototype),"checkConnectionRequirements",this).call(this),this.torusInstance){e.next=3;break}throw ke.Ty.notReady("Torus wallet is not initialized");case 3:return this.status=ke.MP.CONNECTING,this.emit(ke.n2.CONNECTING,{adapter:ke.rW.TORUS_EVM}),e.prev=5,e.next=8,this.torusInstance.login(this.loginSettings);case 8:if(!(t=this.torusInstance.provider.chainId)||parseInt(t)===parseInt(this.chainConfig.chainId,16)){e.next=19;break}return r=this.chainConfig,n=r.chainId,i=r.blockExplorer,o=r.displayName,a=r.rpcTarget,c=r.ticker,u=r.tickerName,f={chainId:Number.parseInt(n,16),host:a,blockExplorer:i,networkName:o,tickerName:u,ticker:c},e.next=14,this.torusInstance.setProvider(Ce({},f));case 14:return e.next=16,this.torusInstance.ethereum.request({method:"eth_chainId"});case 16:if(!(d=e.sent)||parseInt(d)===parseInt(this.chainConfig.chainId,16)){e.next=19;break}throw ke.Ty.fromCode(5e3,"Not connected to correct chainId. Expected: ".concat(this.chainConfig.chainId,", Current: ").concat(d));case 19:return this.status=ke.MP.CONNECTED,this.torusInstance.showTorusButton(),this.emit(ke.MP.CONNECTED,{adapter:ke.rW.TORUS_EVM,reconnected:this.rehydrated}),e.abrupt("return",this.provider);case 25:throw e.prev=25,e.t0=e.catch(5),this.status=ke.MP.READY,this.rehydrated=!1,this.emit(ke.MP.ERRORED,e.t0),e.t0 instanceof ke.up?e.t0:ke.RM.connectionError("Failed to login with torus wallet");case 31:case"end":return e.stop()}}),e,this,[[5,25]])}))),function(){return d.apply(this,arguments)})},{key:"disconnect",value:(r=(0,n.Z)(h().mark((function e(){var t,r=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]?r[0]:{cleanup:!1},this.torusInstance){e.next=3;break}throw ke.Ty.notReady("Torus wallet is not initialized");case 3:return e.next=5,(0,s.Z)((0,l.Z)(b.prototype),"disconnect",this).call(this);case 5:return e.next=7,this.torusInstance.logout();case 7:this.torusInstance.hideTorusButton(),t.cleanup?(this.status=ke.MP.NOT_READY,this.torusInstance=null):this.status=ke.MP.READY,this.rehydrated=!1,this.emit(ke.n2.DISCONNECTED);case 11:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getUserInfo",value:(t=(0,n.Z)(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.status===ke.MP.CONNECTED){e.next=2;break}throw ke.RM.notConnectedError("Not connected with wallet");case 2:if(this.torusInstance){e.next=4;break}throw ke.Ty.notReady("Torus wallet is not initialized");case 4:return e.next=6,this.torusInstance.getUserInfo("");case 6:return t=e.sent,e.abrupt("return",t);case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"setAdapterSettings",value:function(e){this.status!==ke.MP.READY&&(null!=e&&e.sessionTime&&(this.sessionTime=e.sessionTime),null!=e&&e.clientId&&(this.clientId=e.clientId))}}]),b}(r(52611).d)},38466:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SolanaWalletAdapter:()=>pe});var n=r(34795),i=r(9249),o=r(87371),a=r(80753),s=r(93069),c=r(88106),u=r(11987),l=r(95058),f=r(56666),d=r(82841),h=r.n(d),p=r(48638),g=r(8759),m=r(23460),y=r(17391),b=r(58094),v=r(58607),w=r(3171),A=r.n(w),_=r(79640),E=r.n(_),x=r(69378),k=r.n(x),S=r(48834).Buffer,C=()=>"Torus: Lost connection to Torus.",P=()=>"Torus: Disconnected from iframe. Page reload required.",O=()=>"Must provide a Node.js-style duplex stream.",I=()=>"Expected a single, non-array, object argument.",B=()=>"'args.method' must be a non-empty string.",T=()=>"'args.params' must be an object or array if provided.",M=e=>'Torus: Connected to chain with ID "'.concat(e,'".');const R={PRODUCTION:"production",DEVELOPMENT:"development",TESTING:"testing"},N={BOTTOM_LEFT:"bottom-left",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",TOP_RIGHT:"top-right"};var j={supportedVerifierList:["google","reddit","discord"],api:"https://api.tor.us",translations:{en:{embed:{continue:"Continue",actionRequired:"Authorization required",pendingAction:"Click continue to proceed with your request in a popup",cookiesRequired:"Cookies Required",enableCookies:"Please enable cookies in your browser preferences to access Torus",clickHere:"More Info"}},de:{embed:{continue:"Fortsetzen",actionRequired:"Autorisierung erforderlich",pendingAction:"Klicken Sie in einem Popup auf Weiter, um mit Ihrer Anfrage fortzufahren",cookiesRequired:"Cookies benötigt",enableCookies:"Bitte aktivieren Sie Cookies in Ihren Browsereinstellungen, um auf Torus zuzugreifen",clickHere:"Mehr Info"}},ja:{embed:{continue:"継続する",actionRequired:"認証が必要です",pendingAction:"続行をクリックして、ポップアップでリクエストを続行します",cookiesRequired:"必要なクッキー",enableCookies:"Torusにアクセスするには、ブラウザの設定でCookieを有効にしてください。",clickHere:"詳しくは"}},ko:{embed:{continue:"계속하다",actionRequired:"승인 필요",pendingAction:"팝업에서 요청을 진행하려면 계속을 클릭하십시오.",cookiesRequired:"쿠키 필요",enableCookies:"브라우저 환경 설정에서 쿠키를 활성화하여 Torus에 액세스하십시오.",clickHere:"더 많은 정보"}},zh:{embed:{continue:"继续",actionRequired:"需要授权",pendingAction:"单击继续以在弹出窗口中继续您的请求",cookiesRequired:"必填Cookie",enableCookies:"请在您的浏览器首选项中启用cookie以访问Torus。",clickHere:"更多信息"}}},prodTorusUrl:"",localStorageKey:"torus-".concat(window.location.hostname)},L=E().getLogger("solana-embed");const U=()=>Math.random().toString(36).slice(2),D=async e=>{let t,r;switch(e){case"testing":t="https://solana-testing.tor.us",r="debug";break;case"development":t="http://localhost:8080",r="debug";break;default:t="https://solana.tor.us",r="error"}return{torusUrl:t,logLevel:r}},F={height:660,width:375},z={height:740,width:1315},Z={height:700,width:1200},H={height:600,width:400};function q(e){let{width:t,height:r}=e;const n=void 0!==window.screenLeft?window.screenLeft:window.screenX,i=void 0!==window.screenTop?window.screenTop:window.screenY,o=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,a=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,s=Math.abs((o-t)/2/1+n),c=Math.abs((a-r)/2/1+i);return"titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=".concat(r/1,",width=").concat(t/1,",top=").concat(c,",left=").concat(s)}class W extends y.Ue{constructor(e,t){let{maxEventListeners:r=100,jsonRpcStreamName:n="provider"}=t;if(super(),(0,f.Z)(this,"isTorus",void 0),(0,f.Z)(this,"_rpcEngine",void 0),(0,f.Z)(this,"jsonRpcConnectionEvents",void 0),(0,f.Z)(this,"_state",void 0),!(0,v.duplex)(e))throw new Error(O());this.isTorus=!0,this.setMaxListeners(r),this._handleConnect=this._handleConnect.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this._initializeState=this._initializeState.bind(this),this.request=this.request.bind(this),this.sendAsync=this.sendAsync.bind(this);const i=new y.O4;A()(e,i,e,this._handleStreamDisconnect.bind(this,"Torus")),i.ignoreStream("phishing");const o=(0,y.AP)();A()(o.stream,i.createStream(n),o.stream,this._handleStreamDisconnect.bind(this,"Torus RpcProvider"));const a=new y.eI;a.push((0,y.Rq)()),a.push(((e,t,r)=>{"string"==typeof e.method&&e.method||(t.error=b.Sy.rpc.invalidRequest({message:"The request 'method' must be a non-empty string.",data:e})),r((e=>{const{error:r}=t;return r?(L.error("Torus - RPC Error: ".concat(r.message),r),e()):e()}))})),a.push((0,g.yh)({origin:location.origin})),a.push(o.middleware),this._rpcEngine=a,this.jsonRpcConnectionEvents=o.events}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw b.Sy.rpc.invalidRequest({message:I(),data:e});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw b.Sy.rpc.invalidRequest({message:B(),data:e});if(void 0!==r&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw b.Sy.rpc.invalidRequest({message:T(),data:e});return new Promise(((e,n)=>{this._rpcRequest({method:t,params:r},(0,y.nE)(e,n))}))}send(e,t){this._rpcRequest(e,t)}sendAsync(e){return new Promise(((t,r)=>{this._rpcRequest(e,(0,y.nE)(t,r))}))}_handleStreamDisconnect(e,t){!function(e,t,r){let n='Torus: Lost connection to "'.concat(e,'".');null!=t&&t.stack&&(n+="\n".concat(t.stack)),L.warn(n),r&&r.listenerCount("error")>0&&r.emit("error",n)}(e,t,this),this._handleDisconnect(!1,t?t.message:void 0)}}async function K(){return new Promise((e=>{"loading"!==document.readyState?e():function(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];const a=()=>{r(...i),e.removeEventListener(t,a)};e.addEventListener(t,a)}(document,"DOMContentLoaded",e)}))}const V=e=>{const t=window.document.createElement("template"),r=e.trim();return t.innerHTML=r,t.content.firstChild};class G extends y.Ue{constructor(e){let{url:t,target:r,features:n}=e;super(),(0,f.Z)(this,"url",void 0),(0,f.Z)(this,"target",void 0),(0,f.Z)(this,"features",void 0),(0,f.Z)(this,"window",void 0),(0,f.Z)(this,"windowTimer",void 0),(0,f.Z)(this,"iClosedWindow",void 0),this.url=t,this.target=r||"_blank",this.features=n||q(Z),this.window=void 0,this.windowTimer=void 0,this.iClosedWindow=!1,this._setupTimer()}_setupTimer(){this.windowTimer=Number(setInterval((()=>{this.window&&this.window.closed&&(clearInterval(this.windowTimer),this.iClosedWindow||this.emit("close"),this.iClosedWindow=!1,this.window=void 0),void 0===this.window&&clearInterval(this.windowTimer)}),500))}open(){var e;return this.window=window.open(this.url.href,this.target,this.features),null!==(e=this.window)&&void 0!==e&&e.focus&&this.window.focus(),Promise.resolve()}close(){this.iClosedWindow=!0,this.window&&this.window.close()}redirect(e){e?window.location.replace(this.url.href):window.location.href=this.url.href}}function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}class J extends W{constructor(e,t){let{maxEventListeners:r=100,jsonRpcStreamName:n="provider"}=t;super(e,{maxEventListeners:r,jsonRpcStreamName:n}),(0,f.Z)(this,"embedTranslations",void 0),(0,f.Z)(this,"torusUrl",void 0),(0,f.Z)(this,"dappStorageKey",void 0),(0,f.Z)(this,"windowRefs",void 0),(0,f.Z)(this,"tryWindowHandle",void 0),(0,f.Z)(this,"torusAlertContainer",void 0),(0,f.Z)(this,"torusIframe",void 0),this._state=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},J._defaultState),this.torusUrl="",this.dappStorageKey="";const i=j.translations[(()=>{let e=window.navigator.language||"en-US";const t=e.split("-");return e=Object.prototype.hasOwnProperty.call(j.translations,t[0])?t[0]:"en",e})()];this.embedTranslations=i.embed,this.windowRefs={},this.on("connect",(()=>{this._state.isConnected=!0})),this.jsonRpcConnectionEvents.on("notification",(e=>{const{method:t,params:r}=e;if(t===g.Nb.IFRAME_STATUS){const{isFullScreen:e,rid:t}=r;this._displayIframe({isFull:e,rid:t})}else if(t===g.Nb.CREATE_WINDOW){const{windowId:e,url:t}=r;this._createPopupBlockAlert(e,t)}else if(t===g.Nb.CLOSE_WINDOW)this._handleCloseWindow(r);else if(t===g.Nb.USER_LOGGED_IN){const{currentLoginProvider:e}=r;this._state.isLoggedIn=!0,this._state.currentLoginProvider=e}else t===g.Nb.USER_LOGGED_OUT&&(this._state.isLoggedIn=!1,this._state.currentLoginProvider=null,this._displayIframe())}))}get isLoggedIn(){return this._state.isLoggedIn}get isIFrameFullScreen(){return this._state.isIFrameFullScreen}isConnected(){return this._state.isConnected}async _initializeState(e){try{const{torusUrl:t,dappStorageKey:r,torusAlertContainer:n,torusIframe:i}=e;this.torusUrl=t,this.dappStorageKey=r,this.torusAlertContainer=n,this.torusIframe=i,this.torusIframe.addEventListener("load",(()=>{this._state.isIFrameFullScreen||this._displayIframe()}));const{currentLoginProvider:o,isLoggedIn:a}=await this.request({method:g.vU.GET_PROVIDER_STATE,params:[]});this._handleConnect(o,a)}catch(e){L.error("Torus: Failed to get initial state. Please report this bug.",e)}finally{L.info("initialized communication state"),this._state.initialized=!0,this.emit("_initialized")}}_handleWindow(e){let{url:t,target:r,features:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=new URL(t||"".concat(this.torusUrl,"/redirect?windowId=").concat(e));this.dappStorageKey&&(i.hash?i.hash+="&dappStorageKey=".concat(this.dappStorageKey):i.hash="#dappStorageKey=".concat(this.dappStorageKey));const o=new G({url:i,target:r,features:n});o.open(),o.window?(this.windowRefs[e]=o,this.request({method:g.vU.OPENED_WINDOW,params:{windowId:e}}),o.once("close",(()=>{delete this.windowRefs[e],this.request({method:g.vU.CLOSED_WINDOW,params:{windowId:e}})}))):this._createPopupBlockAlert(e,i.href)}_displayIframe(){let{isFull:e=!1,rid:t=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={};if(e)r.display="block",r.width="100%",r.height="100%",r.top="0px",r.right="0px",r.left="0px",r.bottom="0px";else switch(r.display=this._state.torusWidgetVisibility?"block":"none",r.height="70px",r.width="70px",this._state.buttonPosition){case N.TOP_LEFT:r.top="0px",r.left="0px",r.right="auto",r.bottom="auto";break;case N.TOP_RIGHT:r.top="0px",r.right="0px",r.left="auto",r.bottom="auto";break;case N.BOTTOM_RIGHT:r.bottom="0px",r.right="0px",r.top="auto",r.left="auto";break;case N.BOTTOM_LEFT:default:r.bottom="0px",r.left="0px",r.top="auto",r.right="auto"}Object.assign(this.torusIframe.style,r),this._state.isIFrameFullScreen=e,this.request({method:g.vU.IFRAME_STATUS,params:{isIFrameFullScreen:e,rid:t}})}hideTorusButton(){this._state.torusWidgetVisibility=!1,this._displayIframe()}showTorusButton(){this._state.torusWidgetVisibility=!0,this._displayIframe()}_rpcRequest(e,t){const r=t,n=e;Array.isArray(n)||n.jsonrpc||(n.jsonrpc="2.0"),this.tryWindowHandle(n,r)}_handleConnect(e,t){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{currentLoginProvider:e,isLoggedIn:t}),L.debug(M(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new b.Cg(1013,t||C()),L.debug(r)):(r=new b.Cg(1011,t||P()),L.error(r),this._state.currentLoginProvider=null,this._state.isLoggedIn=!1,this._state.torusWidgetVisibility=!1,this._state.isIFrameFullScreen=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleCloseWindow(e){const{windowId:t}=e;this.windowRefs[t]&&(this.windowRefs[t].close(),delete this.windowRefs[t])}async _createPopupBlockAlert(e,t){const r=this.getLogoUrl(),n=V('<div id="torusAlert" class="torus-alert--v2">'+'<div id="torusAlert__logo"><img src="'.concat(r,'" /></div>')+"<div>"+'<h1 id="torusAlert__title">'.concat(this.embedTranslations.actionRequired,"</h1>")+'<p id="torusAlert__desc">'.concat(this.embedTranslations.pendingAction,"</p>")+"</div></div>"),i=V('<div><a id="torusAlert__btn">'.concat(this.embedTranslations.continue,"</a></div>")),o=V('<div id="torusAlert__btn-container"></div>');o.appendChild(i),n.appendChild(o),await K(),(()=>{this.torusAlertContainer.appendChild(n)})(),(()=>{i.addEventListener("click",(()=>{this._handleWindow(e,{url:t,target:"_blank",features:q(H)}),n.remove(),0===this.torusAlertContainer.children.length&&(this.torusAlertContainer.style.display="none")}))})(),this.torusAlertContainer.style.display="block"}getLogoUrl(){return"".concat(this.torusUrl,"/images/torus_icon-blue.svg")}}function Y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}(0,f.Z)(J,"_defaultState",{buttonPosition:"bottom-left",currentLoginProvider:null,isIFrameFullScreen:!1,hasEmittedConnection:!1,torusWidgetVisibility:!1,initialized:!1,isLoggedIn:!1,isPermanentlyDisconnected:!1,isConnected:!1});class X extends W{constructor(e,t){let{maxEventListeners:r=100,jsonRpcStreamName:n="provider"}=t;super(e,{maxEventListeners:r,jsonRpcStreamName:n}),(0,f.Z)(this,"chainId",void 0),(0,f.Z)(this,"selectedAddress",void 0),(0,f.Z)(this,"tryWindowHandle",void 0),this._state=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},X._defaultState),this.selectedAddress=null,this.chainId=null,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this.on("connect",(()=>{this._state.isConnected=!0})),this.jsonRpcConnectionEvents.on("notification",(e=>{const{method:t,params:r}=e;t===g.zK.ACCOUNTS_CHANGED?this._handleAccountsChanged(r):t===g.zK.UNLOCK_STATE_CHANGED?this._handleUnlockStateChanged(r):t===g.zK.CHAIN_CHANGED&&this._handleChainChanged(r)}))}isConnected(){return this._state.isConnected}async _initializeState(){try{const{accounts:e,chainId:t,isUnlocked:r}=await this.request({method:g.GA.GET_PROVIDER_STATE,params:[]});this.emit("connect",{chainId:t}),this._handleChainChanged({chainId:t}),this._handleUnlockStateChanged({accounts:e,isUnlocked:r}),this._handleAccountsChanged(e)}catch(e){L.error("Torus: Failed to get initial state. Please report this bug.",e)}finally{L.info("initialized provider state"),this._state.initialized=!0,this.emit("_initialized")}}_rpcRequest(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t;const i=e;if(!Array.isArray(i))if(i.jsonrpc||(i.jsonrpc="2.0"),"solana_accounts"===i.method||"solana_requestAccounts"===i.method)n=(e,n)=>{this._handleAccountsChanged(n.result||[],"solana_accounts"===i.method,r),t(e,n)};else if("wallet_getProviderState"===i.method)return void this._rpcEngine.handle(e,n);this.tryWindowHandle(i,n)}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),L.debug(M(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new b.Cg(1013,t||C()),L.debug(r)):(r=new b.Cg(1011,t||P()),L.error(r),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleAccountsChanged(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e;Array.isArray(n)||(L.error("Torus: Received non-array accounts parameter. Please report this bug.",n),n=[]);for(const t of e)if("string"!=typeof t){L.error("Torus: Received non-string account. Please report this bug.",e),n=[];break}k()(this._state.accounts,n)||(t&&Array.isArray(this._state.accounts)&&this._state.accounts.length>0&&!r&&L.error('Torus: "solana_accounts" unexpectedly updated accounts. Please report this bug.',n),this._state.accounts=n,this.emit("accountsChanged",n)),this.selectedAddress!==n[0]&&(this.selectedAddress=n[0]||null)}_handleChainChanged(){let{chainId:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e?"loading"===e?this._handleDisconnect(!0):(this._handleConnect(e),e!==this.chainId&&(this.chainId=e,this._state.initialized&&this.emit("chainChanged",this.chainId))):L.error("Torus: Received invalid network parameters. Please report this bug.",{chainId:e})}_handleUnlockStateChanged(){let{accounts:e,isUnlocked:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e||[])):L.error("Torus: Received invalid isUnlocked parameter. Please report this bug.",{isUnlocked:t})}}function Q(e){return new Promise(((t,r)=>{try{const r=document.createElement("img");r.onload=()=>t(!0),r.onerror=()=>t(!1),r.src=e}catch(e){r(e)}}))}(0,f.Z)(X,"_defaultState",{accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1,hasEmittedConnection:!1});const ee=e=>{const{document:t}=e,r=t.querySelector('head > meta[property="og:site_name"]');if(r)return r.content;const n=t.querySelector('head > meta[name="title"]');return n?n.content:t.title&&t.title.length>0?t.title:e.location.hostname};async function te(e){try{const{document:t}=e;let r=t.querySelector('head > link[rel="shortcut icon"]');return r&&await Q(r.href)?r.href:(r=Array.from(t.querySelectorAll('head > link[rel="icon"]')).find((e=>Boolean(e.href))),r&&await Q(r.href)?r.href:"")}catch(e){return""}}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?re(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const{version:ie}=r(57089),oe=["send_transaction","sign_transaction","sign_all_transactions","sign_message","connect"],ae=[g.vU.SET_PROVIDER],se=function(e){let t;try{t=window.localStorage;const e="__storage_test__";return t.setItem(e,e),t.removeItem(e),!0}catch(e){return e&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&t&&0!==t.length}}();!async function(){try{if("undefined"==typeof document)return;const e=document.createElement("link"),{torusUrl:t}=await D("production");e.href="".concat(t,"/frame"),e.crossOrigin="anonymous",e.type="text/html",e.rel="prefetch",e.relList&&e.relList.supports&&e.relList.supports("prefetch")&&document.head.appendChild(e)}catch(e){L.warn(e)}}();class ce{constructor(){let{modalZIndex:e=99999}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,f.Z)(this,"isInitialized",void 0),(0,f.Z)(this,"torusAlert",void 0),(0,f.Z)(this,"modalZIndex",void 0),(0,f.Z)(this,"alertZIndex",void 0),(0,f.Z)(this,"requestedLoginProvider",void 0),(0,f.Z)(this,"provider",void 0),(0,f.Z)(this,"communicationProvider",void 0),(0,f.Z)(this,"dappStorageKey",void 0),(0,f.Z)(this,"isTopupHidden",!1),(0,f.Z)(this,"torusAlertContainer",void 0),(0,f.Z)(this,"torusUrl",void 0),(0,f.Z)(this,"torusIframe",void 0),(0,f.Z)(this,"styleLink",void 0),this.torusUrl="",this.isInitialized=!1,this.requestedLoginProvider=null,this.modalZIndex=e,this.alertZIndex=e+1e3,this.dappStorageKey=""}get isLoggedIn(){return!!this.communicationProvider&&this.communicationProvider.isLoggedIn}async init(){let{buildEnv:e=R.PRODUCTION,enableLogging:t=!1,network:r,showTorusButton:n=!1,useLocalStorage:i=!1,buttonPosition:o=N.BOTTOM_LEFT,apiKey:a="torus-default",extraParams:s={},whiteLabel:c}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.isInitialized)throw new Error("Already initialized");(0,m.ut)(a);const{torusUrl:u,logLevel:l}=await D(e);L.enableAll(),L.info(u,"url loaded"),L.info("Solana Embed Version :".concat(ie)),this.torusUrl=u,L.setDefaultLevel(l),t?L.enableAll():L.disableAll();const f=this.handleDappStorageKey(i),d=new URL(u);d.pathname.endsWith("/")?d.pathname+="frame":d.pathname+="/frame";const h=new URLSearchParams;f&&h.append("dappStorageKey",f),h.append("origin",window.location.origin),d.hash=h.toString(),this.torusIframe=V('<iframe\n id="torusIframe"\n class="torusIframe"\n src="'.concat(d.href,'"\n style="display: none; position: fixed; top: 0; right: 0; width: 100%;\n height: 100%; border: none; border-radius: 0; z-index: ').concat(this.modalZIndex.toString(),'"\n ></iframe>')),this.torusAlertContainer=V('<div id="torusAlertContainer" style="display:none; z-index: '.concat(this.alertZIndex.toString(),'"></div>')),this.styleLink=V('<link href="'.concat(u,'/css/widget.css" rel="stylesheet" type="text/css">')),await K(),await(async()=>new Promise(((e,t)=>{try{window.document.head.appendChild(this.styleLink),window.document.body.appendChild(this.torusIframe),window.document.body.appendChild(this.torusAlertContainer),this.torusIframe.addEventListener("load",(async()=>{const t=await(async()=>({name:ee(window),icon:await te(window)}))();this.torusIframe.contentWindow.postMessage({buttonPosition:o,apiKey:a,network:r,dappMetadata:t,extraParams:s,whiteLabel:c},d.origin),await this._setupWeb3({torusUrl:u}),n&&this.showTorusButton(),null!=c&&c.topupHide?this.isTopupHidden=c.topupHide:this.hideTorusButton(),this.isInitialized=!0,window.torus=this,e()}))}catch(e){t(e)}})))()}async login(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isInitialized)throw new Error("Call init() first");try{this.requestedLoginProvider=e.loginProvider||null,this.requestedLoginProvider||this.communicationProvider._displayIframe({isFull:!0});const t=await new Promise(((t,r)=>{this.provider._rpcRequest({method:"solana_requestAccounts",params:[this.requestedLoginProvider,e.login_hint]},(0,y.nE)(t,r))}));if(Array.isArray(t)&&t.length>0)return t;throw new Error("Login failed")}catch(e){throw L.error("login failed",e),e}finally{this.communicationProvider.isIFrameFullScreen&&this.communicationProvider._displayIframe()}}async loginWithPrivateKey(e){if(!this.isInitialized)throw new Error("Call init() first");const{privateKey:t,userInfo:r}=e,{success:n}=await this.communicationProvider.request({method:"login_with_private_key",params:{privateKey:t,userInfo:r}});if(!n)throw new Error("Login Failed")}async logout(){if(!this.communicationProvider.isLoggedIn)throw new Error("Not logged in");await this.communicationProvider.request({method:g.vU.LOGOUT,params:[]}),this.requestedLoginProvider=null}async cleanUp(){this.communicationProvider.isLoggedIn&&await this.logout(),this.clearInit()}clearInit(){function e(e){return e instanceof Element||e instanceof Document}e(this.styleLink)&&window.document.body.contains(this.styleLink)&&(this.styleLink.remove(),this.styleLink=void 0),e(this.torusIframe)&&window.document.body.contains(this.torusIframe)&&(this.torusIframe.remove(),this.torusIframe=void 0),e(this.torusAlertContainer)&&window.document.body.contains(this.torusAlertContainer)&&(this.torusAlert=void 0,this.torusAlertContainer.remove(),this.torusAlertContainer=void 0),this.isInitialized=!1}hideTorusButton(){this.communicationProvider.hideTorusButton()}showTorusButton(){this.communicationProvider.showTorusButton()}async setProvider(e){await this.communicationProvider.request({method:g.vU.SET_PROVIDER,params:ne({},e)})}async showWallet(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=await this.communicationProvider.request({method:g.vU.WALLET_INSTANCE_ID,params:[]}),n=e?"/".concat(e):"",i=new URL("".concat(this.torusUrl,"/wallet").concat(n));i.searchParams.append("instanceId",r),Object.keys(t).forEach((e=>{i.searchParams.append(e,t[e])})),this.dappStorageKey&&(i.hash="#dappStorageKey=".concat(this.dappStorageKey)),new G({url:i,features:q(z)}).open()}async getUserInfo(){return await this.communicationProvider.request({method:g.vU.USER_INFO,params:[]})}async initiateTopup(e,t){if(!this.isInitialized)throw new Error("Torus is not initialized");const r=U();return this.communicationProvider._handleWindow(r),await this.communicationProvider.request({method:g.vU.TOPUP,params:{provider:e,params:t,windowId:r}})}async getAccounts(){return await this.provider.request({method:"getAccounts",params:[]})}async sendTransaction(e){return await this.provider.request({method:"send_transaction",params:{message:e.serialize({requireAllSignatures:!1}).toString("hex")}})}async signAndSendTransaction(e,t){return{signature:await this.provider.request({method:"send_transaction",params:{message:e.serialize({requireAllSignatures:!1}).toString("hex"),options:t}})}}async signTransaction(e){const t=await this.provider.request({method:"sign_transaction",params:{message:e.serializeMessage().toString("hex"),messageOnly:!0}}),r=JSON.parse(t),n={publicKey:new p.nh(r.publicKey),signature:S.from(r.signature,"hex")};return e.addSignature(n.publicKey,n.signature),e}async signAllTransactions(e){const t=e.map((e=>e.serializeMessage().toString("hex"))),r=(await this.provider.request({method:"sign_all_transactions",params:{message:t,messageOnly:!0}})).map((e=>{const t=JSON.parse(e);return{publicKey:new p.nh(t.publicKey),signature:S.from(t.signature,"hex")}}));return e.forEach(((e,t)=>(e.addSignature(r[t].publicKey,r[t].signature),e))),e}async signMessage(e){return await this.provider.request({method:"sign_message",params:{data:e}})}async getGaslessPublicKey(){return await this.provider.request({method:"get_gasless_public_key",params:[]})}handleDappStorageKey(e){let t="";if(se&&e){const e=window.localStorage.getItem(j.localStorageKey);if(e)t=e;else{const e="torus-app-".concat(U());window.localStorage.setItem(j.localStorageKey,e),t=e}}return this.dappStorageKey=t,t}async _setupWeb3(e){L.info("setupWeb3 running");const t=new y.XR({name:"embed_torus",target:"iframe_torus",targetWindow:this.torusIframe.contentWindow}),r=new y.XR({name:"embed_communication",target:"iframe_communication",targetWindow:this.torusIframe.contentWindow}),n=new X(t,{}),i=new J(r,{});n.tryWindowHandle=(e,t)=>{const r=e;if(!Array.isArray(r)&&oe.includes(r.method)){if(!this.communicationProvider.isLoggedIn)throw new Error("User Not Logged In");const e=U();i._handleWindow(e,{target:"_blank",features:q(H)}),r.windowId=e}n._rpcEngine.handle(r,t)},i.tryWindowHandle=(e,t)=>{const r=e;if(!Array.isArray(r)&&ae.includes(r.method)){const e=U();i._handleWindow(e,{target:"_blank",features:q(F)}),r.params.windowId=e}i._rpcEngine.handle(r,t)};const o=e=>{const t=n[e],r=this;n[e]=function(e,n){const{method:i,params:o=[]}=e;if("solana_requestAccounts"===i){if(!n)return r.login({loginProvider:o[0]});r.login({loginProvider:o[0]}).then((e=>n(null,e))).catch((e=>n(e)))}return t.apply(this,[e,n])}};o("request"),o("sendAsync"),o("send");const a=new Proxy(n,{deleteProperty:()=>!0}),s=new Proxy(i,{deleteProperty:()=>!0});this.provider=a,this.communicationProvider=s,await Promise.all([n._initializeState(),i._initializeState(ne(ne({},e),{},{dappStorageKey:this.dappStorageKey,torusAlertContainer:this.torusAlertContainer,torusIframe:this.torusIframe}))]),L.debug("Torus - injected provider")}}var ue=r(27590),le=r(47320),fe=r(20809);function de(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?de(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):de(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pe=function(e){(0,c.Z)(b,e);var t,r,d,p,g,m,y=(g=b,m=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,l.Z)(g);if(m){var r=(0,l.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,u.Z)(this,e)});function b(e){var t;return(0,i.Z)(this,b),t=y.call(this,e),(0,f.Z)((0,a.Z)(t),"name",ue.rW.TORUS_SOLANA),(0,f.Z)((0,a.Z)(t),"adapterNamespace",ue.yk.SOLANA),(0,f.Z)((0,a.Z)(t),"currentChainNamespace",ue.EN.SOLANA),(0,f.Z)((0,a.Z)(t),"type",ue.hN.EXTERNAL),(0,f.Z)((0,a.Z)(t),"status",ue.MP.NOT_READY),(0,f.Z)((0,a.Z)(t),"torusInstance",null),(0,f.Z)((0,a.Z)(t),"torusWalletOptions",void 0),(0,f.Z)((0,a.Z)(t),"initParams",void 0),(0,f.Z)((0,a.Z)(t),"loginSettings",{}),(0,f.Z)((0,a.Z)(t),"solanaProvider",null),(0,f.Z)((0,a.Z)(t),"rehydrated",!1),t.torusWalletOptions=e.adapterSettings||{},t.initParams=e.initParams||{},t.loginSettings=e.loginSettings||{},t.chainConfig=e.chainConfig||null,t.sessionTime=e.sessionTime||86400,t}return(0,o.Z)(b,[{key:"provider",get:function(){var e;return this.status===ue.MP.CONNECTED&&this.solanaProvider&&(null===(e=this.solanaProvider)||void 0===e?void 0:e.provider)||null},set:function(e){throw new Error("Not implemented")}},{key:"init",value:(p=(0,n.Z)(h().mark((function e(t){var r,n,i,o,a,c,u,f,d,p,g,m,y,v,w;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,s.Z)((0,l.Z)(b.prototype),"checkInitializationRequirements",this).call(this),this.chainConfig?(d=this.chainConfig,p=d.chainId,g=d.blockExplorer,m=d.displayName,y=d.rpcTarget,v=d.ticker,w=d.tickerName,r={chainId:p,rpcTarget:y,blockExplorerUrl:g,displayName:m,tickerName:w,ticker:v,logo:""}):(this.chainConfig=(0,ue.h2)(ue.EN.SOLANA,"0x1"),n=this.chainConfig,i=n.blockExplorer,o=n.displayName,a=n.ticker,c=n.tickerName,u=n.rpcTarget,f=n.chainId,r={chainId:f,rpcTarget:u,blockExplorerUrl:i,displayName:o,ticker:a,tickerName:c,logo:""}),this.torusInstance=new ce(this.torusWalletOptions),ue.cM.debug("initializing torus solana adapter init"),e.next=6,this.torusInstance.init(he(he({showTorusButton:!1},this.initParams),{},{network:r}));case 6:if(this.solanaProvider=new fe.TorusInjectedProvider({config:{chainConfig:this.chainConfig}}),this.status=ue.MP.READY,this.emit(ue.n2.READY,ue.rW.TORUS_SOLANA),e.prev=9,ue.cM.debug("initializing torus solana adapter"),!t.autoConnect){e.next=15;break}return this.rehydrated=!0,e.next=15,this.connect();case 15:e.next=21;break;case 17:e.prev=17,e.t0=e.catch(9),ue.cM.error("Failed to connect with cached torus solana provider",e.t0),this.emit(ue.n2.ERRORED,e.t0);case 21:case"end":return e.stop()}}),e,this,[[9,17]])}))),function(e){return p.apply(this,arguments)})},{key:"connect",value:(d=(0,n.Z)(h().mark((function e(){var t,r,n,i,o,a,c,u,f;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,s.Z)((0,l.Z)(b.prototype),"checkConnectionRequirements",this).call(this),this.torusInstance){e.next=3;break}throw ue.Ty.notReady("Torus wallet is not initialized");case 3:if(this.solanaProvider){e.next=5;break}throw ue.Ty.notReady("Torus wallet is not initialized");case 5:return this.status=ue.MP.CONNECTING,this.emit(ue.n2.CONNECTING,{adapter:ue.rW.TORUS_SOLANA}),e.prev=7,e.next=10,this.torusInstance.login(this.loginSettings);case 10:return e.prev=10,(t=this.torusInstance.provider).sendTransaction=this.torusInstance.sendTransaction.bind(this.torusInstance),t.signAllTransactions=this.torusInstance.signAllTransactions.bind(this.torusInstance),t.signMessage=this.torusInstance.signMessage.bind(this.torusInstance),t.signTransaction=this.torusInstance.signTransaction.bind(this.torusInstance),e.next=18,this.solanaProvider.setupProvider(t);case 18:case 27:e.next=30;break;case 20:if(e.prev=20,e.t0=e.catch(10),!(e.t0 instanceof ue.up&&5010===e.t0.code)){e.next=29;break}return r=this.chainConfig,n=r.chainId,i=r.blockExplorer,o=r.displayName,a=r.rpcTarget,c=r.ticker,u=r.tickerName,f={chainId:n,rpcTarget:a,blockExplorerUrl:i,displayName:o,tickerName:u,ticker:c,logo:""},e.next=27,this.torusInstance.setProvider(f);case 29:throw e.t0;case 30:return this.status=ue.MP.CONNECTED,this.torusInstance.showTorusButton(),this.emit(ue.MP.CONNECTED,{adapter:ue.rW.TORUS_SOLANA,reconnected:this.rehydrated}),e.abrupt("return",this.provider);case 36:throw e.prev=36,e.t1=e.catch(7),this.status=ue.MP.READY,this.rehydrated=!1,this.emit(ue.n2.ERRORED,e.t1),ue.RM.connectionError("Failed to login with torus solana wallet");case 42:case"end":return e.stop()}}),e,this,[[7,36],[10,20]])}))),function(){return d.apply(this,arguments)})},{key:"disconnect",value:(r=(0,n.Z)(h().mark((function e(){var t,r=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]?r[0]:{cleanup:!1},this.torusInstance){e.next=3;break}throw ue.Ty.notReady("Torus wallet is not initialized");case 3:return e.next=5,(0,s.Z)((0,l.Z)(b.prototype),"disconnect",this).call(this);case 5:return e.next=7,this.torusInstance.logout();case 7:t.cleanup?(this.status=ue.MP.NOT_READY,this.torusInstance=null,this.solanaProvider=null):this.status=ue.MP.READY,this.emit(ue.n2.DISCONNECTED);case 9:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getUserInfo",value:(t=(0,n.Z)(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.status===ue.MP.CONNECTED){e.next=2;break}throw ue.RM.notConnectedError("Not connected with wallet");case 2:if(this.torusInstance){e.next=4;break}throw ue.Ty.notReady("Torus wallet is not initialized");case 4:return e.next=6,this.torusInstance.getUserInfo();case 6:return t=e.sent,e.abrupt("return",t);case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"setAdapterSettings",value:function(e){this.status!==ue.MP.READY&&(null!=e&&e.sessionTime&&(this.sessionTime=e.sessionTime),null!=e&&e.clientId&&(this.clientId=e.clientId))}}]),b}(le.v)},53311:(e,t,r)=>{"use strict";r.r(t),r.d(t,{WalletConnectV1Adapter:()=>Ne});var n={};r.r(n),r.d(n,{decrypt:()=>Oe,encrypt:()=>Pe,generateKey:()=>Se,verifyHmac:()=>Ce});var i=r(34795),o=r(9249),a=r(87371),s=r(80753),c=r(93069),u=r(88106),l=r(11987),f=r(95058),d=r(56666),h=r(82841),p=r.n(h),g=r(51726),m=r(4997),y=r(34406),b=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"},v=function(e){this.version=e,this.type="node",this.name="node",this.os=y.platform},w=function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"},A=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},_=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},E=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,x=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],k=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function S(e){var t=function(e){return""!==e&&x.reduce((function(t,r){var n=r[0],i=r[1];if(t)return t;var o=i.exec(e);return!!o&&[n,o]}),!1)}(e);if(!t)return null;var r=t[0],n=t[1];if("searchbot"===r)return new A;var i=n[1]&&n[1].split(/[._]/).slice(0,3);i?i.length<3&&(i=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}(i,function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(3-i.length))):i=[];var o=i.join("."),a=function(e){for(var t=0,r=k.length;t<r;t++){var n=k[t],i=n[0];if(n[1].exec(e))return i}return null}(e),s=E.exec(e);return s&&s[1]?new w(r,o,a,s[1]):new b(r,o,a)}function C(e){return function(e){return e?S(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new _:"undefined"!=typeof navigator?S(navigator.userAgent):void 0!==y&&y.version?new v(y.version.slice(1)):null}(e)}function P(){const e=C();return e&&e.os?e.os:void 0}m.getFromWindow,m.getFromWindowOrThrow,m.getDocumentOrThrow,m.getDocument,m.getNavigatorOrThrow;const O=m.getNavigator,I=(m.getLocationOrThrow,m.getLocation),B=(m.getCryptoOrThrow,m.getCrypto,m.getLocalStorageOrThrow,m.getLocalStorage);function T(){return g.D()}function M(e){let t=null,r=null;const n=B();return n&&(r=n.getItem(e)),t=r?function(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch(t){return e}}(r):r,t}function R(e){const t=B();t&&t.removeItem(e)}const N="WALLETCONNECT_DEEPLINK_CHOICE",j=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],L=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];var U=r(62197),D=r.n(U),F=(r(30775),r(78743)),z=r.n(F),Z=r(48834).Buffer;const H="utf8";function q(e){return new Uint8Array(e)}function W(e,t=!1){const r=e.toString("hex");return t?Q(r):r}function K(e){return z()(e)}function V(e,t=!1){return W(K(e),t)}function G(e){return K(e).toString(H)}function $(e){return q(function(e){return Z.from(X(e),"hex")}(e))}function J(e){return Z.from(e,H)}function Y(...e){let t=[];return e.forEach((e=>t=t.concat(Array.from(e)))),new Uint8Array([...t])}function X(e){return e.replace(/^0x/,"")}function Q(e){return e.startsWith("0x")?e:`0x${e}`}function ee(e){return(e=function(e,t=8,r="0"){return function(e,t,r="0"){return function(e,t,r,n="0"){const i=t-e.length;let o=e;if(i>0){const t=n.repeat(i);o=r?t+e:e+t}return o}(e,t,!0,r)}(e,function(e,t=8){const r=e%t;return r?(e-r)/t*t+t:e}(e.length,t),r)}(e=X(e),2))&&(e=Q(e)),e}function te(e){return K(new Uint8Array(e))}function re(e,t){const r=X(ee(new(D())(e).toString(16)));return t?r:Q(r)}var ne=r(83669),ie=r(5010);function oe(e){return ee(e)}const ae=function(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))};function se(){return((e,t)=>{for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t})()}function ce(e,t){return function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}(e,t)}function ue(e){return void 0!==e.result}function le(e){return void 0!==e.error}function fe(e){return void 0!==e.event}function de(e){var t,r;return(t=e)&&t.length&&!ce(e[0])&&(e[0]=function(e,t=!1){return W(J(e),t)}(e[0],!r)),e}function he(e){if(void 0!==e.type&&"0"!==e.type)return e;if(void 0===e.from||!(t=e.from)||"0x"!==t.toLowerCase().substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(t)||!/^(0x)?[0-9a-f]{40}$/.test(t)&&!/^(0x)?[0-9A-F]{40}$/.test(t)&&t!==function(e){e=X(e.toLowerCase());const t=X((0,ne.keccak_256)(J(e)));let r="";for(let n=0;n<e.length;n++)parseInt(t[n],16)>7?r+=e[n].toUpperCase():r+=e[n];return Q(r)}(t))throw new Error("Transaction object must include a valid 'from' value.");var t;function r(e){let t=e;return("number"==typeof e||"string"==typeof e&&!function(e){return""===e||"string"==typeof e&&""===e.trim()}(e))&&(ce(e)?"string"==typeof e&&(t=oe(e)):t=re(e)),"string"==typeof t&&(t=function(e){const t=e.startsWith("0x");return e=(e=X(e)).startsWith("0")?e.substring(1):e,t?Q(e):e}(Q(t))),t}const n={from:oe(e.from),to:void 0===e.to?void 0:oe(e.to),gasPrice:void 0===e.gasPrice?"":r(e.gasPrice),gas:void 0===e.gas?void 0===e.gasLimit?"":r(e.gasLimit):r(e.gas),value:void 0===e.value?"":r(e.value),nonce:void 0===e.nonce?"":r(e.nonce),data:void 0===e.data?"":oe(e.data)||"0x"},i=["gasPrice","gas","value","nonce"];return Object.keys(n).forEach((e=>{(void 0===n[e]||"string"==typeof n[e]&&!n[e].trim().length)&&i.includes(e)&&delete n[e]})),n}var pe=r(34748);function ge(e){return pe.parse(e)}const me=void 0!==r.g.WebSocket?r.g.WebSocket:r(8199),ye="Session currently connected",be="Session currently disconnected",ve="JSON RPC response format is invalid",we="User close QRCode Modal",Ae="abcdefghijklmnopqrstuvwxyz0123456789".split("").map((e=>`https://${e}.bridge.walletconnect.org`));const _e="AES-CBC",Ee="HMAC";async function xe(e,t="AES-CBC"){return ie.getSubtleCrypto().importKey("raw",e,function(e){return e===_e?{length:256,name:_e}:{hash:{name:"SHA-256"},name:Ee}}(t),!0,function(e){return e===_e?["encrypt","decrypt"]:["sign","verify"]}(t))}async function ke(e,t){const r=await async function(e,t){const r=ie.getSubtleCrypto(),n=await xe(e,Ee),i=await r.sign({length:256,name:Ee},n,t);return new Uint8Array(i)}(e,t);return r}async function Se(e){const t=function(e){return ie.getBrowerCrypto().getRandomValues(new Uint8Array(e))}((e||256)/8);return q(K(t)).buffer}async function Ce(e,t){const r=$(e.data),n=$(e.iv),i=V($(e.hmac),!1),o=Y(r,n),a=V(await ke(t,o),!1);return X(i)===X(a)}async function Pe(e,t,r){const n=q(te(t)),i=q(te(r||await Se(128))),o=V(i,!1),a=q(J(JSON.stringify(e))),s=await function(e,t,r){return async function(e,t,r){const n=ie.getSubtleCrypto(),i=await xe(t,_e),o=await n.encrypt({iv:e,name:_e},i,r);return new Uint8Array(o)}(e,t,r)}(i,n,a),c=V(s,!1),u=Y(s,i);return{data:c,hmac:V(await ke(n,u),!1),iv:o}}async function Oe(e,t){const r=q(te(t));if(!r)throw new Error("Missing key: required for decryption");if(!await Ce(e,r))return null;const n=$(e.data),i=$(e.iv),o=G(await function(e,t,r){return async function(e,t,r){const n=ie.getSubtleCrypto(),i=await xe(t,_e),o=await n.decrypt({iv:e,name:_e},i,r);return new Uint8Array(o)}(e,t,r)}(i,r,n));let a;try{a=JSON.parse(o)}catch(e){return null}return a}var Ie=r(27590),Be=r(52611),Te=r(39364),Me=[{name:"Rainbow",chains:[Ie.EN.EIP155],logo:"https://images.web3auth.io/login-rainbow.svg",mobile:{native:"rainbow:",universal:"https://rnbwapp.com"},desktop:{native:"",universal:""}},{name:"MetaMask",chains:[Ie.EN.EIP155],logo:"https://images.web3auth.io/login-metamask.svg",mobile:{native:"metamask:",universal:"https://metamask.app.link"},desktop:{native:"",universal:""}}];function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Ne=function(e){(0,u.Z)(E,e);var t,r,h,g,m,y,b,v,w,A,_=(w=E,A=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,f.Z)(w);if(A){var r=(0,f.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,l.Z)(this,e)});function E(e){var t;return(0,o.Z)(this,E),t=_.call(this,e),(0,d.Z)((0,s.Z)(t),"name",Ie.rW.WALLET_CONNECT_V1),(0,d.Z)((0,s.Z)(t),"adapterNamespace",Ie.yk.EIP155),(0,d.Z)((0,s.Z)(t),"currentChainNamespace",Ie.EN.EIP155),(0,d.Z)((0,s.Z)(t),"type",Ie.hN.EXTERNAL),(0,d.Z)((0,s.Z)(t),"adapterOptions",void 0),(0,d.Z)((0,s.Z)(t),"status",Ie.MP.NOT_READY),(0,d.Z)((0,s.Z)(t),"adapterData",{uri:"",extensionAdapters:Me}),(0,d.Z)((0,s.Z)(t),"connector",null),(0,d.Z)((0,s.Z)(t),"wcProvider",null),(0,d.Z)((0,s.Z)(t),"rehydrated",!1),t.adapterOptions=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){(0,d.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),t.chainConfig=e.chainConfig||null,t.sessionTime=e.sessionTime||86400,t}return(0,a.Z)(E,[{key:"connected",get:function(){var e;return!(null===(e=this.connector)||void 0===e||!e.connected)}},{key:"provider",get:function(){var e;return(null===(e=this.wcProvider)||void 0===e?void 0:e.provider)||null},set:function(e){throw new Error("Not implemented")}},{key:"init",value:(v=(0,i.Z)(p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,c.Z)((0,f.Z)(E.prototype),"checkInitializationRequirements",this).call(this),this.chainConfig||(this.chainConfig=(0,Ie.h2)(Ie.EN.EIP155,1)),this.connector=this.getWalletConnectInstance(),this.wcProvider=new Te.WalletConnectProvider({config:{chainConfig:this.chainConfig},connector:this.connector}),this.emit(Ie.n2.READY,Ie.rW.WALLET_CONNECT_V1),this.status=Ie.MP.READY,Ie.cM.debug("initializing wallet connect v1 adapter"),!this.connector.connected){e.next=11;break}return this.rehydrated=!0,e.next=11,this.onConnectHandler({accounts:this.connector.accounts,chainId:this.connector.chainId});case 11:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"connect",value:(b=(0,i.Z)(p().mark((function e(){var t,r,n=this;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,c.Z)((0,f.Z)(E.prototype),"checkConnectionRequirements",this).call(this),this.connector){e.next=3;break}throw Ie.Ty.notReady("Wallet adapter is not ready yet");case 3:if(!this.connected){e.next=7;break}return e.next=6,this.onConnectHandler({accounts:this.connector.accounts,chainId:this.connector.chainId});case 6:return e.abrupt("return",this.provider);case 7:if(this.status===Ie.MP.CONNECTING){e.next=13;break}return null!==(t=this.adapterOptions.adapterSettings)&&void 0!==t&&t.qrcodeModal&&(this.connector=this.getWalletConnectInstance(),this.wcProvider=new Te.WalletConnectProvider({config:{chainConfig:this.chainConfig,skipLookupNetwork:null===(r=this.adapterOptions.adapterSettings)||void 0===r?void 0:r.skipNetworkSwitching},connector:this.connector})),e.next=11,this.createNewSession();case 11:this.status=Ie.MP.CONNECTING,this.emit(Ie.n2.CONNECTING,{adapter:Ie.rW.WALLET_CONNECT_V1});case 13:return e.abrupt("return",new Promise((function(e,t){if(!n.connector)return t(Ie.Ty.notReady("Wallet adapter is not ready yet"));n.connector.on("modal_closed",(0,i.Z)(p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.status=Ie.MP.READY,n.emit(Ie.n2.READY,Ie.rW.WALLET_CONNECT_V1),e.abrupt("return",t(new Error("User closed modal")));case 3:case"end":return e.stop()}}),e)}))));try{n.connector.on("connect",function(){var t=(0,i.Z)(p().mark((function t(r,i){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r&&n.emit(Ie.n2.ERRORED,r),Ie.cM.debug("connected event emitted by web3auth"),t.next=4,n.onConnectHandler(i.params[0]);case 4:return t.abrupt("return",e(n.provider));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}())}catch(e){Ie.cM.error("Wallet connect v1 adapter error while connecting",e),n.status=Ie.MP.READY,n.rehydrated=!0,n.emit(Ie.n2.ERRORED,e),t(e instanceof Ie.up?e:Ie.RM.connectionError("Failed to login with wallet connect: ".concat((null==e?void 0:e.message)||"")))}})));case 14:case"end":return e.stop()}}),e,this)}))),function(){return b.apply(this,arguments)})},{key:"setAdapterSettings",value:function(e){this.status!==Ie.MP.READY&&(null!=e&&e.sessionTime&&(this.sessionTime=e.sessionTime),null!=e&&e.clientId&&(this.clientId=e.clientId))}},{key:"getUserInfo",value:(y=(0,i.Z)(p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.connected){e.next=2;break}throw Ie.RM.notConnectedError("Not connected with wallet, Please login/connect first");case 2:return e.abrupt("return",{});case 3:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{key:"disconnect",value:(m=(0,i.Z)(p().mark((function e(){var t,r,n=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.length>0&&void 0!==n[0]?n[0]:{cleanup:!1},r=t.cleanup,this.connector&&this.connected){e.next=4;break}throw Ie.RM.notConnectedError("Not connected with wallet");case 4:return e.next=6,(0,c.Z)((0,f.Z)(E.prototype),"disconnect",this).call(this);case 6:return e.next=8,this.connector.killSession();case 8:this.rehydrated=!1,r?(this.connector=null,this.status=Ie.MP.NOT_READY,this.wcProvider=null):this.status=Ie.MP.READY,this.emit(Ie.n2.DISCONNECTED);case 11:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"addChain",value:(g=(0,i.Z)(p().mark((function e(t){var r,n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.wcProvider){e.next=3;break}throw Ie.Ty.notReady("Wallet adapter is not ready yet");case 3:if(!(n=null===(r=this.adapterOptions.adapterSettings)||void 0===r?void 0:r.networkSwitchModal)){e.next=7;break}return e.next=7,n.addNetwork({chainConfig:t,appOrigin:window.location.hostname});case 7:return e.next=9,this.wcProvider.addChain(t);case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),Ie.cM.error(e.t0);case 14:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(e){return g.apply(this,arguments)})},{key:"switchChain",value:(h=(0,i.Z)(p().mark((function e(t,r){var n,i;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.wcProvider){e.next=2;break}throw Ie.Ty.notReady("Wallet adapter is not ready yet");case 2:if(!(i=null===(n=this.adapterOptions.adapterSettings)||void 0===n?void 0:n.networkSwitchModal)){e.next=6;break}return e.next=6,i.switchNetwork({currentChainConfig:r,newChainConfig:t,appOrigin:window.location.hostname});case 6:return e.next=8,this.wcProvider.switchChain({chainId:r.chainId,lookup:!1,addChain:!1});case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"createNewSession",value:(r=(0,i.Z)(p().mark((function e(){var t,r,n,o,a=this,s=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>0&&void 0!==s[0]?s[0]:{forceNewSession:!1},this.connector){e.next=3;break}throw Ie.Ty.notReady("Wallet adapter is not ready yet");case 3:if(!n.forceNewSession||!this.connector.pending){e.next=6;break}return e.next=6,this.connector.killSession();case 6:if(null===(t=this.adapterOptions)||void 0===t||null===(r=t.adapterSettings)||void 0===r||!r.qrcodeModal){e.next=10;break}return e.next=9,this.connector.createSession({chainId:parseInt((null===(o=this.chainConfig)||void 0===o?void 0:o.chainId)||"0x1",16)});case 9:return e.abrupt("return");case 10:return e.abrupt("return",new Promise((function(e,t){var r;if(!a.connector)return t(Ie.Ty.notReady("Wallet adapter is not ready yet"));Ie.cM.debug("creating new session for web3auth wallet connect"),a.connector.on("display_uri",function(){var r=(0,i.Z)(p().mark((function r(n,i){var o,s;return p().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!n){r.next=3;break}return a.emit(Ie.n2.ERRORED,Ie.RM.connectionError("Failed to display wallet connect qr code")),r.abrupt("return",t(n));case 3:return s=i.params[0],a.updateAdapterData({uri:s,extensionAdapters:Me}),null===(o=a.connector)||void 0===o||o.off("display_uri"),r.abrupt("return",e());case 7:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}()),a.connector.createSession({chainId:parseInt((null===(r=a.chainConfig)||void 0===r?void 0:r.chainId)||"0x1",16)}).catch((function(e){return Ie.cM.error("error while creating new wallet connect session",e),a.emit(Ie.n2.ERRORED,e),t(e)}))})));case 11:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"onConnectHandler",value:(t=(0,i.Z)(p().mark((function e(t){var r,n,i,o,a,s;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.connector&&this.wcProvider){e.next=2;break}throw Ie.Ty.notReady("Wallet adapter is not ready yet");case 2:if(this.chainConfig){e.next=4;break}throw Ie.Ty.invalidParams("Chain config is not set");case 4:if(r=t.chainId,Ie.cM.debug("connected chainId in hex"),r===parseInt(this.chainConfig.chainId,16)){e.next=27;break}if(a=(0,Ie.h2)(Ie.EN.EIP155,r)||{chainId:"0x".concat(r.toString(16)),displayName:"Unknown Network"},(s=null===(n=this.adapterOptions.adapterSettings)||void 0===n?void 0:n.qrcodeModal)&&(!s||null!==(i=this.adapterOptions)&&void 0!==i&&null!==(o=i.adapterSettings)&&void 0!==o&&o.skipNetworkSwitching)){e.next=27;break}return e.prev=10,e.next=13,this.addChain(this.chainConfig);case 13:return e.next=15,this.switchChain(a,this.chainConfig);case 15:this.connector=this.getWalletConnectInstance(),e.next=27;break;case 18:return e.prev=18,e.t0=e.catch(10),Ie.cM.error("error while chain switching",e.t0),e.next=23,this.createNewSession({forceNewSession:!0});case 23:return this.emit(Ie.n2.ERRORED,Ie.Ty.fromCode(5e3,"Not connected to correct network. Expected: ".concat(this.chainConfig.displayName,", Current: ").concat((null==a?void 0:a.displayName)||r,", Please switch to correct network from wallet"))),this.status=Ie.MP.READY,this.rehydrated=!0,e.abrupt("return");case 27:return e.next=29,this.wcProvider.setupProvider(this.connector);case 29:this.subscribeEvents(this.connector),this.status=Ie.MP.CONNECTED,this.emit(Ie.n2.CONNECTED,{adapter:Ie.rW.WALLET_CONNECT_V1,reconnected:this.rehydrated});case 32:case"end":return e.stop()}}),e,this,[[10,18]])}))),function(e){return t.apply(this,arguments)})},{key:"subscribeEvents",value:function(e){var t=this;e.on("session_update",function(){var e=(0,i.Z)(p().mark((function e(r){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r&&t.emit(Ie.n2.ERRORED,r);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},{key:"getWalletConnectInstance",value:function(){var e=this.adapterOptions.adapterSettings||{};return e.bridge=e.bridge||"https://bridge.walletconnect.org",new class extends class{constructor(e){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new class{constructor(){this._eventEmitters=[]}subscribe(e){this._eventEmitters.push(e)}unsubscribe(e){this._eventEmitters=this._eventEmitters.filter((t=>t.event!==e))}trigger(e){let t,r=[];t=void 0!==e.method?e.method:ue(e)||le(e)?`response:${e.id}`:fe(e)?e.event:"",t&&(r=this._eventEmitters.filter((e=>e.event===t))),r&&r.length||function(e){return j.includes(e)||e.startsWith("wc_")}(t)||fe(t)||(r=this._eventEmitters.filter((e=>"call_request"===e.event))),r.forEach((t=>{if(le(e)){const r=new Error(e.error.message);t.callback(r,null)}else t.callback(null,e)}))}},this._clientMeta=T()||e.connectorOpts.clientMeta||null,this._cryptoLib=e.cryptoLib,this._sessionStorage=e.sessionStorage||new class{constructor(e="walletconnect"){this.storageId=e}getSession(){let e=null;const t=M(this.storageId);return t&&void 0!==t.bridge&&(e=t),e}setSession(e){return function(e,t){const r="string"==typeof(i=t)?i:JSON.stringify(i),n=B();var i;n&&n.setItem(e,r)}(this.storageId,e),e}removeSession(){R(this.storageId)}}(e.connectorOpts.storageId),this._qrcodeModal=e.connectorOpts.qrcodeModal,this._qrcodeModalOptions=e.connectorOpts.qrcodeModalOptions,this._signingMethods=[...L,...e.connectorOpts.signingMethods||[]],!e.connectorOpts.bridge&&!e.connectorOpts.uri&&!e.connectorOpts.session)throw new Error("Missing one of the required parameters: bridge / uri / session");var t;e.connectorOpts.bridge&&(this.bridge=function(e){return"walletconnect.org"===function(e){return function(e){let t=e.indexOf("//")>-1?e.split("/")[2]:e.split("/")[0];return t=t.split(":")[0],t=t.split("?")[0],t}(e).split(".").slice(-2).join(".")}(e)}(t=e.connectorOpts.bridge)?Ae[Math.floor(Math.random()*Ae.length)]:t),e.connectorOpts.uri&&(this.uri=e.connectorOpts.uri);const r=e.connectorOpts.session||this._getStorageSession();r&&(this.session=r),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=e.transport||new class{constructor(e){if(this.opts=e,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=e.protocol,this._version=e.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=e.subscriptions||[],this._netMonitor=e.netMonitor||new class{constructor(){this._eventEmitters=[],"undefined"!=typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",(()=>this.trigger("online"))),window.addEventListener("offline",(()=>this.trigger("offline"))))}on(e,t){this._eventEmitters.push({event:e,callback:t})}trigger(e){let t=[];e&&(t=this._eventEmitters.filter((t=>t.event===e))),t.forEach((e=>{e.callback()}))}},!e.url||"string"!=typeof e.url)throw new Error("Missing or invalid WebSocket url");this._url=e.url,this._netMonitor.on("online",(()=>this._socketCreate()))}set readyState(e){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(e){}get connecting(){return 0===this.readyState}set connected(e){}get connected(){return 1===this.readyState}set closing(e){}get closing(){return 2===this.readyState}set closed(e){}get closed(){return 3===this.readyState}open(){this._socketCreate()}close(){this._socketClose()}send(e,t,r){if(!t||"string"!=typeof t)throw new Error("Missing or invalid topic field");this._socketSend({topic:t,type:"pub",payload:e,silent:!!r})}subscribe(e){this._socketSend({topic:e,type:"sub",payload:"",silent:!0})}on(e,t){this._events.push({event:e,callback:t})}_socketCreate(){if(this._nextSocket)return;const e=function(e,t,r){var n,i;const o=(e.startsWith("https")?e.replace("https","wss"):e.startsWith("http")?e.replace("http","ws"):e).split("?"),a=!function(){const e=C();return!(!e||!e.name)&&"node"===e.name.toLowerCase()}()&&O()?{protocol:t,version:r,env:"browser",host:(null===(n=I())||void 0===n?void 0:n.host)||""}:{protocol:t,version:r,env:(null===(i=C())||void 0===i?void 0:i.name)||""},s=function(e,t){let r=ge(e);return r=Object.assign(Object.assign({},r),t),e=function(e){return pe.stringify(e)}(r),e}(function(e){const t=-1!==e.indexOf("?")?e.indexOf("?"):void 0;return void 0!==t?e.substr(t):""}(o[1]||""),a);return o[0]+"?"+s}(this._url,this._protocol,this._version);if(this._nextSocket=new me(e),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=e=>this._socketReceive(e),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=e=>this._socketError(e),this._nextSocket.onclose=()=>{setTimeout((()=>{this._nextSocket=null,this._socketCreate()}),1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(e){const t=JSON.stringify(e);this._socket&&1===this._socket.readyState?this._socket.send(t):(this._setToQueue(e),this._socketCreate())}async _socketReceive(e){let t;try{t=JSON.parse(e.data)}catch(e){return}if(this._socketSend({topic:t.topic,type:"ack",payload:"",silent:!0}),this._socket&&1===this._socket.readyState){const e=this._events.filter((e=>"message"===e.event));e&&e.length&&e.forEach((e=>e.callback(t)))}}_socketError(e){const t=this._events.filter((e=>"error"===e.event));t&&t.length&&t.forEach((t=>t.callback(e)))}_queueSubscriptions(){this._subscriptions.forEach((e=>this._queue.push({topic:e,type:"sub",payload:"",silent:!0}))),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(e){this._queue.push(e)}_pushQueue(){this._queue.forEach((e=>this._socketSend(e))),this._queue=[]}}({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),e.connectorOpts.uri&&this._subscribeToSessionRequest(),e.pushServerOpts&&this._registerPushServer(e.pushServerOpts)}set bridge(e){e&&(this._bridge=e)}get bridge(){return this._bridge}set key(e){if(!e)return;const t=$(e).buffer;this._key=t}get key(){return this._key?(e=this._key,V(new Uint8Array(e),!1)):"";var e}set clientId(e){e&&(this._clientId=e)}get clientId(){let e=this._clientId;return e||(e=this._clientId=se()),this._clientId}set peerId(e){e&&(this._peerId=e)}get peerId(){return this._peerId}set clientMeta(e){}get clientMeta(){let e=this._clientMeta;return e||(e=this._clientMeta=T()),e}set peerMeta(e){this._peerMeta=e}get peerMeta(){return this._peerMeta}set handshakeTopic(e){e&&(this._handshakeTopic=e)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(e){e&&(this._handshakeId=e)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(e){if(!e)return;const{handshakeTopic:t,bridge:r,key:n}=this._parseUri(e);this.handshakeTopic=t,this.bridge=r,this.key=n}set chainId(e){this._chainId=e}get chainId(){return this._chainId}set networkId(e){this._networkId=e}get networkId(){return this._networkId}set accounts(e){this._accounts=e}get accounts(){return this._accounts}set rpcUrl(e){this._rpcUrl=e}get rpcUrl(){return this._rpcUrl}set connected(e){}get connected(){return this._connected}set pending(e){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.bridge=e.bridge,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic)}on(e,t){const r={event:e,callback:t};this._eventManager.subscribe(r)}off(e){this._eventManager.unsubscribe(e)}async createInstantRequest(e){this._key=await this._generateKey();const t=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(e)}]});this.handshakeId=t.id,this.handshakeTopic=se(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",(()=>{throw new Error(we)}));const r=()=>{this.killSession()};try{const e=await this._sendCallRequest(t);return e&&r(),e}catch(e){throw r(),e}}async connect(e){if(!this._qrcodeModal)throw new Error("QRCode Modal not provided");return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(e),new Promise((async(e,t)=>{this.on("modal_closed",(()=>t(new Error(we)))),this.on("connect",((r,n)=>{if(r)return t(r);e(n.params[0])}))})))}async createSession(e){if(this._connected)throw new Error(ye);if(this.pending)return;this._key=await this._generateKey();const t=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e&&e.chainId?e.chainId:null}]});this.handshakeId=t.id,this.handshakeTopic=se(),this._sendSessionRequest(t,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(e){if(this._connected)throw new Error(ye);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const t={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},r={id:this.handshakeId,jsonrpc:"2.0",result:t};this._sendResponse(r),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(e){if(this._connected)throw new Error(ye);const t=e&&e.message?e.message:"Session Rejected",r=this._formatResponse({id:this.handshakeId,error:{message:t}});this._sendResponse(r),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:t}]}),this._removeStorageSession()}updateSession(e){if(!this._connected)throw new Error(be);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const t={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},r=this._formatRequest({method:"wc_sessionUpdate",params:[t]});this._sendSessionRequest(r,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(e){const t=e?e.message:"Session Disconnected",r=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]});await this._sendRequest(r),this._handleSessionDisconnect(t)}async sendTransaction(e){if(!this._connected)throw new Error(be);const t=he(e),r=this._formatRequest({method:"eth_sendTransaction",params:[t]});return await this._sendCallRequest(r)}async signTransaction(e){if(!this._connected)throw new Error(be);const t=he(e),r=this._formatRequest({method:"eth_signTransaction",params:[t]});return await this._sendCallRequest(r)}async signMessage(e){if(!this._connected)throw new Error(be);const t=this._formatRequest({method:"eth_sign",params:e});return await this._sendCallRequest(t)}async signPersonalMessage(e){if(!this._connected)throw new Error(be);e=de(e);const t=this._formatRequest({method:"personal_sign",params:e});return await this._sendCallRequest(t)}async signTypedData(e){if(!this._connected)throw new Error(be);const t=this._formatRequest({method:"eth_signTypedData",params:e});return await this._sendCallRequest(t)}async updateChain(e){if(!this._connected)throw new Error("Session currently disconnected");const t=this._formatRequest({method:"wallet_updateChain",params:[e]});return await this._sendCallRequest(t)}unsafeSend(e,t){return this._sendRequest(e,t),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:t}]}),new Promise(((t,r)=>{this._subscribeToResponse(e.id,((e,n)=>{if(e)r(e);else{if(!n)throw new Error("Missing JSON RPC response");t(n)}}))}))}async sendCustomRequest(e,t){if(!this._connected)throw new Error(be);switch(e.method){case"eth_accounts":return this.accounts;case"eth_chainId":return re(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":e.params&&(e.params[0]=he(e.params[0]));break;case"personal_sign":e.params&&(e.params=de(e.params))}const r=this._formatRequest(e);return await this._sendCallRequest(r,t)}approveRequest(e){if(!ue(e))throw new Error('JSON-RPC success response must include "result" field');{const t=this._formatResponse(e);this._sendResponse(t)}}rejectRequest(e){if(!le(e))throw new Error('JSON-RPC error response must include "error" field');{const t=this._formatResponse(e);this._sendResponse(t)}}transportClose(){this._transport.close()}async _sendRequest(e,t){const r=this._formatRequest(e),n=await this._encrypt(r),i=void 0!==(null==t?void 0:t.topic)?t.topic:this.peerId,o=JSON.stringify(n),a=void 0!==(null==t?void 0:t.forcePushNotification)?!t.forcePushNotification:function(e){return!!e.method.startsWith("wc_")||!L.includes(e.method)}(r);this._transport.send(o,i,a)}async _sendResponse(e){const t=await this._encrypt(e),r=this.peerId,n=JSON.stringify(t);this._transport.send(n,r,!0)}async _sendSessionRequest(e,t,r){this._sendRequest(e,r),this._subscribeToSessionResponse(e.id,t)}_sendCallRequest(e,t){return this._sendRequest(e,t),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:t}]}),this._subscribeToCallResponse(e.id)}_formatRequest(e){if(void 0===e.method)throw new Error('JSON RPC request must have valid "method" value');return{id:void 0===e.id?ae():e.id,jsonrpc:"2.0",method:e.method,params:void 0===e.params?[]:e.params}}_formatResponse(e){if(void 0===e.id)throw new Error('JSON RPC request must have valid "id" value');const t={id:e.id,jsonrpc:"2.0"};if(le(e)){const r=function(e){const t=e.message||"Failed or Rejected Request";let r=-32e3;if(e&&!e.code)switch(t){case"Parse error":r=-32700;break;case"Invalid request":r=-32600;break;case"Method not found":r=-32601;break;case"Invalid params":r=-32602;break;case"Internal error":r=-32603;break;default:r=-32e3}const n={code:r,message:t};return e.data&&(n.data=e.data),n}(e.error);return Object.assign(Object.assign(Object.assign({},t),e),{error:r})}if(ue(e))return Object.assign(Object.assign({},t),e);throw new Error(ve)}_handleSessionDisconnect(e){const t=e||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),R(N)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:t}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(e,t){t&&t.approved?(this._connected?(t.chainId&&(this.chainId=t.chainId),t.accounts&&(this.accounts=t.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,t.chainId&&(this.chainId=t.chainId),t.accounts&&(this.accounts=t.accounts),t.peerId&&!this.peerId&&(this.peerId=t.peerId),t.peerMeta&&!this.peerMeta&&(this.peerMeta=t.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(e)}async _handleIncomingMessages(e){if(![this.clientId,this.handshakeTopic].includes(e.topic))return;let t;try{t=JSON.parse(e.payload)}catch(e){return}const r=await this._decrypt(t);r&&this._eventManager.trigger(r)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(e,t){this.on(`response:${e}`,t)}_subscribeToSessionResponse(e,t){this._subscribeToResponse(e,((e,r)=>{e?this._handleSessionResponse(e.message):ue(r)?this._handleSessionResponse(t,r.result):r.error&&r.error.message?this._handleSessionResponse(r.error.message):this._handleSessionResponse(t)}))}_subscribeToCallResponse(e){return new Promise(((t,r)=>{this._subscribeToResponse(e,((e,n)=>{e?r(e):ue(n)?t(n.result):n.error&&n.error.message?r(n.error):r(new Error(ve))}))}))}_subscribeToInternalEvents(){this.on("display_uri",(()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,(()=>{this._eventManager.trigger({event:"modal_closed",params:[]})}),this._qrcodeModalOptions)})),this.on("connect",(()=>{this._qrcodeModal&&this._qrcodeModal.close()})),this.on("call_request_sent",((e,t)=>{const{request:r}=t.params[0];if(P()&&(function(){const e=P();return!!e&&e.toLowerCase().includes("android")}()||function(){const e=P();return!!e&&(e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}())&&this._signingMethods.includes(r.method)){const e=M(N);e&&(window.location.href=e.href)}})),this.on("wc_sessionRequest",((e,t)=>{e&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:e.toString()}]}),this.handshakeId=t.id,this.peerId=t.params[0].peerId,this.peerMeta=t.params[0].peerMeta;const r=Object.assign(Object.assign({},t),{method:"session_request"});this._eventManager.trigger(r)})),this.on("wc_sessionUpdate",((e,t)=>{e&&this._handleSessionResponse(e.message),this._handleSessionResponse("Session disconnected",t.params[0])}))}_initTransport(){this._transport.on("message",(e=>this._handleIncomingMessages(e))),this._transport.on("open",(()=>this._eventManager.trigger({event:"transport_open",params:[]}))),this._transport.on("close",(()=>this._eventManager.trigger({event:"transport_close",params:[]}))),this._transport.on("error",(()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]}))),this._transport.open()}_formatUri(){return`${this.protocol}:${this.handshakeTopic}@${this.version}?bridge=${encodeURIComponent(this.bridge)}&key=${this.key}`}_parseUri(e){const t=function(e){const t=e.indexOf(":"),r=-1!==e.indexOf("?")?e.indexOf("?"):void 0,n=e.substring(0,t),i=function(e){const t=e.split("@");return{handshakeTopic:t[0],version:parseInt(t[1],10)}}(e.substring(t+1,r)),o=function(e){const t=ge(e);return{key:t.key||"",bridge:t.bridge||""}}(void 0!==r?e.substr(r):"");return Object.assign(Object.assign({protocol:n},i),o)}(e);if(t.protocol===this.protocol){if(!t.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const e=t.handshakeTopic;if(!t.bridge)throw Error("Invalid or missing bridge url parameter value");const r=decodeURIComponent(t.bridge);if(!t.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:e,bridge:r,key:t.key}}throw new Error("URI format is invalid")}async _generateKey(){return this._cryptoLib?await this._cryptoLib.generateKey():null}async _encrypt(e){const t=this._key;return this._cryptoLib&&t?await this._cryptoLib.encrypt(e,t):null}async _decrypt(e){const t=this._key;return this._cryptoLib&&t?await this._cryptoLib.decrypt(e,t):null}_getStorageSession(){let e=null;return this._sessionStorage&&(e=this._sessionStorage.getSession()),e}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(e){if(!e.url||"string"!=typeof e.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!e.type||"string"!=typeof e.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!e.token||"string"!=typeof e.token)throw Error("Invalid or missing pushServerOpts.token parameter value");const t={bridge:this.bridge,topic:this.clientId,type:e.type,token:e.token,peerName:"",language:e.language||""};this.on("connect",(async(r,n)=>{if(r)throw r;if(e.peerMeta){const e=n.params[0].peerMeta.name;t.peerName=e}try{const r=await fetch(`${e.url}/new`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)});if(!(await r.json()).success)throw Error("Failed to register in Push Server")}catch(r){throw Error("Failed to register in Push Server")}}))}}{constructor(e,t){super({cryptoLib:n,connectorOpts:e,pushServerOpts:t})}}(e)}}]),E}(Be.d)},27590:(e,t,r)=>{"use strict";r.d(t,{hN:()=>P,n2:()=>I,yk:()=>d,MP:()=>O,J5:()=>B,EN:()=>f,$z:()=>x,hf:()=>E,rW:()=>k,Ty:()=>b,RM:()=>v,up:()=>y,$E:()=>W,qz:()=>J,h2:()=>h,Cb:()=>G,H2:()=>q,cM:()=>Z,Fr:()=>$,tV:()=>K,oZ:()=>H,rn:()=>V});var n=r(9249),i=r(87371),o=r(80753),a=r(88106),s=r(11987),c=r(95058),u=r(56666),l=r(17391),f={EIP155:"eip155",SOLANA:"solana",OTHER:"other"},d={EIP155:"eip155",SOLANA:"solana",MULTICHAIN:"multichain"},h=function(e,t){if(e===f.OTHER)return null;var r=t?"number"==typeof t?t:parseInt(t,16):function(e){if(e===f.EIP155)return 1;if(e===f.SOLANA)return 1;throw new Error("Chain namespace ".concat(e," is not supported"))}(e);return e===f.EIP155?function(e){var t=f.EIP155;return 1===e?{chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/eth",displayName:"Ethereum Mainnet",blockExplorer:"https://etherscan.io/",ticker:"ETH",tickerName:"Ethereum"}:3===e?{chainNamespace:t,chainId:"0x3",rpcTarget:"https://rpc.ankr.com/eth_ropsten",displayName:"Ropsten Testnet",blockExplorer:"https://ropsten.etherscan.io/",ticker:"ETH",tickerName:"Ethereum"}:4===e?{chainNamespace:t,chainId:"0x4",rpcTarget:"https://rpc.ankr.com/eth_rinkeby",displayName:"Rinkeby Testnet",blockExplorer:"https://rinkeby.etherscan.io/",ticker:"ETH",tickerName:"Ethereum"}:5===e?{chainNamespace:t,chainId:"0x5",rpcTarget:"https://rpc.ankr.com/eth_goerli",displayName:"Goerli Testnet",blockExplorer:"https://goerli.etherscan.io/",ticker:"ETH",tickerName:"Ethereum"}:137===e?{chainNamespace:t,chainId:"0x89",rpcTarget:"https://rpc.ankr.com/polygon",displayName:"Polygon Mainnet",blockExplorer:"https://polygonscan.com",ticker:"MATIC",tickerName:"Polygon"}:80001===e?{chainNamespace:t,chainId:"0x13881",rpcTarget:"https://rpc.ankr.com/polygon_mumbai",displayName:"Polygon Mumbai Testnet",blockExplorer:"https://mumbai.polygonscan.com/",ticker:"MATIC",tickerName:"Polygon"}:56===e?{chainNamespace:t,chainId:"0x38",rpcTarget:"https://rpc.ankr.com/bsc",displayName:"Binance SmartChain Mainnet",blockExplorer:"https://bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain"}:97===e?{chainNamespace:t,chainId:"0x61",rpcTarget:"https://rpc.ankr.com/bsc_testnet_chapel",displayName:"Binance SmartChain Testnet",blockExplorer:"https://testnet.bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain"}:25===e?{chainNamespace:t,chainId:"0x19",rpcTarget:"https://rpc.cronos.org",displayName:"Cronos Mainnet",blockExplorer:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos"}:338===e?{chainNamespace:t,chainId:"0x152",rpcTarget:"https://rpc-t3.cronos.org/",displayName:"Cronos Testnet",blockExplorer:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos"}:8217===e?{chainNamespace:t,chainId:"0x2019",rpcTarget:"https://public-node-api.klaytnapi.com/v1/cypress",displayName:"Klaytn Mainnet",blockExplorer:"https://scope.klaytn.com",ticker:"KLAY",tickerName:"Klaytn"}:null}(r):e===f.SOLANA?function(e){var t=f.SOLANA;return 1===e?{chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/solana",displayName:"Solana Mainnet",blockExplorer:"https://explorer.solana.com",ticker:"SOL",tickerName:"Solana"}:2===e?{chainNamespace:t,chainId:"0x2",rpcTarget:"https://api.testnet.solana.com",displayName:"Solana Testnet",blockExplorer:"https://explorer.solana.com?cluster=testnet",ticker:"SOL",tickerName:"Solana"}:3===e?{chainNamespace:t,chainId:"0x3",rpcTarget:"https://api.devnet.solana.com",displayName:"Solana Devnet",blockExplorer:"https://explorer.solana.com?cluster=devnet",ticker:"SOL",tickerName:"Solana"}:null}(r):null};var p,g=(p=function(e,t){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},p(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,c.Z)(e);if(t){var i=(0,c.Z)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.Z)(this,r)}}var y=function(e){(0,a.Z)(r,e);var t=m(r);function r(e,i){var a;return(0,n.Z)(this,r),a=t.call(this,i),(0,u.Z)((0,o.Z)(a),"code",void 0),(0,u.Z)((0,o.Z)(a),"message",void 0),a.code=e,a.message=i||"",Object.defineProperty((0,o.Z)(a),"name",{value:"Web3AuthError"}),a}return(0,i.Z)(r,[{key:"toJSON",value:function(){return{name:this.name,code:this.code,message:this.message}}},{key:"toString",value:function(){return JSON.stringify(this.toJSON())}}]),r}(function(e){function t(t){var r,n,i,o=this.constructor,a=e.call(this,t)||this;return Object.defineProperty(a,"name",{value:o.name,enumerable:!1,configurable:!0}),r=a,n=o.prototype,(i=Object.setPrototypeOf)?i(r,n):r.__proto__=n,function(e,t){void 0===t&&(t=e.constructor);var r=Error.captureStackTrace;r&&r(e,t)}(a),a}return g(t,e),t}(Error)),b=function(e){(0,a.Z)(r,e);var t=m(r);function r(e,i){var a;return(0,n.Z)(this,r),a=t.call(this,e,i),Object.defineProperty((0,o.Z)(a),"name",{value:"WalletInitializationError"}),a}return(0,i.Z)(r,null,[{key:"fromCode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new r(e,"".concat(r.messages[e],", ").concat(t))}},{key:"notFound",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5001,e)}},{key:"notInstalled",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5002,e)}},{key:"notReady",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5003,e)}},{key:"windowBlocked",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5004,e)}},{key:"windowClosed",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5005,e)}},{key:"incompatibleChainNameSpace",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5006,e)}},{key:"duplicateAdapterError",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5007,e)}},{key:"invalidProviderConfigError",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5008,e)}},{key:"providerNotReadyError",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5009,e)}},{key:"rpcConnectionError",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5010,e)}},{key:"invalidParams",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5011,e)}},{key:"invalidNetwork",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5013,e)}}]),r}(y);(0,u.Z)(b,"messages",{5e3:"Custom",5001:"Wallet is not found",5002:"Wallet is not installed",5003:"Wallet is not ready yet",5004:"Wallet window is blocked",5005:"Wallet window has been closed by the user",5006:"Incompatible chain namespace provided",5007:"Adapter has already been included",5008:"Invalid provider Config",5009:"Provider is not ready yet",5010:"Failed to connect with rpc url",5011:"Invalid params passed in",5013:"Invalid network provided"});var v=function(e){(0,a.Z)(r,e);var t=m(r);function r(e,i){var a;return(0,n.Z)(this,r),a=t.call(this,e,i),Object.defineProperty((0,o.Z)(a),"name",{value:"WalletLoginError"}),a}return(0,i.Z)(r,null,[{key:"fromCode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new r(e,"".concat(r.messages[e]).concat(t))}},{key:"connectionError",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5111,e)}},{key:"disconnectionError",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5112,e)}},{key:"notConnectedError",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5113,e)}},{key:"popupClosed",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.fromCode(5114,e)}}]),r}(y);function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}(0,u.Z)(v,"messages",{5e3:"Custom",5111:"Failed to connect with wallet",5112:"Failed to disconnect from wallet",5113:"Wallet is not connected",5114:"Wallet popup has been closed by the user"});var _={OPENLOGIN:"openlogin",WALLET_CONNECT_V1:"wallet-connect-v1",WALLET_CONNECT_V2:"wallet-connect-v2"},E=A({TORUS_SOLANA:"torus-solana",PHANTOM:"phantom",SOLLET:"sollet",SOLLET_EXTENSION:"sollet-extension",SOLFLARE:"solflare",SLOPE:"slope"},_),x=A({TORUS_EVM:"torus-evm",METAMASK:"metamask",COINBASE:"coinbase"},_),k=A(A({},x),E);function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var P={EXTERNAL:"external",IN_APP:"in_app"},O={NOT_READY:"not_ready",READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"},I=C(C({},O),{},{ADAPTER_DATA_UPDATED:"adapter_data_updated"}),B=function(e){(0,a.Z)(f,e);var t,r,l=(t=f,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,c.Z)(t);if(r){var i=(0,c.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.Z)(this,e)});function f(){var e;(0,n.Z)(this,f);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e=l.call.apply(l,[this].concat(r)),(0,u.Z)((0,o.Z)(e),"adapterData",{}),(0,u.Z)((0,o.Z)(e),"sessionTime",86400),(0,u.Z)((0,o.Z)(e),"chainConfig",null),(0,u.Z)((0,o.Z)(e),"clientId",void 0),(0,u.Z)((0,o.Z)(e),"adapterNamespace",void 0),(0,u.Z)((0,o.Z)(e),"currentChainNamespace",void 0),(0,u.Z)((0,o.Z)(e),"type",void 0),(0,u.Z)((0,o.Z)(e),"name",void 0),(0,u.Z)((0,o.Z)(e),"status",void 0),e}return(0,i.Z)(f,[{key:"chainConfigProxy",get:function(){return this.chainConfig?C({},this.chainConfig):null}},{key:"setChainConfig",value:function(e){if(this.status!==O.READY){if(!e.chainNamespace)throw b.notReady("ChainNamespace is required while setting chainConfig");var t=h(e.chainNamespace,e.chainId);this.chainConfig=C(C({},t),e)}}},{key:"setAdapterSettings",value:function(e){}},{key:"checkConnectionRequirements",value:function(){if(this.name!==k.WALLET_CONNECT_V1||this.status!==O.CONNECTING){if(this.status===O.CONNECTING)throw b.notReady("Already connecting");if(this.status===O.CONNECTED)throw v.connectionError("Already connected");if(this.status!==O.READY)throw v.connectionError("Wallet adapter is not ready yet, Please wait for init function to resolve before calling connect/connectTo function");if(!this.clientId)throw v.connectionError("Please initialize Web3Auth with a valid clientId in constructor")}}},{key:"checkInitializationRequirements",value:function(){if(this.status!==O.NOT_READY){if(this.status===O.CONNECTED)throw b.notReady("Already connected");if(this.status===O.READY)throw b.notReady("Adapter is already initialized")}}},{key:"updateAdapterData",value:function(e){this.adapterData=e,this.emit(I.ADAPTER_DATA_UPDATED,{adapterName:this.name,data:e})}}]),f}(l.Ue),T=r(34795),M=r(82841),R=r.n(M),N=r(23460);function j(e){this.message=e}j.prototype=new Error,j.prototype.name="InvalidCharacterError";var L="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new j("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,i=0,o=0,a="";n=t.charAt(o++);~n&&(r=i%4?64*r+n:n,i++%4)?a+=String.fromCharCode(255&r>>(-2*i&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return a};function U(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(L(e).replace(/(.)/g,(function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(e){return L(t)}}function D(e){this.message=e}D.prototype=new Error,D.prototype.name="InvalidTokenError";var F="https://authjs.web3auth.io",z=r(79640);const Z=r.n(z)().getLogger("web3auth-logger");function H(e){var t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;var i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){var o=e;return!(!o||22!==o.code&&1014!==o.code&&"QuotaExceededError"!==o.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==o.name||!r||0===n)}}var q=function(e){return("string"==typeof e||"number"==typeof e)&&/^(-)?0x[0-9a-f]*$/i.test(e)},W=function(e){var t=function(e,t){if("string"!=typeof e)throw new D("Invalid token specified");var r=!0===(t=t||{}).header?0:1;try{return JSON.parse(U(e.split(".")[r]))}catch(e){throw new D("Invalid token specified: "+e.message)}}(e);return!t.exp||t.exp<Math.floor(Date.now()/1e3)},K=function(){var e=(0,T.Z)(R().mark((function e(t,r){var n,i;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={payload:t,header:{t:"solana"===r?"sip99":"eip191"},network:"solana"===r?"solana":"ethereum"},e.next=6,(0,N.v_)("".concat(F,"/siww/get"),n);case 6:if((i=e.sent).success){e.next=9;break}throw new Error("Failed to authenticate user, Please reach out to Web3Auth Support team");case 9:return e.abrupt("return",i.challenge);case 10:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),V=function(){var e=(0,T.Z)(R().mark((function e(t,r,n,i,o,a){var s,c;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={signature:{s:r,t:"solana"===t?"sip99":"eip191"},message:n,issuer:i,audience:window.location.hostname,timeout:o},e.next=4,(0,N.v_)("".concat(F,"/siww/verify"),s,{headers:{client_id:a,wallet_provider:i}});case 4:if((c=e.sent).success){e.next=8;break}throw Z.error("Failed to authenticate user, ,message verification failed",c.error),new Error("Failed to authenticate user, ,message verification failed");case 8:return e.abrupt("return",c.token);case 9:case"end":return e.stop()}}),e)})));return function(t,r,n,i,o,a){return e.apply(this,arguments)}}(),G=function(e,t){return H("localStorage")?localStorage.getItem("".concat(e.toLowerCase(),"_").concat(t)):null},$=function(e,t,r){return H("localStorage")?localStorage.setItem("".concat(e.toLowerCase(),"_").concat(t),r):null},J=function(e,t){return H("localStorage")?localStorage.removeItem("".concat(e.toLowerCase(),"_").concat(t)):null}},89591:(e,t,r)=>{"use strict";r.d(t,{Jx:()=>s,K8:()=>u,OW:()=>c,ql:()=>l,ue:()=>f});var n,i,o=r(56666),a=r(27590),s={chainNamespace:a.EN.SOLANA,adapters:(n={},(0,o.Z)(n,a.hf.TORUS_SOLANA,{label:"Torus Wallet",showOnModal:!0,showOnMobile:!0,showOnDesktop:!0}),(0,o.Z)(n,a.hf.OPENLOGIN,{label:"OpenLogin",showOnModal:!0,showOnMobile:!0,showOnDesktop:!0}),(0,o.Z)(n,a.hf.PHANTOM,{label:"Phantom",showOnModal:!0,showOnMobile:!1,showOnDesktop:!0}),n)},c={chainNamespace:a.EN.EIP155,adapters:(i={},(0,o.Z)(i,a.$z.TORUS_EVM,{label:"Torus Wallet",showOnModal:!0,showOnMobile:!0,showOnDesktop:!0}),(0,o.Z)(i,a.$z.METAMASK,{label:"MetaMask",showOnModal:!0,showOnMobile:!1,showOnDesktop:!0}),(0,o.Z)(i,a.$z.OPENLOGIN,{label:"OpenLogin",showOnModal:!0,showOnMobile:!0,showOnDesktop:!0}),(0,o.Z)(i,a.$z.WALLET_CONNECT_V1,{label:"Wallet Connect",showOnModal:!0,showOnMobile:!0,showOnDesktop:!0}),i)},u={chainNamespace:a.EN.SOLANA,adapters:(0,o.Z)({},a.hf.OPENLOGIN,{label:"OpenLogin",showOnModal:!0,showOnMobile:!0,showOnDesktop:!0})},l={chainNamespace:a.EN.EIP155,adapters:(0,o.Z)({},a.$z.OPENLOGIN,{label:"OpenLogin",showOnModal:!0,showOnMobile:!0,showOnDesktop:!0})},f={chainNamespace:a.EN.OTHER,adapters:(0,o.Z)({},a.$z.OPENLOGIN,{label:"OpenLogin",showOnModal:!0,showOnMobile:!0,showOnDesktop:!0})}},1510:()=>{},37491:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function o(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function a(e){return function(e){if(Array.isArray(e))return n(e)}(e)||i(e)||o(e)||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.")}()}r.d(t,{$:()=>_r});var s=r(34795),c=r(9249),u=r(87371),l=r(80753),f=r(93069),d=r(88106),h=r(11987),p=r(95058),g=r(56666),m=r(82841),y=r.n(m),b=r(27590),v=r(17391);function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _=A(A({},b.EN),{},{MULTICHAIN:"multichain"});function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var k="Web3Auth-cachedAdapter",S=function(e){(0,d.Z)(w,e);var t,r,n,i,o,a,f,m,v=(f=w,m=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,p.Z)(f);if(m){var r=(0,p.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,h.Z)(this,e)});function w(e){var t,r,n,i,o;if((0,c.Z)(this,w),o=v.call(this),(0,g.Z)((0,l.Z)(o),"coreOptions",void 0),(0,g.Z)((0,l.Z)(o),"connectedAdapterName",null),(0,g.Z)((0,l.Z)(o),"status",b.MP.NOT_READY),(0,g.Z)((0,l.Z)(o),"cachedAdapter",null),(0,g.Z)((0,l.Z)(o),"walletAdapters",{}),(0,g.Z)((0,l.Z)(o),"plugins",{}),(0,g.Z)((0,l.Z)(o),"storage","localStorage"),!e.clientId)throw b.Ty.invalidParams("Please provide a valid clientId in constructor");if(e.enableLogging?b.cM.enableAll():b.cM.disableAll(),null===(t=e.chainConfig)||void 0===t||!t.chainNamespace||!Object.values(b.EN).includes(null===(r=e.chainConfig)||void 0===r?void 0:r.chainNamespace))throw b.Ty.invalidParams("Please provide a valid chainNamespace in chainConfig");return"session"===e.storageKey&&(o.storage="sessionStorage"),o.cachedAdapter=(0,b.oZ)(o.storage)?window[o.storage].getItem(k):null,o.coreOptions=x(x({},e),{},{chainConfig:x(x({},(0,b.h2)(null===(n=e.chainConfig)||void 0===n?void 0:n.chainNamespace,null===(i=e.chainConfig)||void 0===i?void 0:i.chainId)||{}),e.chainConfig)}),o.subscribeToAdapterEvents=o.subscribeToAdapterEvents.bind((0,l.Z)(o)),o}return(0,u.Z)(w,[{key:"provider",get:function(){return this.status===b.MP.CONNECTED&&this.connectedAdapterName?this.walletAdapters[this.connectedAdapterName].provider:null},set:function(e){throw new Error("Not implemented")}},{key:"init",value:(a=(0,s.Z)(y().mark((function e(){var t,r=this;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object.keys(this.walletAdapters).map((function(e){if(r.subscribeToAdapterEvents(r.walletAdapters[e]),!r.walletAdapters[e].chainConfigProxy){var t=r.coreOptions.chainConfig;if(!t.chainNamespace)throw b.Ty.invalidParams("Please provide chainNamespace in chainConfig");var n=x(x({},(0,b.h2)(t.chainNamespace,t.chainId)),t);r.walletAdapters[e].setChainConfig(n)}return r.walletAdapters[e].setAdapterSettings({sessionTime:r.coreOptions.sessionTime,clientId:r.coreOptions.clientId}),r.walletAdapters[e].init({autoConnect:r.cachedAdapter===e}).catch((function(e){return b.cM.error(e)}))})),this.status=b.MP.READY,e.next=4,Promise.all(t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"configureAdapter",value:function(e){this.checkInitRequirements();var t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw b.Ty.invalidParams("Please provide chainNamespace in chainConfig");if(this.walletAdapters[e.name])throw b.Ty.duplicateAdapterError("Wallet adapter for ".concat(e.name," already exists"));if(e.adapterNamespace!==b.yk.MULTICHAIN&&e.adapterNamespace!==t.chainNamespace)throw b.Ty.incompatibleChainNameSpace("This wallet adapter belongs to ".concat(e.adapterNamespace," which is incompatible with currently used namespace: ").concat(t.chainNamespace));return e.adapterNamespace===b.yk.MULTICHAIN&&e.currentChainNamespace&&t.chainNamespace!==e.currentChainNamespace&&e.setChainConfig(t),this.walletAdapters[e.name]=e,this}},{key:"clearCache",value:function(){(0,b.oZ)(this.storage)&&(window[this.storage].removeItem(k),this.cachedAdapter=null)}},{key:"connectTo",value:(o=(0,s.Z)(y().mark((function e(t,r){var n;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.walletAdapters[t]){e.next=2;break}throw b.Ty.notFound("Please add wallet adapter for ".concat(t," wallet, before connecting"));case 2:return e.next=4,this.walletAdapters[t].connect(r);case 4:return n=e.sent,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"logout",value:(i=(0,s.Z)(y().mark((function e(){var t,r=arguments;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]?r[0]:{cleanup:!1},this.status===b.MP.CONNECTED&&this.connectedAdapterName){e.next=3;break}throw b.RM.notConnectedError("No wallet is connected");case 3:return e.next=5,this.walletAdapters[this.connectedAdapterName].disconnect(t);case 5:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=(0,s.Z)(y().mark((function e(){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(b.cM.debug("Getting user info",this.status,this.connectedAdapterName),this.status===b.MP.CONNECTED&&this.connectedAdapterName){e.next=3;break}throw b.RM.notConnectedError("No wallet is connected");case 3:return e.abrupt("return",this.walletAdapters[this.connectedAdapterName].getUserInfo());case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"authenticateUser",value:(r=(0,s.Z)(y().mark((function e(){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.status===b.MP.CONNECTED&&this.connectedAdapterName){e.next=2;break}throw b.RM.notConnectedError("No wallet is connected");case 2:return e.abrupt("return",this.walletAdapters[this.connectedAdapterName].authenticateUser());case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"addPlugin",value:(t=(0,s.Z)(y().mark((function e(t){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.plugins[t.name]){e.next=2;break}throw new Error("Plugin ".concat(t.name," already exist"));case 2:if(t.pluginNamespace===_.MULTICHAIN||t.pluginNamespace===this.coreOptions.chainConfig.chainNamespace){e.next=4;break}throw new Error("This plugin belongs to ".concat(t.pluginNamespace," namespace which is incompatible with currently used namespace: ").concat(this.coreOptions.chainConfig.chainNamespace));case 4:return this.plugins[t.name]=t,e.next=7,t.initWithWeb3Auth(this);case 7:return e.abrupt("return",this);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"subscribeToAdapterEvents",value:function(e){var t=this;e.on(b.n2.CONNECTED,function(){var e=(0,s.Z)(y().mark((function e(r){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.status=b.MP.CONNECTED,t.connectedAdapterName=r.adapter,t.cacheWallet(r.adapter),b.cM.debug("connected",t.status,t.connectedAdapterName),e.next=6,Promise.all(Object.values(t.plugins).map((function(e){return e.connect().catch((function(e){5211!==e.code&&b.cM.error(e)}))})));case 6:t.emit(b.n2.CONNECTED,x({},r));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on(b.n2.DISCONNECTED,function(){var e=(0,s.Z)(y().mark((function e(r){var n;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.status=b.MP.READY,(0,b.oZ)(t.storage)&&(n=window[t.storage].getItem(k),t.connectedAdapterName===n&&t.clearCache()),b.cM.debug("disconnected",t.status,t.connectedAdapterName),e.next=5,Promise.all(Object.values(t.plugins).map((function(e){return e.disconnect().catch((function(e){5211!==e.code&&b.cM.error(e)}))})));case 5:t.connectedAdapterName=null,t.emit(b.n2.DISCONNECTED,r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.on(b.n2.CONNECTING,(function(e){t.status=b.MP.CONNECTING,t.emit(b.n2.CONNECTING,e),b.cM.debug("connecting",t.status,t.connectedAdapterName)})),e.on(b.n2.ERRORED,(function(e){t.status=b.MP.ERRORED,t.clearCache(),t.emit(b.n2.ERRORED,e),b.cM.debug("errored",t.status,t.connectedAdapterName)})),e.on(b.n2.ADAPTER_DATA_UPDATED,(function(e){b.cM.debug("adapter data updated",e),t.emit(b.n2.ADAPTER_DATA_UPDATED,e)}))}},{key:"checkInitRequirements",value:function(){if(this.status===b.MP.CONNECTING)throw b.Ty.notReady("Already pending connection");if(this.status===b.MP.CONNECTED)throw b.Ty.notReady("Already connected");if(this.status===b.MP.READY)throw b.Ty.notReady("Adapter is already initialized")}},{key:"cacheWallet",value:function(e){(0,b.oZ)(this.storage)&&(window[this.storage].setItem(k,e),this.cachedAdapter=e)}}]),w}(v.Ue),C=r(74187),P=Object.values(C.hG).filter((function(e){return e!==C.hG.WEBAUTHN&&e!==C.hG.JWT})),O="INIT_EXTERNAL_WALLETS",I="LOGIN",B="MODAL_VISIBILITY",T="initialized",M="connected",R="connecting",N="errored",j=r(46062),L=r.n(j),U=r(44036),D=r.n(U),F=r(96793),z=r.n(F),Z=r(17892),H=r.n(Z),q=r(11173),W=r.n(q),K=r(42464),V=r.n(K),G=r(68169),$={};$.styleTagTransform=V(),$.setAttributes=H(),$.insert=z().bind(null,"head"),$.domAPI=D(),$.insertStyleElement=W(),L()(G.Z,$),G.Z&&G.Z.locals&&G.Z.locals;var J=r(86522);function Y(e){if(Array.isArray(e))return e}function X(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var te={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},re=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,c.Z)(this,e),this.init(t,r)}return(0,u.Z)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||te,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,ee(ee({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),ne=new re,ie=function(){function e(){(0,c.Z)(this,e),this.observers={}}return(0,u.Z)(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function oe(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function ae(e){return null==e?"":""+e}function se(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function ce(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=n(o.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:n(o.shift())}}function ue(e,t,r){var n=ce(e,t,Object);n.obj[n.k]=r}function le(e,t){var r=ce(e,t),n=r.obj,i=r.k;if(n)return n[i]}function fe(e,t,r){var n=le(e,r);return void 0!==n?n:le(t,r)}function de(e,t,r){for(var n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):de(e[n],t[n],r):e[n]=t[n]);return e}function he(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var pe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function ge(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return pe[e]})):e}var me="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,ye=[" ",",","?","!",";"];function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function we(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),i=e,o=0;o<n.length;++o){if(!i)return;if("string"==typeof i[n[o]]&&o+1<n.length)return;if(void 0===i[n[o]]){for(var a=2,s=n.slice(o,o+a).join(r),c=i[s];void 0===c&&n.length>o+a;)a++,c=i[s=n.slice(o,o+a).join(r)];if(void 0===c)return;if(null===c)return null;if(t.endsWith(s)){if("string"==typeof c)return c;if(s&&"string"==typeof c[s])return c[s]}var u=n.slice(o+a).join(r);return u?we(c,u,r):void 0}i=i[n[o]]}return i}}var Ae=function(e){(0,d.Z)(i,e);var t,r,n=(t=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,p.Z)(t);if(r){var i=(0,p.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,h.Z)(this,e)});function i(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,c.Z)(this,i),t=n.call(this),me&&ie.call((0,l.Z)(t)),t.data=e||{},t.options=r,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return(0,u.Z)(i,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];r&&"string"!=typeof r&&(a=a.concat(r)),r&&"string"==typeof r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."));var s=le(this.data,a);return s||!o||"string"!=typeof r?s:we(this.data&&this.data[e]&&this.data[e][t],r,i)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(a=e.split("."))[1]),this.addNamespaces(t),ue(this.data,a,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=le(this.data,a)||{};n?de(s,r,i):s=ve(ve({},s),r),ue(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?ve(ve({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),i}(ie),_e={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}};function Ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ke={},Se=function(e){(0,d.Z)(i,e);var t,r,n=(t=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,p.Z)(t);if(r){var i=(0,p.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,h.Z)(this,e)});function i(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,c.Z)(this,i),t=n.call(this),me&&ie.call((0,l.Z)(t)),se(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,(0,l.Z)(t)),t.options=r,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=ne.create("translator"),t}return(0,u.Z)(i,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=r&&e.indexOf(r)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,r){t=t||"",r=r||"";var n=ye.filter((function(e){return t.indexOf(e)<0&&r.indexOf(e)<0}));if(0===n.length)return!0;var i=new RegExp("(".concat(n.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(r);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}(e,r,n));if(o&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:i};var c=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),e=c.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,r){var n=this;if("object"!==(0,J.Z)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),c=s.key,u=s.namespaces,l=u[u.length-1],f=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(d){var h=t.nsSeparator||this.options.nsSeparator;return o?(p.res="".concat(l).concat(h).concat(c),p):"".concat(l).concat(h).concat(c)}return o?(p.res=c,p):c}var p=this.resolve(e,t),g=p&&p.res,m=p&&p.usedKey||c,y=p&&p.exactUsedKey||c,b=Object.prototype.toString.apply(g),v=["[object Number]","[object Function]","[object RegExp]"],w=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g;if(A&&g&&_&&v.indexOf(b)<0&&("string"!=typeof w||"[object Array]"!==b)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,g,xe(xe({},t),{},{ns:u})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return o?(p.res=E,p):E}if(a){var x="[object Array]"===b,k=x?[]:{},S=x?y:m;for(var C in g)if(Object.prototype.hasOwnProperty.call(g,C)){var P="".concat(S).concat(a).concat(C);k[C]=this.translate(P,xe(xe({},t),{joinArrays:!1,ns:u})),k[C]===P&&(k[C]=g[C])}g=k}}else if(A&&"string"==typeof w&&"[object Array]"===b)(g=g.join(w))&&(g=this.extendTranslation(g,e,t,r));else{var O=!1,I=!1,B=void 0!==t.count&&"string"!=typeof t.count,T=i.hasDefaultValue(t),M=B?this.pluralResolver.getSuffix(f,t.count,t):"",R=t["defaultValue".concat(M)]||t.defaultValue;!this.isValidLookup(g)&&T&&(O=!0,g=R),this.isValidLookup(g)||(I=!0,g=c);var N=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,j=N&&I?void 0:g,L=T&&R!==g&&this.options.updateMissing;if(I||O||L){if(this.logger.log(L?"updateKey":"missingKey",f,l,c,L?R:g),a){var U=this.resolve(c,xe(xe({},t),{},{keySeparator:!1}));U&&U.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var D=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var z=0;z<F.length;z++)D.push(F[z]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(t.lng||this.language):D.push(t.lng||this.language);var Z=function(e,r,i){var o=T&&i!==g?i:j;n.options.missingKeyHandler?n.options.missingKeyHandler(e,l,r,o,L,t):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(e,l,r,o,L,t),n.emit("missingKey",e,l,r,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&B?D.forEach((function(e){n.pluralResolver.getSuffixes(e,t).forEach((function(r){Z([e],c+r,t["defaultValue".concat(r)]||R)}))})):Z(D,c,R))}g=this.extendTranslation(g,e,t,p,r),I&&g===c&&this.options.appendNamespaceToMissingKey&&(g="".concat(l,":").concat(c)),(I||O)&&this.options.parseMissingKeyHandler&&(g="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(l,":").concat(c):c,O?g:void 0):this.options.parseMissingKeyHandler(g))}return o?(p.res=g,p):g}},{key:"extendTranslation",value:function(e,t,r,n,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,xe(xe({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(xe(xe({},r),{interpolation:xe(xe({},this.options.interpolation),r.interpolation)}));var a,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var c=e.match(this.interpolator.nestingRegexp);a=c&&c.length}var u=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(u=xe(xe({},this.options.interpolation.defaultVariables),u)),e=this.interpolator.interpolate(e,u,r.lng||this.language,r),s){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return i&&i[0]===n[0]&&!r.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):o.translate.apply(o,n.concat([t]))}),r)),r.interpolation&&this.interpolator.reset()}var f=r.postProcess||this.options.postProcess,d="string"==typeof f?[f]:f;return null!=e&&d&&d.length&&!1!==r.applyPostProcessor&&(e=_e.handle(d,e,t,this.options&&this.options.postProcessPassResolved?xe({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,s),u=c.key;r=u;var l=c.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,d=f&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(o=e,!ke["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(ke["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(r){if(!a.isValidLookup(t)){i=r;var o,c=[u];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(c,u,r,e,s);else{var l;f&&(l=a.pluralResolver.getSuffix(r,s.count,s));var p="".concat(a.options.pluralSeparator,"zero");if(f&&(c.push(u+l),d&&c.push(u+p)),h){var g="".concat(u).concat(a.options.contextSeparator).concat(s.context);c.push(g),f&&(c.push(g+l),d&&c.push(g+p))}}for(;o=c.pop();)a.isValidLookup(t)||(n=o,t=a.getResource(r,e,o,s))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),i}(ie);function Ce(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Pe=function(){function e(t){(0,c.Z)(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ne.create("languageUtils")}return(0,u.Z)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=Ce(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=Ce(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=Ce(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach((function(e){if(!t){var n=r.formatLanguageCode(e);r.options.supportedLngs&&!r.isSupportedCode(n)||(t=n)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find((function(e){if(0===e.indexOf(n))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isSupportedCode(e)?i.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),Oe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Ie={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},Be=["v1","v2","v3"],Te={zero:0,one:1,two:2,few:3,many:4,other:5};function Me(){var e={};return Oe.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:Ie[t.fc]}}))})),e}var Re=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,c.Z)(this,e),this.languageUtils=t,this.options=r,this.logger=ne.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Me()}return(0,u.Z)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((function(e,t){return Te[e]-Te[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):n.numbers.map((function(n){return t.getSuffix(e,n,r)})):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return r.options.prepend&&i.toString()?r.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!Be.includes(this.options.compatibilityJSON)}}]),e}();function Ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Le=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,c.Z)(this,e),this.logger=ne.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,u.Z)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:ge,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?he(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?he(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?he(t.nestingPrefix):t.nestingPrefixEscaped||he("$t("),this.nestingSuffix=t.nestingSuffix?he(t.nestingSuffix):t.nestingSuffixEscaped||he(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,a,s=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var i=fe(t,c,e);return s.alwaysFormat?s.format(i,void 0,r,je(je(je({},n),t),{},{interpolationkey:e})):i}var o=e.split(s.formatSeparator),a=o.shift().trim(),u=o.join(s.formatSeparator).trim();return s.format(fe(t,c,a),u,r,je(je(je({},n),t),{},{interpolationkey:a}))};this.resetRegExp();var f=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,d=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach((function(t){for(a=0;i=t.regex.exec(e);){var r=i[1].trim();if(void 0===(o=l(r)))if("function"==typeof f){var c=f(e,i,n);o="string"==typeof c?c:""}else if(n&&n.hasOwnProperty(r))o="";else{if(d){o=i[0];continue}s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),o=""}else"string"==typeof o||s.useRawValueToEscape||(o=ae(o));var u=t.safeValue(o);if(e=e.replace(i[0],u),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var r,n,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=je({},o);function s(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(n[1]);e=n[0];var o=(i=this.interpolate(i,a)).match(/'/g),s=i.match(/"/g);(o&&o.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{a=JSON.parse(i),t&&(a=je(je({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(i)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;r=this.nestingRegexp.exec(e);){var c=[],u=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var l=r[1].split(this.formatSeparator).map((function(e){return e.trim()}));r[1]=l.shift(),c=l,u=!0}if((n=t(s.call(this,r[1].trim(),a),a))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=ae(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),u&&(n=c.reduce((function(e,t){return i.format(e,t,o.lng,je(je({},o),{},{interpolationkey:r[1].trim()}))}),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function Ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function De(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ue(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Fe(e){var t={};return function(r,n,i){var o=n+JSON.stringify(i),a=t[o];return a||(a=e(n,i),t[o]=a),a(r)}}var ze=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,c.Z)(this,e),this.logger=ne.create("formatter"),this.options=t,this.formats={number:Fe((function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}})),currency:Fe((function(e,t){var r=new Intl.NumberFormat(e,De(De({},t),{},{style:"currency"}));return function(e){return r.format(e)}})),datetime:Fe((function(e,t){var r=new Intl.DateTimeFormat(e,De({},t));return function(e){return r.format(e)}})),relativetime:Fe((function(e,t){var r=new Intl.RelativeTimeFormat(e,De({},t));return function(e){return r.format(e,t.range||"day")}})),list:Fe((function(e,t){var r=new Intl.ListFormat(e,De({},t));return function(e){return r.format(e)}}))},this.init(t)}return(0,u.Z)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=Fe(t)}},{key:"format",value:function(e,t,r,n){var a=this;return t.split(this.formatSeparator).reduce((function(e,t){var s=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var a=n[1].substring(0,n[1].length-1);"currency"===t&&a.indexOf(":")<0?r.currency||(r.currency=a.trim()):"relativetime"===t&&a.indexOf(":")<0?r.range||(r.range=a.trim()):a.split(";").forEach((function(e){if(e){var t,n=Y(t=e.split(":"))||i(t)||o(t)||X(),a=n[0],s=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[a.trim()]||(r[a.trim()]=s),"false"===s&&(r[a.trim()]=!1),"true"===s&&(r[a.trim()]=!0),isNaN(s)||(r[a.trim()]=parseInt(s,10))}}))}return{formatName:t,formatOptions:r}}(t),c=s.formatName,u=s.formatOptions;if(a.formats[c]){var l=e;try{var f=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},d=f.locale||f.lng||n.locale||n.lng||r;l=a.formats[c](e,d,De(De(De({},u),n),f))}catch(e){a.logger.warn(e)}return l}return a.logger.warn("there was no format function for ".concat(c)),e}),e)}}]),e}();function Ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function He(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var qe=function(e){(0,d.Z)(i,e);var t,r,n=(t=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,p.Z)(t);if(r){var i=(0,p.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,h.Z)(this,e)});function i(e,t,r){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,c.Z)(this,i),o=n.call(this),me&&ie.call((0,l.Z)(o)),o.backend=e,o.store=t,o.services=r,o.languageUtils=r.languageUtils,o.options=a,o.logger=ne.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=a.maxParallelReads||10,o.readingCalls=0,o.maxRetries=a.maxRetries>=0?a.maxRetries:5,o.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,a.backend,a),o}return(0,u.Z)(i,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o={},a={},s={},c={};return e.forEach((function(e){var n=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?void 0===a[s]&&(a[s]=!0):(i.state[s]=1,n=!1,void 0===a[s]&&(a[s]=!0),void 0===o[s]&&(o[s]=!0),void 0===c[t]&&(c[t]=!0)))})),n||(s[e]=!0)})),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(c)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=n[0],o=n[1];t&&this.emit("failedLoading",i,o,t),r&&this.store.addResourceBundle(i,o,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,s,c,u,l;n=r.loaded,s=o,(u=(c=ce(n,[i],Object)).obj)[l=c.k]=u[l]||[],u[l].push(s),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]={});var t=r.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:i,wait:o,callback:a}):(this.readingCalls++,this.backend[r](e,t,(function(s,c){if(n.readingCalls--,n.waitingReads.length>0){var u=n.waitingReads.shift();n.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}s&&c&&i<n.maxRetries?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,a)}),o):a(s,c)}))):a(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=n[0],o=n[1];this.read(i,o,"read",void 0,void 0,(function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(o," for language ").concat(i," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(o," for language ").concat(i),a),t.loaded(e,n,a)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,He(He({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),i}(ie);function We(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,J.Z)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,J.Z)(e[2])||"object"===(0,J.Z)(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Ke(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $e(){}function Je(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var Ye=function(e){(0,d.Z)(i,e);var t,r,n=(t=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,p.Z)(t);if(r){var i=(0,p.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,h.Z)(this,e)});function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if((0,c.Z)(this,i),e=n.call(this),me&&ie.call((0,l.Z)(e)),e.options=Ke(t),e.services={},e.logger=ne,e.modules={external:[]},Je((0,l.Z)(e)),r&&!e.isInitialized&&!t.isClone){if(!e.options.initImmediate)return e.init(t,r),(0,h.Z)(e,(0,l.Z)(e));setTimeout((function(){e.init(t,r)}),0)}return e}return(0,u.Z)(i,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var n=We();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=Ge(Ge(Ge({},n),this.options),Ke(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=Ge(Ge({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var o;this.modules.logger?ne.init(i(this.modules.logger),this.options):ne.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=ze);var a=new Pe(this.options);this.store=new Ae(this.options.resources,this.options);var s=this.services;s.logger=ne,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new Re(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(s.formatter=i(o),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new Le(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new qe(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(s.languageDetector=i(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=i(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new Se(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,r||(r=$e),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var u=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];u.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var l=["addResource","addResources","addResourceBundle","removeResourceBundle"];l.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}}));var f=oe(),d=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),f.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),f}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$e,n=r,i="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return n();var o=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)a(i);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)}))}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=oe();return e||(e=this.languages),t||(t=this.options.ns),r||(r=$e),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&_e.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=oe();this.emit("languageChanging",e);var i=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},o=function(o){e||o||!r.services.languageDetector||(o=[]);var a="string"==typeof o?o:r.services.languageUtils.getBestMatchFromCodes(o);a&&(r.language||i(a),r.translator.language||r.translator.changeLanguage(a),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(a)),r.loadResources(a,(function(e){!function(e,o){o?(i(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,i=function e(t,i){var o;if("object"!==(0,J.Z)(i)){for(var a=arguments.length,s=new Array(a>2?a-2:0),c=2;c<a;c++)s[c-2]=arguments[c];o=n.options.overloadTranslationOptionHandler([t,i].concat(s))}else o=Ge({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,o.keyPrefix=o.keyPrefix||r||e.keyPrefix;var u=n.options.keySeparator||".",l=o.keyPrefix?"".concat(o.keyPrefix).concat(u).concat(t):t;return n.t(l,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!a(n,e)||i&&!a(o,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=oe();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=oe();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$e,n=Ge(Ge(Ge({},this.options),t),{isClone:!0}),o=new i(n);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));var a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.services=Ge({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new Se(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(n,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),i}(ie);(0,g.Z)(Ye,"createInstance",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Ye(e,t)}));var Xe=Ye.createInstance();Xe.createInstance=Ye.createInstance,Xe.createInstance,Xe.init,Xe.loadResources,Xe.reloadResources,Xe.use,Xe.changeLanguage,Xe.getFixedT,Xe.t,Xe.exists,Xe.setDefaultNamespace,Xe.hasLoadedNamespace,Xe.loadNamespaces,Xe.loadLanguages;const Qe=Xe;var et=r(67733),tt=r(2784),rt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,nt={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},it=function(e){return nt[e]};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st,ct={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(rt,it)}},ut=(0,tt.createContext)();function lt(){return ct}var ft=function(){function e(){(0,c.Z)(this,e),this.usedNamespaces={}}return(0,u.Z)(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function dt(){return st}var ht={type:"3rdParty",init:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ct=at(at({},ct),e)}(e.options.react),function(e){st=e}(e)}};function pt(e,t){return Y(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}(e,t)||o(e,t)||X()}var gt=r(9907),mt=r.n(gt),yt=r(51344),bt=r.n(yt),vt=r(50320);function wt(){if(console&&console.warn){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];"string"==typeof r[0]&&(r[0]="react-i18next:: ".concat(r[0])),(e=console).warn.apply(e,r)}}var At={};function _t(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];"string"==typeof t[0]&&At[t[0]]||("string"==typeof t[0]&&(At[t[0]]=new Date),wt.apply(void 0,t))}function Et(e,t,r){e.loadNamespaces(t,(function(){e.isInitialized?r():e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),r()}))}))}function xt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===n||2===n};return!(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)||!t.hasResourceBundle(n,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!a(n,e)||i&&!a(o,e)))}function kt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return _t("i18n.languages were undefined or empty",t.languages),!0;var n=void 0!==t.options.ignoreJSONStructure;return n?t.hasLoadedNamespace(e,{precheck:function(t,n){if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!n(t.isLanguageChangingTo,e))return!1}}):xt(e,t,r)}function St(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?St(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):St(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Pt=function(e,t){var r=(0,tt.useRef)();return(0,tt.useEffect)((function(){r.current=t?r.current:e}),[e,t]),r.current};function Ot(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.i18n,n=(0,tt.useContext)(ut)||{},i=n.i18n,o=n.defaultNS,a=r||i||dt();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new ft),!a){_t("You will need to pass in an i18next instance by using initReactI18next");var s=function(e){return Array.isArray(e)?e[e.length-1]:e},c=[s,{},!1];return c.t=s,c.i18n={},c.ready=!1,c}a.options.react&&void 0!==a.options.react.wait&&_t("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=Ct(Ct(Ct({},lt()),a.options.react),t),l=u.useSuspense,f=u.keyPrefix,d=e||o||a.options&&a.options.defaultNS;d="string"==typeof d?[d]:d||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(d);var h=(a.isInitialized||a.initializedStoreOnce)&&d.every((function(e){return kt(e,a,u)}));function p(){return a.getFixedT(null,"fallback"===u.nsMode?d:d[0],f)}var g=(0,tt.useState)(p),m=pt(g,2),y=m[0],b=m[1],v=d.join(),w=Pt(v),A=(0,tt.useRef)(!0);(0,tt.useEffect)((function(){var e=u.bindI18n,t=u.bindI18nStore;function r(){A.current&&b(p)}return A.current=!0,h||l||Et(a,d,(function(){A.current&&b(p)})),h&&w&&w!==v&&A.current&&b(p),e&&a&&a.on(e,r),t&&a&&a.store.on(t,r),function(){A.current=!1,e&&a&&e.split(" ").forEach((function(e){return a.off(e,r)})),t&&a&&t.split(" ").forEach((function(e){return a.store.off(e,r)}))}}),[a,v]);var _=(0,tt.useRef)(!0);(0,tt.useEffect)((function(){A.current&&!_.current&&b(p),_.current=!1}),[a,f]);var E=[y,a,h];if(E.t=y,E.i18n=a,E.ready=h,h)return E;if(!h&&!l)return E;throw new Promise((function(e){Et(a,d,(function(){e()}))}))}var It=(0,vt.createContext)({isDark:!0}),Bt=r(21272),Tt={"arrow-left":{image:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IjI0IC8gYXJyb3dzIC8gY2lyY2xlLWFycm93LWxlZnQiPgo8cGF0aCBpZD0iaWNvbiIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMiAyM0M1LjkyNDg3IDIzIDEgMTguMDc1MSAxIDEyQzEgNS45MjQ4NyA1LjkyNDg3IDEgMTIgMUMxOC4wNzUxIDEgMjMgNS45MjQ4NyAyMyAxMkMyMyAxOC4wNzUxIDE4LjA3NTEgMjMgMTIgMjNaTTEyIDIxQzE2Ljk3MDYgMjEgMjEgMTYuOTcwNiAyMSAxMkMyMSA3LjAyOTQ0IDE2Ljk3MDYgMyAxMiAzQzcuMDI5NDQgMyAzIDcuMDI5NDQgMyAxMkMzIDE2Ljk3MDYgNy4wMjk0NCAyMSAxMiAyMVpNMTcgMTFIMTAuNDE0MkwxMi43MDcxIDguNzA3MTFMMTEuMjkyOSA3LjI5Mjg5TDYuNTg1NzkgMTJMMTEuMjkyOSAxNi43MDcxTDEyLjcwNzEgMTUuMjkyOUwxMC40MTQyIDEzSDE3VjExWiIgZmlsbD0iI0QzRDNENCIvPgo8L2c+Cjwvc3ZnPgo="},close:{image:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMy40MTQyIDEyTDE5Ljc3ODIgMTguMzY0TDE4LjM2NCAxOS43NzgyTDEyIDEzLjQxNDNMNS42MzYwNCAxOS43NzgyTDQuMjIxODMgMTguMzY0TDEwLjU4NTggMTJMNC4yMjE4MyA1LjYzNjA4TDUuNjM2MDQgNC4yMjE4N0wxMiAxMC41ODU4TDE4LjM2NCA0LjIyMTg3TDE5Ljc3ODIgNS42MzYwOEwxMy40MTQyIDEyWiIgZmlsbD0iI0RGREZERiIvPgo8L3N2Zz4K"},"expand-light":{image:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjA5OTEgMTUuNjc4NUMxMS42OTQgMTYuMTA3MiAxMS4wMTE5IDE2LjEwNzIgMTAuNjA2OCAxNS42Nzg1TDQuOTg4MjggOS43MzEzNkM0LjM2OTg4IDkuMDc2OCA0LjgzMzkzIDggNS43MzQ0MSA4TDE2Ljk3MTUgOEMxNy44NzIgOCAxOC4zMzYgOS4wNzY4IDE3LjcxNzYgOS43MzEzNkwxMi4wOTkxIDE1LjY3ODVaIiBmaWxsPSIjRkZGRkZGIi8+Cjwvc3ZnPgo="},expand:{image:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjA5OTEgMTUuNjc4NUMxMS42OTQgMTYuMTA3MiAxMS4wMTE5IDE2LjEwNzIgMTAuNjA2OCAxNS42Nzg1TDQuOTg4MjggOS43MzEzNkM0LjM2OTg4IDkuMDc2OCA0LjgzMzkzIDggNS43MzQ0MSA4TDE2Ljk3MTUgOEMxNy44NzIgOCAxOC4zMzYgOS4wNzY4IDE3LjcxNzYgOS43MzEzNkwxMi4wOTkxIDE1LjY3ODVaIiBmaWxsPSIjQjdCOEJEIi8+Cjwvc3ZnPgo="}};function Mt(e){var t=e.iconName,r=e.height,n=void 0===r?"auto":r,i=e.width,o=void 0===i?"auto":i;return Tt[t]?(0,Bt.jsx)("img",{height:n,width:o,src:Tt[t].image,alt:t}):null}function Rt(e){var t=e.imageId,r=e.height,n=void 0===r?"auto":r,i=e.width,o=void 0===i?"auto":i;return(0,Bt.jsx)("img",{src:"https://images.web3auth.io/".concat(t,".svg"),height:n,width:o,alt:t})}var Nt=(0,Bt.jsx)(Mt,{iconName:"close"});function jt(e){var t=e.adapter,r=e.appLogo,n=void 0===r?"https://images.web3auth.io/web3auth-logo.svg":r,i=e.message,o=e.modalStatus,a=e.onClose,s=(0,Bt.jsx)(Rt,{imageId:"web3auth"}),c=(0,Bt.jsx)(Rt,{imageId:"login-".concat(t)}),u=Ot().t;return(0,vt.useEffect)((function(){b.cM.debug("adapter loader re-rendering"),o===M&&setTimeout((function(){a()}),3e3)}),[o,a]),o!==T?(0,Bt.jsxs)("div",{className:"w3ajs-modal-loader w3a-modal__loader",children:[(0,Bt.jsxs)("div",{className:"w3a-modal__loader-content",children:[(0,Bt.jsxs)("div",{className:"w3a-modal__loader-info",children:[o===R&&(0,Bt.jsxs)(Bt.Fragment,{children:[(0,Bt.jsxs)("div",{className:"w3a-modal__loader-bridge",children:[(0,Bt.jsx)("div",{className:"w3a-modal__loader-app-logo",children:(0,Bt.jsx)("img",{src:n,alt:""})}),(0,Bt.jsx)("div",{className:"w3a-modal__connector",children:(0,Bt.jsxs)("div",{className:"w3a-modal__connector-beat",children:[(0,Bt.jsx)("div",{}),(0,Bt.jsx)("div",{}),(0,Bt.jsx)("div",{}),(0,Bt.jsx)("div",{}),(0,Bt.jsx)("div",{})]})}),(0,Bt.jsx)("div",{className:"w3a-modal__loader-adapter",children:c})]}),(0,Bt.jsx)("div",{children:(0,Bt.jsx)("div",{className:"w3a-modal__loader-bridge-message",children:u("modal.adapter-loader.message",{adapter:t})})})]}),o===b.MP.CONNECTED&&(0,Bt.jsx)("div",{className:"w3ajs-modal-loader__message w3a-spinner-message",children:i}),o===b.MP.ERRORED&&(0,Bt.jsx)("div",{className:"w3ajs-modal-loader__message w3a-spinner-message w3a-spinner-message--error",children:i})]}),(0,Bt.jsxs)("div",{className:"w3a-spinner-power",children:[(0,Bt.jsx)("div",{children:u("modal.footer.message")}),s]})]}),(o===b.MP.CONNECTED||o===b.MP.ERRORED)&&(0,Bt.jsx)("button",{type:"button",className:"w3a-header__button w3ajs-loader-close-btn",onClick:a,children:Nt})]}):null}var Lt=r(77160),Ut=r.n(Lt),Dt=(0,Bt.jsx)(Mt,{iconName:"close"});function Ft(e){var t=e.message,r=e.modalStatus,n=e.label,i=e.onClose,o=e.canEmit,a=void 0===o||o,s=(0,Bt.jsx)(Rt,{imageId:"web3auth"}),c=Ot().t;return(0,vt.useEffect)((function(){b.cM.debug("loader re-rendering"),r===M&&a&&setTimeout((function(){i()}),3e3)}),[a,r,i]),r!==T?(0,Bt.jsxs)("div",{className:"w3ajs-modal-loader w3a-modal__loader",children:[(0,Bt.jsxs)("div",{className:"w3a-modal__loader-content",children:[(0,Bt.jsxs)("div",{className:"w3a-modal__loader-info",children:[r===R&&(0,Bt.jsxs)("div",{className:"w3ajs-modal-loader__spinner w3a-spinner",children:[(0,Bt.jsx)("div",{className:"w3a-spinner__head"}),(0,Bt.jsx)("div",{className:"w3a-spinner__mask"})]}),(0,Bt.jsx)("div",{className:"w3ajs-modal-loader__label w3a-spinner-label",children:n}),r===b.MP.CONNECTED&&(0,Bt.jsx)("div",{className:"w3ajs-modal-loader__message w3a-spinner-message",children:t}),r===b.MP.ERRORED&&(0,Bt.jsx)("div",{className:"w3ajs-modal-loader__message w3a-spinner-message w3a-spinner-message--error",children:t})]}),(0,Bt.jsxs)("div",{className:"w3a-spinner-power",children:[(0,Bt.jsx)("div",{children:c("modal.footer.message")}),s]})]}),(r===b.MP.CONNECTED||r===b.MP.ERRORED)&&(0,Bt.jsx)("button",{type:"button",className:"w3a-header__button w3ajs-loader-close-btn",onClick:i,children:Dt})]}):null}var zt=r(5341),Zt=(0,Bt.jsx)(Rt,{imageId:"wallet-connect",width:"114px"});function Ht(e){var t=encodeURIComponent(e.uri);return e.universalLink?"".concat(e.universalLink,"/wc?uri=").concat(t):e.deepLink?"".concat(e.deepLink).concat(e.deepLink.endsWith(":")?"//":"/","wc?uri=").concat(t):""}function qt(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"mobile",i=e[n].universal||"",o=e[n].native||"";return{name:e.name||"",logo:e.logo||"",universalLink:i,deepLink:o,href:r===Ut().OS_MAP.iOS?Ht({uri:t,universalLink:i,deepLink:o}):t}}function Wt(e){var t=e.walletConnectUri,r=e.wcAdapters,n=pt((0,vt.useState)([]),2),i=n[0],o=n[1],a=Ot().t,s=(0,vt.useMemo)((function(){var e=Ut().getParser(window.navigator.userAgent);return{platform:e.getPlatformType(),os:e.getOSName()}}),[]);return(0,vt.useEffect)((function(){if(s.platform===Ut().PLATFORMS_MAP.mobile){var e=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"mobile";return Object.values(e).filter((function(e){return!!e[n].universal||!!e[n].native})).map((function(e){return qt(e,t,r,n)}))}(r,t,s.os,s.platform);o(e)}}),[r,s.os,s.platform,t]),(0,Bt.jsx)("div",{className:"w3ajs-wallet-connect w3a-wallet-connect",children:(0,Bt.jsxs)("div",{className:"w3ajs-wallet-connect__container w3a-wallet-connect__container".concat(s.os===Ut().OS_MAP.Android?" w3a-wallet-connect__container--android":""),children:[(0,Bt.jsx)("div",{className:"w3a-wallet-connect__logo",children:Zt}),s.platform===Ut().PLATFORMS_MAP.desktop?(0,Bt.jsxs)("div",{className:"w3a-wallet-connect__container-desktop",children:[(0,Bt.jsx)("div",{children:a("modal.external.walletconnect-subtitle")}),(0,Bt.jsx)("div",{className:"w3ajs-wallet-connect-qr w3a-wallet-connect-qr",children:(0,Bt.jsx)(zt.Z,{size:200,value:t})})]}):(0,Bt.jsx)("div",{className:"w3a-wallet-connect__container-btn-group",children:i.map((function(e){return s.os===Ut().OS_MAP.iOS?(0,Bt.jsx)("div",{className:"w3a-wallet-connect__container-ios",children:(0,Bt.jsxs)("a",{href:e.href,rel:"noopener noreferrer",target:"_blank",children:[(0,Bt.jsx)("button",{type:"button",className:"w3a-button w3a-button--icon",children:(0,Bt.jsx)("img",{src:e.logo,height:"auto",width:"auto",alt:"login-".concat(e.name)})}),(0,Bt.jsx)("p",{className:"w3a-adapter-item__label",children:e.name})]},e.name)}):(0,Bt.jsx)("div",{className:"w3a-wallet-connect__container-android",children:(0,Bt.jsx)("a",{href:e.href,rel:"noopener noreferrer",target:"_blank",children:(0,Bt.jsx)("button",{type:"button",className:"w3a-button",children:a("modal.external.walletconnect-connect")})},e.name)})}))})]})})}const Kt=(0,vt.memo)(Wt);function Vt(e){var t=e.hideExternalWallets,r=e.handleExternalWalletClick,n=e.config,i=void 0===n?{}:n,o=e.walletConnectUri,a=e.showBackButton,s=e.modalStatus,c=e.wcAdapters,u=pt((0,vt.useState)(!1),2),l=u[0],f=u[1],d=pt((0,vt.useState)({}),2),h=d[0],p=d[1],g=(0,vt.useMemo)((function(){return Ut().getParser(window.navigator.userAgent).getPlatformType()}),[]),m=Ot().t;return(0,vt.useEffect)((function(){var e;b.cM.debug("loaded external wallets",i,o),!1===((null===(e=i[b.rW.WALLET_CONNECT_V1])||void 0===e?void 0:e.showOnModal)||!1)||o?Object.keys(i).length>0&&f(!0):r({adapter:b.rW.WALLET_CONNECT_V1});var t={};Object.keys(i).forEach((function(e){var r=i[e];r.showOnModal?"desktop"===g&&r.showOnDesktop?t[e]=!0:"mobile"!==g&&"tablet"!==g||!r.showOnMobile?t[e]=!1:t[e]=!0:t[e]=!1})),p(t)}),[i,r,o,g]),(0,Bt.jsx)("div",{className:"w3ajs-external-wallet w3a-group",children:(0,Bt.jsxs)("div",{className:"w3a-external-container w3ajs-external-container",children:[a&&(0,Bt.jsxs)("button",{type:"button",className:"w3a-external-back w3ajs-external-back",onClick:t,children:[(0,Bt.jsx)(Mt,{iconName:"arrow-left"}),(0,Bt.jsx)("div",{className:"w3a-group__title",children:m("modal.external.back")})]}),!l&&(0,Bt.jsx)(Ft,{modalStatus:R,canEmit:!1}),Object.keys(i).map((function(e){return e===b.rW.WALLET_CONNECT_V1||e===b.rW.WALLET_CONNECT_V2?(0,Bt.jsx)(Kt,{walletConnectUri:o,wcAdapters:c},e):null})),s===T&&(0,Bt.jsx)("ul",{className:"w3a-adapter-list w3ajs-wallet-adapters",children:Object.keys(i).map((function(e){var t;if(e===b.rW.WALLET_CONNECT_V1||e===b.rW.WALLET_CONNECT_V2)return null;var n=(0,Bt.jsx)(Rt,{imageId:"login-".concat(e)});return h[e]&&(0,Bt.jsxs)("li",{className:"w3a-adapter-item",children:[(0,Bt.jsx)("button",{type:"button",onClick:function(){return r({adapter:e})},className:"w3a-button w3a-button--icon",children:n}),(0,Bt.jsx)("p",{className:"w3a-adapter-item__label",children:(null===(t=i[e])||void 0===t?void 0:t.label)||e})]},e)}))})]})})}function Gt(e){var t=e.version,r=Ot().t,n=(0,Bt.jsx)(Rt,{imageId:"web3auth",height:"14px",width:"auto"});return(0,Bt.jsx)("div",{className:"w3a-modal__footer",children:(0,Bt.jsxs)("div",{className:"w3a-footer",children:[(0,Bt.jsxs)("div",{children:[(0,Bt.jsxs)("div",{className:"w3a-footer__links",children:[(0,Bt.jsx)("a",{href:"https://docs.web3auth.io/legal/terms-and-conditions",children:r("modal.footer.terms")}),(0,Bt.jsx)("span",{children:"|"}),(0,Bt.jsx)("a",{href:"https://docs.web3auth.io/legal/privacy-policy",children:r("modal.footer.policy")})]}),(0,Bt.jsx)("p",{children:t})]}),(0,Bt.jsxs)("div",{className:"w3a-footer__secured",children:[(0,Bt.jsx)("div",{children:r("modal.footer.message")}),n]})]})})}const $t=(0,vt.memo)(Gt);function Jt(e){var t=(0,vt.useContext)(It).isDark,r=e.appLogo,n=void 0===r?"https://images.web3auth.io/web3auth-logo.svg":r,i=e.onClose,o=Ot().t,a=(0,Bt.jsx)(Rt,{imageId:"web3auth".concat(t?"-light":"")});return(0,Bt.jsxs)("div",{className:"w3a-modal__header",children:[(0,Bt.jsxs)("div",{className:"w3a-header",children:[n?(0,Bt.jsx)("img",{className:"w3a-header__logo",src:n,alt:""}):a,(0,Bt.jsxs)("div",{children:[(0,Bt.jsx)("div",{className:"w3a-header__title",children:o("modal.header-title")}),(0,Bt.jsx)("p",{className:"w3a-header__subtitle",children:o("modal.header-subtitle")})]})]}),(0,Bt.jsx)("button",{type:"button",onClick:i,className:"w3a-header__button w3ajs-close-btn",children:(0,Bt.jsx)(Mt,{iconName:"close"})})]})}var Yt=(0,vt.memo)(Jt,(function(e,t){return e.appLogo!==t.appLogo}));Yt.displayName="Header";const Xt=Yt;function Qt(e){var t=e.handleSocialLoginClick,r=e.adapter,n=pt((0,vt.useState)(!1),2),i=n[0],o=n[1],a=Ot().t;return(0,Bt.jsxs)("div",{className:"w3ajs-email-passwordless w3a-group w3a-group--email",children:[(0,Bt.jsx)("div",{className:"w3a-group__title",children:a("modal.social.email")}),(0,Bt.jsxs)("form",{className:"w3ajs-email-passwordless-form",onSubmit:function(e){return function(e){e.preventDefault();var n=e.target[0].value;n&&t({adapter:r,loginParams:{loginProvider:"email_passwordless",login_hint:n}})}(e)},children:[(0,Bt.jsx)("input",{className:"w3a-text-field",type:"email",name:"email",required:!0,placeholder:a("modal.social.email"),onChange:function(e){return function(e){var t=e.target.value.match(/^([\w.%+-]+)@([\w-]+\.)+([\w]{2,})$/i);o(!!t)}(e)}}),(0,Bt.jsx)("button",{disabled:!i,className:"w3a-button",type:"submit",children:a("modal.social.email-continue")})]})]})}var er=r(72779),tr=r.n(er),rr=["apple","github"];function nr(e){var t=pt((0,vt.useState)(!1),2),r=t[0],n=t[1],i=e.socialLoginsConfig,o=void 0===i?{loginMethods:{},loginMethodsOrder:[],adapter:""}:i,a=e.handleSocialLoginClick,s=(0,vt.useContext)(It).isDark,c=Ot().t,u=pt((0,vt.useState)(!1),2),l=u[0],f=u[1];(0,vt.useEffect)((function(){var e=Object.keys(o.loginMethods).filter((function(e){return o.loginMethods[e].showOnModal}));n(e.length>5)}),[o.loginMethods]);var d=tr()("w3a-adapter-list","w3ajs-socials-adapters",l?"":" w3a-adapter-list--shrink"),h=tr()("w3a-button-expand","w3ajs-button-expand",l?"w3a-button--rotate":""),p=c(l?"modal.social.view-less":"modal.social.view-more");return(0,Bt.jsxs)("div",{className:"w3ajs-social-logins w3a-group",children:[(0,Bt.jsx)("div",{className:"w3a-group__title",children:c("modal.social.continue")}),(0,Bt.jsx)("ul",{className:d,children:Object.keys(o.loginMethods).map((function(e){var t=(0,Bt.jsx)(Rt,{imageId:"login-".concat(e).concat(s&&rr.includes(e)?"-light":"")});if(!1===o.loginMethods[e].showOnModal||"webauthn"===e||"jwt"===e||"email_passwordless"===e)return null;var r=o.loginMethodsOrder.indexOf(e)+1||Object.keys(o.loginMethods).length+1;return(0,Bt.jsx)("li",{className:"w3a-adapter-item",style:{order:r},children:(0,Bt.jsx)("button",{type:"button",onClick:function(){return a({adapter:o.adapter,loginParams:{loginProvider:e}})},className:"w3a-button w3a-button--icon",children:t})},e)}))}),r&&(0,Bt.jsxs)("button",{type:"button",className:h,style:{display:"flex"},onClick:function(){f(!l)},children:[(0,Bt.jsx)(Mt,{iconName:"expand".concat(s?"-light":"")}),(0,Bt.jsx)("span",{className:"w3ajs-button-expand-text",children:p})]})]})}function ir(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function or(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ir(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ir(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ar(e){var t,r,n,i=(0,vt.useContext)(It).isDark,o=pt((0,vt.useState)(["w3a-modal__inner"]),2),a=o[0],s=o[1],c=pt((0,vt.useState)({externalWalletsVisibility:!1,status:T,hasExternalWallets:!1,externalWalletsInitialized:!1,modalVisibility:!1,modalVisibilityDelayed:!1,postLoadingMessage:"",walletConnectUri:"",socialLoginsConfig:{loginMethods:{},loginMethodsOrder:[],adapter:""},externalWalletsConfig:{},detailedLoaderAdapter:"",showExternalWalletsOnly:!1,wcAdapters:[]}),2),u=c[0],l=c[1],f=e.stateListener,d=e.appLogo,h=e.version,p=e.handleSocialLoginClick,g=e.handleExternalWalletClick,m=e.handleShowExternalWallets,y=e.closeModal,v=[b.rW.PHANTOM,b.rW.METAMASK],w=Ot().t;(0,vt.useEffect)((function(){f.emit("MOUNTED"),f.on("STATE_UPDATED",(function(e){b.cM.debug("state updated",e),l((function(t){return mt()(bt()(t,e))}))}))}),[f]),(0,vt.useEffect)((function(){var e;return u.modalVisibility?(l((function(e){return or(or({},e),{},{modalVisibilityDelayed:u.modalVisibility})})),e=window.setTimeout((function(){s(["w3a-modal__inner",u.modalVisibility?"w3a-modal__inner--active":""])}),100)):(s(["w3a-modal__inner",u.modalVisibility?"w3a-modal__inner--active":""]),e=window.setTimeout((function(){l((function(e){return or(or({},e),{},{modalVisibilityDelayed:u.modalVisibility})}))}),250)),function(){clearTimeout(e)}}),[u.modalVisibility]);var A=(0,vt.useCallback)((function(){u.status===M&&y(),u.status===N&&l((function(e){return or(or({},e),{},{modalVisibility:!0,status:T})}))}),[y,u.status]),_=function(e){l((function(e){return or(or({},e),{},{detailedLoaderAdapter:""})})),p(e)},E=(0,Bt.jsx)("div",{className:"w3ajs-external-wallet w3a-group",children:(0,Bt.jsxs)("div",{className:"w3a-external-toggle w3ajs-external-toggle",children:[(0,Bt.jsx)("div",{className:"w3a-group__title",children:w("modal.external.title")}),(0,Bt.jsx)("button",{type:"button",className:"w3a-button w3ajs-external-toggle__button",onClick:function(){m(u.externalWalletsInitialized),l((function(e){return or(or({},e),{},{externalWalletsVisibility:!0})}))},children:w("modal.external.connect")})]})}),x=(0,vt.useMemo)((function(){var e,t;return!u.showExternalWalletsOnly&&0!==Object.keys((null===(e=u.socialLoginsConfig)||void 0===e?void 0:e.loginMethods)||{}).length&&!!Object.entries((null===(t=u.socialLoginsConfig)||void 0===t?void 0:t.loginMethods)||{}).some((function(e){var t=pt(e,2),r=t[0],n=t[1];return r!==C.hG.EMAIL_PASSWORDLESS&&!1!==n.showOnModal}))}),[u.showExternalWalletsOnly,null===(t=u.socialLoginsConfig)||void 0===t?void 0:t.loginMethods]);b.cM.info("modal state",u,x);var k=(0,vt.useMemo)((function(){var e,t;return null===(e=u.socialLoginsConfig)||void 0===e||null===(t=e.loginMethods[C.hG.EMAIL_PASSWORDLESS])||void 0===t?void 0:t.showOnModal}),[null===(r=u.socialLoginsConfig)||void 0===r?void 0:r.loginMethods]),S="w3a-modal ".concat(i?"":" w3a-modal--light");return u.modalVisibilityDelayed&&(0,Bt.jsx)("div",{id:"w3a-modal",className:S,style:{display:"flex"},children:(0,Bt.jsxs)("div",{className:a.join(" "),children:[(0,Bt.jsx)(Xt,{onClose:y,appLogo:d}),u.status!==T?(0,Bt.jsx)("div",{className:"w3a-modal__content w3ajs-content",children:u.detailedLoaderAdapter?(0,Bt.jsx)(jt,{onClose:A,appLogo:d,modalStatus:u.status,message:u.postLoadingMessage,adapter:u.detailedLoaderAdapter}):(0,Bt.jsx)(Ft,{onClose:A,modalStatus:u.status,message:u.postLoadingMessage})}):(0,Bt.jsx)("div",{className:"w3a-modal__content w3ajs-content",children:!x&&!k||u.externalWalletsVisibility?(0,Bt.jsx)(Vt,{modalStatus:u.status,showBackButton:x,handleExternalWalletClick:function(e){return function(e){var t=e.adapter;v.includes(t)?l((function(e){return or(or({},e),{},{detailedLoaderAdapter:t})})):t!==b.rW.WALLET_CONNECT_V1&&l((function(e){return or(or({},e),{},{detailedLoaderAdapter:""})})),g(e)}(e)},walletConnectUri:u.walletConnectUri,wcAdapters:u.wcAdapters,config:u.externalWalletsConfig,hideExternalWallets:function(){return l((function(e){return or(or({},e),{},{externalWalletsVisibility:!1})}))}}):(0,Bt.jsxs)(Bt.Fragment,{children:[x?(0,Bt.jsx)(nr,{handleSocialLoginClick:function(e){return _(e)},socialLoginsConfig:u.socialLoginsConfig}):null,k&&(0,Bt.jsx)(Qt,{adapter:null===(n=u.socialLoginsConfig)||void 0===n?void 0:n.adapter,handleSocialLoginClick:function(e){return _(e)}}),u.hasExternalWallets&&E]})}),(0,Bt.jsx)($t,{version:h})]})})}b.cM.enableAll();var sr=r(14179);function cr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ur(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cr(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}r(15171),r(15846),r(28842),r(71351),r(34856);var lr=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};if(e!==b.rW.OPENLOGIN)throw new Error("".concat(e," is not a valid adapter"));return P.forEach((function(e){var t=r[e]||{name:e,showOnMobile:!0,showOnModal:!0,showOnDesktop:!0};n[e]=ur({},t)})),b.cM.debug("OpenLogin login method ui config",n),n},fr={en:"english",de:"german",ja:"japanese",ko:"korean",zh:"mandarin",es:"spanish"};Qe.use(ht).init({resources:{en:{translation:sr}},lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});var dr=function(e){(0,d.Z)(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,p.Z)(t);if(n){var i=(0,p.Z)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,h.Z)(this,e)});function o(e){var t,n=e.appLogo,a=e.version,u=e.adapterListener,f=e.theme,d=void 0===f?"light":f,h=e.displayErrorsOnModal,p=void 0===h||h,m=e.defaultLanguage;return(0,c.Z)(this,o),t=i.call(this),(0,g.Z)((0,l.Z)(t),"appLogo",void 0),(0,g.Z)((0,l.Z)(t),"version",void 0),(0,g.Z)((0,l.Z)(t),"isDark",void 0),(0,g.Z)((0,l.Z)(t),"stateEmitter",void 0),(0,g.Z)((0,l.Z)(t),"displayErrorsOnModal",!0),(0,g.Z)((0,l.Z)(t),"defaultLanguage",void 0),(0,g.Z)((0,l.Z)(t),"initModal",(0,s.Z)(y().mark((function e(){var n,i;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={isDark:t.isDark},"en"!==(i=t.defaultLanguage||"en")&&r(71408)("./".concat(fr[i],".json")).then((function(e){return Qe.addResourceBundle(i,"translation",e.default),Qe.changeLanguage(i)})).catch((function(e){b.cM.error(e)})),e.abrupt("return",new Promise((function(e){t.stateEmitter.once("MOUNTED",(function(){return b.cM.info("rendered"),t.setState({status:T}),e()}));var r,i=((r=document.createElement("section")).setAttribute("id","w3a-container"),document.body.appendChild(r),r);(0,et.s)(i).render((0,Bt.jsx)(It.Provider,{value:n,children:(0,Bt.jsx)(ar,{closeModal:t.closeModal,stateListener:t.stateEmitter,handleShowExternalWallets:function(e){return t.handleShowExternalWallets(e)},handleExternalWalletClick:function(e){return t.handleExternalWalletClick(e)},handleSocialLoginClick:function(e){return t.handleSocialLoginClick(e)},appLogo:t.appLogo,version:t.version})}))})));case 4:case"end":return e.stop()}}),e)})))),(0,g.Z)((0,l.Z)(t),"addSocialLogins",(function(e,r,n){t.setState({socialLoginsConfig:{adapter:e,loginMethods:r,loginMethodsOrder:n}}),b.cM.info("addSocialLogins",e,r,n)})),(0,g.Z)((0,l.Z)(t),"addWalletLogins",(function(e,r){t.setState({externalWalletsConfig:e,externalWalletsInitialized:!0,showExternalWalletsOnly:!(null==r||!r.showExternalWalletsOnly),externalWalletsVisibility:!0})})),(0,g.Z)((0,l.Z)(t),"open",(function(){t.setState({modalVisibility:!0}),t.emit(B,!0)})),(0,g.Z)((0,l.Z)(t),"closeModal",(function(){t.setState({modalVisibility:!1,externalWalletsVisibility:!1}),t.emit(B,!1)})),(0,g.Z)((0,l.Z)(t),"initExternalWalletContainer",(function(){t.setState({hasExternalWallets:!0})})),(0,g.Z)((0,l.Z)(t),"handleShowExternalWallets",(function(e){t.emit(O,{externalWalletsInitialized:e})})),(0,g.Z)((0,l.Z)(t),"handleExternalWalletClick",(function(e){b.cM.info("external wallet clicked",e);var r=e.adapter;t.emit(I,{adapter:r})})),(0,g.Z)((0,l.Z)(t),"handleSocialLoginClick",(function(e){b.cM.info("social login clicked",e);var r=e.adapter,n=e.loginParams;t.emit(I,{adapter:r,loginParams:{loginProvider:n.loginProvider,login_hint:n.login_hint}})})),(0,g.Z)((0,l.Z)(t),"setState",(function(e){t.stateEmitter.emit("STATE_UPDATED",e)})),(0,g.Z)((0,l.Z)(t),"updateWalletConnect",(function(e,r){e&&t.setState({walletConnectUri:e,wcAdapters:r})})),(0,g.Z)((0,l.Z)(t),"handleAdapterData",(function(e){if(e.adapterName===b.rW.WALLET_CONNECT_V1){var r=e.data;t.updateWalletConnect(r.uri,r.extensionAdapters)}})),(0,g.Z)((0,l.Z)(t),"subscribeCoreEvents",(function(e){e.on(b.n2.CONNECTING,(function(e){b.cM.info("connecting with adapter",e),(null==e?void 0:e.adapter)!==b.rW.WALLET_CONNECT_V1&&(null==e?void 0:e.adapter)!==b.rW.WALLET_CONNECT_V2&&t.setState({status:R})})),e.on(b.n2.CONNECTED,(function(e){b.cM.debug("connected with adapter",e),e.reconnected?t.setState({status:M}):t.setState({status:M,modalVisibility:!0,postLoadingMessage:"You are connected with your account"})})),e.on(b.n2.ERRORED,(function(e){b.cM.error("error",e,e.message),5e3===e.code?t.displayErrorsOnModal?t.setState({modalVisibility:!0,postLoadingMessage:e.message||"Something went wrong!",status:N}):t.setState({modalVisibility:!1}):t.setState({modalVisibility:!0,status:T})})),e.on(b.n2.DISCONNECTED,(function(){t.setState({status:T,externalWalletsVisibility:!1})})),e.on(b.n2.ADAPTER_DATA_UPDATED,(function(e){t.handleAdapterData(e)}))})),t.appLogo=n||"https://images.web3auth.io/web3auth-logo.svg",t.version=a,t.isDark="dark"===d,t.stateEmitter=new v.Ue,t.displayErrorsOnModal=p,t.defaultLanguage=m,t.subscribeCoreEvents(u),t}return(0,u.Z)(o)}(v.Ue),hr=r(22106),pr={};pr.styleTagTransform=V(),pr.setAttributes=H(),pr.insert=z().bind(null,"head"),pr.domAPI=D(),pr.insertStyleElement=W(),L()(hr.Z,pr),hr.Z&&hr.Z.locals&&hr.Z.locals,r(37715);var gr=r(89591);function mr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mr(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var br=function(){var e=(0,s.Z)(y().mark((function e(t){var n,i,o,a,s,c,u,l,f,d,h,p,g,m,v,w,A,_,E,x,k,S,C,P;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.name,i=t.customChainConfig,o=t.clientId,Object.values(b.EN).includes(i.chainNamespace)){e.next=3;break}throw new Error("Invalid chainNamespace: ".concat(i.chainNamespace));case 3:if(a=yr(yr({},(0,b.h2)(i.chainNamespace,null==i?void 0:i.chainId)),i||{}),n!==b.rW.TORUS_EVM){e.next=13;break}return e.next=7,Promise.resolve().then(r.bind(r,73466));case 7:return s=e.sent,c=s.TorusWalletAdapter,u=new c({chainConfig:a,clientId:o}),e.abrupt("return",u);case 13:if(n!==b.rW.TORUS_SOLANA){e.next=22;break}return e.next=16,Promise.resolve().then(r.bind(r,38466));case 16:return l=e.sent,f=l.SolanaWalletAdapter,d=new f({chainConfig:a,clientId:o}),e.abrupt("return",d);case 22:if(n!==b.rW.METAMASK){e.next=31;break}return e.next=25,Promise.resolve().then(r.bind(r,9441));case 25:return h=e.sent,p=h.MetamaskAdapter,g=new p({chainConfig:a,clientId:o}),e.abrupt("return",g);case 31:if(n!==b.rW.PHANTOM){e.next=40;break}return e.next=34,Promise.resolve().then(r.bind(r,55859));case 34:return m=e.sent,v=m.PhantomAdapter,w=new v({chainConfig:a,clientId:o}),e.abrupt("return",w);case 40:if(n!==b.rW.WALLET_CONNECT_V1){e.next=49;break}return e.next=43,Promise.resolve().then(r.bind(r,53311));case 43:return A=e.sent,_=A.WalletConnectV1Adapter,E=new _({chainConfig:a,clientId:o}),e.abrupt("return",E);case 49:if(n!==b.rW.OPENLOGIN){e.next=58;break}return e.next=52,Promise.resolve().then(r.bind(r,260));case 52:return x=e.sent,k=x.OpenloginAdapter,S=x.getOpenloginDefaultOptions,C=S(i.chainNamespace,null==i?void 0:i.chainId),P=new k(yr(yr({},C),{},{chainConfig:yr(yr({},C.chainConfig||{}),a),adapterSettings:yr(yr({},C.adapterSettings),{},{clientId:o})})),e.abrupt("return",P);case 58:throw new Error("Invalid wallet adapter name");case 59:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),vr={en:"english",de:"german",ja:"japanese",ko:"korean",zh:"mandarin",es:"spanish"};function wr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ar(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wr(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _r=function(e){(0,d.Z)(v,e);var t,r,n,i,o,m=(i=v,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,p.Z)(i);if(o){var r=(0,p.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,h.Z)(this,e)});function v(e){var t,r,n,i;(0,c.Z)(this,v),i=m.call(this,e),(0,g.Z)((0,l.Z)(i),"loginModal",void 0),(0,g.Z)((0,l.Z)(i),"options",void 0),(0,g.Z)((0,l.Z)(i),"modalConfig",gr.OW),i.options=Ar({},e);var o=i.options.chainConfig;if(o.chainNamespace===b.EN.SOLANA)"WALLET"===e.authMode?i.modalConfig=gr.K8:i.modalConfig=gr.Jx;else if(o.chainNamespace===b.EN.EIP155)"WALLET"===e.authMode?i.modalConfig=gr.ql:i.modalConfig=gr.OW;else{if(o.chainNamespace!==b.EN.OTHER)throw new Error("Invalid chainNamespace provided: ".concat(o.chainNamespace));i.modalConfig=gr.ue}var a=function(e){var t=e;return t||(t=(window.navigator.userLanguage||window.navigator.language||"en-US").split("-")[0]),Object.prototype.hasOwnProperty.call(vr,t)?t:"en"}(null===(t=i.options.uiConfig)||void 0===t?void 0:t.defaultLanguage);return i.loginModal=new dr({theme:null===(r=i.options.uiConfig)||void 0===r?void 0:r.theme,appLogo:(null===(n=i.options.uiConfig)||void 0===n?void 0:n.appLogo)||"",version:"",adapterListener:(0,l.Z)(i),displayErrorsOnModal:i.options.displayErrorsOnModal,defaultLanguage:a}),i.subscribeToLoginModalEvents(),i}return(0,u.Z)(v,[{key:"initModal",value:(n=(0,s.Z)(y().mark((function e(t){var r,n,i,o,c,u,l,d=this;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,f.Z)((0,p.Z)(v.prototype),"checkInitRequirements",this).call(this),e.next=3,this.loginModal.initModal();case 3:return r=this.options.chainConfig,n=a(new Set([].concat(a(Object.keys(this.modalConfig.adapters||{})),a(Object.keys(this.walletAdapters))))),i=n.map(function(){var e=(0,s.Z)(y().mark((function e(n){var i,o,a,s,c,u,l,f,h,p;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=(null===(i=d.modalConfig.adapters)||void 0===i?void 0:i[n])||{label:n,showOnModal:!0,showOnMobile:!0,showOnDesktop:!0},null!=t&&null!==(o=t.modalConfig)&&void 0!==o&&o[n]&&(c=Ar(Ar({},c),t.modalConfig[n])),d.modalConfig.adapters[n]=c,u=d.walletAdapters[n],b.cM.debug("adapter config",n,null===(a=d.modalConfig.adapters)||void 0===a?void 0:a[n].showOnModal,u),u||null===(s=d.modalConfig.adapters)||void 0===s||!s[n].showOnModal){e.next=13;break}return e.next=8,br({name:n,customChainConfig:d.options.chainConfig,clientId:d.options.clientId});case 8:return l=e.sent,d.walletAdapters[n]=l,e.abrupt("return",n);case 13:if((null==u?void 0:u.type)!==b.hN.IN_APP&&(null==u?void 0:u.type)!==b.hN.EXTERNAL&&n!==d.cachedAdapter){e.next=19;break}if(null!==(f=d.modalConfig.adapters)&&void 0!==f&&f[n].showOnModal){e.next=16;break}return e.abrupt("return");case 16:return d.walletAdapters[n].setAdapterSettings({clientId:d.options.clientId,sessionTime:d.options.sessionTime}),u.chainConfigProxy||(p=Ar(Ar({},(0,b.h2)(r.chainNamespace,null===(h=d.coreOptions.chainConfig)||void 0===h?void 0:h.chainId)),d.coreOptions.chainConfig),d.walletAdapters[n].setChainConfig(p)),e.abrupt("return",n);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=8,Promise.all(i);case 8:return o=e.sent,c=Object.values(this.walletAdapters).some((function(e){var t;if(e.type!==b.hN.IN_APP)return!1;if(!0!==d.modalConfig.adapters[e.name].showOnModal)return!1;if(!d.modalConfig.adapters[e.name].loginMethods)return!0;var r=lr(e.name,d.walletAdapters[e.name],null===(t=d.modalConfig.adapters[e.name])||void 0===t?void 0:t.loginMethods);return!!Object.values(r).some((function(e){return e.showOnModal}))})),b.cM.debug(c,this.walletAdapters,"hasInAppWallets"),u=o.map(function(){var e=(0,s.Z)(y().mark((function e(t){var r;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if(e.prev=2,r=d.walletAdapters[t],d.cachedAdapter===t||r.type!==b.hN.EXTERNAL){e.next=6;break}return e.abrupt("return");case 6:if(d.subscribeToAdapterEvents(r),r.status!==b.MP.NOT_READY){e.next=10;break}return e.next=10,r.init({autoConnect:d.cachedAdapter===t});case 10:r.type===b.hN.IN_APP&&d.initializeInAppWallet(t),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),b.cM.error(e.t0,"error while initializing adapter");case 16:case"end":return e.stop()}}),e,null,[[2,13]])})));return function(t){return e.apply(this,arguments)}}()),this.status=b.MP.READY,e.next=15,Promise.all(u);case 15:if((l=n.some((function(e){var t,r;return(null===(t=d.walletAdapters[e])||void 0===t?void 0:t.type)===b.hN.EXTERNAL&&(null===(r=d.modalConfig.adapters)||void 0===r?void 0:r[e].showOnModal)})))&&this.loginModal.initExternalWalletContainer(),c||!l){e.next=20;break}return e.next=20,this.initExternalWalletAdapters(!1,{showExternalWalletsOnly:!0});case 20:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"connect",value:(r=(0,s.Z)(y().mark((function e(){var t=this;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.provider){e.next=2;break}return e.abrupt("return",this.provider);case 2:return this.loginModal.open(),e.abrupt("return",new Promise((function(e,r){t.once(b.n2.CONNECTED,(function(){return e(t.provider)})),t.once(b.n2.ERRORED,(function(e){return r(e)}))})));case 4:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"initExternalWalletAdapters",value:(t=(0,s.Z)(y().mark((function e(t,r){var n,i,o,a,c,u=this;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=2;break}return e.abrupt("return");case 2:return n={},i={},o=Object.keys(this.walletAdapters).map(function(){var e=(0,s.Z)(y().mark((function e(t){var r;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(null==(r=u.walletAdapters[t])?void 0:r.type)!==b.hN.EXTERNAL){e.next=11;break}if(b.cM.debug("init external wallet",u.cachedAdapter,t),u.subscribeToAdapterEvents(r),u.cachedAdapter!==t){e.next=7;break}return e.abrupt("return");case 7:if(r.status!==b.MP.NOT_READY){e.next=11;break}return e.next=10,Promise.race([r.init({autoConnect:u.cachedAdapter===t}).then((function(){return n[t]=u.modalConfig.adapters[t],i[t]=r.adapterData||{},t})),new Promise((function(e){setTimeout((function(){return e(null)}),5e3)}))]);case 10:return e.abrupt("return",e.sent);case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),b.cM.error(e.t0,"error while initializing adapter");case 16:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(t){return e.apply(this,arguments)}}()),e.next=7,Promise.all(o);case 7:a=e.sent,c={},a.forEach((function(e){e&&(c[e]=n[e])})),this.loginModal.addWalletLogins(c,{showExternalWalletsOnly:!(null==r||!r.showExternalWalletsOnly)});case 11:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})},{key:"initializeInAppWallet",value:function(e){var t,r;b.cM.info("adapterInitResults",e),this.walletAdapters[e].type===b.hN.IN_APP&&this.loginModal.addSocialLogins(e,lr(e,this.walletAdapters[e],null===(t=this.modalConfig.adapters[e])||void 0===t?void 0:t.loginMethods),(null===(r=this.options.uiConfig)||void 0===r?void 0:r.loginMethodsOrder)||P)}},{key:"subscribeToLoginModalEvents",value:function(){var e=this;this.loginModal.on(I,function(){var t=(0,s.Z)(y().mark((function t(r){return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.connectTo(r.adapter,r.loginParams);case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),b.cM.error("Error while connecting to adapter: ".concat(r.adapter),t.t0);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()),this.loginModal.on(O,function(){var t=(0,s.Z)(y().mark((function t(r){return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.initExternalWalletAdapters(r.externalWalletsInitialized);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),this.loginModal.on("DISCONNECT",(0,s.Z)(y().mark((function t(){return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.logout();case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),b.cM.error("Error while disconnecting",t.t0);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})))),this.loginModal.on(B,function(){var t=(0,s.Z)(y().mark((function t(r){var n,i;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(b.cM.debug("is login modal visible",r),e.emit(B,r),i=null===(n=e.walletAdapters[b.rW.WALLET_CONNECT_V1])||void 0===n?void 0:n.status,r&&i===b.MP.READY)try{e.walletAdapters[b.rW.WALLET_CONNECT_V1].connect()}catch(e){b.cM.error("Error while disconnecting to wallet connect in core",e)}case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}]),v}(S)},79744:(e,t,r)=>{"use strict";r.d(t,{FL:()=>E,Zk:()=>_});var n=r(9249),i=r(87371),o=r(80753),a=r(88106),s=r(11987),c=r(93069),u=r(95058),l=r(56666),f=r(8759),d=r(27590),h=r(58094),p=r(34795),g=r(82841),m=r.n(g),y=r(17391),b=r(23349),v=r.n(b);function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){(0,l.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _=function(e){(0,a.Z)(g,e);var t,r,p=(t=g,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.Z)(t);if(r){var i=(0,u.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.Z)(this,e)});function g(e){var t,r,i=e.config,a=e.state;if((0,n.Z)(this,g),r=p.call(this,{config:i,state:a}),(0,l.Z)((0,o.Z)(r),"_providerEngineProxy",null),!i.chainConfig)throw d.Ty.invalidProviderConfigError("Please provide chainConfig");if(!i.chainConfig.chainId)throw d.Ty.invalidProviderConfigError("Please provide chainId inside chainConfig");if(!i.chainConfig.rpcTarget)throw d.Ty.invalidProviderConfigError("Please provide rpcTarget inside chainConfig");return r.defaultState={chainId:"loading"},r.defaultConfig={chainConfig:i.chainConfig,networks:(0,l.Z)({},i.chainConfig.chainId,i.chainConfig)},(0,c.Z)((t=(0,o.Z)(r),(0,u.Z)(g.prototype)),"initialize",t).call(t),r}return(0,i.Z)(g,[{key:"provider",get:function(){return this._providerEngineProxy},set:function(e){throw new Error("Method not implemented.")}},{key:"addChain",value:function(e){if(!e.chainId)throw h.Sy.rpc.invalidParams("chainId is required");if(!e.rpcTarget)throw h.Sy.rpc.invalidParams("chainId is required");this.configure({networks:A(A({},this.config.networks),{},(0,l.Z)({},e.chainId,e))})}},{key:"getChainConfig",value:function(e){var t,r=null===(t=this.config.networks)||void 0===t?void 0:t[e];if(!r)throw h.Sy.rpc.invalidRequest("Chain ".concat(e," is not supported, please add chainConfig for it"));return r}},{key:"getProviderEngineProxy",value:function(){return this._providerEngineProxy}},{key:"updateProviderEngineProxy",value:function(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=(0,f.qY)(e)}}]),g}(f.xG),E=function(){function e(){(0,n.Z)(this,e),(0,l.Z)(this,"_providerEngineProxy",null)}var t,r;return(0,i.Z)(e,[{key:"provider",get:function(){return this._providerEngineProxy},set:function(e){throw new Error("Method not implemented.")}},{key:"addChain",value:function(e){throw new Error("Method not implemented.")}},{key:"setupProvider",value:(r=(0,p.Z)(m().mark((function e(t){var r,n,i;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=this.getPrivKeyMiddleware(t),(n=new y.eI).push(r),i=(0,f.Xj)(n),this.updateProviderEngineProxy(i);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"switchChain",value:(t=(0,p.Z)(m().mark((function e(t){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve());case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"getProviderEngineProxy",value:function(){return this._providerEngineProxy}},{key:"updateProviderEngineProxy",value:function(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=(0,f.qY)(e)}},{key:"getPrivKeyMiddleware",value:function(e){var t,r={getPrivatekey:(t=(0,p.Z)(m().mark((function t(){return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e);case 1:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})};return this.createPrivKeyMiddleware(r)}},{key:"createPrivKeyMiddleware",value:function(e){var t=e.getPrivatekey;function r(){return(r=(0,p.Z)(m().mark((function e(r,n){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:n.result=e.sent;case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,y.v0)({private_key:(0,y.Pk)((function(e,t){return r.apply(this,arguments)}))})}}]),e}();(0,l.Z)(E,"getProviderInstance",function(){var e=(0,p.Z)(m().mark((function e(t){var r;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new E,e.next=3,r.setupProvider(t.privKey);case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),v()()},39364:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EthereumPrivateKeyProvider:()=>xe,TransactionFormatter:()=>Ae,WalletConnectProvider:()=>H,getProviderHandlers:()=>de});var n=r(34795),i=r(9249),o=r(87371),a=r(80753),s=r(93069),c=r(88106),u=r(11987),l=r(95058),f=r(56666),d=r(82841),h=r.n(d),p=r(8759),g=r(17391),m=r(27590),y=r(79744),b=r(58094),v=r(34670),w=r(45372),A=r(50539),_=r(86522),E=r(23460),x=r(71696),k=r.n(x),S=r(663),C=r(72558),P=r(31664),O=r(62197),I=r.n(O),B=r(48834).Buffer;function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function R(e){return 42===e.length}function N(e){var t=e.getAccounts,r=e.getPrivateKey,i=e.processDecryptMessage,o=e.processEncryptionPublicKey,a=e.processEthSignMessage,s=e.processPersonalMessage,c=e.processTransaction,u=e.processSignTransaction,l=e.processTypedMessage,f=e.processTypedMessageV3,d=e.processTypedMessageV4;if(!t)throw new Error("opts.getAccounts is required");function p(e,t){return m.apply(this,arguments)}function m(){return(m=(0,n.Z)(h().mark((function e(r,n){var i,o,a;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("string"==typeof r&&r.length>0)){e.next=8;break}return e.next=3,t(n);case 3:if(i=e.sent,o=i.map((function(e){return e.toLowerCase()})),a=r.toLowerCase(),!o.includes(a)){e.next=8;break}return e.abrupt("return",a);case 8:throw b.Sy.rpc.invalidParams({message:"Invalid parameters: must provide an Ethereum address."});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(){return(y=(0,n.Z)(h().mark((function e(r,n){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(r);case 2:n.result=e.sent;case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(){return(v=(0,n.Z)(h().mark((function e(r,n){var i;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(r);case 2:i=e.sent,n.result=i[0]||null;case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(){return(w=(0,n.Z)(h().mark((function e(t,r){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c){e.next=2;break}throw b.Sy.rpc.methodNotSupported();case 2:return n=t.params[0]||{from:""},e.next=5,p(n.from,t);case 5:return n.from=e.sent,e.next=8,c(n,t);case 8:r.result=e.sent;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(){return(A=(0,n.Z)(h().mark((function e(t,r){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u){e.next=2;break}throw b.Sy.rpc.methodNotSupported();case 2:return n=t.params[0]||{from:""},e.next=5,p(n.from,t);case 5:return n.from=e.sent,e.next=8,u(n,t);case 8:r.result=e.sent;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(){return(_=(0,n.Z)(h().mark((function e(t,r){var n,i,o,s;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a){e.next=2;break}throw b.Sy.rpc.methodNotSupported();case 2:return e.next=4,p(t.params[0],t);case 4:return n=e.sent,i=t.params[1],o=t.params[2]||{},s=M(M({},o),{},{from:n,data:i}),e.next=10,a(s,t);case 10:r.result=e.sent;case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(){return(E=(0,n.Z)(h().mark((function e(t,r){var n,i,o,a;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l){e.next=2;break}throw b.Sy.rpc.methodNotSupported();case 2:return n=t.params[0],e.next=5,p(t.params[1],t);case 5:return i=e.sent,o=t.params[2]||{},a=M(M({},o),{},{from:i,data:n}),e.next=11,l(a,t,"V1");case 11:r.result=e.sent;case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(){return(x=(0,n.Z)(h().mark((function e(t,r){var n,i,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f){e.next=2;break}throw b.Sy.rpc.methodNotSupported();case 2:return e.next=4,p(t.params[0],t);case 4:return n=e.sent,i=t.params[1],o={data:i,from:n,version:"V3"},e.next=10,f(o,t,"V3");case 10:r.result=e.sent;case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(){return(k=(0,n.Z)(h().mark((function e(t,r){var n,i,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d){e.next=2;break}throw b.Sy.rpc.methodNotSupported();case 2:return e.next=4,p(t.params[0],t);case 4:return n=e.sent,i=t.params[1],o={data:i,from:n,version:"V4"},e.next=10,d(o,t,"V4");case 10:r.result=e.sent;case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(){return(S=(0,n.Z)(h().mark((function e(t,r){var n,i,o,a,c,u;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s){e.next=2;break}throw b.Sy.rpc.methodNotSupported();case 2:return n=t.params[0],i=t.params[1],o=t.params[2]||{},R(n)&&!R(i)?(r.warning="The eth_personalSign method requires params ordered [message, address]. This was previously handled incorrectly, and has been corrected automatically. Please switch this param order for smooth behavior in the future.",a=n,c=i):(c=n,a=i),e.next=8,p(a,t);case 8:return a=e.sent,u=M(M({},o),{},{from:a,data:c}),e.next=12,s(u,t);case 12:r.result=e.sent;case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(){return(C=(0,n.Z)(h().mark((function e(t,r){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o){e.next=2;break}throw b.Sy.rpc.methodNotSupported();case 2:return e.next=4,p(t.params[0],t);case 4:return n=e.sent,e.next=7,o(n,t);case 7:r.result=e.sent;case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(){return(P=(0,n.Z)(h().mark((function e(t,r){var n,o,a,s;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i){e.next=2;break}throw b.Sy.rpc.methodNotSupported();case 2:return n=t.params[0],e.next=5,p(t.params[1],t);case 5:o=e.sent,a=t.params[2]||{},s=M(M({},a),{},{from:o,data:n}),r.result=i(s,t);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(){return(O=(0,n.Z)(h().mark((function e(t,n){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}throw b.Sy.rpc.methodNotSupported();case 2:n.result=r(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,g.v0)({eth_accounts:(0,g.Pk)((function(e,t){return y.apply(this,arguments)})),eth_private_key:(0,g.Pk)((function(e,t){return O.apply(this,arguments)})),eth_coinbase:(0,g.Pk)((function(e,t){return v.apply(this,arguments)})),eth_sendTransaction:(0,g.Pk)((function(e,t){return w.apply(this,arguments)})),eth_signTransaction:(0,g.Pk)((function(e,t){return A.apply(this,arguments)})),eth_sign:(0,g.Pk)((function(e,t){return _.apply(this,arguments)})),eth_signTypedData:(0,g.Pk)((function(e,t){return E.apply(this,arguments)})),eth_signTypedData_v3:(0,g.Pk)((function(e,t){return x.apply(this,arguments)})),eth_signTypedData_v4:(0,g.Pk)((function(e,t){return k.apply(this,arguments)})),personal_sign:(0,g.Pk)((function(e,t){return S.apply(this,arguments)})),eth_getEncryptionPublicKey:(0,g.Pk)((function(e,t){return C.apply(this,arguments)})),eth_decrypt:(0,g.Pk)((function(e,t){return P.apply(this,arguments)}))})}function j(e){var t=e.getAccounts,r=e.getPrivateKey,n=e.processTransaction,i=e.processSignTransaction,o=e.processEthSignMessage,a=e.processTypedMessage,s=e.processTypedMessageV3,c=e.processTypedMessageV4,u=e.processPersonalMessage,l=e.processEncryptionPublicKey,f=e.processDecryptMessage;return(0,g.UZ)([(0,g.v0)({eth_syncing:!1}),N({getAccounts:t,getPrivateKey:r,processTransaction:n,processEthSignMessage:o,processSignTransaction:i,processTypedMessage:a,processTypedMessageV3:s,processTypedMessageV4:c,processPersonalMessage:u,processEncryptionPublicKey:l,processDecryptMessage:f})])}function L(e){return function(t,r,n,i){return"eth_chainId"===t.method?(r.result=e,i()):n()}}function U(e){return function(t,r,n,i){return"eth_provider_config"===t.method?(r.result=e,i()):n()}}function D(e){var t=e.chainId,r=e.rpcTarget,n=(0,p.v$)({rpcTarget:r});return{networkMiddleware:(0,g.UZ)([L(t),U(e),n]),fetchMiddleware:n}}function F(e){var t,r,i,o,a,s,c,u,l,f,d=e.connector;return{getPrivateKey:(f=(0,n.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw b.Sy.rpc.methodNotSupported();case 1:case"end":return e.stop()}}),e)}))),function(){return f.apply(this,arguments)}),getAccounts:(l=(0,n.Z)(h().mark((function e(t){var r;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=d.accounts)||!r.length){e.next=3;break}return e.abrupt("return",r);case 3:throw new Error("Failed to get accounts");case 4:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)}),processTransaction:(u=(0,n.Z)(h().mark((function e(t,r){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.sendTransaction(t);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)}))),function(e,t){return u.apply(this,arguments)}),processSignTransaction:(c=(0,n.Z)(h().mark((function e(t,r){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.signTransaction(t);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)}))),function(e,t){return c.apply(this,arguments)}),processEthSignMessage:(s=(0,n.Z)(h().mark((function e(t,r){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.signMessage([t.from,t.data]);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)}))),function(e,t){return s.apply(this,arguments)}),processPersonalMessage:(a=(0,n.Z)(h().mark((function e(t,r){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.signPersonalMessage([t.data,t.from]);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)}))),function(e,t){return a.apply(this,arguments)}),processTypedMessage:(o=(0,n.Z)(h().mark((function e(t,r){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.signTypedData([t.from,t.data]);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)}))),function(e,t){return o.apply(this,arguments)}),processTypedMessageV3:(i=(0,n.Z)(h().mark((function e(t){var r;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.signTypedData([t.from,t.data]);case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)}),processTypedMessageV4:(r=(0,n.Z)(h().mark((function e(t){var r;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.signTypedData([t.from,t.data]);case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)}),processEncryptionPublicKey:(t=(0,n.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw b.Sy.rpc.methodNotSupported();case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)}),processDecryptMessage:function(e){throw b.Sy.rpc.methodNotSupported()}}}function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var H=function(e){(0,c.Z)(k,e);var t,r,d,y,v,w,A,_,E,x=(_=k,E=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,l.Z)(_);if(E){var r=(0,l.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,u.Z)(this,e)});function k(e){var t,r=e.config,n=e.state,o=e.connector;return(0,i.Z)(this,k),t=x.call(this,{config:{chainConfig:Z(Z({},r.chainConfig),{},{chainNamespace:m.EN.EIP155}),skipLookupNetwork:!!r.skipLookupNetwork},state:Z(Z({},n||{}),{},{chainId:"loading",accounts:[]})}),(0,f.Z)((0,a.Z)(t),"connector",null),t.connector=o||null,t}return(0,o.Z)(k,[{key:"enable",value:(A=(0,n.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.connector){e.next=2;break}throw b.Sy.provider.custom({message:"Connector is not initialized, pass wallet connect connector in constructor",code:4902});case 2:return e.next=4,this.setupProvider(this.connector);case 4:return e.abrupt("return",this._providerEngineProxy.request({method:"eth_accounts"}));case 5:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"setupProvider",value:(w=(0,n.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.onConnectorStateUpdate(t),e.next=3,this.setupEngine(t);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"switchChain",value:(v=(0,n.Z)(h().mark((function e(t){var r,n,i,o,a,s,c,u;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.chainId,n=t.addChain,i=void 0===n||n,o=t.lookup,a=void 0===o||o,this.connector){e.next=3;break}throw b.Sy.provider.custom({message:"Connector is not initialized, pass wallet connect connector in constructor",code:4902});case 3:if(s=this.getChainConfig(r),this.update({chainId:"loading"}),c=s.rpcTarget,u=s.displayName,!i){e.next=15;break}return e.prev=7,e.next=10,this.connector.sendCustomRequest({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:u,rpcUrls:[c]}]});case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),m.cM.error(e.t0);case 15:return e.prev=15,e.next=18,this.connector.sendCustomRequest({method:"wallet_switchEthereumChain",params:[{chainId:r}]});case 18:e.next=25;break;case 20:if(e.prev=20,e.t1=e.catch(15),m.cM.error(e.t1),"JSON RPC response format is invalid"===e.t1.message){e.next=25;break}throw e.t1;case 25:if(this.configure({chainConfig:s}),!a){e.next=29;break}return e.next=29,this.lookupNetwork(this.connector);case 29:case"end":return e.stop()}}),e,this,[[7,12],[15,20]])}))),function(e){return v.apply(this,arguments)})},{key:"addChain",value:(y=(0,n.Z)(h().mark((function e(t){var r,n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.connector){e.next=2;break}throw m.Ty.notReady("Wallet adapter is not ready yet");case 2:return r=t.rpcTarget,n=t.displayName,e.prev=3,e.next=6,this.connector.sendCustomRequest({method:"wallet_addEthereumChain",params:[{chainId:t.chainId,chainName:n,rpcUrls:[r]}]});case 6:(0,s.Z)((0,l.Z)(k.prototype),"addChain",this).call(this,t),e.next=13;break;case 9:throw e.prev=9,e.t0=e.catch(3),m.cM.error(e.t0),e.t0;case 13:case"end":return e.stop()}}),e,this,[[3,9]])}))),function(e){return y.apply(this,arguments)})},{key:"lookupNetwork",value:(d=(0,n.Z)(h().mark((function e(t){var r,n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.connected){e.next=2;break}throw m.RM.notConnectedError("Wallet connect connector is not connected");case 2:if(this.provider){e.next=4;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 4:if(r=this.config.chainConfig.chainId,n=(0,m.H2)(t.chainId.toString())?t.chainId:"0x".concat(t.chainId.toString(16)),r===n){e.next=8;break}throw m.Ty.rpcConnectionError("Invalid network, net_version is: ".concat(n,", expected: ").concat(r));case 8:return this.provider.emit("connect",{chainId:r}),this.provider.emit("chainChanged",this.state.chainId),e.abrupt("return",n);case 11:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"setupEngine",value:(r=(0,n.Z)(h().mark((function e(t){var r,n,i,o,a,s;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=F({connector:t}),this.update({accounts:t.accounts||[]}),n=j(r),i=new g.eI,o=D(this.config.chainConfig),a=o.networkMiddleware,i.push(n),i.push(a),s=(0,p.Xj)(i),this.updateProviderEngineProxy(s),this.config.skipLookupNetwork){e.next=12;break}return e.next=12,this.lookupNetwork(t);case 12:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"onConnectorStateUpdate",value:(t=(0,n.Z)(h().mark((function e(t){var r=this;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.on("session_update",function(){var e=(0,n.Z)(h().mark((function e(n,i){var o,a,s,c,u,l;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.provider){e.next=2;break}throw m.RM.notConnectedError("Wallet connect connector is not connected");case 2:if(!n){e.next=5;break}return r.provider.emit("error",n),e.abrupt("return");case 5:if(o=i.params[0],a=o.accounts,s=o.chainId,c=o.rpcUrl,null!=a&&a.length&&r.state.accounts[0]!==a[0]&&(r.update({accounts:a}),r.provider.emit("accountsChanged",a)),u="0x".concat(s.toString(16)),!s||r.state.chainId===u){e.next=13;break}return l=(0,m.h2)(m.EN.EIP155,s)||{},r.configure({chainConfig:Z(Z({},l),{},{chainId:u,rpcTarget:c,chainNamespace:m.EN.EIP155})}),e.next=13,r.setupEngine(t);case 13:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),k}(y.Zk);(0,f.Z)(H,"getProviderInstance",function(){var e=(0,n.Z)(h().mark((function e(t){var r;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new H({config:{chainConfig:t.chainConfig,skipLookupNetwork:t.skipLookupNetwork}}),e.next=3,r.setupProvider(t.connector);case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var q=new C.Z("1e18"),W=new C.Z("1e9"),K=new C.Z("1"),V={hex:function(e){return"string"==typeof e?new C.Z((0,w.stripHexPrefix)(e),16):new C.Z(e,16)},dec:function(e){return new C.Z(e,10)}},G={WEI:function(e){return e.div(q)},GWEI:function(e){return e.div(W)},ETH:function(e){return e.div(K)}},$={WEI:function(e){return e.times(q).dp(0,C.Z.ROUND_HALF_UP)},GWEI:function(e){return e.times(W).dp(9,C.Z.ROUND_HALF_UP)},ETH:function(e){return e.times(K).dp(9,C.Z.ROUND_HALF_UP)}},J={hex:function(e){return e.toString(16)},dec:function(e){return new C.Z(e).toString(10)}},Y=function(e,t){var r=t.fromNumericBase;return function(e){var t=e.value,r=e.fromDenomination,n=e.toNumericBase,i=e.toDenomination,o=e.numberOfDecimals,a=V[e.fromNumericBase](t);return r&&(a=G[r](a)),i&&(a=$[i](a)),o&&(a=a.dp(o,C.Z.ROUND_HALF_DOWN)),n&&(a=J[n](a)),a}({fromNumericBase:void 0===r?"hex":r,toNumericBase:t.toNumericBase,fromDenomination:t.fromDenomination,toDenomination:t.toDenomination,numberOfDecimals:t.numberOfDecimals,value:e||"0"})};function X(e){return Y(e,{fromNumericBase:"dec",toNumericBase:"hex",fromDenomination:"GWEI",toDenomination:"WEI"})}function Q(e){return Y(e,{fromNumericBase:"hex",toNumericBase:"dec",fromDenomination:"WEI",toDenomination:"GWEI"})}function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function re(e){return Q(X(e))}function ne(e){return ie.apply(this,arguments)}function ie(){return(ie=(0,n.Z)(h().mark((function e(t){var r,n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,E.U2)(t);case 2:return r=e.sent,n=te(te({},r),{},{estimatedBaseFee:re(r.estimatedBaseFee),low:te(te({},r.low),{},{suggestedMaxPriorityFeePerGas:re(r.low.suggestedMaxPriorityFeePerGas),suggestedMaxFeePerGas:re(r.low.suggestedMaxFeePerGas)}),medium:te(te({},r.medium),{},{suggestedMaxPriorityFeePerGas:re(r.medium.suggestedMaxPriorityFeePerGas),suggestedMaxFeePerGas:re(r.medium.suggestedMaxFeePerGas)}),high:te(te({},r.high),{},{suggestedMaxPriorityFeePerGas:re(r.high.suggestedMaxPriorityFeePerGas),suggestedMaxFeePerGas:re(r.high.suggestedMaxFeePerGas)})}),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oe(e){return ae.apply(this,arguments)}function ae(){return(ae=(0,n.Z)(h().mark((function e(t){var r;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,E.U2)(t,{referrer:t,referrerPolicy:"no-referrer-when-downgrade",method:"GET",mode:"cors"});case 2:return r=e.sent,e.abrupt("return",{low:r.SafeGasPrice,medium:r.ProposeGasPrice,high:r.FastGasPrice});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var se=function(e,t){var r;try{k().ok(e&&"object"===(0,_.Z)(e),"Params must be an object."),k().ok("data"in e,'Params must include a "data" field.'),k().ok("from"in e,'Params must include a "from" field.'),k().ok("string"==typeof e.from&&(0,w.isValidAddress)(e.from),'"from" field must be a valid, lowercase, hexadecimal Ethereum address string.');var n=null,i=null;switch(e.version){case A.SignTypedDataVersion.V1:"string"==typeof e.data?k().doesNotThrow((function(){n=JSON.parse(e.data)}),'"data" must be a valid JSON string.'):n=e.data,k().ok(Array.isArray(n),"params.data must be an array."),k().doesNotThrow((function(){(0,A.typedSignatureHash)(n)}),"Signing data must be valid EIP-712 typed data.");break;case A.SignTypedDataVersion.V3:case A.SignTypedDataVersion.V4:"string"==typeof e.data?k().doesNotThrow((function(){n=JSON.parse(e.data)}),'"data" must be a valid JSON string.'):n=e.data,k().ok(n.primaryType in n.types,'Primary type of "'.concat(n.primaryType,'" has no type definition.'));var o=S.validate(n,A.TYPED_MESSAGE_SCHEMA.properties);k().strictEqual(o.errors.length,0,"Signing data must conform to EIP-712 schema. See https://git.io/fNtcx."),(i=null===(r=n.domain)||void 0===r?void 0:r.chainId)&&(k().ok(!Number.isNaN(t),'Cannot sign messages for chainId "'.concat(i,'", because Web3Auth is switching networks.')),"string"==typeof i&&(i=Number.parseInt(i,(0,m.H2)(i)?16:10)),k().strictEqual(i,t,'Provided chainId "'.concat(i,'" must match the active chainId "').concat(t,'"')));break;default:k().fail('Unknown typed data version "'.concat(e.version,'"'))}}catch(e){throw b.Sy.rpc.invalidInput({message:null==e?void 0:e.message})}};function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function le(e,t,r){return fe.apply(this,arguments)}function fe(){return(fe=(0,n.Z)(h().mark((function e(t,r,n){var i,o,a,s;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.formatTransaction(t);case 2:return i=e.sent,e.next=5,n.getCommonConfiguration();case 5:return o=e.sent,a=v.TransactionFactory.fromTxData(i,{common:o}),s=a.sign(B.from(r,"hex")).serialize(),e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(e){var t,r,i,o,a,s,c,u,l,f,d=e.txFormatter,g=e.privKey,y=e.getProviderEngineProxy;return{getAccounts:(f=(0,n.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",["0x".concat((0,w.privateToAddress)(B.from(g,"hex")).toString("hex"))]);case 1:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)}),getPrivateKey:(l=(0,n.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",g);case 1:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)}),processTransaction:(u=(0,n.Z)(h().mark((function e(t,r){var n,i,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=y()){e.next=3;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 3:return e.next=5,le(t,g,d);case 5:return i=e.sent,e.next=8,n.request({method:"eth_sendRawTransaction",params:["0x".concat(i.toString("hex"))]});case 8:return o=e.sent,e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)}))),function(e,t){return u.apply(this,arguments)}),processSignTransaction:(c=(0,n.Z)(h().mark((function e(t,r){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y()){e.next=3;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 3:return e.next=5,le(t,g,d);case 5:return n=e.sent,e.abrupt("return","0x".concat(n.toString("hex")));case 7:case"end":return e.stop()}}),e)}))),function(e,t){return c.apply(this,arguments)}),processEthSignMessage:(s=(0,n.Z)(h().mark((function e(t,r){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,p.l)(g,t.data),e.abrupt("return",n);case 2:case"end":return e.stop()}}),e)}))),function(e,t){return s.apply(this,arguments)}),processPersonalMessage:(a=(0,n.Z)(h().mark((function e(t,r){var n,i;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=B.from(g,"hex"),i=(0,A.personalSign)({privateKey:n,data:t.data}),e.abrupt("return",i);case 3:case"end":return e.stop()}}),e)}))),function(e,t){return a.apply(this,arguments)}),processTypedMessage:(o=(0,n.Z)(h().mark((function e(t,r){var n,i,o,a,s,c,u;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m.cM.debug("processTypedMessage",t),n=B.from(g,"hex"),i=y()){e.next=5;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 5:return e.next=7,i.request({method:"eth_chainId"});case 7:return o=e.sent,a=Number.parseInt(o,(0,m.H2)(o)?16:10),s=ue(ue({},t),{},{version:A.SignTypedDataVersion.V1}),se(s,a),c="string"==typeof s.data?JSON.parse(s.data):s.data,u=(0,A.signTypedData)({privateKey:n,data:c,version:A.SignTypedDataVersion.V1}),e.abrupt("return",u);case 14:case"end":return e.stop()}}),e)}))),function(e,t){return o.apply(this,arguments)}),processTypedMessageV3:(i=(0,n.Z)(h().mark((function e(t,r){var n,i,o,a,s,c;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m.cM.debug("processTypedMessageV3",t),n=B.from(g,"hex"),i=y()){e.next=5;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 5:return e.next=7,i.request({method:"eth_chainId"});case 7:return o=e.sent,a=Number.parseInt(o,(0,m.H2)(o)?16:10),se(t,a),s="string"==typeof t.data?JSON.parse(t.data):t.data,c=(0,A.signTypedData)({privateKey:n,data:s,version:A.SignTypedDataVersion.V3}),e.abrupt("return",c);case 13:case"end":return e.stop()}}),e)}))),function(e,t){return i.apply(this,arguments)}),processTypedMessageV4:(r=(0,n.Z)(h().mark((function e(t,r){var n,i,o,a,s,c;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m.cM.debug("processTypedMessageV4",t),n=B.from(g,"hex"),i=y()){e.next=5;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 5:return e.next=7,i.request({method:"eth_chainId"});case 7:return o=e.sent,a=Number.parseInt(o,(0,m.H2)(o)?16:10),se(t,a),s="string"==typeof t.data?JSON.parse(t.data):t.data,c=(0,A.signTypedData)({privateKey:n,data:s,version:A.SignTypedDataVersion.V4}),e.abrupt("return",c);case 13:case"end":return e.stop()}}),e)}))),function(e,t){return r.apply(this,arguments)}),processEncryptionPublicKey:(t=(0,n.Z)(h().mark((function e(t,r){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m.cM.info("processEncryptionPublicKey",t),e.abrupt("return",(0,A.getEncryptionPublicKey)(g));case 2:case"end":return e.stop()}}),e)}))),function(e,r){return t.apply(this,arguments)}),processDecryptMessage:function(e,t){m.cM.info("processDecryptMessage",e);var r=(0,w.stripHexPrefix)(e.data),n=B.from(r,"hex");return(0,A.decrypt)({encryptedData:JSON.parse(n.toString("utf8")),privateKey:g})}}}function he(e){return(0,w.addHexPrefix)(e.toString(16))}function pe(e){return I().isBN(e)?e:new(I())((0,w.stripHexPrefix)(e),16)}var ge="sentEther",me="fee-market",ye="legacy",be="eth_gasPrice";function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ae=function(){function e(t){var r=t.getProviderEngineProxy;(0,i.Z)(this,e),(0,f.Z)(this,"chainConfig",null),(0,f.Z)(this,"getProviderEngineProxy",void 0),(0,f.Z)(this,"isEIP1559Compatible",!1),this.getProviderEngineProxy=r}var t,r,a,s,c,u,l,d,p,g,y;return(0,o.Z)(e,[{key:"providerProxy",get:function(){return this.getProviderEngineProxy()}},{key:"init",value:(y=(0,n.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.providerProxy.request({method:"eth_provider_config",params:[]});case 2:return this.chainConfig=e.sent,e.next=5,this.getEIP1559Compatibility();case 5:this.isEIP1559Compatible=e.sent;case 6:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{key:"getCommonConfiguration",value:(g=(0,n.Z)(h().mark((function e(){var t,r,n,i,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.chainConfig){e.next=2;break}throw new Error("Chain config not initialized");case 2:return t=this.chainConfig,r=t.displayName,n=t.chainId,i=this.isEIP1559Compatible?P.Hardfork.London:P.Hardfork.Berlin,o={name:r,chainId:"loading"===n?0:Number.parseInt(n,16),networkId:"loading"===n?0:Number.parseInt(n,16),defaultHardfork:i},e.abrupt("return",P.Common.custom(o));case 6:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"formatTransaction",value:(p=(0,n.Z)(h().mark((function e(t){var r,n,i,o,a,s,c;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.chainConfig){e.next=2;break}throw new Error("Chain config not initialized");case 2:if(void 0!==(r=we({},t)).nonce){e.next=7;break}return e.next=6,this.providerProxy.request({method:"eth_getTransactionCount",params:[t.from,"latest"]});case 6:r.nonce=e.sent;case 7:if(this.isEIP1559Compatible||!r.gasPrice){e.next=19;break}if(r.maxFeePerGas&&delete r.maxFeePerGas,r.maxPriorityFeePerGas&&delete r.maxPriorityFeePerGas,r.gas){e.next=17;break}return e.next=13,this.getDefaultGasLimit(r);case 13:(n=e.sent)&&(r.gasLimit=n),e.next=18;break;case 17:r.gasLimit=r.gas;case 18:return e.abrupt("return",r);case 19:if(r.gas){e.next=26;break}return e.next=22,this.getDefaultGasLimit(r);case 22:(i=e.sent)&&(r.gasLimit=i),e.next=27;break;case 26:r.gasLimit=r.gas;case 27:return e.next=29,this.getDefaultGasFees(r);case 29:return o=e.sent,a=o.gasPrice,s=o.maxFeePerGas,c=o.maxPriorityFeePerGas,this.isEIP1559Compatible?(!r.gasPrice||r.maxFeePerGas||r.maxPriorityFeePerGas?(s&&!r.maxFeePerGas&&(r.maxFeePerGas=s),c&&!r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=c),a&&!r.maxFeePerGas&&(r.maxFeePerGas=a),r.maxFeePerGas&&!r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=r.maxFeePerGas)):(r.maxFeePerGas=r.gasPrice,r.maxPriorityFeePerGas=(u="string"==typeof c?(0,w.stripHexPrefix)(c):c,l="string"==typeof r.gasPrice?(0,w.stripHexPrefix)(r.gasPrice):r.gasPrice,null!=u&&null!=l&&new C.O(u,10).lt(l,10)?c:r.gasPrice)),delete r.gasPrice):(delete r.maxPriorityFeePerGas,delete r.maxFeePerGas),!a||r.gasPrice||r.maxPriorityFeePerGas||r.maxFeePerGas||(r.gasPrice=a),r.type=this.isEIP1559Compatible?"0x2":"0x0",r.chainId=this.chainConfig.chainId,e.abrupt("return",r);case 38:case"end":return e.stop()}var u,l}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"fetchEthGasPriceEstimate",value:(d=(0,n.Z)(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.providerProxy.request({method:"eth_gasPrice",params:[]});case 2:return t=e.sent,e.abrupt("return",{gasPrice:Q(t).toString()});case 4:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getEIP1559Compatibility",value:(l=(0,n.Z)(h().mark((function e(){var t,r;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.providerProxy.request({method:"eth_getBlockByNumber",params:["latest",!1]});case 2:return t=e.sent,r=t&&void 0!==t.baseFeePerGas,e.abrupt("return",!!r);case 5:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"fetchGasFeeEstimateData",value:(u=(0,n.Z)(h().mark((function e(){var t,r,n,i,o,a;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.chainConfig){e.next=2;break}throw new Error("Chain config not initialized");case 2:if(t="0x1"===this.chainConfig.chainId,r=Number.parseInt(this.chainConfig.chainId,16),e.prev=4,!this.isEIP1559Compatible){e.next=12;break}return e.next=8,ne("https://gas-api.metaswap.codefi.network/networks/<chain_id>/suggestedGasFees".replace("<chain_id>","".concat(r)));case 8:i=e.sent,n={gasFeeEstimates:i,gasEstimateType:me},e.next=20;break;case 12:if(!t){e.next=19;break}return e.next=15,oe("https://gas-api.metaswap.codefi.network/networks/<chain_id>/gasPrices".replace("<chain_id>","".concat(r)));case 15:o=e.sent,n={gasFeeEstimates:o,gasEstimateType:ye},e.next=20;break;case 19:throw new Error("Main gas fee/price estimation failed. Use fallback");case 20:e.next=34;break;case 22:return e.prev=22,e.t0=e.catch(4),e.prev=24,e.next=27,this.fetchEthGasPriceEstimate();case 27:a=e.sent,n={gasFeeEstimates:a,gasEstimateType:be},e.next=34;break;case 31:throw e.prev=31,e.t1=e.catch(24),new Error("Gas fee/price estimation failed. Message: ".concat(e.t1.message));case 34:return e.abrupt("return",n);case 35:case"end":return e.stop()}}),e,this,[[4,22],[24,31]])}))),function(){return u.apply(this,arguments)})},{key:"getDefaultGasFees",value:(c=(0,n.Z)(h().mark((function e(t){var r,n,i,o,a,s,c,u;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!this.isEIP1559Compatible&&t.gasPrice||this.isEIP1559Compatible&&t.maxFeePerGas&&t.maxPriorityFeePerGas)){e.next=2;break}return e.abrupt("return",{});case 2:return e.prev=2,e.next=5,this.fetchGasFeeEstimateData();case 5:if(r=e.sent,n=r.gasFeeEstimates,i=r.gasEstimateType,!this.isEIP1559Compatible||i!==me){e.next=16;break}if(o=n.medium,a=(o=void 0===o?{}:o).suggestedMaxPriorityFeePerGas,s=o.suggestedMaxFeePerGas,!a||!s){e.next=14;break}return e.abrupt("return",{maxFeePerGas:(0,w.addHexPrefix)(X(s)),maxPriorityFeePerGas:(0,w.addHexPrefix)(X(a))});case 14:e.next=22;break;case 16:if(i!==ye){e.next=20;break}return e.abrupt("return",{gasPrice:(0,w.addHexPrefix)(X(n.medium))});case 20:if(i!==be){e.next=22;break}return e.abrupt("return",{gasPrice:(0,w.addHexPrefix)(X(n.gasPrice))});case 22:e.next=27;break;case 24:e.prev=24,e.t0=e.catch(2),m.cM.error(e.t0);case 27:return e.next=29,this.fetchEthGasPriceEstimate();case 29:return c=e.sent,u=c.gasPrice,e.abrupt("return",{gasPrice:(0,w.addHexPrefix)(X(u))});case 32:case"end":return e.stop()}}),e,this,[[2,24]])}))),function(e){return c.apply(this,arguments)})},{key:"estimateTxGas",value:(s=(0,n.Z)(h().mark((function e(t){var r,n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete(r=we({},t)).gasPrice,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,e.next=6,this.providerProxy.request({method:"eth_estimateGas",params:[r]});case 6:return n=e.sent,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"analyzeGasUsage",value:(a=(0,n.Z)(h().mark((function e(t){var r,n,i;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.providerProxy.request({method:"eth_getBlockByNumber",params:["latest",!1]});case 2:return r=e.sent,o=pe(r.gasLimit),19,20,void 0,void 0,a=new(I())(19),s=new(I())(20),n=o.mul(a).div(s),i=he(n),e.prev=6,e.next=9,this.estimateTxGas(t);case 9:i=e.sent,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),m.cM.warn(e.t0);case 15:return e.abrupt("return",{blockGasLimit:r.gasLimit,estimatedGasHex:i});case 16:case"end":return e.stop()}var o,a,s}),e,this,[[6,12]])}))),function(e){return a.apply(this,arguments)})},{key:"addGasBuffer",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1.5,n=pe(e),i=pe(t),o=i.muln(.9),a=n.muln(r);return n.gt(o)?he(n):a.lt(o)?he(a):he(o)}},{key:"determineTransactionCategory",value:(r=(0,n.Z)(h().mark((function e(t){var r,n,i,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.data,n=t.to,i="",!r||n){e.next=6;break}o="contractDeployment",e.next=17;break;case 6:return e.prev=6,e.next=9,this.providerProxy.request({method:"eth_getCode",params:[n,"latest"]});case 9:i=e.sent,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),m.cM.warn(e.t0);case 15:o=i&&"0x"!==i&&"0x0"!==i?"contractInteraction":ge;case 17:return e.abrupt("return",{transactionCategory:o,code:i});case 18:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(e){return r.apply(this,arguments)})},{key:"getDefaultGasLimit",value:(t=(0,n.Z)(h().mark((function e(t){var r,n,i,o,a,s;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.determineTransactionCategory(we({},t));case 2:if(r=e.sent,n=r.transactionCategory,!t.gas){e.next=6;break}return e.abrupt("return",t.gas);case 6:if(!t.to||n!==ge){e.next=11;break}if(!t.data){e.next=9;break}throw Error("TxGasUtil - Trying to call a function on a non-contract address");case 9:return e.abrupt("return",(0,w.addHexPrefix)(21e3.toString(16)));case 11:return e.next=13,this.analyzeGasUsage(t);case 13:return i=e.sent,o=i.blockGasLimit,a=i.estimatedGasHex,s=this.addGasBuffer((0,w.addHexPrefix)(a),o),e.abrupt("return",s);case 18:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}();function _e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xe=function(e){(0,c.Z)(w,e);var t,r,a,s,f,d,y,v=(d=w,y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,l.Z)(d);if(y){var r=(0,l.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,u.Z)(this,e)});function w(e){var t=e.config,r=e.state;return(0,i.Z)(this,w),v.call(this,{config:{chainConfig:Ee(Ee({},t.chainConfig),{},{chainNamespace:m.EN.EIP155})},state:r})}return(0,o.Z)(w,[{key:"enable",value:(f=(0,n.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.state.privateKey){e.next=2;break}throw b.Sy.provider.custom({message:"Private key is not found in state, plz pass it in constructor state param",code:4902});case 2:return e.next=4,this.setupProvider(this.state.privateKey);case 4:return e.abrupt("return",this._providerEngineProxy.request({method:"eth_accounts"}));case 5:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"setupProvider",value:(s=(0,n.Z)(h().mark((function e(t){var r,n,i,o,a,s,c,u;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new Ae({getProviderEngineProxy:this.getProviderEngineProxy.bind(this)}),n=de({txFormatter:r,privKey:t,getProviderEngineProxy:this.getProviderEngineProxy.bind(this)}),i=j(n),o=this.getChainSwitchMiddleware(),a=new g.eI,s=D(this.config.chainConfig),c=s.networkMiddleware,a.push(i),a.push(o),a.push(this.getAccountMiddleware()),a.push(c),u=(0,p.Xj)(a),this.updateProviderEngineProxy(u),e.next=14,r.init();case 14:return e.next=16,this.lookupNetwork();case 16:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"updateAccount",value:(a=(0,n.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._providerEngineProxy){e.next=2;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 2:return e.next=4,this._providerEngineProxy.request({method:"eth_private_key"});case 4:if(e.sent===t.privateKey){e.next=14;break}return e.next=8,this.setupProvider(t.privateKey);case 8:return e.t0=this._providerEngineProxy,e.next=11,this._providerEngineProxy.request({method:"eth_accounts"});case 11:e.t1=e.sent,e.t2={accounts:e.t1},e.t0.emit.call(e.t0,"accountsChanged",e.t2);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"switchChain",value:(r=(0,n.Z)(h().mark((function e(t){var r,n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._providerEngineProxy){e.next=2;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 2:return r=this.getChainConfig(t.chainId),this.update({chainId:"loading"}),this.configure({chainConfig:r}),e.next=7,this._providerEngineProxy.request({method:"eth_private_key"});case 7:return n=e.sent,e.next=10,this.setupProvider(n);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"lookupNetwork",value:(t=(0,n.Z)(h().mark((function e(){var t,r;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._providerEngineProxy){e.next=2;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 2:if(t=this.config.chainConfig.chainId){e.next=5;break}throw b.Sy.rpc.invalidParams("chainId is required while lookupNetwork");case 5:return e.next=7,this._providerEngineProxy.request({method:"net_version",params:[]});case 7:if(r=e.sent,parseInt(t,16)===parseInt(r,10)){e.next=10;break}throw b.Sy.provider.chainDisconnected("Invalid network, net_version is: ".concat(r));case 10:return this.state.chainId!==t&&(this._providerEngineProxy.emit("chainChanged",t),this._providerEngineProxy.emit("connect",{chainId:t})),this.update({chainId:t}),e.abrupt("return",r);case 13:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getChainSwitchMiddleware",value:function(){var e,t,r=this,i={addChain:(t=(0,n.Z)(h().mark((function e(t){var n,i,o,a,s;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.chainId,i=t.chainName,o=t.rpcUrls,a=t.blockExplorerUrls,s=t.nativeCurrency,r.addChain({chainNamespace:"eip155",chainId:n,ticker:(null==s?void 0:s.symbol)||"ETH",tickerName:(null==s?void 0:s.name)||"Ether",displayName:i,rpcTarget:o[0],blockExplorer:(null==a?void 0:a[0])||""});case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)}),switchChain:(e=(0,n.Z)(h().mark((function e(t){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.chainId,e.next=3,r.switchChain({chainId:n});case 3:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})},o=function(e){var t=e.addChain,r=e.switchChain;function i(){return(i=(0,n.Z)(h().mark((function e(r,n){var i,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=null!==(i=r.params)&&void 0!==i&&i.length?r.params[0]:void 0){e.next=3;break}throw b.Sy.rpc.invalidParams("Missing chain params");case 3:if(o.chainId){e.next=5;break}throw b.Sy.rpc.invalidParams("Missing chainId in chainParams");case 5:if(o.rpcUrls&&0!==o.rpcUrls.length){e.next=7;break}throw b.Sy.rpc.invalidParams("Missing rpcUrls in chainParams");case 7:if(o.nativeCurrency){e.next=9;break}throw b.Sy.rpc.invalidParams("Missing nativeCurrency in chainParams");case 9:return e.next=11,t(o);case 11:n.result=e.sent;case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function o(){return(o=(0,n.Z)(h().mark((function e(t,n){var i,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=null!==(i=t.params)&&void 0!==i&&i.length?t.params[0]:void 0){e.next=3;break}throw b.Sy.rpc.invalidParams("Missing chainId");case 3:return e.next=5,r(o);case 5:n.result=e.sent;case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,g.v0)({wallet_addEthereumChain:(0,g.Pk)((function(e,t){return i.apply(this,arguments)})),wallet_switchEthereumChain:(0,g.Pk)((function(e,t){return o.apply(this,arguments)}))})}(i);return o}},{key:"getAccountMiddleware",value:function(){var e,t=this,r={updatePrivatekey:(e=(0,n.Z)(h().mark((function e(r){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.privateKey,e.next=3,t.updateAccount({privateKey:n});case 3:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};return function(e){var t=e.updatePrivatekey;function r(){return(r=(0,n.Z)(h().mark((function e(r,n){var i,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(o=null!==(i=r.params)&&void 0!==i&&i.length?r.params[0]:void 0)&&o.privateKey){e.next=3;break}throw b.Sy.rpc.invalidParams("Missing privateKey");case 3:return e.next=5,t(o);case 5:n.result=e.sent;case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,g.v0)({wallet_updateAccount:(0,g.Pk)((function(e,t){return r.apply(this,arguments)}))})}(r)}}]),w}(y.Zk);(0,f.Z)(xe,"getProviderInstance",function(){var e=(0,n.Z)(h().mark((function e(t){var r;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new xe({config:{chainConfig:t.chainConfig}}),e.next=3,r.setupProvider(t.privKey);case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},20809:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PhantomInjectedProvider:()=>L,SlopeInjectedProxyProvider:()=>U,SolanaPrivateKeyProvider:()=>Y,SolanaWallet:()=>X,SolflareInjectedProvider:()=>D,SolletInjectedProvider:()=>F,TorusInjectedProvider:()=>q});var n=r(9249),i=r(87371),o=r(88106),a=r(11987),s=r(95058),c=r(34795),u=r(56666),l=r(82841),f=r.n(l),d=r(8759),h=r(17391),p=r(27590),g=r(79744),m=r(51610),y=r.n(m),b=r(58094),v=r(48638),w=r(45429),A=r.n(w),_=r(48834).Buffer;function E(e){return function(t,r,n,i){return"solana_chainId"===t.method?(r.result=e,i()):n()}}function x(e){return function(t,r,n,i){return"solana_provider_config"===t.method?(r.result=e,i()):n()}}function k(e){var t=e.chainId;return(0,h.UZ)([E(t),x(e)])}function S(e){var t=e.getAccounts;return(0,h.Pk)(function(){var e=(0,c.Z)(f().mark((function e(r,n,i){var o;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("getAccounts"===r.method){e.next=3;break}return e.abrupt("return",i());case 3:if(t){e.next=5;break}throw new Error("WalletMiddleware - opts.getAccounts not provided");case 5:return e.next=7,t(r);case 7:return o=e.sent,n.result=o,e.abrupt("return",void 0);case 10:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}())}function C(e){var t=e.requestAccounts;return(0,h.Pk)(function(){var e=(0,c.Z)(f().mark((function e(r,n,i){var o;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("requestAccounts"===r.method){e.next=3;break}return e.abrupt("return",i());case 3:if(t){e.next=5;break}throw new Error("WalletMiddleware - opts.requestAccounts not provided");case 5:return e.next=7,t(r);case 7:return o=e.sent,n.result=o,e.abrupt("return",void 0);case 10:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}())}function P(e,t){return(0,h.Pk)(function(){var r=(0,c.Z)(f().mark((function r(n,i,o){var a;return f().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n.method===e){r.next=3;break}return r.abrupt("return",o());case 3:if(t){r.next=5;break}throw new Error("WalletMiddleware - ".concat(e," not provided"));case 5:return r.next=7,t(n);case 7:return a=r.sent,i.result=a,r.abrupt("return",void 0);case 10:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}())}function O(e){var t=e.getAccounts,r=e.requestAccounts,n=e.signTransaction,i=e.signAndSendTransaction,o=e.signAllTransactions,a=e.signMessage,s=e.getPrivateKey,c=e.getSecretKey;return(0,h.UZ)([C({requestAccounts:r}),S({getAccounts:t}),P("signTransaction",n),P("signAndSendTransaction",i),P("signAllTransactions",o),P("signMessage",a),P("solanaPrivateKey",s),P("solanaSecretKey",c)])}function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var T=function(e){(0,o.Z)(y,e);var t,r,u,l,g,m=(l=y,g=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,s.Z)(l);if(g){var r=(0,s.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,a.Z)(this,e)});function y(e){var t=e.config,r=e.state;return(0,n.Z)(this,y),m.call(this,{config:{chainConfig:B(B({},t.chainConfig),{},{chainNamespace:p.EN.SOLANA})},state:r})}return(0,i.Z)(y,[{key:"switchChain",value:(u=(0,c.Z)(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve());case 1:case"end":return e.stop()}}),e)}))),function(e){return u.apply(this,arguments)})},{key:"setupProvider",value:(r=(0,c.Z)(f().mark((function e(t){var r,n,i,o,a,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new h.eI,n=this.getProviderHandlers(t),i=O(n),r.push(i),o=k(this.config.chainConfig),r.push(o),(a=this.getInjectedProviderProxy(t))&&r.push(a),s=(0,d.Xj)(r),this.updateProviderEngineProxy(s),e.next=12,this.lookupNetwork();case 12:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"lookupNetwork",value:(t=(0,c.Z)(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.config.chainConfig,this.update({chainId:t.chainId}),e.abrupt("return",t.chainId||"");case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getInjectedProviderProxy",value:function(e){}}]),y}(g.Zk),M=function(e){var t,r,n,i,o,a,s,u,l={requestAccounts:(u=(0,c.Z)(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.publicKey?[y().encode(e.publicKey.toBytes())]:[]);case 1:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)}),getAccounts:(s=(0,c.Z)(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.publicKey?[y().encode(e.publicKey.toBytes())]:[]);case 1:case"end":return t.stop()}}),t)}))),function(){return s.apply(this,arguments)}),getPrivateKey:(a=(0,c.Z)(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw b.Sy.rpc.methodNotSupported();case 1:case"end":return e.stop()}}),e)}))),function(){return a.apply(this,arguments)}),getSecretKey:(o=(0,c.Z)(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw b.Sy.rpc.methodNotSupported();case 1:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)}),signTransaction:(i=(0,c.Z)(f().mark((function t(r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.signTransaction(r.params.message);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}}),t)}))),function(e){return i.apply(this,arguments)}),signMessage:(n=(0,c.Z)(f().mark((function t(r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.signMessage(r.params.message,r.params.display);case 2:return n=t.sent,t.abrupt("return",n.signature);case 4:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)}),signAllTransactions:(r=(0,c.Z)(f().mark((function t(r){var n,i,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(n=r.params)&&void 0!==n&&n.message&&null!==(i=r.params)&&void 0!==i&&i.message.length){t.next=2;break}throw b.Sy.rpc.invalidParams("message");case 2:return t.next=4,e.signAllTransactions(r.params.message);case 4:return o=t.sent,t.abrupt("return",o);case 6:case"end":return t.stop()}}),t)}))),function(e){return r.apply(this,arguments)}),signAndSendTransaction:(t=(0,c.Z)(f().mark((function t(r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.signAndSendTransaction(r.params.message);case 2:return n=t.sent,t.abrupt("return",{signature:n.signature});case 4:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})};return l};function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function j(e){return(0,h.Pk)(function(){var t=(0,c.Z)(f().mark((function t(r,n,i){var o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.request(N({},r));case 2:o=t.sent,n.result=o;case 4:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}())}var L=function(e){(0,o.Z)(u,e);var t,r,c=(t=u,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,s.Z)(t);if(r){var i=(0,s.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,a.Z)(this,e)});function u(){return(0,n.Z)(this,u),c.apply(this,arguments)}return(0,i.Z)(u,[{key:"getProviderHandlers",value:function(e){return M(e)}},{key:"getInjectedProviderProxy",value:function(e){return j(e)}}]),u}(T);var U=function(e){(0,o.Z)(l,e);var t,r,u=(t=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,s.Z)(t);if(r){var i=(0,s.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,a.Z)(this,e)});function l(){return(0,n.Z)(this,l),u.apply(this,arguments)}return(0,i.Z)(l,[{key:"getProviderHandlers",value:function(e){return function(e,t){var r,n,i,o,a,s,u,l,d={requestAccounts:(l=(0,c.Z)(f().mark((function t(){var r,n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.connect();case 2:return r=t.sent,n=r.data,t.abrupt("return",[n.publicKey]);case 5:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)}),getAccounts:(u=(0,c.Z)(f().mark((function t(){var r,n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.connect();case 2:return r=t.sent,n=r.data,t.abrupt("return",[n.publicKey]);case 5:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)}),getPrivateKey:(s=(0,c.Z)(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw b.Sy.rpc.methodNotSupported();case 1:case"end":return e.stop()}}),e)}))),function(){return s.apply(this,arguments)}),getSecretKey:(a=(0,c.Z)(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw b.Sy.rpc.methodNotSupported();case 1:case"end":return e.stop()}}),e)}))),function(){return a.apply(this,arguments)}),signTransaction:(o=(0,c.Z)(f().mark((function t(r){var n,i,o,a,s;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=r.params.message){t.next=3;break}throw b.Sy.rpc.invalidRequest({message:"Invalid transaction message"});case 3:return t.next=5,e.signTransaction(y().encode(n.serializeMessage()));case 5:if(i=t.sent,(o=i.data).publicKey&&o.signature){t.next=9;break}throw new Error("Invalid signature from slope wallet");case 9:return a=new v.nh(o.publicKey),s=y().decode(o.signature),n.addSignature(a,_.from(s)),t.abrupt("return",n);case 13:case"end":return t.stop()}}),t)}))),function(e){return o.apply(this,arguments)}),signMessage:(i=(0,c.Z)(f().mark((function t(r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.signMessage(r.params.message);case 2:return n=t.sent,t.abrupt("return",y().decode(n.data.signature));case 4:case"end":return t.stop()}}),t)}))),function(e){return i.apply(this,arguments)}),signAndSendTransaction:(n=(0,c.Z)(f().mark((function r(n){var i,o,a,s,c,u,l,d,h;return f().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=t()){r.next=3;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 3:if(o=n.params.message){r.next=6;break}throw b.Sy.rpc.invalidRequest({message:"Invalid transaction message"});case 6:return r.next=8,e.signTransaction(y().encode(o.serializeMessage()));case 8:if(a=r.sent,(s=a.data).publicKey&&s.signature){r.next=12;break}throw new Error("Invalid signature from slope wallet");case 12:return c=new v.nh(s.publicKey),u=y().decode(s.signature),o.addSignature(c,_.from(u)),r.next=17,i.request({method:"solana_provider_config",params:[]});case 17:return l=r.sent,d=new v.ew(l.rpcTarget),r.next=21,d.sendRawTransaction(o.serialize());case 21:return h=r.sent,r.abrupt("return",{signature:h});case 23:case"end":return r.stop()}}),r)}))),function(e){return n.apply(this,arguments)}),signAllTransactions:(r=(0,c.Z)(f().mark((function t(r){var n,i,o,a,s,c,u,l,d,h,p,g;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(n=r.params)&&void 0!==n&&n.message&&null!==(i=r.params)&&void 0!==i&&i.message.length){t.next=2;break}throw b.Sy.rpc.invalidParams("message");case 2:for(a=r.params.message,s=a.length,c=[],u=0;u<s;u++)c.push(y().encode(r.params.message[u].serializeMessage()));return t.next=8,e.signAllTransactions(c);case 8:if(l=t.sent,d=l.msg,(h=l.data).publicKey&&(null===(o=h.signatures)||void 0===o?void 0:o.length)===s){t.next=13;break}throw new Error(d);case 13:for(p=new v.nh(h.publicKey),u=0;u<s;u++)g=y().decode(h.signatures[u]),a[u].addSignature(p,_.from(g));return t.abrupt("return",a);case 16:case"end":return t.stop()}}),t)}))),function(e){return r.apply(this,arguments)})};return d}(e,this.getProviderEngineProxy.bind(this))}}]),l}(T);var D=function(e){(0,o.Z)(l,e);var t,r,u=(t=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,s.Z)(t);if(r){var i=(0,s.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,a.Z)(this,e)});function l(){return(0,n.Z)(this,l),u.apply(this,arguments)}return(0,i.Z)(l,[{key:"getProviderHandlers",value:function(e){return function(e,t){var r=M(e);return r.signAndSendTransaction=function(){var r=(0,c.Z)(f().mark((function r(n){var i,o,a,s,c;return f().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=t()){r.next=3;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 3:return r.next=5,e.signTransaction(n.params.message);case 5:return o=r.sent,r.next=8,i.request({method:"solana_provider_config",params:[]});case 8:return a=r.sent,s=new v.ew(a.rpcTarget),r.next=12,s.sendRawTransaction(o.serialize());case 12:return c=r.sent,r.abrupt("return",{signature:c});case 14:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),r}(e,this.getProviderEngineProxy.bind(this))}}]),l}(T);var F=function(e){(0,o.Z)(l,e);var t,r,u=(t=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,s.Z)(t);if(r){var i=(0,s.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,a.Z)(this,e)});function l(){return(0,n.Z)(this,l),u.apply(this,arguments)}return(0,i.Z)(l,[{key:"getProviderHandlers",value:function(e){return function(e,t){var r=M(e);return r.signMessage=function(){var t=(0,c.Z)(f().mark((function t(r){var n,i;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.sign(r.params.message,"utf8");case 2:return n=t.sent,i=n.signature,t.abrupt("return",i);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),r.signAndSendTransaction=function(){var r=(0,c.Z)(f().mark((function r(n){var i,o,a,s,c;return f().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=t()){r.next=3;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 3:return r.next=5,e.signTransaction(n.params.message);case 5:return o=r.sent,r.next=8,i.request({method:"solana_provider_config",params:[]});case 8:return a=r.sent,s=new v.ew(a.rpcTarget),r.next=12,s.sendRawTransaction(o.serialize());case 12:return c=r.sent,r.abrupt("return",{signature:c});case 14:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),r}(e,this.getProviderEngineProxy.bind(this))}}]),l}(T),z=function(e){var t,r,n,i,o,a,s,u,l={requestAccounts:(u=(0,c.Z)(f().mark((function t(){var r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.request({method:"solana_requestAccounts",params:{}});case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)}),getAccounts:(s=(0,c.Z)(f().mark((function t(){var r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.request({method:"solana_requestAccounts",params:{}});case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)}))),function(){return s.apply(this,arguments)}),getPrivateKey:(a=(0,c.Z)(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw b.Sy.rpc.methodNotSupported();case 1:case"end":return e.stop()}}),e)}))),function(){return a.apply(this,arguments)}),getSecretKey:(o=(0,c.Z)(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw b.Sy.rpc.methodNotSupported();case 1:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)}),signMessage:(i=(0,c.Z)(f().mark((function t(r){var n,i;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(n=r.params)&&void 0!==n&&n.message){t.next=2;break}throw b.Sy.rpc.invalidParams("message");case 2:return t.next=4,e.signMessage(r.params.message);case 4:return i=t.sent,t.abrupt("return",i);case 6:case"end":return t.stop()}}),t)}))),function(e){return i.apply(this,arguments)}),signTransaction:(n=(0,c.Z)(f().mark((function t(r){var n,i,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(n=r.params)&&void 0!==n&&n.message){t.next=2;break}throw b.Sy.rpc.invalidParams("message");case 2:return i=r.params.message,t.next=5,e.signTransaction(i);case 5:return o=t.sent,t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)}),signAndSendTransaction:(r=(0,c.Z)(f().mark((function t(r){var n,i,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(n=r.params)&&void 0!==n&&n.message){t.next=2;break}throw b.Sy.rpc.invalidParams("message");case 2:return i=r.params.message,t.next=5,e.sendTransaction(i);case 5:return o=t.sent,t.abrupt("return",{signature:o});case 7:case"end":return t.stop()}}),t)}))),function(e){return r.apply(this,arguments)}),signAllTransactions:(t=(0,c.Z)(f().mark((function t(r){var n,i,o,a;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(n=r.params)&&void 0!==n&&n.message&&null!==(i=r.params)&&void 0!==i&&i.message.length){t.next=2;break}throw b.Sy.rpc.invalidParams("message");case 2:return o=r.params.message,t.next=5,e.signAllTransactions(o);case 5:return a=t.sent,t.abrupt("return",a);case 7:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})};return l};function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var q=function(e){(0,o.Z)(w,e);var t,r,u,l,g,m,y,v=(m=w,y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,s.Z)(m);if(y){var r=(0,s.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,a.Z)(this,e)});function w(e){var t=e.config,r=e.state;return(0,n.Z)(this,w),v.call(this,{config:{chainConfig:H(H({},t.chainConfig),{},{chainNamespace:p.EN.SOLANA})},state:r})}return(0,i.Z)(w,[{key:"switchChain",value:(g=(0,c.Z)(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve());case 1:case"end":return e.stop()}}),e)}))),function(e){return g.apply(this,arguments)})},{key:"setupProvider",value:(l=(0,c.Z)(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.handleInjectedProviderUpdate(t),e.next=3,this.setupEngine(t);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"lookupNetwork",value:(u=(0,c.Z)(f().mark((function e(){var t,r,n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.provider){e.next=2;break}throw b.Sy.provider.custom({message:"Torus solana provider is not initialized",code:4902});case 2:return t=this.config.chainConfig.chainId,e.next=5,this.provider.request({method:"solana_chainId"});case 5:if(r=e.sent,n=(0,p.H2)(r.toString())?r:"0x".concat(parseInt(r,10).toString(16)),t===n){e.next=9;break}throw p.Ty.rpcConnectionError("Invalid network, net_version is: ".concat(n,", expected: ").concat(t));case 9:return this.update({chainId:n}),this.provider.emit("connect",{chainId:this.state.chainId}),this.provider.emit("chainChanged",this.state.chainId),e.abrupt("return",this.state.chainId);case 13:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"setupEngine",value:(r=(0,c.Z)(f().mark((function e(t){var r,n,i,o,a;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=z(t),n=O(r),i=j(t),(o=new h.eI).push(n),o.push(i),a=(0,d.Xj)(o),this.updateProviderEngineProxy(a),e.next=10,this.lookupNetwork();case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"handleInjectedProviderUpdate",value:(t=(0,c.Z)(f().mark((function e(t){var r=this;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.on("accountsChanged",function(){var e=(0,c.Z)(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.provider.emit("accountsChanged",t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t.on("chainChanged",function(){var e=(0,c.Z)(f().mark((function e(n){var i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(0,p.H2)(n)?n:"0x".concat(parseInt(n,10).toString(16)),r.configure({chainConfig:H(H({},r.config.chainConfig),{},{chainId:i})}),e.next=4,r.setupProvider(t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),w}(g.Zk);function W(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return K(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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 o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function V(e){return G.apply(this,arguments)}function G(){return G=(0,c.Z)(f().mark((function e(t){var r,n,i,o,a;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.privKey,n=t.getProviderEngineProxy,i=function(){return v.RG.fromSecretKey(_.from(r,"hex"))},"string"==typeof r){e.next=4;break}throw p.Ty.invalidParams("privKey must be a string");case 4:return o=i(),a={requestAccounts:function(){var e=(0,c.Z)(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",[o.publicKey.toBase58()]);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),getAccounts:function(){var e=(0,c.Z)(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",[o.publicKey.toBase58()]);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),getPrivateKey:function(){var e=(0,c.Z)(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),getSecretKey:function(){var e=(0,c.Z)(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",y().encode(o.secretKey));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),signTransaction:function(){var e=(0,c.Z)(f().mark((function e(t){var r,n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(r=t.params)&&void 0!==r&&r.message){e.next=2;break}throw b.Sy.rpc.invalidParams("message");case 2:return(n=t.params.message).partialSign(o),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),signMessage:function(){var e=(0,c.Z)(f().mark((function e(t){var r,n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(r=t.params)&&void 0!==r&&r.message){e.next=2;break}throw b.Sy.rpc.invalidParams("message");case 2:return n=A().sign.detached(t.params.message,o.secretKey),e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),signAndSendTransaction:function(){var e=(0,c.Z)(f().mark((function e(t){var r,i,a,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(r=t.params)&&void 0!==r&&r.message){e.next=2;break}throw b.Sy.rpc.invalidParams("message");case 2:if(i=n()){e.next=5;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 5:return(a=t.params.message).sign(o),e.next=9,i.request({method:"sendTransaction",params:[y().encode(a.serialize())]});case 9:return s=e.sent,e.abrupt("return",{signature:s});case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),signAllTransactions:function(){var e=(0,c.Z)(f().mark((function e(t){var r,n,i,a,s,c;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(r=t.params)&&void 0!==r&&r.message&&null!==(n=t.params)&&void 0!==n&&n.message.length){e.next=2;break}throw b.Sy.rpc.invalidParams("message");case 2:a=null===(i=t.params)||void 0===i?void 0:i.message,s=W(a||[]);try{for(s.s();!(c=s.n()).done;)c.value.partialSign(o)}catch(e){s.e(e)}finally{s.f()}return e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)}))),G.apply(this,arguments)}function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Y=function(e){(0,o.Z)(w,e);var t,r,u,l,g,m,y,v=(m=w,y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,s.Z)(m);if(y){var r=(0,s.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,a.Z)(this,e)});function w(e){var t=e.config,r=e.state;return(0,n.Z)(this,w),v.call(this,{config:{chainConfig:J(J({},t.chainConfig),{},{chainNamespace:p.EN.SOLANA})},state:r})}return(0,i.Z)(w,[{key:"enable",value:(g=(0,c.Z)(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.state.privateKey){e.next=2;break}throw b.Sy.provider.custom({message:"Private key is not found in state, plz pass it in constructor state param",code:4902});case 2:return e.next=4,this.setupProvider(this.state.privateKey);case 4:return e.abrupt("return",this._providerEngineProxy.request({method:"eth_accounts"}));case 5:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"setupProvider",value:(l=(0,c.Z)(f().mark((function e(t){var r,n,i,o,a,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,V({privKey:t,getProviderEngineProxy:this.getProviderEngineProxy.bind(this)});case 2:return r=e.sent,n=O(r),i=new h.eI,void 0,void 0,u=(c=this.config.chainConfig).rpcTarget,l=(0,d.v$)({rpcTarget:u}),o={networkMiddleware:(0,h.UZ)([k(c),l]),fetchMiddleware:l},a=o.networkMiddleware,i.push(this.getChainSwitchMiddleware()),i.push(this.getAccountMiddleware()),i.push(n),i.push(a),s=(0,d.Xj)(i),this.updateProviderEngineProxy(s),e.next=14,this.lookupNetwork();case 14:case"end":return e.stop()}var c,u,l}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"updateAccount",value:(u=(0,c.Z)(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._providerEngineProxy){e.next=2;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 2:return e.next=4,this._providerEngineProxy.request({method:"solanaPrivateKey"});case 4:if(e.sent===t.privateKey){e.next=14;break}return e.next=8,this.setupProvider(t.privateKey);case 8:return e.t0=this._providerEngineProxy,e.next=11,this._providerEngineProxy.request({method:"requestAccounts"});case 11:e.t1=e.sent,e.t2={accounts:e.t1},e.t0.emit.call(e.t0,"accountsChanged",e.t2);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"switchChain",value:(r=(0,c.Z)(f().mark((function e(t){var r,n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._providerEngineProxy){e.next=2;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 2:return r=this.getChainConfig(t.chainId),this.update({chainId:"loading"}),this.configure({chainConfig:r}),e.next=7,this._providerEngineProxy.request({method:"solanaPrivateKey"});case 7:return n=e.sent,e.next=10,this.setupProvider(n);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"lookupNetwork",value:(t=(0,c.Z)(f().mark((function e(){var t,r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._providerEngineProxy){e.next=2;break}throw b.Sy.provider.custom({message:"Provider is not initialized",code:4902});case 2:return e.next=4,this._providerEngineProxy.request({method:"getHealth",params:[]});case 4:if(t=e.sent,r=this.config.chainConfig,"ok"===t){e.next=8;break}throw p.Ty.rpcConnectionError("Failed to lookup network for following rpc target: ".concat(r.rpcTarget));case 8:return this.update({chainId:r.chainId}),this.state.chainId!==r.chainId&&(this.provider.emit("chainChanged",this.state.chainId),this.provider.emit("connect",{chainId:this.state.chainId})),e.abrupt("return",this.state.chainId);case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getChainSwitchMiddleware",value:function(){var e,t,r,n,i,o=this,a={addNewChainConfig:(t=(0,c.Z)(f().mark((function e(t){var r,n,i,a,s,c;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.params){e.next=2;break}throw b.Sy.rpc.invalidParams("Missing request params");case 2:if(r=t.params,n=r.chainId,i=r.chainName,a=r.rpcUrls,s=r.blockExplorerUrls,c=r.nativeCurrency,n){e.next=5;break}throw b.Sy.rpc.invalidParams("Missing chainId in chainParams");case 5:if(a&&0!==a.length){e.next=7;break}throw b.Sy.rpc.invalidParams("Missing rpcUrls in chainParams");case 7:if(c){e.next=9;break}throw b.Sy.rpc.invalidParams("Missing nativeCurrency in chainParams");case 9:o.addChain({chainNamespace:p.EN.SOLANA,chainId:n,ticker:(null==c?void 0:c.symbol)||"SOL",tickerName:(null==c?void 0:c.name)||"Solana",displayName:i,rpcTarget:a[0],blockExplorer:(null==s?void 0:s[0])||""});case 10:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)}),switchSolanaChain:(e=(0,c.Z)(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.params){e.next=2;break}throw b.Sy.rpc.invalidParams("Missing request params");case 2:if(t.params.chainId){e.next=4;break}throw b.Sy.rpc.invalidParams("Missing chainId");case 4:return e.next=6,o.switchChain(t.params);case 6:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};return n=(r=a).addNewChainConfig,i=r.switchSolanaChain,(0,h.UZ)([P("addSolanaChain",n),P("switchSolanaChain",i)])}},{key:"getAccountMiddleware",value:function(){var e,t,r=this,n={updatePrivatekey:(e=(0,c.Z)(f().mark((function e(t){var n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.params){e.next=2;break}throw b.Sy.rpc.invalidParams("Missing request params");case 2:if(t.params.privateKey){e.next=4;break}throw b.Sy.rpc.invalidParams("Missing privateKey");case 4:return n=t.params.privateKey,e.next=7,r.updateAccount({privateKey:n});case 7:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};return t=n.updatePrivatekey,(0,h.UZ)([P("updateAccount",t)])}}]),w}(g.Zk);(0,u.Z)(Y,"getProviderInstance",function(){var e=(0,c.Z)(f().mark((function e(t){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new Y({config:{chainConfig:t.chainConfig}}),e.next=3,r.setupProvider(t.privKey);case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var X=function(){function e(t){(0,n.Z)(this,e),(0,u.Z)(this,"provider",void 0),this.provider=t}var t,r,o,a,s,l;return(0,i.Z)(e,[{key:"requestAccounts",value:(l=(0,c.Z)(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.request({method:"requestAccounts",params:{}});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"signAndSendTransaction",value:(s=(0,c.Z)(f().mark((function e(t){var r,n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.request({method:"signAndSendTransaction",params:{message:t}});case 2:return r=e.sent,n=r.signature,e.abrupt("return",{signature:n});case 5:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"signTransaction",value:(a=(0,c.Z)(f().mark((function e(t){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.request({method:"signTransaction",params:{message:t}});case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"signAllTransactions",value:(o=(0,c.Z)(f().mark((function e(t){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.request({method:"signAllTransactions",params:{message:t}});case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"signMessage",value:(r=(0,c.Z)(f().mark((function e(t){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.request({method:"signMessage",params:{message:t}});case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"request",value:(t=(0,c.Z)(f().mark((function e(t){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.request(t);case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}()},18166:(e,t,r)=>{"use strict";var n=r(77834).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),a=o.charCodeAt(0);if(255!==t[a])throw new TypeError(o+" is ambiguous");t[a]=i}var s=e.length,c=e.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function f(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return n.alloc(0);for(var r=0,i=0,o=0;e[r]===c;)i++,r++;for(var a=(e.length-r)*u+1>>>0,l=new Uint8Array(a);e[r];){var f=t[e.charCodeAt(r)];if(255===f)return;for(var d=0,h=a-1;(0!==f||d<o)&&-1!==h;h--,d++)f+=s*l[h]>>>0,l[h]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");o=d,r++}for(var p=a-o;p!==a&&0===l[p];)p++;var g=n.allocUnsafe(i+(a-p));g.fill(0,0,i);for(var m=i;p!==a;)g[m++]=l[p++];return g}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,a=t.length;o!==a&&0===t[o];)o++,r++;for(var u=(a-o)*l+1>>>0,f=new Uint8Array(u);o!==a;){for(var d=t[o],h=0,p=u-1;(0!==d||h<i)&&-1!==p;p--,h++)d+=256*f[p]>>>0,f[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");i=h,o++}for(var g=u-i;g!==u&&0===f[g];)g++;for(var m=c.repeat(r);g<u;++g)m+=e.charAt(f[g]);return m},decodeUnsafe:f,decode:function(e){var t=f(e);if(t)return t;throw new Error("Non-base"+s+" character")}}}},95766:(e,t)=>{"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=c(e),a=o[0],s=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),l=0,f=s>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;s<c;s+=a)o.push(u(e,s,s+a>c?c:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},32573:(e,t,r)=>{"use strict";var n=r(48834).Buffer,i=r(71329);function o(e,t){return void 0===t&&(t="utf8"),n.isBuffer(e)?s(e.toString("base64")):s(n.from(e,t).toString("base64"))}function a(e){return e=e.toString(),i.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function s(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var c=o;c.encode=o,c.decode=function(e,t){return void 0===t&&(t="utf8"),n.from(a(e),"base64").toString(t)},c.toBase64=a,c.fromBase64=s,c.toBuffer=function(e){return n.from(a(e),"base64")},t.default=c},71329:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.length,r=t%4;if(!r)return e;var i=t,o=4-r,a=t+o,s=n.alloc(a);for(s.write(e);o--;)s.write("=",i++);return s.toString()}},89487:(e,t,r)=>{e.exports=r(32573).default,e.exports.default=e.exports},41528:(e,t,r)=>{"use strict";var n=r(48834).Buffer;t.oU=function(e){{const t=n.from(e);t.reverse();const r=t.toString("hex");return 0===r.length?BigInt(0):BigInt(`0x${r}`)}},t.k$=function(e,t){{const r=e.toString(16),i=n.from(r.padStart(2*t,"0").slice(0,2*t),"hex");return i.reverse(),i}}},62197:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(33196).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),c=t;c<s;c++){var u=e.charCodeAt(c)-48;o*=i,a=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&a<i,"Invalid character"),o+=a}return o}function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=c(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=c(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,l=r;l<s;l+=n)c=u(e,l,l+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var f=1;for(c=u(e,l,e.length,t),l=0;l<a;l++)f*=t;this.imuln(f),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){l(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[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 g(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var u=1;u<n;u++){for(var l=c>>>26,f=67108863&c,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[u]=0|f,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],c=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?d[6-c.length]+c+r:c+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],l=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(e);r=(f=f.idivn(l)).isZero()?g+r:d[u-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r++]=255&a,r<e.length&&(e[r++]=a>>8&255),r<e.length&&(e[r++]=a>>16&255),6===o?(r<e.length&&(e[r++]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r--]=255&a,r>=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,o,a=e.words,s=t.words,c=r.words,u=0,l=0|a[0],f=8191&l,d=l>>>13,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],y=8191&m,b=m>>>13,v=0|a[3],w=8191&v,A=v>>>13,_=0|a[4],E=8191&_,x=_>>>13,k=0|a[5],S=8191&k,C=k>>>13,P=0|a[6],O=8191&P,I=P>>>13,B=0|a[7],T=8191&B,M=B>>>13,R=0|a[8],N=8191&R,j=R>>>13,L=0|a[9],U=8191&L,D=L>>>13,F=0|s[0],z=8191&F,Z=F>>>13,H=0|s[1],q=8191&H,W=H>>>13,K=0|s[2],V=8191&K,G=K>>>13,$=0|s[3],J=8191&$,Y=$>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,Z))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,Z))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,Z))+Math.imul(g,z)|0,o=Math.imul(g,Z);var ye=(u+(n=n+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,q)|0))<<13)|0;u=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,Z))+Math.imul(b,z)|0,o=Math.imul(b,Z),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,W)|0;var be=(u+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,Z))+Math.imul(A,z)|0,o=Math.imul(A,Z),n=n+Math.imul(y,q)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,G)|0;var ve=(u+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,J)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,Z))+Math.imul(x,z)|0,o=Math.imul(x,Z),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,Y)|0;var we=(u+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,z),i=(i=Math.imul(S,Z))+Math.imul(C,z)|0,o=Math.imul(C,Z),n=n+Math.imul(E,q)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(x,q)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0;var Ae=(u+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;u=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,Z))+Math.imul(I,z)|0,o=Math.imul(I,Z),n=n+Math.imul(S,q)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(u+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,Z))+Math.imul(M,z)|0,o=Math.imul(M,Z),n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(u+(n=n+Math.imul(f,ce)|0)|0)+((8191&(i=(i=i+Math.imul(f,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,z),i=(i=Math.imul(N,Z))+Math.imul(j,z)|0,o=Math.imul(j,Z),n=n+Math.imul(T,q)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,W)|0,n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0;var xe=(u+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,Z))+Math.imul(D,z)|0,o=Math.imul(D,Z),n=n+Math.imul(N,q)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,G)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(b,ce)|0,o=o+Math.imul(b,ue)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,de)|0;var ke=(u+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,q),i=(i=Math.imul(U,W))+Math.imul(D,q)|0,o=Math.imul(D,W),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,G)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(y,fe)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var Se=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;u=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,G))+Math.imul(D,V)|0,o=Math.imul(D,G),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,ue)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Ce=(u+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(b,pe)|0))<<13)|0;u=((o=o+Math.imul(b,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,J),i=(i=Math.imul(U,Y))+Math.imul(D,J)|0,o=Math.imul(D,Y),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,ue)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(x,fe)|0,o=o+Math.imul(x,de)|0;var Pe=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,ee))+Math.imul(D,Q)|0,o=Math.imul(D,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,ue)|0)+Math.imul(I,ce)|0,o=o+Math.imul(I,ue)|0,n=n+Math.imul(S,fe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Oe=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,n=n+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(M,ce)|0,o=o+Math.imul(M,ue)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,de)|0;var Ie=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ge)|0)+Math.imul(C,pe)|0))<<13)|0;u=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,ae))+Math.imul(D,oe)|0,o=Math.imul(D,ae),n=n+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(j,ce)|0,o=o+Math.imul(j,ue)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(M,fe)|0,o=o+Math.imul(M,de)|0;var Be=(u+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,ge)|0)+Math.imul(I,pe)|0))<<13)|0;u=((o=o+Math.imul(I,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(D,ce)|0,o=Math.imul(D,ue),n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,de)|0;var Te=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(M,pe)|0))<<13)|0;u=((o=o+Math.imul(M,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,fe),i=(i=Math.imul(U,de))+Math.imul(D,fe)|0,o=Math.imul(D,de);var Me=(u+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,ge)|0)+Math.imul(j,pe)|0))<<13)|0;u=((o=o+Math.imul(j,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863;var Re=(u+(n=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul(D,pe)|0))<<13)|0;return u=((o=Math.imul(D,ge))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,c[0]=me,c[1]=ye,c[2]=be,c[3]=ve,c[4]=we,c[5]=Ae,c[6]=_e,c[7]=Ee,c[8]=xe,c[9]=ke,c[10]=Se,c[11]=Ce,c[12]=Pe,c[13]=Oe,c[14]=Ie,c[15]=Be,c[16]=Te,c[17]=Me,c[18]=Re,0!==u&&(c[19]=u,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,c=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=c;u++){var l=o-u,f=(0|e.words[l])*(0|t.words[u]),d=67108863&f;s=67108863&(d=d+s|0),i+=(a=(a=a+(f/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(e,t,r){return y(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(m=g),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?g(this,e,t):r<1024?y(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,c=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),l=0;l<i;l+=s)for(var f=c,d=u,h=0;h<a;h++){var p=r[l+h],g=n[l+h],m=r[l+h+a],y=n[l+h+a],b=f*m-d*y;y=f*y+d*m,m=b,r[l+h]=p+m,n[l+h]=g+y,r[l+h+a]=p-m,n[l+h+a]=g-y,h!==s&&(b=c*f-u*d,d=c*d+u*f,f=b)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),c=new Array(n),u=new Array(n),l=new Array(n),f=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,u,n),this.transform(a,o,s,c,n,i),this.transform(u,o,l,f,n,i);for(var h=0;h<n;h++){var p=s[h]*l[h]-c[h]*f[h];c[h]=s[h]*f[h]+c[h]*l[h],s[h]=p}return this.conjugate(s,c,n),this.transform(s,c,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),b(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,c=(0|this.words[t])-s<<r;this.words[t]=c|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,c=r;if(i-=a,i=Math.max(0,i),c){for(var u=0;u<a;u++)c.words[u]=this.words[u];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var f=0|this.words[u];this.words[u]=l<<26-o|f>>>o,l=f&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var c=(0|e.words[i])*t;s=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=n.clone()._ishlnsubmul(i,1,c);0===l.negative&&(n=l,s&&(s.words[c]=1));for(var f=c-1;f>=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0==(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(f)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;0==(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(_,A),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,A),i(x,A),i(k,A),k.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return w[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var g=h,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m<p);var y=this.pow(f,new o(1).iushln(p-m-1));d=d.redMul(y),f=y.redSqr(),h=h.redMul(f),p=m}return d},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),n=t.length-1;n>=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var f=u>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4==++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new C(e)},i(C,S),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},83871:function(e,t,r){"use strict";var n=r(48834).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeUnchecked=t.deserialize=t.serialize=t.BinaryReader=t.BinaryWriter=t.BorshError=t.baseDecode=t.baseEncode=void 0;const u=c(r(62197)),l=c(r(5728)),f=s(r(18404)),d=new("function"!=typeof TextDecoder?f.TextDecoder:TextDecoder)("utf-8",{fatal:!0});t.baseEncode=function(e){return"string"==typeof e&&(e=n.from(e,"utf8")),l.default.encode(n.from(e))},t.baseDecode=function(e){return n.from(l.default.decode(e))};const h=1024;class p extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}t.BorshError=p;class g{constructor(){this.buf=n.alloc(h),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=n.concat([this.buf,n.alloc(h)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(n.from(new u.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(n.from(new u.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(n.from(new u.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(n.from(new u.default(e).toArray("le",64)))}writeBuffer(e){this.buf=n.concat([n.from(this.buf.subarray(0,this.length)),e,n.alloc(h)]),this.length+=e.length}writeString(e){this.maybeResize();const t=n.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(n.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(const r of e)this.maybeResize(),t(r)}toArray(){return this.buf.subarray(0,this.length)}}function m(e,t,r){const n=r.value;r.value=function(...e){try{return n.apply(this,e)}catch(e){if(e instanceof RangeError){const t=e.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(t)>=0)throw new p("Reached the end of buffer when deserializing")}throw e}}}t.BinaryWriter=g;class y{constructor(e){this.buf=e,this.offset=0}readU8(){const e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){const e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){const e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){const e=this.readBuffer(8);return new u.default(e,"le")}readU128(){const e=this.readBuffer(16);return new u.default(e,"le")}readU256(){const e=this.readBuffer(32);return new u.default(e,"le")}readU512(){const e=this.readBuffer(64);return new u.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new p(`Expected buffer length ${e} isn't within bounds`);const t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){const e=this.readU32(),t=this.readBuffer(e);try{return d.decode(t)}catch(e){throw new p(`Error decoding UTF-8 string: ${e}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const t=this.readU32(),r=Array();for(let n=0;n<t;++n)r.push(e());return r}}function b(e){return e.charAt(0).toUpperCase()+e.slice(1)}function v(e,t,r,n,i){try{if("string"==typeof n)i[`write${b(n)}`](r);else if(n instanceof Array)if("number"==typeof n[0]){if(r.length!==n[0])throw new p(`Expecting byte array of length ${n[0]}, but got ${r.length} bytes`);i.writeFixedArray(r)}else if(2===n.length&&"number"==typeof n[1]){if(r.length!==n[1])throw new p(`Expecting byte array of length ${n[1]}, but got ${r.length} bytes`);for(let t=0;t<n[1];t++)v(e,null,r[t],n[0],i)}else i.writeArray(r,(r=>{v(e,t,r,n[0],i)}));else if(void 0!==n.kind)switch(n.kind){case"option":null==r?i.writeU8(0):(i.writeU8(1),v(e,t,r,n.type,i));break;case"map":i.writeU32(r.size),r.forEach(((r,o)=>{v(e,t,o,n.key,i),v(e,t,r,n.value,i)}));break;default:throw new p(`FieldType ${n} unrecognized`)}else w(e,r,i)}catch(e){throw e instanceof p&&e.addToFieldPath(t),e}}function w(e,t,r){if("function"==typeof t.borshSerialize)return void t.borshSerialize(r);const n=e.get(t.constructor);if(!n)throw new p(`Class ${t.constructor.name} is missing in schema`);if("struct"===n.kind)n.fields.map((([n,i])=>{v(e,n,t[n],i,r)}));else{if("enum"!==n.kind)throw new p(`Unexpected schema kind: ${n.kind} for ${t.constructor.name}`);{const i=t[n.field];for(let o=0;o<n.values.length;++o){const[a,s]=n.values[o];if(a===i){r.writeU8(o),v(e,a,t[a],s,r);break}}}}}function A(e,t,r,n){try{if("string"==typeof r)return n[`read${b(r)}`]();if(r instanceof Array){if("number"==typeof r[0])return n.readFixedArray(r[0]);if("number"==typeof r[1]){const t=[];for(let i=0;i<r[1];i++)t.push(A(e,null,r[0],n));return t}return n.readArray((()=>A(e,t,r[0],n)))}if("option"===r.kind)return n.readU8()?A(e,t,r.type,n):void 0;if("map"===r.kind){let i=new Map;const o=n.readU32();for(let a=0;a<o;a++){const o=A(e,t,r.key,n),a=A(e,t,r.value,n);i.set(o,a)}return i}return _(e,r,n)}catch(e){throw e instanceof p&&e.addToFieldPath(t),e}}function _(e,t,r){if("function"==typeof t.borshDeserialize)return t.borshDeserialize(r);const n=e.get(t);if(!n)throw new p(`Class ${t.name} is missing in schema`);if("struct"===n.kind){const n={};for(const[i,o]of e.get(t).fields)n[i]=A(e,i,o,r);return new t(n)}if("enum"===n.kind){const i=r.readU8();if(i>=n.values.length)throw new p(`Enum index: ${i} is out of range`);const[o,a]=n.values[i];return new t({[o]:A(e,o,a,r)})}throw new p(`Unexpected schema kind: ${n.kind} for ${t.constructor.name}`)}a([m],y.prototype,"readU8",null),a([m],y.prototype,"readU16",null),a([m],y.prototype,"readU32",null),a([m],y.prototype,"readU64",null),a([m],y.prototype,"readU128",null),a([m],y.prototype,"readU256",null),a([m],y.prototype,"readU512",null),a([m],y.prototype,"readString",null),a([m],y.prototype,"readFixedArray",null),a([m],y.prototype,"readArray",null),t.BinaryReader=y,t.serialize=function(e,t,r=g){const n=new r;return w(e,t,n),n.toArray()},t.deserialize=function(e,t,r,n=y){const i=new n(r),o=_(e,t,i);if(i.offset<r.length)throw new p(`Unexpected ${r.length-i.offset} bytes after deserialized data`);return o},t.deserializeUnchecked=function(e,t,r,n=y){return _(e,t,new n(r))}},5728:(e,t,r)=>{var n=r(18166);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},77160:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){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(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[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(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(r),a=Math.max(i,o),s=0,c=e.map([t,r],(function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===s)return 0;a-=1}else if(c[0][a]<c[1][a])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var s=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=o.length;t<r;t+=1)s();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},o=r(18);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){}var t,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&a(t.prototype,null),r&&a(t,r),e}();t.default=s,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=c(r(92)),i=c(r(93)),o=c(r(94)),a=c(r(95)),s=c(r(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,i={},o=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(i[t]=a,o+=1):"object"==typeof a&&(r[t]=a,n+=1)})),n>0){var a=Object.keys(r),c=s.default.find(a,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(r[c]);if(void 0!==u)return u}var l=s.default.find(a,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(r[l]);if(void 0!==f)return f}}if(o>0){var d=Object.keys(i),h=s.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(s.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(t),n={name:o.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:o.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=a,e.exports=t.default}})},82745:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(38087);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},52970:(e,t,r)=>{var n=r(77834).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function o(e){for(;0<e.length;e++)e[0]=0}function a(e,t,r,n,i){for(var o,a,s,c,u=r[0],l=r[1],f=r[2],d=r[3],h=e[0]^t[0],p=e[1]^t[1],g=e[2]^t[2],m=e[3]^t[3],y=4,b=1;b<i;b++)o=u[h>>>24]^l[p>>>16&255]^f[g>>>8&255]^d[255&m]^t[y++],a=u[p>>>24]^l[g>>>16&255]^f[m>>>8&255]^d[255&h]^t[y++],s=u[g>>>24]^l[m>>>16&255]^f[h>>>8&255]^d[255&p]^t[y++],c=u[m>>>24]^l[h>>>16&255]^f[p>>>8&255]^d[255&g]^t[y++],h=o,p=a,g=s,m=c;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[g>>>8&255]<<8|n[255&m])^t[y++],a=(n[p>>>24]<<24|n[g>>>16&255]<<16|n[m>>>8&255]<<8|n[255&h])^t[y++],s=(n[g>>>24]<<24|n[m>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[y++],c=(n[m>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&g])^t[y++],[o>>>=0,a>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,r[a]=u,n[u]=a;var l=e[a],f=e[l],d=e[f],h=257*e[u]^16843008*u;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*d^65537*f^257*l^16843008*a,o[0][u]=h<<24|h>>>8,o[1][u]=h<<16|h>>>16,o[2][u]=h<<8|h>>>24,o[3][u]=h,0===a?a=s=1:(a=l^e[e[e[d^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<n;o++){var a=i[o-1];o%t==0?(a=a<<8|a>>>24,a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]),i[o]=i[o-t]^a}for(var u=[],l=0;l<n;l++){var f=n-l,d=i[f-(l%4?0:4)];u[l]=l<4||f<=4?d:c.INV_SUB_MIX[0][c.SBOX[d>>>24]]^c.INV_SUB_MIX[1][c.SBOX[d>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[d>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&d]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=u},3313:(e,t,r)=>{var n=r(52970),i=r(77834).Buffer,o=r(13973),a=r(91285),s=r(42895),c=r(31313),u=r(14182);function l(e,t,r,a){o.call(this);var c=i.alloc(4,0);this._cipher=new n.AES(t);var l=this._cipher.encryptBlock(c);this._ghash=new s(l),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),o=t.length,a=o%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var c=8*o,l=i.alloc(8);l.writeUIntBE(c,0,8),n.update(l),e._finID=n.state;var f=i.from(e._finID);return u(f),f}(this,r,l),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(l,o),l.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},l.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},l.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},l.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=l},10010:(e,t,r)=>{var n=r(89309),i=r(57612),o=r(49234);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},57612:(e,t,r)=>{var n=r(3313),i=r(77834).Buffer,o=r(68702),a=r(37041),s=r(13973),c=r(52970),u=r(59341);function l(e,t,r){s.call(this),this._cache=new f,this._last=void 0,this._cipher=new c.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function d(e,t,r){var s=o[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new a(s.module,t,r,!0):"auth"===s.type?new n(s.module,t,r,!0):new l(s.module,t,r)}r(91285)(l,s),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=i.concat([this.cache,e])},f.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(t,!1,r.key,r.iv);return d(e,n.key,n.iv)},t.createDecipheriv=d},89309:(e,t,r)=>{var n=r(68702),i=r(3313),o=r(77834).Buffer,a=r(37041),s=r(13973),c=r(52970),u=r(59341);function l(e,t,r){s.call(this),this._cache=new d,this._cipher=new c.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(91285)(l,s),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var f=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function h(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new l(s.module,t,r)}l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return o.concat([this.cache,t])},t.createCipheriv=h,t.createCipher=function(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=u(t,!1,r.key,r.iv);return h(e,i.key,i.iv)}},42895:(e,t,r)=>{var n=r(77834).Buffer,i=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},a.prototype._multiply=function(){for(var e,t,r,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},14182:e=>{e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},8796:(e,t,r)=>{var n=r(31313);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},76528:(e,t,r)=>{var n=r(77834).Buffer,i=r(31313);function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}t.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)]);break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},60918:(e,t,r)=>{var n=r(77834).Buffer;function i(e,t,r){for(var n,i,a=-1,s=0;++a<8;)n=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i<r;)o[i]=e[i]<<1|e[i+1]>>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],r);return a}},27263:(e,t,r)=>{var n=r(77834).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],r);return a}},48219:(e,t,r)=>{var n=r(31313),i=r(77834).Buffer,o=r(14182);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var s=0;s<r;s++){var c=a(e),u=o+16*s;e._cache.writeUInt32BE(c[0],u+0),e._cache.writeUInt32BE(c[1],u+4),e._cache.writeUInt32BE(c[2],u+8),e._cache.writeUInt32BE(c[3],u+12)}var l=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,l)}},57028:(e,t)=>{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},68702:(e,t,r)=>{var n={ECB:r(57028),CBC:r(8796),CFB:r(76528),CFB8:r(27263),CFB1:r(60918),OFB:r(34256),CTR:r(48219),GCM:r(48219)},i=r(49234);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},34256:(e,t,r)=>{var n=r(48834).Buffer,i=r(31313);function o(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=n.concat([e._cache,o(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,r)}},37041:(e,t,r)=>{var n=r(52970),i=r(77834).Buffer,o=r(13973);function a(e,t,r,a){o.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}r(91285)(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},93667:(e,t,r)=>{var n=r(37214),i=r(10010),o=r(68702),a=r(62820),s=r(59341);function c(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return c(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=c,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return u(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=u,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},37214:(e,t,r)=>{var n=r(13973),i=r(84387),o=r(91285),a=r(77834).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function c(e){n.call(this);var t,r=e.mode.toLowerCase(),i=s[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=a.concat([o,o.slice(0,8)]));var c=e.iv;a.isBuffer(c)||(c=a.from(c)),this._des=i.create({key:o,iv:c,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=c,o(c,n),c.prototype._update=function(e){return a.from(this._des.update(e))},c.prototype._final=function(){return a.from(this._des.final())}},62820:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},91857:(e,t,r)=>{var n=r(48834).Buffer,i=r(62197),o=r(95003);function a(e){var t,r=e.modulus.byteLength();do{t=new i(o(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,t){var r=function(e){var t=a(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),o=t.modulus.byteLength(),s=new i(e).mul(r.blinder).umod(t.modulus),c=s.toRed(i.mont(t.prime1)),u=s.toRed(i.mont(t.prime2)),l=t.coefficient,f=t.prime1,d=t.prime2,h=c.redPow(t.exponent1).fromRed(),p=u.redPow(t.exponent2).fromRed(),g=h.isub(p).imul(l).umod(f).imul(d);return p.iadd(g).imul(r.unblinder).umod(t.modulus).toArrayLike(n,"be",o)}s.getr=a,e.exports=s},24778:(e,t,r)=>{e.exports=r(40026)},95263:(e,t,r)=>{var n=r(66640).Buffer,i=r(16162),o=r(67525),a=r(91285),s=r(262),c=r(5643),u=r(40026);function l(e){o.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){o.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new l(e)}function h(e){return new f(e)}Object.keys(u).forEach((function(e){u[e].id=n.from(u[e].id,"hex"),u[e.toLowerCase()]=u[e]})),a(l,o.Writable),l.prototype._write=function(e,t,r){this._hash.update(e),r()},l.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},l.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=s(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},a(f,o.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},f.prototype.verify=function(e,t,r){"string"==typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return c(t,i,e,this._signType,this._tag)},e.exports={Sign:d,Verify:h,createSign:d,createVerify:h}},262:(e,t,r)=>{var n=r(66640).Buffer,i=r(50011),o=r(91857),a=r(87554).ec,s=r(62197),c=r(28016),u=r(39167);function l(e,t,r,o){if((e=n.from(e.toArray())).length<t.byteLength()){var a=n.alloc(t.byteLength()-e.length);e=n.concat([a,e])}var s=r.length,c=function(e,t){e=(e=f(e,t)).mod(t);var r=n.from(e.toArray());if(r.length<t.byteLength()){var i=n.alloc(t.byteLength()-r.length);r=n.concat([i,r])}return r}(r,t),u=n.alloc(s);u.fill(1);var l=n.alloc(s);return l=i(o,l).update(u).update(n.from([0])).update(e).update(c).digest(),u=i(o,l).update(u).digest(),{k:l=i(o,l).update(u).update(n.from([1])).update(e).update(c).digest(),v:u=i(o,l).update(u).digest()}}function f(e,t){var r=new s(e),n=(e.length<<3)-t.bitLength();return n>0&&r.ishrn(n),r}function d(e,t,r){var o,a;do{for(o=n.alloc(0);8*o.length<e.bitLength();)t.v=i(r,t.k).update(t.v).digest(),o=n.concat([o,t.v]);a=f(o,e),t.k=i(r,t.k).update(t.v).update(n.from([0])).digest(),t.v=i(r,t.k).update(t.v).digest()}while(-1!==a.cmp(e));return a}function h(e,t,r,n){return e.toRed(s.mont(r)).redPow(t).fromRed().mod(n)}e.exports=function(e,t,r,i,p){var g=c(t);if(g.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var r=u[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new a(r).keyFromPrivate(t.privateKey).sign(e);return n.from(i.toDER())}(e,g)}if("dsa"===g.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,r){for(var i,o=t.params.priv_key,a=t.params.p,c=t.params.q,u=t.params.g,p=new s(0),g=f(e,c).mod(c),m=!1,y=l(o,c,e,r);!1===m;)p=h(u,i=d(c,y,r),a,c),0===(m=i.invm(c).imul(g.add(o.mul(p))).mod(c)).cmpn(0)&&(m=!1,p=new s(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var r=[48,e.length+t.length+4,2,e.length];return r=r.concat(e,[2,t.length],t),n.from(r)}(p,m)}(e,g,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=n.concat([p,e]);for(var m=g.modulus.byteLength(),y=[0,1];e.length+y.length+1<m;)y.push(255);y.push(0);for(var b=-1;++b<e.length;)y.push(e[b]);return o(y,g)},e.exports.getKey=l,e.exports.makeKey=d},5643:(e,t,r)=>{var n=r(66640).Buffer,i=r(62197),o=r(87554).ec,a=r(28016),s=r(39167);function c(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,r,u,l){var f=a(r);if("ec"===f.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,f)}if("dsa"===f.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,s=r.data.g,u=r.data.pub_key,l=a.signature.decode(e,"der"),f=l.s,d=l.r;c(f,o),c(d,o);var h=i.mont(n),p=f.invm(o);return 0===s.toRed(h).redPow(new i(t).mul(p).mod(o)).fromRed().mul(u.toRed(h).redPow(d.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(d)}(e,t,f)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");t=n.concat([l,t]);for(var d=f.modulus.byteLength(),h=[1],p=0;t.length+h.length+2<d;)h.push(255),p++;h.push(0);for(var g=-1;++g<t.length;)h.push(t[g]);h=n.from(h);var m=i.mont(f.modulus);e=(e=new i(e).toRed(m)).redPow(new i(f.publicExponent)),e=n.from(e.fromRed().toArray());var y=p<8?1:0;for(d=Math.min(e.length,h.length),e.length!==h.length&&(y=1),g=-1;++g<d;)y|=e[g]^h[g];return 0===y}},66640:(e,t,r)=>{var n=r(48834),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},17022:(e,t,r)=>{const n=r(7773);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},7773:e=>{"use strict";e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var i=e.charAt(n),o=i.charCodeAt(0);if(255!==t[o])throw new TypeError(i+" is ambiguous");t[o]=n}var a=e.length,s=e.charAt(0),c=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function l(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;for(var r=0,n=0,i=0;e[r]===s;)n++,r++;for(var o=(e.length-r)*c+1>>>0,u=new Uint8Array(o);e[r];){var l=t[e.charCodeAt(r)];if(255===l)return;for(var f=0,d=o-1;(0!==l||f<i)&&-1!==d;d--,f++)l+=a*u[d]>>>0,u[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,r++}for(var h=o-i;h!==o&&0===u[h];)h++;for(var p=new Uint8Array(n+(o-h)),g=n;h!==o;)p[g++]=u[h++];return p}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var c=(o-i)*u+1>>>0,l=new Uint8Array(c);i!==o;){for(var f=t[i],d=0,h=c-1;(0!==f||d<n)&&-1!==h;h--,d++)f+=256*l[h]>>>0,l[h]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");n=d,i++}for(var p=c-n;p!==c&&0===l[p];)p++;for(var g=s.repeat(r);p<c;++p)g+=e.charAt(l[p]);return g},decodeUnsafe:l,decode:function(e){var t=l(e);if(t)return t;throw new Error("Non-base"+a+" character")}}}},31313:(e,t,r)=>{var n=r(48834).Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new n(r),o=0;o<r;++o)i[o]=e[o]^t[o];return i}},48834:(e,t,r)=>{"use strict";const n=r(95766),i=r(62333),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if($(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if($(e,ArrayBuffer)||e&&$(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&($(e,SharedArrayBuffer)||e&&$(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),s(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||$(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(i)return n?-1:K(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(u(e,o)===u(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+c>s&&(r=s-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(u(e,o+n)!==u(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function A(e,t,r,n){return G(K(t,e.length-r),e,r,n)}function _(e,t,r,n){return G(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return G(V(t),e,r,n)}function x(e,t,r,n){return G(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,c;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=C));return r}(n)}t.kMaxLength=a,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},c.allocUnsafe=function(e){return f(e)},c.allocUnsafeSlow=function(e){return f(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if($(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),$(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if($(t,Uint8Array))i+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):m.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if($(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),u=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==l[e]){o=u[e],a=l[e];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function P(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function O(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function I(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Y[e[n]];return i}function B(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function T(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i){Z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function N(e,t,r,n,i){Z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||T(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=c.isBuffer(e)?e:c.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const D={};function F(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function z(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Z(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||q(t,e.length-(r+1))}(n,i,o)}function H(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function K(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function V(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},62680:(e,t,r)=>{"use strict";var n=r(67286),i=r(89429),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},89429:(e,t,r)=>{"use strict";var n=r(4090),i=r(67286),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),c=i("%Object.getOwnPropertyDescriptor%",!0),u=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var t=s(n,a,arguments);if(c&&u){var r=c(t,"length");r.configurable&&u(t,"length",{value:1+l(0,e.length-(arguments.length-1))})}return t};var f=function(){return s(n,o,arguments)};u?u(e.exports,"apply",{value:f}):e.exports.apply=f},13973:(e,t,r)=>{var n=r(77834).Buffer,i=r(54851).Transform,o=r(30214).s;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(91285)(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},72779:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var a=i.apply(null,r);a&&e.push(a)}}else if("object"===o){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},7646:(e,t,r)=>{function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(48834).Buffer.isBuffer},97108:(e,t)=>{var r;r=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=new Array(256),r=0;256!=r;++r)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=r)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=function(e){var t=0,r=0,n=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=e[n];for(n=0;256!=n;++n)for(r=e[n],t=256+n;t<4096;t+=256)r=i[t]=r>>>8^e[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]="undefined"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(t),n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],c=r[5],u=r[6],l=r[7],f=r[8],d=r[9],h=r[10],p=r[11],g=r[12],m=r[13],y=r[14];e.table=t,e.bstr=function(e,r){for(var n=-1^r,i=0,o=e.length;i<o;)n=n>>>8^t[255&(n^e.charCodeAt(i++))];return~n},e.buf=function(e,r){for(var b=-1^r,v=e.length-15,w=0;w<v;)b=y[e[w++]^255&b]^m[e[w++]^b>>8&255]^g[e[w++]^b>>16&255]^p[e[w++]^b>>>24]^h[e[w++]]^d[e[w++]]^f[e[w++]]^l[e[w++]]^u[e[w++]]^c[e[w++]]^s[e[w++]]^a[e[w++]]^o[e[w++]]^i[e[w++]]^n[e[w++]]^t[e[w++]];for(v+=15;w<v;)b=b>>>8^t[255&(b^e[w++])];return~b},e.str=function(e,r){for(var n=-1^r,i=0,o=e.length,a=0,s=0;i<o;)(a=e.charCodeAt(i++))<128?n=n>>>8^t[255&(n^a)]:a<2048?n=(n=n>>>8^t[255&(n^(192|a>>6&31))])>>>8^t[255&(n^(128|63&a))]:a>=55296&&a<57344?(a=64+(1023&a),s=1023&e.charCodeAt(i++),n=(n=(n=(n=n>>>8^t[255&(n^(240|a>>8&7))])>>>8^t[255&(n^(128|a>>2&63))])>>>8^t[255&(n^(128|s>>6&15|(3&a)<<4))])>>>8^t[255&(n^(128|63&s))]):n=(n=(n=n>>>8^t[255&(n^(224|a>>12&15))])>>>8^t[255&(n^(128|a>>6&63))])>>>8^t[255&(n^(128|63&a))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?r(t):r({})},95363:(e,t,r)=>{var n=r(48834).Buffer,i=r(87554),o=r(62197);e.exports=function(e){return new s(e)};var a={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 s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function c(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new n(e);if(r&&i.length<r){var o=new n(r-i.length);o.fill(0),i=n.concat([o,i])}return t?i.toString(t):i}a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,s.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},s.prototype.computeSecret=function(e,t,r){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),c(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},s.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),c(r,e)},s.prototype.getPrivateKey=function(e){return c(this.keys.getPrivate(),e)},s.prototype.setPublicKey=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.keys._importPublic(e),this},s.prototype.setPrivateKey=function(e,t){t=t||"utf8",n.isBuffer(e)||(e=new n(e,t));var r=new o(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}},16162:(e,t,r)=>{"use strict";var n=r(91285),i=r(27993),o=r(51445),a=r(9065),s=r(13973);function c(e){s.call(this,"digest"),this._hash=e}n(c,s),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new c(a(e))}},22511:(e,t,r)=>{var n=r(27993);e.exports=function(e){return(new n).update(e).digest()}},50011:(e,t,r)=>{"use strict";var n=r(91285),i=r(6456),o=r(13973),a=r(77834).Buffer,s=r(22511),c=r(51445),u=r(9065),l=a.alloc(128);function f(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new c:u(e)).update(t).digest():t.length<r&&(t=a.concat([t,l],r));for(var n=this._ipad=a.allocUnsafe(r),i=this._opad=a.allocUnsafe(r),s=0;s<r;s++)n[s]=54^t[s],i[s]=92^t[s];this._hash="rmd160"===e?new c:u(e),this._hash.update(n)}n(f,o),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new c:u(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new f("rmd160",t):"md5"===e?new i(s,t):new f(e,t)}},6456:(e,t,r)=>{"use strict";var n=r(91285),i=r(77834).Buffer,o=r(13973),a=i.alloc(128),s=64;function c(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=i.concat([t,a],s));for(var r=this._ipad=i.allocUnsafe(s),n=this._opad=i.allocUnsafe(s),c=0;c<s;c++)r[c]=54^t[c],n[c]=92^t[c];this._hash=[r]}n(c,o),c.prototype._update=function(e){this._hash.push(e)},c.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=c},5634:(e,t,r)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(95003),t.createHash=t.Hash=r(16162),t.createHmac=t.Hmac=r(50011);var n=r(24778),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=r(30499);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(93667);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var c=r(67602);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var u=r(95263);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=r(95363);var l=r(8493);t.publicEncrypt=l.publicEncrypt,t.privateEncrypt=l.privateEncrypt,t.publicDecrypt=l.publicDecrypt,t.privateDecrypt=l.privateDecrypt;var f=r(69631);t.randomFill=f.randomFill,t.randomFillSync=f.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.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}},22106:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(40272),i=r.n(n),o=r(82609),a=r.n(o)()(i());a.push([e.id,'/* devanagari */\n@font-face {\n font-family: "Poppins";\n font-style: normal;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/poppins/v15/pxiByp8kv8JHgFVrLEj6Z11lFd2JQEl8qw.woff2) format("woff2");\n unicode-range: U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;\n}\n/* latin-ext */\n@font-face {\n font-family: "Poppins";\n font-style: normal;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/poppins/v15/pxiByp8kv8JHgFVrLEj6Z1JlFd2JQEl8qw.woff2) format("woff2");\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: "Poppins";\n font-style: normal;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/poppins/v15/pxiByp8kv8JHgFVrLEj6Z1xlFd2JQEk.woff2) format("woff2");\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,\n U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n\n/* latin-ext */\n@font-face {\n font-family: "DM Sans";\n font-style: normal;\n font-weight: 400;\n src: url(https://fonts.gstatic.com/s/dmsans/v6/rP2Hp2ywxg089UriCZ2IHTWEBlwu8Q.woff2) format("woff2");\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: "DM Sans";\n font-style: normal;\n font-weight: 400;\n src: url(https://fonts.gstatic.com/s/dmsans/v6/rP2Hp2ywxg089UriCZOIHTWEBlw.woff2) format("woff2");\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,\n U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n\n/* Modal */\n#w3a-network-modal {\n --bg1: #ffffff;\n --bg2: #f9f9fb;\n --text-color1: #a2a5b5;\n --text-color2: #5c6c7f;\n\n --text-header: "Poppins", Helvetica, sans-serif;\n --text-body: "DM Sans", Helvetica, sans-serif;\n\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 15px;\n color: var(--text-color1);\n font-family: var(--text-body);\n background: black;\n}\n\n#w3a-network-modal button.w3a-button {\n background-color: #ffffff;\n border: 1px solid #f3f3f4;\n box-shadow: none;\n box-sizing: border-box;\n border-radius: 24px;\n height: 48px;\n width: 100%;\n padding: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: var(--text-body);\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n color: #b7b8bd;\n cursor: pointer;\n}\n\n#w3a-network-modal .w3a-switch-network {\n display: flex;\n flex-direction: column;\n align-items: center;\n background: #f9f9fb;\n box-sizing: border-box;\n border-radius: 10px;\n width: 375px;\n padding: 20px;\n font-family: var(--text-body);\n}\n\n#w3a-network-modal .w3a-switch-network__title {\n font-family: var(--text-header);\n font-size: 20px;\n color: var(--text-color2);\n margin-bottom: 16px;\n text-align: center;\n}\n\n#w3a-network-modal .w3a-switch-network__link {\n font-size: 12px;\n color: #b7b8bd;\n background-color: #fff;\n height: 24px;\n border-radius: 12px;\n padding: 4px 16px;\n}\n\n#w3a-network-modal .w3a-switch-network__connect {\n display: flex;\n margin: 40px auto 0;\n}\n\n#w3a-network-modal .w3a-switch-network__connect > div {\n text-align: center;\n font-size: 10px;\n color: var(--text-color2);\n}\n\n.w3a-switch-network__connect-divider {\n margin-top: 20px;\n}\n\n#w3a-network-modal .w3a-switch-network__logo {\n background: #ffffff;\n box-shadow: 2px 2px 12px rgba(3, 100, 255, 0.05);\n border-radius: 50%;\n width: 58px;\n height: 58px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 auto 6px;\n}\n\n#w3a-network-modal .w3a-switch-network__logo img {\n width: 34px;\n height: 34px;\n}\n\n#w3a-network-modal .w3a-switch-network__buttons {\n display: flex;\n column-gap: 16px;\n width: 100%;\n margin-top: 60px;\n}\n\n#w3a-network-modal .w3a-button.w3a-button--primary {\n background-color: #0364ff;\n color: #fff;\n}\n',"",{version:3,sources:["webpack://./../ui/css/network.css"],names:[],mappings:"AAAA,eAAe;AACf;IACI,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;IAChB,0GAA0G;IAC1G,mHAAmH;AACvH;AACA,cAAc;AACd;IACI,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;IAChB,0GAA0G;IAC1G,mHAAmH;AACvH;AACA,UAAU;AACV;IACI,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;IAChB,uGAAuG;IACvG;8DAC0D;AAC9D;;AAEA,cAAc;AACd;IACI,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;IAChB,oGAAoG;IACpG,mHAAmH;AACvH;AACA,UAAU;AACV;IACI,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;IAChB,iGAAiG;IACjG;8DAC0D;AAC9D;;AAEA,UAAU;AACV;IACI,cAAc;IACd,cAAc;IACd,sBAAsB;IACtB,sBAAsB;;IAEtB,+CAA+C;IAC/C,6CAA6C;;IAE7C,eAAe;IACf,MAAM;IACN,OAAO;IACP,YAAY;IACZ,aAAa;IACb,aAAa;IACb,mBAAmB;IACnB,uBAAuB;IACvB,sBAAsB;IACtB,aAAa;IACb,yBAAyB;IACzB,6BAA6B;IAC7B,iBAAiB;AACrB;;AAEA;IACI,yBAAyB;IACzB,yBAAyB;IACzB,gBAAgB;IAChB,sBAAsB;IACtB,mBAAmB;IACnB,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,aAAa;IACb,mBAAmB;IACnB,uBAAuB;IACvB,6BAA6B;IAC7B,kBAAkB;IAClB,gBAAgB;IAChB,eAAe;IACf,cAAc;IACd,eAAe;AACnB;;AAEA;IACI,aAAa;IACb,sBAAsB;IACtB,mBAAmB;IACnB,mBAAmB;IACnB,sBAAsB;IACtB,mBAAmB;IACnB,YAAY;IACZ,aAAa;IACb,6BAA6B;AACjC;;AAEA;IACI,+BAA+B;IAC/B,eAAe;IACf,yBAAyB;IACzB,mBAAmB;IACnB,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,cAAc;IACd,sBAAsB;IACtB,YAAY;IACZ,mBAAmB;IACnB,iBAAiB;AACrB;;AAEA;IACI,aAAa;IACb,mBAAmB;AACvB;;AAEA;IACI,kBAAkB;IAClB,eAAe;IACf,yBAAyB;AAC7B;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,mBAAmB;IACnB,gDAAgD;IAChD,kBAAkB;IAClB,WAAW;IACX,YAAY;IACZ,aAAa;IACb,mBAAmB;IACnB,uBAAuB;IACvB,kBAAkB;AACtB;;AAEA;IACI,WAAW;IACX,YAAY;AAChB;;AAEA;IACI,aAAa;IACb,gBAAgB;IAChB,WAAW;IACX,gBAAgB;AACpB;;AAEA;IACI,yBAAyB;IACzB,WAAW;AACf",sourcesContent:['/* devanagari */\n@font-face {\n font-family: "Poppins";\n font-style: normal;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/poppins/v15/pxiByp8kv8JHgFVrLEj6Z11lFd2JQEl8qw.woff2) format("woff2");\n unicode-range: U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;\n}\n/* latin-ext */\n@font-face {\n font-family: "Poppins";\n font-style: normal;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/poppins/v15/pxiByp8kv8JHgFVrLEj6Z1JlFd2JQEl8qw.woff2) format("woff2");\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: "Poppins";\n font-style: normal;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/poppins/v15/pxiByp8kv8JHgFVrLEj6Z1xlFd2JQEk.woff2) format("woff2");\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,\n U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n\n/* latin-ext */\n@font-face {\n font-family: "DM Sans";\n font-style: normal;\n font-weight: 400;\n src: url(https://fonts.gstatic.com/s/dmsans/v6/rP2Hp2ywxg089UriCZ2IHTWEBlwu8Q.woff2) format("woff2");\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: "DM Sans";\n font-style: normal;\n font-weight: 400;\n src: url(https://fonts.gstatic.com/s/dmsans/v6/rP2Hp2ywxg089UriCZOIHTWEBlw.woff2) format("woff2");\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,\n U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n\n/* Modal */\n#w3a-network-modal {\n --bg1: #ffffff;\n --bg2: #f9f9fb;\n --text-color1: #a2a5b5;\n --text-color2: #5c6c7f;\n\n --text-header: "Poppins", Helvetica, sans-serif;\n --text-body: "DM Sans", Helvetica, sans-serif;\n\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 15px;\n color: var(--text-color1);\n font-family: var(--text-body);\n background: black;\n}\n\n#w3a-network-modal button.w3a-button {\n background-color: #ffffff;\n border: 1px solid #f3f3f4;\n box-shadow: none;\n box-sizing: border-box;\n border-radius: 24px;\n height: 48px;\n width: 100%;\n padding: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: var(--text-body);\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n color: #b7b8bd;\n cursor: pointer;\n}\n\n#w3a-network-modal .w3a-switch-network {\n display: flex;\n flex-direction: column;\n align-items: center;\n background: #f9f9fb;\n box-sizing: border-box;\n border-radius: 10px;\n width: 375px;\n padding: 20px;\n font-family: var(--text-body);\n}\n\n#w3a-network-modal .w3a-switch-network__title {\n font-family: var(--text-header);\n font-size: 20px;\n color: var(--text-color2);\n margin-bottom: 16px;\n text-align: center;\n}\n\n#w3a-network-modal .w3a-switch-network__link {\n font-size: 12px;\n color: #b7b8bd;\n background-color: #fff;\n height: 24px;\n border-radius: 12px;\n padding: 4px 16px;\n}\n\n#w3a-network-modal .w3a-switch-network__connect {\n display: flex;\n margin: 40px auto 0;\n}\n\n#w3a-network-modal .w3a-switch-network__connect > div {\n text-align: center;\n font-size: 10px;\n color: var(--text-color2);\n}\n\n.w3a-switch-network__connect-divider {\n margin-top: 20px;\n}\n\n#w3a-network-modal .w3a-switch-network__logo {\n background: #ffffff;\n box-shadow: 2px 2px 12px rgba(3, 100, 255, 0.05);\n border-radius: 50%;\n width: 58px;\n height: 58px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 auto 6px;\n}\n\n#w3a-network-modal .w3a-switch-network__logo img {\n width: 34px;\n height: 34px;\n}\n\n#w3a-network-modal .w3a-switch-network__buttons {\n display: flex;\n column-gap: 16px;\n width: 100%;\n margin-top: 60px;\n}\n\n#w3a-network-modal .w3a-button.w3a-button--primary {\n background-color: #0364ff;\n color: #fff;\n}\n'],sourceRoot:""}]);const s=a},68169:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(40272),i=r.n(n),o=r(82609),a=r.n(o)()(i());a.push([e.id,'/* devanagari */\n@font-face {\n font-family: "Poppins";\n font-style: normal;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/poppins/v15/pxiByp8kv8JHgFVrLEj6Z11lFd2JQEl8qw.woff2) format("woff2");\n unicode-range: U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;\n}\n/* latin-ext */\n@font-face {\n font-family: "Poppins";\n font-style: normal;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/poppins/v15/pxiByp8kv8JHgFVrLEj6Z1JlFd2JQEl8qw.woff2) format("woff2");\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: "Poppins";\n font-style: normal;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/poppins/v15/pxiByp8kv8JHgFVrLEj6Z1xlFd2JQEk.woff2) format("woff2");\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,\n U+2215, U+FEFF, U+FFFD;\n}\n\n/* latin-ext */\n@font-face {\n font-family: "DM Sans";\n font-style: normal;\n font-weight: 400;\n src: url(https://fonts.gstatic.com/s/dmsans/v6/rP2Hp2ywxg089UriCZ2IHTWEBlwu8Q.woff2) format("woff2");\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: "DM Sans";\n font-style: normal;\n font-weight: 400;\n src: url(https://fonts.gstatic.com/s/dmsans/v6/rP2Hp2ywxg089UriCZOIHTWEBlw.woff2) format("woff2");\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,\n U+2215, U+FEFF, U+FFFD;\n}\n\n/* Modal */\n#w3a-modal {\n --bg1: #0f1222;\n --bg2: #24262e;\n --text-color1: #d3d3d4;\n --text-color2: #ffffff;\n\n --text-header: "Poppins", Helvetica, sans-serif;\n --text-body: "DM Sans", Helvetica, sans-serif;\n\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 15px;\n background: rgba(33, 33, 33, 0.46);\n color: var(--text-color1);\n font-family: var(--text-body);\n}\n\n#w3a-modal.w3a-modal--hidden {\n display: none;\n}\n\n#w3a-modal p,\n#w3a-modal form,\n#w3a-modal button {\n margin: 0;\n padding: 0;\n}\n\n#w3a-modal .w3a-modal__inner {\n width: 100%;\n max-width: 375px;\n overflow: hidden;\n border-radius: 6px;\n position: relative;\n max-height: 95%;\n overflow-y: auto;\n opacity: 0;\n transition: 200ms cubic-bezier(0.25, 0.8, 0.25, 1);\n transform-origin: center center;\n min-height: 350px;\n}\n\n#w3a-modal .w3a-modal__inner.w3a-modal__inner--active {\n opacity: 1;\n transition: 200ms cubic-bezier(0.25, 0.8, 0.25, 1);\n transform-origin: center center;\n}\n\n#w3a-modal .w3a-modal__header {\n padding: 25px 34px;\n background: var(--bg1);\n box-shadow: 0px 4px 28px rgba(3, 100, 255, 0.05);\n position: relative;\n}\n#w3a-modal .w3a-modal__content {\n padding: 30px 34px;\n background: var(--bg2);\n}\n#w3a-modal .w3a-modal__footer {\n padding: 16px 34px;\n background: var(--bg1);\n}\n\n/* SPINNER */\n/* Loader */\n#w3a-modal .w3a-modal__loader {\n background: var(--bg2);\n position: absolute;\n display: flex;\n justify-content: center;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 10;\n}\n\n#w3a-modal .w3a-modal__loader.w3a-modal__loader--hidden {\n display: none;\n}\n\n#w3a-modal .w3a-modal__loader-content {\n text-align: center;\n margin-bottom: 80px;\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n#w3a-modal .w3a-modal__loader-info {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 0 30px;\n}\n\n#w3a-modal .w3a-spinner-label {\n margin-top: 10px;\n font-size: 16px;\n font-weight: 500;\n color: #0364ff;\n}\n\n#w3a-modal .w3a-spinner-message {\n margin-top: 10px;\n font-size: 16px;\n}\n#w3a-modal .w3a-spinner-message:first-letter {\n text-transform: capitalize;\n}\n#w3a-modal .w3a-spinner-message.w3a-spinner-message--error {\n color: #fb4a61;\n}\n\n#w3a-modal button.w3a-logout {\n background: none;\n border: 0;\n padding: 0;\n display: inline-flex;\n align-items: center;\n margin-bottom: 30px;\n cursor: pointer;\n margin-top: 20px;\n color: #0364ff;\n}\n\n#w3a-modal .w3a-spinner-power {\n margin-top: auto;\n font-size: 12px;\n line-height: 1.2em;\n color: #b7b8bd;\n}\n#w3a-modal .w3a-spinner-power > img {\n height: 32px;\n width: auto;\n display: inline;\n}\n\n#w3a-modal .w3a-spinner {\n display: inline-block;\n position: relative;\n background-color: #0364ff;\n height: 60px;\n width: 60px;\n border-radius: 50%;\n background: conic-gradient(transparent, #0364ff);\n animation: rotate 1s linear infinite;\n}\n\n#w3a-modal .w3a-spinner__mask,\n#w3a-modal .w3a-spinner__head {\n content: "";\n position: absolute;\n border-radius: 50%;\n}\n\n#w3a-modal .w3a-spinner__mask {\n width: 50px;\n height: 50px;\n top: 5px;\n left: 5px;\n background-color: var(--bg2);\n}\n\n#w3a-modal .w3a-spinner__head {\n height: 5px;\n width: 5px;\n background-color: #0364ff;\n top: 0;\n left: 26px;\n}\n\n@keyframes rotate {\n from {\n transform: rotateZ(0);\n }\n to {\n transform: rotateZ(360deg);\n }\n}\n\n/* Header */\n#w3a-modal .w3a-header {\n display: flex;\n color: var(--text-color2);\n align-items: center;\n}\n#w3a-modal .w3a-header__logo {\n height: auto;\n width: 40px;\n margin-right: 16px;\n}\n#w3a-modal .w3a-header__title {\n font-family: var(--text-header);\n font-weight: 600;\n font-size: 20px;\n line-height: 1.5em;\n}\n#w3a-modal p.w3a-header__subtitle {\n font-size: 14px;\n line-height: 1.5em;\n font-weight: 400;\n}\n#w3a-modal button.w3a-header__button {\n cursor: pointer;\n position: absolute;\n background: none;\n padding: 0;\n border: 0;\n top: 20px;\n right: 26px;\n}\n\n/* BODY */\n#w3a-modal .w3a-group {\n margin-bottom: 24px;\n}\n#w3a-modal .w3a-group:last-child {\n margin-bottom: 0;\n}\n\n#w3a-modal .w3a-group.w3a-group--hidden,\n#w3a-modal .w3a-group.w3a-group--social-hidden,\n#w3a-modal .w3a-group.w3a-group--email-hidden,\n#w3a-modal .w3a-group.w3a-group--ext-wallet-hidden {\n display: none;\n}\n\n#w3a-modal .w3a-group:not(.w3a-group--hidden):not(:last-child),\n#w3a-modal .w3a-group:not(.w3a-group--social-hidden):not(:last-child),\n#w3a-modal .w3a-group:not(.w3a-group--email-hidden):not(:last-child),\n#w3a-modal .w3a-group:not(.w3a-group--ext-wallet-hidden):not(:last-child) {\n border-bottom: 0.5px solid #5c6c7f;\n padding-bottom: 24px;\n}\n\n#w3a-modal div.w3a-group__title {\n font-family: var(--text-header);\n font-weight: 400;\n font-size: 14px;\n line-height: 1.5em;\n margin-bottom: 8px;\n text-transform: uppercase;\n}\n\n/* Adapter List */\n#w3a-modal ul.w3a-adapter-list {\n display: flex;\n align-items: center;\n padding: 0;\n margin: 0;\n gap: 16px;\n overflow-y: hidden;\n flex-wrap: wrap;\n margin-bottom: 16px;\n max-height: 500px;\n transition: max-height 0.4s ease-in;\n}\n\n#w3a-modal ul.w3a-adapter-list.w3a-adapter-list--shrink {\n max-height: 48px;\n transition: max-height 0.4s ease-out;\n}\n\n#w3a-modal ul.w3a-adapter-list.w3a-adapter-list--hidden {\n display: none;\n}\n\n#w3a-modal li.w3a-adapter-item {\n list-style: none;\n margin-bottom: 30px;\n}\n\n#w3a-modal .w3a-adapter-item--hide {\n display: none;\n}\n\n#w3a-modal .w3a-adapter-item__label {\n font-size: 12px;\n color: #5c6c7f;\n text-align: center;\n margin: 8px 0 0 !important;\n text-transform: capitalize;\n position: absolute;\n transform: translate(-6px);\n width: 60px;\n}\n\n/* Buttons */\n#w3a-modal button.w3a-button {\n background-color: #2f3136;\n border: 1px solid #404145;\n box-sizing: border-box;\n box-shadow: 2px 2px 12px rgba(3, 100, 255, 0.05);\n border-radius: 24px;\n height: 48px;\n width: 100%;\n padding: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: var(--text-body);\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n color: var(--text-color2);\n cursor: pointer;\n}\n\n#w3a-modal button.w3a-button:hover {\n background: #595857;\n}\n\n#w3a-modal button.w3a-button:active {\n background: #6f717a;\n}\n\n#w3a-modal button.w3a-button:disabled {\n background: #27282d;\n color: #6f717a;\n}\n\n#w3a-modal button.w3a-button:focus-visible {\n outline: 1px solid #daf0ff;\n outline-offset: -1px;\n}\n\n#w3a-modal button.w3a-button--icon {\n width: 48px;\n}\n\n#w3a-modal button.w3a-button--left {\n justify-content: start;\n padding: 8px 16px;\n}\n\n#w3a-modal button.w3a-button--left > img {\n height: 30px;\n width: auto;\n}\n\n#w3a-modal button.w3a-button--left > div.w3a-button__name {\n max-width: 180px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-transform: capitalize;\n}\n\n#w3a-modal button.w3a-button--left > div.w3a-button__note {\n margin-left: 8px;\n color: #b7b8bd;\n margin-left: auto;\n}\n\n#w3a-modal .w3a-button__image {\n max-width: 100%;\n max-height: 100%;\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1), visibility 0s;\n}\n\n#w3a-modal button.w3a-button.w3a-button--rotate .w3a-button__image {\n transform: rotate(180deg);\n}\n\n#w3a-modal .w3a-button--left .w3a-button__image {\n margin-right: 12px;\n}\n\n#w3a-modal button.w3a-button-expand {\n height: unset;\n width: auto;\n margin-left: auto;\n font-size: 12px;\n margin-top: 16px;\n display: flex;\n border: 8px;\n color: var(--text-color2);\n align-items: center;\n cursor: pointer;\n border-radius: 12px;\n cursor: pointer;\n padding: 0 10px 0 8px;\n background: transparent;\n}\n\n#w3a-modal button.w3a-button-expand svg {\n width: 12px;\n height: auto;\n margin-right: 4px;\n}\n\n#w3a-modal .w3a-external-toggle {\n display: block;\n}\n\n#w3a-modal .w3a-external-toggle.w3a-external-toggle--hidden {\n display: none;\n}\n\n#w3a-modal .w3a-external-container {\n display: block;\n margin-bottom: 34px;\n}\n\n#w3a-modal .w3a-external-container.w3a-external-container--hidden {\n display: none;\n}\n\n#w3a-modal .w3a-external-group {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n margin-bottom: 16px;\n}\n\n#w3a-modal .w3a-external-group__left {\n flex-grow: 1;\n}\n\n#w3a-modal button.w3a-external-back {\n background: none;\n border: 0;\n padding: 0;\n display: inline-flex;\n align-items: center;\n margin-bottom: 30px;\n cursor: pointer;\n color: var(--text-color1);\n}\n\n#w3a-modal .w3a-external-back:focus-visible {\n outline: 1px solid #daf0ff;\n}\n\n#w3a-modal .w3a-external-back .w3a-group__title {\n margin-bottom: 0;\n margin-left: 5px;\n}\n\n#w3a-modal .w3a-external-loader {\n display: flex;\n justify-content: center;\n}\n\n#w3a-modal .w3a-wallet-connect {\n display: block;\n text-align: center;\n margin-bottom: 16px;\n}\n\n#w3a-modal .w3a-wallet-connect.w3a-wallet-connect--hidden {\n display: none;\n}\n\n#w3a-modal .w3a-wallet-connect__container {\n background: #ffffff;\n border-radius: 10px;\n color: var(--text-color1);\n font-size: 10px;\n width: fit-content;\n margin: auto;\n min-width: 250px;\n padding: 16px 12px;\n}\n\n#w3a-modal .w3a-wallet-connect__container-desktop,\n#w3a-modal .w3a-wallet-connect__container-android {\n margin: auto;\n}\n\n#w3a-modal .w3a-wallet-connect__container-btn-group {\n display: flex;\n gap: 18px;\n}\n\n#w3a-modal .w3a-wallet-connect__container-ios {\n display: flex;\n grid-gap: 30px 20px;\n padding: 0 0 28px;\n box-sizing: border-box;\n flex-wrap: wrap;\n}\n\n#w3a-modal .w3a-wallet-connect-qr {\n margin: 16px 16px;\n padding: inherit;\n}\n\n#w3a-modal .w3a-wallet-connect__container-android a {\n text-decoration: none;\n}\n\n#w3a-modal .w3a-wallet-connect__container-android .w3a-button {\n background-color: rgb(64, 153, 255) !important;\n color: #ffffff !important;\n height: auto;\n font-size: 14px;\n padding: 8px 16px;\n width: auto;\n margin: auto;\n}\n\n#w3a-modal .w3a-wallet-connect__logo > img {\n text-align: center;\n width: 115px;\n margin-bottom: 16px;\n}\n\n/* Text Field */\n#w3a-modal .w3a-text-field {\n background: #393938;\n border: 1px solid #27282d;\n box-sizing: border-box;\n box-shadow: inset 2px 2px 10px rgba(0, 0, 0, 0.4);\n border-radius: 24px;\n padding: 0 28px;\n height: 48px;\n width: 100%;\n font-family: var(--text-body);\n font-size: 16px;\n color: var(--text-color2);\n margin-bottom: 16px;\n}\n\n#w3a-modal .w3a-text-field:active {\n background: #0f1222;\n}\n\n#w3a-modal .w3a-text-field:focus-visible {\n outline: 1px solid #daf0ff;\n outline-offset: -1px;\n}\n\n/* Footer Components */\n#w3a-modal .w3a-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 10px;\n line-height: 150%;\n color: var(--text-color2);\n}\n\n#w3a-modal .w3a-footer__links {\n padding: 0;\n margin: 0;\n}\n\n#w3a-modal .w3a-footer__links a {\n color: var(--text-color1);\n text-decoration: none;\n}\n\n#w3a-modal .w3a-footer__links a:focus-visible {\n outline: 1px solid #daf0ff;\n}\n\n#w3a-modal .w3a-footer__links span {\n margin: 0 2px;\n}\n\n#w3a-modal .w3a-footer__secured {\n text-align: right;\n color: #b7b8bd;\n}\n#w3a-modal .w3a-footer__secured > img {\n height: 14px;\n width: auto;\n}\n\n/* Loader Bridge */\n#w3a-modal .w3a-modal__loader-bridge {\n display: flex;\n margin-bottom: 14px;\n}\n\n#w3a-modal .w3a-modal__loader-bridge-message span {\n text-transform: capitalize;\n}\n\n#w3a-modal .w3a-modal__loader-app-logo {\n display: flex;\n padding: 8px;\n}\n\n#w3a-modal .w3a-modal__loader-app-logo img {\n width: 64px;\n height: auto;\n}\n\n#w3a-modal .w3a-modal__loader-adapter img {\n width: 84px;\n height: auto;\n}\n\n#w3a-modal .w3a-modal__connector {\n display: flex;\n align-items: center;\n}\n\n.w3a-modal__connector-beat {\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n}\n\n.w3a-modal__connector-beat div {\n position: absolute;\n top: 33px;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: #808080;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n}\n\n.w3a-modal__connector-beat div:nth-child(1) {\n left: 8px;\n animation: beat1 2.4s infinite;\n}\n\n.w3a-modal__connector-beat div:nth-child(2) {\n left: 8px;\n animation: beat2 2.4s infinite;\n}\n\n.w3a-modal__connector-beat div:nth-child(3) {\n left: 8px;\n animation: beat3 2.4s infinite;\n}\n\n.w3a-modal__connector-beat div:nth-child(4) {\n left: 32px;\n animation: beat4 2.4s infinite;\n}\n\n.w3a-modal__connector-beat div:nth-child(5) {\n left: 56px;\n animation: beat5 2.4s infinite;\n}\n\n@keyframes beat1 {\n 0% {\n transform: scale(0);\n }\n\n 25% {\n transform: scale(0);\n }\n\n 50% {\n transform: scale(1);\n }\n\n 75% {\n transform: scale(0);\n }\n\n 100% {\n transform: scale(0);\n }\n}\n\n@keyframes beat2 {\n 0% {\n transform: scale(0);\n }\n\n 25% {\n transform: scale(1);\n }\n\n 50% {\n transform: translate(24px, 0);\n }\n\n 75% {\n transform: translate(0, 0);\n }\n\n 100% {\n transform: translate(0, 0) scale(0);\n }\n}\n\n@keyframes beat3 {\n 0% {\n transform: translate(0, 0);\n }\n\n 25% {\n transform: translate(24px, 0);\n }\n\n 50% {\n transform: translate(48px, 0);\n }\n\n 75% {\n transform: translate(24px, 0);\n }\n\n 100% {\n transform: translate(0, 0);\n }\n}\n\n@keyframes beat4 {\n 0% {\n transform: translate(0, 0);\n }\n\n 25% {\n transform: translate(24px, 0);\n }\n\n 50% {\n transform: translate(24px, 0) scale(0);\n }\n\n 75% {\n transform: translate(24px, 0) scale(1);\n }\n\n 100% {\n transform: translate(0, 0);\n }\n}\n\n@keyframes beat5 {\n 0% {\n transform: scale(1);\n }\n\n 25% {\n transform: scale(0);\n }\n\n 50% {\n transform: scale(0);\n }\n\n 75% {\n transform: scale(0);\n }\n\n 100% {\n transform: scale(1);\n }\n}\n\n/* LIGHT MODE */\n#w3a-modal.w3a-modal--light {\n --bg1: #ffffff;\n --bg2: #f9f9fb;\n --text-color1: #a2a5b5;\n --text-color2: #5c6c7f;\n}\n\n#w3a-modal .w3a-group:not(.w3a-group--hidden):not(:last-child),\n#w3a-modal .w3a-group:not(.w3a-group--social-hidden):not(:last-child),\n#w3a-modal .w3a-group:not(.w3a-group--email-hidden):not(:last-child),\n#w3a-modal .w3a-group:not(.w3a-group--ext-wallet-hidden):not(:last-child) {\n border-bottom: 0.5px solid #b7b8bd;\n padding-bottom: 24px;\n}\n\n#w3a-modal.w3a-modal--light button.w3a-button {\n background-color: #ffffff;\n border: 1px solid #f3f3f4;\n box-shadow: none;\n color: #595857;\n}\n\n#w3a-modal.w3a-modal--light button.w3a-button:disabled {\n color: #b7b8bd;\n}\n\n#w3a-modal.w3a-modal--light button.w3a-button:focus-visible {\n outline: 1px solid #0f1222;\n}\n\n#w3a-modal.w3a-modal--light .w3a-text-field {\n background: #ffffff;\n border: 1px solid #ffffff;\n box-shadow: inset 2px 2px 10px rgba(0, 0, 0, 0.1);\n color: #b7b8bd;\n}\n\n#w3a-modal.w3a-modal--light .w3a-text-field:active {\n color: #0f1222;\n outline: 1px solid #0f1222;\n}\n\n#w3a-modal.w3a-modal--light .w3a-text-field:focus-visible {\n color: #0f1222;\n outline: 1px solid #0f1222;\n}\n\n#w3a-modal.w3a-modal--light .w3a-footer__links a:focus-visible {\n outline: 1px solid #0f1222;\n}\n\n#w3a-modal.w3a-modal--light .w3a-external-back:focus-visible {\n outline: 1px solid #0f1222;\n}\n',"",{version:3,sources:["webpack://./../ui/css/web3auth.css"],names:[],mappings:"AAAA,eAAe;AACf;EACE,sBAAsB;EACtB,kBAAkB;EAClB,gBAAgB;EAChB,0GAA0G;EAC1G,mHAAmH;AACrH;AACA,cAAc;AACd;EACE,sBAAsB;EACtB,kBAAkB;EAClB,gBAAgB;EAChB,0GAA0G;EAC1G,mHAAmH;AACrH;AACA,UAAU;AACV;EACE,sBAAsB;EACtB,kBAAkB;EAClB,gBAAgB;EAChB,uGAAuG;EACvG;0BACwB;AAC1B;;AAEA,cAAc;AACd;EACE,sBAAsB;EACtB,kBAAkB;EAClB,gBAAgB;EAChB,oGAAoG;EACpG,mHAAmH;AACrH;AACA,UAAU;AACV;EACE,sBAAsB;EACtB,kBAAkB;EAClB,gBAAgB;EAChB,iGAAiG;EACjG;0BACwB;AAC1B;;AAEA,UAAU;AACV;EACE,cAAc;EACd,cAAc;EACd,sBAAsB;EACtB,sBAAsB;;EAEtB,+CAA+C;EAC/C,6CAA6C;;EAE7C,eAAe;EACf,MAAM;EACN,OAAO;EACP,YAAY;EACZ,aAAa;EACb,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,sBAAsB;EACtB,aAAa;EACb,kCAAkC;EAClC,yBAAyB;EACzB,6BAA6B;AAC/B;;AAEA;EACE,aAAa;AACf;;AAEA;;;EAGE,SAAS;EACT,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,gBAAgB;EAChB,gBAAgB;EAChB,kBAAkB;EAClB,kBAAkB;EAClB,eAAe;EACf,gBAAgB;EAChB,UAAU;EACV,kDAAkD;EAClD,+BAA+B;EAC/B,iBAAiB;AACnB;;AAEA;EACE,UAAU;EACV,kDAAkD;EAClD,+BAA+B;AACjC;;AAEA;EACE,kBAAkB;EAClB,sBAAsB;EACtB,gDAAgD;EAChD,kBAAkB;AACpB;AACA;EACE,kBAAkB;EAClB,sBAAsB;AACxB;AACA;EACE,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA,YAAY;AACZ,WAAW;AACX;EACE,sBAAsB;EACtB,kBAAkB;EAClB,aAAa;EACb,uBAAuB;EACvB,MAAM;EACN,QAAQ;EACR,SAAS;EACT,OAAO;EACP,WAAW;AACb;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,mBAAmB;EACnB,kBAAkB;EAClB,aAAa;EACb,sBAAsB;AACxB;;AAEA;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;EACtB,uBAAuB;EACvB,mBAAmB;EACnB,eAAe;AACjB;;AAEA;EACE,gBAAgB;EAChB,eAAe;EACf,gBAAgB;EAChB,cAAc;AAChB;;AAEA;EACE,gBAAgB;EAChB,eAAe;AACjB;AACA;EACE,0BAA0B;AAC5B;AACA;EACE,cAAc;AAChB;;AAEA;EACE,gBAAgB;EAChB,SAAS;EACT,UAAU;EACV,oBAAoB;EACpB,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,gBAAgB;EAChB,cAAc;AAChB;;AAEA;EACE,gBAAgB;EAChB,eAAe;EACf,kBAAkB;EAClB,cAAc;AAChB;AACA;EACE,YAAY;EACZ,WAAW;EACX,eAAe;AACjB;;AAEA;EACE,qBAAqB;EACrB,kBAAkB;EAClB,yBAAyB;EACzB,YAAY;EACZ,WAAW;EACX,kBAAkB;EAClB,gDAAgD;EAChD,oCAAoC;AACtC;;AAEA;;EAEE,WAAW;EACX,kBAAkB;EAClB,kBAAkB;AACpB;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,QAAQ;EACR,SAAS;EACT,4BAA4B;AAC9B;;AAEA;EACE,WAAW;EACX,UAAU;EACV,yBAAyB;EACzB,MAAM;EACN,UAAU;AACZ;;AAEA;EACE;IACE,qBAAqB;EACvB;EACA;IACE,0BAA0B;EAC5B;AACF;;AAEA,WAAW;AACX;EACE,aAAa;EACb,yBAAyB;EACzB,mBAAmB;AACrB;AACA;EACE,YAAY;EACZ,WAAW;EACX,kBAAkB;AACpB;AACA;EACE,+BAA+B;EAC/B,gBAAgB;EAChB,eAAe;EACf,kBAAkB;AACpB;AACA;EACE,eAAe;EACf,kBAAkB;EAClB,gBAAgB;AAClB;AACA;EACE,eAAe;EACf,kBAAkB;EAClB,gBAAgB;EAChB,UAAU;EACV,SAAS;EACT,SAAS;EACT,WAAW;AACb;;AAEA,SAAS;AACT;EACE,mBAAmB;AACrB;AACA;EACE,gBAAgB;AAClB;;AAEA;;;;EAIE,aAAa;AACf;;AAEA;;;;EAIE,kCAAkC;EAClC,oBAAoB;AACtB;;AAEA;EACE,+BAA+B;EAC/B,gBAAgB;EAChB,eAAe;EACf,kBAAkB;EAClB,kBAAkB;EAClB,yBAAyB;AAC3B;;AAEA,iBAAiB;AACjB;EACE,aAAa;EACb,mBAAmB;EACnB,UAAU;EACV,SAAS;EACT,SAAS;EACT,kBAAkB;EAClB,eAAe;EACf,mBAAmB;EACnB,iBAAiB;EACjB,mCAAmC;AACrC;;AAEA;EACE,gBAAgB;EAChB,oCAAoC;AACtC;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,gBAAgB;EAChB,mBAAmB;AACrB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,eAAe;EACf,cAAc;EACd,kBAAkB;EAClB,0BAA0B;EAC1B,0BAA0B;EAC1B,kBAAkB;EAClB,0BAA0B;EAC1B,WAAW;AACb;;AAEA,YAAY;AACZ;EACE,yBAAyB;EACzB,yBAAyB;EACzB,sBAAsB;EACtB,gDAAgD;EAChD,mBAAmB;EACnB,YAAY;EACZ,WAAW;EACX,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,6BAA6B;EAC7B,kBAAkB;EAClB,gBAAgB;EAChB,eAAe;EACf,yBAAyB;EACzB,eAAe;AACjB;;AAEA;EACE,mBAAmB;AACrB;;AAEA;EACE,mBAAmB;AACrB;;AAEA;EACE,mBAAmB;EACnB,cAAc;AAChB;;AAEA;EACE,0BAA0B;EAC1B,oBAAoB;AACtB;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,sBAAsB;EACtB,iBAAiB;AACnB;;AAEA;EACE,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,gBAAgB;EAChB,mBAAmB;EACnB,gBAAgB;EAChB,uBAAuB;EACvB,0BAA0B;AAC5B;;AAEA;EACE,gBAAgB;EAChB,cAAc;EACd,iBAAiB;AACnB;;AAEA;EACE,eAAe;EACf,gBAAgB;EAChB,+DAA+D;AACjE;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,aAAa;EACb,WAAW;EACX,iBAAiB;EACjB,eAAe;EACf,gBAAgB;EAChB,aAAa;EACb,WAAW;EACX,yBAAyB;EACzB,mBAAmB;EACnB,eAAe;EACf,mBAAmB;EACnB,eAAe;EACf,qBAAqB;EACrB,uBAAuB;AACzB;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,iBAAiB;AACnB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,cAAc;EACd,mBAAmB;AACrB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,aAAa;EACb,eAAe;EACf,SAAS;EACT,mBAAmB;AACrB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,gBAAgB;EAChB,SAAS;EACT,UAAU;EACV,oBAAoB;EACpB,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,yBAAyB;AAC3B;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,gBAAgB;EAChB,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,uBAAuB;AACzB;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,mBAAmB;AACrB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,mBAAmB;EACnB,mBAAmB;EACnB,yBAAyB;EACzB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,gBAAgB;EAChB,kBAAkB;AACpB;;AAEA;;EAEE,YAAY;AACd;;AAEA;EACE,aAAa;EACb,SAAS;AACX;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,iBAAiB;EACjB,sBAAsB;EACtB,eAAe;AACjB;;AAEA;EACE,iBAAiB;EACjB,gBAAgB;AAClB;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,8CAA8C;EAC9C,yBAAyB;EACzB,YAAY;EACZ,eAAe;EACf,iBAAiB;EACjB,WAAW;EACX,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,mBAAmB;AACrB;;AAEA,eAAe;AACf;EACE,mBAAmB;EACnB,yBAAyB;EACzB,sBAAsB;EACtB,iDAAiD;EACjD,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,WAAW;EACX,6BAA6B;EAC7B,eAAe;EACf,yBAAyB;EACzB,mBAAmB;AACrB;;AAEA;EACE,mBAAmB;AACrB;;AAEA;EACE,0BAA0B;EAC1B,oBAAoB;AACtB;;AAEA,sBAAsB;AACtB;EACE,aAAa;EACb,8BAA8B;EAC9B,mBAAmB;EACnB,eAAe;EACf,iBAAiB;EACjB,yBAAyB;AAC3B;;AAEA;EACE,UAAU;EACV,SAAS;AACX;;AAEA;EACE,yBAAyB;EACzB,qBAAqB;AACvB;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,iBAAiB;EACjB,cAAc;AAChB;AACA;EACE,YAAY;EACZ,WAAW;AACb;;AAEA,kBAAkB;AAClB;EACE,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,aAAa;EACb,YAAY;AACd;;AAEA;EACE,WAAW;EACX,YAAY;AACd;;AAEA;EACE,WAAW;EACX,YAAY;AACd;;AAEA;EACE,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,qBAAqB;EACrB,kBAAkB;EAClB,WAAW;EACX,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,mBAAmB;EACnB,mDAAmD;AACrD;;AAEA;EACE,SAAS;EACT,8BAA8B;AAChC;;AAEA;EACE,SAAS;EACT,8BAA8B;AAChC;;AAEA;EACE,SAAS;EACT,8BAA8B;AAChC;;AAEA;EACE,UAAU;EACV,8BAA8B;AAChC;;AAEA;EACE,UAAU;EACV,8BAA8B;AAChC;;AAEA;EACE;IACE,mBAAmB;EACrB;;EAEA;IACE,mBAAmB;EACrB;;EAEA;IACE,mBAAmB;EACrB;;EAEA;IACE,mBAAmB;EACrB;;EAEA;IACE,mBAAmB;EACrB;AACF;;AAEA;EACE;IACE,mBAAmB;EACrB;;EAEA;IACE,mBAAmB;EACrB;;EAEA;IACE,6BAA6B;EAC/B;;EAEA;IACE,0BAA0B;EAC5B;;EAEA;IACE,mCAAmC;EACrC;AACF;;AAEA;EACE;IACE,0BAA0B;EAC5B;;EAEA;IACE,6BAA6B;EAC/B;;EAEA;IACE,6BAA6B;EAC/B;;EAEA;IACE,6BAA6B;EAC/B;;EAEA;IACE,0BAA0B;EAC5B;AACF;;AAEA;EACE;IACE,0BAA0B;EAC5B;;EAEA;IACE,6BAA6B;EAC/B;;EAEA;IACE,sCAAsC;EACxC;;EAEA;IACE,sCAAsC;EACxC;;EAEA;IACE,0BAA0B;EAC5B;AACF;;AAEA;EACE;IACE,mBAAmB;EACrB;;EAEA;IACE,mBAAmB;EACrB;;EAEA;IACE,mBAAmB;EACrB;;EAEA;IACE,mBAAmB;EACrB;;EAEA;IACE,mBAAmB;EACrB;AACF;;AAEA,eAAe;AACf;EACE,cAAc;EACd,cAAc;EACd,sBAAsB;EACtB,sBAAsB;AACxB;;AAEA;;;;EAIE,kCAAkC;EAClC,oBAAoB;AACtB;;AAEA;EACE,yBAAyB;EACzB,yBAAyB;EACzB,gBAAgB;EAChB,cAAc;AAChB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,mBAAmB;EACnB,yBAAyB;EACzB,iDAAiD;EACjD,cAAc;AAChB;;AAEA;EACE,cAAc;EACd,0BAA0B;AAC5B;;AAEA;EACE,cAAc;EACd,0BAA0B;AAC5B;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,0BAA0B;AAC5B",sourcesContent:['/* devanagari */\n@font-face {\n font-family: "Poppins";\n font-style: normal;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/poppins/v15/pxiByp8kv8JHgFVrLEj6Z11lFd2JQEl8qw.woff2) format("woff2");\n unicode-range: U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;\n}\n/* latin-ext */\n@font-face {\n font-family: "Poppins";\n font-style: normal;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/poppins/v15/pxiByp8kv8JHgFVrLEj6Z1JlFd2JQEl8qw.woff2) format("woff2");\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: "Poppins";\n font-style: normal;\n font-weight: 600;\n src: url(https://fonts.gstatic.com/s/poppins/v15/pxiByp8kv8JHgFVrLEj6Z1xlFd2JQEk.woff2) format("woff2");\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,\n U+2215, U+FEFF, U+FFFD;\n}\n\n/* latin-ext */\n@font-face {\n font-family: "DM Sans";\n font-style: normal;\n font-weight: 400;\n src: url(https://fonts.gstatic.com/s/dmsans/v6/rP2Hp2ywxg089UriCZ2IHTWEBlwu8Q.woff2) format("woff2");\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: "DM Sans";\n font-style: normal;\n font-weight: 400;\n src: url(https://fonts.gstatic.com/s/dmsans/v6/rP2Hp2ywxg089UriCZOIHTWEBlw.woff2) format("woff2");\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,\n U+2215, U+FEFF, U+FFFD;\n}\n\n/* Modal */\n#w3a-modal {\n --bg1: #0f1222;\n --bg2: #24262e;\n --text-color1: #d3d3d4;\n --text-color2: #ffffff;\n\n --text-header: "Poppins", Helvetica, sans-serif;\n --text-body: "DM Sans", Helvetica, sans-serif;\n\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 15px;\n background: rgba(33, 33, 33, 0.46);\n color: var(--text-color1);\n font-family: var(--text-body);\n}\n\n#w3a-modal.w3a-modal--hidden {\n display: none;\n}\n\n#w3a-modal p,\n#w3a-modal form,\n#w3a-modal button {\n margin: 0;\n padding: 0;\n}\n\n#w3a-modal .w3a-modal__inner {\n width: 100%;\n max-width: 375px;\n overflow: hidden;\n border-radius: 6px;\n position: relative;\n max-height: 95%;\n overflow-y: auto;\n opacity: 0;\n transition: 200ms cubic-bezier(0.25, 0.8, 0.25, 1);\n transform-origin: center center;\n min-height: 350px;\n}\n\n#w3a-modal .w3a-modal__inner.w3a-modal__inner--active {\n opacity: 1;\n transition: 200ms cubic-bezier(0.25, 0.8, 0.25, 1);\n transform-origin: center center;\n}\n\n#w3a-modal .w3a-modal__header {\n padding: 25px 34px;\n background: var(--bg1);\n box-shadow: 0px 4px 28px rgba(3, 100, 255, 0.05);\n position: relative;\n}\n#w3a-modal .w3a-modal__content {\n padding: 30px 34px;\n background: var(--bg2);\n}\n#w3a-modal .w3a-modal__footer {\n padding: 16px 34px;\n background: var(--bg1);\n}\n\n/* SPINNER */\n/* Loader */\n#w3a-modal .w3a-modal__loader {\n background: var(--bg2);\n position: absolute;\n display: flex;\n justify-content: center;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 10;\n}\n\n#w3a-modal .w3a-modal__loader.w3a-modal__loader--hidden {\n display: none;\n}\n\n#w3a-modal .w3a-modal__loader-content {\n text-align: center;\n margin-bottom: 80px;\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n#w3a-modal .w3a-modal__loader-info {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 0 30px;\n}\n\n#w3a-modal .w3a-spinner-label {\n margin-top: 10px;\n font-size: 16px;\n font-weight: 500;\n color: #0364ff;\n}\n\n#w3a-modal .w3a-spinner-message {\n margin-top: 10px;\n font-size: 16px;\n}\n#w3a-modal .w3a-spinner-message:first-letter {\n text-transform: capitalize;\n}\n#w3a-modal .w3a-spinner-message.w3a-spinner-message--error {\n color: #fb4a61;\n}\n\n#w3a-modal button.w3a-logout {\n background: none;\n border: 0;\n padding: 0;\n display: inline-flex;\n align-items: center;\n margin-bottom: 30px;\n cursor: pointer;\n margin-top: 20px;\n color: #0364ff;\n}\n\n#w3a-modal .w3a-spinner-power {\n margin-top: auto;\n font-size: 12px;\n line-height: 1.2em;\n color: #b7b8bd;\n}\n#w3a-modal .w3a-spinner-power > img {\n height: 32px;\n width: auto;\n display: inline;\n}\n\n#w3a-modal .w3a-spinner {\n display: inline-block;\n position: relative;\n background-color: #0364ff;\n height: 60px;\n width: 60px;\n border-radius: 50%;\n background: conic-gradient(transparent, #0364ff);\n animation: rotate 1s linear infinite;\n}\n\n#w3a-modal .w3a-spinner__mask,\n#w3a-modal .w3a-spinner__head {\n content: "";\n position: absolute;\n border-radius: 50%;\n}\n\n#w3a-modal .w3a-spinner__mask {\n width: 50px;\n height: 50px;\n top: 5px;\n left: 5px;\n background-color: var(--bg2);\n}\n\n#w3a-modal .w3a-spinner__head {\n height: 5px;\n width: 5px;\n background-color: #0364ff;\n top: 0;\n left: 26px;\n}\n\n@keyframes rotate {\n from {\n transform: rotateZ(0);\n }\n to {\n transform: rotateZ(360deg);\n }\n}\n\n/* Header */\n#w3a-modal .w3a-header {\n display: flex;\n color: var(--text-color2);\n align-items: center;\n}\n#w3a-modal .w3a-header__logo {\n height: auto;\n width: 40px;\n margin-right: 16px;\n}\n#w3a-modal .w3a-header__title {\n font-family: var(--text-header);\n font-weight: 600;\n font-size: 20px;\n line-height: 1.5em;\n}\n#w3a-modal p.w3a-header__subtitle {\n font-size: 14px;\n line-height: 1.5em;\n font-weight: 400;\n}\n#w3a-modal button.w3a-header__button {\n cursor: pointer;\n position: absolute;\n background: none;\n padding: 0;\n border: 0;\n top: 20px;\n right: 26px;\n}\n\n/* BODY */\n#w3a-modal .w3a-group {\n margin-bottom: 24px;\n}\n#w3a-modal .w3a-group:last-child {\n margin-bottom: 0;\n}\n\n#w3a-modal .w3a-group.w3a-group--hidden,\n#w3a-modal .w3a-group.w3a-group--social-hidden,\n#w3a-modal .w3a-group.w3a-group--email-hidden,\n#w3a-modal .w3a-group.w3a-group--ext-wallet-hidden {\n display: none;\n}\n\n#w3a-modal .w3a-group:not(.w3a-group--hidden):not(:last-child),\n#w3a-modal .w3a-group:not(.w3a-group--social-hidden):not(:last-child),\n#w3a-modal .w3a-group:not(.w3a-group--email-hidden):not(:last-child),\n#w3a-modal .w3a-group:not(.w3a-group--ext-wallet-hidden):not(:last-child) {\n border-bottom: 0.5px solid #5c6c7f;\n padding-bottom: 24px;\n}\n\n#w3a-modal div.w3a-group__title {\n font-family: var(--text-header);\n font-weight: 400;\n font-size: 14px;\n line-height: 1.5em;\n margin-bottom: 8px;\n text-transform: uppercase;\n}\n\n/* Adapter List */\n#w3a-modal ul.w3a-adapter-list {\n display: flex;\n align-items: center;\n padding: 0;\n margin: 0;\n gap: 16px;\n overflow-y: hidden;\n flex-wrap: wrap;\n margin-bottom: 16px;\n max-height: 500px;\n transition: max-height 0.4s ease-in;\n}\n\n#w3a-modal ul.w3a-adapter-list.w3a-adapter-list--shrink {\n max-height: 48px;\n transition: max-height 0.4s ease-out;\n}\n\n#w3a-modal ul.w3a-adapter-list.w3a-adapter-list--hidden {\n display: none;\n}\n\n#w3a-modal li.w3a-adapter-item {\n list-style: none;\n margin-bottom: 30px;\n}\n\n#w3a-modal .w3a-adapter-item--hide {\n display: none;\n}\n\n#w3a-modal .w3a-adapter-item__label {\n font-size: 12px;\n color: #5c6c7f;\n text-align: center;\n margin: 8px 0 0 !important;\n text-transform: capitalize;\n position: absolute;\n transform: translate(-6px);\n width: 60px;\n}\n\n/* Buttons */\n#w3a-modal button.w3a-button {\n background-color: #2f3136;\n border: 1px solid #404145;\n box-sizing: border-box;\n box-shadow: 2px 2px 12px rgba(3, 100, 255, 0.05);\n border-radius: 24px;\n height: 48px;\n width: 100%;\n padding: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: var(--text-body);\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n color: var(--text-color2);\n cursor: pointer;\n}\n\n#w3a-modal button.w3a-button:hover {\n background: #595857;\n}\n\n#w3a-modal button.w3a-button:active {\n background: #6f717a;\n}\n\n#w3a-modal button.w3a-button:disabled {\n background: #27282d;\n color: #6f717a;\n}\n\n#w3a-modal button.w3a-button:focus-visible {\n outline: 1px solid #daf0ff;\n outline-offset: -1px;\n}\n\n#w3a-modal button.w3a-button--icon {\n width: 48px;\n}\n\n#w3a-modal button.w3a-button--left {\n justify-content: start;\n padding: 8px 16px;\n}\n\n#w3a-modal button.w3a-button--left > img {\n height: 30px;\n width: auto;\n}\n\n#w3a-modal button.w3a-button--left > div.w3a-button__name {\n max-width: 180px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-transform: capitalize;\n}\n\n#w3a-modal button.w3a-button--left > div.w3a-button__note {\n margin-left: 8px;\n color: #b7b8bd;\n margin-left: auto;\n}\n\n#w3a-modal .w3a-button__image {\n max-width: 100%;\n max-height: 100%;\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1), visibility 0s;\n}\n\n#w3a-modal button.w3a-button.w3a-button--rotate .w3a-button__image {\n transform: rotate(180deg);\n}\n\n#w3a-modal .w3a-button--left .w3a-button__image {\n margin-right: 12px;\n}\n\n#w3a-modal button.w3a-button-expand {\n height: unset;\n width: auto;\n margin-left: auto;\n font-size: 12px;\n margin-top: 16px;\n display: flex;\n border: 8px;\n color: var(--text-color2);\n align-items: center;\n cursor: pointer;\n border-radius: 12px;\n cursor: pointer;\n padding: 0 10px 0 8px;\n background: transparent;\n}\n\n#w3a-modal button.w3a-button-expand svg {\n width: 12px;\n height: auto;\n margin-right: 4px;\n}\n\n#w3a-modal .w3a-external-toggle {\n display: block;\n}\n\n#w3a-modal .w3a-external-toggle.w3a-external-toggle--hidden {\n display: none;\n}\n\n#w3a-modal .w3a-external-container {\n display: block;\n margin-bottom: 34px;\n}\n\n#w3a-modal .w3a-external-container.w3a-external-container--hidden {\n display: none;\n}\n\n#w3a-modal .w3a-external-group {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n margin-bottom: 16px;\n}\n\n#w3a-modal .w3a-external-group__left {\n flex-grow: 1;\n}\n\n#w3a-modal button.w3a-external-back {\n background: none;\n border: 0;\n padding: 0;\n display: inline-flex;\n align-items: center;\n margin-bottom: 30px;\n cursor: pointer;\n color: var(--text-color1);\n}\n\n#w3a-modal .w3a-external-back:focus-visible {\n outline: 1px solid #daf0ff;\n}\n\n#w3a-modal .w3a-external-back .w3a-group__title {\n margin-bottom: 0;\n margin-left: 5px;\n}\n\n#w3a-modal .w3a-external-loader {\n display: flex;\n justify-content: center;\n}\n\n#w3a-modal .w3a-wallet-connect {\n display: block;\n text-align: center;\n margin-bottom: 16px;\n}\n\n#w3a-modal .w3a-wallet-connect.w3a-wallet-connect--hidden {\n display: none;\n}\n\n#w3a-modal .w3a-wallet-connect__container {\n background: #ffffff;\n border-radius: 10px;\n color: var(--text-color1);\n font-size: 10px;\n width: fit-content;\n margin: auto;\n min-width: 250px;\n padding: 16px 12px;\n}\n\n#w3a-modal .w3a-wallet-connect__container-desktop,\n#w3a-modal .w3a-wallet-connect__container-android {\n margin: auto;\n}\n\n#w3a-modal .w3a-wallet-connect__container-btn-group {\n display: flex;\n gap: 18px;\n}\n\n#w3a-modal .w3a-wallet-connect__container-ios {\n display: flex;\n grid-gap: 30px 20px;\n padding: 0 0 28px;\n box-sizing: border-box;\n flex-wrap: wrap;\n}\n\n#w3a-modal .w3a-wallet-connect-qr {\n margin: 16px 16px;\n padding: inherit;\n}\n\n#w3a-modal .w3a-wallet-connect__container-android a {\n text-decoration: none;\n}\n\n#w3a-modal .w3a-wallet-connect__container-android .w3a-button {\n background-color: rgb(64, 153, 255) !important;\n color: #ffffff !important;\n height: auto;\n font-size: 14px;\n padding: 8px 16px;\n width: auto;\n margin: auto;\n}\n\n#w3a-modal .w3a-wallet-connect__logo > img {\n text-align: center;\n width: 115px;\n margin-bottom: 16px;\n}\n\n/* Text Field */\n#w3a-modal .w3a-text-field {\n background: #393938;\n border: 1px solid #27282d;\n box-sizing: border-box;\n box-shadow: inset 2px 2px 10px rgba(0, 0, 0, 0.4);\n border-radius: 24px;\n padding: 0 28px;\n height: 48px;\n width: 100%;\n font-family: var(--text-body);\n font-size: 16px;\n color: var(--text-color2);\n margin-bottom: 16px;\n}\n\n#w3a-modal .w3a-text-field:active {\n background: #0f1222;\n}\n\n#w3a-modal .w3a-text-field:focus-visible {\n outline: 1px solid #daf0ff;\n outline-offset: -1px;\n}\n\n/* Footer Components */\n#w3a-modal .w3a-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 10px;\n line-height: 150%;\n color: var(--text-color2);\n}\n\n#w3a-modal .w3a-footer__links {\n padding: 0;\n margin: 0;\n}\n\n#w3a-modal .w3a-footer__links a {\n color: var(--text-color1);\n text-decoration: none;\n}\n\n#w3a-modal .w3a-footer__links a:focus-visible {\n outline: 1px solid #daf0ff;\n}\n\n#w3a-modal .w3a-footer__links span {\n margin: 0 2px;\n}\n\n#w3a-modal .w3a-footer__secured {\n text-align: right;\n color: #b7b8bd;\n}\n#w3a-modal .w3a-footer__secured > img {\n height: 14px;\n width: auto;\n}\n\n/* Loader Bridge */\n#w3a-modal .w3a-modal__loader-bridge {\n display: flex;\n margin-bottom: 14px;\n}\n\n#w3a-modal .w3a-modal__loader-bridge-message span {\n text-transform: capitalize;\n}\n\n#w3a-modal .w3a-modal__loader-app-logo {\n display: flex;\n padding: 8px;\n}\n\n#w3a-modal .w3a-modal__loader-app-logo img {\n width: 64px;\n height: auto;\n}\n\n#w3a-modal .w3a-modal__loader-adapter img {\n width: 84px;\n height: auto;\n}\n\n#w3a-modal .w3a-modal__connector {\n display: flex;\n align-items: center;\n}\n\n.w3a-modal__connector-beat {\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n}\n\n.w3a-modal__connector-beat div {\n position: absolute;\n top: 33px;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: #808080;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n}\n\n.w3a-modal__connector-beat div:nth-child(1) {\n left: 8px;\n animation: beat1 2.4s infinite;\n}\n\n.w3a-modal__connector-beat div:nth-child(2) {\n left: 8px;\n animation: beat2 2.4s infinite;\n}\n\n.w3a-modal__connector-beat div:nth-child(3) {\n left: 8px;\n animation: beat3 2.4s infinite;\n}\n\n.w3a-modal__connector-beat div:nth-child(4) {\n left: 32px;\n animation: beat4 2.4s infinite;\n}\n\n.w3a-modal__connector-beat div:nth-child(5) {\n left: 56px;\n animation: beat5 2.4s infinite;\n}\n\n@keyframes beat1 {\n 0% {\n transform: scale(0);\n }\n\n 25% {\n transform: scale(0);\n }\n\n 50% {\n transform: scale(1);\n }\n\n 75% {\n transform: scale(0);\n }\n\n 100% {\n transform: scale(0);\n }\n}\n\n@keyframes beat2 {\n 0% {\n transform: scale(0);\n }\n\n 25% {\n transform: scale(1);\n }\n\n 50% {\n transform: translate(24px, 0);\n }\n\n 75% {\n transform: translate(0, 0);\n }\n\n 100% {\n transform: translate(0, 0) scale(0);\n }\n}\n\n@keyframes beat3 {\n 0% {\n transform: translate(0, 0);\n }\n\n 25% {\n transform: translate(24px, 0);\n }\n\n 50% {\n transform: translate(48px, 0);\n }\n\n 75% {\n transform: translate(24px, 0);\n }\n\n 100% {\n transform: translate(0, 0);\n }\n}\n\n@keyframes beat4 {\n 0% {\n transform: translate(0, 0);\n }\n\n 25% {\n transform: translate(24px, 0);\n }\n\n 50% {\n transform: translate(24px, 0) scale(0);\n }\n\n 75% {\n transform: translate(24px, 0) scale(1);\n }\n\n 100% {\n transform: translate(0, 0);\n }\n}\n\n@keyframes beat5 {\n 0% {\n transform: scale(1);\n }\n\n 25% {\n transform: scale(0);\n }\n\n 50% {\n transform: scale(0);\n }\n\n 75% {\n transform: scale(0);\n }\n\n 100% {\n transform: scale(1);\n }\n}\n\n/* LIGHT MODE */\n#w3a-modal.w3a-modal--light {\n --bg1: #ffffff;\n --bg2: #f9f9fb;\n --text-color1: #a2a5b5;\n --text-color2: #5c6c7f;\n}\n\n#w3a-modal .w3a-group:not(.w3a-group--hidden):not(:last-child),\n#w3a-modal .w3a-group:not(.w3a-group--social-hidden):not(:last-child),\n#w3a-modal .w3a-group:not(.w3a-group--email-hidden):not(:last-child),\n#w3a-modal .w3a-group:not(.w3a-group--ext-wallet-hidden):not(:last-child) {\n border-bottom: 0.5px solid #b7b8bd;\n padding-bottom: 24px;\n}\n\n#w3a-modal.w3a-modal--light button.w3a-button {\n background-color: #ffffff;\n border: 1px solid #f3f3f4;\n box-shadow: none;\n color: #595857;\n}\n\n#w3a-modal.w3a-modal--light button.w3a-button:disabled {\n color: #b7b8bd;\n}\n\n#w3a-modal.w3a-modal--light button.w3a-button:focus-visible {\n outline: 1px solid #0f1222;\n}\n\n#w3a-modal.w3a-modal--light .w3a-text-field {\n background: #ffffff;\n border: 1px solid #ffffff;\n box-shadow: inset 2px 2px 10px rgba(0, 0, 0, 0.1);\n color: #b7b8bd;\n}\n\n#w3a-modal.w3a-modal--light .w3a-text-field:active {\n color: #0f1222;\n outline: 1px solid #0f1222;\n}\n\n#w3a-modal.w3a-modal--light .w3a-text-field:focus-visible {\n color: #0f1222;\n outline: 1px solid #0f1222;\n}\n\n#w3a-modal.w3a-modal--light .w3a-footer__links a:focus-visible {\n outline: 1px solid #0f1222;\n}\n\n#w3a-modal.w3a-modal--light .w3a-external-back:focus-visible {\n outline: 1px solid #0f1222;\n}\n'],sourceRoot:""}]);const s=a},82609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var u=0;u<e.length;u++){var l=[].concat(e[u]);n&&a[l[0]]||(void 0!==o&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),t.push(l))}},t}},40272:e=>{"use strict";e.exports=function(e){var t=e[1],r=e[3];if(!r)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),o="/*# ".concat(i," */"),a=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[t].concat(a).concat([o]).join("\n")}return[t].join("\n")}},15554:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp(t,"gi"),n=new RegExp("("+t+")+","gi");function i(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],i(r),i(n))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=i(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=n.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var i=o(r[0]);i!==r[0]&&(t[r[0]]=i)}r=n.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),s=0;s<a.length;s++){var c=a[s];e=e.replace(new RegExp(c,"g"),t[c])}return e}(e)}}},14926:(e,t,r)=>{"use strict";var n=r(33464),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,c=r(81181)(),u=s&&c,l=function(e,t,r,n){var i;(!(t in e)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(u?s(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},f=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s<o.length;s+=1)l(e,o[s],t[o[s]],r[o[s]])};f.supportsDescriptors=!!u,e.exports=f},84387:(e,t,r)=>{"use strict";t.utils=r(94112),t.Cipher=r(43639),t.DES=r(4225),t.CBC=r(59692),t.EDE=r(4335)},59692:(e,t,r)=>{"use strict";var n=r(79561),i=r(91285),o={};function a(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var r=Object.keys(o),n=0;n<r.length;n++){var a=r[n];t.prototype[a]=o[a]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new a(this.options.iv);this._cbcState=e},o._update=function(e,t,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=e[t+s];for(o._update.call(this,a,0,r,n),s=0;s<this.blockSize;s++)a[s]=r[n+s]}else{for(o._update.call(this,e,t,r,n),s=0;s<this.blockSize;s++)r[n+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=e[t+s]}}},43639:(e,t,r)=>{"use strict";var n=r(79561);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<r;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,r=0,n=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},4225:(e,t,r)=>{"use strict";var n=r(79561),i=r(91285),o=r(94112),a=r(43639);function s(){this.tmp=new Array(2),this.keys=null}function c(e){a.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}i(c,a),e.exports=c,c.create=function(e){return new c(e)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];c.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var s=u[a>>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},c.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},c.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},c.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},c.prototype._encrypt=function(e,t,r,n,i){for(var a=t,s=r,c=0;c<e.keys.length;c+=2){var u=e.keys[c],l=e.keys[c+1];o.expand(s,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var f=o.substitute(u,l),d=s;s=(a^o.permute(f))>>>0,a=d}o.rip(s,a,n,i)},c.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,c=e.keys.length-2;c>=0;c-=2){var u=e.keys[c],l=e.keys[c+1];o.expand(a,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var f=o.substitute(u,l),d=a;a=(s^o.permute(f))>>>0,s=d}o.rip(a,s,n,i)}},4335:(e,t,r)=>{"use strict";var n=r(79561),i=r(91285),o=r(43639),a=r(4225);function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function c(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(c,o),e.exports=c,c.create=function(e){return new c(e)},c.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},c.prototype._pad=a.prototype._pad,c.prototype._unpad=a.prototype._unpad},94112:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[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];t.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,c=0;c<s;c++)o<<=1,o|=e>>>r[c]&1;for(c=s;c<r.length;c++)a<<=1,a|=t>>>r[c]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var n=[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];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(e>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)];return r>>>0};var i=[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];t.permute=function(e){for(var t=0,r=0;r<i.length;r++)t<<=1,t|=e>>>i[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var i=[],o=0;o<t;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},67602:(e,t,r)=>{var n=r(48834).Buffer,i=r(32808),o=r(23418),a=r(30767),s={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new n(o[e].prime,"hex"),r=new n(o[e].gen,"hex");return new a(t,r)},t.createDiffieHellman=t.DiffieHellman=function e(t,r,o,c){return n.isBuffer(r)||void 0===s[r]?e(t,"binary",r,o):(r=r||"binary",c=c||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,c)),"number"==typeof t?new a(i(t,o),o,!0):(n.isBuffer(t)||(t=new n(t,r)),new a(t,o,!0)))}},30767:(e,t,r)=>{var n=r(48834).Buffer,i=r(62197),o=new(r(46676)),a=new i(24),s=new i(11),c=new i(10),u=new i(3),l=new i(7),f=r(32808),d=r(95003);function h(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new i(e),this}function p(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new i(e),this}e.exports=m;var g={};function m(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=h,this.setPrivateKey=p):this._primeCode=8}function y(e,t){var r=new n(e.toArray());return t?r.toString(t):r}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in g)return g[n];var i,d=0;if(e.isEven()||!f.simpleSieve||!f.fermatTest(e)||!o.test(e))return d+=1,d+="02"===r||"05"===r?8:4,g[n]=d,d;switch(o.test(e.shrn(1))||(d+=2),r){case"02":e.mod(a).cmp(s)&&(d+=8);break;case"05":(i=e.mod(c)).cmp(u)&&i.cmp(l)&&(d+=8);break;default:d+=4}return g[n]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new i(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var t=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(t.toArray()),o=this.getPrime();if(r.length<o.length){var a=new n(o.length-r.length);a.fill(0),r=n.concat([a,r])}return r},m.prototype.getPublicKey=function(e){return y(this._pub,e)},m.prototype.getPrivateKey=function(e){return y(this._priv,e)},m.prototype.getPrime=function(e){return y(this.__prime,e)},m.prototype.getGenerator=function(e){return y(this._gen,e)},m.prototype.setGenerator=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.__gen=e,this._gen=new i(e),this}},32808:(e,t,r)=>{var n=r(95003);e.exports=b,b.simpleSieve=m,b.fermatTest=y;var i=r(62197),o=new i(24),a=new(r(46676)),s=new i(1),c=new i(2),u=new i(5),l=(new i(16),new i(8),new i(10)),f=new i(3),d=(new i(7),new i(11)),h=new i(4),p=(new i(12),null);function g(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<t&&e[i]<=n&&r%e[i]!=0;i++);t!==i&&e[i]<=n||(e[t++]=r)}return p=e,e}function m(e){for(var t=g(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function y(e){var t=i.mont(e);return 0===c.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function b(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var r,p;for(t=new i(t);;){for(r=new i(n(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(c),t.cmp(c)){if(!t.cmp(u))for(;r.mod(l).cmp(f);)r.iadd(h)}else for(;r.mod(o).cmp(d);)r.iadd(h);if(m(p=r.shrn(1))&&m(r)&&y(p)&&y(r)&&a.test(p)&&a.test(r))return r}}},87554:(e,t,r)=>{"use strict";var n=t;n.version=r(40763).i8,n.utils=r(18288),n.rand=r(82745),n.curve=r(48610),n.curves=r(41479),n.ec=r(38596),n.eddsa=r(39208)},48919:(e,t,r)=>{"use strict";var n=r(62197),i=r(18288),o=i.getNAF,a=i.getJSF,s=i.assert;function c(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var a,c,u=[];for(a=0;a<n.length;a+=r.step){c=0;for(var l=a+r.step-1;l>=a;l--)c=(c<<1)+n[l];u.push(c)}for(var f=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a<u.length;a++)(c=u[a])===h?d=d.mixedAdd(r.points[a]):c===-h&&(d=d.mixedAdd(r.points[a].neg()));f=f.add(d)}return f.toP()},c.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=o(t,r,this._bitLength),c=this.jpoint(null,null,null),u=a.length-1;u>=0;u--){for(var l=0;u>=0&&0===a[u];u--)l++;if(u>=0&&l++,c=c.dblp(l),u<0)break;var f=a[u];s(0!==f),c="affine"===e.type?f>0?c.mixedAdd(i[f-1>>1]):c.mixedAdd(i[-f-1>>1].neg()):f>0?c.add(i[f-1>>1]):c.add(i[-f-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,r,n,i){var s,c,u,l=this._wnafT1,f=this._wnafT2,d=this._wnafT3,h=0;for(s=0;s<n;s++){var p=(u=t[s])._getNAFPoints(e);l[s]=p.wnd,f[s]=p.points}for(s=n-1;s>=1;s-=2){var g=s-1,m=s;if(1===l[g]&&1===l[m]){var y=[t[g],null,null,t[m]];0===t[g].y.cmp(t[m].y)?(y[1]=t[g].add(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg())):0===t[g].y.cmp(t[m].y.redNeg())?(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].add(t[m].neg())):(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=a(r[g],r[m]);for(h=Math.max(v[0].length,h),d[g]=new Array(h),d[m]=new Array(h),c=0;c<h;c++){var w=0|v[0][c],A=0|v[1][c];d[g][c]=b[3*(w+1)+(A+1)],d[m][c]=0,f[g]=y}}else d[g]=o(r[g],l[g],this._bitLength),d[m]=o(r[m],l[m],this._bitLength),h=Math.max(d[g].length,h),h=Math.max(d[m].length,h)}var _=this.jpoint(null,null,null),E=this._wnafT4;for(s=h;s>=0;s--){for(var x=0;s>=0;){var k=!0;for(c=0;c<n;c++)E[c]=0|d[c][s],0!==E[c]&&(k=!1);if(!k)break;x++,s--}if(s>=0&&x++,_=_.dblp(x),s<0)break;for(c=0;c<n;c++){var S=E[c];0!==S&&(S>0?u=f[c][S-1>>1]:S<0&&(u=f[c][-S-1>>1].neg()),_="affine"===u.type?_.mixedAdd(u):_.add(u))}}for(s=0;s<n;s++)f[s]=null;return i?_:_.toP()},c.BasePoint=u,u.prototype.eq=function(){throw new Error("Not implemented")},u.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},u.prototype.encodeCompressed=function(e){return this.encode(e,!0)},u.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},u.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},u.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},u.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},u.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},37105:(e,t,r)=>{"use strict";var n=r(18288),i=r(62197),o=r(91285),a=r(48919),s=n.assert;function c(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,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(c,a),e.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(t&&!c||!t&&c)&&(s=s.redNeg()),this.point(e,s)},c.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(u,a.BasePoint),c.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},c.prototype.point=function(e,t,r,n){return new u(this,e,t,r,n)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),c=i.redMul(a),u=o.redMul(s),l=i.redMul(s),f=a.redMul(o);return this.curve.point(c,u,f,l)},u.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(c);this.zOne?(e=a.redSub(s).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(c)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=a.redSub(s).redISub(c).redMul(o),t=u.redMul(n.redSub(c)),r=u.redMul(o))}else n=s.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(c)),r=n.redMul(o);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),c=r.redAdd(t),u=o.redMul(a),l=s.redMul(c),f=o.redMul(c),d=a.redMul(s);return this.curve.point(u,l,d,f)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),c=i.redSub(s),u=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),f=n.redMul(c).redMul(l);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=c.redMul(u)):(t=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(c).redMul(u)),this.curve.point(f,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},48610:(e,t,r)=>{"use strict";var n=t;n.base=r(48919),n.short=r(27715),n.mont=r(95125),n.edwards=r(37105)},95125:(e,t,r)=>{"use strict";var n=r(62197),i=r(91285),o=r(48919),a=r(18288);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(c,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new c(this,e,t)},s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),c=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},27715:(e,t,r)=>{"use strict";var n=r(18288),i=r(62197),o=r(91285),a=r(48919),s=n.assert;function c(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,a),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,c,u,l,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new i(1),g=new i(0),m=new i(0),y=new i(1),b=0;0!==d.cmpn(0);){var v=h.div(d);u=h.sub(v.mul(d)),l=m.sub(v.mul(p));var w=y.sub(v.mul(g));if(!n&&u.cmp(f)<0)t=c.neg(),r=p,n=u.neg(),o=l;else if(n&&2==++b)break;c=u,h=d,d=u,m=p,p=l,y=g,g=w}a=u.neg(),s=l;var A=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(A)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:c.add(u).neg()}},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],c=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),c=c.neg(!0)),n[2*o]=s,n[2*o+1]=c,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var u=this._wnafMulAdd(1,n,i,2*o,r),l=0;l<2*o;l++)n[l]=null,i[l]=null;return u},o(u,a.BasePoint),c.prototype.point=function(e,t,r){return new u(this,e,t,r)},c.prototype.pointFromJSON=function(e,t){return u.fromJSON(this,e,t)},u.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},u.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},u.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,a.BasePoint),c.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),f=n.redMul(u),d=c.redSqr().redIAdd(l).redISub(f).redISub(f),h=c.redMul(f.redISub(d)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=r.redMul(c),f=s.redSqr().redIAdd(u).redISub(l).redISub(l),d=s.redMul(l.redISub(f)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(f,d,h)},l.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,c=s.redSqr().redSqr(),u=a.redAdd(a);for(t=0;t<e;t++){var l=o.redSqr(),f=u.redSqr(),d=f.redSqr(),h=l.redAdd(l).redIAdd(l).redIAdd(n.redMul(c)),p=o.redMul(f),g=h.redSqr().redISub(p.redAdd(p)),m=p.redISub(g),y=h.redMul(m);y=y.redIAdd(y).redISub(d);var b=u.redMul(s);t+1<e&&(c=c.redMul(d)),o=g,s=b,u=y}return this.curve.jpoint(o,u.redMul(i),s)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},l.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),c=s.redSqr().redISub(a).redISub(a),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=c,t=s.redMul(a.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),f=this.y.redSqr(),d=f.redSqr(),h=this.x.redAdd(f).redSqr().redISub(l).redISub(d);h=h.redIAdd(h);var p=l.redAdd(l).redIAdd(l),g=p.redSqr(),m=d.redIAdd(d);m=(m=m.redIAdd(m)).redIAdd(m),e=g.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},l.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=s.redSqr().redISub(a).redISub(a);e=c;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=s.redMul(a.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),f=this.y.redSqr(),d=this.x.redMul(f),h=this.x.redSub(l).redMul(this.x.redAdd(l));h=h.redAdd(h).redIAdd(h);var p=d.redIAdd(d),g=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(g),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(l);var m=f.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=h.redMul(p.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,r)},l.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),c=t.redAdd(t),u=(c=c.redIAdd(c)).redMul(a),l=s.redSqr().redISub(u.redAdd(u)),f=u.redISub(l),d=a.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=s.redMul(f).redISub(d),p=r.redAdd(r).redMul(n);return this.curve.jpoint(l,h,p)},l.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),c=n.redIAdd(n);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(c),l=t.redMul(u);l=(l=l.redIAdd(l)).redIAdd(l);var f=this.x.redMul(s).redISub(l);f=(f=f.redIAdd(f)).redIAdd(f);var d=this.y.redMul(u.redMul(c.redISub(u)).redISub(a.redMul(s)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(f,d,h)},l.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},l.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},l.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},41479:(e,t,r)=>{"use strict";var n,i=t,o=r(34485),a=r(48610),s=r(18288).assert;function c(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(47983)}catch(e){n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},38596:(e,t,r)=>{"use strict";var n=r(62197),i=r(78873),o=r(18288),a=r(41479),s=r(82745),c=o.assert,u=r(22307),l=r(71798);function f(e){if(!(this instanceof f))return new f(e);"string"==typeof e&&(c(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=f,f.prototype.keyPair=function(e){return new u(this,e)},f.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},f.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},f.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},f.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},f.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),u=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),f=this.n.sub(new n(1)),d=0;;d++){var h=o.k?o.k(d):new n(u.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(f)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var g=p.getX(),m=g.umod(this.n);if(0!==m.cmpn(0)){var y=h.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==g.cmp(m)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),b^=1),new l({r:m,s:y,recoveryParam:b})}}}}}},f.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new l(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),u=c.mul(e).umod(this.n),f=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),f)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(e,t,r,i){c((3&r)===r,"The recovery param is more than two bits"),t=new l(t,i);var o=this.n,a=new n(e),s=t.r,u=t.s,f=1&r,d=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),f):this.curve.pointFromX(s,f);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),g=u.mul(h).umod(o);return this.g.mulAdd(p,s,g)},f.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new l(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},22307:(e,t,r)=>{"use strict";var n=r(62197),i=r(18288).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},71798:(e,t,r)=>{"use strict";var n=r(62197),i=r(18288),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function c(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o<n;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function l(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=c(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=c(e,r);if(!1===a)return!1;var u=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var l=c(e,r);if(!1===l)return!1;if(e.length!==l+r.place)return!1;var f=e.slice(r.place,l+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(u),this.s=new n(f),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];l(n,t.length),(n=n.concat(t)).push(2),l(n,r.length);var o=n.concat(r),a=[48];return l(a,o.length),a=a.concat(o),i.encode(a,e)}},39208:(e,t,r)=>{"use strict";var n=r(34485),i=r(41479),o=r(18288),a=o.assert,s=o.parseBytes,c=r(851),u=r(6117);function l(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=l,l.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),c=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},l.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},l.prototype.keyFromPublic=function(e){return c.fromPublic(this,e)},l.prototype.keyFromSecret=function(e){return c.fromSecret(this,e)},l.prototype.makeSignature=function(e){return e instanceof u?e:new u(this,e)},l.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},l.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},l.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},l.prototype.decodeInt=function(e){return o.intFromLE(e)},l.prototype.isPoint=function(e){return e instanceof this.pointClass}},851:(e,t,r)=>{"use strict";var n=r(18288),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},6117:(e,t,r)=>{"use strict";var n=r(62197),i=r(18288),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function c(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=c},47983:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},18288:(e,t,r)=>{"use strict";var n=t,i=r(62197),o=r(79561),a=r(43022);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<n.length;a++){var s,c=o.andln(i-1);o.isOdd()?(s=c>(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,c=e.andln(3)+i&3,u=t.andln(3)+o&3;3===c&&(c=-1),3===u&&(u=-1),a=0==(1&c)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==u?c:-c,r[0].push(a),s=0==(1&u)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==c?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},18797:(e,t,r)=>{var n=r(34406),i=r(29928),o=function(){},a=function(e,t,r){if("function"==typeof t)return a(e,null,t);t||(t={}),r=i(r||o);var s=e._writableState,c=e._readableState,u=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,f=!1,d=function(){e.writable||h()},h=function(){l=!1,u||r.call(e)},p=function(){u=!1,l||r.call(e)},g=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},m=function(t){r.call(e,t)},y=function(){n.nextTick(b)},b=function(){if(!f)return(!u||c&&c.ended&&!c.destroyed)&&(!l||s&&s.ended&&!s.destroyed)?void 0:r.call(e,new Error("premature close"))},v=function(){e.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",h),e.on("abort",y),e.req?v():e.on("request",v)):l&&!s&&(e.on("end",d),e.on("close",d)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",g),e.on("end",p),e.on("finish",h),!1!==t.error&&e.on("error",m),e.on("close",y),function(){f=!0,e.removeListener("complete",h),e.removeListener("abort",y),e.removeListener("request",v),e.req&&e.req.removeListener("finish",h),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("exit",g),e.removeListener("end",p),e.removeListener("error",m),e.removeListener("close",y)}};e.exports=a},44956:e=>{"use strict";function t(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o=Object.keys(Object(i)),a=0,s=o.length;a<s;a++){var c=o[a],u=Object.getOwnPropertyDescriptor(i,c);void 0!==u&&u.enumerable&&(r[c]=i[c])}}return r}e.exports={assign:t,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:t})}}},94723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const n=r(77847);class i extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n.default(this.serialize(),o,2)}}function o(e,t){if("[Circular]"!==t)return t}t.EthereumRpcError=i,t.EthereumProviderError=class extends i{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}},54792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},98159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const n=r(94723),i=r(20894),o=r(54792);function a(e,t){const[r,o]=c(t);return new n.EthereumRpcError(e,r||i.getMessageFromCode(e),o)}function s(e,t){const[r,o]=c(t);return new n.EthereumProviderError(e,r||i.getMessageFromCode(e),o)}function c(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}t.ethErrors={rpc:{parse:e=>a(o.errorCodes.rpc.parse,e),invalidRequest:e=>a(o.errorCodes.rpc.invalidRequest,e),invalidParams:e=>a(o.errorCodes.rpc.invalidParams,e),methodNotFound:e=>a(o.errorCodes.rpc.methodNotFound,e),internal:e=>a(o.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(t,e)},invalidInput:e=>a(o.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>a(o.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>a(o.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>a(o.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>a(o.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>a(o.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>s(o.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>s(o.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>s(o.errorCodes.provider.unsupportedMethod,e),disconnected:e=>s(o.errorCodes.provider.disconnected,e),chainDisconnected:e=>s(o.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:i}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,i)}}}},58094:(e,t,r)=>{"use strict";t.Xy=t.Cg=t.Sy=void 0;const n=r(94723);Object.defineProperty(t,"Cg",{enumerable:!0,get:function(){return n.EthereumRpcError}});const i=r(20894);Object.defineProperty(t,"Xy",{enumerable:!0,get:function(){return i.serializeError}});const o=r(98159);Object.defineProperty(t,"Sy",{enumerable:!0,get:function(){return o.ethErrors}});r(54792)},20894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(54792),i=r(94723),o=n.errorCodes.rpc.internal,a={code:o,message:s(o)};function s(e,r="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(e)){const r=e.toString();if(f(n.errorValues,r))return n.errorValues[r].message;if(u(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function c(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n.errorValues[t]||!!u(e)}function u(e){return e>=-32099&&e<=-32e3}function l(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=s,t.isValidCode=c,t.serializeError=function(e,{fallbackError:t=a,shouldIncludeStack:r=!1}={}){var n,o;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();const u={};if(e&&"object"==typeof e&&!Array.isArray(e)&&f(e,"code")&&c(e.code)){const t=e;u.code=t.code,t.message&&"string"==typeof t.message?(u.message=t.message,f(t,"data")&&(u.data=t.data)):(u.message=s(u.code),u.data={originalError:l(e)})}else{u.code=t.code;const r=null===(n=e)||void 0===n?void 0:n.message;u.message=r&&"string"==typeof r?r:t.message,u.data={originalError:l(e)}}const d=null===(o=e)||void 0===o?void 0:o.stack;return r&&e&&d&&"string"==typeof d&&(u.stack=d),u}},1115:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(73488),i=r(10144);t.keccak224=(0,i.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,i.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,i.wrapHash)(n.keccak_384),t.keccak512=(0,i.wrapHash)(n.keccak_512)},91839:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function s(e,t){i(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=i,t.hash=o,t.exists=a,t.output=s;const c={number:r,bool:n,bytes:i,hash:o,exists:a,output:s};t.default=c},36214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(91839),i=r(50300);class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){n.default.exists(this);const{view:t,buffer:r,blockLen:o}=this,a=(e=(0,i.toBytes)(e)).length;for(let n=0;n<a;){const s=Math.min(o-this.pos,a-n);if(s!==o)r.set(e.subarray(n,n+s),this.pos),this.pos+=s,n+=s,this.pos===o&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;o<=a-n;n+=o)this.process(t,n)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){n.default.exists(this),n.default.output(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:a}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>o-s&&(this.process(r,0),s=0);for(let e=s;e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),a=Number(r>>i&o),s=Number(r&o),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,s,n)}(r,o-8,BigInt(8*this.length),a),this.process(r,0);const c=(0,i.createView)(e);this.get().forEach(((e,t)=>c.setUint32(4*t,e,a)))}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:a}=this;return e.length=n,e.pos=a,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}t.SHA2=o},2426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:a,l:s}=i(e[o],t);[r[o],n[o]]=[a,s]}return[r,n]}function a(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.fromBig=i,t.split=o,t.toBig=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0),t.add=a;const s={fromBig:i,split:o,toBig:t.toBig,shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:(e,t,r)=>e<<r|t>>>32-r,rotlSL:(e,t,r)=>t<<r|e>>>32-r,rotlBH:(e,t,r)=>t<<r-32|e>>>64-r,rotlBL:(e,t,r)=>e<<r-32|t>>>64-r,add:a,add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/2**32|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0,add5H:(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0,add5L:(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0)};t.default=s},9450:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto={node:void 0,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0}},70520:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;const n=r(91839),i=r(50300);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,n.default.hash(e);const r=(0,i.toBytes)(t);if(this.iHash=e.create(),!(this.iHash instanceof i.Hash))throw new TypeError("Expected instance of class which extends utils.Hash");const o=this.blockLen=this.iHash.blockLen;this.outputLen=this.iHash.outputLen;const a=new Uint8Array(o);a.set(r.length>this.iHash.blockLen?e.create().update(r).digest():r);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),a.fill(0)}update(e){return n.default.exists(this),this.iHash.update(e),this}digestInto(e){n.default.exists(this),n.default.bytes(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:a}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},13426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha256=void 0;const n=r(36214),i=r(50300),o=(e,t,r)=>e&t^e&r^t&r,a=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]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class u extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[e,t,r,n,i,o,a,s]}set(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)c[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=c[e-15],r=c[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;c[e]=o+c[e-7]+n+c[e-16]|0}let{A:r,B:n,C:s,D:u,E:l,F:f,G:d,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&f^~p&d)+a[e]+c[e]|0,g=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,s)|0;h=d,d=f,f=l,l=u+t|0,u=s,s=n,n=r,r=t+g|0}var p;r=r+this.A|0,n=n+this.B|0,s=s+this.C|0,u=u+this.D|0,l=l+this.E|0,f=f+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,n,s,u,l,f,d,h)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}t.sha256=(0,i.wrapConstructor)((()=>new u))},73488:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(91839),i=r(2426),o=r(50300),[a,s,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),f=BigInt(2),d=BigInt(7),h=BigInt(256),p=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],a.push(2*(5*n+r)),s.push((e+1)*(e+2)/2%64);let i=u;for(let e=0;e<7;e++)t=(t<<l^(t>>d)*p)%h,t&f&&(i^=l<<(l<<BigInt(e))-l);c.push(i)}const[g,m]=i.default.split(c,!0),y=(e,t,r)=>r>32?i.default.rotlBH(e,t,r):i.default.rotlSH(e,t,r),b=(e,t,r)=>r>32?i.default.rotlBL(e,t,r):i.default.rotlSL(e,t,r);function v(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],a=r[i+1],s=y(o,a,1)^r[n],c=b(o,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=s,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=s[r],o=y(t,i,n),c=b(t,i,n),u=a[r];t=e[u],i=e[u+1],e[u]=o,e[u+1]=c}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=m[n]}r.fill(0)}t.keccakP=v;class w extends o.Hash{constructor(e,t,r,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,n.default.number(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){n.default.exists(this);const{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n<i;){const o=Math.min(t-this.pos,i-n);for(let t=0;t<o;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,0!=(128&t)&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){n.default.exists(this,!1),n.default.bytes(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return n.default.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(n.default.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new w(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}t.Keccak=w;const A=(e,t,r)=>(0,o.wrapConstructor)((()=>new w(t,e,r)));t.sha3_224=A(6,144,28),t.sha3_256=A(6,136,32),t.sha3_384=A(6,104,48),t.sha3_512=A(6,72,64),t.keccak_224=A(1,144,28),t.keccak_256=A(1,136,32),t.keccak_384=A(1,104,48),t.keccak_512=A(1,72,64);const _=(e,t,r)=>(0,o.wrapConstructorWithOpts)(((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=_(31,168,16),t.shake256=_(31,136,32)},50300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(9450);if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function o(e){if("string"!=typeof e)throw new TypeError("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)}function a(e){if("string"==typeof e&&(e=o(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=i[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");t[r]=o}return t},t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=o,t.toBytes=a,t.concatBytes=function(...e){if(!e.every((e=>e instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r},t.Hash=class{clone(){return this._cloneInto()}},t.checkOpts=function(e,t){if(void 0!==t&&("object"!=typeof t||(r=t,"[object Object]"!==Object.prototype.toString.call(r)||r.constructor!==Object)))throw new TypeError("Options should be object or undefined");var r;return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(a(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto.web)return n.crypto.web.getRandomValues(new Uint8Array(e));if(n.crypto.node)return new Uint8Array(n.crypto.node.randomBytes(e).buffer);throw new Error("The environment doesn't have randomBytes function")}},65493:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.schnorr=t.verify=t.signSync=t.sign=t.getSharedSecret=t.recoverPublicKey=t.getPublicKey=t.Signature=t.Point=t.CURVE=void 0;const n=r(74753),i=BigInt(0),o=BigInt(1),a=BigInt(2),s=BigInt(3),c=BigInt(8),u=a**BigInt(256),l={a:i,b:BigInt(7),P:u-a**BigInt(32)-BigInt(977),n:u-BigInt("432420386565659656852420866394968145599"),h:o,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")};function f(e){const{a:t,b:r}=l,n=B(e*e),i=B(n*e);return B(i+t*e+r)}t.CURVE=l;const d=l.a===i;class h{constructor(e,t,r){this.x=e,this.y=t,this.z=r}static fromAffine(e){if(!(e instanceof g))throw new TypeError("JacobianPoint#fromAffine: expected Point");return new h(e.x,e.y,o)}static toAffineBatch(e){const t=function(e,t=l.P){const r=new Array(e.length),n=M(e.reduce(((e,n,o)=>n===i?e:(r[o]=e,B(e*n,t))),o),t);return e.reduceRight(((e,n,o)=>n===i?e:(r[o]=B(e*r[o],t),B(e*n,t))),n),r}(e.map((e=>e.z)));return e.map(((e,r)=>e.toAffine(t[r])))}static normalizeZ(e){return h.toAffineBatch(e).map(h.fromAffine)}equals(e){if(!(e instanceof h))throw new TypeError("JacobianPoint expected");const{x:t,y:r,z:n}=this,{x:i,y:o,z:s}=e,c=B(n**a),u=B(s**a),l=B(t*u),f=B(i*c),d=B(B(r*s)*u),p=B(B(o*n)*c);return l===f&&d===p}negate(){return new h(this.x,B(-this.y),this.z)}double(){const{x:e,y:t,z:r}=this,n=B(e**a),i=B(t**a),o=B(i**a),u=B(a*(B((e+i)**a)-n-o)),l=B(s*n),f=B(l**a),d=B(f-a*u),p=B(l*(u-d)-c*o),g=B(a*t*r);return new h(d,p,g)}add(e){if(!(e instanceof h))throw new TypeError("JacobianPoint expected");const{x:t,y:r,z:n}=this,{x:o,y:s,z:c}=e;if(o===i||s===i)return this;if(t===i||r===i)return e;const u=B(n**a),l=B(c**a),f=B(t*l),d=B(o*u),p=B(B(r*c)*l),g=B(B(s*n)*u),m=B(d-f),y=B(g-p);if(m===i)return y===i?this.double():h.ZERO;const b=B(m**a),v=B(m*b),w=B(f*b),A=B(y**a-v-a*w),_=B(y*(w-A)-p*v),E=B(n*c*m);return new h(A,_,E)}subtract(e){return this.add(e.negate())}multiplyUnsafe(e){const t=h.ZERO;if("bigint"==typeof e&&e===i)return t;let r=I(e);if(r===o)return this;if(!d){let e=t,n=this;for(;r>i;)r&o&&(e=e.add(n)),n=n.double(),r>>=o;return e}let{k1neg:n,k1:a,k2neg:s,k2:c}=j(r),u=t,f=t,p=this;for(;a>i||c>i;)a&o&&(u=u.add(p)),c&o&&(f=f.add(p)),p=p.double(),a>>=o,c>>=o;return n&&(u=u.negate()),s&&(f=f.negate()),f=new h(B(f.x*l.beta),f.y,f.z),u.add(f)}precomputeWindow(e){const t=d?128/e+1:256/e+1,r=[];let n=this,i=n;for(let o=0;o<t;o++){i=n,r.push(i);for(let t=1;t<2**(e-1);t++)i=i.add(n),r.push(i);n=i.double()}return r}wNAF(e,t){!t&&this.equals(h.BASE)&&(t=g.BASE);const r=t&&t._WINDOW_SIZE||1;if(256%r)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let n=t&&p.get(t);n||(n=this.precomputeWindow(r),t&&1!==r&&(n=h.normalizeZ(n),p.set(t,n)));let i=h.ZERO,a=h.ZERO;const s=1+(d?128/r:256/r),c=2**(r-1),u=BigInt(2**r-1),l=2**r,f=BigInt(r);for(let t=0;t<s;t++){const r=t*c;let s=Number(e&u);if(e>>=f,s>c&&(s-=l,e+=o),0===s){let e=n[r];t%2&&(e=e.negate()),a=a.add(e)}else{let e=n[r+Math.abs(s)-1];s<0&&(e=e.negate()),i=i.add(e)}}return{p:i,f:a}}multiply(e,t){let r,n,i=I(e);if(d){const{k1neg:e,k1:o,k2neg:a,k2:s}=j(i);let{p:c,f:u}=this.wNAF(o,t),{p:f,f:d}=this.wNAF(s,t);e&&(c=c.negate()),a&&(f=f.negate()),f=new h(B(f.x*l.beta),f.y,f.z),r=c.add(f),n=u.add(d)}else{const{p:e,f:o}=this.wNAF(i,t);r=e,n=o}return h.normalizeZ([r,n])[0]}toAffine(e=M(this.z)){const{x:t,y:r,z:n}=this,i=e,a=B(i*i),s=B(a*i),c=B(t*a),u=B(r*s);if(B(n*i)!==o)throw new Error("invZ was invalid");return new g(c,u)}}h.BASE=new h(l.Gx,l.Gy,o),h.ZERO=new h(i,o,i);const p=new WeakMap;class g{constructor(e,t){this.x=e,this.y=t}_setWindowSize(e){this._WINDOW_SIZE=e,p.delete(this)}static fromCompressedHex(e){const t=32===e.length,r=P(t?e:e.subarray(1));if(!F(r))throw new Error("Point is not on curve");let n=function(e){const{P:t}=l,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),c=BigInt(44),u=BigInt(88),f=e*e*e%t,d=f*f*e%t,h=T(d,s)*d%t,p=T(h,s)*d%t,g=T(p,a)*f%t,m=T(g,n)*g%t,y=T(m,i)*m%t,b=T(y,c)*y%t,v=T(b,u)*b%t,w=T(v,c)*y%t,A=T(w,s)*d%t,_=T(A,o)*m%t,E=T(_,r)*f%t;return T(E,a)}(f(r));const i=(n&o)===o;t?i&&(n=B(-n)):1==(1&e[0])!==i&&(n=B(-n));const c=new g(r,n);return c.assertValidity(),c}static fromUncompressedHex(e){const t=P(e.subarray(1,33)),r=P(e.subarray(33,65)),n=new g(t,r);return n.assertValidity(),n}static fromHex(e){const t=O(e),r=t.length,n=t[0];if(32===r||33===r&&(2===n||3===n))return this.fromCompressedHex(t);if(65===r&&4===n)return this.fromUncompressedHex(t);throw new Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${r}`)}static fromPrivateKey(e){return g.BASE.multiply(Z(e))}static fromSignature(e,t,r){const n=L(e=O(e)),{r:i,s:o}=q(t);if(0!==r&&1!==r)throw new Error("Cannot recover signature: invalid recovery bit");const a=1&r?"03":"02",s=g.fromHex(a+E(i)),{n:c}=l,u=M(i,c),f=B(-n*u,c),d=B(o*u,c),h=g.BASE.multiplyAndAddUnsafe(s,f,d);if(!h)throw new Error("Cannot recover signature: point at infinify");return h.assertValidity(),h}toRawBytes(e=!1){return C(this.toHex(e))}toHex(e=!1){const t=E(this.x);return e?`${this.y&o?"03":"02"}${t}`:`04${t}${E(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const e="Point is not on elliptic curve",{x:t,y:r}=this;if(!F(t)||!F(r))throw new Error(e);const n=B(r*r);if(B(n-f(t))!==i)throw new Error(e)}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new g(this.x,B(-this.y))}double(){return h.fromAffine(this).double().toAffine()}add(e){return h.fromAffine(this).add(h.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return h.fromAffine(this).multiply(e,this).toAffine()}multiplyAndAddUnsafe(e,t,r){const n=h.fromAffine(this),a=t===i||t===o||this!==g.BASE?n.multiplyUnsafe(t):n.multiply(t),s=h.fromAffine(e).multiplyUnsafe(r),c=a.add(s);return c.equals(h.ZERO)?void 0:c.toAffine()}}function m(e){return Number.parseInt(e[0],16)>=8?"00"+e:e}function y(e){if(e.length<2||2!==e[0])throw new Error(`Invalid signature integer tag: ${_(e)}`);const t=e[1],r=e.subarray(2,t+2);if(!t||r.length!==t)throw new Error("Invalid signature integer: wrong length");if(0===r[0]&&r[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:P(r),left:e.subarray(t+2)}}t.Point=g,g.BASE=new g(l.Gx,l.Gy),g.ZERO=new g(i,i);class b{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromCompact(e){const t=w(e),r="Signature.fromCompact";if("string"!=typeof e&&!t)throw new TypeError(`${r}: Expected string or Uint8Array`);const n=t?_(e):e;if(128!==n.length)throw new Error(`${r}: Expected 64-byte hex`);return new b(S(n.slice(0,64)),S(n.slice(64,128)))}static fromDER(e){const t=w(e);if("string"!=typeof e&&!t)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r,s:n}=function(e){if(e.length<2||48!=e[0])throw new Error(`Invalid signature tag: ${_(e)}`);if(e[1]!==e.length-2)throw new Error("Invalid signature: incorrect length");const{data:t,left:r}=y(e.subarray(2)),{data:n,left:i}=y(r);if(i.length)throw new Error(`Invalid signature: left bytes after parsing: ${_(i)}`);return{r:t,s:n}}(t?e:C(e));return new b(r,n)}static fromHex(e){return this.fromDER(e)}assertValidity(){const{r:e,s:t}=this;if(!D(e))throw new Error("Invalid Signature: r must be 0 < r < n");if(!D(t))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const e=l.n>>o;return this.s>e}normalizeS(){return this.hasHighS()?new b(this.r,l.n-this.s):this}toDERRawBytes(e=!1){return C(this.toDERHex(e))}toDERHex(e=!1){const t=m(k(this.s));if(e)return t;const r=m(k(this.r)),n=k(r.length/2),i=k(t.length/2);return`30${k(r.length/2+t.length/2+4)}02${n}${r}02${i}${t}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return C(this.toCompactHex())}toCompactHex(){return E(this.r)+E(this.s)}}function v(...e){if(!e.every(w))throw new Error("Uint8Array list expected");if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}function w(e){return e instanceof Uint8Array}t.Signature=b;const A=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function _(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");let t="";for(let r=0;r<e.length;r++)t+=A[e[r]];return t}function E(e){if(e>u)throw new Error("Expected number < 2^256");return e.toString(16).padStart(64,"0")}function x(e){return C(E(e))}function k(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function S(e){if("string"!=typeof e)throw new TypeError("hexToNumber: expected string, got "+typeof e);return BigInt(`0x${e}`)}function C(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+e.length);const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");t[r]=o}return t}function P(e){return S(_(e))}function O(e){return e instanceof Uint8Array?Uint8Array.from(e):C(e)}function I(e){if("number"==typeof e&&Number.isSafeInteger(e)&&e>0)return BigInt(e);if("bigint"==typeof e&&D(e))return e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function B(e,t=l.P){const r=e%t;return r>=i?r:t+r}function T(e,t){const{P:r}=l;let n=e;for(;t-- >i;)n*=n,n%=r;return n}function M(e,t=l.P){if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=B(e,t),n=t,a=i,s=o,c=o,u=i;for(;r!==i;){const e=n/r,t=n%r,i=a-c*e,o=s-u*e;n=r,r=t,a=c,s=u,c=i,u=o}if(n!==o)throw new Error("invert: does not exist");return B(a,t)}const R=(e,t)=>(e+t/a)/t,N=a**BigInt(128);function j(e){const{n:t}=l,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-o*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,s=R(a*e,t),c=R(-n*e,t);let u=B(e-s*r-c*i,t),f=B(-s*n-c*a,t);const d=u>N,h=f>N;if(d&&(u=t-u),h&&(f=t-f),u>N||f>N)throw new Error("splitScalarEndo: Endomorphism failed, k="+e);return{k1neg:d,k1:u,k2neg:h,k2:f}}function L(e){const{n:t}=l,r=8*e.length-256;let n=P(e);return r>0&&(n>>=BigInt(r)),n>=t&&(n-=t),n}class U{constructor(){this.v=new Uint8Array(32).fill(1),this.k=new Uint8Array(32).fill(0),this.counter=0}hmac(...e){return t.utils.hmacSha256(this.k,...e)}hmacSync(...e){if("function"!=typeof t.utils.hmacSha256Sync)throw new Error("utils.hmacSha256Sync is undefined, you need to set it");const r=t.utils.hmacSha256Sync(this.k,...e);if(r instanceof Promise)throw new Error("To use sync sign(), ensure utils.hmacSha256 is sync");return r}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(e=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),e),this.v=await this.hmac(this.v),0!==e.length&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),e),this.v=await this.hmac(this.v))}reseedSync(e=new Uint8Array){this.k=this.hmacSync(this.v,Uint8Array.from([0]),e),this.v=this.hmacSync(this.v),0!==e.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),e),this.v=this.hmacSync(this.v))}async generate(){return this.incr(),this.v=await this.hmac(this.v),this.v}generateSync(){return this.incr(),this.v=this.hmacSync(this.v),this.v}}function D(e){return i<e&&e<l.n}function F(e){return i<e&&e<l.P}function z(e,t,r){const n=P(e);if(!D(n))return;const{n:a}=l,s=g.BASE.multiply(n),c=B(s.x,a);if(c===i)return;const u=B(M(n,a)*B(t+r*c,a),a);if(u===i)return;const f=new b(c,u);return{sig:f,recovery:(s.x===f.r?0:2)|Number(s.y&o)}}function Z(e){let t;if("bigint"==typeof e)t=e;else if("number"==typeof e&&Number.isSafeInteger(e)&&e>0)t=BigInt(e);else if("string"==typeof e){if(64!==e.length)throw new Error("Expected 32 bytes of private key");t=S(e)}else{if(!w(e))throw new TypeError("Expected valid private key");if(32!==e.length)throw new Error("Expected 32 bytes of private key");t=P(e)}if(!D(t))throw new Error("Expected private key: 0 < key < n");return t}function H(e){return e instanceof g?(e.assertValidity(),e):g.fromHex(e)}function q(e){if(e instanceof b)return e.assertValidity(),e;try{return b.fromDER(e)}catch(t){return b.fromCompact(e)}}function W(e){const t=w(e),r="string"==typeof e,n=(t||r)&&e.length;return t?33===n||65===n:r?66===n||130===n:e instanceof g}function K(e){return P(e.length>32?e.slice(0,32):e)}function V(e){const t=K(e),r=B(t,l.n);return G(r<i?t:r)}function G(e){if("bigint"!=typeof e)throw new Error("Expected bigint");return C(E(e))}function $(e,r,n){if(null==e)throw new Error(`sign: expected valid message hash, not "${e}"`);const i=O(e),o=Z(r),a=[G(o),V(i)];if(null!=n){!0===n&&(n=t.utils.randomBytes(32));const e=O(n);if(32!==e.length)throw new Error("sign: Expected 32 bytes of extra data");a.push(e)}return{seed:v(...a),m:K(i),d:o}}function J(e,t){let{sig:r,recovery:n}=e;const{canonical:i,der:o,recovered:a}=Object.assign({canonical:!0,der:!0},t);i&&r.hasHighS()&&(r=r.normalizeS(),n^=1);const s=o?r.toDERRawBytes():r.toCompactRawBytes();return a?[s,n]:s}t.getPublicKey=function(e,t=!1){return g.fromPrivateKey(e).toRawBytes(t)},t.recoverPublicKey=function(e,t,r,n=!1){return g.fromSignature(e,t,r).toRawBytes(n)},t.getSharedSecret=function(e,t,r=!1){if(W(e))throw new TypeError("getSharedSecret: first arg must be private key");if(!W(t))throw new TypeError("getSharedSecret: second arg must be public key");const n=H(t);return n.assertValidity(),n.multiply(Z(e)).toRawBytes(r)},t.sign=async function(e,t,r={}){const{seed:n,m:i,d:o}=$(e,t,r.extraEntropy);let a;const s=new U;for(await s.reseed(n);!(a=z(await s.generate(),i,o));)await s.reseed();return J(a,r)},t.signSync=function(e,t,r={}){const{seed:n,m:i,d:o}=$(e,t,r.extraEntropy);let a;const s=new U;for(s.reseedSync(n);!(a=z(s.generateSync(),i,o));)s.reseedSync();return J(a,r)};const Y={strict:!0};function X(e){return B(P(e),l.n)}function Q(e){return(e.y&o)===i}t.verify=function(e,t,r,n=Y){let i;try{i=q(e),t=O(t)}catch(e){return!1}const{r:o,s:a}=i;if(n.strict&&i.hasHighS())return!1;const s=L(t);let c;try{c=H(r)}catch(e){return!1}const{n:u}=l,f=M(a,u),d=B(s*f,u),h=B(o*f,u),p=g.BASE.multiplyAndAddUnsafe(c,d,h);return!!p&&B(p.x,u)===o};class ee{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromHex(e){const t=O(e);if(64!==t.length)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${t.length}`);const r=P(t.subarray(0,32)),n=P(t.subarray(32,64));return new ee(r,n)}assertValidity(){const{r:e,s:t}=this;if(!F(e)||!D(t))throw new Error("Invalid signature")}toHex(){return E(this.r)+E(this.s)}toRawBytes(){return C(this.toHex())}}function te(e,t,r){if(null==e)throw new TypeError(`sign: Expected valid message, not "${e}"`);const n=O(e),i=Z(t),o=O(r);if(32!==o.length)throw new TypeError("sign: Expected 32 bytes of aux randomness");const a=g.fromPrivateKey(i),s=a.toRawX();return{m:n,P:a,px:s,d:Q(a)?i:l.n-i,rand:o}}function re(e,t){return x(e^P(t))}function ne(e){const t=B(P(e),l.n);if(t===i)throw new Error("sign: Creation of signature failed. k is zero");const r=g.fromPrivateKey(t),n=r.toRawX();return{R:r,rx:n,k:Q(r)?t:l.n-t}}function ie(e,t,r,n){return new ee(e.x,B(t+r*n,l.n)).toRawBytes()}function oe(e,t,r){const n=e instanceof ee,i=n?e:ee.fromHex(e);return n&&i.assertValidity(),{...i,m:O(t),P:H(r)}}function ae(e,t,r,n){const i=g.BASE.multiplyAndAddUnsafe(t,Z(r),B(-n,l.n));return!(!i||!Q(i)||i.x!==e)}async function se(e,r,n){try{const{r:i,s:o,m:a,P:s}=oe(e,r,n),c=X(await t.utils.taggedHash(le.challenge,x(i),s.toRawX(),a));return ae(i,s,o,c)}catch(e){return!1}}function ce(e,r,n){try{const{r:i,s:o,m:a,P:s}=oe(e,r,n),c=X(t.utils.taggedHashSync(le.challenge,x(i),s.toRawX(),a));return ae(i,s,o,c)}catch(e){return!1}}t.schnorr={Signature:ee,getPublicKey:function(e){return g.fromPrivateKey(e).toRawX()},sign:async function(e,r,n=t.utils.randomBytes()){const{m:i,px:o,d:a,rand:s}=te(e,r,n),c=re(a,await t.utils.taggedHash(le.aux,s)),{R:u,rx:l,k:f}=ne(await t.utils.taggedHash(le.nonce,c,o,i)),d=ie(u,f,X(await t.utils.taggedHash(le.challenge,l,o,i)),a);if(!await se(d,i,o))throw new Error("sign: Invalid signature produced");return d},verify:se,signSync:function(e,r,n=t.utils.randomBytes()){const{m:i,px:o,d:a,rand:s}=te(e,r,n),c=re(a,t.utils.taggedHashSync(le.aux,s)),{R:u,rx:l,k:f}=ne(t.utils.taggedHashSync(le.nonce,c,o,i)),d=ie(u,f,X(t.utils.taggedHashSync(le.challenge,l,o,i)),a);if(!ce(d,i,o))throw new Error("sign: Invalid signature produced");return d},verifySync:ce},g.BASE._setWindowSize(8);const ue={node:n,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0},le={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},fe={};t.utils={isValidPrivateKey(e){try{return Z(e),!0}catch(e){return!1}},privateAdd:(e,t)=>x(B(Z(e)+Z(t),l.n)),privateNegate:e=>{const t=Z(e);return x(l.n-t)},pointAddScalar:(e,t,r)=>{const n=g.fromHex(e),i=Z(t),a=g.BASE.multiplyAndAddUnsafe(n,i,o);if(!a)throw new Error("Tweaked point at infinity");return a.toRawBytes(r)},pointMultiply:(e,t,r)=>{const n=g.fromHex(e),i=P(O(t));return n.multiply(i).toRawBytes(r)},hashToPrivateKey:e=>{if((e=O(e)).length<40||e.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return x(B(P(e),l.n-o)+o)},randomBytes:(e=32)=>{if(ue.web)return ue.web.getRandomValues(new Uint8Array(e));if(ue.node){const{randomBytes:t}=ue.node;return Uint8Array.from(t(e))}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>t.utils.hashToPrivateKey(t.utils.randomBytes(40)),bytesToHex:_,hexToBytes:C,concatBytes:v,mod:B,invert:M,sha256:async(...e)=>{if(ue.web){const t=await ue.web.subtle.digest("SHA-256",v(...e));return new Uint8Array(t)}if(ue.node){const{createHash:t}=ue.node,r=t("sha256");return e.forEach((e=>r.update(e))),Uint8Array.from(r.digest())}throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(e,...t)=>{if(ue.web){const r=await ue.web.subtle.importKey("raw",e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=v(...t),i=await ue.web.subtle.sign("HMAC",r,n);return new Uint8Array(i)}if(ue.node){const{createHmac:r}=ue.node,n=r("sha256",e);return t.forEach((e=>n.update(e))),Uint8Array.from(n.digest())}throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(e,...r)=>{let n=fe[e];if(void 0===n){const r=await t.utils.sha256(Uint8Array.from(e,(e=>e.charCodeAt(0))));n=v(r,r),fe[e]=n}return t.utils.sha256(n,...r)},taggedHashSync:(e,...r)=>{if("function"!=typeof t.utils.sha256Sync)throw new Error("utils.sha256Sync is undefined, you need to set it");let n=fe[e];if(void 0===n){const r=t.utils.sha256Sync(Uint8Array.from(e,(e=>e.charCodeAt(0))));n=v(r,r),fe[e]=n}return t.utils.sha256Sync(n,...r)},precompute(e=8,t=g.BASE){const r=t===g.BASE?t:new g(t.x,t.y);return r._setWindowSize(e),r.multiply(s),r}}},80101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schnorr=t.Signature=t.Point=t.CURVE=t.utils=t.getSharedSecret=t.recoverPublicKey=t.verify=t.signSync=t.sign=t.getPublicKey=void 0;const n=r(70520),i=r(13426),o=r(65493);var a=r(65493);Object.defineProperty(t,"getPublicKey",{enumerable:!0,get:function(){return a.getPublicKey}}),Object.defineProperty(t,"sign",{enumerable:!0,get:function(){return a.sign}}),Object.defineProperty(t,"signSync",{enumerable:!0,get:function(){return a.signSync}}),Object.defineProperty(t,"verify",{enumerable:!0,get:function(){return a.verify}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return a.recoverPublicKey}}),Object.defineProperty(t,"getSharedSecret",{enumerable:!0,get:function(){return a.getSharedSecret}}),Object.defineProperty(t,"utils",{enumerable:!0,get:function(){return a.utils}}),Object.defineProperty(t,"CURVE",{enumerable:!0,get:function(){return a.CURVE}}),Object.defineProperty(t,"Point",{enumerable:!0,get:function(){return a.Point}}),Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return a.Signature}}),Object.defineProperty(t,"schnorr",{enumerable:!0,get:function(){return a.schnorr}}),o.utils.hmacSha256Sync=(e,...t)=>{const r=n.hmac.create(i.sha256,e);return t.forEach((e=>r.update(e))),r.digest()}},10144:function(e,t,r){"use strict";e=r.nmd(e);var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const i=n(r(91839)),o=r(50300),a=i.default.bool;t.assertBool=a;const s=i.default.bytes;t.assertBytes=s;var c=r(50300);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,o.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.wrapHash=function(e){return t=>(i.default.bytes(t),e(t))},t.crypto=(()=>{const t="object"==typeof self&&"crypto"in self?self.crypto:void 0,r="function"==typeof e.require&&e.require.bind(e);return{node:r&&!t?r("crypto"):void 0,web:t}})()},12113:function(e,t,r){"use strict";var n=r(48834).Buffer,i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var a=o(r(71696)),s=r(55794),c=r(45606),u=r(84001),l=r(77293),f=r(80182),d=r(15374),h=r(80497),p=r(2221),g=function(){function e(e,t,r,n){void 0===e&&(e=new s.BN(0)),void 0===t&&(t=new s.BN(0)),void 0===r&&(r=l.KECCAK256_RLP),void 0===n&&(n=l.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,i=t.stateRoot,o=t.codeHash;return new e(r?new s.BN((0,f.toBuffer)(r)):void 0,n?new s.BN((0,f.toBuffer)(n)):void 0,i?(0,f.toBuffer)(i):void 0,o?(0,f.toBuffer)(o):void 0)},e.fromRlpSerializedAccount=function(e){var t=s.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=i(t,4),n=r[0],o=r[1],a=r[2],c=r[3];return new e(new s.BN(n),new s.BN(o),a,c)},e.prototype._validate=function(){if(this.nonce.lt(new s.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new s.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")},e.prototype.raw=function(){return[(0,p.bnToUnpaddedBuffer)(this.nonce),(0,p.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return s.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(l.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(l.KECCAK256_NULL)},e}();t.Account=g,t.isValidAddress=function(e){try{(0,h.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,h.assertIsHexString)(e);var r=(0,u.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,p.toType)(t,p.TypeOutput.BN).toString()+"0x");for(var i=(0,d.keccakFromString)(n+r).toString("hex"),o="0x",a=0;a<r.length;a++)parseInt(i[a],16)>=8?o+=r[a].toUpperCase():o+=r[a];return o},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){(0,h.assertIsBuffer)(e),(0,h.assertIsBuffer)(t);var r=new s.BN(t);return r.isZero()?(0,d.rlphash)([e,null]).slice(-20):(0,d.rlphash)([e,n.from(r.toArray())]).slice(-20)},t.generateAddress2=function(e,t,r){return(0,h.assertIsBuffer)(e),(0,h.assertIsBuffer)(t),(0,h.assertIsBuffer)(r),(0,a.default)(20===e.length),(0,a.default)(32===t.length),(0,d.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,d.keccak256)(r)])).slice(-20)},t.isValidPrivate=function(e){return(0,c.privateKeyVerify)(e)},t.isValidPublic=function(e,t){return void 0===t&&(t=!1),(0,h.assertIsBuffer)(e),64===e.length?(0,c.publicKeyVerify)(n.concat([n.from([4]),e])):!!t&&(0,c.publicKeyVerify)(e)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),(0,h.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from((0,c.publicKeyConvert)(e,!1).slice(1))),(0,a.default)(64===e.length),(0,d.keccak)(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,h.assertIsBuffer)(e),n.from((0,c.publicKeyCreate)(e,!1)).slice(1)},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,h.assertIsBuffer)(e),64!==e.length&&(e=n.from((0,c.publicKeyConvert)(e,!1).slice(1))),e},t.zeroAddress=function(){var e=(0,f.zeros)(20);return(0,f.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,h.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}},64214:function(e,t,r){"use strict";var n=r(48834).Buffer,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var o=i(r(71696)),a=r(55794),s=r(80182),c=r(12113),u=function(){function e(e){(0,o.default)(20===e.length,"Invalid address length"),this.buf=e}return e.zero=function(){return new e((0,s.zeros)(20))},e.fromString=function(t){return(0,o.default)((0,c.isValidAddress)(t),"Invalid address"),new e((0,s.toBuffer)(t))},e.fromPublicKey=function(t){return(0,o.default)(n.isBuffer(t),"Public key should be Buffer"),new e((0,c.pubToAddress)(t))},e.fromPrivateKey=function(t){return(0,o.default)(n.isBuffer(t),"Private key should be Buffer"),new e((0,c.privateToAddress)(t))},e.generate=function(t,r){return(0,o.default)(a.BN.isBN(r)),new e((0,c.generateAddress)(t.buf,r.toArrayLike(n)))},e.generate2=function(t,r,i){return(0,o.default)(n.isBuffer(r)),(0,o.default)(n.isBuffer(i)),new e((0,c.generateAddress2)(t.buf,r,i))},e.prototype.equals=function(e){return this.buf.equals(e.buf)},e.prototype.isZero=function(){return this.equals(e.zero())},e.prototype.isPrecompileOrSystemAddress=function(){var e=new a.BN(this.buf),t=new a.BN(0),r=new a.BN("ffff","hex");return e.gte(t)&&e.lte(r)},e.prototype.toString=function(){return"0x"+this.buf.toString("hex")},e.prototype.toBuffer=function(){return n.from(this.buf)},e}();t.Address=u},80182:function(e,t,r){"use strict";var n=r(48834).Buffer,i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var a=r(55794),s=r(84001),c=r(80497);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))},t.intToBuffer=function(e){var r=(0,t.intToHex)(e);return n.from((0,s.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};var u=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length<r?(e.copy(i),i):e.slice(0,r):e.length<r?(e.copy(i,r-e.length),i):e.slice(-r)};t.setLengthLeft=function(e,t){return(0,c.assertIsBuffer)(e),u(e,t,!1)},t.setLengthRight=function(e,t){return(0,c.assertIsBuffer)(e),u(e,t,!0)};var l=function(e){for(var t=e[0];e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,c.assertIsBuffer)(e),l(e)},t.unpadArray=function(e){return(0,c.assertIsArray)(e),l(e)},t.unpadHexString=function(e){return(0,c.assertIsHexString)(e),e=(0,s.stripHexPrefix)(e),l(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,s.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return n.from((0,s.padToEven)((0,s.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if(a.BN.isBN(e)){if(e.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(e));return e.toArrayLike(n)}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")},t.bufferToInt=function(e){return new a.BN((0,t.toBuffer)(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.fromSigned=function(e){return new a.BN(e).fromTwos(256)},t.toUnsigned=function(e){return n.from(e.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!=typeof e||(0,s.isHexPrefixed)(e)?e:"0x"+e},t.toUtf8=function(e){if((e=(0,s.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var r=[],i=0;i<e.length;i++)r.push((0,t.baToJSON)(e[i]));return r}},t.validateNoLeadingZeroes=function(e){var t,r;try{for(var n=i(Object.entries(e)),a=n.next();!a.done;a=n.next()){var s=o(a.value,2),c=s[0],u=s[1];if(void 0!==u&&u.length>0&&0===u[0])throw new Error("".concat(c," cannot have leading zeroes, received: ").concat(u.toString("hex")))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):Uint8Array.from(null!=t?t:[])}},77293:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(48834),i=r(55794);t.MAX_UINT64=new i.BN("ffffffffffffffff",16),t.MAX_INTEGER=new i.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new i.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex")},55794:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var s=a(r(62197));t.BN=s.default;var c=o(r(22644));t.rlp=c},15374:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160FromArray=t.ripemd160FromString=t.ripemd160=t.sha256FromArray=t.sha256FromString=t.sha256=t.keccakFromArray=t.keccakFromHexString=t.keccakFromString=t.keccak256=t.keccak=void 0;var i=r(29113),o=r(16162),a=r(55794),s=r(80182),c=r(80497);t.keccak=function(e,t){switch(void 0===t&&(t=256),(0,c.assertIsBuffer)(e),t){case 224:return(0,i.keccak224)(e);case 256:return(0,i.keccak256)(e);case 384:return(0,i.keccak384)(e);case 512:return(0,i.keccak512)(e);default:throw new Error("Invald algorithm: keccak".concat(t))}},t.keccak256=function(e){return(0,t.keccak)(e)},t.keccakFromString=function(e,r){void 0===r&&(r=256),(0,c.assertIsString)(e);var i=n.from(e,"utf8");return(0,t.keccak)(i,r)},t.keccakFromHexString=function(e,r){return void 0===r&&(r=256),(0,c.assertIsHexString)(e),(0,t.keccak)((0,s.toBuffer)(e),r)},t.keccakFromArray=function(e,r){return void 0===r&&(r=256),(0,c.assertIsArray)(e),(0,t.keccak)((0,s.toBuffer)(e),r)};var u=function(e){return e=(0,s.toBuffer)(e),o("sha256").update(e).digest()};t.sha256=function(e){return(0,c.assertIsBuffer)(e),u(e)},t.sha256FromString=function(e){return(0,c.assertIsString)(e),u(e)},t.sha256FromArray=function(e){return(0,c.assertIsArray)(e),u(e)};var l=function(e,t){e=(0,s.toBuffer)(e);var r=o("rmd160").update(e).digest();return!0===t?(0,s.setLengthLeft)(r,32):r};t.ripemd160=function(e,t){return(0,c.assertIsBuffer)(e),l(e,t)},t.ripemd160FromString=function(e,t){return(0,c.assertIsString)(e),l(e,t)},t.ripemd160FromArray=function(e,t){return(0,c.assertIsArray)(e),l(e,t)},t.rlphash=function(e){return(0,t.keccak)(a.rlp.encode(e))}},80497:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var i=r(84001);t.assertIsHexString=function(e){if(!(0,i.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}},t.assertIsBuffer=function(e){if(!n.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}},t.assertIsArray=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}},t.assertIsString=function(e){if("string"!=typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}}},47144:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,i(r(77293),t),i(r(12113),t),i(r(64214),t),i(r(15374),t),i(r(83281),t),i(r(80182),t),i(r(52592),t),i(r(55794),t),i(r(2221),t);var o=r(84001);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}})},84001:(e,t,r)=>{"use strict";var n=r(48834).Buffer;function i(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat(typeof e));return"0"===e[0]&&"x"===e[1]}function o(e){var t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat(typeof t));return t.length%2&&(t="0".concat(t)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=i,t.stripHexPrefix=function(e){if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat(typeof e));return i(e)?e.slice(2):e},t.padToEven=o,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat(typeof e));return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat(typeof e,"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat(typeof t,"'"));return t[r?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2){var i=parseInt(e.substr(r,2),16);t+=String.fromCharCode(i)}return t},t.fromUtf8=function(e){var t=n.from(e,"utf8");return"0x".concat(o(t.toString("hex")).replace(/^0+|0+$/g,""))},t.fromAscii=function(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r).toString(16);t+=n.length<2?"0".concat(n):n}return"0x".concat(t)},t.getKeys=function(e,t,r){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got ".concat(typeof e));if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got ".concat(typeof e));for(var n=[],i=0;i<e.length;i++){var o=e[i][t];if(r&&!o)o="";else if("string"!=typeof o)throw new Error("invalid abi - expected type 'string', received ".concat(typeof o));n.push(o)}return n},t.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}},52592:function(e,t,r){"use strict";var n=r(48834).Buffer,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var o=i(r(71696)),a=r(84001),s=r(55794),c=r(80182);t.defineProperties=function(e,t,r){if(e.raw=[],e._fields=[],e.toJSON=function(t){if(void 0===t&&(t=!1),t){var r={};return e._fields.forEach((function(t){r[t]="0x".concat(e[t].toString("hex"))})),r}return(0,c.baToJSON)(e.raw)},e.serialize=function(){return s.rlp.encode(e.raw)},t.forEach((function(t,r){function i(){return e.raw[r]}function a(i){"00"!==(i=(0,c.toBuffer)(i)).toString("hex")||t.allowZero||(i=n.allocUnsafe(0)),t.allowLess&&t.length?(i=(0,c.unpadBuffer)(i),(0,o.default)(t.length>=i.length,"The field ".concat(t.name," must not have more ").concat(t.length," bytes"))):t.allowZero&&0===i.length||!t.length||(0,o.default)(t.length===i.length,"The field ".concat(t.name," must have byte length of ").concat(t.length)),e.raw[r]=i}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:i,set:a}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:a,get:i})})),r)if("string"==typeof r&&(r=n.from((0,a.stripHexPrefix)(r),"hex")),n.isBuffer(r)&&(r=s.rlp.decode(r)),Array.isArray(r)){if(r.length>e._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(t,r){e[e._fields[r]]=(0,c.toBuffer)(t)}))}else{if("object"!=typeof r)throw new Error("invalid data");var i=Object.keys(r);t.forEach((function(t){-1!==i.indexOf(t.name)&&(e[t.name]=r[t.name]),-1!==i.indexOf(t.alias)&&(e[t.alias]=r[t.alias])}))}}},83281:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var i=r(45606),o=r(55794),a=r(80182),s=r(15374),c=r(80497),u=r(2221);function l(e,t){var r=(0,u.toType)(e,u.TypeOutput.BN);if(r.eqn(0)||r.eqn(1))return(0,u.toType)(e,u.TypeOutput.BN);if(!t)return r.subn(27);var n=(0,u.toType)(t,u.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function f(e){var t=new o.BN(e);return t.eqn(0)||t.eqn(1)}t.ecsign=function(e,t,r){var o=(0,i.ecdsaSign)(e,t),a=o.signature,s=o.recid,c=n.from(a.slice(0,32)),l=n.from(a.slice(32,64));if(!r||"number"==typeof r){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:c,s:l,v:r?s+(2*r+35):s+27}}return{r:c,s:l,v:(0,u.toType)(r,u.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(n)}},t.ecrecover=function(e,t,r,o,s){var c=n.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(o,32)],64),u=l(t,s);if(!f(u))throw new Error("Invalid signature v value");var d=(0,i.ecdsaRecover)(c,u.toNumber(),e);return n.from((0,i.publicKeyConvert)(d,!1).slice(1))},t.toRpcSig=function(e,t,r,i){if(!f(l(e,i)))throw new Error("Invalid signature v value");return(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(r,32),(0,a.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,i){if(!f(l(e,i)))throw new Error("Invalid signature v value");var o=(0,u.toType)(e,u.TypeOutput.Number),s=r;return(o>28&&o%2==1||1===o||28===o)&&((s=n.from(r))[0]|=128),(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(s,32)]))},t.fromRpcSig=function(e){var t,r,n,i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}},t.isValidSignature=function(e,t,r,n,i){void 0===n&&(n=!0);var a=new o.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new o.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!f(l(e,i)))return!1;var c=new o.BN(t),u=new o.BN(r);return!(c.isZero()||c.gt(s)||u.isZero()||u.gt(s)||n&&1===u.cmp(a))},t.hashPersonalMessage=function(e){(0,c.assertIsBuffer)(e);var t=n.from("Ethereum Signed Message:\n".concat(e.length),"utf-8");return(0,s.keccak)(n.concat([t,e]))}},2221:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var i,o=r(55794),a=r(84001),s=r(80182);function c(e){return(0,s.unpadBuffer)(e.toArrayLike(n))}t.bnToHex=function(e){return"0x".concat(e.toString(16))},t.bnToUnpaddedBuffer=c,t.bnToRlp=function(e){return c(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(i=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"==typeof e&&!(0,a.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(e));if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,s.toBuffer)(e);if(t===i.Buffer)return r;if(t===i.BN)return new o.BN(r);if(t===i.Number){var n=new o.BN(r),c=new o.BN(Number.MAX_SAFE_INTEGER.toString());if(n.gt(c))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return n.toNumber()}return"0x".concat(r.toString("hex"))}}},69776:(e,t,r)=>{"use strict";var n=r(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createHashFunction=function(e){return function(t){var r=e();return r.update(t),n.from(r.digest())}}},29113:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(69776),i=r(77270);t.keccak224=n.createHashFunction((function(){return i("keccak224")})),t.keccak256=n.createHashFunction((function(){return i("keccak256")})),t.keccak384=n.createHashFunction((function(){return i("keccak384")})),t.keccak512=n.createHashFunction((function(){return i("keccak512")}))},90311:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95003);t.getRandomBytes=function(e){return new Promise((function(t,r){n(e,(function(e,n){e?r(e):t(n)}))}))},t.getRandomBytesSync=function(e){return n(e)}},45606:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(70939),a=r(90311);t.createPrivateKey=function(){return n(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,a.getRandomBytes(32)];case 1:return e=t.sent(),o.privateKeyVerify(e)?[2,e]:[3,0];case 2:return[2]}}))}))},t.createPrivateKeySync=function(){for(;;){var e=a.getRandomBytesSync(32);if(o.privateKeyVerify(e))return e}},function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(70939))},70939:(e,t,r)=>{e.exports=r(19571)(r(7408))},7408:(e,t,r)=>{const n=new(0,r(87554).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(e){const t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){let r=new o(t);if(r.cmp(i.p)>=0)return null;r=r.toRed(i.red);let a=r.redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===e!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){let a=new o(t),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;const c=a.redSqr().redIMul(a);return s.redSqr().redISub(c.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){const r=t.encode(null,33===e.length);for(let t=0;t<e.length;++t)e[t]=r[t]}e.exports={contextRandomize:()=>0,privateKeyVerify(e){const t=new o(e);return t.cmp(i.n)<0&&!t.isZero()?0:1},privateKeyNegate(e){const t=new o(e),r=i.n.sub(t).umod(i.n).toArrayLike(Uint8Array,"be",32);return e.set(r),0},privateKeyTweakAdd(e,t){const r=new o(t);if(r.cmp(i.n)>=0)return 1;if(r.iadd(new o(e)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul(e,t){let r=new o(t);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(e)),r.cmp(i.n)>=0&&(r=r.umod(i.n));const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:e=>null===a(e)?1:0,publicKeyCreate(e,t){const r=new o(t);return r.cmp(i.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert(e,t){const r=a(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate(e,t){const r=a(t);if(null===r)return 1;const n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine(e,t){const r=new Array(t.length);for(let e=0;e<t.length;++e)if(r[e]=a(t[e]),null===r[e])return 1;let n=r[0].getPublic();for(let e=1;e<r.length;++e)n=n.add(r[e].pub);return n.isInfinity()?2:(s(e,n),0)},publicKeyTweakAdd(e,t,r){const n=a(t);if(null===n)return 1;if((r=new o(r)).cmp(i.n)>=0)return 2;const c=n.getPublic().add(i.g.mul(r));return c.isInfinity()?2:(s(e,c),0)},publicKeyTweakMul(e,t,r){const n=a(t);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize(e){const t=new o(e.subarray(0,32)),r=new o(e.subarray(32,64));return t.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&e.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,t){const r=t.subarray(0,32),n=t.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;const{output:a}=e;let s=a.subarray(4,37);s[0]=0,s.set(r,1);let c=33,u=0;for(;c>1&&0===s[u]&&!(128&s[u+1]);--c,++u);if(s=s.subarray(u),128&s[0])return 1;if(c>1&&0===s[0]&&!(128&s[1]))return 1;let l=a.subarray(39,72);l[0]=0,l.set(n,1);let f=33,d=0;for(;f>1&&0===l[d]&&!(128&l[d+1]);--f,++d);return l=l.subarray(d),128&l[0]||f>1&&0===l[0]&&!(128&l[1])?1:(e.outputlen=6+c+f,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+c]=2,a[5+c]=l.length,a.set(l,6+c),0)},signatureImport(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;const r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;const n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;let a=t.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;let s=t.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");let c=new o(a);c.cmp(i.n)>=0&&(c=new o(0));let u=new o(t.subarray(6+r));return u.cmp(i.n)>=0&&(u=new o(0)),e.set(c.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(e,t,r,a,s){if(s){const e=s;s=n=>{const i=e(t,r,null,a,n);if(!(i instanceof Uint8Array&&32===i.length))throw new Error("This is the way");return new o(i)}}const c=new o(r);if(c.cmp(i.n)>=0||c.isZero())return 1;let u;try{u=n.sign(t,r,{canonical:!0,k:s,pers:a})}catch(e){return 1}return e.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),e.recid=u.recoveryParam,0},ecdsaVerify(e,t,r){const s={r:e.subarray(0,32),s:e.subarray(32,64)},c=new o(s.r),u=new o(s.s);if(c.cmp(i.n)>=0||u.cmp(i.n)>=0)return 1;if(1===u.cmp(n.nh)||c.isZero()||u.isZero())return 3;const l=a(r);if(null===l)return 2;const f=l.getPublic();return n.verify(t,s,f)?0:3},ecdsaRecover(e,t,r,a){const c={r:t.slice(0,32),s:t.slice(32,64)},u=new o(c.r),l=new o(c.s);if(u.cmp(i.n)>=0||l.cmp(i.n)>=0)return 1;if(u.isZero()||l.isZero())return 2;let f;try{f=n.recoverPubKey(a,c,r)}catch(e){return 2}return s(e,f),0},ecdh(e,t,r,s,c,u,l){const f=a(t);if(null===f)return 1;const d=new o(r);if(d.cmp(i.n)>=0||d.isZero())return 2;const h=f.getPublic().mul(d);if(void 0===c){const t=h.encode(null,!0),r=n.hash().update(t).digest();for(let t=0;t<32;++t)e[t]=r[t]}else{u||(u=new Uint8Array(32));const t=h.getX().toArray("be",32);for(let e=0;e<32;++e)u[e]=t[e];l||(l=new Uint8Array(32));const r=h.getY().toArray("be",32);for(let e=0;e<32;++e)l[e]=r[e];const n=c(u,l,s);if(!(n instanceof Uint8Array&&n.length===e.length))return 2;e.set(n)}return 0}}},19571:e=>{const t="Impossible case. Please create issue.",r="The tweak was out of range or the resulted private key is invalid",n="The tweak was out of range or equal to zero",i="Public Key could not be parsed",o="Public Key serialization error",a="Signature could not be parsed";function s(e,t){if(!e)throw new Error(t)}function c(e,t,r){if(s(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==r)if(Array.isArray(r)){const n=`Expected ${e} to be an Uint8Array with length [${r.join(", ")}]`;s(r.includes(t.length),n)}else{const n=`Expected ${e} to be an Uint8Array with length ${r}`;s(t.length===r,n)}}function u(e){s("Boolean"===f(e),"Expected compressed to be a Boolean")}function l(e=(e=>new Uint8Array(e)),t){return"function"==typeof e&&(e=e(t)),c("output",e,t),e}function f(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=e=>({contextRandomize(t){if(s(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&c("seed",t,32),1===e.contextRandomize(t))throw new Error("Unknow error on context randomization")},privateKeyVerify:t=>(c("private key",t,32),0===e.privateKeyVerify(t)),privateKeyNegate(r){switch(c("private key",r,32),e.privateKeyNegate(r)){case 0:return r;case 1:throw new Error(t)}},privateKeyTweakAdd(t,n){switch(c("private key",t,32),c("tweak",n,32),e.privateKeyTweakAdd(t,n)){case 0:return t;case 1:throw new Error(r)}},privateKeyTweakMul(t,r){switch(c("private key",t,32),c("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(n)}},publicKeyVerify:t=>(c("public key",t,[33,65]),0===e.publicKeyVerify(t)),publicKeyCreate(t,r=!0,n){switch(c("private key",t,32),u(r),n=l(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(o)}},publicKeyConvert(t,r=!0,n){switch(c("public key",t,[33,65]),u(r),n=l(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(i);case 2:throw new Error(o)}},publicKeyNegate(r,n=!0,a){switch(c("public key",r,[33,65]),u(n),a=l(a,n?33:65),e.publicKeyNegate(a,r)){case 0:return a;case 1:throw new Error(i);case 2:throw new Error(t);case 3:throw new Error(o)}},publicKeyCombine(t,r=!0,n){s(Array.isArray(t),"Expected public keys to be an Array"),s(t.length>0,"Expected public keys array will have more than zero items");for(const e of t)c("public key",e,[33,65]);switch(u(r),n=l(n,r?33:65),e.publicKeyCombine(n,t)){case 0:return n;case 1:throw new Error(i);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(o)}},publicKeyTweakAdd(t,n,o=!0,a){switch(c("public key",t,[33,65]),c("tweak",n,32),u(o),a=l(a,o?33:65),e.publicKeyTweakAdd(a,t,n)){case 0:return a;case 1:throw new Error(i);case 2:throw new Error(r)}},publicKeyTweakMul(t,r,o=!0,a){switch(c("public key",t,[33,65]),c("tweak",r,32),u(o),a=l(a,o?33:65),e.publicKeyTweakMul(a,t,r)){case 0:return a;case 1:throw new Error(i);case 2:throw new Error(n)}},signatureNormalize(t){switch(c("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(a)}},signatureExport(r,n){c("signature",r,64);const i={output:n=l(n,72),outputlen:72};switch(e.signatureExport(i,r)){case 0:return n.slice(0,i.outputlen);case 1:throw new Error(a);case 2:throw new Error(t)}},signatureImport(r,n){switch(c("signature",r),n=l(n,64),e.signatureImport(n,r)){case 0:return n;case 1:throw new Error(a);case 2:throw new Error(t)}},ecdsaSign(r,n,i={},o){c("message",r,32),c("private key",n,32),s("Object"===f(i),"Expected options to be an Object"),void 0!==i.data&&c("options.data",i.data),void 0!==i.noncefn&&s("Function"===f(i.noncefn),"Expected options.noncefn to be a Function");const a={signature:o=l(o,64),recid:null};switch(e.ecdsaSign(a,r,n,i.data,i.noncefn)){case 0:return a;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(t)}},ecdsaVerify(t,r,n){switch(c("signature",t,64),c("message",r,32),c("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(a);case 2:throw new Error(i)}},ecdsaRecover(r,n,i,o=!0,d){switch(c("signature",r,64),s("Number"===f(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),c("message",i,32),u(o),d=l(d,o?33:65),e.ecdsaRecover(d,r,n,i)){case 0:return d;case 1:throw new Error(a);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(t)}},ecdh(t,r,n={},o){switch(c("public key",t,[33,65]),c("private key",r,32),s("Object"===f(n),"Expected options to be an Object"),void 0!==n.data&&c("options.data",n.data),void 0!==n.hashfn?(s("Function"===f(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&c("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&c("options.ybuf",n.ybuf,32),c("output",o)):o=l(o,32),e.ecdh(o,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return o;case 1:throw new Error(i);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}})},81538:(e,t,r)=>{"use strict";var n=r(48834).Buffer,i=r(38320),o=r(79826);function a(e){var t=e;if("string"!=typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function s(e){return"0x"+e.toString(16)}e.exports={arrayContainsArray:function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(r)?"some":"every"]((function(t){return e.indexOf(t)>=0}))},intToBuffer:function(e){var t=s(e);return new n(a(t.slice(2)),"hex")},getBinarySize:function(e){if("string"!=typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return n.byteLength(e,"utf8")},isHexPrefixed:i,stripHexPrefix:o,padToEven:a,intToHex:s,fromAscii:function(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r).toString(16);t+=n.length<2?"0"+n:n}return"0x"+t},fromUtf8:function(e){return"0x"+a(new n(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")},toAscii:function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2){var i=parseInt(e.substr(r,2),16);t+=String.fromCharCode(i)}return t},toUtf8:function(e){return new n(a(o(e).replace(/^0+|0+$/g,"")),"hex").toString("utf8")},getKeys:function(e,t,r){if(!Array.isArray(e))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof e+"'");if("string"!=typeof t)throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof t+"'.");for(var n=[],i=0;i<e.length;i++){var o=e[i][t];if(r&&!o)o="";else if("string"!=typeof o)throw new Error("invalid abi");n.push(o)}return n},isHexString:function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}}},10161:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i<o;i++)a[i]=n[i].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var c,u,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,i),!0;case 5:return l.fn.call(l.context,t,n,i,o),!0;case 6:return l.fn.call(l.context,t,n,i,o,a),!0}for(u=1,c=new Array(f-1);u<f;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,h=l.length;for(u=0;u<h;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,i);break;default:if(!c)for(d=1,c=new Array(f-1);d<f;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},s.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||a(this,o);else{for(var c=0,u=[],l=s.length;c<l;c++)(s[c].fn!==t||i&&!s[c].once||n&&s[c].context!==n)&&u.push(s[c]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s},22699:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,a,u;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=p(c,u);for(r=0;r<u;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},59341:(e,t,r)=>{var n=r(77834).Buffer,i=r(27993);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),c=n.alloc(o||0),u=n.alloc(0);a>0||o>0;){var l=new i;l.update(u),l.update(e),t&&l.update(t),u=l.digest();var f=0;if(a>0){var d=s.length-a;f=Math.min(a,u.length),u.copy(s,d,0,f),a-=f}if(f<u.length&&o>0){var h=c.length-o,p=Math.min(o,u.length-f);u.copy(c,h,f,f+p),o-=p}}return u.fill(0),{key:s,iv:c}}},69378:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}},77847:e=>{e.exports=a,a.default=a,a.stable=l,a.stableStringify=l;var t="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,t,r,a){var s;void 0===a&&(a=o()),c(e,"",0,[],void 0,0,a);try{s=0===i.length?JSON.stringify(e,t,r):JSON.stringify(e,d(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function s(e,t,r,o){var a=Object.getOwnPropertyDescriptor(o,r);void 0!==a.get?a.configurable?(Object.defineProperty(o,r,{value:e}),n.push([o,r,t,a])):i.push([t,r,e]):(o[r]=e,n.push([o,r,t]))}function c(e,n,i,o,a,u,l){var f;if(u+=1,"object"==typeof e&&null!==e){for(f=0;f<o.length;f++)if(o[f]===e)return void s(r,e,n,a);if(void 0!==l.depthLimit&&u>l.depthLimit)return void s(t,e,n,a);if(void 0!==l.edgesLimit&&i+1>l.edgesLimit)return void s(t,e,n,a);if(o.push(e),Array.isArray(e))for(f=0;f<e.length;f++)c(e[f],f,f,o,e,u,l);else{var d=Object.keys(e);for(f=0;f<d.length;f++){var h=d[f];c(e[h],h,f,o,e,u,l)}}o.pop()}}function u(e,t){return e<t?-1:e>t?1:0}function l(e,t,r,a){void 0===a&&(a=o());var s,c=f(e,"",0,[],void 0,0,a)||e;try{s=0===i.length?JSON.stringify(c,t,r):JSON.stringify(c,d(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function f(e,i,o,a,c,l,d){var h;if(l+=1,"object"==typeof e&&null!==e){for(h=0;h<a.length;h++)if(a[h]===e)return void s(r,e,i,c);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==d.depthLimit&&l>d.depthLimit)return void s(t,e,i,c);if(void 0!==d.edgesLimit&&o+1>d.edgesLimit)return void s(t,e,i,c);if(a.push(e),Array.isArray(e))for(h=0;h<e.length;h++)f(e[h],h,h,a,e,l,d);else{var p={},g=Object.keys(e).sort(u);for(h=0;h<g.length;h++){var m=g[h];f(e[m],m,h,a,e,l,d),p[m]=e[m]}if(void 0===c)return p;n.push([c,i,e]),c[i]=p}a.pop()}}function d(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n];if(o[1]===t&&o[0]===r){r=o[2],i.splice(n,1);break}}return e.call(this,t,r)}}},83243:(e,t,r)=>{"use strict";var n=r(9680),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=function(e,t,r){for(var n=0,i=e.length;n<i;n++)o.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))},s=function(e,t,r){for(var n=0,i=e.length;n<i;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)},c=function(e,t,r){for(var n in e)o.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))};e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=r),"[object Array]"===i.call(e)?a(e,t,o):"string"==typeof e?s(e,t,o):c(e,t,o)}},37795:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,i="[object Function]";e.exports=function(e){var o=this;if("function"!=typeof o||n.call(o)!==i)throw new TypeError(t+o);for(var a,s=r.call(arguments,1),c=function(){if(this instanceof a){var t=o.apply(this,s.concat(r.call(arguments)));return Object(t)===t?t:this}return o.apply(e,s.concat(r.call(arguments)))},u=Math.max(0,o.length-s.length),l=[],f=0;f<u;f++)l.push("$"+f);if(a=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(c),o.prototype){var d=function(){};d.prototype=o.prototype,a.prototype=new d,d.prototype=null}return a}},4090:(e,t,r)=>{"use strict";var n=r(37795);e.exports=Function.prototype.bind||n},67286:(e,t,r)=>{"use strict";var n,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var u=function(){throw new a},l=c?function(){try{return u}catch(e){try{return c(arguments,"callee").get}catch(e){return u}}}():u,f=r(32636)(),d=Object.getPrototypeOf||function(e){return e.__proto__},h={},p="undefined"==typeof Uint8Array?n:d(Uint8Array),g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?d(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":l,"%TypedArray%":p,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},m=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(r=d(i.prototype))}return g[t]=r,r},y={"%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"]},b=r(4090),v=r(23198),w=b.call(Function.call,Array.prototype.concat),A=b.call(Function.apply,Array.prototype.splice),_=b.call(Function.call,String.prototype.replace),E=b.call(Function.call,String.prototype.slice),x=b.call(Function.call,RegExp.prototype.exec),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,C=function(e){var t=E(e,0,1),r=E(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return _(e,k,(function(e,t,r,i){n[n.length]=r?_(i,S,"$1"):t||e})),n},P=function(e,t){var r,n=e;if(v(y,n)&&(n="%"+(r=y[n])[0]+"%"),v(g,n)){var o=g[n];if(o===h&&(o=m(n)),void 0===o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===x(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=C(e),n=r.length>0?r[0]:"",o=P("%"+n+"%",t),s=o.name,u=o.value,l=!1,f=o.alias;f&&(n=f[0],A(r,w([0,1],f)));for(var d=1,h=!0;d<r.length;d+=1){var p=r[d],m=E(p,0,1),y=E(p,-1);if(('"'===m||"'"===m||"`"===m||'"'===y||"'"===y||"`"===y)&&m!==y)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&h||(l=!0),v(g,s="%"+(n+="."+p)+"%"))u=g[s];else if(null!=u){if(!(p in u)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(c&&d+1>=r.length){var b=c(u,p);u=(h=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[p]}else h=v(u,p),u=u[p];h&&!l&&(g[s]=u)}}return u}},81181:(e,t,r)=>{"use strict";var n=r(67286)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},32636:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(66679);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},66679:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},67226:(e,t,r)=>{"use strict";var n=r(66679);e.exports=function(){return n()&&!!Symbol.toStringTag}},23198:(e,t,r)=>{"use strict";var n=r(4090);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},84485:(e,t,r)=>{"use strict";var n=r(50529).Buffer,i=r(67525).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(91285)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var a=0,s=8*e.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},50529:(e,t,r)=>{var n=r(48834),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},34485:(e,t,r)=>{var n=t;n.utils=r(50212),n.common=r(74495),n.sha=r(45530),n.ripemd=r(91396),n.hmac=r(15047),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},74495:(e,t,r)=>{"use strict";var n=r(50212),i=r(79561);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}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},15047:(e,t,r)=>{"use strict";var n=r(50212),i=r(79561);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},91396:(e,t,r)=>{"use strict";var n=r(50212),i=r(74495),o=n.rotl32,a=n.sum32,s=n.sum32_3,c=n.sum32_4,u=i.BlockHash;function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,u),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],l=this.h[4],b=r,v=n,w=i,A=u,_=l,E=0;E<80;E++){var x=a(o(c(r,f(E,n,i,u),e[p[E]+t],d(E)),m[E]),l);r=l,l=u,u=o(i,10),i=n,n=x,x=a(o(c(b,f(79-E,v,w,A),e[g[E]+t],h(E)),y[E]),_),b=_,_=A,A=o(w,10),w=v,v=x}x=s(this.h[1],i,A),this.h[1]=s(this.h[2],u,_),this.h[2]=s(this.h[3],l,b),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,w),this.h[0]=x},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],g=[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],y=[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]},45530:(e,t,r)=>{"use strict";t.sha1=r(35079),t.sha224=r(63823),t.sha256=r(68032),t.sha384=r(25328),t.sha512=r(20168)},35079:(e,t,r)=>{"use strict";var n=r(50212),i=r(74495),o=r(40713),a=n.rotl32,s=n.sum32,c=n.sum32_5,u=o.ft_1,l=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,l),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],l=this.h[2],d=this.h[3],h=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),g=c(a(i,5),u(p,o,l,d),h,r[n],f[p]);h=d,d=l,l=a(o,30),o=i,i=g}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],l),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],h)},d.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},63823:(e,t,r)=>{"use strict";var n=r(50212),i=r(68032);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},68032:(e,t,r)=>{"use strict";var n=r(50212),i=r(74495),o=r(40713),a=r(79561),s=n.sum32,c=n.sum32_4,u=n.sum32_5,l=o.ch32,f=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,g=o.g1_256,m=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(b,m),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=c(g(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],m=this.h[2],y=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],A=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var _=u(A,h(b),l(b,v,w),this.k[n],r[n]),E=s(d(i),f(i,o,m));A=w,w=v,v=b,b=s(y,_),y=m,m=o,o=i,i=s(_,E)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],m),this.h[3]=s(this.h[3],y),this.h[4]=s(this.h[4],b),this.h[5]=s(this.h[5],v),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],A)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},25328:(e,t,r)=>{"use strict";var n=r(50212),i=r(20168);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},20168:(e,t,r)=>{"use strict";var n=r(50212),i=r(74495),o=r(79561),a=n.rotr64_hi,s=n.rotr64_lo,c=n.shr64_hi,u=n.shr64_lo,l=n.sum64,f=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,g=n.sum64_5_hi,m=n.sum64_5_lo,y=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function x(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function k(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function S(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function C(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,y),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=(m=r[n-4],y=r[n-3],b=void 0,(b=a(m,y,19)^a(y,m,29)^c(m,y,6))<0&&(b+=4294967296),b),o=O(r[n-4],r[n-3]),s=r[n-14],u=r[n-13],l=C(r[n-30],r[n-29]),f=P(r[n-30],r[n-29]),d=r[n-32],g=r[n-31];r[n]=h(i,o,s,u,l,f,d,g),r[n+1]=p(i,o,s,u,l,f,d,g)}var m,y,b},v.prototype._update=function(e,t){this._prepareBlock(e,t);var r,n,i,s=this.W,c=this.h[0],u=this.h[1],h=this.h[2],p=this.h[3],y=this.h[4],b=this.h[5],v=this.h[6],C=this.h[7],P=this.h[8],O=this.h[9],I=this.h[10],B=this.h[11],T=this.h[12],M=this.h[13],R=this.h[14],N=this.h[15];o(this.k.length===s.length);for(var j=0;j<s.length;j+=2){var L=R,U=N,D=(i=void 0,(i=a(r=P,n=O,14)^a(r,n,18)^a(n,r,9))<0&&(i+=4294967296),i),F=S(P,O),z=w(P,0,I,0,T),Z=A(0,O,0,B,0,M),H=this.k[j],q=this.k[j+1],W=s[j],K=s[j+1],V=g(L,U,D,F,z,Z,H,q,W,K),G=m(L,U,D,F,z,Z,H,q,W,K);L=x(c,u),U=k(c,u),D=_(c,0,h,0,y),F=E(0,u,0,p,0,b);var $=f(L,U,D,F),J=d(L,U,D,F);R=T,N=M,T=I,M=B,I=P,B=O,P=f(v,C,V,G),O=d(C,C,V,G),v=y,C=b,y=h,b=p,h=c,p=u,c=f(V,G,$,J),u=d(V,G,$,J)}l(this.h,0,c,u),l(this.h,2,h,p),l(this.h,4,y,b),l(this.h,6,v,C),l(this.h,8,P,O),l(this.h,10,I,B),l(this.h,12,T,M),l(this.h,14,R,N)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},40713:(e,t,r)=>{"use strict";var n=r(50212).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},50212:(e,t,r)=>{"use strict";var n=r(79561),i=r(91285);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=a(i)),r+=c(i.toString(16))}return r},t.zero2=s,t.zero8=c,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var a=new Array(o/4),s=0,c=t;s<a.length;s++,c+=4){var u;u="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],a[s]=u>>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o<n?1:0)+r+i;e[t]=a>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var c=0,u=t;return c+=(u=u+n>>>0)<t?1:0,c+=(u=u+o>>>0)<o?1:0,e+r+i+a+(c+=(u=u+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,c,u){var l=0,f=t;return l+=(f=f+n>>>0)<t?1:0,l+=(f=f+o>>>0)<o?1:0,l+=(f=f+s>>>0)<s?1:0,e+r+i+a+c+(l+=(f=f+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,c,u){return t+n+o+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},78873:(e,t,r)=>{"use strict";var n=r(34485),i=r(43022),o=r(79561);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(r),this._reseed++,i.encode(a,t)}},62333:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<<s)-1,u=c>>1,l=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=u}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,l=(1<<u)-1,f=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?d/c:d*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[r+h]=255&a,h+=p,a/=256,u-=8);e[r+h-p]|=128*g}},91285:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},52635:(e,t,r)=>{"use strict";var n=r(67226)(),i=r(62680)("Object.prototype.toString"),o=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},a=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,e.exports=s?o:a},9680:e=>{"use strict";var t,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,t)}catch(e){e!==r&&(i=null)}else i=null;var o=/^\s*class\b/,a=function(e){try{var t=n.call(e);return o.test(t)}catch(e){return!1}},s=function(e){try{return!a(e)&&(n.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var d=document.all;c.call(d)===c.call(document.all)&&(f=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,t)}catch(e){if(e!==r)return!1}return!a(e)&&s(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(u)return s(e);if(a(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},43138:(e,t,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(67226)(),c=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(o.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(e);if(!c)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&c(t)}return c(e)===n}},38320:e=>{e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},37053:e=>{"use strict";e.exports=function(e){return e!=e}},74782:(e,t,r)=>{"use strict";var n=r(89429),i=r(14926),o=r(37053),a=r(40755),s=r(55346),c=n(a(),Number);i(c,{getPolyfill:a,implementation:o,shim:s}),e.exports=c},40755:(e,t,r)=>{"use strict";var n=r(37053);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},55346:(e,t,r)=>{"use strict";var n=r(14926),i=r(40755);e.exports=function(){var e=i();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},58607:e=>{"use strict";const t=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,e.exports=t},50198:(e,t,r)=>{"use strict";var n=r(83243),i=r(62191),o=r(62680),a=o("Object.prototype.toString"),s=r(67226)(),c="undefined"==typeof globalThis?r.g:globalThis,u=i(),l=o("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},f=o("String.prototype.slice"),d={},h=r(29765),p=Object.getPrototypeOf;s&&h&&p&&n(u,(function(e){var t=new c[e];if(Symbol.toStringTag in t){var r=p(t),n=h(r,Symbol.toStringTag);if(!n){var i=p(r);n=h(i,Symbol.toStringTag)}d[e]=n.get}})),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!s||!(Symbol.toStringTag in e)){var t=f(a(e),8,-1);return l(u,t)>-1}return!!h&&function(e){var t=!1;return n(d,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},30775:e=>{e.exports=n,n.strict=i,n.loose=o;var t=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function n(e){return i(e)||o(e)}function i(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function o(e){return r[t.call(e)]}},87414:(e,t,r)=>{"use strict";const n=r(831).v4,i=r(45901),o=function(e,t){if(!(this instanceof o))return new o(e,t);t||(t={}),this.options={reviver:void 0!==t.reviver?t.reviver:null,replacer:void 0!==t.replacer?t.replacer:null,generator:void 0!==t.generator?t.generator:function(){return n()},version:void 0!==t.version?t.version:2,notificationIdNull:"boolean"==typeof t.notificationIdNull&&t.notificationIdNull},this.callServer=e};e.exports=o,o.prototype.request=function(e,t,r,n){const o=this;let a=null;const s=Array.isArray(e)&&"function"==typeof t;if(1===this.options.version&&s)throw new TypeError("JSON-RPC 1.0 does not support batching");if(s||!s&&e&&"object"==typeof e&&"function"==typeof t)n=t,a=e;else{"function"==typeof r&&(n=r,r=void 0);const o="function"==typeof n;try{a=i(e,t,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(e){if(o)return n(e);throw e}if(!o)return a}let c;try{c=JSON.stringify(a,this.options.replacer)}catch(e){return n(e)}return this.callServer(c,(function(e,t){o._parseResponse(e,t,n)})),a},o.prototype._parseResponse=function(e,t,r){if(e)return void r(e);if(!t)return r();let n;try{n=JSON.parse(t,this.options.reviver)}catch(e){return r(e)}if(3===r.length){if(Array.isArray(n)){const e=function(e){return void 0!==e.error},t=function(t){return!e(t)};return r(null,n.filter(e),n.filter(t))}return r(null,n.error,n.result)}r(null,n)}},45901:(e,t,r)=>{"use strict";const n=r(831).v4;e.exports=function(e,t,r,i){if("string"!=typeof e)throw new TypeError(e+" must be a string");const o="number"==typeof(i=i||{}).version?i.version:2;if(1!==o&&2!==o)throw new TypeError(o+" must be 1 or 2");const a={method:e};if(2===o&&(a.jsonrpc="2.0"),t){if("object"!=typeof t&&!Array.isArray(t))throw new TypeError(t+" must be an object, array or omitted");a.params=t}if(void 0===r){const e="function"==typeof i.generator?i.generator:function(){return n()};a.id=e(a,i)}else 2===o&&null===r?i.notificationIdNull&&(a.id=null):a.id=r;return a}},83669:(e,t,r)=>{var n,i=r(34406);!function(){"use strict";var o="input is invalid type",a="object"==typeof window,s=a?window:{};s.JS_SHA3_NO_WINDOW&&(a=!1);var c=!a&&"object"==typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?s=r.g:c&&(s=self);var u=!s.JS_SHA3_NO_COMMON_JS&&e.exports,l=r.amdO,f=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),h=[4,1024,262144,67108864],p=[0,8,16,24],g=[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],m=[224,256,384,512],y=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],v={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!f||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,r){return function(n){return new N(e,t,e).update(n)[r]()}},A=function(e,t,r){return function(n,i){return new N(e,t,i).update(n)[r]()}},_=function(e,t,r){return function(t,n,i,o){return C["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return C["kmac"+e].update(t,n,i,o)[r]()}},x=function(e,t,r,n){for(var i=0;i<b.length;++i){var o=b[i];e[o]=t(r,n,o)}return e},k=function(e,t){var r=w(e,t,"hex");return r.create=function(){return new N(e,t,e)},r.update=function(e){return r.create().update(e)},x(r,w,e,t)},S=[{name:"keccak",padding:[1,256,65536,16777216],bits:m,createMethod:k},{name:"sha3",padding:[6,1536,393216,100663296],bits:m,createMethod:k},{name:"shake",padding:[31,7936,2031616,520093696],bits:y,createMethod:function(e,t){var r=A(e,t,"hex");return r.create=function(r){return new N(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},x(r,A,e,t)}},{name:"cshake",padding:h,bits:y,createMethod:function(e,t){var r=v[e],n=_(e,0,"hex");return n.create=function(n,i,o){return i||o?new N(e,t,n).bytepad([i,o],r):C["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},x(n,_,e,t)}},{name:"kmac",padding:h,bits:y,createMethod:function(e,t){var r=v[e],n=E(e,0,"hex");return n.create=function(n,i,o){return new j(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},x(n,E,e,t)}}],C={},P=[],O=0;O<S.length;++O)for(var I=S[O],B=I.bits,T=0;T<B.length;++T){var M=I.name+"_"+B[T];if(P.push(M),C[M]=I.createMethod(B[T],I.padding),"sha3"!==I.name){var R=I.name+B[T];P.push(R),C[R]=C[M]}}function N(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function j(e,t,r){N.call(this,e,t,r)}N.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,i,a=this.blocks,s=this.byteCount,c=e.length,u=this.blockCount,l=0,d=this.s;l<c;){if(this.reset)for(this.reset=!1,a[0]=this.block,n=1;n<u+1;++n)a[n]=0;if(t)for(n=this.start;l<c&&n<s;++l)a[n>>2]|=e[l]<<p[3&n++];else for(n=this.start;l<c&&n<s;++l)(i=e.charCodeAt(l))<128?a[n>>2]|=i<<p[3&n++]:i<2048?(a[n>>2]|=(192|i>>6)<<p[3&n++],a[n>>2]|=(128|63&i)<<p[3&n++]):i<55296||i>=57344?(a[n>>2]|=(224|i>>12)<<p[3&n++],a[n>>2]|=(128|i>>6&63)<<p[3&n++],a[n>>2]|=(128|63&i)<<p[3&n++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++l)),a[n>>2]|=(240|i>>18)<<p[3&n++],a[n>>2]|=(128|i>>12&63)<<p[3&n++],a[n>>2]|=(128|i>>6&63)<<p[3&n++],a[n>>2]|=(128|63&i)<<p[3&n++]);if(this.lastByteIndex=n,n>=s){for(this.start=n-s,this.block=a[u],n=0;n<u;++n)d[n]^=a[n];L(d),this.reset=!0}else this.start=n}return this},N.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},N.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var a=0;a<e.length;++a){var s=e.charCodeAt(a);s<128?n+=1:s<2048?n+=2:s<55296||s>=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},N.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=t-r%t,o=[];return o.length=i,this.update(o),this},N.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];L(n)}},N.prototype.toString=N.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s="";a<n;){for(o=0;o<t&&a<n;++o,++a)e=r[o],s+=d[e>>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];a%t==0&&(L(r),o=0)}return i&&(e=r[o],s+=d[e>>4&15]+d[15&e],i>1&&(s+=d[e>>12&15]+d[e>>8&15]),i>2&&(s+=d[e>>20&15]+d[e>>16&15])),s},N.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);a<n;){for(o=0;o<t&&a<n;++o,++a)c[a]=r[o];a%t==0&&L(r)}return i&&(c[o]=r[o],e=e.slice(0,s)),e},N.prototype.buffer=N.prototype.arrayBuffer,N.prototype.digest=N.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,a=0,s=0,c=[];s<i;){for(a=0;a<r&&s<i;++a,++s)e=s<<2,t=n[a],c[e]=255&t,c[e+1]=t>>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%r==0&&L(n)}return o&&(e=s<<2,t=n[a],c[e]=255&t,o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c},j.prototype=new N,j.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var L=function(e){var t,r,n,i,o,a,s,c,u,l,f,d,h,p,m,y,b,v,w,A,_,E,x,k,S,C,P,O,I,B,T,M,R,N,j,L,U,D,F,z,Z,H,q,W,K,V,G,$,J,Y,X,Q,ee,te,re,ne,ie,oe,ae,se,ce,ue,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|u>>>31),r=o^(u<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|f>>>31),r=s^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|h>>>31),r=u^(h<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],m=e[1],V=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,O=e[20]<<3|e[21]>>>29,I=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,q=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,j=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,$=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,T=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,M=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,W=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,P=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,Z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,x=e[49]<<14|e[48]>>>18,e[0]=p^~y&v,e[1]=m^~b&w,e[10]=k^~C&O,e[11]=S^~P&I,e[20]=N^~L&D,e[21]=j^~U&F,e[30]=W^~V&$,e[31]=K^~G&J,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~v&A,e[3]=b^~w&_,e[12]=C^~O&B,e[13]=P^~I&T,e[22]=L^~D&z,e[23]=U^~F&Z,e[32]=V^~$&Y,e[33]=G^~J&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ce,e[4]=v^~A&E,e[5]=w^~_&x,e[14]=O^~B&M,e[15]=I^~T&R,e[24]=D^~z&H,e[25]=F^~Z&q,e[34]=$^~Y&Q,e[35]=J^~X&ee,e[44]=oe^~se&ue,e[45]=ae^~ce&le,e[6]=A^~E&p,e[7]=_^~x&m,e[16]=B^~M&k,e[17]=T^~R&S,e[26]=z^~H&N,e[27]=Z^~q&j,e[36]=Y^~Q&W,e[37]=X^~ee&K,e[46]=se^~ue&te,e[47]=ce^~le&re,e[8]=E^~p&y,e[9]=x^~m&b,e[18]=M^~k&C,e[19]=R^~S&P,e[28]=H^~N&L,e[29]=q^~j&U,e[38]=Q^~W&V,e[39]=ee^~K&G,e[48]=ue^~te&ne,e[49]=le^~re&ie,e[0]^=g[n],e[1]^=g[n+1]};if(u)e.exports=C;else{for(O=0;O<P.length;++O)s[P[O]]=C[P[O]];l&&(void 0===(n=function(){return C}.call(t,r,t,e))||(e.exports=n))}}()},23349:e=>{e.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==e.start?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}},79412:(e,t,r)=>{"use strict";var n=r(55484),i=n.ValidatorResult,o=n.SchemaError,a={ignoreProperties:{id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0}},s=a.validators={};function c(e,t,r,n,i){var o=t.throwError,a=t.throwAll;t.throwError=!1,t.throwAll=!1;var s=this.validateSchema(e,i,t,r);return t.throwError=o,t.throwAll=a,!s.valid&&n instanceof Function&&n(s),s.valid}function u(e,t){if(Object.hasOwnProperty.call(e,t))return e[t];if(t in e)for(;e=Object.getPrototypeOf(e);)if(Object.propertyIsEnumerable.call(e,t))return e[t]}function l(e,t,r,n,i,o){if(this.types.object(e)&&(!t.properties||void 0===t.properties[i]))if(!1===t.additionalProperties)o.addError({name:"additionalProperties",argument:i,message:"is not allowed to have the additional property "+JSON.stringify(i)});else{var a=t.additionalProperties||{};"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,i,a,r,n);var s=this.validateSchema(e[i],a,r,n.makeChild(a,i));s.instance!==o.instance[i]&&(o.instance[i]=s.instance),o.importErrors(s)}}s.type=function(e,t,r,n){if(void 0===e)return null;var o=new i(e,t,r,n),a=Array.isArray(t.type)?t.type:[t.type];if(!a.some(this.testType.bind(this,e,t,r,n))){var s=a.map((function(e){if(e){var t=e.$id||e.id;return t?"<"+t+">":e+""}}));o.addError({name:"type",argument:s,message:"is not of a type(s) "+s})}return o},s.anyOf=function(e,t,r,n){if(void 0===e)return null;var a=new i(e,t,r,n),s=new i(e,t,r,n);if(!Array.isArray(t.anyOf))throw new o("anyOf must be an array");if(!t.anyOf.some(c.bind(this,e,r,n,(function(e){s.importErrors(e)})))){var u=t.anyOf.map((function(e,t){var r=e.$id||e.id;return r?"<"+r+">":e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"}));r.nestedErrors&&a.importErrors(s),a.addError({name:"anyOf",argument:u,message:"is not any of "+u.join(",")})}return a},s.allOf=function(e,t,r,n){if(void 0===e)return null;if(!Array.isArray(t.allOf))throw new o("allOf must be an array");var a=new i(e,t,r,n),s=this;return t.allOf.forEach((function(t,i){var o=s.validateSchema(e,t,r,n);if(!o.valid){var c=t.$id||t.id||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+i+"]";a.addError({name:"allOf",argument:{id:c,length:o.errors.length,valid:o},message:"does not match allOf schema "+c+" with "+o.errors.length+" error[s]:"}),a.importErrors(o)}})),a},s.oneOf=function(e,t,r,n){if(void 0===e)return null;if(!Array.isArray(t.oneOf))throw new o("oneOf must be an array");var a=new i(e,t,r,n),s=new i(e,t,r,n),u=t.oneOf.filter(c.bind(this,e,r,n,(function(e){s.importErrors(e)}))).length,l=t.oneOf.map((function(e,t){return e.$id||e.id||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"}));return 1!==u&&(r.nestedErrors&&a.importErrors(s),a.addError({name:"oneOf",argument:l,message:"is not exactly one from "+l.join(",")})),a},s.if=function(e,t,r,o){if(void 0===e)return null;if(!n.isSchema(t.if))throw new Error('Expected "if" keyword to be a schema');var a,s=c.call(this,e,r,o,null,t.if),u=new i(e,t,r,o);if(s){if(void 0===t.then)return;if(!n.isSchema(t.then))throw new Error('Expected "then" keyword to be a schema');a=this.validateSchema(e,t.then,r,o.makeChild(t.then)),u.importErrors(a)}else{if(void 0===t.else)return;if(!n.isSchema(t.else))throw new Error('Expected "else" keyword to be a schema');a=this.validateSchema(e,t.else,r,o.makeChild(t.else)),u.importErrors(a)}return u},s.propertyNames=function(e,t,r,a){if(this.types.object(e)){var s=new i(e,t,r,a),c=void 0!==t.propertyNames?t.propertyNames:{};if(!n.isSchema(c))throw new o('Expected "propertyNames" to be a schema (object or boolean)');for(var l in e)if(void 0!==u(e,l)){var f=this.validateSchema(l,c,r,a.makeChild(c));s.importErrors(f)}return s}},s.properties=function(e,t,r,n){if(this.types.object(e)){var a=new i(e,t,r,n),s=t.properties||{};for(var c in s){var l=s[c];if(void 0!==l){if(null===l)throw new o('Unexpected null, expected schema in "properties"');"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,c,l,r,n);var f=u(e,c),d=this.validateSchema(f,l,r,n.makeChild(l,c));d.instance!==a.instance[c]&&(a.instance[c]=d.instance),a.importErrors(d)}}return a}},s.patternProperties=function(e,t,r,n){if(this.types.object(e)){var a=new i(e,t,r,n),s=t.patternProperties||{};for(var c in e){var u=!0;for(var f in s){var d=s[f];if(void 0!==d){if(null===d)throw new o('Unexpected null, expected schema in "patternProperties"');try{var h=new RegExp(f,"u")}catch(e){h=new RegExp(f)}if(h.test(c)){u=!1,"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,c,d,r,n);var p=this.validateSchema(e[c],d,r,n.makeChild(d,c));p.instance!==a.instance[c]&&(a.instance[c]=p.instance),a.importErrors(p)}}}u&&l.call(this,e,t,r,n,c,a)}return a}},s.additionalProperties=function(e,t,r,n){if(this.types.object(e)){if(t.patternProperties)return null;var o=new i(e,t,r,n);for(var a in e)l.call(this,e,t,r,n,a,o);return o}},s.minProperties=function(e,t,r,n){if(this.types.object(e)){var o=new i(e,t,r,n);return Object.keys(e).length>=t.minProperties||o.addError({name:"minProperties",argument:t.minProperties,message:"does not meet minimum property length of "+t.minProperties}),o}},s.maxProperties=function(e,t,r,n){if(this.types.object(e)){var o=new i(e,t,r,n);return Object.keys(e).length<=t.maxProperties||o.addError({name:"maxProperties",argument:t.maxProperties,message:"does not meet maximum property length of "+t.maxProperties}),o}},s.items=function(e,t,r,n){var o=this;if(this.types.array(e)&&void 0!==t.items){var a=new i(e,t,r,n);return e.every((function(e,i){if(Array.isArray(t.items))var s=void 0===t.items[i]?t.additionalItems:t.items[i];else s=t.items;if(void 0===s)return!0;if(!1===s)return a.addError({name:"items",message:"additionalItems not permitted"}),!1;var c=o.validateSchema(e,s,r,n.makeChild(s,i));return c.instance!==a.instance[i]&&(a.instance[i]=c.instance),a.importErrors(c),!0})),a}},s.contains=function(e,t,r,o){var a=this;if(this.types.array(e)&&void 0!==t.contains){if(!n.isSchema(t.contains))throw new Error('Expected "contains" keyword to be a schema');var s=new i(e,t,r,o);return!1===e.some((function(e,n){return 0===a.validateSchema(e,t.contains,r,o.makeChild(t.contains,n)).errors.length}))&&s.addError({name:"contains",argument:t.contains,message:"must contain an item matching given schema"}),s}},s.minimum=function(e,t,r,n){if(this.types.number(e)){var o=new i(e,t,r,n);return t.exclusiveMinimum&&!0===t.exclusiveMinimum?e>t.minimum||o.addError({name:"minimum",argument:t.minimum,message:"must be greater than "+t.minimum}):e>=t.minimum||o.addError({name:"minimum",argument:t.minimum,message:"must be greater than or equal to "+t.minimum}),o}},s.maximum=function(e,t,r,n){if(this.types.number(e)){var o=new i(e,t,r,n);return t.exclusiveMaximum&&!0===t.exclusiveMaximum?e<t.maximum||o.addError({name:"maximum",argument:t.maximum,message:"must be less than "+t.maximum}):e<=t.maximum||o.addError({name:"maximum",argument:t.maximum,message:"must be less than or equal to "+t.maximum}),o}},s.exclusiveMinimum=function(e,t,r,n){if("boolean"!=typeof t.exclusiveMinimum&&this.types.number(e)){var o=new i(e,t,r,n);return e>t.exclusiveMinimum||o.addError({name:"exclusiveMinimum",argument:t.exclusiveMinimum,message:"must be strictly greater than "+t.exclusiveMinimum}),o}},s.exclusiveMaximum=function(e,t,r,n){if("boolean"!=typeof t.exclusiveMaximum&&this.types.number(e)){var o=new i(e,t,r,n);return e<t.exclusiveMaximum||o.addError({name:"exclusiveMaximum",argument:t.exclusiveMaximum,message:"must be strictly less than "+t.exclusiveMaximum}),o}};var f=function(e,t,r,a,s,c){if(this.types.number(e)){var u=t[s];if(0==u)throw new o(s+" cannot be zero");var l=new i(e,t,r,a),f=n.getDecimalPlaces(e),d=n.getDecimalPlaces(u),h=Math.max(f,d),p=Math.pow(10,h);return Math.round(e*p)%Math.round(u*p)!=0&&l.addError({name:s,argument:u,message:c+JSON.stringify(u)}),l}};function d(e,t,r){var i,o=r.length;for(i=t+1;i<o;i++)if(n.deepCompareStrict(e,r[i]))return!1;return!0}s.multipleOf=function(e,t,r,n){return f.call(this,e,t,r,n,"multipleOf","is not a multiple of (divisible by) ")},s.divisibleBy=function(e,t,r,n){return f.call(this,e,t,r,n,"divisibleBy","is not divisible by (multiple of) ")},s.required=function(e,t,r,n){var o=new i(e,t,r,n);return void 0===e&&!0===t.required?o.addError({name:"required",message:"is required"}):this.types.object(e)&&Array.isArray(t.required)&&t.required.forEach((function(t){void 0===u(e,t)&&o.addError({name:"required",argument:t,message:"requires property "+JSON.stringify(t)})})),o},s.pattern=function(e,t,r,n){if(this.types.string(e)){var o=new i(e,t,r,n),a=t.pattern;try{var s=new RegExp(a,"u")}catch(e){s=new RegExp(a)}return e.match(s)||o.addError({name:"pattern",argument:t.pattern,message:"does not match pattern "+JSON.stringify(t.pattern.toString())}),o}},s.format=function(e,t,r,o){if(void 0!==e){var a=new i(e,t,r,o);return a.disableFormat||n.isFormat(e,t.format,this)||a.addError({name:"format",argument:t.format,message:"does not conform to the "+JSON.stringify(t.format)+" format"}),a}},s.minLength=function(e,t,r,n){if(this.types.string(e)){var o=new i(e,t,r,n),a=e.match(/[\uDC00-\uDFFF]/g);return e.length-(a?a.length:0)>=t.minLength||o.addError({name:"minLength",argument:t.minLength,message:"does not meet minimum length of "+t.minLength}),o}},s.maxLength=function(e,t,r,n){if(this.types.string(e)){var o=new i(e,t,r,n),a=e.match(/[\uDC00-\uDFFF]/g);return e.length-(a?a.length:0)<=t.maxLength||o.addError({name:"maxLength",argument:t.maxLength,message:"does not meet maximum length of "+t.maxLength}),o}},s.minItems=function(e,t,r,n){if(this.types.array(e)){var o=new i(e,t,r,n);return e.length>=t.minItems||o.addError({name:"minItems",argument:t.minItems,message:"does not meet minimum length of "+t.minItems}),o}},s.maxItems=function(e,t,r,n){if(this.types.array(e)){var o=new i(e,t,r,n);return e.length<=t.maxItems||o.addError({name:"maxItems",argument:t.maxItems,message:"does not meet maximum length of "+t.maxItems}),o}},s.uniqueItems=function(e,t,r,n){if(!0===t.uniqueItems&&this.types.array(e)){var o=new i(e,t,r,n);return e.every(d)||o.addError({name:"uniqueItems",message:"contains duplicate item"}),o}},s.dependencies=function(e,t,r,n){if(this.types.object(e)){var o=new i(e,t,r,n);for(var a in t.dependencies)if(void 0!==e[a]){var s=t.dependencies[a],c=n.makeChild(s,a);if("string"==typeof s&&(s=[s]),Array.isArray(s))s.forEach((function(t){void 0===e[t]&&o.addError({name:"dependencies",argument:c.propertyPath,message:"property "+t+" not found, required by "+c.propertyPath})}));else{var u=this.validateSchema(e,s,r,c);o.instance!==u.instance&&(o.instance=u.instance),u&&u.errors.length&&(o.addError({name:"dependencies",argument:c.propertyPath,message:"does not meet dependency required by "+c.propertyPath}),o.importErrors(u))}}return o}},s.enum=function(e,t,r,a){if(void 0===e)return null;if(!Array.isArray(t.enum))throw new o("enum expects an array",t);var s=new i(e,t,r,a);return t.enum.some(n.deepCompareStrict.bind(null,e))||s.addError({name:"enum",argument:t.enum,message:"is not one of enum values: "+t.enum.map(String).join(",")}),s},s.const=function(e,t,r,o){if(void 0===e)return null;var a=new i(e,t,r,o);return n.deepCompareStrict(t.const,e)||a.addError({name:"const",argument:t.const,message:"does not exactly match expected constant: "+t.const}),a},s.not=s.disallow=function(e,t,r,n){var o=this;if(void 0===e)return null;var a=new i(e,t,r,n),s=t.not||t.disallow;return s?(Array.isArray(s)||(s=[s]),s.forEach((function(i){if(o.testType(e,t,r,n,i)){var s=i&&(i.$id||i.id)||i;a.addError({name:"not",argument:s,message:"is of prohibited type "+s})}})),a):null},e.exports=a},55484:(e,t,r)=>{"use strict";var n=r(883),i=t.ValidationError=function(e,t,r,n,i,o){if(Array.isArray(n)?(this.path=n,this.property=n.reduce((function(e,t){return e+f(t)}),"instance")):void 0!==n&&(this.property=n),e&&(this.message=e),r){var a=r.$id||r.id;this.schema=a||r}void 0!==t&&(this.instance=t),this.name=i,this.argument=o,this.stack=this.toString()};i.prototype.toString=function(){return this.property+" "+this.message};var o=t.ValidatorResult=function(e,t,r,n){this.instance=e,this.schema=t,this.options=r,this.path=n.path,this.propertyPath=n.propertyPath,this.errors=[],this.throwError=r&&r.throwError,this.throwFirst=r&&r.throwFirst,this.throwAll=r&&r.throwAll,this.disableFormat=r&&!0===r.disableFormat};function a(e,t){return t+": "+e.toString()+"\n"}function s(e){Error.captureStackTrace&&Error.captureStackTrace(this,s),this.instance=e.instance,this.schema=e.schema,this.options=e.options,this.errors=e.errors}o.prototype.addError=function(e){var t;if("string"==typeof e)t=new i(e,this.instance,this.schema,this.path);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");t=new i(e.message,this.instance,this.schema,this.path,e.name,e.argument)}if(this.errors.push(t),this.throwFirst)throw new s(this);if(this.throwError)throw t;return t},o.prototype.importErrors=function(e){"string"==typeof e||e&&e.validatorType?this.addError(e):e&&e.errors&&(this.errors=this.errors.concat(e.errors))},o.prototype.toString=function(e){return this.errors.map(a).join("")},Object.defineProperty(o.prototype,"valid",{get:function(){return!this.errors.length}}),e.exports.ValidatorResultError=s,s.prototype=new Error,s.prototype.constructor=s,s.prototype.name="Validation Error";var c=t.SchemaError=function e(t,r){this.message=t,this.schema=r,Error.call(this,t),Error.captureStackTrace(this,e)};c.prototype=Object.create(Error.prototype,{constructor:{value:c,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var u=t.SchemaContext=function(e,t,r,n,i){this.schema=e,this.options=t,Array.isArray(r)?(this.path=r,this.propertyPath=r.reduce((function(e,t){return e+f(t)}),"instance")):this.propertyPath=r,this.base=n,this.schemas=i};u.prototype.resolve=function(e){return n.resolve(this.base,e)},u.prototype.makeChild=function(e,t){var r=void 0===t?this.path:this.path.concat([t]),i=e.$id||e.id,o=n.resolve(this.base,i||""),a=new u(e,this.options,r,o,Object.create(this.schemas));return i&&!a.schemas[o]&&(a.schemas[o]=e),a};var l=t.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"uri-template":/(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,"json-pointer":/^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,"relative-json-pointer":/^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"utc-millisec":function(e){return"string"==typeof e&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)},regex:function(e){var t=!0;try{new RegExp(e)}catch(e){t=!1}return t},style:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};l.regexp=l.regex,l.pattern=l.regex,l.ipv4=l["ip-address"],t.isFormat=function(e,t,r){if("string"==typeof e&&void 0!==l[t]){if(l[t]instanceof RegExp)return l[t].test(e);if("function"==typeof l[t])return l[t](e)}else if(r&&r.customFormats&&"function"==typeof r.customFormats[t])return r.customFormats[t](e);return!0};var f=t.makeSuffix=function(e){return(e=e.toString()).match(/[.\s\[\]]/)||e.match(/^[\d]/)?e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]":"."+e};function d(e,t,r,n){"object"==typeof r?t[n]=g(e[n],r):-1===e.indexOf(r)&&t.push(r)}function h(e,t,r){t[r]=e[r]}function p(e,t,r,n){"object"==typeof t[n]&&t[n]&&e[n]?r[n]=g(e[n],t[n]):r[n]=t[n]}function g(e,t){var r=Array.isArray(t),n=r&&[]||{};return r?(e=e||[],n=n.concat(e),t.forEach(d.bind(null,e,n))):(e&&"object"==typeof e&&Object.keys(e).forEach(h.bind(null,e,n)),Object.keys(t).forEach(p.bind(null,e,t,n))),n}function m(e){return"/"+encodeURIComponent(e).replace(/~/g,"%7E")}t.deepCompareStrict=function e(t,r){if(typeof t!=typeof r)return!1;if(Array.isArray(t))return!!Array.isArray(r)&&t.length===r.length&&t.every((function(n,i){return e(t[i],r[i])}));if("object"==typeof t){if(!t||!r)return t===r;var n=Object.keys(t),i=Object.keys(r);return n.length===i.length&&n.every((function(n){return e(t[n],r[n])}))}return t===r},e.exports.deepMerge=g,t.objectGetPath=function(e,t){for(var r,n=t.split("/").slice(1);"string"==typeof(r=n.shift());){var i=decodeURIComponent(r.replace(/~0/,"~").replace(/~1/g,"/"));if(!(i in e))return;e=e[i]}return e},t.encodePath=function(e){return e.map(m).join("")},t.getDecimalPlaces=function(e){var t=0;if(isNaN(e))return t;"number"!=typeof e&&(e=Number(e));var r=e.toString().split("e");if(2===r.length){if("-"!==r[1][0])return t;t=Number(r[1].slice(1))}var n=r[0].split(".");return 2===n.length&&(t+=n[1].length),t},t.isSchema=function(e){return"object"==typeof e&&e||"boolean"==typeof e}},663:(e,t,r)=>{"use strict";var n=e.exports.Validator=r(99852);e.exports.ValidatorResult=r(55484).ValidatorResult,e.exports.ValidatorResultError=r(55484).ValidatorResultError,e.exports.ValidationError=r(55484).ValidationError,e.exports.SchemaError=r(55484).SchemaError,e.exports.SchemaScanResult=r(66456).SchemaScanResult,e.exports.scan=r(66456).scan,e.exports.validate=function(e,t,r){return(new n).validate(e,t,r)}},66456:(e,t,r)=>{"use strict";var n=r(883),i=r(55484);function o(e,t){this.id=e,this.ref=t}e.exports.SchemaScanResult=o,e.exports.scan=function(e,t){function r(e,t){if(t&&"object"==typeof t)if(t.$ref){var o=n.resolve(e,t.$ref);u[o]=u[o]?u[o]+1:0}else{var l=t.$id||t.id,f=l?n.resolve(e,l):e;if(f){if(f.indexOf("#")<0&&(f+="#"),c[f]){if(!i.deepCompareStrict(c[f],t))throw new Error("Schema <"+f+"> already exists with different definition");return c[f]}c[f]=t,"#"==f[f.length-1]&&(c[f.substring(0,f.length-1)]=t)}a(f+"/items",Array.isArray(t.items)?t.items:[t.items]),a(f+"/extends",Array.isArray(t.extends)?t.extends:[t.extends]),r(f+"/additionalItems",t.additionalItems),s(f+"/properties",t.properties),r(f+"/additionalProperties",t.additionalProperties),s(f+"/definitions",t.definitions),s(f+"/patternProperties",t.patternProperties),s(f+"/dependencies",t.dependencies),a(f+"/disallow",t.disallow),a(f+"/allOf",t.allOf),a(f+"/anyOf",t.anyOf),a(f+"/oneOf",t.oneOf),r(f+"/not",t.not)}}function a(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)r(e+"/"+n,t[n])}function s(e,t){if(t&&"object"==typeof t)for(var n in t)r(e+"/"+n,t[n])}var c={},u={};return r(e,t),new o(c,u)}},99852:(e,t,r)=>{"use strict";var n=r(883),i=r(79412),o=r(55484),a=r(66456).scan,s=o.ValidatorResult,c=o.ValidatorResultError,u=o.SchemaError,l=o.SchemaContext,f=function e(){this.customFormats=Object.create(e.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(h),this.attributes=Object.create(i.validators)};function d(e){var t="string"==typeof e?e:e.$ref;return"string"==typeof t&&t}f.prototype.customFormats={},f.prototype.schemas=null,f.prototype.types=null,f.prototype.attributes=null,f.prototype.unresolvedRefs=null,f.prototype.addSchema=function(e,t){var r=this;if(!e)return null;var n=a(t||"/",e),i=t||e.$id||e.id;for(var o in n.id)this.schemas[o]=n.id[o];for(var o in n.ref)this.unresolvedRefs.push(o);return this.unresolvedRefs=this.unresolvedRefs.filter((function(e){return void 0===r.schemas[e]})),this.schemas[i]},f.prototype.addSubSchemaArray=function(e,t){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addSubSchema(e,t[r])},f.prototype.addSubSchemaObject=function(e,t){if(t&&"object"==typeof t)for(var r in t)this.addSubSchema(e,t[r])},f.prototype.setSchemas=function(e){this.schemas=e},f.prototype.getSchema=function(e){return this.schemas[e]},f.prototype.validate=function(e,t,r,i){if("boolean"!=typeof t&&"object"!=typeof t||null===t)throw new u("Expected `schema` to be an object or boolean");r||(r={});var o,f=t.$id||t.id,d=n.resolve(r.base||"/",f||"");if(!i){(i=new l(t,r,[],d,Object.create(this.schemas))).schemas[d]||(i.schemas[d]=t);var h=a(d,t);for(var p in h.id){var g=h.id[p];i.schemas[p]=g}}if(r.required&&void 0===e)return(o=new s(e,t,r,i)).addError("is required, but is undefined"),o;if(!(o=this.validateSchema(e,t,r,i)))throw new Error("Result undefined");if(r.throwAll&&o.errors.length)throw new c(o);return o},f.prototype.validateSchema=function(e,t,r,n){var a=new s(e,t,r,n);if("boolean"==typeof t)!0===t?t={}:!1===t&&(t={type:[]});else if(!t)throw new Error("schema is undefined");if(t.extends)if(Array.isArray(t.extends)){var c={schema:t,ctx:n};t.extends.forEach(this.schemaTraverser.bind(this,c)),t=c.schema,c.schema=null,c.ctx=null,c=null}else t=o.deepMerge(t,this.superResolve(t.extends,n));var f=d(t);if(f){var h=this.resolve(t,f,n),p=new l(h.subschema,r,n.path,h.switchSchema,n.schemas);return this.validateSchema(e,h.subschema,r,p)}var g=r&&r.skipAttributes||[];for(var m in t)if(!i.ignoreProperties[m]&&g.indexOf(m)<0){var y=null,b=this.attributes[m];if(b)y=b.call(this,e,t,r,n);else if(!1===r.allowUnknownAttributes)throw new u("Unsupported attribute: "+m,t);y&&a.importErrors(y)}if("function"==typeof r.rewrite){var v=r.rewrite.call(this,e,t,r,n);a.instance=v}return a},f.prototype.schemaTraverser=function(e,t){e.schema=o.deepMerge(e.schema,this.superResolve(t,e.ctx))},f.prototype.superResolve=function(e,t){var r=d(e);return r?this.resolve(e,r,t).subschema:e},f.prototype.resolve=function(e,t,r){if(t=r.resolve(t),r.schemas[t])return{subschema:r.schemas[t],switchSchema:t};var i=n.parse(t),a=i&&i.hash,s=a&&a.length&&t.substr(0,t.length-a.length);if(!s||!r.schemas[s])throw new u("no such schema <"+t+">",e);var c=o.objectGetPath(r.schemas[s],a.substr(1));if(void 0===c)throw new u("no such schema "+a+" located in <"+s+">",e);return{subschema:c,switchSchema:t}},f.prototype.testType=function(e,t,r,n,i){if(void 0!==i){if(null===i)throw new u('Unexpected null in "type" keyword');if("function"==typeof this.types[i])return this.types[i].call(this,e);if(i&&"object"==typeof i){var o=this.validateSchema(e,i,r,n);return void 0===o||!(o&&o.errors.length)}return!0}};var h=f.prototype.types={};h.string=function(e){return"string"==typeof e},h.number=function(e){return"number"==typeof e&&isFinite(e)},h.integer=function(e){return"number"==typeof e&&e%1==0},h.boolean=function(e){return"boolean"==typeof e},h.array=function(e){return Array.isArray(e)},h.null=function(e){return null===e},h.date=function(e){return e instanceof Date},h.any=function(e){return!0},h.object=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof Date)},e.exports=f},77270:(e,t,r)=>{e.exports=r(83249)(r(55270))},83249:(e,t,r)=>{const n=r(42532),i=r(14255);e.exports=function(e){const t=n(e),r=i(e);return function(e,n){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+e)}}}},42532:(e,t,r)=>{var n=r(48834).Buffer;const{Transform:i}=r(67525);e.exports=e=>class t extends i{constructor(t,r,n,i,o){super(o),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=o,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(e){n=e}r(n)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},14255:(e,t,r)=>{var n=r(48834).Buffer;const{Transform:i}=r(67525);e.exports=e=>class t extends i{constructor(t,r,n,i){super(i),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(e){n=e}r(n)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},53877:(e,t)=>{const r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(let t=0;t<24;++t){const n=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],f=e[8]^e[18]^e[28]^e[38]^e[48],d=e[9]^e[19]^e[29]^e[39]^e[49];let h=f^(o<<1|a>>>31),p=d^(a<<1|o>>>31);const g=e[0]^h,m=e[1]^p,y=e[10]^h,b=e[11]^p,v=e[20]^h,w=e[21]^p,A=e[30]^h,_=e[31]^p,E=e[40]^h,x=e[41]^p;h=n^(s<<1|c>>>31),p=i^(c<<1|s>>>31);const k=e[2]^h,S=e[3]^p,C=e[12]^h,P=e[13]^p,O=e[22]^h,I=e[23]^p,B=e[32]^h,T=e[33]^p,M=e[42]^h,R=e[43]^p;h=o^(u<<1|l>>>31),p=a^(l<<1|u>>>31);const N=e[4]^h,j=e[5]^p,L=e[14]^h,U=e[15]^p,D=e[24]^h,F=e[25]^p,z=e[34]^h,Z=e[35]^p,H=e[44]^h,q=e[45]^p;h=s^(f<<1|d>>>31),p=c^(d<<1|f>>>31);const W=e[6]^h,K=e[7]^p,V=e[16]^h,G=e[17]^p,$=e[26]^h,J=e[27]^p,Y=e[36]^h,X=e[37]^p,Q=e[46]^h,ee=e[47]^p;h=u^(n<<1|i>>>31),p=l^(i<<1|n>>>31);const te=e[8]^h,re=e[9]^p,ne=e[18]^h,ie=e[19]^p,oe=e[28]^h,ae=e[29]^p,se=e[38]^h,ce=e[39]^p,ue=e[48]^h,le=e[49]^p,fe=g,de=m,he=b<<4|y>>>28,pe=y<<4|b>>>28,ge=v<<3|w>>>29,me=w<<3|v>>>29,ye=_<<9|A>>>23,be=A<<9|_>>>23,ve=E<<18|x>>>14,we=x<<18|E>>>14,Ae=k<<1|S>>>31,_e=S<<1|k>>>31,Ee=P<<12|C>>>20,xe=C<<12|P>>>20,ke=O<<10|I>>>22,Se=I<<10|O>>>22,Ce=T<<13|B>>>19,Pe=B<<13|T>>>19,Oe=M<<2|R>>>30,Ie=R<<2|M>>>30,Be=j<<30|N>>>2,Te=N<<30|j>>>2,Me=L<<6|U>>>26,Re=U<<6|L>>>26,Ne=F<<11|D>>>21,je=D<<11|F>>>21,Le=z<<15|Z>>>17,Ue=Z<<15|z>>>17,De=q<<29|H>>>3,Fe=H<<29|q>>>3,ze=W<<28|K>>>4,Ze=K<<28|W>>>4,He=G<<23|V>>>9,qe=V<<23|G>>>9,We=$<<25|J>>>7,Ke=J<<25|$>>>7,Ve=Y<<21|X>>>11,Ge=X<<21|Y>>>11,$e=ee<<24|Q>>>8,Je=Q<<24|ee>>>8,Ye=te<<27|re>>>5,Xe=re<<27|te>>>5,Qe=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,nt=se<<8|ce>>>24,it=ce<<8|se>>>24,ot=ue<<14|le>>>18,at=le<<14|ue>>>18;e[0]=fe^~Ee&Ne,e[1]=de^~xe&je,e[10]=ze^~Qe&ge,e[11]=Ze^~et&me,e[20]=Ae^~Me&We,e[21]=_e^~Re&Ke,e[30]=Ye^~he&ke,e[31]=Xe^~pe&Se,e[40]=Be^~He&tt,e[41]=Te^~qe&rt,e[2]=Ee^~Ne&Ve,e[3]=xe^~je&Ge,e[12]=Qe^~ge&Ce,e[13]=et^~me&Pe,e[22]=Me^~We&nt,e[23]=Re^~Ke&it,e[32]=he^~ke&Le,e[33]=pe^~Se&Ue,e[42]=He^~tt&ye,e[43]=qe^~rt&be,e[4]=Ne^~Ve&ot,e[5]=je^~Ge&at,e[14]=ge^~Ce&De,e[15]=me^~Pe&Fe,e[24]=We^~nt&ve,e[25]=Ke^~it&we,e[34]=ke^~Le&$e,e[35]=Se^~Ue&Je,e[44]=tt^~ye&Oe,e[45]=rt^~be&Ie,e[6]=Ve^~ot&fe,e[7]=Ge^~at&de,e[16]=Ce^~De&ze,e[17]=Pe^~Fe&Ze,e[26]=nt^~ve&Ae,e[27]=it^~we&_e,e[36]=Le^~$e&Ye,e[37]=Ue^~Je&Xe,e[46]=ye^~Oe&Be,e[47]=be^~Ie&Te,e[8]=ot^~fe&Ee,e[9]=at^~de&xe,e[18]=De^~ze&Qe,e[19]=Fe^~Ze&et,e[28]=ve^~Ae&Me,e[29]=we^~_e&Re,e[38]=$e^~Ye&he,e[39]=Je^~Xe&pe,e[48]=Oe^~Be&He,e[49]=Ie^~Te&qe,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},55270:(e,t,r)=>{var n=r(48834).Buffer;const i=r(53877);function o(){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}o.prototype.initialize=function(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0)},o.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<this.count%4*8,0!=(128&e)&&this.count===this.blockSize-1&&i.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,i.p1600(this.state),this.count=0,this.squeezing=!0},o.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=n.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return t},o.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=o},9907:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",c="[object Function]",u="[object GeneratorFunction]",l="[object Map]",f="[object Number]",d="[object Object]",h="[object Promise]",p="[object RegExp]",g="[object Set]",m="[object String]",y="[object Symbol]",b="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",A="[object Float32Array]",_="[object Float64Array]",E="[object Int8Array]",x="[object Int16Array]",k="[object Int32Array]",S="[object Uint8Array]",C="[object Uint8ClampedArray]",P="[object Uint16Array]",O="[object Uint32Array]",I=/\w*$/,B=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,M={};M[o]=M["[object Array]"]=M[v]=M[w]=M[a]=M[s]=M[A]=M[_]=M[E]=M[x]=M[k]=M[l]=M[f]=M[d]=M[p]=M[g]=M[m]=M[y]=M[S]=M[C]=M[P]=M[O]=!0,M["[object Error]"]=M[c]=M[b]=!1;var R="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,N="object"==typeof self&&self&&self.Object===Object&&self,j=R||N||Function("return this")(),L=t&&!t.nodeType&&t,U=L&&e&&!e.nodeType&&e,D=U&&U.exports===L;function F(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function Z(e,t,r,n){var i=-1,o=e?e.length:0;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function H(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function q(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function W(e,t){return function(r){return e(t(r))}}function K(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var V,G=Array.prototype,$=Function.prototype,J=Object.prototype,Y=j["__core-js_shared__"],X=(V=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+V:"",Q=$.toString,ee=J.hasOwnProperty,te=J.toString,re=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=D?j.Buffer:void 0,ie=j.Symbol,oe=j.Uint8Array,ae=W(Object.getPrototypeOf,Object),se=Object.create,ce=J.propertyIsEnumerable,ue=G.splice,le=Object.getOwnPropertySymbols,fe=ne?ne.isBuffer:void 0,de=W(Object.keys,Object),he=je(j,"DataView"),pe=je(j,"Map"),ge=je(j,"Promise"),me=je(j,"Set"),ye=je(j,"WeakMap"),be=je(Object,"create"),ve=ze(he),we=ze(pe),Ae=ze(ge),_e=ze(me),Ee=ze(ye),xe=ie?ie.prototype:void 0,ke=xe?xe.valueOf:void 0;function Se(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ce(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Pe(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Oe(e){this.__data__=new Ce(e)}function Ie(e,t,r){var n=e[t];ee.call(e,t)&&Ze(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function Be(e,t){for(var r=e.length;r--;)if(Ze(e[r][0],t))return r;return-1}function Te(e,t,r,n,i,h,b){var B;if(n&&(B=h?n(e,i,h,b):n(e)),void 0!==B)return B;if(!Ve(e))return e;var T=He(e);if(T){if(B=function(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&ee.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!t)return function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(e,B)}else{var R=Ue(e),N=R==c||R==u;if(We(e))return function(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}(e,t);if(R==d||R==o||N&&!h){if(H(e))return h?e:{};if(B=function(e){return"function"!=typeof e.constructor||Fe(e)?{}:Ve(t=ae(e))?se(t):{};var t}(N?{}:e),!t)return function(e,t){return Re(e,Le(e),t)}(e,function(e,t){return e&&Re(t,Ge(t),e)}(B,e))}else{if(!M[R])return h?e:{};B=function(e,t,r,n){var i,o=e.constructor;switch(t){case v:return Me(e);case a:case s:return new o(+e);case w:return function(e,t){var r=t?Me(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,n);case A:case _:case E:case x:case k:case S:case C:case P:case O:return function(e,t){var r=t?Me(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,n);case l:return function(e,t,r){return Z(t?r(q(e),!0):q(e),F,new e.constructor)}(e,n,r);case f:case m:return new o(e);case p:return function(e){var t=new e.constructor(e.source,I.exec(e));return t.lastIndex=e.lastIndex,t}(e);case g:return function(e,t,r){return Z(t?r(K(e),!0):K(e),z,new e.constructor)}(e,n,r);case y:return i=e,ke?Object(ke.call(i)):{}}}(e,R,Te,t)}}b||(b=new Oe);var j=b.get(e);if(j)return j;if(b.set(e,B),!T)var L=r?function(e){return function(e,t,r){var n=t(e);return He(e)?n:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(n,r(e))}(e,Ge,Le)}(e):Ge(e);return function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r););}(L||e,(function(i,o){L&&(i=e[o=i]),Ie(B,o,Te(i,t,r,n,o,e,b))})),B}function Me(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Re(e,t,r,n){r||(r={});for(var i=-1,o=t.length;++i<o;){var a=t[i],s=n?n(r[a],e[a],a,r,e):void 0;Ie(r,a,void 0===s?e[a]:s)}return r}function Ne(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function je(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ve(e)||(t=e,X&&X in t))&&(Ke(e)||H(e)?re:B).test(ze(e));var t}(r)?r:void 0}Se.prototype.clear=function(){this.__data__=be?be(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(be){var r=t[e];return r===n?void 0:r}return ee.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return be?void 0!==t[e]:ee.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=be&&void 0===t?n:t,this},Ce.prototype.clear=function(){this.__data__=[]},Ce.prototype.delete=function(e){var t=this.__data__,r=Be(t,e);return!(r<0||(r==t.length-1?t.pop():ue.call(t,r,1),0))},Ce.prototype.get=function(e){var t=this.__data__,r=Be(t,e);return r<0?void 0:t[r][1]},Ce.prototype.has=function(e){return Be(this.__data__,e)>-1},Ce.prototype.set=function(e,t){var r=this.__data__,n=Be(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Pe.prototype.clear=function(){this.__data__={hash:new Se,map:new(pe||Ce),string:new Se}},Pe.prototype.delete=function(e){return Ne(this,e).delete(e)},Pe.prototype.get=function(e){return Ne(this,e).get(e)},Pe.prototype.has=function(e){return Ne(this,e).has(e)},Pe.prototype.set=function(e,t){return Ne(this,e).set(e,t),this},Oe.prototype.clear=function(){this.__data__=new Ce},Oe.prototype.delete=function(e){return this.__data__.delete(e)},Oe.prototype.get=function(e){return this.__data__.get(e)},Oe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ce){var n=r.__data__;if(!pe||n.length<199)return n.push([e,t]),this;r=this.__data__=new Pe(n)}return r.set(e,t),this};var Le=le?W(le,Object):function(){return[]},Ue=function(e){return te.call(e)};function De(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||T.test(e))&&e>-1&&e%1==0&&e<t}function Fe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||J)}function ze(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ze(e,t){return e===t||e!=e&&t!=t}(he&&Ue(new he(new ArrayBuffer(1)))!=w||pe&&Ue(new pe)!=l||ge&&Ue(ge.resolve())!=h||me&&Ue(new me)!=g||ye&&Ue(new ye)!=b)&&(Ue=function(e){var t=te.call(e),r=t==d?e.constructor:void 0,n=r?ze(r):void 0;if(n)switch(n){case ve:return w;case we:return l;case Ae:return h;case _e:return g;case Ee:return b}return t});var He=Array.isArray;function qe(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!Ke(e)}var We=fe||function(){return!1};function Ke(e){var t=Ve(e)?te.call(e):"";return t==c||t==u}function Ve(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ge(e){return qe(e)?function(e,t){var r=He(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&qe(e)}(e)&&ee.call(e,"callee")&&(!ce.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,i=!!n;for(var a in e)!t&&!ee.call(e,a)||i&&("length"==a||De(a,n))||r.push(a);return r}(e):function(e){if(!Fe(e))return de(e);var t=[];for(var r in Object(e))ee.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}e.exports=function(e){return Te(e,!0,!0)}},51344:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Function]",s="[object Object]",c=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[o]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l[a]=l["[object Map]"]=l["[object Number]"]=l[s]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;var f="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,d="object"==typeof self&&self&&self.Object===Object&&self,h=f||d||Function("return this")(),p=t&&!t.nodeType&&t,g=p&&e&&!e.nodeType&&e,m=g&&g.exports===p,y=m&&f.process,b=function(){try{return g&&g.require&&g.require("util").types||y&&y.binding&&y.binding("util")}catch(e){}}(),v=b&&b.isTypedArray;function w(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var A,_,E,x=Array.prototype,k=Function.prototype,S=Object.prototype,C=h["__core-js_shared__"],P=k.toString,O=S.hasOwnProperty,I=(A=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",B=S.toString,T=P.call(Object),M=RegExp("^"+P.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=m?h.Buffer:void 0,N=h.Symbol,j=h.Uint8Array,L=(R&&R.allocUnsafe,_=Object.getPrototypeOf,E=Object,function(e){return _(E(e))}),U=Object.create,D=S.propertyIsEnumerable,F=x.splice,z=N?N.toStringTag:void 0,Z=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),H=R?R.isBuffer:void 0,q=Math.max,W=Date.now,K=ce(h,"Map"),V=ce(Object,"create"),G=function(){function e(){}return function(t){if(!we(t))return{};if(U)return U(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function $(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function J(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Y(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function X(e){var t=this.__data__=new J(e);this.size=t.size}function Q(e,t,r){(void 0!==r&&!he(e[t],r)||void 0===r&&!(t in e))&&re(e,t,r)}function ee(e,t,r){var n=e[t];O.call(e,t)&&he(n,r)&&(void 0!==r||t in e)||re(e,t,r)}function te(e,t){for(var r=e.length;r--;)if(he(e[r][0],t))return r;return-1}function re(e,t,r){"__proto__"==t&&Z?Z(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}$.prototype.clear=function(){this.__data__=V?V(null):{},this.size=0},$.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},$.prototype.get=function(e){var t=this.__data__;if(V){var r=t[e];return r===n?void 0:r}return O.call(t,e)?t[e]:void 0},$.prototype.has=function(e){var t=this.__data__;return V?void 0!==t[e]:O.call(t,e)},$.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=V&&void 0===t?n:t,this},J.prototype.clear=function(){this.__data__=[],this.size=0},J.prototype.delete=function(e){var t=this.__data__,r=te(t,e);return!(r<0||(r==t.length-1?t.pop():F.call(t,r,1),--this.size,0))},J.prototype.get=function(e){var t=this.__data__,r=te(t,e);return r<0?void 0:t[r][1]},J.prototype.has=function(e){return te(this.__data__,e)>-1},J.prototype.set=function(e,t){var r=this.__data__,n=te(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new $,map:new(K||J),string:new $}},Y.prototype.delete=function(e){var t=se(this,e).delete(e);return this.size-=t?1:0,t},Y.prototype.get=function(e){return se(this,e).get(e)},Y.prototype.has=function(e){return se(this,e).has(e)},Y.prototype.set=function(e,t){var r=se(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},X.prototype.clear=function(){this.__data__=new J,this.size=0},X.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},X.prototype.get=function(e){return this.__data__.get(e)},X.prototype.has=function(e){return this.__data__.has(e)},X.prototype.set=function(e,t){var r=this.__data__;if(r instanceof J){var n=r.__data__;if(!K||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Y(n)}return r.set(e,t),this.size=r.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":z&&z in Object(e)?function(e){var t=O.call(e,z),r=e[z];try{e[z]=void 0;var n=!0}catch(e){}var i=B.call(e);return n&&(t?e[z]=r:delete e[z]),i}(e):function(e){return B.call(e)}(e)}function ie(e){return Ae(e)&&ne(e)==o}function oe(e,t,r,n,i){e!==t&&function(e,t,r){for(var n=-1,i=Object(e),o=r(e),a=o.length;a--;){var s=o[++n];if(!1===t(i[s],s,i))break}}(t,(function(o,a){if(i||(i=new X),we(o))!function(e,t,r,n,i,o,a){var c=fe(e,r),u=fe(t,r),l=a.get(u);if(l)Q(e,r,l);else{var f,d,h,p,g,m=o?o(c,u,r+"",e,t,a):void 0,y=void 0===m;if(y){var b=ge(u),v=!b&&ye(u),w=!b&&!v&&_e(u);m=u,b||v||w?ge(c)?m=c:Ae(g=c)&&me(g)?m=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(c):v?(y=!1,m=function(e,t){return e.slice()}(u)):w?(y=!1,p=new(h=(f=u).buffer).constructor(h.byteLength),new j(p).set(new j(h)),d=p,m=new f.constructor(d,f.byteOffset,f.length)):m=[]:function(e){if(!Ae(e)||ne(e)!=s)return!1;var t=L(e);if(null===t)return!0;var r=O.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&P.call(r)==T}(u)||pe(u)?(m=c,pe(c)?m=function(e){return function(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],c=void 0;void 0===c&&(c=e[s]),i?re(r,s,c):ee(r,s,c)}return r}(e,Ee(e))}(c):we(c)&&!be(c)||(m=function(e){return"function"!=typeof e.constructor||le(e)?{}:G(L(e))}(u))):y=!1}y&&(a.set(u,m),i(m,u,n,o,a),a.delete(u)),Q(e,r,m)}}(e,t,a,r,oe,n,i);else{var c=n?n(fe(e,a),o,a+"",e,t,i):void 0;void 0===c&&(c=o),Q(e,a,c)}}),Ee)}var ae=Z?function(e,t){return Z(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Se;function se(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function ce(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!we(e)||function(e){return!!I&&I in e}(e))&&(be(e)?M:c).test(function(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(r)?r:void 0}function ue(e,t){var r=typeof e;return!!(t=null==t?i:t)&&("number"==r||"symbol"!=r&&u.test(e))&&e>-1&&e%1==0&&e<t}function le(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||S)}function fe(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var de=function(e){var t=0,r=0;return function(){var n=W(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ae);function he(e,t){return e===t||e!=e&&t!=t}var pe=ie(function(){return arguments}())?ie:function(e){return Ae(e)&&O.call(e,"callee")&&!D.call(e,"callee")},ge=Array.isArray;function me(e){return null!=e&&ve(e.length)&&!be(e)}var ye=H||function(){return!1};function be(e){if(!we(e))return!1;var t=ne(e);return t==a||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ve(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function we(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ae(e){return null!=e&&"object"==typeof e}var _e=v?function(e){return function(t){return e(t)}}(v):function(e){return Ae(e)&&ve(e.length)&&!!l[ne(e)]};function Ee(e){return me(e)?function(e,t){var r=ge(e),n=!r&&pe(e),i=!r&&!n&&ye(e),o=!r&&!n&&!i&&_e(e),a=r||n||i||o,s=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=s.length;for(var u in e)!t&&!O.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ue(u,c))||s.push(u);return s}(e,!0):function(e){if(!we(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=le(e),r=[];for(var n in e)("constructor"!=n||!t&&O.call(e,n))&&r.push(n);return r}(e)}var xe,ke=(xe=function(e,t,r){oe(e,t,r)},function(e,t){return de(function(e,t,r){return t=q(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=q(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),w(e,this,s)}}(e,t,Se),e+"")}((function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=xe.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!we(r))return!1;var n=typeof t;return!!("number"==n?me(r)&&ue(t,r.length):"string"==n&&t in r)&&he(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var a=t[r];a&&xe(e,a,r)}return e})));function Se(e){return e}e.exports=ke},79640:function(e,t,r){var n,i;!function(o,a){"use strict";n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function i(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?o:void 0!==console[n]?i(console,n):void 0!==console.log?i(console,"log"):e)}function s(t,r){for(var i=0;i<n.length;i++){var o=n[i];this[o]=i<t?e:this.methodFactory(o,t,r)}this.log=this.debug}function c(e,r,n){return function(){typeof console!==t&&(s.call(this,r,n),this[e].apply(this,arguments))}}function u(e,t,r){return a(e)||c.apply(this,arguments)}function l(e,r,i){var o,a=this;r=null==r?"WARN":r;var c="loglevel";function l(){var e;if(typeof window!==t&&c){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(c)+"=");-1!==n&&(e=/^([^;]+)/.exec(r.slice(n))[1])}catch(e){}return void 0===a.levels[e]&&(e=void 0),e}}"string"==typeof e?c+=":"+e:"symbol"==typeof e&&(c=void 0),a.name=e,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=i||u,a.getLevel=function(){return o},a.setLevel=function(r,i){if("string"==typeof r&&void 0!==a.levels[r.toUpperCase()]&&(r=a.levels[r.toUpperCase()]),!("number"==typeof r&&r>=0&&r<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(o=r,!1!==i&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(e){}}}(r),s.call(a,r,e),typeof console===t&&r<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(e){r=e,l()||a.setLevel(e,!1)},a.resetLevel=function(){a.setLevel(r,!1),function(){if(typeof window!==t&&c){try{return void window.localStorage.removeItem(c)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},a.enableAll=function(e){a.setLevel(a.levels.TRACE,e)},a.disableAll=function(e){a.setLevel(a.levels.SILENT,e)};var f=l();null==f&&(f=r),a.setLevel(f,!1)}var f=new l,d={};f.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=d[e];return t||(t=d[e]=new l(e,f.getLevel(),f.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return f.noConflict=function(){return typeof window!==t&&window.log===f&&(window.log=h),f},f.getLoggers=function(){return d},f.default=f,f},void 0===(i=n.call(t,r,t,e))||(e.exports=i)}()},27993:(e,t,r)=>{"use strict";var n=r(91285),i=r(84485),o=r(77834).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function c(e,t){return e<<t|e>>>32-t}function u(e,t,r,n,i,o,a){return c(e+(t&r|~t&n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return c(e+(t&n|r&~n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return c(e+(t^r^n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return c(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),r=l(r,n=u(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=l(o,r,n,i,e[6],3225465664,9),i=l(i,o,r,n,e[11],643717713,14),n=l(n,i,o,r,e[0],3921069994,20),r=l(r,n,i,o,e[5],3593408605,5),o=l(o,r,n,i,e[10],38016083,9),i=l(i,o,r,n,e[15],3634488961,14),n=l(n,i,o,r,e[4],3889429448,20),r=l(r,n,i,o,e[9],568446438,5),o=l(o,r,n,i,e[14],3275163606,9),i=l(i,o,r,n,e[3],4107603335,14),n=l(n,i,o,r,e[8],1163531501,20),r=l(r,n,i,o,e[13],2850285829,5),o=l(o,r,n,i,e[2],4243563512,9),i=l(i,o,r,n,e[7],1735328473,14),r=f(r,n=l(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=f(o,r,n,i,e[8],2272392833,11),i=f(i,o,r,n,e[11],1839030562,16),n=f(n,i,o,r,e[14],4259657740,23),r=f(r,n,i,o,e[1],2763975236,4),o=f(o,r,n,i,e[4],1272893353,11),i=f(i,o,r,n,e[7],4139469664,16),n=f(n,i,o,r,e[10],3200236656,23),r=f(r,n,i,o,e[13],681279174,4),o=f(o,r,n,i,e[0],3936430074,11),i=f(i,o,r,n,e[3],3572445317,16),n=f(n,i,o,r,e[6],76029189,23),r=f(r,n,i,o,e[9],3654602809,4),o=f(o,r,n,i,e[12],3873151461,11),i=f(i,o,r,n,e[15],530742520,16),r=d(r,n=f(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=d(o,r,n,i,e[7],1126891415,10),i=d(i,o,r,n,e[14],2878612391,15),n=d(n,i,o,r,e[5],4237533241,21),r=d(r,n,i,o,e[12],1700485571,6),o=d(o,r,n,i,e[3],2399980690,10),i=d(i,o,r,n,e[10],4293915773,15),n=d(n,i,o,r,e[1],2240044497,21),r=d(r,n,i,o,e[8],1873313359,6),o=d(o,r,n,i,e[15],4264355552,10),i=d(i,o,r,n,e[6],2734768916,15),n=d(n,i,o,r,e[13],1309151649,21),r=d(r,n,i,o,e[4],4149444226,6),o=d(o,r,n,i,e[11],3174756917,10),i=d(i,o,r,n,e[2],718787259,15),n=d(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.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 e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},46676:(e,t,r)=>{var n=r(62197),i=r(82745);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var u=e.shrn(c),l=s.toRed(o);t>0;t--){var f=this._randrange(new n(2),s);r&&r(f);var d=f.toRed(o).redPow(u);if(0!==d.cmp(a)&&0!==d.cmp(l)){for(var h=1;h<c;h++){if(0===(d=d.redSqr()).cmp(a))return!1;if(0===d.cmp(l))break}if(h===c)return!1}}return!0},o.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),o=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var c=e.shrn(s),u=a.toRed(i);t>0;t--){var l=this._randrange(new n(2),a),f=e.gcd(l);if(0!==f.cmpn(1))return f;var d=l.toRed(i).redPow(c);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var h=1;h<s;h++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(e);if(0===d.cmp(u))break}if(h===s)return(d=d.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},79561:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},43022:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},37320:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,s,c=i(e),u=1;u<arguments.length;u++){for(var l in a=Object(arguments[u]))r.call(a,l)&&(c[l]=a[l]);if(t){s=t(a);for(var f=0;f<s.length;f++)n.call(a,s[f])&&(c[s[f]]=a[s[f]])}}return c}},18169:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},34679:(e,t,r)=>{"use strict";var n=r(14926),i=r(89429),o=r(18169),a=r(68070),s=r(20191),c=i(a(),Object);n(c,{getPolyfill:a,implementation:o,shim:s}),e.exports=c},68070:(e,t,r)=>{"use strict";var n=r(18169);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},20191:(e,t,r)=>{"use strict";var n=r(68070),i=r(14926);e.exports=function(){var e=n();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},75691:(e,t,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(30801),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),u=s.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=a(e),s=t&&"[object String]"===o.call(e),d=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=u&&r;if(s&&e.length>0&&!i.call(e,0))for(var g=0;g<e.length;++g)d.push(String(g));if(n&&e.length>0)for(var m=0;m<e.length;++m)d.push(String(m));else for(var y in e)p&&"prototype"===y||!i.call(e,y)||d.push(String(y));if(c)for(var b=function(e){if("undefined"==typeof window||!h)return f(e);try{return f(e)}catch(e){return!1}}(e),v=0;v<l.length;++v)b&&"constructor"===l[v]||!i.call(e,l[v])||d.push(l[v]);return d}}e.exports=n},33464:(e,t,r)=>{"use strict";var n=Array.prototype.slice,i=r(30801),o=Object.keys,a=o?function(e){return o(e)}:r(75691),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?s(n.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},30801:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},29928:(e,t,r)=>{var n=r(68892);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=n(i),e.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},58045:(e,t,r)=>{"use strict";var n=r(22812);t.certificate=r(27832);var i=n.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())}));t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var s=n.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())})),c=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=c;var u=n.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())}));t.EncryptedPrivateKey=u;var l=n.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())}));t.DSAPrivateKey=l,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var f=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=f;var d=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},27832:(e,t,r)=>{"use strict";var n=r(22812),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),c=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),u=n.define("RDNSequence",(function(){this.seqof(c)})),l=n.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),f=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),d=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(l),this.key("validity").use(f),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=p},82968:(e,t,r)=>{var n=/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,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=r(59341),s=r(10010),c=r(77834).Buffer;e.exports=function(e,t){var r,u=e.toString(),l=u.match(n);if(l){var f="aes"+l[1],d=c.from(l[2],"hex"),h=c.from(l[3].replace(/[\r\n]/g,""),"base64"),p=a(t,d.slice(0,8),parseInt(l[1],10)).key,g=[],m=s.createDecipheriv(f,p,d);g.push(m.update(h)),g.push(m.final()),r=c.concat(g)}else{var y=u.match(o);r=c.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(i)[1],data:r}}},28016:(e,t,r)=>{var n=r(58045),i=r(68675),o=r(82968),a=r(10010),s=r(30499),c=r(77834).Buffer;function u(e){var t;"object"!=typeof e||c.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=c.from(e));var r,u,l=o(e,t),f=l.tag,d=l.data;switch(f){case"CERTIFICATE":u=n.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=n.PublicKey.decode(d,"der")),r=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=n.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":d=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],u=e.algorithm.decrypt.cipher.iv,l=e.subjectPrivateKey,f=parseInt(o.split("-")[1],10)/8,d=s.pbkdf2Sync(t,r,n,f,"sha1"),h=a.createDecipheriv(o,d,u),p=[];return p.push(h.update(l)),p.push(h.final()),c.concat(p)}(d=n.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(r=(u=n.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:n.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=n.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=n.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+f)}}e.exports=u,u.signature=n.signature},30499:(e,t,r)=>{t.pbkdf2=r(14874),t.pbkdf2Sync=r(88840)},14874:(e,t,r)=>{var n,i,o=r(77834).Buffer,a=r(87351),s=r(25214),c=r(88840),u=r(97232),l=r.g.crypto&&r.g.crypto.subtle,f={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"},d=[];function h(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(e,t,r,n,i){return l.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return l.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,t,i,g,m,y){"function"==typeof m&&(y=m,m=void 0);var b=f[(m=m||"sha1").toLowerCase()];if(b&&"function"==typeof r.g.Promise){if(a(i,g),e=u(e,s,"Password"),t=u(t,s,"Salt"),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){h()((function(){t(null,e)}))}),(function(e){h()((function(){t(e)}))}))}(function(e){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var t=p(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=t,t}(b).then((function(r){return r?p(e,t,i,g,b):c(e,t,i,g,m)})),y)}else h()((function(){var r;try{r=c(e,t,i,g,m)}catch(e){return y(e)}y(null,r)}))}},25214:(e,t,r)=>{var n,i=r(34406);n=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=n},87351:e=>{var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!=r)throw new TypeError("Bad key length")}},88840:(e,t,r)=>{var n=r(22511),i=r(51445),o=r(9065),a=r(77834).Buffer,s=r(87351),c=r(25214),u=r(97232),l=a.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,r){var s=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),c="sha512"===e||"sha384"===e?128:64;t.length>c?t=s(t):t.length<c&&(t=a.concat([t,l],c));for(var u=a.allocUnsafe(c+f[e]),d=a.allocUnsafe(c+f[e]),h=0;h<c;h++)u[h]=54^t[h],d[h]=92^t[h];var p=a.allocUnsafe(c+r+4);u.copy(p,0,0,c),this.ipad1=p,this.ipad2=u,this.opad=d,this.alg=e,this.blocksize=c,this.hash=s,this.size=f[e]}d.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,r,n,i){s(r,n);var o=new d(i=i||"sha1",e=u(e,c,"Password"),(t=u(t,c,"Salt")).length),l=a.allocUnsafe(n),h=a.allocUnsafe(t.length+4);t.copy(h,0,0,t.length);for(var p=0,g=f[i],m=Math.ceil(n/g),y=1;y<=m;y++){h.writeUInt32BE(y,t.length);for(var b=o.run(h,o.ipad1),v=b,w=1;w<r;w++){v=o.run(v,o.ipad2);for(var A=0;A<g;A++)b[A]^=v[A]}b.copy(l,p),p+=g}return l}},97232:(e,t,r)=>{var n=r(77834).Buffer;e.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},82884:(e,t,r)=>{"use strict";var n=r(34406);void 0===n||!n.version||0===n.version.indexOf("v0.")||0===n.version.indexOf("v1.")&&0!==n.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return n.nextTick(e);case 2:return n.nextTick((function(){e.call(null,t)}));case 3:return n.nextTick((function(){e.call(null,t,r)}));case 4:return n.nextTick((function(){e.call(null,t,r,i)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return n.nextTick((function(){e.apply(null,o)}))}}}:e.exports=n},34406:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,c=[],u=!1,l=-1;function f(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=a(f);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||u||a(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},68262:(e,t,r)=>{"use strict";var n=r(23586);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,a){if(a!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},13980:(e,t,r)=>{e.exports=r(68262)()},23586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},8493:(e,t,r)=>{t.publicEncrypt=r(61896),t.privateDecrypt=r(76932),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},78525:(e,t,r)=>{var n=r(16162),i=r(77834).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,a=i.alloc(0),s=0;a.length<t;)r=o(s++),a=i.concat([a,n("sha1").update(e).update(r).digest()]);return a.slice(0,t)}},76932:(e,t,r)=>{var n=r(28016),i=r(78525),o=r(11273),a=r(62197),s=r(91857),c=r(16162),u=r(46112),l=r(77834).Buffer;e.exports=function(e,t,r){var f;f=e.padding?e.padding:r?1:4;var d,h=n(e),p=h.modulus.byteLength();if(t.length>p||new a(t).cmp(h.modulus)>=0)throw new Error("decryption error");d=r?u(new a(t),h):s(t,h);var g=l.alloc(p-d.length);if(d=l.concat([g,d],p),4===f)return function(e,t){var r=e.modulus.byteLength(),n=c("sha1").update(l.alloc(0)).digest(),a=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),u=t.slice(a+1),f=o(s,i(u,a)),d=o(u,i(f,r-a-1));if(function(e,t){e=l.from(e),t=l.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++i<n;)r+=e[i]^t[i];return r}(n,d.slice(0,a)))throw new Error("decryption error");for(var h=a;0===d[h];)h++;if(1!==d[h++])throw new Error("decryption error");return d.slice(h)}(h,d);if(1===f)return function(e,t,r){for(var n=t.slice(0,2),i=2,o=0;0!==t[i++];)if(i>=t.length){o++;break}var a=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,d,r);if(3===f)return d;throw new Error("unknown padding")}},61896:(e,t,r)=>{var n=r(28016),i=r(95003),o=r(16162),a=r(78525),s=r(11273),c=r(62197),u=r(46112),l=r(91857),f=r(77834).Buffer;e.exports=function(e,t,r){var d;d=e.padding?e.padding:r?1:4;var h,p=n(e);if(4===d)h=function(e,t){var r=e.modulus.byteLength(),n=t.length,u=o("sha1").update(f.alloc(0)).digest(),l=u.length,d=2*l;if(n>r-d-2)throw new Error("message too long");var h=f.alloc(r-n-d-2),p=r-l-1,g=i(l),m=s(f.concat([u,h,f.alloc(1,1),t],p),a(g,p)),y=s(g,a(m,l));return new c(f.concat([f.alloc(1),y,m],r))}(p,t);else if(1===d)h=function(e,t,r){var n,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");return n=r?f.alloc(a-o-3,255):function(e){for(var t,r=f.allocUnsafe(e),n=0,o=i(2*e),a=0;n<e;)a===o.length&&(o=i(2*e),a=0),(t=o[a++])&&(r[n++]=t);return r}(a-o-3),new c(f.concat([f.from([0,r?1:2]),n,f.alloc(1),t],a))}(p,t,r);else{if(3!==d)throw new Error("unknown padding");if((h=new c(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?l(h,p):u(h,p)}},46112:(e,t,r)=>{var n=r(62197),i=r(77834).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},11273:e=>{e.exports=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e}},3171:(e,t,r)=>{var n=r(34406),i=r(29928),o=r(18797),a=r(23558),s=function(){},c=/^v?\.0/.test(n.version),u=function(e){return"function"==typeof e},l=function(e,t,r,n){n=i(n);var l=!1;e.on("close",(function(){l=!0})),o(e,{readable:t,writable:r},(function(e){if(e)return n(e);l=!0,n()}));var f=!1;return function(t){if(!l&&!f)return f=!0,function(e){return!!c&&!!a&&(e instanceof(a.ReadStream||s)||e instanceof(a.WriteStream||s))&&u(e.close)}(e)?e.close(s):function(e){return e.setHeader&&u(e.abort)}(e)?e.abort():u(e.destroy)?e.destroy():void n(t||new Error("stream was destroyed"))}},f=function(e){e()},d=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=u(t[t.length-1]||s)&&t.pop()||s;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var n=t.map((function(i,o){var a=o<t.length-1;return l(i,a,o>0,(function(t){e||(e=t),t&&n.forEach(f),a||(n.forEach(f),r(e))}))}));return t.reduce(d)}},94076:(e,t,r)=>{var n=r(89235);function i(e){this.mode=n.MODE_8BIT_BYTE,this.data=e}i.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=i},47878:e=>{function t(){this.buffer=new Array,this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},81432:e=>{e.exports={L:1,M:0,Q:3,H:2}},84695:(e,t,r)=>{var n=r(35856);function i(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var r=0;r<e.length&&0==e[r];)r++;this.num=new Array(e.length-r+t);for(var n=0;n<e.length-r;n++)this.num[n]=e[n+r]}i.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),r=0;r<this.getLength();r++)for(var o=0;o<e.getLength();o++)t[r+o]^=n.gexp(n.glog(this.get(r))+n.glog(e.get(o)));return new i(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=n.glog(this.get(0))-n.glog(e.get(0)),r=new Array(this.getLength()),o=0;o<this.getLength();o++)r[o]=this.get(o);for(o=0;o<e.getLength();o++)r[o]^=n.gexp(n.glog(e.get(o))+t);return new i(r,0).mod(e)}},e.exports=i},62768:(e,t,r)=>{var n=r(94076),i=r(15415),o=r(47878),a=r(17382),s=r(84695);function c(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var u=c.prototype;u.addData=function(e){var t=new n(e);this.dataList.push(t),this.dataCache=null},u.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},u.getModuleCount=function(){return this.moduleCount},u.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=i.getRSBlocks(e,this.errorCorrectLevel),r=new o,n=0,s=0;s<t.length;s++)n+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var c=this.dataList[s];r.put(c.mode,4),r.put(c.getLength(),a.getLengthInBits(c.mode,e)),c.write(r)}if(r.getLengthInBits()<=8*n)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},u.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=c.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},u.setupPositionProbePattern=function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(this.modules[e+r][t+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},u.getBestMaskPattern=function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=a.getLostPoint(this);(0==r||e>n)&&(e=n,t=r)}return t},u.createMovieClip=function(e,t,r){var n=e.createEmptyMovieClip(t,r);this.make();for(var i=0;i<this.modules.length;i++)for(var o=1*i,a=0;a<this.modules[i].length;a++){var s=1*a;this.modules[i][a]&&(n.beginFill(0,100),n.moveTo(s,o),n.lineTo(s+1,o),n.lineTo(s+1,o+1),n.lineTo(s,o+1),n.endFill())}return n},u.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},u.setupPositionAdjustPattern=function(){for(var e=a.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var r=0;r<e.length;r++){var n=e[t],i=e[r];if(null==this.modules[n][i])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[n+o][i+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}},u.setupTypeNumber=function(e){for(var t=a.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!e&&1==(t>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(r=0;r<18;r++)n=!e&&1==(t>>r&1),this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n},u.setupTypeInfo=function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=a.getBCHTypeInfo(r),i=0;i<15;i++){var o=!e&&1==(n>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++)o=!e&&1==(n>>i&1),i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o;this.modules[this.moduleCount-8][8]=!e},u.mapData=function(e,t){for(var r=-1,n=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var c=0;c<2;c++)if(null==this.modules[n][s-c]){var u=!1;o<e.length&&(u=1==(e[o]>>>i&1)),a.getMask(t,n,s-c)&&(u=!u),this.modules[n][s-c]=u,-1==--i&&(o++,i=7)}if((n+=r)<0||this.moduleCount<=n){n-=r,r=-r;break}}},c.PAD0=236,c.PAD1=17,c.createData=function(e,t,r){for(var n=i.getRSBlocks(e,t),s=new o,u=0;u<r.length;u++){var l=r[u];s.put(l.mode,4),s.put(l.getLength(),a.getLengthInBits(l.mode,e)),l.write(s)}var f=0;for(u=0;u<n.length;u++)f+=n[u].dataCount;if(s.getLengthInBits()>8*f)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*f+")");for(s.getLengthInBits()+4<=8*f&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*f||(s.put(c.PAD0,8),s.getLengthInBits()>=8*f));)s.put(c.PAD1,8);return c.createBytes(s,n)},c.createBytes=function(e,t){for(var r=0,n=0,i=0,o=new Array(t.length),c=new Array(t.length),u=0;u<t.length;u++){var l=t[u].dataCount,f=t[u].totalCount-l;n=Math.max(n,l),i=Math.max(i,f),o[u]=new Array(l);for(var d=0;d<o[u].length;d++)o[u][d]=255&e.buffer[d+r];r+=l;var h=a.getErrorCorrectPolynomial(f),p=new s(o[u],h.getLength()-1).mod(h);for(c[u]=new Array(h.getLength()-1),d=0;d<c[u].length;d++){var g=d+p.getLength()-c[u].length;c[u][d]=g>=0?p.get(g):0}}var m=0;for(d=0;d<t.length;d++)m+=t[d].totalCount;var y=new Array(m),b=0;for(d=0;d<n;d++)for(u=0;u<t.length;u++)d<o[u].length&&(y[b++]=o[u][d]);for(d=0;d<i;d++)for(u=0;u<t.length;u++)d<c[u].length&&(y[b++]=c[u][d]);return y},e.exports=c},15415:(e,t,r)=>{var n=r(81432);function i(e,t){this.totalCount=e,this.dataCount=t}i.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],i.getRSBlocks=function(e,t){var r=i.getRsBlockTable(e,t);if(null==r)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var n=r.length/3,o=new Array,a=0;a<n;a++)for(var s=r[3*a+0],c=r[3*a+1],u=r[3*a+2],l=0;l<s;l++)o.push(new i(c,u));return o},i.getRsBlockTable=function(e,t){switch(t){case n.L:return i.RS_BLOCK_TABLE[4*(e-1)+0];case n.M:return i.RS_BLOCK_TABLE[4*(e-1)+1];case n.Q:return i.RS_BLOCK_TABLE[4*(e-1)+2];case n.H:return i.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=i},35856:e=>{for(var t={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},r=0;r<8;r++)t.EXP_TABLE[r]=1<<r;for(r=8;r<256;r++)t.EXP_TABLE[r]=t.EXP_TABLE[r-4]^t.EXP_TABLE[r-5]^t.EXP_TABLE[r-6]^t.EXP_TABLE[r-8];for(r=0;r<255;r++)t.LOG_TABLE[t.EXP_TABLE[r]]=r;e.exports=t},89235:e=>{e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},17382:(e,t,r)=>{var n=r(89235),i=r(84695),o=r(35856),a={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;a.getBCHDigit(t)-a.getBCHDigit(a.G15)>=0;)t^=a.G15<<a.getBCHDigit(t)-a.getBCHDigit(a.G15);return(e<<10|t)^a.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;a.getBCHDigit(t)-a.getBCHDigit(a.G18)>=0;)t^=a.G18<<a.getBCHDigit(t)-a.getBCHDigit(a.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return a.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case 0:return(t+r)%2==0;case 1:return t%2==0;case 2:return r%3==0;case 3:return(t+r)%3==0;case 4:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case 5:return t*r%2+t*r%3==0;case 6:return(t*r%2+t*r%3)%2==0;case 7:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new i([1],0),r=0;r<e;r++)t=t.multiply(new i([1,o.gexp(r)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case n.MODE_NUMBER:return 10;case n.MODE_ALPHA_NUM:return 9;case n.MODE_8BIT_BYTE:case n.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case n.MODE_NUMBER:return 12;case n.MODE_ALPHA_NUM:return 11;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case n.MODE_NUMBER:return 14;case n.MODE_ALPHA_NUM:return 13;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),r=0,n=0;n<t;n++)for(var i=0;i<t;i++){for(var o=0,a=e.isDark(n,i),s=-1;s<=1;s++)if(!(n+s<0||t<=n+s))for(var c=-1;c<=1;c++)i+c<0||t<=i+c||0==s&&0==c||a==e.isDark(n+s,i+c)&&o++;o>5&&(r+=3+o-5)}for(n=0;n<t-1;n++)for(i=0;i<t-1;i++){var u=0;e.isDark(n,i)&&u++,e.isDark(n+1,i)&&u++,e.isDark(n,i+1)&&u++,e.isDark(n+1,i+1)&&u++,0!=u&&4!=u||(r+=3)}for(n=0;n<t;n++)for(i=0;i<t-6;i++)e.isDark(n,i)&&!e.isDark(n,i+1)&&e.isDark(n,i+2)&&e.isDark(n,i+3)&&e.isDark(n,i+4)&&!e.isDark(n,i+5)&&e.isDark(n,i+6)&&(r+=40);for(i=0;i<t;i++)for(n=0;n<t-6;n++)e.isDark(n,i)&&!e.isDark(n+1,i)&&e.isDark(n+2,i)&&e.isDark(n+3,i)&&e.isDark(n+4,i)&&!e.isDark(n+5,i)&&e.isDark(n+6,i)&&(r+=40);var l=0;for(i=0;i<t;i++)for(n=0;n<t;n++)e.isDark(n,i)&&l++;return r+Math.abs(100*l/t/t-50)/5*10}};e.exports=a},92808:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(r);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var c=e.length;s>0&&c>s&&(c=s);for(var u=0;u<c;++u){var l,f,d,h,p=e[u].replace(a,"%20"),g=p.indexOf(n);g>=0?(l=p.substr(0,g),f=p.substr(g+1)):(l=p,f=""),d=decodeURIComponent(l),h=decodeURIComponent(f),t(o,d)?Array.isArray(o[d])?o[d].push(h):o[d]=[o[d],h]:o[d]=h}return o}},31368:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,i){return r=r||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(i){var o=encodeURIComponent(t(i))+n;return Array.isArray(e[i])?e[i].map((function(e){return o+encodeURIComponent(t(e))})).join(r):o+encodeURIComponent(t(e[i]))})).join(r):i?encodeURIComponent(t(i))+n+encodeURIComponent(t(e)):""}},56642:(e,t,r)=>{"use strict";t.decode=t.parse=r(92808),t.encode=t.stringify=r(31368)},95003:(e,t,r)=>{"use strict";var n=r(34406),i=65536,o=r(77834).Buffer,a=r.g.crypto||r.g.msCrypto;a&&a.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>i)for(var s=0;s<e;s+=i)a.getRandomValues(r.slice(s,s+i));else a.getRandomValues(r);return"function"==typeof t?n.nextTick((function(){t(null,r)})):r}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},69631:(e,t,r)=>{"use strict";var n=r(34406);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(77834),a=r(95003),s=o.Buffer,c=o.kMaxLength,u=r.g.crypto||r.g.msCrypto,l=Math.pow(2,32)-1;function f(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>l||e<0)throw new TypeError("offset must be a uint32");if(e>c||e>t)throw new RangeError("offset out of range")}function d(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>l||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>c)throw new RangeError("buffer too small")}function h(e,t,r,i){if(n.browser){var o=e.buffer,s=new Uint8Array(o,t,r);return u.getRandomValues(s),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return a(r).copy(e,t),e;a(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}u&&u.getRandomValues||!n.browser?(t.randomFill=function(e,t,n,i){if(!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return f(t,e.length),d(n,t,e.length),h(e,t,n,i)},t.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return f(t,e.length),void 0===n&&(n=e.length-t),d(n,t,e.length),h(e,t,n)}):(t.randomFill=i,t.randomFillSync=i)},83426:(e,t,r)=>{"use strict";var n=r(37320),i=60109,o=60110;if("function"==typeof Symbol&&Symbol.for){var a=Symbol.for;a("react.element"),a("react.portal"),a("react.fragment"),a("react.strict_mode"),a("react.profiler"),i=a("react.provider"),o=a("react.context"),a("react.forward_ref"),a("react.suspense"),a("react.memo"),a("react.lazy")}"function"==typeof Symbol&&Symbol.iterator;function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},u={};function l(e,t,r){this.props=e,this.context=t,this.refs=u,this.updater=r||c}function f(){}function d(e,t,r){this.props=e,this.context=t,this.refs=u,this.updater=r||c}l.prototype.isReactComponent={},l.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(s(85));this.updater.enqueueSetState(this,e,t,"setState")},l.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},f.prototype=l.prototype;var h=d.prototype=new f;h.constructor=d,n(h,l.prototype),h.isPureReactComponent=!0;Object.prototype.hasOwnProperty;var p=null;function g(){var e=p;if(null===e)throw Error(s(321));return e}t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:o,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.useContext=function(e,t){return g().useContext(e,t)},t.useEffect=function(e,t){return g().useEffect(e,t)},t.useRef=function(e){return g().useRef(e)},t.useState=function(e){return g().useState(e)}},2784:(e,t,r)=>{"use strict";e.exports=r(83426)},64452:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,a,s,c;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var u=("number"!=typeof c&&(c=0),c+".".length>(s=e).length||-1===s.indexOf(".",c)?"argument":"property");a='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(n(t,"type"))}return a+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},77073:(e,t,r)=>{"use strict";var n=r(34406),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(28051),a=r(2557);r(91285)(l,o);for(var s=i(a.prototype),c=0;c<s.length;c++){var u=s[c];l.prototype[u]||(l.prototype[u]=a.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);o.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},95163:(e,t,r)=>{"use strict";e.exports=i;var n=r(27640);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(91285)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},28051:(e,t,r)=>{"use strict";var n,i=r(34406);e.exports=k,k.ReadableState=x,r(22699).EventEmitter;var o,a=function(e,t){return e.listeners(t).length},s=r(15010),c=r(48834).Buffer,u=r.g.Uint8Array||function(){},l=r(66602);o=l&&l.debuglog?l.debuglog("stream"):function(){};var f,d,h,p=r(56637),g=r(12262),m=r(87605).getHighWaterMark,y=r(64452).q,b=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,w=y.ERR_METHOD_NOT_IMPLEMENTED,A=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(91285)(k,s);var _=g.errorOrDestroy,E=["error","close","destroy","pause","resume"];function x(e,t,i){n=n||r(77073),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(30214).s),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function k(e){if(n=n||r(77073),!(this instanceof k))return new k(e);var t=this instanceof n;this._readableState=new x(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function S(e,t,r,n,i){o("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?I(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,B(e)))}}(e,s);else if(i||(a=function(e,t){var r,n;return n=t,c.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t)),r}(s,t)),a)_(e,a);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n)s.endEmitted?_(e,new A):C(e,s,t,!0);else if(s.ended)_(e,new v);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?C(e,s,t,!1):T(e,s)):C(e,s,t,!1)}else n||(s.reading=!1,T(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function C(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&I(e)),T(e,t)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=g.destroy,k.prototype._undestroy=g.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),S(this,e,t,!1,r)},k.prototype.unshift=function(e){return S(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(e){f||(f=r(30214).s);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var P=1073741824;function O(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=P?e=P:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function I(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(B,e))}function B(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function T(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(M,e,t))}function M(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(o("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function R(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){o("readable nexttick read 0"),e.read(0)}function j(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function U(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function D(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(F,t,e))}function F(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function z(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}k.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):I(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&o("length less than watermark",i=!0),t.ended||t.reading?o("reading or ended",i=!1):i&&(o("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=O(r,t))),null===(n=e>0?U(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){_(this,new w("_read()"))},k.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===i.stdout||e===i.stderr?g:c;function c(){o("onend"),e.end()}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",(function t(i,a){o("onunpipe"),i===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",t),r.removeListener("end",c),r.removeListener("end",g),r.removeListener("data",f),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}));var u=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,L(e))}}(r);e.on("drain",u);var l=!1;function f(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==z(n.pipes,e))&&!l&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(t){o("onerror",t),g(),e.removeListener("error",d),0===a(e,"error")&&_(e,t)}function h(){e.removeListener("finish",p),g()}function p(){o("onfinish"),e.removeListener("close",h),g()}function g(){o("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events.error?Array.isArray(e._events.error)?e._events.error.unshift(r):e._events.error=[r,e._events.error]:e.on(t,r)}(e,"error",d),e.once("close",h),e.once("finish",p),e.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=z(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},k.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?I(this):n.reading||i.nextTick(N,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(R,this),r},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(R,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(j,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<E.length;a++)e.on(E[a],this.emit.bind(this,E[a]));return this._read=function(t){o("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=r(1029)),d(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=U,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(e,t){return void 0===h&&(h=r(90352)),h(k,e,t)})},27640:(e,t,r)=>{"use strict";e.exports=l;var n=r(64452).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(77073);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);c.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,r){d(e,t,r)}))}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(91285)(l,c),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,(function(e){t(e)}))}},2557:(e,t,r)=>{"use strict";var n,i=r(34406);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=k,k.WritableState=x;var a,s={deprecate:r(5803)},c=r(15010),u=r(48834).Buffer,l=r.g.Uint8Array||function(){},f=r(12262),d=r(87605).getHighWaterMark,h=r(64452).q,p=h.ERR_INVALID_ARG_TYPE,g=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_MULTIPLE_CALLBACK,y=h.ERR_STREAM_CANNOT_PIPE,b=h.ERR_STREAM_DESTROYED,v=h.ERR_STREAM_NULL_VALUES,w=h.ERR_STREAM_WRITE_AFTER_END,A=h.ERR_UNKNOWN_ENCODING,_=f.errorOrDestroy;function E(){}function x(e,t,a){n=n||r(77073),e=e||{},"boolean"!=typeof a&&(a=t instanceof n),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(B,e,t),e._writableState.errorEmitted=!0,_(e,n)):(o(n),e._writableState.errorEmitted=!0,_(e,n),B(e,t))}(e,r,n,t,o);else{var a=O(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||P(e,r),n?i.nextTick(C,e,r,a,o):C(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function k(e){var t=this instanceof(n=n||r(77073));if(!t&&!a.call(k,this))return new k(e);this._writableState=new x(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function S(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),B(e,t)}function P(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,c=!0;r;)i[s]=r,r.isBuf||(c=!1),r=r.next,s+=1;i.allBuffers=c,S(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,f=r.callback;if(S(e,t,!1,t.objectMode?1:u.length,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function O(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(r){t.pendingcb--,r&&_(e,r),t.prefinished=!0,e.emit("prefinish"),B(e,t)}))}function B(e,t){var r=O(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(I,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(91285)(k,c),x.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===k&&e&&e._writableState instanceof x}})):a=function(e){return e instanceof this},k.prototype.pipe=function(){_(this,new y)},k.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,u.isBuffer(n)||n instanceof l);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=E),o.ending?function(e,t){var r=new w;_(e,r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o;return null===r?o=new v:"string"==typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(_(e,o),i.nextTick(n,o),!1)}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r)),t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,s,n,i,o);return c}(this,o,s,e,t,r)),a},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||P(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new A(e);return this._writableState.defaultEncoding=e,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(e,t,r){r(new g("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,B(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),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(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}},1029:(e,t,r)=>{"use strict";var n,i=r(34406);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(59885),s=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),f=Symbol("lastPromise"),d=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function g(e){var t=e[s];if(null!==t){var r=e[h].read();null!==r&&(e[f]=null,e[s]=null,e[c]=null,t(p(r,!1)))}}function m(e){i.nextTick(g,e)}var y=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((o(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[u]?r(e[u]):t(p(void 0,!0))}))}));var r,n=this[f];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[l]?r(p(void 0,!0)):t[d](r,n)}),n)}}(n,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[d])}return this[f]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),y);e.exports=function(e){var t,r=Object.create(b,(o(t={},h,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,l,{value:e._readableState.endEmitted,writable:!0}),o(t,d,{value:function(e,t){var n=r[h].read();n?(r[f]=null,r[s]=null,r[c]=null,e(p(n,!1))):(r[s]=e,r[c]=t)},writable:!0}),t));return r[f]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];return null!==t&&(r[f]=null,r[s]=null,r[c]=null,t(e)),void(r[u]=e)}var n=r[s];null!==n&&(r[f]=null,r[s]=null,r[c]=null,n(p(void 0,!0))),r[l]=!0})),e.on("readable",m.bind(null,r)),r}},56637:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=r(48834).Buffer,s=r(74854).inspect,c=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:c,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],r&&o(t.prototype,r),e}()},12262:(e,t,r)=>{"use strict";var n=r(34406);function i(e,t){a(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return s||c?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(o,r),t(e)):n.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},59885:(e,t,r)=>{"use strict";var n=r(64452).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var a=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,c=function(){t.writable||l()},u=t._writableState&&t._writableState.finished,l=function(){s=!1,u=!0,a||o.call(t)},f=t._readableState&&t._readableState.endEmitted,d=function(){a=!1,f=!0,s||o.call(t)},h=function(e){o.call(t,e)},p=function(){var e;return a&&!f?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):s&&!u?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},g=function(){t.req.on("finish",l)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",l),t.on("abort",p),t.req?g():t.on("request",g)):s&&!t._writableState&&(t.on("end",c),t.on("close",c)),t.on("end",d),t.on("finish",l),!1!==r.error&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",g),t.req&&t.req.removeListener("finish",l),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",l),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",p)}}},90352:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},63495:(e,t,r)=>{"use strict";var n,i=r(64452).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function c(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",(function(){s=!0})),void 0===n&&(n=r(59885)),n(e,{readable:t,writable:i},(function(e){if(e)return o(e);s=!0,o()}));var c=!1;return function(t){if(!s&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}function u(e){e()}function l(e,t){return e.pipe(t)}function f(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=f(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,r){var o=r<t.length-1;return c(e,o,r>0,(function(e){n||(n=e),e&&a.forEach(u),o||(a.forEach(u),i(n))}))}));return t.reduce(l)}},87605:(e,t,r)=>{"use strict";var n=r(64452).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},15010:(e,t,r)=>{e.exports=r(22699).EventEmitter},67525:(e,t,r)=>{(t=e.exports=r(28051)).Stream=t,t.Readable=t,t.Writable=r(2557),t.Duplex=r(77073),t.Transform=r(27640),t.PassThrough=r(95163),t.finished=r(59885),t.pipeline=r(63495)},51445:(e,t,r)=>{"use strict";var n=r(48834).Buffer,i=r(91285),o=r(84485),a=new Array(16),s=[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],c=[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],u=[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],l=[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],f=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function g(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,A=0|this._b,_=0|this._c,E=0|this._d,x=0|this._e,k=0;k<80;k+=1){var S,C;k<16?(S=g(r,n,i,o,h,e[s[k]],f[0],u[k]),C=v(w,A,_,E,x,e[c[k]],d[0],l[k])):k<32?(S=m(r,n,i,o,h,e[s[k]],f[1],u[k]),C=b(w,A,_,E,x,e[c[k]],d[1],l[k])):k<48?(S=y(r,n,i,o,h,e[s[k]],f[2],u[k]),C=y(w,A,_,E,x,e[c[k]],d[2],l[k])):k<64?(S=b(r,n,i,o,h,e[s[k]],f[3],u[k]),C=m(w,A,_,E,x,e[c[k]],d[3],l[k])):(S=v(r,n,i,o,h,e[s[k]],f[4],u[k]),C=g(w,A,_,E,x,e[c[k]],d[4],l[k])),r=h,h=o,o=p(i,10),i=n,n=S,w=x,x=E,E=p(_,10),_=A,A=C}var P=this._b+i+E|0;this._b=this._c+o+x|0,this._c=this._d+h+w|0,this._d=this._e+r+A|0,this._e=this._a+n+_|0,this._a=P},h.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 e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},22644:function(e,t,r){"use strict";var n=r(48834).Buffer,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getLength=t.decode=t.encode=void 0;var o=i(r(62197));function a(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function s(e,t){if(e<56)return n.from([e+t]);var r=l(e),i=l(t+55+r.length/2);return n.from(i+r,"hex")}function c(e){var t,r,i,o,s,u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,i=128===l?n.from([]):e.slice(1,t),2===t&&i[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:i,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if((t=a(e.slice(1,r).toString("hex"),16))<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if((i=e.slice(r,t+r)).length<t)throw new Error("invalid RLP: not enough bytes for string");return{data:i,remainder:e.slice(t+r)}}if(l<=247){for(t=l-191,o=e.slice(1,t);o.length;)s=c(o),u.push(s.data),o=s.remainder;return{data:u,remainder:e.slice(t)}}var f=(r=l-246)+(t=a(e.slice(1,r).toString("hex"),16));if(f>e.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(o=e.slice(r,f)).length)throw new Error("invalid rlp, List has a invalid length");for(;o.length;)s=c(o),u.push(s.data),o=s.remainder;return{data:u,remainder:e.slice(f)}}function u(e){return"0x"===e.slice(0,2)}function l(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function f(e){if(!n.isBuffer(e)){if("string"==typeof e)return u(e)?n.from((r="string"!=typeof(i=e)?i:u(i)?i.slice(2):i).length%2?"0"+r:r,"hex"):n.from(e);if("number"==typeof e||"bigint"==typeof e)return e?(t=l(e),n.from(t,"hex")):n.from([]);if(null==e)return n.from([]);if(e instanceof Uint8Array)return n.from(e);if(o.default.isBN(e))return n.from(e.toArray());throw new Error("invalid type")}var t,r,i;return e}t.encode=function e(t){if(Array.isArray(t)){for(var r=[],i=0;i<t.length;i++)r.push(e(t[i]));var o=n.concat(r);return n.concat([s(o.length,192),o])}var a=f(t);return 1===a.length&&a[0]<128?a:n.concat([s(a.length,128),a])},t.decode=function(e,t){if(void 0===t&&(t=!1),!e||0===e.length)return n.from([]);var r=c(f(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid remainder");return r.data},t.getLength=function(e){if(!e||0===e.length)return n.from([]);var t=f(e),r=t[0];if(r<=127)return t.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;var i=r-246;return i+a(t.slice(1,i).toString("hex"),16)}},50714:(e,t,r)=>{"use strict";var n=r(71600);t.K=void 0;var i=n(r(98870)),o=n(r(53100)),a=n(r(68230)),s=n(r(60421)),c=n(r(1147)),u=n(r(380));var l=function(e){(0,a.default)(l,e);var t,r,n=(t=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ws://localhost:8080",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.autoconnect,i=void 0===r||r,a=t.reconnect,s=void 0===a||a,c=t.reconnect_interval,f=void 0===c?1e3:c,d=t.max_reconnects,h=void 0===d?5:d,p=arguments.length>2?arguments[2]:void 0;return(0,o.default)(this,l),n.call(this,u.default,e,{autoconnect:i,reconnect:s,reconnect_interval:f,max_reconnects:h},p)}return(0,i.default)(l)}(n(r(98904)).default);t.K=l},98904:(e,t,r)=>{"use strict";var n=r(48834).Buffer,i=r(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(82841)),a=i(r(91461)),s=i(r(67425)),c=i(r(53100)),u=i(r(98870)),l=i(r(68230)),f=i(r(60421)),d=i(r(1147)),h=r(10161);var p=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},g=function(e){(0,l.default)(b,e);var t,r,i,h,g,m,y=(g=b,m=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,d.default)(g);if(m){var r=(0,d.default)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,f.default)(this,e)});function b(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ws://localhost:8080",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;(0,c.default)(this,b);var o=n.autoconnect,a=void 0===o||o,s=n.reconnect,u=void 0===s||s,l=n.reconnect_interval,f=void 0===l?1e3:l,d=n.max_reconnects,h=void 0===d?5:d,g=p(n,["autoconnect","reconnect","reconnect_interval","max_reconnects"]);return(t=y.call(this)).webSocketFactory=e,t.queue={},t.rpc_id=0,t.address=r,t.autoconnect=a,t.ready=!1,t.reconnect=u,t.reconnect_interval=f,t.max_reconnects=h,t.rest_options=g,t.current_reconnects=0,t.generate_request_id=i||function(){return++t.rpc_id},t.autoconnect&&t._connect(t.address,Object.assign({autoconnect:t.autoconnect,reconnect:t.reconnect,reconnect_interval:t.reconnect_interval,max_reconnects:t.max_reconnects},t.rest_options)),t}return(0,u.default)(b,[{key:"connect",value:function(){this.socket||this._connect(this.address,Object.assign({autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects},this.rest_options))}},{key:"call",value:function(e,t,r,n){var i=this;return n||"object"!==(0,s.default)(r)||(n=r,r=null),new Promise((function(o,a){if(!i.ready)return a(new Error("socket not ready"));var s=i.generate_request_id(e,t),c={jsonrpc:"2.0",method:e,params:t||null,id:s};i.socket.send(JSON.stringify(c),n,(function(e){if(e)return a(e);i.queue[s]={promise:[o,a]},r&&(i.queue[s].timeout=setTimeout((function(){delete i.queue[s],a(new Error("reply timeout"))}),r))}))}))}},{key:"login",value:(h=(0,a.default)(o.default.mark((function e(t){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.call("rpc.login",t);case 2:if(r=e.sent){e.next=5;break}throw new Error("authentication failed");case 5:return e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"listMethods",value:(i=(0,a.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.call("__listMethods");case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"notify",value:function(e,t){var r=this;return new Promise((function(n,i){if(!r.ready)return i(new Error("socket not ready"));var o={jsonrpc:"2.0",method:e,params:t||null};r.socket.send(JSON.stringify(o),(function(e){if(e)return i(e);n()}))}))}},{key:"subscribe",value:(r=(0,a.default)(o.default.mark((function e(t){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"string"==typeof t&&(t=[t]),e.next=3,this.call("rpc.on",t);case 3:if(r=e.sent,"string"!=typeof t||"ok"===r[t]){e.next=6;break}throw new Error("Failed subscribing to an event '"+t+"' with: "+r[t]);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"unsubscribe",value:(t=(0,a.default)(o.default.mark((function e(t){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"string"==typeof t&&(t=[t]),e.next=3,this.call("rpc.off",t);case 3:if(r=e.sent,"string"!=typeof t||"ok"===r[t]){e.next=6;break}throw new Error("Failed unsubscribing from an event with: "+r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"close",value:function(e,t){this.socket.close(e||1e3,t)}},{key:"_connect",value:function(e,t){var r=this;this.socket=this.webSocketFactory(e,t),this.socket.addEventListener("open",(function(){r.ready=!0,r.emit("open"),r.current_reconnects=0})),this.socket.addEventListener("message",(function(e){var t=e.data;t instanceof ArrayBuffer&&(t=n.from(t).toString());try{t=JSON.parse(t)}catch(e){return}if(t.notification&&r.listeners(t.notification).length){if(!Object.keys(t.params).length)return r.emit(t.notification);var i=[t.notification];if(t.params.constructor===Object)i.push(t.params);else for(var o=0;o<t.params.length;o++)i.push(t.params[o]);return Promise.resolve().then((function(){r.emit.apply(r,i)}))}if(!r.queue[t.id])return t.method&&t.params?Promise.resolve().then((function(){r.emit(t.method,t.params)})):void 0;"error"in t=="result"in t&&r.queue[t.id].promise[1](new Error('Server response malformed. Response must include either "result" or "error", but not both.')),r.queue[t.id].timeout&&clearTimeout(r.queue[t.id].timeout),t.error?r.queue[t.id].promise[1](t.error):r.queue[t.id].promise[0](t.result),delete r.queue[t.id]})),this.socket.addEventListener("error",(function(e){return r.emit("error",e)})),this.socket.addEventListener("close",(function(n){var i=n.code,o=n.reason;r.ready&&setTimeout((function(){return r.emit("close",i,o)}),0),r.ready=!1,r.socket=void 0,1e3!==i&&(r.current_reconnects++,r.reconnect&&(r.max_reconnects>r.current_reconnects||0===r.max_reconnects)&&setTimeout((function(){return r._connect(e,t)}),r.reconnect_interval))}))}}]),b}(h.EventEmitter);t.default=g},380:(e,t,r)=>{"use strict";var n=r(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return new u(e,t)};var i=n(r(53100)),o=n(r(98870)),a=n(r(68230)),s=n(r(60421)),c=n(r(1147));var u=function(e){(0,a.default)(u,e);var t,r,n=(t=u,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function u(e,t,r){var o;return(0,i.default)(this,u),(o=n.call(this)).socket=new window.WebSocket(e,r),o.socket.onopen=function(){return o.emit("open")},o.socket.onmessage=function(e){return o.emit("message",e.data)},o.socket.onerror=function(e){return o.emit("error",e)},o.socket.onclose=function(e){o.emit("close",e.code,e.reason)},o}return(0,o.default)(u,[{key:"send",value:function(e,t,r){var n=r||t;try{this.socket.send(e),n()}catch(e){n(e)}}},{key:"close",value:function(e,t){this.socket.close(e,t)}},{key:"addEventListener",value:function(e,t,r){this.socket.addEventListener(e,t,r)}}]),u}(r(10161).EventEmitter)},77834:(e,t,r)=>{var n=r(48834),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},27654:(e,t,r)=>{"use strict";var n,i=r(34406),o=r(48834),a=o.Buffer,s={};for(n in o)o.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(s[n]=o[n]);var c=s.Buffer={};for(n in a)a.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(c[n]=a[n]);if(s.Buffer.prototype=a.prototype,c.from&&c.from!==Uint8Array.from||(c.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return a(e,t,r)}),c.alloc||(c.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=a(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!s.kStringMaxLength)try{s.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),e.exports=s},73327:(e,t,r)=>{var n=r(77834).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s<o;){for(var c=a%i,u=Math.min(o-s,i-c),l=0;l<u;l++)r[c+l]=e[s+l];s+=u,(a+=u)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},9065:(e,t,r)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(8820),n.sha1=r(17885),n.sha224=r(58321),n.sha256=r(74424),n.sha384=r(90213),n.sha512=r(55596)},8820:(e,t,r)=>{var n=r(91285),i=r(73327),o=r(77834).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var d=0;d<80;++d){var h=~~(d/20),p=0|((t=n)<<5|t>>>27)+l(h,i,o,s)+c+r[d]+a[h];c=s,s=o,o=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},17885:(e,t,r)=>{var n=r(91285),i=r(73327),o=r(77834).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),g=u(n)+f(p,i,o,s)+c+r[h]+a[p]|0;c=s,s=o,o=l(i),i=n,n=g}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},58321:(e,t,r)=>{var n=r(91285),i=r(74424),o=r(73327),a=r(77834).Buffer,s=new Array(64);function c(){this.init(),this._w=s,o.call(this,64,56)}n(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c},74424:(e,t,r)=>{var n=r(91285),i=r(73327),o=r(77834).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,p=0|this._f,g=0|this._g,m=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+h(r[y-15])+r[y-16];for(var b=0;b<64;++b){var v=m+d(c)+u(c,p,g)+a[b]+r[b]|0,w=f(n)+l(n,i,o)|0;m=g,g=p,p=c,c=s+v|0,s=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0,this._f=p+this._f|0,this._g=g+this._g|0,this._h=m+this._h|0},c.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},90213:(e,t,r)=>{var n=r(91285),i=r(55596),o=r(73327),a=r(77834).Buffer,s=new Array(160);function c(){this.init(),this._w=s,o.call(this,128,112)}n(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},55596:(e,t,r)=>{var n=r(91285),i=r(73327),o=r(77834).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function c(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0<t>>>0?1:0}n(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,c=0|this._fh,b=0|this._gh,v=0|this._hh,w=0|this._al,A=0|this._bl,_=0|this._cl,E=0|this._dl,x=0|this._el,k=0|this._fl,S=0|this._gl,C=0|this._hl,P=0;P<32;P+=2)t[P]=e.readInt32BE(4*P),t[P+1]=e.readInt32BE(4*P+4);for(;P<160;P+=2){var O=t[P-30],I=t[P-30+1],B=h(O,I),T=p(I,O),M=g(O=t[P-4],I=t[P-4+1]),R=m(I,O),N=t[P-14],j=t[P-14+1],L=t[P-32],U=t[P-32+1],D=T+j|0,F=B+N+y(D,T)|0;F=(F=F+M+y(D=D+R|0,R)|0)+L+y(D=D+U|0,U)|0,t[P]=F,t[P+1]=D}for(var z=0;z<160;z+=2){F=t[z],D=t[z+1];var Z=l(r,n,i),H=l(w,A,_),q=f(r,w),W=f(w,r),K=d(s,x),V=d(x,s),G=a[z],$=a[z+1],J=u(s,c,b),Y=u(x,k,S),X=C+V|0,Q=v+K+y(X,C)|0;Q=(Q=(Q=Q+J+y(X=X+Y|0,Y)|0)+G+y(X=X+$|0,$)|0)+F+y(X=X+D|0,D)|0;var ee=W+H|0,te=q+Z+y(ee,W)|0;v=b,C=S,b=c,S=k,c=s,k=x,s=o+Q+y(x=E+X|0,E)|0,o=i,E=_,i=n,_=A,n=r,A=w,r=Q+te+y(w=X+ee|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+A|0,this._cl=this._cl+_|0,this._dl=this._dl+E|0,this._el=this._el+x|0,this._fl=this._fl+k|0,this._gl=this._gl+S|0,this._hl=this._hl+C|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+n+y(this._bl,A)|0,this._ch=this._ch+i+y(this._cl,_)|0,this._dh=this._dh+o+y(this._dl,E)|0,this._eh=this._eh+s+y(this._el,x)|0,this._fh=this._fh+c+y(this._fl,k)|0,this._gh=this._gh+b+y(this._gl,S)|0,this._hh=this._hh+v+y(this._hl,C)|0},c.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},15452:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},54851:(e,t,r)=>{e.exports=i;var n=r(22699).EventEmitter;function i(){n.call(this)}r(91285)(i,n),i.Readable=r(28051),i.Writable=r(2557),i.Duplex=r(77073),i.Transform=r(27640),i.PassThrough=r(95163),i.finished=r(59885),i.pipeline=r(63495),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",c));var a=!1;function s(){a||(a=!0,e.end())}function c(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",c),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",u),e.on("error",u),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},57785:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},30214:(e,t,r)=>{"use strict";var n=r(87805).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},87805:(e,t,r)=>{var n=r(48834),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},79826:(e,t,r)=>{var n=r(38320);e.exports=function(e){return"string"!=typeof e?e:n(e)?e.slice(2):e}},46062:e=>{"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var o={},a=[],s=0;s<e.length;s++){var c=e[s],u=n.base?c[0]+n.base:c[0],l=o[u]||0,f="".concat(u," ").concat(l);o[u]=l+1;var d=r(f),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)t[d].references++,t[d].updater(h);else{var p=i(h,n);n.byIndex=s,t.splice(s,0,{identifier:f,updater:p,references:1})}a.push(f)}return a}function i(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,i){var o=n(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var s=r(o[a]);t[s].references--}for(var c=n(e,i),u=0;u<o.length;u++){var l=r(o[u]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}o=c}}},96793:e=>{"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},11173:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},17892:(e,t,r)=>{"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},44036:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},42464:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},18404:(e,t)=>{"use strict";function r(e,t,r){return t<=e&&e<=r}function n(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function i(e){this.tokens=[].slice.call(e)}i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var o=-1;function a(e,t){if(e)throw TypeError("Decoder error");return t||65533}var s="utf-8";function c(e,t){if(!(this instanceof c))return new c(e,t);if((e=void 0!==e?String(e).toLowerCase():s)!==s)throw new Error("Encoding not supported. Only utf-8 is supported");t=n(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(t.fatal),this._ignoreBOM=Boolean(t.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function u(e,t){if(!(this instanceof u))return new u(e,t);if((e=void 0!==e?String(e).toLowerCase():s)!==s)throw new Error("Encoding not supported. Only utf-8 is supported");t=n(t),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function l(e){var t=e.fatal,n=0,i=0,s=0,c=128,u=191;this.handler=function(e,l){if(-1===l&&0!==s)return s=0,a(t);if(-1===l)return o;if(0===s){if(r(l,0,127))return l;if(r(l,194,223))s=1,n=l-192;else if(r(l,224,239))224===l&&(c=160),237===l&&(u=159),s=2,n=l-224;else{if(!r(l,240,244))return a(t);240===l&&(c=144),244===l&&(u=143),s=3,n=l-240}return n<<=6*s,null}if(!r(l,c,u))return n=s=i=0,c=128,u=191,e.prepend(l),a(t);if(c=128,u=191,n+=l-128<<6*(s-(i+=1)),i!==s)return null;var f=n;return n=s=i=0,f}}function f(e){e.fatal,this.handler=function(e,t){if(-1===t)return o;if(r(t,0,127))return t;var n,i;r(t,128,2047)?(n=1,i=192):r(t,2048,65535)?(n=2,i=224):r(t,65536,1114111)&&(n=3,i=240);for(var a=[(t>>6*n)+i];n>0;){var s=t>>6*(n-1);a.push(128|63&s),n-=1}return a}}c.prototype={decode:function(e,t){var r;r="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=n(t),this._streaming||(this._decoder=new l({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var a,s=new i(r),c=[];!s.endOfStream()&&(a=this._decoder.handler(s,s.read()))!==o;)null!==a&&(Array.isArray(a)?c.push.apply(c,a):c.push(a));if(!this._streaming){do{if((a=this._decoder.handler(s,s.read()))===o)break;null!==a&&(Array.isArray(a)?c.push.apply(c,a):c.push(a))}while(!s.endOfStream());this._decoder=null}return c.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===c[0]?(this._BOMseen=!0,c.shift()):this._BOMseen=!0)),function(e){for(var t="",r=0;r<e.length;++r){var n=e[r];n<=65535?t+=String.fromCharCode(n):(n-=65536,t+=String.fromCharCode(55296+(n>>10),56320+(1023&n)))}return t}(c)}},u.prototype={encode:function(e,t){e=e?String(e):"",t=n(t),this._streaming||(this._encoder=new f(this._options)),this._streaming=Boolean(t.stream);for(var r,a=[],s=new i(function(e){for(var t=String(e),r=t.length,n=0,i=[];n<r;){var o=t.charCodeAt(n);if(o<55296||o>57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319)if(n===r-1)i.push(65533);else{var a=e.charCodeAt(n+1);if(56320<=a&&a<=57343){var s=1023&o,c=1023&a;i.push(65536+(s<<10)+c),n+=1}else i.push(65533)}n+=1}return i}(e));!s.endOfStream()&&(r=this._encoder.handler(s,s.read()))!==o;)Array.isArray(r)?a.push.apply(a,r):a.push(r);if(!this._streaming){for(;(r=this._encoder.handler(s,s.read()))!==o;)Array.isArray(r)?a.push.apply(a,r):a.push(r);this._encoder=null}return new Uint8Array(a)}},t.TextEncoder=u,t.TextDecoder=c},251:function(e,t,r){var n=r(66396).Buffer;!function(t,r){"use strict";e.exports?e.exports=r():(t.nacl||(t.nacl={}),t.nacl.util=r())}(this,(function(){"use strict";var e={};function t(e){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}return e.decodeUTF8=function(e){if("string"!=typeof e)throw new TypeError("expected string");var t,r=unescape(encodeURIComponent(e)),n=new Uint8Array(r.length);for(t=0;t<r.length;t++)n[t]=r.charCodeAt(t);return n},e.encodeUTF8=function(e){var t,r=[];for(t=0;t<e.length;t++)r.push(String.fromCharCode(e[t]));return decodeURIComponent(escape(r.join("")))},"undefined"==typeof atob?void 0!==n.from?(e.encodeBase64=function(e){return n.from(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(n.from(e,"base64"),0))}):(e.encodeBase64=function(e){return new n(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(new n(e,"base64"),0))}):(e.encodeBase64=function(e){var t,r=[],n=e.length;for(t=0;t<n;t++)r.push(String.fromCharCode(e[t]));return btoa(r.join(""))},e.decodeBase64=function(e){t(e);var r,n=atob(e),i=new Uint8Array(n.length);for(r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return i}),e}))},10717:(e,t,r)=>{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var a=t(),s=t([1]),c=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function g(e,t,r,n,i){var o,a=0;for(o=0;o<i;o++)a|=e[t+o]^r[n+o];return(1&a-1>>>8)-1}function m(e,t,r,n){return g(e,t,r,n,16)}function y(e,t,r,n){return g(e,t,r,n,32)}function b(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,A=o,_=a,E=s,x=c,k=u,S=l,C=f,P=d,O=h,I=p,B=g,T=m,M=y,R=b,N=v,j=w,L=0;L<20;L+=2)A^=(i=(M^=(i=(O^=(i=(k^=(i=A+M|0)<<7|i>>>25)+A|0)<<9|i>>>23)+k|0)<<13|i>>>19)+O|0)<<18|i>>>14,S^=(i=(_^=(i=(R^=(i=(I^=(i=S+_|0)<<7|i>>>25)+S|0)<<9|i>>>23)+I|0)<<13|i>>>19)+R|0)<<18|i>>>14,B^=(i=(C^=(i=(E^=(i=(N^=(i=B+C|0)<<7|i>>>25)+B|0)<<9|i>>>23)+N|0)<<13|i>>>19)+E|0)<<18|i>>>14,j^=(i=(T^=(i=(P^=(i=(x^=(i=j+T|0)<<7|i>>>25)+j|0)<<9|i>>>23)+x|0)<<13|i>>>19)+P|0)<<18|i>>>14,A^=(i=(x^=(i=(E^=(i=(_^=(i=A+x|0)<<7|i>>>25)+A|0)<<9|i>>>23)+_|0)<<13|i>>>19)+E|0)<<18|i>>>14,S^=(i=(k^=(i=(P^=(i=(C^=(i=S+k|0)<<7|i>>>25)+S|0)<<9|i>>>23)+C|0)<<13|i>>>19)+P|0)<<18|i>>>14,B^=(i=(I^=(i=(O^=(i=(T^=(i=B+I|0)<<7|i>>>25)+B|0)<<9|i>>>23)+T|0)<<13|i>>>19)+O|0)<<18|i>>>14,j^=(i=(N^=(i=(R^=(i=(M^=(i=j+N|0)<<7|i>>>25)+j|0)<<9|i>>>23)+M|0)<<13|i>>>19)+R|0)<<18|i>>>14;A=A+o|0,_=_+a|0,E=E+s|0,x=x+c|0,k=k+u|0,S=S+l|0,C=C+f|0,P=P+d|0,O=O+h|0,I=I+p|0,B=B+g|0,T=T+m|0,M=M+y|0,R=R+b|0,N=N+v|0,j=j+w|0,e[0]=A>>>0&255,e[1]=A>>>8&255,e[2]=A>>>16&255,e[3]=A>>>24&255,e[4]=_>>>0&255,e[5]=_>>>8&255,e[6]=_>>>16&255,e[7]=_>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=x>>>0&255,e[13]=x>>>8&255,e[14]=x>>>16&255,e[15]=x>>>24&255,e[16]=k>>>0&255,e[17]=k>>>8&255,e[18]=k>>>16&255,e[19]=k>>>24&255,e[20]=S>>>0&255,e[21]=S>>>8&255,e[22]=S>>>16&255,e[23]=S>>>24&255,e[24]=C>>>0&255,e[25]=C>>>8&255,e[26]=C>>>16&255,e[27]=C>>>24&255,e[28]=P>>>0&255,e[29]=P>>>8&255,e[30]=P>>>16&255,e[31]=P>>>24&255,e[32]=O>>>0&255,e[33]=O>>>8&255,e[34]=O>>>16&255,e[35]=O>>>24&255,e[36]=I>>>0&255,e[37]=I>>>8&255,e[38]=I>>>16&255,e[39]=I>>>24&255,e[40]=B>>>0&255,e[41]=B>>>8&255,e[42]=B>>>16&255,e[43]=B>>>24&255,e[44]=T>>>0&255,e[45]=T>>>8&255,e[46]=T>>>16&255,e[47]=T>>>24&255,e[48]=M>>>0&255,e[49]=M>>>8&255,e[50]=M>>>16&255,e[51]=M>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=j>>>0&255,e[61]=j>>>8&255,e[62]=j>>>16&255,e[63]=j>>>24&255}(e,t,r,n)}function v(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,A=0;A<20;A+=2)o^=(i=(y^=(i=(h^=(i=(u^=(i=o+y|0)<<7|i>>>25)+o|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,l^=(i=(a^=(i=(b^=(i=(p^=(i=l+a|0)<<7|i>>>25)+l|0)<<9|i>>>23)+p|0)<<13|i>>>19)+b|0)<<18|i>>>14,g^=(i=(f^=(i=(s^=(i=(v^=(i=g+f|0)<<7|i>>>25)+g|0)<<9|i>>>23)+v|0)<<13|i>>>19)+s|0)<<18|i>>>14,w^=(i=(m^=(i=(d^=(i=(c^=(i=w+m|0)<<7|i>>>25)+w|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,o^=(i=(c^=(i=(s^=(i=(a^=(i=o+c|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+s|0)<<18|i>>>14,l^=(i=(u^=(i=(d^=(i=(f^=(i=l+u|0)<<7|i>>>25)+l|0)<<9|i>>>23)+f|0)<<13|i>>>19)+d|0)<<18|i>>>14,g^=(i=(p^=(i=(h^=(i=(m^=(i=g+p|0)<<7|i>>>25)+g|0)<<9|i>>>23)+m|0)<<13|i>>>19)+h|0)<<18|i>>>14,w^=(i=(v^=(i=(b^=(i=(y^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+y|0)<<13|i>>>19)+b|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=h>>>0&255,e[25]=h>>>8&255,e[26]=h>>>16&255,e[27]=h>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function A(e,t,r,n,i,o,a){var s,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=o[c];for(;i>=64;){for(b(l,u,a,w),c=0;c<64;c++)e[t+c]=r[n+c]^l[c];for(s=1,c=8;c<16;c++)s=s+(255&u[c])|0,u[c]=255&s,s>>>=8;i-=64,t+=64,n+=64}if(i>0)for(b(l,u,a,w),c=0;c<i;c++)e[t+c]=r[n+c]^l[c];return 0}function _(e,t,r,n,i){var o,a,s=new Uint8Array(16),c=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=n[a];for(;r>=64;){for(b(c,s,i,w),a=0;a<64;a++)e[t+a]=c[a];for(o=1,a=8;a<16;a++)o=o+(255&s[a])|0,s[a]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(b(c,s,i,w),a=0;a<r;a++)e[t+a]=c[a];return 0}function E(e,t,r,n,i){var o=new Uint8Array(32);v(o,n,i,w);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=n[s+16];return _(e,t,r,a,o)}function x(e,t,r,n,i,o,a){var s=new Uint8Array(32);v(s,o,a,w);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=o[u+16];return A(e,t,r,n,i,c,s)}var k=function(e){var t,r,n,i,o,a,s,c;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,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function S(e,t,r,n,i,o){var a=new k(o);return a.update(r,n,i),a.finish(e,t),0}function C(e,t,r,n,i,o){var a=new Uint8Array(16);return S(a,0,r,n,i,o),m(e,t,a,0)}function P(e,t,r,n,i){var o;if(r<32)return-1;for(x(e,0,t,0,r,n,i),S(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function O(e,t,r,n,i){var o,a=new Uint8Array(32);if(r<32)return-1;if(E(a,0,32,n,i),0!==C(t,16,t,32,r-32,a))return-1;for(x(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function I(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function B(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function T(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function M(e,r){var n,i,o,a=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(B(s),B(s),B(s),i=0;i<2;i++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),o=a[15]>>16&1,a[14]&=65535,T(s,a,1-o)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function R(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return M(r,e),M(n,t),y(r,0,n,0)}function N(e){var t=new Uint8Array(32);return M(t,e),1&t[0]}function j(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function U(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function D(e,t,r){var n,i,o=0,a=0,s=0,c=0,u=0,l=0,f=0,d=0,h=0,p=0,g=0,m=0,y=0,b=0,v=0,w=0,A=0,_=0,E=0,x=0,k=0,S=0,C=0,P=0,O=0,I=0,B=0,T=0,M=0,R=0,N=0,j=r[0],L=r[1],U=r[2],D=r[3],F=r[4],z=r[5],Z=r[6],H=r[7],q=r[8],W=r[9],K=r[10],V=r[11],G=r[12],$=r[13],J=r[14],Y=r[15];o+=(n=t[0])*j,a+=n*L,s+=n*U,c+=n*D,u+=n*F,l+=n*z,f+=n*Z,d+=n*H,h+=n*q,p+=n*W,g+=n*K,m+=n*V,y+=n*G,b+=n*$,v+=n*J,w+=n*Y,a+=(n=t[1])*j,s+=n*L,c+=n*U,u+=n*D,l+=n*F,f+=n*z,d+=n*Z,h+=n*H,p+=n*q,g+=n*W,m+=n*K,y+=n*V,b+=n*G,v+=n*$,w+=n*J,A+=n*Y,s+=(n=t[2])*j,c+=n*L,u+=n*U,l+=n*D,f+=n*F,d+=n*z,h+=n*Z,p+=n*H,g+=n*q,m+=n*W,y+=n*K,b+=n*V,v+=n*G,w+=n*$,A+=n*J,_+=n*Y,c+=(n=t[3])*j,u+=n*L,l+=n*U,f+=n*D,d+=n*F,h+=n*z,p+=n*Z,g+=n*H,m+=n*q,y+=n*W,b+=n*K,v+=n*V,w+=n*G,A+=n*$,_+=n*J,E+=n*Y,u+=(n=t[4])*j,l+=n*L,f+=n*U,d+=n*D,h+=n*F,p+=n*z,g+=n*Z,m+=n*H,y+=n*q,b+=n*W,v+=n*K,w+=n*V,A+=n*G,_+=n*$,E+=n*J,x+=n*Y,l+=(n=t[5])*j,f+=n*L,d+=n*U,h+=n*D,p+=n*F,g+=n*z,m+=n*Z,y+=n*H,b+=n*q,v+=n*W,w+=n*K,A+=n*V,_+=n*G,E+=n*$,x+=n*J,k+=n*Y,f+=(n=t[6])*j,d+=n*L,h+=n*U,p+=n*D,g+=n*F,m+=n*z,y+=n*Z,b+=n*H,v+=n*q,w+=n*W,A+=n*K,_+=n*V,E+=n*G,x+=n*$,k+=n*J,S+=n*Y,d+=(n=t[7])*j,h+=n*L,p+=n*U,g+=n*D,m+=n*F,y+=n*z,b+=n*Z,v+=n*H,w+=n*q,A+=n*W,_+=n*K,E+=n*V,x+=n*G,k+=n*$,S+=n*J,C+=n*Y,h+=(n=t[8])*j,p+=n*L,g+=n*U,m+=n*D,y+=n*F,b+=n*z,v+=n*Z,w+=n*H,A+=n*q,_+=n*W,E+=n*K,x+=n*V,k+=n*G,S+=n*$,C+=n*J,P+=n*Y,p+=(n=t[9])*j,g+=n*L,m+=n*U,y+=n*D,b+=n*F,v+=n*z,w+=n*Z,A+=n*H,_+=n*q,E+=n*W,x+=n*K,k+=n*V,S+=n*G,C+=n*$,P+=n*J,O+=n*Y,g+=(n=t[10])*j,m+=n*L,y+=n*U,b+=n*D,v+=n*F,w+=n*z,A+=n*Z,_+=n*H,E+=n*q,x+=n*W,k+=n*K,S+=n*V,C+=n*G,P+=n*$,O+=n*J,I+=n*Y,m+=(n=t[11])*j,y+=n*L,b+=n*U,v+=n*D,w+=n*F,A+=n*z,_+=n*Z,E+=n*H,x+=n*q,k+=n*W,S+=n*K,C+=n*V,P+=n*G,O+=n*$,I+=n*J,B+=n*Y,y+=(n=t[12])*j,b+=n*L,v+=n*U,w+=n*D,A+=n*F,_+=n*z,E+=n*Z,x+=n*H,k+=n*q,S+=n*W,C+=n*K,P+=n*V,O+=n*G,I+=n*$,B+=n*J,T+=n*Y,b+=(n=t[13])*j,v+=n*L,w+=n*U,A+=n*D,_+=n*F,E+=n*z,x+=n*Z,k+=n*H,S+=n*q,C+=n*W,P+=n*K,O+=n*V,I+=n*G,B+=n*$,T+=n*J,M+=n*Y,v+=(n=t[14])*j,w+=n*L,A+=n*U,_+=n*D,E+=n*F,x+=n*z,k+=n*Z,S+=n*H,C+=n*q,P+=n*W,O+=n*K,I+=n*V,B+=n*G,T+=n*$,M+=n*J,R+=n*Y,w+=(n=t[15])*j,a+=38*(_+=n*U),s+=38*(E+=n*D),c+=38*(x+=n*F),u+=38*(k+=n*z),l+=38*(S+=n*Z),f+=38*(C+=n*H),d+=38*(P+=n*q),h+=38*(O+=n*W),p+=38*(I+=n*K),g+=38*(B+=n*V),m+=38*(T+=n*G),y+=38*(M+=n*$),b+=38*(R+=n*J),v+=38*(N+=n*Y),o=(n=(o+=38*(A+=n*L))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=f,e[7]=d,e[8]=h,e[9]=p,e[10]=g,e[11]=m,e[12]=y,e[13]=b,e[14]=v,e[15]=w}function F(e,t){D(e,t,t)}function z(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&D(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function Z(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)F(i,i),1!==n&&D(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function H(e,r,n){var i,o,a=new Uint8Array(32),s=new Float64Array(80),u=t(),l=t(),f=t(),d=t(),h=t(),p=t();for(o=0;o<31;o++)a[o]=r[o];for(a[31]=127&r[31]|64,a[0]&=248,j(s,n),o=0;o<16;o++)l[o]=s[o],d[o]=u[o]=f[o]=0;for(u[0]=d[0]=1,o=254;o>=0;--o)T(u,l,i=a[o>>>3]>>>(7&o)&1),T(f,d,i),L(h,u,f),U(u,u,f),L(f,l,d),U(l,l,d),F(d,h),F(p,u),D(u,f,u),D(f,l,h),L(h,u,f),U(u,u,f),F(l,u),U(f,d,p),D(u,f,c),L(u,u,d),D(f,f,u),D(u,d,p),D(d,l,s),F(l,h),T(u,l,i),T(f,d,i);for(o=0;o<16;o++)s[o+16]=u[o],s[o+32]=f[o],s[o+48]=l[o],s[o+64]=d[o];var g=s.subarray(32),m=s.subarray(16);return z(g,g),D(m,m,g),M(e,m),0}function q(e,t){return H(e,t,o)}function W(e,t){return n(t,32),q(e,t)}function K(e,t,r){var n=new Uint8Array(32);return H(n,r,t),v(e,i,n,w)}k.prototype.blocks=function(e,t,r){for(var n,i,o,a,s,c,u,l,f,d,h,p,g,m,y,b,v,w,A,_=this.fin?0:2048,E=this.h[0],x=this.h[1],k=this.h[2],S=this.h[3],C=this.h[4],P=this.h[5],O=this.h[6],I=this.h[7],B=this.h[8],T=this.h[9],M=this.r[0],R=this.r[1],N=this.r[2],j=this.r[3],L=this.r[4],U=this.r[5],D=this.r[6],F=this.r[7],z=this.r[8],Z=this.r[9];r>=16;)d=f=0,d+=(E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*M,d+=(x+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*Z),d+=(k+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*z),d+=(S+=8191&(o>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),f=(d+=(C+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*D))>>>13,d&=8191,d+=(P+=s>>>1&8191)*(5*U),d+=(O+=8191&(s>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*L),d+=(I+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*j),d+=(B+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*N),h=f+=(d+=(T+=l>>>5|_)*(5*R))>>>13,h+=E*R,h+=x*M,h+=k*(5*Z),h+=S*(5*z),f=(h+=C*(5*F))>>>13,h&=8191,h+=P*(5*D),h+=O*(5*U),h+=I*(5*L),h+=B*(5*j),f+=(h+=T*(5*N))>>>13,h&=8191,p=f,p+=E*N,p+=x*R,p+=k*M,p+=S*(5*Z),f=(p+=C*(5*z))>>>13,p&=8191,p+=P*(5*F),p+=O*(5*D),p+=I*(5*U),p+=B*(5*L),g=f+=(p+=T*(5*j))>>>13,g+=E*j,g+=x*N,g+=k*R,g+=S*M,f=(g+=C*(5*Z))>>>13,g&=8191,g+=P*(5*z),g+=O*(5*F),g+=I*(5*D),g+=B*(5*U),m=f+=(g+=T*(5*L))>>>13,m+=E*L,m+=x*j,m+=k*N,m+=S*R,f=(m+=C*M)>>>13,m&=8191,m+=P*(5*Z),m+=O*(5*z),m+=I*(5*F),m+=B*(5*D),y=f+=(m+=T*(5*U))>>>13,y+=E*U,y+=x*L,y+=k*j,y+=S*N,f=(y+=C*R)>>>13,y&=8191,y+=P*M,y+=O*(5*Z),y+=I*(5*z),y+=B*(5*F),b=f+=(y+=T*(5*D))>>>13,b+=E*D,b+=x*U,b+=k*L,b+=S*j,f=(b+=C*N)>>>13,b&=8191,b+=P*R,b+=O*M,b+=I*(5*Z),b+=B*(5*z),v=f+=(b+=T*(5*F))>>>13,v+=E*F,v+=x*D,v+=k*U,v+=S*L,f=(v+=C*j)>>>13,v&=8191,v+=P*N,v+=O*R,v+=I*M,v+=B*(5*Z),w=f+=(v+=T*(5*z))>>>13,w+=E*z,w+=x*F,w+=k*D,w+=S*U,f=(w+=C*L)>>>13,w&=8191,w+=P*j,w+=O*N,w+=I*R,w+=B*M,A=f+=(w+=T*(5*Z))>>>13,A+=E*Z,A+=x*z,A+=k*F,A+=S*D,f=(A+=C*U)>>>13,A&=8191,A+=P*L,A+=O*j,A+=I*N,A+=B*R,E=d=8191&(f=(f=((f+=(A+=T*M)>>>13)<<2)+f|0)+(d&=8191)|0),x=h+=f>>>=13,k=p&=8191,S=g&=8191,C=m&=8191,P=y&=8191,O=b&=8191,I=v&=8191,B=w&=8191,T=A&=8191,t+=16,r-=16;this.h[0]=E,this.h[1]=x,this.h[2]=k,this.h[3]=S,this.h[4]=C,this.h[5]=P,this.h[6]=O,this.h[7]=I,this.h[8]=B,this.h[9]=T},k.prototype.finish=function(e,t){var r,n,i,o,a=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this.h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|a[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},k.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var V=P,G=O,$=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function J(e,t,r,n){for(var i,o,a,s,c,u,l,f,d,h,p,g,m,y,b,v,w,A,_,E,x,k,S,C,P,O,I=new Int32Array(16),B=new Int32Array(16),T=e[0],M=e[1],R=e[2],N=e[3],j=e[4],L=e[5],U=e[6],D=e[7],F=t[0],z=t[1],Z=t[2],H=t[3],q=t[4],W=t[5],K=t[6],V=t[7],G=0;n>=128;){for(_=0;_<16;_++)E=8*_+G,I[_]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],B[_]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(_=0;_<80;_++)if(i=T,o=M,a=R,s=N,c=j,u=L,l=U,d=F,h=z,p=Z,g=H,m=q,y=W,b=K,S=65535&(k=V),C=k>>>16,P=65535&(x=D),O=x>>>16,S+=65535&(k=(q>>>14|j<<18)^(q>>>18|j<<14)^(j>>>9|q<<23)),C+=k>>>16,P+=65535&(x=(j>>>14|q<<18)^(j>>>18|q<<14)^(q>>>9|j<<23)),O+=x>>>16,S+=65535&(k=q&W^~q&K),C+=k>>>16,P+=65535&(x=j&L^~j&U),O+=x>>>16,S+=65535&(k=$[2*_+1]),C+=k>>>16,P+=65535&(x=$[2*_]),O+=x>>>16,x=I[_%16],C+=(k=B[_%16])>>>16,P+=65535&x,O+=x>>>16,P+=(C+=(S+=65535&k)>>>16)>>>16,S=65535&(k=A=65535&S|C<<16),C=k>>>16,P=65535&(x=w=65535&P|(O+=P>>>16)<<16),O=x>>>16,S+=65535&(k=(F>>>28|T<<4)^(T>>>2|F<<30)^(T>>>7|F<<25)),C+=k>>>16,P+=65535&(x=(T>>>28|F<<4)^(F>>>2|T<<30)^(F>>>7|T<<25)),O+=x>>>16,C+=(k=F&z^F&Z^z&Z)>>>16,P+=65535&(x=T&M^T&R^M&R),O+=x>>>16,f=65535&(P+=(C+=(S+=65535&k)>>>16)>>>16)|(O+=P>>>16)<<16,v=65535&S|C<<16,S=65535&(k=g),C=k>>>16,P=65535&(x=s),O=x>>>16,C+=(k=A)>>>16,P+=65535&(x=w),O+=x>>>16,M=i,R=o,N=a,j=s=65535&(P+=(C+=(S+=65535&k)>>>16)>>>16)|(O+=P>>>16)<<16,L=c,U=u,D=l,T=f,z=d,Z=h,H=p,q=g=65535&S|C<<16,W=m,K=y,V=b,F=v,_%16==15)for(E=0;E<16;E++)x=I[E],S=65535&(k=B[E]),C=k>>>16,P=65535&x,O=x>>>16,x=I[(E+9)%16],S+=65535&(k=B[(E+9)%16]),C+=k>>>16,P+=65535&x,O+=x>>>16,w=I[(E+1)%16],S+=65535&(k=((A=B[(E+1)%16])>>>1|w<<31)^(A>>>8|w<<24)^(A>>>7|w<<25)),C+=k>>>16,P+=65535&(x=(w>>>1|A<<31)^(w>>>8|A<<24)^w>>>7),O+=x>>>16,w=I[(E+14)%16],C+=(k=((A=B[(E+14)%16])>>>19|w<<13)^(w>>>29|A<<3)^(A>>>6|w<<26))>>>16,P+=65535&(x=(w>>>19|A<<13)^(A>>>29|w<<3)^w>>>6),O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,I[E]=65535&P|O<<16,B[E]=65535&S|C<<16;S=65535&(k=F),C=k>>>16,P=65535&(x=T),O=x>>>16,x=e[0],C+=(k=t[0])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[0]=T=65535&P|O<<16,t[0]=F=65535&S|C<<16,S=65535&(k=z),C=k>>>16,P=65535&(x=M),O=x>>>16,x=e[1],C+=(k=t[1])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[1]=M=65535&P|O<<16,t[1]=z=65535&S|C<<16,S=65535&(k=Z),C=k>>>16,P=65535&(x=R),O=x>>>16,x=e[2],C+=(k=t[2])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[2]=R=65535&P|O<<16,t[2]=Z=65535&S|C<<16,S=65535&(k=H),C=k>>>16,P=65535&(x=N),O=x>>>16,x=e[3],C+=(k=t[3])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[3]=N=65535&P|O<<16,t[3]=H=65535&S|C<<16,S=65535&(k=q),C=k>>>16,P=65535&(x=j),O=x>>>16,x=e[4],C+=(k=t[4])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[4]=j=65535&P|O<<16,t[4]=q=65535&S|C<<16,S=65535&(k=W),C=k>>>16,P=65535&(x=L),O=x>>>16,x=e[5],C+=(k=t[5])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[5]=L=65535&P|O<<16,t[5]=W=65535&S|C<<16,S=65535&(k=K),C=k>>>16,P=65535&(x=U),O=x>>>16,x=e[6],C+=(k=t[6])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[6]=U=65535&P|O<<16,t[6]=K=65535&S|C<<16,S=65535&(k=V),C=k>>>16,P=65535&(x=D),O=x>>>16,x=e[7],C+=(k=t[7])>>>16,P+=65535&x,O+=x>>>16,O+=(P+=(C+=(S+=65535&k)>>>16)>>>16)>>>16,e[7]=D=65535&P|O<<16,t[7]=V=65535&S|C<<16,G+=128,n-=128}return n}function Y(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),a=new Uint8Array(256),s=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,J(i,o,t,r),r%=128,n=0;n<r;n++)a[n]=t[s-r+n];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,p(a,r-8,s/536870912|0,s<<3),J(i,o,a,r),n=0;n<8;n++)p(e,8*n,i[n],o[n]);return 0}function X(e,r){var n=t(),i=t(),o=t(),a=t(),s=t(),c=t(),u=t(),f=t(),d=t();U(n,e[1],e[0]),U(d,r[1],r[0]),D(n,n,d),L(i,e[0],e[1]),L(d,r[0],r[1]),D(i,i,d),D(o,e[3],r[3]),D(o,o,l),D(a,e[2],r[2]),L(a,a,a),U(s,i,n),U(c,a,o),L(u,a,o),L(f,i,n),D(e[0],s,c),D(e[1],f,u),D(e[2],u,c),D(e[3],s,f)}function Q(e,t,r){var n;for(n=0;n<4;n++)T(e[n],t[n],r)}function ee(e,r){var n=t(),i=t(),o=t();z(o,r[2]),D(n,r[0],o),D(i,r[1],o),M(e,i),e[31]^=N(n)<<7}function te(e,t,r){var n,i;for(I(e[0],a),I(e[1],s),I(e[2],s),I(e[3],a),i=255;i>=0;--i)Q(e,t,n=r[i/8|0]>>(7&i)&1),X(t,e),X(e,e),Q(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];I(n[0],f),I(n[1],d),I(n[2],s),D(n[3],f,d),te(e,n,r)}function ne(e,r,i){var o,a=new Uint8Array(64),s=[t(),t(),t(),t()];for(i||n(r,32),Y(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,re(s,a),ee(e,s),o=0;o<32;o++)r[o+32]=e[o];return 0}var ie=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 oe(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*ie[i-(n-32)],r=Math.floor((t[i]+128)/256),t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ie[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ie[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ae(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}function se(e,r,n,i){var o,a,s=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),f=[t(),t(),t(),t()];Y(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64;var d=n+64;for(o=0;o<n;o++)e[64+o]=r[o];for(o=0;o<32;o++)e[32+o]=s[32+o];for(Y(u,e.subarray(32),n+32),ae(u),re(f,u),ee(e,f),o=32;o<64;o++)e[o]=i[o];for(Y(c,e,n+64),ae(c),o=0;o<64;o++)l[o]=0;for(o=0;o<32;o++)l[o]=u[o];for(o=0;o<32;o++)for(a=0;a<32;a++)l[o+a]+=c[o]*s[a];return oe(e.subarray(32),l),d}function ce(e,r,n,i){var o,c=new Uint8Array(32),l=new Uint8Array(64),f=[t(),t(),t(),t()],d=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),i=t(),o=t(),c=t(),l=t(),f=t(),d=t();return I(e[2],s),j(e[1],r),F(o,e[1]),D(c,o,u),U(o,o,e[2]),L(c,e[2],c),F(l,c),F(f,l),D(d,f,l),D(n,d,o),D(n,n,c),Z(n,n),D(n,n,o),D(n,n,c),D(n,n,c),D(e[0],n,c),F(i,e[0]),D(i,i,c),R(i,o)&&D(e[0],e[0],h),F(i,e[0]),D(i,i,c),R(i,o)?-1:(N(e[0])===r[31]>>7&&U(e[0],a,e[0]),D(e[3],e[0],e[1]),0)}(d,i))return-1;for(o=0;o<n;o++)e[o]=r[o];for(o=0;o<32;o++)e[o+32]=i[o];if(Y(l,e,n),ae(l),te(f,d,l),re(d,r.subarray(32)),X(f,d),ee(c,f),n-=64,y(r,0,c,0)){for(o=0;o<n;o++)e[o]=0;return-1}for(o=0;o<n;o++)e[o]=r[o+64];return n}var ue=64,le=32,fe=64;function de(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function he(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function pe(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:v,crypto_stream_xor:x,crypto_stream:E,crypto_stream_salsa20_xor:A,crypto_stream_salsa20:_,crypto_onetimeauth:S,crypto_onetimeauth_verify:C,crypto_verify_16:m,crypto_verify_32:y,crypto_secretbox:P,crypto_secretbox_open:O,crypto_scalarmult:H,crypto_scalarmult_base:q,crypto_box_beforenm:K,crypto_box_afternm:V,crypto_box:function(e,t,r,n,i,o){var a=new Uint8Array(32);return K(a,i,o),V(e,t,r,n,a)},crypto_box_open:function(e,t,r,n,i,o){var a=new Uint8Array(32);return K(a,i,o),G(e,t,r,n,a)},crypto_box_keypair:W,crypto_hash:Y,crypto_sign:se,crypto_sign_keypair:ne,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ue,crypto_sign_PUBLICKEYBYTES:le,crypto_sign_SECRETKEYBYTES:fe,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ie,pack25519:M,unpack25519:j,M:D,A:L,S:F,Z:U,pow2523:Z,add:X,set25519:I,modL:oe,scalarmult:te,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){he(e,t,r),de(r,t);for(var n=new Uint8Array(32+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+32]=e[o];return P(i,n,n.length,t,r),i.subarray(16)},e.secretbox.open=function(e,t,r){he(e,t,r),de(r,t);for(var n=new Uint8Array(16+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+16]=e[o];return n.length<32||0!==O(i,n,n.length,t,r)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(he(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return H(r,e,t),r},e.scalarMult.base=function(e){if(he(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return q(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox(t,r,o)},e.box.before=function(e,t){he(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return K(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox.open(t,r,o)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return W(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(he(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return q(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(he(e,t),t.length!==fe)throw new Error("bad secret key size");var r=new Uint8Array(ue+e.length);return se(r,e,e.length,t),r},e.sign.open=function(e,t){if(he(e,t),t.length!==le)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ce(r,e,e.length,t);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},e.sign.detached=function(t,r){for(var n=e.sign(t,r),i=new Uint8Array(ue),o=0;o<i.length;o++)i[o]=n[o];return i},e.sign.detached.verify=function(e,t,r){if(he(e,t,r),t.length!==ue)throw new Error("bad signature size");if(r.length!==le)throw new Error("bad public key size");var n,i=new Uint8Array(ue+e.length),o=new Uint8Array(ue+e.length);for(n=0;n<ue;n++)i[n]=t[n];for(n=0;n<e.length;n++)i[n+ue]=e[n];return ce(o,i,i.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(fe);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(he(e),e.length!==fe)throw new Error("bad secret key size");for(var t=new Uint8Array(le),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(he(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),r=new Uint8Array(fe),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=le,e.sign.secretKeyLength=fe,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){he(e);var t=new Uint8Array(64);return Y(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return he(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===g(e,0,t,0,e.length)},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,r){var n,i=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=i[n];pe(i)})):(t=r(85338))&&t.randomBytes&&e.setPRNG((function(e,r){var n,i=t.randomBytes(r);for(n=0;n<r;n++)e[n]=i[n];pe(i)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},78743:(e,t,r)=>{var n=r(48834).Buffer,i=r(30775).strict;e.exports=function(e){if(i(e)){var t=n.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return n.from(e)}},59639:function(e,t,r){var n;e=r.nmd(e),function(i){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var a,s=2147483647,c=36,u=/^xn--/,l=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,p=String.fromCharCode;function g(e){throw RangeError(d[e])}function m(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function y(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+m((e=e.replace(f,".")).split("."),t).join(".")}function b(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function v(e){return m(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+p(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function A(e,t,r){var n=0;for(e=r?h(e/700):e>>1,e+=h(e/t);e>455;n+=c)e=h(e/35);return h(n+36*e/(e+38))}function _(e){var t,r,n,i,o,a,u,l,f,d,p,m=[],y=e.length,b=0,w=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&g("not-basic"),m.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<y;){for(o=b,a=1,u=c;i>=y&&g("invalid-input"),((l=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:c)>=c||l>h((s-b)/a))&&g("overflow"),b+=l*a,!(l<(f=u<=_?1:u>=_+26?26:u-_));u+=c)a>h(s/(d=c-f))&&g("overflow"),a*=d;_=A(b-o,t=m.length+1,0==o),h(b/t)>s-w&&g("overflow"),w+=h(b/t),b%=t,m.splice(b++,0,w)}return v(m)}function E(e){var t,r,n,i,o,a,u,l,f,d,m,y,v,_,E,x=[];for(y=(e=b(e)).length,t=128,r=0,o=72,a=0;a<y;++a)(m=e[a])<128&&x.push(p(m));for(n=i=x.length,i&&x.push("-");n<y;){for(u=s,a=0;a<y;++a)(m=e[a])>=t&&m<u&&(u=m);for(u-t>h((s-r)/(v=n+1))&&g("overflow"),r+=(u-t)*v,t=u,a=0;a<y;++a)if((m=e[a])<t&&++r>s&&g("overflow"),m==t){for(l=r,f=c;!(l<(d=f<=o?1:f>=o+26?26:f-o));f+=c)E=l-d,_=c-d,x.push(p(w(d+E%_,0))),l=h(E/_);x.push(p(w(l,0))),o=A(r,v,n==i),r=0,++n}++r,++t}return x.join("")}a={version:"1.3.2",ucs2:{decode:b,encode:v},decode:_,encode:E,toASCII:function(e){return y(e,(function(e){return l.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return y(e,(function(e){return u.test(e)?_(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},883:(e,t,r)=>{"use strict";var n=r(59639),i=r(25225);function o(){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}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){return i.isString(e)&&(e=v(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(u),f=["%","/","?",";","#"].concat(l),d=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(56642);function v(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o<e.indexOf("#")?"?":"#",u=e.split(s);u[0]=u[0].replace(/\\/g,"/");var v=e=u.join(s);if(v=v.trim(),!r&&1===e.split("#").length){var w=c.exec(v);if(w)return this.path=v,this.href=v,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var A=a.exec(v);if(A){var _=(A=A[0]).toLowerCase();this.protocol=_,v=v.substr(A.length)}if(r||A||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===v.substr(0,2);!E||A&&m[A]||(v=v.substr(2),this.slashes=!0)}if(!m[A]&&(E||A&&!y[A])){for(var x,k,S=-1,C=0;C<d.length;C++)-1!==(P=v.indexOf(d[C]))&&(-1===S||P<S)&&(S=P);for(-1!==(k=-1===S?v.lastIndexOf("@"):v.lastIndexOf("@",S))&&(x=v.slice(0,k),v=v.slice(k+1),this.auth=decodeURIComponent(x)),S=-1,C=0;C<f.length;C++){var P;-1!==(P=v.indexOf(f[C]))&&(-1===S||P<S)&&(S=P)}-1===S&&(S=v.length),this.host=v.slice(0,S),v=v.slice(S),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var I=this.hostname.split(/\./),B=(C=0,I.length);C<B;C++){var T=I[C];if(T&&!T.match(h)){for(var M="",R=0,N=T.length;R<N;R++)T.charCodeAt(R)>127?M+="x":M+=T[R];if(!M.match(h)){var j=I.slice(0,C),L=I.slice(C+1),U=T.match(p);U&&(j.push(U[1]),L.unshift(U[2])),L.length&&(v="/"+L.join(".")+v),this.hostname=j.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+D,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!g[_])for(C=0,B=l.length;C<B;C++){var z=l[C];if(-1!==v.indexOf(z)){var Z=encodeURIComponent(z);Z===z&&(Z=escape(z)),v=v.split(z).join(Z)}}var H=v.indexOf("#");-1!==H&&(this.hash=v.substr(H),v=v.slice(0,H));var q=v.indexOf("?");if(-1!==q?(this.search=v.substr(q),this.query=v.substr(q+1),t&&(this.query=b.parse(this.query)),v=v.slice(0,q)):t&&(this.search="",this.query={}),v&&(this.pathname=v),y[_]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var W=this.search||"";this.path=D+W}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=b.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),a=0;a<n.length;a++){var s=n[a];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),u=0;u<c.length;u++){var l=c[u];"protocol"!==l&&(r[l]=e[l])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var f=Object.keys(e),d=0;d<f.length;d++){var h=f[d];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||m[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var g=r.pathname||"",b=r.search||"";r.path=g+b}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),A=w||v||r.host&&e.pathname,_=A,E=r.pathname&&r.pathname.split("/")||[],x=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(x&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),A=A&&(""===p[0]||""===E[0])),w)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,E=p;else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),r.search=e.search,r.query=e.query;else if(!i.isNullOrUndefined(e.search))return x&&(r.hostname=r.host=E.shift(),(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift())),r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=E.slice(-1)[0],S=(r.host||e.host||E.length>1)&&("."===k||".."===k)||""===k,C=0,P=E.length;P>=0;P--)"."===(k=E[P])?E.splice(P,1):".."===k?(E.splice(P,1),C++):C&&(E.splice(P,1),C--);if(!A&&!_)for(;C--;C)E.unshift("..");!A||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),S&&"/"!==E.join("/").substr(-1)&&E.push("");var O,I=""===E[0]||E[0]&&"/"===E[0].charAt(0);return x&&(r.hostname=r.host=I?"":E.length?E.shift():"",(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift())),(A=A||r.host&&E.length)&&!I&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},25225:e=>{"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},5803:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},10082:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},54895:(e,t,r)=>{"use strict";var n=r(52635),i=r(43138),o=r(32094),a=r(50198);function s(e){return e.call.bind(e)}var c="undefined"!=typeof BigInt,u="undefined"!=typeof Symbol,l=s(Object.prototype.toString),f=s(Number.prototype.valueOf),d=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(c)var p=s(BigInt.prototype.valueOf);if(u)var g=s(Symbol.prototype.valueOf);function m(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function y(e){return"[object Map]"===l(e)}function b(e){return"[object Set]"===l(e)}function v(e){return"[object WeakMap]"===l(e)}function w(e){return"[object WeakSet]"===l(e)}function A(e){return"[object ArrayBuffer]"===l(e)}function _(e){return"undefined"!=typeof ArrayBuffer&&(A.working?A(e):e instanceof ArrayBuffer)}function E(e){return"[object DataView]"===l(e)}function x(e){return"undefined"!=typeof DataView&&(E.working?E(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||x(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},y.working="undefined"!=typeof Map&&y(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(y.working?y(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},v.working="undefined"!=typeof WeakMap&&v(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(v.working?v(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},A.working="undefined"!=typeof ArrayBuffer&&A(new ArrayBuffer),t.isArrayBuffer=_,E.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=x;var k="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function S(e){return"[object SharedArrayBuffer]"===l(e)}function C(e){return void 0!==k&&(void 0===S.working&&(S.working=S(new k)),S.working?S(e):e instanceof k)}function P(e){return m(e,f)}function O(e){return m(e,d)}function I(e){return m(e,h)}function B(e){return c&&m(e,p)}function T(e){return u&&m(e,g)}t.isSharedArrayBuffer=C,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=P,t.isStringObject=O,t.isBooleanObject=I,t.isBigIntObject=B,t.isSymbolObject=T,t.isBoxedPrimitive=function(e){return P(e)||O(e)||I(e)||B(e)||T(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(_(e)||C(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},43335:(e,t,r)=>{var n=r(34406),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,a=String(e).replace(o,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r<i;s=n[++r])y(s)||!_(s)?a+=" "+s:a+=" "+u(s);return a},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return e.apply(this,arguments)}};var a={},s=/^$/;if(n.env.NODE_DEBUG){var c=n.env.NODE_DEBUG;c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+c+"$","i")}function u(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),d(n,e,n.depth)}function l(e,t){var r=u.styles[t];return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function f(e,t){return e}function d(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return v(i)||(i=d(e,i,n)),i}var o=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),x(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(r);if(0===a.length){if(k(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(A(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(r))return h(r)}var u,l="",f=!1,_=["{","}"];return g(r)&&(f=!0,_=["[","]"]),k(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),A(r)&&(l=" "+RegExp.prototype.toString.call(r)),E(r)&&(l=" "+Date.prototype.toUTCString.call(r)),x(r)&&(l=" "+h(r)),0!==a.length||f&&0!=r.length?n<0?A(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=f?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)I(t,String(a))?o.push(p(e,t,r,n,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(e,t,r,n,i,!0))})),o}(e,r,n,s,a):a.map((function(t){return p(e,r,n,s,t,f)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(u,l,_)):_[0]+l+_[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),I(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=y(r)?d(e,c.value,null):d(e,c.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),w(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function g(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function b(e){return"number"==typeof e}function v(e){return"string"==typeof e}function w(e){return void 0===e}function A(e){return _(e)&&"[object RegExp]"===S(e)}function _(e){return"object"==typeof e&&null!==e}function E(e){return _(e)&&"[object Date]"===S(e)}function x(e){return _(e)&&("[object Error]"===S(e)||e instanceof Error)}function k(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!a[e])if(s.test(e)){var r=n.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){};return a[e]},t.inspect=u,u.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]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(54895),t.isArray=g,t.isBoolean=m,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=w,t.isRegExp=A,t.types.isRegExp=A,t.isObject=_,t.isDate=E,t.types.isDate=E,t.isError=x,t.types.isNativeError=x,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(10082);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),P[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))},t.inherits=r(91285),t._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var B="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function T(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(B&&e[B]){var t;if("function"!=typeof(t=e[B]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),B&&Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=B,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var i=t.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};e.apply(this,t).then((function(e){n.nextTick(a.bind(null,null,e))}),(function(e){n.nextTick(T.bind(null,e,a))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},831:(e,t,r)=>{"use strict";var n;r.d(t,{v4:()=>l});var i=new Uint8Array(16);function o(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)}const a=/^(?:[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,s=function(e){return"string"==typeof e&&a.test(e)};for(var c=[],u=0;u<256;++u)c.push((u+256).toString(16).substr(1));const l=function(e,t,r){var n=(e=e||{}).random||(e.rng||o)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase();if(!s(r))throw TypeError("Stringified UUID is invalid");return r}(n)}},32094:(e,t,r)=>{"use strict";var n=r(83243),i=r(62191),o=r(62680),a=o("Object.prototype.toString"),s=r(67226)(),c="undefined"==typeof globalThis?r.g:globalThis,u=i(),l=o("String.prototype.slice"),f={},d=r(29765),h=Object.getPrototypeOf;s&&d&&h&&n(u,(function(e){if("function"==typeof c[e]){var t=new c[e];if(Symbol.toStringTag in t){var r=h(t),n=d(r,Symbol.toStringTag);if(!n){var i=h(r);n=d(i,Symbol.toStringTag)}f[e]=n.get}}}));var p=r(50198);e.exports=function(e){return!!p(e)&&(s&&Symbol.toStringTag in e?function(e){var t=!1;return n(f,(function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}})),t}(e):l(a(e),8,-1))}},68892:e=>{e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(e){n[e]=i[e]})),n}}},51960:e=>{e.exports=function(){for(var e={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)t.call(n,i)&&(e[i]=n[i])}return e};var t=Object.prototype.hasOwnProperty},51610:(e,t,r)=>{var n=r(18166);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},19787:(e,t,r)=>{"use strict";var n=r(50320),i=r(98315);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function c(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var l=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),f=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},p={};function g(e,t,r,n,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function v(e,t,r,n){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0!==i.type:n||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,r,n){if(null==t||function(e,t,r,n){if(null!==r&&0===r.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!n&&(null!==r?!r.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,r,n))return!0;if(n)return!1;if(null!==r)switch(r.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,r,i,n)&&(r=null),n||null===i?function(e){return!!f.call(p,e)||!f.call(h,e)&&(d.test(e)?p[e]=!0:(h[e]=!0,!1))}(t)&&(null===r?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=null===r?3!==i.type&&"":r:(t=i.attributeName,n=i.attributeNamespace,null===r?e.removeAttribute(t):(r=3===(i=i.type)||4===i&&!0===r?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);m[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.element"),_=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),C=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),T=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var M=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var R=Symbol.iterator;function N(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=R&&e[R]||e["@@iterator"])?e:null}var j,L=Object.assign;function U(e){if(void 0===j)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);j=t&&t[1]||""}return"\n"+j+e}var D=!1;function F(e,t){if(!e||D)return"";D=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var n=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){n=e}e.call(t.prototype)}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=n.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var c="\n"+i[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=a&&0<=s);break}}}finally{D=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?U(e):""}function z(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return F(e.type,!1);case 11:return F(e.type.render,!1);case 1:return F(e.type,!0);default:return""}}function Z(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case E:return"Fragment";case _:return"Portal";case k:return"Profiler";case x:return"StrictMode";case O:return"Suspense";case I:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case C:return(e.displayName||"Context")+".Consumer";case S:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case B:return null!==(t=e.displayName||null)?t:Z(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return Z(e(t))}catch(e){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Z(t);case 8:return t===x?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function q(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function K(e){e._valueTracker||(e._valueTracker=function(e){var t=W(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function V(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=W(e)?e.checked?"true":"false":e.value),(e=n)!==r&&(t.setValue(e),!0)}function G(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function $(e,t){var r=t.checked;return L({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function J(e,t){var r=null==t.defaultValue?"":t.defaultValue,n=null!=t.checked?t.checked:t.defaultChecked;r=q(null!=t.value?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function X(e,t){Y(e,t);var r=q(t.value),n=t.type;if(null!=r)"number"===n?(0===r&&""===e.value||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if("submit"===n||"reset"===n)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,r):t.hasOwnProperty("defaultValue")&&ee(e,t.type,q(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Q(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!("submit"!==n&&"reset"!==n||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}""!==(r=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==r&&(e.name=r)}function ee(e,t,r){"number"===t&&G(e.ownerDocument)===e||(null==r?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var te=Array.isArray;function re(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+q(r),t=null,i=0;i<e.length;i++){if(e[i].value===r)return e[i].selected=!0,void(n&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ne(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return L({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(o(92));if(te(r)){if(1<r.length)throw Error(o(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:q(r)}}function oe(e,t){var r=q(t.value),n=q(t.defaultValue);null!=r&&((r=""+r)!==e.value&&(e.value=r),null==t.defaultValue&&e.defaultValue!==r&&(e.defaultValue=r)),null!=n&&(e.defaultValue=""+n)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ce(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,le,fe=(le=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,r,n){MSApp.execUnsafeLocalFunction((function(){return le(e,t)}))}:le);function de(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType)return void(r.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function ge(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function me(e,t){for(var r in e=e.style,t)if(t.hasOwnProperty(r)){var n=0===r.indexOf("--"),i=ge(r,t[r],n);"float"===r&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}Object.keys(he).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]}))}));var ye=L({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function be(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function ve(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function Ae(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var _e=null,Ee=null,xe=null;function ke(e){if(e=vi(e)){if("function"!=typeof _e)throw Error(o(280));var t=e.stateNode;t&&(t=Ai(t),_e(e.stateNode,e.type,t))}}function Se(e){Ee?xe?xe.push(e):xe=[e]:Ee=e}function Ce(){if(Ee){var e=Ee,t=xe;if(xe=Ee=null,ke(e),t)for(e=0;e<t.length;e++)ke(t[e])}}function Pe(e,t){return e(t)}function Oe(){}var Ie=!1;function Be(e,t,r){if(Ie)return e(t,r);Ie=!0;try{return Pe(e,t,r)}finally{Ie=!1,(null!==Ee||null!==xe)&&(Oe(),Ce())}}function Te(e,t){var r=e.stateNode;if(null===r)return null;var n=Ai(r);if(null===n)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(n=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!n;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(o(231,t,typeof r));return r}var Me=!1;if(l)try{var Re={};Object.defineProperty(Re,"passive",{get:function(){Me=!0}}),window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,Re)}catch(le){Me=!1}function Ne(e,t,r,n,i,o,a,s,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(e){this.onError(e)}}var je=!1,Le=null,Ue=!1,De=null,Fe={onError:function(e){je=!0,Le=e}};function ze(e,t,r,n,i,o,a,s,c){je=!1,Le=null,Ne.apply(Fe,arguments)}function Ze(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(r=t.return),e=t.return}while(e)}return 3===t.tag?r:null}function He(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function qe(e){if(Ze(e)!==e)throw Error(o(188))}function We(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ze(e)))throw Error(o(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(n=i.return)){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return qe(i),e;if(a===n)return qe(i),t;a=a.sibling}throw Error(o(188))}if(r.return!==n.return)r=i,n=a;else{for(var s=!1,c=i.child;c;){if(c===r){s=!0,r=i,n=a;break}if(c===n){s=!0,n=i,r=a;break}c=c.sibling}if(!s){for(c=a.child;c;){if(c===r){s=!0,r=a,n=i;break}if(c===n){s=!0,n=a,r=i;break}c=c.sibling}if(!s)throw Error(o(189))}}if(r.alternate!==n)throw Error(o(190))}if(3!==r.tag)throw Error(o(188));return r.stateNode.current===r?e:t}(e))?Ke(e):null}function Ke(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ke(e);if(null!==t)return t;e=e.sibling}return null}var Ve=i.unstable_scheduleCallback,Ge=i.unstable_cancelCallback,$e=i.unstable_shouldYield,Je=i.unstable_requestPaint,Ye=i.unstable_now,Xe=i.unstable_getCurrentPriorityLevel,Qe=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,rt=i.unstable_LowPriority,nt=i.unstable_IdlePriority,it=null,ot=null,at=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(st(e)/ct|0)|0},st=Math.log,ct=Math.LN2,ut=64,lt=4194304;function ft(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var r=e.pendingLanes;if(0===r)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&r;if(0!==a){var s=a&~i;0!==s?n=ft(s):0!=(o&=a)&&(n=ft(o))}else 0!=(a=r&~i)?n=ft(a):0!==o&&(n=ft(o));if(0===n)return 0;if(0!==t&&t!==n&&0==(t&i)&&((i=n&-n)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&n)&&(n|=16&r),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=n;0<t;)i=1<<(r=31-at(t)),n|=e[r],t&=~i;return n}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ut;return 0==(4194240&(ut<<=1))&&(ut=64),e}function mt(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function yt(e,t,r){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=r}function bt(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-at(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var vt=0;function wt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var At,_t,Et,xt,kt,St=!1,Ct=[],Pt=null,Ot=null,It=null,Bt=new Map,Tt=new Map,Mt=[],Rt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Nt(e,t){switch(e){case"focusin":case"focusout":Pt=null;break;case"dragenter":case"dragleave":Ot=null;break;case"mouseover":case"mouseout":It=null;break;case"pointerover":case"pointerout":Bt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tt.delete(t.pointerId)}}function jt(e,t,r,n,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[i]},null!==t&&null!==(t=vi(t))&&_t(t),e):(e.eventSystemFlags|=n,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Lt(e){var t=bi(e.target);if(null!==t){var r=Ze(t);if(null!==r)if(13===(t=r.tag)){if(null!==(t=He(r)))return e.blockedOn=t,void kt(e.priority,(function(){Et(r)}))}else if(3===t&&r.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===r.tag?r.stateNode.containerInfo:null)}e.blockedOn=null}function Ut(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var r=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==r)return null!==(t=vi(r))&&_t(t),e.blockedOn=r,!1;var n=new(r=e.nativeEvent).constructor(r.type,r);we=n,r.target.dispatchEvent(n),we=null,t.shift()}return!0}function Dt(e,t,r){Ut(e)&&r.delete(t)}function Ft(){St=!1,null!==Pt&&Ut(Pt)&&(Pt=null),null!==Ot&&Ut(Ot)&&(Ot=null),null!==It&&Ut(It)&&(It=null),Bt.forEach(Dt),Tt.forEach(Dt)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,St||(St=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ft)))}function Zt(e){function t(t){return zt(t,e)}if(0<Ct.length){zt(Ct[0],e);for(var r=1;r<Ct.length;r++){var n=Ct[r];n.blockedOn===e&&(n.blockedOn=null)}}for(null!==Pt&&zt(Pt,e),null!==Ot&&zt(Ot,e),null!==It&&zt(It,e),Bt.forEach(t),Tt.forEach(t),r=0;r<Mt.length;r++)(n=Mt[r]).blockedOn===e&&(n.blockedOn=null);for(;0<Mt.length&&null===(r=Mt[0]).blockedOn;)Lt(r),null===r.blockedOn&&Mt.shift()}var Ht=w.ReactCurrentBatchConfig,qt=!0;function Wt(e,t,r,n){var i=vt,o=Ht.transition;Ht.transition=null;try{vt=1,Vt(e,t,r,n)}finally{vt=i,Ht.transition=o}}function Kt(e,t,r,n){var i=vt,o=Ht.transition;Ht.transition=null;try{vt=4,Vt(e,t,r,n)}finally{vt=i,Ht.transition=o}}function Vt(e,t,r,n){if(qt){var i=$t(e,t,r,n);if(null===i)qn(e,t,n,Gt,r),Nt(e,n);else if(function(e,t,r,n,i){switch(t){case"focusin":return Pt=jt(Pt,e,t,r,n,i),!0;case"dragenter":return Ot=jt(Ot,e,t,r,n,i),!0;case"mouseover":return It=jt(It,e,t,r,n,i),!0;case"pointerover":var o=i.pointerId;return Bt.set(o,jt(Bt.get(o)||null,e,t,r,n,i)),!0;case"gotpointercapture":return o=i.pointerId,Tt.set(o,jt(Tt.get(o)||null,e,t,r,n,i)),!0}return!1}(i,e,t,r,n))n.stopPropagation();else if(Nt(e,n),4&t&&-1<Rt.indexOf(e)){for(;null!==i;){var o=vi(i);if(null!==o&&At(o),null===(o=$t(e,t,r,n))&&qn(e,t,n,Gt,r),o===i)break;i=o}null!==i&&n.stopPropagation()}else qn(e,t,n,null,r)}}var Gt=null;function $t(e,t,r,n){if(Gt=null,null!==(e=bi(e=Ae(n))))if(null===(t=Ze(e)))e=null;else if(13===(r=t.tag)){if(null!==(e=He(t)))return e;e=null}else if(3===r){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function Jt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Qe:return 1;case et:return 4;case tt:case rt:return 16;case nt:return 536870912;default:return 16}default:return 16}}var Yt=null,Xt=null,Qt=null;function er(){if(Qt)return Qt;var e,t,r=Xt,n=r.length,i="value"in Yt?Yt.value:Yt.textContent,o=i.length;for(e=0;e<n&&r[e]===i[e];e++);var a=n-e;for(t=1;t<=a&&r[n-t]===i[o-t];t++);return Qt=i.slice(e,1<t?1-t:void 0)}function tr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rr(){return!0}function nr(){return!1}function ir(e){function t(t,r,n,i,o){for(var a in this._reactName=t,this._targetInst=n,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?rr:nr,this.isPropagationStopped=nr,this}return L(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var or,ar,sr,cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ur=ir(cr),lr=L({},cr,{view:0,detail:0}),fr=ir(lr),dr=L({},lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sr&&(sr&&"mousemove"===e.type?(or=e.screenX-sr.screenX,ar=e.screenY-sr.screenY):ar=or=0,sr=e),or)},movementY:function(e){return"movementY"in e?e.movementY:ar}}),hr=ir(dr),pr=ir(L({},dr,{dataTransfer:0})),gr=ir(L({},lr,{relatedTarget:0})),mr=ir(L({},cr,{animationName:0,elapsedTime:0,pseudoElement:0})),yr=L({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),br=ir(yr),vr=ir(L({},cr,{data:0})),wr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ar={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_r[e])&&!!t[e]}function xr(){return Er}var kr=L({},lr,{key:function(e){if(e.key){var t=wr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Ar[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xr,charCode:function(e){return"keypress"===e.type?tr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Sr=ir(kr),Cr=ir(L({},dr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Pr=ir(L({},lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xr})),Or=ir(L({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ir=L({},dr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Br=ir(Ir),Tr=[9,13,27,32],Mr=l&&"CompositionEvent"in window,Rr=null;l&&"documentMode"in document&&(Rr=document.documentMode);var Nr=l&&"TextEvent"in window&&!Rr,jr=l&&(!Mr||Rr&&8<Rr&&11>=Rr),Lr=String.fromCharCode(32),Ur=!1;function Dr(e,t){switch(e){case"keyup":return-1!==Tr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var zr=!1,Zr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Zr[e.type]:"textarea"===t}function qr(e,t,r,n){Se(n),0<(t=Kn(t,"onChange")).length&&(r=new ur("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Wr=null,Kr=null;function Vr(e){Un(e,0)}function Gr(e){if(V(wi(e)))return e}function $r(e,t){if("change"===e)return t}var Jr=!1;if(l){var Yr;if(l){var Xr="oninput"in document;if(!Xr){var Qr=document.createElement("div");Qr.setAttribute("oninput","return;"),Xr="function"==typeof Qr.oninput}Yr=Xr}else Yr=!1;Jr=Yr&&(!document.documentMode||9<document.documentMode)}function en(){Wr&&(Wr.detachEvent("onpropertychange",tn),Kr=Wr=null)}function tn(e){if("value"===e.propertyName&&Gr(Kr)){var t=[];qr(t,Kr,e,Ae(e)),Be(Vr,t)}}function rn(e,t,r){"focusin"===e?(en(),Kr=r,(Wr=t).attachEvent("onpropertychange",tn)):"focusout"===e&&en()}function nn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Gr(Kr)}function on(e,t){if("click"===e)return Gr(t)}function an(e,t){if("input"===e||"change"===e)return Gr(t)}var sn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function cn(e,t){if(sn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!f.call(t,i)||!sn(e[i],t[i]))return!1}return!0}function un(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ln(e,t){var r,n=un(e);for(e=0;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=un(n)}}function fn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dn(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var r="string"==typeof t.contentWindow.location.href}catch(e){r=!1}if(!r)break;t=G((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pn(e){var t=dn(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&fn(r.ownerDocument.documentElement,r)){if(null!==n&&hn(r))if(t=n.start,void 0===(e=n.end)&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if((e=(t=r.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=void 0===n.end?o:Math.min(n.end,i),!e.extend&&o>n&&(i=n,n=o,o=i),i=ln(r,o);var a=ln(r,n);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=r;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof r.focus&&r.focus(),r=0;r<t.length;r++)(e=t[r]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gn=l&&"documentMode"in document&&11>=document.documentMode,mn=null,yn=null,bn=null,vn=!1;function wn(e,t,r){var n=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;vn||null==mn||mn!==G(n)||(n="selectionStart"in(n=mn)&&hn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},bn&&cn(bn,n)||(bn=n,0<(n=Kn(yn,"onSelect")).length&&(t=new ur("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=mn)))}function An(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var _n={animationend:An("Animation","AnimationEnd"),animationiteration:An("Animation","AnimationIteration"),animationstart:An("Animation","AnimationStart"),transitionend:An("Transition","TransitionEnd")},En={},xn={};function kn(e){if(En[e])return En[e];if(!_n[e])return e;var t,r=_n[e];for(t in r)if(r.hasOwnProperty(t)&&t in xn)return En[e]=r[t];return e}l&&(xn=document.createElement("div").style,"AnimationEvent"in window||(delete _n.animationend.animation,delete _n.animationiteration.animation,delete _n.animationstart.animation),"TransitionEvent"in window||delete _n.transitionend.transition);var Sn=kn("animationend"),Cn=kn("animationiteration"),Pn=kn("animationstart"),On=kn("transitionend"),In=new Map,Bn="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Tn(e,t){In.set(e,t),c(t,[e])}for(var Mn=0;Mn<Bn.length;Mn++){var Rn=Bn[Mn];Tn(Rn.toLowerCase(),"on"+(Rn[0].toUpperCase()+Rn.slice(1)))}Tn(Sn,"onAnimationEnd"),Tn(Cn,"onAnimationIteration"),Tn(Pn,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(On,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nn="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jn=new Set("cancel close invalid load scroll toggle".split(" ").concat(Nn));function Ln(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,n,i,a,s,c,u){if(ze.apply(this,arguments),je){if(!je)throw Error(o(198));var l=Le;je=!1,Le=null,Ue||(Ue=!0,De=l)}}(n,t,void 0,e),e.currentTarget=null}function Un(e,t){t=0!=(4&t);for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],c=s.instance,u=s.currentTarget;if(s=s.listener,c!==o&&i.isPropagationStopped())break e;Ln(i,s,u),o=c}else for(a=0;a<n.length;a++){if(c=(s=n[a]).instance,u=s.currentTarget,s=s.listener,c!==o&&i.isPropagationStopped())break e;Ln(i,s,u),o=c}}}if(Ue)throw e=De,Ue=!1,De=null,e}function Dn(e,t){var r=t[gi];void 0===r&&(r=t[gi]=new Set);var n=e+"__bubble";r.has(n)||(Hn(t,e,2,!1),r.add(n))}function Fn(e,t,r){var n=0;t&&(n|=4),Hn(r,e,n,t)}var zn="_reactListening"+Math.random().toString(36).slice(2);function Zn(e){if(!e[zn]){e[zn]=!0,a.forEach((function(t){"selectionchange"!==t&&(jn.has(t)||Fn(t,!1,e),Fn(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zn]||(t[zn]=!0,Fn("selectionchange",!1,t))}}function Hn(e,t,r,n){switch(Jt(t)){case 1:var i=Wt;break;case 4:i=Kt;break;default:i=Vt}r=i.bind(null,t,r,e),i=void 0,!Me||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),n?void 0!==i?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):void 0!==i?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function qn(e,t,r,n,i){var o=n;if(0==(1&t)&&0==(2&t)&&null!==n)e:for(;;){if(null===n)return;var a=n.tag;if(3===a||4===a){var s=n.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=n.return;null!==a;){var c=a.tag;if((3===c||4===c)&&((c=a.stateNode.containerInfo)===i||8===c.nodeType&&c.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=bi(s)))return;if(5===(c=a.tag)||6===c){n=o=a;continue e}s=s.parentNode}}n=n.return}Be((function(){var n=o,i=Ae(r),a=[];e:{var s=In.get(e);if(void 0!==s){var c=ur,u=e;switch(e){case"keypress":if(0===tr(r))break e;case"keydown":case"keyup":c=Sr;break;case"focusin":u="focus",c=gr;break;case"focusout":u="blur",c=gr;break;case"beforeblur":case"afterblur":c=gr;break;case"click":if(2===r.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=hr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=pr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=Pr;break;case Sn:case Cn:case Pn:c=mr;break;case On:c=Or;break;case"scroll":c=fr;break;case"wheel":c=Br;break;case"copy":case"cut":case"paste":c=br;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=Cr}var l=0!=(4&t),f=!l&&"scroll"===e,d=l?null!==s?s+"Capture":null:s;l=[];for(var h,p=n;null!==p;){var g=(h=p).stateNode;if(5===h.tag&&null!==g&&(h=g,null!==d&&null!=(g=Te(p,d))&&l.push(Wn(p,g,h))),f)break;p=p.return}0<l.length&&(s=new c(s,u,null,r,i),a.push({event:s,listeners:l}))}}if(0==(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||r===we||!(u=r.relatedTarget||r.fromElement)||!bi(u)&&!u[pi])&&(c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(c=n,null!==(u=(u=r.relatedTarget||r.toElement)?bi(u):null)&&(u!==(f=Ze(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(c=null,u=n),c!==u)){if(l=hr,g="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(l=Cr,g="onPointerLeave",d="onPointerEnter",p="pointer"),f=null==c?s:wi(c),h=null==u?s:wi(u),(s=new l(g,p+"leave",c,r,i)).target=f,s.relatedTarget=h,g=null,bi(i)===n&&((l=new l(d,p+"enter",u,r,i)).target=h,l.relatedTarget=f,g=l),f=g,c&&u)e:{for(d=u,p=0,h=l=c;h;h=Vn(h))p++;for(h=0,g=d;g;g=Vn(g))h++;for(;0<p-h;)l=Vn(l),p--;for(;0<h-p;)d=Vn(d),h--;for(;p--;){if(l===d||null!==d&&l===d.alternate)break e;l=Vn(l),d=Vn(d)}l=null}else l=null;null!==c&&Gn(a,s,c,l,!1),null!==u&&null!==f&&Gn(a,f,u,l,!0)}if("select"===(c=(s=n?wi(n):window).nodeName&&s.nodeName.toLowerCase())||"input"===c&&"file"===s.type)var m=$r;else if(Hr(s))if(Jr)m=an;else{m=nn;var y=rn}else(c=s.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=on);switch(m&&(m=m(e,n))?qr(a,m,r,i):(y&&y(e,s,n),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&ee(s,"number",s.value)),y=n?wi(n):window,e){case"focusin":(Hr(y)||"true"===y.contentEditable)&&(mn=y,yn=n,bn=null);break;case"focusout":bn=yn=mn=null;break;case"mousedown":vn=!0;break;case"contextmenu":case"mouseup":case"dragend":vn=!1,wn(a,r,i);break;case"selectionchange":if(gn)break;case"keydown":case"keyup":wn(a,r,i)}var b;if(Mr)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else zr?Dr(e,r)&&(v="onCompositionEnd"):"keydown"===e&&229===r.keyCode&&(v="onCompositionStart");v&&(jr&&"ko"!==r.locale&&(zr||"onCompositionStart"!==v?"onCompositionEnd"===v&&zr&&(b=er()):(Xt="value"in(Yt=i)?Yt.value:Yt.textContent,zr=!0)),0<(y=Kn(n,v)).length&&(v=new vr(v,e,null,r,i),a.push({event:v,listeners:y}),(b||null!==(b=Fr(r)))&&(v.data=b))),(b=Nr?function(e,t){switch(e){case"compositionend":return Fr(t);case"keypress":return 32!==t.which?null:(Ur=!0,Lr);case"textInput":return(e=t.data)===Lr&&Ur?null:e;default:return null}}(e,r):function(e,t){if(zr)return"compositionend"===e||!Mr&&Dr(e,t)?(e=er(),Qt=Xt=Yt=null,zr=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return jr&&"ko"!==t.locale?null:t.data}}(e,r))&&0<(n=Kn(n,"onBeforeInput")).length&&(i=new vr("onBeforeInput","beforeinput",null,r,i),a.push({event:i,listeners:n}),i.data=b)}Un(a,t)}))}function Wn(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Kn(e,t){for(var r=t+"Capture",n=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Te(e,r))&&n.unshift(Wn(e,o,i)),null!=(o=Te(e,t))&&n.push(Wn(e,o,i))),e=e.return}return n}function Vn(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Gn(e,t,r,n,i){for(var o=t._reactName,a=[];null!==r&&r!==n;){var s=r,c=s.alternate,u=s.stateNode;if(null!==c&&c===n)break;5===s.tag&&null!==u&&(s=u,i?null!=(c=Te(r,o))&&a.unshift(Wn(r,c,s)):i||null!=(c=Te(r,o))&&a.push(Wn(r,c,s))),r=r.return}0!==a.length&&e.push({event:t,listeners:a})}var $n=/\r\n?/g,Jn=/\u0000|\uFFFD/g;function Yn(e){return("string"==typeof e?e:""+e).replace($n,"\n").replace(Jn,"")}function Xn(e,t,r){if(t=Yn(t),Yn(e)!==t&&r)throw Error(o(425))}function Qn(){}var ei=null,ti=null;function ri(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ni="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,oi="function"==typeof Promise?Promise:void 0,ai="function"==typeof queueMicrotask?queueMicrotask:void 0!==oi?function(e){return oi.resolve(null).then(e).catch(si)}:ni;function si(e){setTimeout((function(){throw e}))}function ci(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&8===i.nodeType)if("/$"===(r=i.data)){if(0===n)return e.removeChild(i),void Zt(t);n--}else"$"!==r&&"$?"!==r&&"$!"!==r||n++;r=i}while(r);Zt(t)}function ui(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function li(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var r=e.data;if("$"===r||"$!"===r||"$?"===r){if(0===t)return e;t--}else"/$"===r&&t++}e=e.previousSibling}return null}var fi=Math.random().toString(36).slice(2),di="__reactFiber$"+fi,hi="__reactProps$"+fi,pi="__reactContainer$"+fi,gi="__reactEvents$"+fi,mi="__reactListeners$"+fi,yi="__reactHandles$"+fi;function bi(e){var t=e[di];if(t)return t;for(var r=e.parentNode;r;){if(t=r[pi]||r[di]){if(r=t.alternate,null!==t.child||null!==r&&null!==r.child)for(e=li(e);null!==e;){if(r=e[di])return r;e=li(e)}return t}r=(e=r).parentNode}return null}function vi(e){return!(e=e[di]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function Ai(e){return e[hi]||null}var _i=[],Ei=-1;function xi(e){return{current:e}}function ki(e){0>Ei||(e.current=_i[Ei],_i[Ei]=null,Ei--)}function Si(e,t){Ei++,_i[Ei]=e.current,e.current=t}var Ci={},Pi=xi(Ci),Oi=xi(!1),Ii=Ci;function Bi(e,t){var r=e.type.contextTypes;if(!r)return Ci;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in r)o[i]=t[i];return n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ti(e){return null!=e.childContextTypes}function Mi(){ki(Oi),ki(Pi)}function Ri(e,t,r){if(Pi.current!==Ci)throw Error(o(168));Si(Pi,t),Si(Oi,r)}function Ni(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,"function"!=typeof n.getChildContext)return r;for(var i in n=n.getChildContext())if(!(i in t))throw Error(o(108,H(e)||"Unknown",i));return L({},r,n)}function ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ci,Ii=Pi.current,Si(Pi,e),Si(Oi,Oi.current),!0}function Li(e,t,r){var n=e.stateNode;if(!n)throw Error(o(169));r?(e=Ni(e,t,Ii),n.__reactInternalMemoizedMergedChildContext=e,ki(Oi),ki(Pi),Si(Pi,e)):ki(Oi),Si(Oi,r)}var Ui=null,Di=!1,Fi=!1;function zi(e){null===Ui?Ui=[e]:Ui.push(e)}function Zi(){if(!Fi&&null!==Ui){Fi=!0;var e=0,t=vt;try{var r=Ui;for(vt=1;e<r.length;e++){var n=r[e];do{n=n(!0)}while(null!==n)}Ui=null,Di=!1}catch(t){throw null!==Ui&&(Ui=Ui.slice(e+1)),Ve(Qe,Zi),t}finally{vt=t,Fi=!1}}return null}var Hi=[],qi=0,Wi=null,Ki=0,Vi=[],Gi=0,$i=null,Ji=1,Yi="";function Xi(e,t){Hi[qi++]=Ki,Hi[qi++]=Wi,Wi=e,Ki=t}function Qi(e,t,r){Vi[Gi++]=Ji,Vi[Gi++]=Yi,Vi[Gi++]=$i,$i=e;var n=Ji;e=Yi;var i=32-at(n)-1;n&=~(1<<i),r+=1;var o=32-at(t)+i;if(30<o){var a=i-i%5;o=(n&(1<<a)-1).toString(32),n>>=a,i-=a,Ji=1<<32-at(t)+i|r<<i|n,Yi=o+e}else Ji=1<<o|r<<i|n,Yi=e}function eo(e){null!==e.return&&(Xi(e,1),Qi(e,1,0))}function to(e){for(;e===Wi;)Wi=Hi[--qi],Hi[qi]=null,Ki=Hi[--qi],Hi[qi]=null;for(;e===$i;)$i=Vi[--Gi],Vi[Gi]=null,Yi=Vi[--Gi],Vi[Gi]=null,Ji=Vi[--Gi],Vi[Gi]=null}var ro=null,no=null,io=!1,oo=null;function ao(e,t){var r=Bu(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,null===(t=e.deletions)?(e.deletions=[r],e.flags|=16):t.push(r)}function so(e,t){switch(e.tag){case 5:var r=e.type;return null!==(t=1!==t.nodeType||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ro=e,no=ui(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ro=e,no=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(r=null!==$i?{id:Ji,overflow:Yi}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},(r=Bu(18,null,null,0)).stateNode=t,r.return=e,e.child=r,ro=e,no=null,!0);default:return!1}}function co(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function uo(e){if(io){var t=no;if(t){var r=t;if(!so(e,t)){if(co(e))throw Error(o(418));t=ui(r.nextSibling);var n=ro;t&&so(e,t)?ao(n,r):(e.flags=-4097&e.flags|2,io=!1,ro=e)}}else{if(co(e))throw Error(o(418));e.flags=-4097&e.flags|2,io=!1,ro=e}}}function lo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ro=e}function fo(e){if(e!==ro)return!1;if(!io)return lo(e),io=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ri(e.type,e.memoizedProps)),t&&(t=no)){if(co(e))throw ho(),Error(o(418));for(;t;)ao(e,t),t=ui(t.nextSibling)}if(lo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){no=ui(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}no=null}}else no=ro?ui(e.stateNode.nextSibling):null;return!0}function ho(){for(var e=no;e;)e=ui(e.nextSibling)}function po(){no=ro=null,io=!1}function go(e){null===oo?oo=[e]:oo.push(e)}var mo=w.ReactCurrentBatchConfig;function yo(e,t){if(e&&e.defaultProps){for(var r in t=L({},t),e=e.defaultProps)void 0===t[r]&&(t[r]=e[r]);return t}return t}var bo=xi(null),vo=null,wo=null,Ao=null;function _o(){Ao=wo=vo=null}function Eo(e){var t=bo.current;ki(bo),e._currentValue=t}function xo(e,t,r){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==n&&(n.childLanes|=t)):null!==n&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function ko(e,t){vo=e,Ao=wo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(ws=!0),e.firstContext=null)}function So(e){var t=e._currentValue;if(Ao!==e)if(e={context:e,memoizedValue:t,next:null},null===wo){if(null===vo)throw Error(o(308));wo=e,vo.dependencies={lanes:0,firstContext:e}}else wo=wo.next=e;return t}var Co=null;function Po(e){null===Co?Co=[e]:Co.push(e)}function Oo(e,t,r,n){var i=t.interleaved;return null===i?(r.next=r,Po(t)):(r.next=i.next,i.next=r),t.interleaved=r,Io(e,n)}function Io(e,t){e.lanes|=t;var r=e.alternate;for(null!==r&&(r.lanes|=t),r=e,e=e.return;null!==e;)e.childLanes|=t,null!==(r=e.alternate)&&(r.childLanes|=t),r=e,e=e.return;return 3===r.tag?r.stateNode:null}var Bo=!1;function To(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Mo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ro(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function No(e,t,r){var n=e.updateQueue;if(null===n)return null;if(n=n.shared,0!=(2&Pc)){var i=n.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Io(e,r)}return null===(i=n.interleaved)?(t.next=t,Po(n)):(t.next=i.next,i.next=t),n.interleaved=t,Io(e,r)}function jo(e,t,r){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&r))){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,bt(e,r)}}function Lo(e,t){var r=e.updateQueue,n=e.alternate;if(null!==n&&r===(n=n.updateQueue)){var i=null,o=null;if(null!==(r=r.firstBaseUpdate)){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};null===o?i=o=a:o=o.next=a,r=r.next}while(null!==r);null===o?i=o=t:o=o.next=t}else i=o=t;return r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},void(e.updateQueue=r)}null===(e=r.lastBaseUpdate)?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Uo(e,t,r,n){var i=e.updateQueue;Bo=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var c=s,u=c.next;c.next=null,null===a?o=u:a.next=u,a=c;var l=e.alternate;null!==l&&(s=(l=l.updateQueue).lastBaseUpdate)!==a&&(null===s?l.firstBaseUpdate=u:s.next=u,l.lastBaseUpdate=c)}if(null!==o){var f=i.baseState;for(a=0,l=u=c=null,s=o;;){var d=s.lane,h=s.eventTime;if((n&d)===d){null!==l&&(l=l.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,g=s;switch(d=t,h=r,g.tag){case 1:if("function"==typeof(p=g.payload)){f=p.call(h,f,d);break e}f=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(d="function"==typeof(p=g.payload)?p.call(h,f,d):p))break e;f=L({},f,d);break e;case 2:Bo=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(d=i.effects)?i.effects=[s]:d.push(s))}else h={eventTime:h,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===l?(u=l=h,c=f):l=l.next=h,a|=d;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(d=s).next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}if(null===l&&(c=f),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=l,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);jc|=a,e.lanes=a,e.memoizedState=f}}function Do(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(null!==i){if(n.callback=null,n=r,"function"!=typeof i)throw Error(o(191,i));i.call(n)}}}var Fo=(new n.Component).refs;function zo(e,t,r,n){r=null==(r=r(n,t=e.memoizedState))?t:L({},t,r),e.memoizedState=r,0===e.lanes&&(e.updateQueue.baseState=r)}var Zo={isMounted:function(e){return!!(e=e._reactInternals)&&Ze(e)===e},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=eu(),i=tu(e),o=Ro(n,i);o.payload=t,null!=r&&(o.callback=r),null!==(t=No(e,o,i))&&(ru(t,e,i,n),jo(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=eu(),i=tu(e),o=Ro(n,i);o.tag=1,o.payload=t,null!=r&&(o.callback=r),null!==(t=No(e,o,i))&&(ru(t,e,i,n),jo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=eu(),n=tu(e),i=Ro(r,n);i.tag=2,null!=t&&(i.callback=t),null!==(t=No(e,i,n))&&(ru(t,e,n,r),jo(t,e,n))}};function Ho(e,t,r,n,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,o,a):!(t.prototype&&t.prototype.isPureReactComponent&&cn(r,n)&&cn(i,o))}function qo(e,t,r){var n=!1,i=Ci,o=t.contextType;return"object"==typeof o&&null!==o?o=So(o):(i=Ti(t)?Ii:Pi.current,o=(n=null!=(n=t.contextTypes))?Bi(e,i):Ci),t=new t(r,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Zo,e.stateNode=t,t._reactInternals=e,n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Wo(e,t,r,n){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Zo.enqueueReplaceState(t,t.state,null)}function Ko(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs=Fo,To(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=So(o):(o=Ti(t)?Ii:Pi.current,i.context=Bi(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(zo(e,t,o,r),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Zo.enqueueReplaceState(i,i.state,null),Uo(e,r,i,n),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Vo(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(o(309));var n=r.stateNode}if(!n)throw Error(o(147,e));var i=n,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;t===Fo&&(t=i.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(o(284));if(!r._owner)throw Error(o(290,e))}return e}function Go(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $o(e){return(0,e._init)(e._payload)}function Jo(e){function t(t,r){if(e){var n=t.deletions;null===n?(t.deletions=[r],t.flags|=16):n.push(r)}}function r(r,n){if(!e)return null;for(;null!==n;)t(r,n),n=n.sibling;return null}function n(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Mu(e,t)).index=0,e.sibling=null,e}function a(t,r,n){return t.index=n,e?null!==(n=t.alternate)?(n=n.index)<r?(t.flags|=2,r):n:(t.flags|=2,r):(t.flags|=1048576,r)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function c(e,t,r,n){return null===t||6!==t.tag?((t=Lu(r,e.mode,n)).return=e,t):((t=i(t,r)).return=e,t)}function u(e,t,r,n){var o=r.type;return o===E?f(e,t,r.props.children,n,r.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===T&&$o(o)===t.type)?((n=i(t,r.props)).ref=Vo(e,t,r),n.return=e,n):((n=Ru(r.type,r.key,r.props,null,e.mode,n)).ref=Vo(e,t,r),n.return=e,n)}function l(e,t,r,n){return null===t||4!==t.tag||t.stateNode.containerInfo!==r.containerInfo||t.stateNode.implementation!==r.implementation?((t=Uu(r,e.mode,n)).return=e,t):((t=i(t,r.children||[])).return=e,t)}function f(e,t,r,n,o){return null===t||7!==t.tag?((t=Nu(r,e.mode,n,o)).return=e,t):((t=i(t,r)).return=e,t)}function d(e,t,r){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Lu(""+t,e.mode,r)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case A:return(r=Ru(t.type,t.key,t.props,null,e.mode,r)).ref=Vo(e,null,t),r.return=e,r;case _:return(t=Uu(t,e.mode,r)).return=e,t;case T:return d(e,(0,t._init)(t._payload),r)}if(te(t)||N(t))return(t=Nu(t,e.mode,r,null)).return=e,t;Go(e,t)}return null}function h(e,t,r,n){var i=null!==t?t.key:null;if("string"==typeof r&&""!==r||"number"==typeof r)return null!==i?null:c(e,t,""+r,n);if("object"==typeof r&&null!==r){switch(r.$$typeof){case A:return r.key===i?u(e,t,r,n):null;case _:return r.key===i?l(e,t,r,n):null;case T:return h(e,t,(i=r._init)(r._payload),n)}if(te(r)||N(r))return null!==i?null:f(e,t,r,n,null);Go(e,r)}return null}function p(e,t,r,n,i){if("string"==typeof n&&""!==n||"number"==typeof n)return c(t,e=e.get(r)||null,""+n,i);if("object"==typeof n&&null!==n){switch(n.$$typeof){case A:return u(t,e=e.get(null===n.key?r:n.key)||null,n,i);case _:return l(t,e=e.get(null===n.key?r:n.key)||null,n,i);case T:return p(e,t,r,(0,n._init)(n._payload),i)}if(te(n)||N(n))return f(t,e=e.get(r)||null,n,i,null);Go(t,n)}return null}function g(i,o,s,c){for(var u=null,l=null,f=o,g=o=0,m=null;null!==f&&g<s.length;g++){f.index>g?(m=f,f=null):m=f.sibling;var y=h(i,f,s[g],c);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(i,f),o=a(y,o,g),null===l?u=y:l.sibling=y,l=y,f=m}if(g===s.length)return r(i,f),io&&Xi(i,g),u;if(null===f){for(;g<s.length;g++)null!==(f=d(i,s[g],c))&&(o=a(f,o,g),null===l?u=f:l.sibling=f,l=f);return io&&Xi(i,g),u}for(f=n(i,f);g<s.length;g++)null!==(m=p(f,i,g,s[g],c))&&(e&&null!==m.alternate&&f.delete(null===m.key?g:m.key),o=a(m,o,g),null===l?u=m:l.sibling=m,l=m);return e&&f.forEach((function(e){return t(i,e)})),io&&Xi(i,g),u}function m(i,s,c,u){var l=N(c);if("function"!=typeof l)throw Error(o(150));if(null==(c=l.call(c)))throw Error(o(151));for(var f=l=null,g=s,m=s=0,y=null,b=c.next();null!==g&&!b.done;m++,b=c.next()){g.index>m?(y=g,g=null):y=g.sibling;var v=h(i,g,b.value,u);if(null===v){null===g&&(g=y);break}e&&g&&null===v.alternate&&t(i,g),s=a(v,s,m),null===f?l=v:f.sibling=v,f=v,g=y}if(b.done)return r(i,g),io&&Xi(i,m),l;if(null===g){for(;!b.done;m++,b=c.next())null!==(b=d(i,b.value,u))&&(s=a(b,s,m),null===f?l=b:f.sibling=b,f=b);return io&&Xi(i,m),l}for(g=n(i,g);!b.done;m++,b=c.next())null!==(b=p(g,i,m,b.value,u))&&(e&&null!==b.alternate&&g.delete(null===b.key?m:b.key),s=a(b,s,m),null===f?l=b:f.sibling=b,f=b);return e&&g.forEach((function(e){return t(i,e)})),io&&Xi(i,m),l}return function e(n,o,a,c){if("object"==typeof a&&null!==a&&a.type===E&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case A:e:{for(var u=a.key,l=o;null!==l;){if(l.key===u){if((u=a.type)===E){if(7===l.tag){r(n,l.sibling),(o=i(l,a.props.children)).return=n,n=o;break e}}else if(l.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===T&&$o(u)===l.type){r(n,l.sibling),(o=i(l,a.props)).ref=Vo(n,l,a),o.return=n,n=o;break e}r(n,l);break}t(n,l),l=l.sibling}a.type===E?((o=Nu(a.props.children,n.mode,c,a.key)).return=n,n=o):((c=Ru(a.type,a.key,a.props,null,n.mode,c)).ref=Vo(n,o,a),c.return=n,n=c)}return s(n);case _:e:{for(l=a.key;null!==o;){if(o.key===l){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){r(n,o.sibling),(o=i(o,a.children||[])).return=n,n=o;break e}r(n,o);break}t(n,o),o=o.sibling}(o=Uu(a,n.mode,c)).return=n,n=o}return s(n);case T:return e(n,o,(l=a._init)(a._payload),c)}if(te(a))return g(n,o,a,c);if(N(a))return m(n,o,a,c);Go(n,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==o&&6===o.tag?(r(n,o.sibling),(o=i(o,a)).return=n,n=o):(r(n,o),(o=Lu(a,n.mode,c)).return=n,n=o),s(n)):r(n,o)}}var Yo=Jo(!0),Xo=Jo(!1),Qo={},ea=xi(Qo),ta=xi(Qo),ra=xi(Qo);function na(e){if(e===Qo)throw Error(o(174));return e}function ia(e,t){switch(Si(ra,t),Si(ta,e),Si(ea,Qo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ce(null,"");break;default:t=ce(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ki(ea),Si(ea,t)}function oa(){ki(ea),ki(ta),ki(ra)}function aa(e){na(ra.current);var t=na(ea.current),r=ce(t,e.type);t!==r&&(Si(ta,e),Si(ea,r))}function sa(e){ta.current===e&&(ki(ea),ki(ta))}var ca=xi(0);function ua(e){for(var t=e;null!==t;){if(13===t.tag){var r=t.memoizedState;if(null!==r&&(null===(r=r.dehydrated)||"$?"===r.data||"$!"===r.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var la=[];function fa(){for(var e=0;e<la.length;e++)la[e]._workInProgressVersionPrimary=null;la.length=0}var da=w.ReactCurrentDispatcher,ha=w.ReactCurrentBatchConfig,pa=0,ga=null,ma=null,ya=null,ba=!1,va=!1,wa=0,Aa=0;function _a(){throw Error(o(321))}function Ea(e,t){if(null===t)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!sn(e[r],t[r]))return!1;return!0}function xa(e,t,r,n,i,a){if(pa=a,ga=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,da.current=null===e||null===e.memoizedState?ss:cs,e=r(n,i),va){a=0;do{if(va=!1,wa=0,25<=a)throw Error(o(301));a+=1,ya=ma=null,t.updateQueue=null,da.current=us,e=r(n,i)}while(va)}if(da.current=as,t=null!==ma&&null!==ma.next,pa=0,ya=ma=ga=null,ba=!1,t)throw Error(o(300));return e}function ka(){var e=0!==wa;return wa=0,e}function Sa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ya?ga.memoizedState=ya=e:ya=ya.next=e,ya}function Ca(){if(null===ma){var e=ga.alternate;e=null!==e?e.memoizedState:null}else e=ma.next;var t=null===ya?ga.memoizedState:ya.next;if(null!==t)ya=t,ma=e;else{if(null===e)throw Error(o(310));e={memoizedState:(ma=e).memoizedState,baseState:ma.baseState,baseQueue:ma.baseQueue,queue:ma.queue,next:null},null===ya?ga.memoizedState=ya=e:ya=ya.next=e}return ya}function Pa(e,t){return"function"==typeof t?t(e):t}function Oa(e){var t=Ca(),r=t.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=e;var n=ma,i=n.baseQueue,a=r.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}n.baseQueue=i=a,r.pending=null}if(null!==i){a=i.next,n=n.baseState;var c=s=null,u=null,l=a;do{var f=l.lane;if((pa&f)===f)null!==u&&(u=u.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),n=l.hasEagerState?l.eagerState:e(n,l.action);else{var d={lane:f,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===u?(c=u=d,s=n):u=u.next=d,ga.lanes|=f,jc|=f}l=l.next}while(null!==l&&l!==a);null===u?s=n:u.next=c,sn(n,t.memoizedState)||(ws=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=u,r.lastRenderedState=n}if(null!==(e=r.interleaved)){i=e;do{a=i.lane,ga.lanes|=a,jc|=a,i=i.next}while(i!==e)}else null===i&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Ia(e){var t=Ca(),r=t.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(null!==i){r.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);sn(a,t.memoizedState)||(ws=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function Ba(){}function Ta(e,t){var r=ga,n=Ca(),i=t(),a=!sn(n.memoizedState,i);if(a&&(n.memoizedState=i,ws=!0),n=n.queue,qa(Na.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||null!==ya&&1&ya.memoizedState.tag){if(r.flags|=2048,Da(9,Ra.bind(null,r,n,i,t),void 0,null),null===Oc)throw Error(o(349));0!=(30&pa)||Ma(r,t,i)}return i}function Ma(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},null===(t=ga.updateQueue)?(t={lastEffect:null,stores:null},ga.updateQueue=t,t.stores=[e]):null===(r=t.stores)?t.stores=[e]:r.push(e)}function Ra(e,t,r,n){t.value=r,t.getSnapshot=n,ja(t)&&La(e)}function Na(e,t,r){return r((function(){ja(t)&&La(e)}))}function ja(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!sn(e,r)}catch(e){return!0}}function La(e){var t=Io(e,1);null!==t&&ru(t,e,1,-1)}function Ua(e){var t=Sa();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pa,lastRenderedState:e},t.queue=e,e=e.dispatch=rs.bind(null,ga,e),[t.memoizedState,e]}function Da(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},null===(t=ga.updateQueue)?(t={lastEffect:null,stores:null},ga.updateQueue=t,t.lastEffect=e.next=e):null===(r=t.lastEffect)?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e),e}function Fa(){return Ca().memoizedState}function za(e,t,r,n){var i=Sa();ga.flags|=e,i.memoizedState=Da(1|t,r,void 0,void 0===n?null:n)}function Za(e,t,r,n){var i=Ca();n=void 0===n?null:n;var o=void 0;if(null!==ma){var a=ma.memoizedState;if(o=a.destroy,null!==n&&Ea(n,a.deps))return void(i.memoizedState=Da(t,r,o,n))}ga.flags|=e,i.memoizedState=Da(1|t,r,o,n)}function Ha(e,t){return za(8390656,8,e,t)}function qa(e,t){return Za(2048,8,e,t)}function Wa(e,t){return Za(4,2,e,t)}function Ka(e,t){return Za(4,4,e,t)}function Va(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ga(e,t,r){return r=null!=r?r.concat([e]):null,Za(4,4,Va.bind(null,t,e),r)}function $a(){}function Ja(e,t){var r=Ca();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&Ea(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Ya(e,t){var r=Ca();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&Ea(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Xa(e,t,r){return 0==(21&pa)?(e.baseState&&(e.baseState=!1,ws=!0),e.memoizedState=r):(sn(r,t)||(r=gt(),ga.lanes|=r,jc|=r,e.baseState=!0),t)}function Qa(e,t){var r=vt;vt=0!==r&&4>r?r:4,e(!0);var n=ha.transition;ha.transition={};try{e(!1),t()}finally{vt=r,ha.transition=n}}function es(){return Ca().memoizedState}function ts(e,t,r){var n=tu(e);r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},ns(e)?is(t,r):null!==(r=Oo(e,t,r,n))&&(ru(r,e,n,eu()),os(r,t,n))}function rs(e,t,r){var n=tu(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(ns(e))is(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,r);if(i.hasEagerState=!0,i.eagerState=s,sn(s,a)){var c=t.interleaved;return null===c?(i.next=i,Po(t)):(i.next=c.next,c.next=i),void(t.interleaved=i)}}catch(e){}null!==(r=Oo(e,t,i,n))&&(ru(r,e,n,i=eu()),os(r,t,n))}}function ns(e){var t=e.alternate;return e===ga||null!==t&&t===ga}function is(e,t){va=ba=!0;var r=e.pending;null===r?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function os(e,t,r){if(0!=(4194240&r)){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,bt(e,r)}}var as={readContext:So,useCallback:_a,useContext:_a,useEffect:_a,useImperativeHandle:_a,useInsertionEffect:_a,useLayoutEffect:_a,useMemo:_a,useReducer:_a,useRef:_a,useState:_a,useDebugValue:_a,useDeferredValue:_a,useTransition:_a,useMutableSource:_a,useSyncExternalStore:_a,useId:_a,unstable_isNewReconciler:!1},ss={readContext:So,useCallback:function(e,t){return Sa().memoizedState=[e,void 0===t?null:t],e},useContext:So,useEffect:Ha,useImperativeHandle:function(e,t,r){return r=null!=r?r.concat([e]):null,za(4194308,4,Va.bind(null,t,e),r)},useLayoutEffect:function(e,t){return za(4194308,4,e,t)},useInsertionEffect:function(e,t){return za(4,2,e,t)},useMemo:function(e,t){var r=Sa();return t=void 0===t?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Sa();return t=void 0!==r?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=ts.bind(null,ga,e),[n.memoizedState,e]},useRef:function(e){return e={current:e},Sa().memoizedState=e},useState:Ua,useDebugValue:$a,useDeferredValue:function(e){return Sa().memoizedState=e},useTransition:function(){var e=Ua(!1),t=e[0];return e=Qa.bind(null,e[1]),Sa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ga,i=Sa();if(io){if(void 0===r)throw Error(o(407));r=r()}else{if(r=t(),null===Oc)throw Error(o(349));0!=(30&pa)||Ma(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Ha(Na.bind(null,n,a,e),[e]),n.flags|=2048,Da(9,Ra.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=Sa(),t=Oc.identifierPrefix;if(io){var r=Yi;t=":"+t+"R"+(r=(Ji&~(1<<32-at(Ji)-1)).toString(32)+r),0<(r=wa++)&&(t+="H"+r.toString(32)),t+=":"}else t=":"+t+"r"+(r=Aa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},cs={readContext:So,useCallback:Ja,useContext:So,useEffect:qa,useImperativeHandle:Ga,useInsertionEffect:Wa,useLayoutEffect:Ka,useMemo:Ya,useReducer:Oa,useRef:Fa,useState:function(){return Oa(Pa)},useDebugValue:$a,useDeferredValue:function(e){return Xa(Ca(),ma.memoizedState,e)},useTransition:function(){return[Oa(Pa)[0],Ca().memoizedState]},useMutableSource:Ba,useSyncExternalStore:Ta,useId:es,unstable_isNewReconciler:!1},us={readContext:So,useCallback:Ja,useContext:So,useEffect:qa,useImperativeHandle:Ga,useInsertionEffect:Wa,useLayoutEffect:Ka,useMemo:Ya,useReducer:Ia,useRef:Fa,useState:function(){return Ia(Pa)},useDebugValue:$a,useDeferredValue:function(e){var t=Ca();return null===ma?t.memoizedState=e:Xa(t,ma.memoizedState,e)},useTransition:function(){return[Ia(Pa)[0],Ca().memoizedState]},useMutableSource:Ba,useSyncExternalStore:Ta,useId:es,unstable_isNewReconciler:!1};function ls(e,t){try{var r="",n=t;do{r+=z(n),n=n.return}while(n);var i=r}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function fs(e,t,r){return{value:e,source:null,stack:null!=r?r:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var hs="function"==typeof WeakMap?WeakMap:Map;function ps(e,t,r){(r=Ro(-1,r)).tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){qc||(qc=!0,Wc=n),ds(0,t)},r}function gs(e,t,r){(r=Ro(-1,r)).tag=3;var n=e.type.getDerivedStateFromError;if("function"==typeof n){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){ds(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(r.callback=function(){ds(0,t),"function"!=typeof n&&(null===Kc?Kc=new Set([this]):Kc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),r}function ms(e,t,r){var n=e.pingCache;if(null===n){n=e.pingCache=new hs;var i=new Set;n.set(t,i)}else void 0===(i=n.get(t))&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=ku.bind(null,e,t,r),t.then(e,e))}function ys(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function bs(e,t,r,n,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,1===r.tag&&(null===r.alternate?r.tag=17:((t=Ro(-1,1)).tag=2,No(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var vs=w.ReactCurrentOwner,ws=!1;function As(e,t,r,n){t.child=null===e?Xo(t,null,r,n):Yo(t,e.child,r,n)}function _s(e,t,r,n,i){r=r.render;var o=t.ref;return ko(t,i),n=xa(e,t,r,n,o,i),r=ka(),null===e||ws?(io&&r&&eo(t),t.flags|=1,As(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,qs(e,t,i))}function Es(e,t,r,n,i){if(null===e){var o=r.type;return"function"!=typeof o||Tu(o)||void 0!==o.defaultProps||null!==r.compare||void 0!==r.defaultProps?((e=Ru(r.type,null,n,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,xs(e,t,o,n,i))}if(o=e.child,0==(e.lanes&i)){var a=o.memoizedProps;if((r=null!==(r=r.compare)?r:cn)(a,n)&&e.ref===t.ref)return qs(e,t,i)}return t.flags|=1,(e=Mu(o,n)).ref=t.ref,e.return=t,t.child=e}function xs(e,t,r,n,i){if(null!==e){var o=e.memoizedProps;if(cn(o,n)&&e.ref===t.ref){if(ws=!1,t.pendingProps=n=o,0==(e.lanes&i))return t.lanes=e.lanes,qs(e,t,i);0!=(131072&e.flags)&&(ws=!0)}}return Cs(e,t,r,n,i)}function ks(e,t,r){var n=t.pendingProps,i=n.children,o=null!==e?e.memoizedState:null;if("hidden"===n.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Si(Mc,Tc),Tc|=r;else{if(0==(1073741824&r))return e=null!==o?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Si(Mc,Tc),Tc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=null!==o?o.baseLanes:r,Si(Mc,Tc),Tc|=n}else null!==o?(n=o.baseLanes|r,t.memoizedState=null):n=r,Si(Mc,Tc),Tc|=n;return As(e,t,i,r),t.child}function Ss(e,t){var r=t.ref;(null===e&&null!==r||null!==e&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Cs(e,t,r,n,i){var o=Ti(r)?Ii:Pi.current;return o=Bi(t,o),ko(t,i),r=xa(e,t,r,n,o,i),n=ka(),null===e||ws?(io&&n&&eo(t),t.flags|=1,As(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,qs(e,t,i))}function Ps(e,t,r,n,i){if(Ti(r)){var o=!0;ji(t)}else o=!1;if(ko(t,i),null===t.stateNode)Hs(e,t),qo(t,r,n),Ko(t,r,n,i),n=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,u=r.contextType;u="object"==typeof u&&null!==u?So(u):Bi(t,u=Ti(r)?Ii:Pi.current);var l=r.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==n||c!==u)&&Wo(t,a,n,u),Bo=!1;var d=t.memoizedState;a.state=d,Uo(t,n,a,i),c=t.memoizedState,s!==n||d!==c||Oi.current||Bo?("function"==typeof l&&(zo(t,r,l,n),c=t.memoizedState),(s=Bo||Ho(t,r,s,n,d,c,u))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),a.props=n,a.state=c,a.context=u,n=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,Mo(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:yo(t.type,s),a.props=u,f=t.pendingProps,d=a.context,c="object"==typeof(c=r.contextType)&&null!==c?So(c):Bi(t,c=Ti(r)?Ii:Pi.current);var h=r.getDerivedStateFromProps;(l="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==f||d!==c)&&Wo(t,a,n,c),Bo=!1,d=t.memoizedState,a.state=d,Uo(t,n,a,i);var p=t.memoizedState;s!==f||d!==p||Oi.current||Bo?("function"==typeof h&&(zo(t,r,h,n),p=t.memoizedState),(u=Bo||Ho(t,r,u,n,d,p,c)||!1)?(l||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(n,p,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(n,p,c)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),a.props=n,a.state=p,a.context=c,n=u):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return Os(e,t,r,n,o,i)}function Os(e,t,r,n,i,o){Ss(e,t);var a=0!=(128&t.flags);if(!n&&!a)return i&&Li(t,r,!1),qs(e,t,o);n=t.stateNode,vs.current=t;var s=a&&"function"!=typeof r.getDerivedStateFromError?null:n.render();return t.flags|=1,null!==e&&a?(t.child=Yo(t,e.child,null,o),t.child=Yo(t,null,s,o)):As(e,t,s,o),t.memoizedState=n.state,i&&Li(t,r,!0),t.child}function Is(e){var t=e.stateNode;t.pendingContext?Ri(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ri(0,t.context,!1),ia(e,t.containerInfo)}function Bs(e,t,r,n,i){return po(),go(i),t.flags|=256,As(e,t,r,n),t.child}var Ts,Ms,Rs,Ns={dehydrated:null,treeContext:null,retryLane:0};function js(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ls(e,t,r){var n,i=t.pendingProps,a=ca.current,s=!1,c=0!=(128&t.flags);if((n=c)||(n=(null===e||null!==e.memoizedState)&&0!=(2&a)),n?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Si(ca,1&a),null===e)return uo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(c=i.children,e=i.fallback,s?(i=t.mode,s=t.child,c={mode:"hidden",children:c},0==(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=c):s=ju(c,i,0,null),e=Nu(e,i,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=js(r),t.memoizedState=Ns,e):Us(t,c));if(null!==(a=e.memoizedState)&&null!==(n=a.dehydrated))return function(e,t,r,n,i,a,s){if(r)return 256&t.flags?(t.flags&=-257,Ds(e,t,s,n=fs(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=ju({mode:"visible",children:n.children},i,0,null),(a=Nu(a,i,s,null)).flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,0!=(1&t.mode)&&Yo(t,e.child,null,s),t.child.memoizedState=js(s),t.memoizedState=Ns,a);if(0==(1&t.mode))return Ds(e,t,s,null);if("$!"===i.data){if(n=i.nextSibling&&i.nextSibling.dataset)var c=n.dgst;return n=c,Ds(e,t,s,n=fs(a=Error(o(419)),n,void 0))}if(c=0!=(s&e.childLanes),ws||c){if(null!==(n=Oc)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(n.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,Io(e,i),ru(n,e,i,-1))}return gu(),Ds(e,t,s,n=fs(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Cu.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,no=ui(i.nextSibling),ro=t,io=!0,oo=null,null!==e&&(Vi[Gi++]=Ji,Vi[Gi++]=Yi,Vi[Gi++]=$i,Ji=e.id,Yi=e.overflow,$i=t),(t=Us(t,n.children)).flags|=4096,t)}(e,t,c,i,n,a,r);if(s){s=i.fallback,c=t.mode,n=(a=e.child).sibling;var u={mode:"hidden",children:i.children};return 0==(1&c)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null):(i=Mu(a,u)).subtreeFlags=14680064&a.subtreeFlags,null!==n?s=Mu(n,s):(s=Nu(s,c,r,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,c=null===(c=e.child.memoizedState)?js(r):{baseLanes:c.baseLanes|r,cachePool:null,transitions:c.transitions},s.memoizedState=c,s.childLanes=e.childLanes&~r,t.memoizedState=Ns,i}return e=(s=e.child).sibling,i=Mu(s,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=r),i.return=t,i.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Us(e,t){return(t=ju({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ds(e,t,r,n){return null!==n&&go(n),Yo(t,e.child,null,r),(e=Us(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fs(e,t,r){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),xo(e.return,t,r)}function zs(e,t,r,n,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function Zs(e,t,r){var n=t.pendingProps,i=n.revealOrder,o=n.tail;if(As(e,t,n.children,r),0!=(2&(n=ca.current)))n=1&n|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fs(e,r,t);else if(19===e.tag)Fs(e,r,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Si(ca,n),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;null!==r;)null!==(e=r.alternate)&&null===ua(e)&&(i=r),r=r.sibling;null===(r=i)?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),zs(t,!1,i,r,o);break;case"backwards":for(r=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ua(e)){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}zs(t,!0,r,null,o);break;case"together":zs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function qs(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),jc|=t.lanes,0==(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(r=Mu(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Mu(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Ws(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Ks(e){var t=null!==e.alternate&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;null!==i;)r|=i.lanes|i.childLanes,n|=14680064&i.subtreeFlags,n|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Vs(e,t,r){var n=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ks(t),null;case 1:case 17:return Ti(t.type)&&Mi(),Ks(t),null;case 3:return n=t.stateNode,oa(),ki(Oi),ki(Pi),fa(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(fo(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==oo&&(au(oo),oo=null))),Ks(t),null;case 5:sa(t);var i=na(ra.current);if(r=t.type,null!==e&&null!=t.stateNode)Ms(e,t,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(null===t.stateNode)throw Error(o(166));return Ks(t),null}if(e=na(ea.current),fo(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[di]=t,n[hi]=a,e=0!=(1&t.mode),r){case"dialog":Dn("cancel",n),Dn("close",n);break;case"iframe":case"object":case"embed":Dn("load",n);break;case"video":case"audio":for(i=0;i<Nn.length;i++)Dn(Nn[i],n);break;case"source":Dn("error",n);break;case"img":case"image":case"link":Dn("error",n),Dn("load",n);break;case"details":Dn("toggle",n);break;case"input":J(n,a),Dn("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Dn("invalid",n);break;case"textarea":ie(n,a),Dn("invalid",n)}for(var c in be(r,a),i=null,a)if(a.hasOwnProperty(c)){var u=a[c];"children"===c?"string"==typeof u?n.textContent!==u&&(!0!==a.suppressHydrationWarning&&Xn(n.textContent,u,e),i=["children",u]):"number"==typeof u&&n.textContent!==""+u&&(!0!==a.suppressHydrationWarning&&Xn(n.textContent,u,e),i=["children",""+u]):s.hasOwnProperty(c)&&null!=u&&"onScroll"===c&&Dn("scroll",n)}switch(r){case"input":K(n),Q(n,a,!0);break;case"textarea":K(n),ae(n);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(n.onclick=Qn)}n=i,t.updateQueue=n,null!==n&&(t.flags|=4)}else{c=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof n.is?e=c.createElement(r,{is:n.is}):(e=c.createElement(r),"select"===r&&(c=e,n.multiple?c.multiple=!0:n.size&&(c.size=n.size))):e=c.createElementNS(e,r),e[di]=t,e[hi]=n,Ts(e,t),t.stateNode=e;e:{switch(c=ve(r,n),r){case"dialog":Dn("cancel",e),Dn("close",e),i=n;break;case"iframe":case"object":case"embed":Dn("load",e),i=n;break;case"video":case"audio":for(i=0;i<Nn.length;i++)Dn(Nn[i],e);i=n;break;case"source":Dn("error",e),i=n;break;case"img":case"image":case"link":Dn("error",e),Dn("load",e),i=n;break;case"details":Dn("toggle",e),i=n;break;case"input":J(e,n),i=$(e,n),Dn("invalid",e);break;case"option":default:i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=L({},n,{value:void 0}),Dn("invalid",e);break;case"textarea":ie(e,n),i=ne(e,n),Dn("invalid",e)}for(a in be(r,i),u=i)if(u.hasOwnProperty(a)){var l=u[a];"style"===a?me(e,l):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&fe(e,l):"children"===a?"string"==typeof l?("textarea"!==r||""!==l)&&de(e,l):"number"==typeof l&&de(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=l&&"onScroll"===a&&Dn("scroll",e):null!=l&&v(e,a,l,c))}switch(r){case"input":K(e),Q(e,n,!1);break;case"textarea":K(e),ae(e);break;case"option":null!=n.value&&e.setAttribute("value",""+q(n.value));break;case"select":e.multiple=!!n.multiple,null!=(a=n.value)?re(e,!!n.multiple,a,!1):null!=n.defaultValue&&re(e,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Qn)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ks(t),null;case 6:if(e&&null!=t.stateNode)Rs(0,t,e.memoizedProps,n);else{if("string"!=typeof n&&null===t.stateNode)throw Error(o(166));if(r=na(ra.current),na(ea.current),fo(t)){if(n=t.stateNode,r=t.memoizedProps,n[di]=t,(a=n.nodeValue!==r)&&null!==(e=ro))switch(e.tag){case 3:Xn(n.nodeValue,r,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xn(n.nodeValue,r,0!=(1&e.mode))}a&&(t.flags|=4)}else(n=(9===r.nodeType?r:r.ownerDocument).createTextNode(n))[di]=t,t.stateNode=n}return Ks(t),null;case 13:if(ki(ca),n=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(io&&null!==no&&0!=(1&t.mode)&&0==(128&t.flags))ho(),po(),t.flags|=98560,a=!1;else if(a=fo(t),null!==n&&null!==n.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[di]=t}else po(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ks(t),a=!1}else null!==oo&&(au(oo),oo=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=r,t):((n=null!==n)!=(null!==e&&null!==e.memoizedState)&&n&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&ca.current)?0===Rc&&(Rc=3):gu())),null!==t.updateQueue&&(t.flags|=4),Ks(t),null);case 4:return oa(),null===e&&Zn(t.stateNode.containerInfo),Ks(t),null;case 10:return Eo(t.type._context),Ks(t),null;case 19:if(ki(ca),null===(a=t.memoizedState))return Ks(t),null;if(n=0!=(128&t.flags),null===(c=a.rendering))if(n)Ws(a,!1);else{if(0!==Rc||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(c=ua(e))){for(t.flags|=128,Ws(a,!1),null!==(n=c.updateQueue)&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;null!==r;)e=n,(a=r).flags&=14680066,null===(c=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,e=c.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Si(ca,1&ca.current|2),t.child}e=e.sibling}null!==a.tail&&Ye()>Zc&&(t.flags|=128,n=!0,Ws(a,!1),t.lanes=4194304)}else{if(!n)if(null!==(e=ua(c))){if(t.flags|=128,n=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Ws(a,!0),null===a.tail&&"hidden"===a.tailMode&&!c.alternate&&!io)return Ks(t),null}else 2*Ye()-a.renderingStartTime>Zc&&1073741824!==r&&(t.flags|=128,n=!0,Ws(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(null!==(r=a.last)?r.sibling=c:t.child=c,a.last=c)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ye(),t.sibling=null,r=ca.current,Si(ca,n?1&r|2:1&r),t):(Ks(t),null);case 22:case 23:return fu(),n=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==n&&(t.flags|=8192),n&&0!=(1&t.mode)?0!=(1073741824&Tc)&&(Ks(t),6&t.subtreeFlags&&(t.flags|=8192)):Ks(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Gs(e,t){switch(to(t),t.tag){case 1:return Ti(t.type)&&Mi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return oa(),ki(Oi),ki(Pi),fa(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return sa(t),null;case 13:if(ki(ca),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ki(ca),null;case 4:return oa(),null;case 10:return Eo(t.type._context),null;case 22:case 23:return fu(),null;default:return null}}Ts=function(e,t){for(var r=t.child;null!==r;){if(5===r.tag||6===r.tag)e.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Ms=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,na(ea.current);var o,a=null;switch(r){case"input":i=$(e,i),n=$(e,n),a=[];break;case"select":i=L({},i,{value:void 0}),n=L({},n,{value:void 0}),a=[];break;case"textarea":i=ne(e,i),n=ne(e,n),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof n.onClick&&(e.onclick=Qn)}for(l in be(r,n),r=null,i)if(!n.hasOwnProperty(l)&&i.hasOwnProperty(l)&&null!=i[l])if("style"===l){var c=i[l];for(o in c)c.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(s.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in n){var u=n[l];if(c=null!=i?i[l]:void 0,n.hasOwnProperty(l)&&u!==c&&(null!=u||null!=c))if("style"===l)if(c){for(o in c)!c.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in u)u.hasOwnProperty(o)&&c[o]!==u[o]&&(r||(r={}),r[o]=u[o])}else r||(a||(a=[]),a.push(l,r)),r=u;else"dangerouslySetInnerHTML"===l?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(a=a||[]).push(l,u)):"children"===l?"string"!=typeof u&&"number"!=typeof u||(a=a||[]).push(l,""+u):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(s.hasOwnProperty(l)?(null!=u&&"onScroll"===l&&Dn("scroll",e),a||c===u||(a=[])):(a=a||[]).push(l,u))}r&&(a=a||[]).push("style",r);var l=a;(t.updateQueue=l)&&(t.flags|=4)}},Rs=function(e,t,r,n){r!==n&&(t.flags|=4)};var $s=!1,Js=!1,Ys="function"==typeof WeakSet?WeakSet:Set,Xs=null;function Qs(e,t){var r=e.ref;if(null!==r)if("function"==typeof r)try{r(null)}catch(r){xu(e,t,r)}else r.current=null}function ec(e,t,r){try{r()}catch(r){xu(e,t,r)}}var tc=!1;function rc(e,t,r){var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var i=n=n.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&ec(t,r,o)}i=i.next}while(i!==n)}}function nc(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function ic(e){var t=e.ref;if(null!==t){var r=e.stateNode;e.tag,e=r,"function"==typeof t?t(e):t.current=e}}function oc(e){var t=e.alternate;null!==t&&(e.alternate=null,oc(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[di],delete t[hi],delete t[gi],delete t[mi],delete t[yi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ac(e){return 5===e.tag||3===e.tag||4===e.tag}function sc(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ac(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function cc(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?8===r.nodeType?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(8===r.nodeType?(t=r.parentNode).insertBefore(e,r):(t=r).appendChild(e),null!=(r=r._reactRootContainer)||null!==t.onclick||(t.onclick=Qn));else if(4!==n&&null!==(e=e.child))for(cc(e,t,r),e=e.sibling;null!==e;)cc(e,t,r),e=e.sibling}function uc(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(4!==n&&null!==(e=e.child))for(uc(e,t,r),e=e.sibling;null!==e;)uc(e,t,r),e=e.sibling}var lc=null,fc=!1;function dc(e,t,r){for(r=r.child;null!==r;)hc(e,t,r),r=r.sibling}function hc(e,t,r){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,r)}catch(e){}switch(r.tag){case 5:Js||Qs(r,t);case 6:var n=lc,i=fc;lc=null,dc(e,t,r),fc=i,null!==(lc=n)&&(fc?(e=lc,r=r.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)):lc.removeChild(r.stateNode));break;case 18:null!==lc&&(fc?(e=lc,r=r.stateNode,8===e.nodeType?ci(e.parentNode,r):1===e.nodeType&&ci(e,r),Zt(e)):ci(lc,r.stateNode));break;case 4:n=lc,i=fc,lc=r.stateNode.containerInfo,fc=!0,dc(e,t,r),lc=n,fc=i;break;case 0:case 11:case 14:case 15:if(!Js&&null!==(n=r.updateQueue)&&null!==(n=n.lastEffect)){i=n=n.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&ec(r,t,a),i=i.next}while(i!==n)}dc(e,t,r);break;case 1:if(!Js&&(Qs(r,t),"function"==typeof(n=r.stateNode).componentWillUnmount))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(e){xu(r,t,e)}dc(e,t,r);break;case 21:dc(e,t,r);break;case 22:1&r.mode?(Js=(n=Js)||null!==r.memoizedState,dc(e,t,r),Js=n):dc(e,t,r);break;default:dc(e,t,r)}}function pc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var r=e.stateNode;null===r&&(r=e.stateNode=new Ys),t.forEach((function(t){var n=Pu.bind(null,e,t);r.has(t)||(r.add(t),t.then(n,n))}))}}function gc(e,t){var r=t.deletions;if(null!==r)for(var n=0;n<r.length;n++){var i=r[n];try{var a=e,s=t,c=s;e:for(;null!==c;){switch(c.tag){case 5:lc=c.stateNode,fc=!1;break e;case 3:case 4:lc=c.stateNode.containerInfo,fc=!0;break e}c=c.return}if(null===lc)throw Error(o(160));hc(a,s,i),lc=null,fc=!1;var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(e){xu(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)mc(t,e),t=t.sibling}function mc(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gc(t,e),yc(e),4&n){try{rc(3,e,e.return),nc(3,e)}catch(t){xu(e,e.return,t)}try{rc(5,e,e.return)}catch(t){xu(e,e.return,t)}}break;case 1:gc(t,e),yc(e),512&n&&null!==r&&Qs(r,r.return);break;case 5:if(gc(t,e),yc(e),512&n&&null!==r&&Qs(r,r.return),32&e.flags){var i=e.stateNode;try{de(i,"")}catch(t){xu(e,e.return,t)}}if(4&n&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==r?r.memoizedProps:a,c=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===c&&"radio"===a.type&&null!=a.name&&Y(i,a),ve(c,s);var l=ve(c,a);for(s=0;s<u.length;s+=2){var f=u[s],d=u[s+1];"style"===f?me(i,d):"dangerouslySetInnerHTML"===f?fe(i,d):"children"===f?de(i,d):v(i,f,d,l)}switch(c){case"input":X(i,a);break;case"textarea":oe(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?re(i,!!a.multiple,p,!1):h!==!!a.multiple&&(null!=a.defaultValue?re(i,!!a.multiple,a.defaultValue,!0):re(i,!!a.multiple,a.multiple?[]:"",!1))}i[hi]=a}catch(t){xu(e,e.return,t)}}break;case 6:if(gc(t,e),yc(e),4&n){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(t){xu(e,e.return,t)}}break;case 3:if(gc(t,e),yc(e),4&n&&null!==r&&r.memoizedState.isDehydrated)try{Zt(t.containerInfo)}catch(t){xu(e,e.return,t)}break;case 4:default:gc(t,e),yc(e);break;case 13:gc(t,e),yc(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(zc=Ye())),4&n&&pc(e);break;case 22:if(f=null!==r&&null!==r.memoizedState,1&e.mode?(Js=(l=Js)||f,gc(t,e),Js=l):gc(t,e),yc(e),8192&n){if(l=null!==e.memoizedState,(e.stateNode.isHidden=l)&&!f&&0!=(1&e.mode))for(Xs=e,f=e.child;null!==f;){for(d=Xs=f;null!==Xs;){switch(p=(h=Xs).child,h.tag){case 0:case 11:case 14:case 15:rc(4,h,h.return);break;case 1:Qs(h,h.return);var g=h.stateNode;if("function"==typeof g.componentWillUnmount){n=h,r=h.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(e){xu(n,r,e)}}break;case 5:Qs(h,h.return);break;case 22:if(null!==h.memoizedState){Ac(d);continue}}null!==p?(p.return=h,Xs=p):Ac(d)}f=f.sibling}e:for(f=null,d=e;;){if(5===d.tag){if(null===f){f=d;try{i=d.stateNode,l?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(c=d.stateNode,s=null!=(u=d.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,c.style.display=ge("display",s))}catch(t){xu(e,e.return,t)}}}else if(6===d.tag){if(null===f)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(t){xu(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:gc(t,e),yc(e),4&n&&pc(e);case 21:}}function yc(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(ac(r)){var n=r;break e}r=r.return}throw Error(o(160))}switch(n.tag){case 5:var i=n.stateNode;32&n.flags&&(de(i,""),n.flags&=-33),uc(e,sc(e),i);break;case 3:case 4:var a=n.stateNode.containerInfo;cc(e,sc(e),a);break;default:throw Error(o(161))}}catch(t){xu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bc(e,t,r){Xs=e,vc(e,t,r)}function vc(e,t,r){for(var n=0!=(1&e.mode);null!==Xs;){var i=Xs,o=i.child;if(22===i.tag&&n){var a=null!==i.memoizedState||$s;if(!a){var s=i.alternate,c=null!==s&&null!==s.memoizedState||Js;s=$s;var u=Js;if($s=a,(Js=c)&&!u)for(Xs=i;null!==Xs;)c=(a=Xs).child,22===a.tag&&null!==a.memoizedState?_c(i):null!==c?(c.return=a,Xs=c):_c(i);for(;null!==o;)Xs=o,vc(o,t,r),o=o.sibling;Xs=i,$s=s,Js=u}wc(e)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,Xs=o):wc(e)}}function wc(e){for(;null!==Xs;){var t=Xs;if(0!=(8772&t.flags)){var r=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Js||nc(5,t);break;case 1:var n=t.stateNode;if(4&t.flags&&!Js)if(null===r)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:yo(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Do(t,a,n);break;case 3:var s=t.updateQueue;if(null!==s){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}Do(t,s,r)}break;case 5:var c=t.stateNode;if(null===r&&4&t.flags){r=c;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var l=t.alternate;if(null!==l){var f=l.memoizedState;if(null!==f){var d=f.dehydrated;null!==d&&Zt(d)}}}break;default:throw Error(o(163))}Js||512&t.flags&&ic(t)}catch(e){xu(t,t.return,e)}}if(t===e){Xs=null;break}if(null!==(r=t.sibling)){r.return=t.return,Xs=r;break}Xs=t.return}}function Ac(e){for(;null!==Xs;){var t=Xs;if(t===e){Xs=null;break}var r=t.sibling;if(null!==r){r.return=t.return,Xs=r;break}Xs=t.return}}function _c(e){for(;null!==Xs;){var t=Xs;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{nc(4,t)}catch(e){xu(t,r,e)}break;case 1:var n=t.stateNode;if("function"==typeof n.componentDidMount){var i=t.return;try{n.componentDidMount()}catch(e){xu(t,i,e)}}var o=t.return;try{ic(t)}catch(e){xu(t,o,e)}break;case 5:var a=t.return;try{ic(t)}catch(e){xu(t,a,e)}}}catch(e){xu(t,t.return,e)}if(t===e){Xs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Xs=s;break}Xs=t.return}}var Ec,xc=Math.ceil,kc=w.ReactCurrentDispatcher,Sc=w.ReactCurrentOwner,Cc=w.ReactCurrentBatchConfig,Pc=0,Oc=null,Ic=null,Bc=0,Tc=0,Mc=xi(0),Rc=0,Nc=null,jc=0,Lc=0,Uc=0,Dc=null,Fc=null,zc=0,Zc=1/0,Hc=null,qc=!1,Wc=null,Kc=null,Vc=!1,Gc=null,$c=0,Jc=0,Yc=null,Xc=-1,Qc=0;function eu(){return 0!=(6&Pc)?Ye():-1!==Xc?Xc:Xc=Ye()}function tu(e){return 0==(1&e.mode)?1:0!=(2&Pc)&&0!==Bc?Bc&-Bc:null!==mo.transition?(0===Qc&&(Qc=gt()),Qc):0!==(e=vt)?e:e=void 0===(e=window.event)?16:Jt(e.type)}function ru(e,t,r,n){if(50<Jc)throw Jc=0,Yc=null,Error(o(185));yt(e,r,n),0!=(2&Pc)&&e===Oc||(e===Oc&&(0==(2&Pc)&&(Lc|=r),4===Rc&&su(e,Bc)),nu(e,n),1===r&&0===Pc&&0==(1&t.mode)&&(Zc=Ye()+500,Di&&Zi()))}function nu(e,t){var r=e.callbackNode;!function(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-at(o),s=1<<a,c=i[a];-1===c?0!=(s&r)&&0==(s&n)||(i[a]=ht(s,t)):c<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var n=dt(e,e===Oc?Bc:0);if(0===n)null!==r&&Ge(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(null!=r&&Ge(r),1===t)0===e.tag?function(e){Di=!0,zi(e)}(cu.bind(null,e)):zi(cu.bind(null,e)),ai((function(){0==(6&Pc)&&Zi()})),r=null;else{switch(wt(n)){case 1:r=Qe;break;case 4:r=et;break;case 16:default:r=tt;break;case 536870912:r=nt}r=Ou(r,iu.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function iu(e,t){if(Xc=-1,Qc=0,0!=(6&Pc))throw Error(o(327));var r=e.callbackNode;if(_u()&&e.callbackNode!==r)return null;var n=dt(e,e===Oc?Bc:0);if(0===n)return null;if(0!=(30&n)||0!=(n&e.expiredLanes)||t)t=mu(e,n);else{t=n;var i=Pc;Pc|=2;var a=pu();for(Oc===e&&Bc===t||(Hc=null,Zc=Ye()+500,du(e,t));;)try{bu();break}catch(t){hu(e,t)}_o(),kc.current=a,Pc=i,null!==Ic?t=0:(Oc=null,Bc=0,t=Rc)}if(0!==t){if(2===t&&0!==(i=pt(e))&&(n=i,t=ou(e,i)),1===t)throw r=Nc,du(e,0),su(e,n),nu(e,Ye()),r;if(6===t)su(e,n);else{if(i=e.current.alternate,0==(30&n)&&!function(e){for(var t=e;;){if(16384&t.flags){var r=t.updateQueue;if(null!==r&&null!==(r=r.stores))for(var n=0;n<r.length;n++){var i=r[n],o=i.getSnapshot;i=i.value;try{if(!sn(o(),i))return!1}catch(e){return!1}}}if(r=t.child,16384&t.subtreeFlags&&null!==r)r.return=t,t=r;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=mu(e,n))&&0!==(a=pt(e))&&(n=a,t=ou(e,a)),1===t))throw r=Nc,du(e,0),su(e,n),nu(e,Ye()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(o(345));case 2:case 5:Au(e,Fc,Hc);break;case 3:if(su(e,n),(130023424&n)===n&&10<(t=zc+500-Ye())){if(0!==dt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){eu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ni(Au.bind(null,e,Fc,Hc),t);break}Au(e,Fc,Hc);break;case 4:if(su(e,n),(4194240&n)===n)break;for(t=e.eventTimes,i=-1;0<n;){var s=31-at(n);a=1<<s,(s=t[s])>i&&(i=s),n&=~a}if(n=i,10<(n=(120>(n=Ye()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*xc(n/1960))-n)){e.timeoutHandle=ni(Au.bind(null,e,Fc,Hc),n);break}Au(e,Fc,Hc);break;default:throw Error(o(329))}}}return nu(e,Ye()),e.callbackNode===r?iu.bind(null,e):null}function ou(e,t){var r=Dc;return e.current.memoizedState.isDehydrated&&(du(e,t).flags|=256),2!==(e=mu(e,t))&&(t=Fc,Fc=r,null!==t&&au(t)),e}function au(e){null===Fc?Fc=e:Fc.push.apply(Fc,e)}function su(e,t){for(t&=~Uc,t&=~Lc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-at(t),n=1<<r;e[r]=-1,t&=~n}}function cu(e){if(0!=(6&Pc))throw Error(o(327));_u();var t=dt(e,0);if(0==(1&t))return nu(e,Ye()),null;var r=mu(e,t);if(0!==e.tag&&2===r){var n=pt(e);0!==n&&(t=n,r=ou(e,n))}if(1===r)throw r=Nc,du(e,0),su(e,t),nu(e,Ye()),r;if(6===r)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Au(e,Fc,Hc),nu(e,Ye()),null}function uu(e,t){var r=Pc;Pc|=1;try{return e(t)}finally{0===(Pc=r)&&(Zc=Ye()+500,Di&&Zi())}}function lu(e){null!==Gc&&0===Gc.tag&&0==(6&Pc)&&_u();var t=Pc;Pc|=1;var r=Cc.transition,n=vt;try{if(Cc.transition=null,vt=1,e)return e()}finally{vt=n,Cc.transition=r,0==(6&(Pc=t))&&Zi()}}function fu(){Tc=Mc.current,ki(Mc)}function du(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(-1!==r&&(e.timeoutHandle=-1,ii(r)),null!==Ic)for(r=Ic.return;null!==r;){var n=r;switch(to(n),n.tag){case 1:null!=(n=n.type.childContextTypes)&&Mi();break;case 3:oa(),ki(Oi),ki(Pi),fa();break;case 5:sa(n);break;case 4:oa();break;case 13:case 19:ki(ca);break;case 10:Eo(n.type._context);break;case 22:case 23:fu()}r=r.return}if(Oc=e,Ic=e=Mu(e.current,null),Bc=Tc=t,Rc=0,Nc=null,Uc=Lc=jc=0,Fc=Dc=null,null!==Co){for(t=0;t<Co.length;t++)if(null!==(n=(r=Co[t]).interleaved)){r.interleaved=null;var i=n.next,o=r.pending;if(null!==o){var a=o.next;o.next=i,n.next=a}r.pending=n}Co=null}return e}function hu(e,t){for(;;){var r=Ic;try{if(_o(),da.current=as,ba){for(var n=ga.memoizedState;null!==n;){var i=n.queue;null!==i&&(i.pending=null),n=n.next}ba=!1}if(pa=0,ya=ma=ga=null,va=!1,wa=0,Sc.current=null,null===r||null===r.return){Rc=1,Nc=t,Ic=null;break}e:{var a=e,s=r.return,c=r,u=t;if(t=Bc,c.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var l=u,f=c,d=f.tag;if(0==(1&f.mode)&&(0===d||11===d||15===d)){var h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=ys(s);if(null!==p){p.flags&=-257,bs(p,s,c,0,t),1&p.mode&&ms(a,l,t),u=l;var g=(t=p).updateQueue;if(null===g){var m=new Set;m.add(u),t.updateQueue=m}else g.add(u);break e}if(0==(1&t)){ms(a,l,t),gu();break e}u=Error(o(426))}else if(io&&1&c.mode){var y=ys(s);if(null!==y){0==(65536&y.flags)&&(y.flags|=256),bs(y,s,c,0,t),go(ls(u,c));break e}}a=u=ls(u,c),4!==Rc&&(Rc=2),null===Dc?Dc=[a]:Dc.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Lo(a,ps(0,u,t));break e;case 1:c=u;var b=a.type,v=a.stateNode;if(0==(128&a.flags)&&("function"==typeof b.getDerivedStateFromError||null!==v&&"function"==typeof v.componentDidCatch&&(null===Kc||!Kc.has(v)))){a.flags|=65536,t&=-t,a.lanes|=t,Lo(a,gs(a,c,t));break e}}a=a.return}while(null!==a)}wu(r)}catch(e){t=e,Ic===r&&null!==r&&(Ic=r=r.return);continue}break}}function pu(){var e=kc.current;return kc.current=as,null===e?as:e}function gu(){0!==Rc&&3!==Rc&&2!==Rc||(Rc=4),null===Oc||0==(268435455&jc)&&0==(268435455&Lc)||su(Oc,Bc)}function mu(e,t){var r=Pc;Pc|=2;var n=pu();for(Oc===e&&Bc===t||(Hc=null,du(e,t));;)try{yu();break}catch(t){hu(e,t)}if(_o(),Pc=r,kc.current=n,null!==Ic)throw Error(o(261));return Oc=null,Bc=0,Rc}function yu(){for(;null!==Ic;)vu(Ic)}function bu(){for(;null!==Ic&&!$e();)vu(Ic)}function vu(e){var t=Ec(e.alternate,e,Tc);e.memoizedProps=e.pendingProps,null===t?wu(e):Ic=t,Sc.current=null}function wu(e){var t=e;do{var r=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(r=Vs(r,t,Tc)))return void(Ic=r)}else{if(null!==(r=Gs(r,t)))return r.flags&=32767,void(Ic=r);if(null===e)return Rc=6,void(Ic=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Ic=t);Ic=t=e}while(null!==t);0===Rc&&(Rc=5)}function Au(e,t,r){var n=vt,i=Cc.transition;try{Cc.transition=null,vt=1,function(e,t,r,n){do{_u()}while(null!==Gc);if(0!=(6&Pc))throw Error(o(327));r=e.finishedWork;var i=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-at(r),o=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~o}}(e,a),e===Oc&&(Ic=Oc=null,Bc=0),0==(2064&r.subtreeFlags)&&0==(2064&r.flags)||Vc||(Vc=!0,Ou(tt,(function(){return _u(),null}))),a=0!=(15990&r.flags),0!=(15990&r.subtreeFlags)||a){a=Cc.transition,Cc.transition=null;var s=vt;vt=1;var c=Pc;Pc|=4,Sc.current=null,function(e,t){if(ei=qt,hn(e=dn())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var n=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(n&&0!==n.rangeCount){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch(e){r=null;break e}var s=0,c=-1,u=-1,l=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==r||0!==i&&3!==d.nodeType||(c=s+i),d!==a||0!==n&&3!==d.nodeType||(u=s+n),3===d.nodeType&&(s+=d.nodeValue.length),null!==(p=d.firstChild);)h=d,d=p;for(;;){if(d===e)break t;if(h===r&&++l===i&&(c=s),h===a&&++f===n&&(u=s),null!==(p=d.nextSibling))break;h=(d=h).parentNode}d=p}r=-1===c||-1===u?null:{start:c,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(ti={focusedElem:e,selectionRange:r},qt=!1,Xs=t;null!==Xs;)if(e=(t=Xs).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Xs=e;else for(;null!==Xs;){t=Xs;try{var g=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,y=g.memoizedState,b=t.stateNode,v=b.getSnapshotBeforeUpdate(t.elementType===t.type?m:yo(t.type,m),y);b.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(o(163))}}catch(e){xu(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Xs=e;break}Xs=t.return}g=tc,tc=!1}(e,r),mc(r,e),pn(ti),qt=!!ei,ti=ei=null,e.current=r,bc(r,e,i),Je(),Pc=c,vt=s,Cc.transition=a}else e.current=r;if(Vc&&(Vc=!1,Gc=e,$c=i),0===(a=e.pendingLanes)&&(Kc=null),function(e){if(ot&&"function"==typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,128==(128&e.current.flags))}catch(e){}}(r.stateNode),nu(e,Ye()),null!==t)for(n=e.onRecoverableError,r=0;r<t.length;r++)n((i=t[r]).value,{componentStack:i.stack,digest:i.digest});if(qc)throw qc=!1,e=Wc,Wc=null,e;0!=(1&$c)&&0!==e.tag&&_u(),0!=(1&(a=e.pendingLanes))?e===Yc?Jc++:(Jc=0,Yc=e):Jc=0,Zi()}(e,t,r,n)}finally{Cc.transition=i,vt=n}return null}function _u(){if(null!==Gc){var e=wt($c),t=Cc.transition,r=vt;try{if(Cc.transition=null,vt=16>e?16:e,null===Gc)var n=!1;else{if(e=Gc,Gc=null,$c=0,0!=(6&Pc))throw Error(o(331));var i=Pc;for(Pc|=4,Xs=e.current;null!==Xs;){var a=Xs,s=a.child;if(0!=(16&Xs.flags)){var c=a.deletions;if(null!==c){for(var u=0;u<c.length;u++){var l=c[u];for(Xs=l;null!==Xs;){var f=Xs;switch(f.tag){case 0:case 11:case 15:rc(8,f,a)}var d=f.child;if(null!==d)d.return=f,Xs=d;else for(;null!==Xs;){var h=(f=Xs).sibling,p=f.return;if(oc(f),f===l){Xs=null;break}if(null!==h){h.return=p,Xs=h;break}Xs=p}}}var g=a.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}Xs=a}}if(0!=(2064&a.subtreeFlags)&&null!==s)s.return=a,Xs=s;else e:for(;null!==Xs;){if(0!=(2048&(a=Xs).flags))switch(a.tag){case 0:case 11:case 15:rc(9,a,a.return)}var b=a.sibling;if(null!==b){b.return=a.return,Xs=b;break e}Xs=a.return}}var v=e.current;for(Xs=v;null!==Xs;){var w=(s=Xs).child;if(0!=(2064&s.subtreeFlags)&&null!==w)w.return=s,Xs=w;else e:for(s=v;null!==Xs;){if(0!=(2048&(c=Xs).flags))try{switch(c.tag){case 0:case 11:case 15:nc(9,c)}}catch(e){xu(c,c.return,e)}if(c===s){Xs=null;break e}var A=c.sibling;if(null!==A){A.return=c.return,Xs=A;break e}Xs=c.return}}if(Pc=i,Zi(),ot&&"function"==typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(e){}n=!0}return n}finally{vt=r,Cc.transition=t}}return!1}function Eu(e,t,r){e=No(e,t=ps(0,t=ls(r,t),1),1),t=eu(),null!==e&&(yt(e,1,t),nu(e,t))}function xu(e,t,r){if(3===e.tag)Eu(e,e,r);else for(;null!==t;){if(3===t.tag){Eu(t,e,r);break}if(1===t.tag){var n=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof n.componentDidCatch&&(null===Kc||!Kc.has(n))){t=No(t,e=gs(t,e=ls(r,e),1),1),e=eu(),null!==t&&(yt(t,1,e),nu(t,e));break}}t=t.return}}function ku(e,t,r){var n=e.pingCache;null!==n&&n.delete(t),t=eu(),e.pingedLanes|=e.suspendedLanes&r,Oc===e&&(Bc&r)===r&&(4===Rc||3===Rc&&(130023424&Bc)===Bc&&500>Ye()-zc?du(e,0):Uc|=r),nu(e,t)}function Su(e,t){0===t&&(0==(1&e.mode)?t=1:(t=lt,0==(130023424&(lt<<=1))&&(lt=4194304)));var r=eu();null!==(e=Io(e,t))&&(yt(e,t,r),nu(e,r))}function Cu(e){var t=e.memoizedState,r=0;null!==t&&(r=t.retryLane),Su(e,r)}function Pu(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;null!==i&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(o(314))}null!==n&&n.delete(t),Su(e,r)}function Ou(e,t){return Ve(e,t)}function Iu(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bu(e,t,r,n){return new Iu(e,t,r,n)}function Tu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Mu(e,t){var r=e.alternate;return null===r?((r=Bu(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=14680064&e.flags,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ru(e,t,r,n,i,a){var s=2;if(n=e,"function"==typeof e)Tu(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case E:return Nu(r.children,i,a,t);case x:s=8,i|=8;break;case k:return(e=Bu(12,r,t,2|i)).elementType=k,e.lanes=a,e;case O:return(e=Bu(13,r,t,i)).elementType=O,e.lanes=a,e;case I:return(e=Bu(19,r,t,i)).elementType=I,e.lanes=a,e;case M:return ju(r,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case S:s=10;break e;case C:s=9;break e;case P:s=11;break e;case B:s=14;break e;case T:s=16,n=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Bu(s,r,t,i)).elementType=e,t.type=n,t.lanes=a,t}function Nu(e,t,r,n){return(e=Bu(7,e,n,t)).lanes=r,e}function ju(e,t,r,n){return(e=Bu(22,e,n,t)).elementType=M,e.lanes=r,e.stateNode={isHidden:!1},e}function Lu(e,t,r){return(e=Bu(6,e,null,t)).lanes=r,e}function Uu(e,t,r){return(t=Bu(4,null!==e.children?e.children:[],e.key,t)).lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Du(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fu(e,t,r,n,i,o,a,s,c){return e=new Du(e,t,r,s,c),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Bu(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},To(o),e}function zu(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:_,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}function Zu(e){if(!e)return Ci;e:{if(Ze(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ti(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var r=e.type;if(Ti(r))return Ni(e,r,t)}return t}function Hu(e,t,r,n,i,o,a,s,c){return(e=Fu(r,n,!0,e,0,o,0,s,c)).context=Zu(null),r=e.current,(o=Ro(n=eu(),i=tu(r))).callback=null!=t?t:null,No(r,o,i),e.current.lanes=i,yt(e,i,n),nu(e,n),e}function qu(e,t,r,n){var i=t.current,o=eu(),a=tu(i);return r=Zu(r),null===t.context?t.context=r:t.pendingContext=r,(t=Ro(o,a)).payload={element:e},null!==(n=void 0===n?null:n)&&(t.callback=n),null!==(e=No(i,t,a))&&(ru(e,i,a,o),jo(e,i,a)),a}function Wu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Ku(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var r=e.retryLane;e.retryLane=0!==r&&r<t?r:t}}function Vu(e,t){Ku(e,t),(e=e.alternate)&&Ku(e,t)}Ec=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Oi.current)ws=!0;else{if(0==(e.lanes&r)&&0==(128&t.flags))return ws=!1,function(e,t,r){switch(t.tag){case 3:Is(t),po();break;case 5:aa(t);break;case 1:Ti(t.type)&&ji(t);break;case 4:ia(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Si(bo,n._currentValue),n._currentValue=i;break;case 13:if(null!==(n=t.memoizedState))return null!==n.dehydrated?(Si(ca,1&ca.current),t.flags|=128,null):0!=(r&t.child.childLanes)?Ls(e,t,r):(Si(ca,1&ca.current),null!==(e=qs(e,t,r))?e.sibling:null);Si(ca,1&ca.current);break;case 19:if(n=0!=(r&t.childLanes),0!=(128&e.flags)){if(n)return Zs(e,t,r);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Si(ca,ca.current),n)break;return null;case 22:case 23:return t.lanes=0,ks(e,t,r)}return qs(e,t,r)}(e,t,r);ws=0!=(131072&e.flags)}else ws=!1,io&&0!=(1048576&t.flags)&&Qi(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Hs(e,t),e=t.pendingProps;var i=Bi(t,Pi.current);ko(t,r),i=xa(null,t,n,e,i,r);var a=ka();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ti(n)?(a=!0,ji(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,To(t),i.updater=Zo,t.stateNode=i,i._reactInternals=t,Ko(t,n,e,r),t=Os(null,t,n,!0,a,r)):(t.tag=0,io&&a&&eo(t),As(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,n=(i=n._init)(n._payload),t.type=n,i=t.tag=function(e){if("function"==typeof e)return Tu(e)?1:0;if(null!=e){if((e=e.$$typeof)===P)return 11;if(e===B)return 14}return 2}(n),e=yo(n,e),i){case 0:t=Cs(null,t,n,e,r);break e;case 1:t=Ps(null,t,n,e,r);break e;case 11:t=_s(null,t,n,e,r);break e;case 14:t=Es(null,t,n,yo(n.type,e),r);break e}throw Error(o(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,Cs(e,t,n,i=t.elementType===n?i:yo(n,i),r);case 1:return n=t.type,i=t.pendingProps,Ps(e,t,n,i=t.elementType===n?i:yo(n,i),r);case 3:e:{if(Is(t),null===e)throw Error(o(387));n=t.pendingProps,i=(a=t.memoizedState).element,Mo(e,t),Uo(t,n,null,r);var s=t.memoizedState;if(n=s.element,a.isDehydrated){if(a={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Bs(e,t,n,r,i=ls(Error(o(423)),t));break e}if(n!==i){t=Bs(e,t,n,r,i=ls(Error(o(424)),t));break e}for(no=ui(t.stateNode.containerInfo.firstChild),ro=t,io=!0,oo=null,r=Xo(t,null,n,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(po(),n===i){t=qs(e,t,r);break e}As(e,t,n,r)}t=t.child}return t;case 5:return aa(t),null===e&&uo(t),n=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,ri(n,i)?s=null:null!==a&&ri(n,a)&&(t.flags|=32),Ss(e,t),As(e,t,s,r),t.child;case 6:return null===e&&uo(t),null;case 13:return Ls(e,t,r);case 4:return ia(t,t.stateNode.containerInfo),n=t.pendingProps,null===e?t.child=Yo(t,null,n,r):As(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,_s(e,t,n,i=t.elementType===n?i:yo(n,i),r);case 7:return As(e,t,t.pendingProps,r),t.child;case 8:case 12:return As(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Si(bo,n._currentValue),n._currentValue=s,null!==a)if(sn(a.value,s)){if(a.children===i.children&&!Oi.current){t=qs(e,t,r);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var c=a.dependencies;if(null!==c){s=a.child;for(var u=c.firstContext;null!==u;){if(u.context===n){if(1===a.tag){(u=Ro(-1,r&-r)).tag=2;var l=a.updateQueue;if(null!==l){var f=(l=l.shared).pending;null===f?u.next=u:(u.next=f.next,f.next=u),l.pending=u}}a.lanes|=r,null!==(u=a.alternate)&&(u.lanes|=r),xo(a.return,r,t),c.lanes|=r;break}u=u.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=r,null!==(c=s.alternate)&&(c.lanes|=r),xo(s,r,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}As(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,ko(t,r),n=n(i=So(i)),t.flags|=1,As(e,t,n,r),t.child;case 14:return i=yo(n=t.type,t.pendingProps),Es(e,t,n,i=yo(n.type,i),r);case 15:return xs(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:yo(n,i),Hs(e,t),t.tag=1,Ti(n)?(e=!0,ji(t)):e=!1,ko(t,r),qo(t,n,i),Ko(t,n,i,r),Os(null,t,n,!0,e,r);case 19:return Zs(e,t,r);case 22:return ks(e,t,r)}throw Error(o(156,t.tag))};var Gu="function"==typeof reportError?reportError:function(e){console.error(e)};function $u(e){this._internalRoot=e}function Ju(e){this._internalRoot=e}function Yu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qu(){}function el(e,t,r,n,i){var o=r._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Wu(a);s.call(e)}}qu(t,a,e,i)}else a=function(e,t,r,n,i){if(i){if("function"==typeof n){var o=n;n=function(){var e=Wu(a);o.call(e)}}var a=Hu(t,n,e,0,null,!1,0,"",Qu);return e._reactRootContainer=a,e[pi]=a.current,Zn(8===e.nodeType?e.parentNode:e),lu(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof n){var s=n;n=function(){var e=Wu(c);s.call(e)}}var c=Fu(e,0,!1,null,0,!1,0,"",Qu);return e._reactRootContainer=c,e[pi]=c.current,Zn(8===e.nodeType?e.parentNode:e),lu((function(){qu(t,c,r,n)})),c}(r,t,e,i,n);return Wu(a)}Ju.prototype.render=$u.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));qu(e,t,null,null)},Ju.prototype.unmount=$u.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;lu((function(){qu(null,e,null,null)})),t[pi]=null}},Ju.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Mt.length&&0!==t&&t<Mt[r].priority;r++);Mt.splice(r,0,e),0===r&&Lt(e)}},At=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ft(t.pendingLanes);0!==r&&(bt(t,1|r),nu(t,Ye()),0==(6&Pc)&&(Zc=Ye()+500,Zi()))}break;case 13:lu((function(){var t=Io(e,1);if(null!==t){var r=eu();ru(t,e,1,r)}})),Vu(e,1)}},_t=function(e){if(13===e.tag){var t=Io(e,134217728);null!==t&&ru(t,e,134217728,eu()),Vu(e,134217728)}},Et=function(e){if(13===e.tag){var t=tu(e),r=Io(e,t);null!==r&&ru(r,e,t,eu()),Vu(e,t)}},xt=function(){return vt},kt=function(e,t){var r=vt;try{return vt=e,t()}finally{vt=r}},_e=function(e,t,r){switch(t){case"input":if(X(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=Ai(n);if(!i)throw Error(o(90));V(n),X(n,i)}}}break;case"textarea":oe(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},Pe=uu,Oe=lu;var tl={usingClientEntryPoint:!1,Events:[vi,wi,Ai,Se,Ce,uu]},rl={findFiberByHostInstance:bi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},nl={bundleType:rl.bundleType,version:rl.version,rendererPackageName:rl.rendererPackageName,rendererConfig:rl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=We(e))?null:e.stateNode},findFiberByHostInstance:rl.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!il.isDisabled&&il.supportsFiber)try{it=il.inject(nl),ot=il}catch(le){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tl,t.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yu(t))throw Error(o(200));return zu(e,t,null,r)},t.createRoot=function(e,t){if(!Yu(e))throw Error(o(299));var r=!1,n="",i=Gu;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(n=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Fu(e,1,!1,null,0,r,0,n,i),e[pi]=t.current,Zn(8===e.nodeType?e.parentNode:e),new $u(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return null===(e=We(t))?null:e.stateNode},t.flushSync=function(e){return lu(e)},t.hydrate=function(e,t,r){if(!Xu(t))throw Error(o(200));return el(null,e,t,!0,r)},t.hydrateRoot=function(e,t,r){if(!Yu(e))throw Error(o(405));var n=null!=r&&r.hydratedSources||null,i=!1,a="",s=Gu;if(null!=r&&(!0===r.unstable_strictMode&&(i=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError)),t=Hu(t,null,e,1,null!=r?r:null,i,0,a,s),e[pi]=t.current,Zn(e),n)for(e=0;e<n.length;e++)i=(i=(r=n[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new Ju(t)},t.render=function(e,t,r){if(!Xu(t))throw Error(o(200));return el(null,e,t,!1,r)},t.unmountComponentAtNode=function(e){if(!Xu(e))throw Error(o(40));return!!e._reactRootContainer&&(lu((function(){el(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=uu,t.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Xu(r))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return el(e,t,r,!1,n)},t.version="18.2.0-next-9e3b772b8-20220608"},67733:(e,t,r)=>{"use strict";var n=r(37715);t.s=n.createRoot,n.hydrateRoot},37715:(e,t,r)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=r(19787)},65612:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(13980)),i=o(r(50320));function o(e){return e&&e.__esModule?e:{default:e}}var a={d:n.default.string.isRequired,fill:n.default.string.isRequired,transformX:n.default.number.isRequired,transformY:n.default.number.isRequired},s=function(e){var t=e.d,r=e.fill,n=e.transformX,o=e.transformY;return i.default.createElement("path",{d:t,fill:r,transform:"matrix("+[1,0,0,1,n,o]+")"})};s.propTypes=a,s.defaultProps={},t.default=s},36106:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=s(r(13980)),o=r(50320),a=s(o);function s(e){return e&&e.__esModule?e:{default:e}}var c={children:i.default.array.isRequired,size:i.default.number.isRequired,title:i.default.string,xmlns:i.default.string},u=(0,o.forwardRef)((function(e,t){var r=e.children,i=e.size,o=e.title,s=e.xmlns,c=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["children","size","title","xmlns"]);return a.default.createElement("svg",n({},c,{height:i,ref:t,width:i,xmlns:s}),o?a.default.createElement("title",null,o):null,r)}));u.displayName="QRCodeSurface",u.propTypes=c,u.defaultProps={title:void 0,xmlns:"http://www.w3.org/2000/svg"},t.default=u},5341:(e,t,r)=>{"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=f(r(62768)),o=f(r(81432)),a=f(r(13980)),s=r(50320),c=f(s),u=f(r(65612)),l=f(r(36106));function f(e){return e&&e.__esModule?e:{default:e}}var d={bgColor:a.default.oneOfType([a.default.object,a.default.string]),fgColor:a.default.oneOfType([a.default.object,a.default.string]),level:a.default.string,size:a.default.number,value:a.default.string.isRequired},h=(0,s.forwardRef)((function(e,t){var r=e.bgColor,a=e.fgColor,s=e.level,f=e.size,d=e.value,h=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["bgColor","fgColor","level","size","value"]),p=new i.default(-1,o.default[s]);p.addData(d),p.make();var g=p.modules,m=f/g.length;return c.default.createElement(l.default,n({},h,{size:f,ref:t}),g.map((function(e,t){return e.map((function(e,n){var i=Math.round(n*m),o=Math.round(t*m),s=Math.round((n+1)*m)-i,l=Math.round((t+1)*m)-o;return c.default.createElement(u.default,{key:"rectangle-"+t+"-"+n,d:"M 0 0 L "+s+" 0 L "+s+" "+l+" L 0 "+l+" Z",fill:e?a:r,transformX:i,transformY:o})}))})))}));h.displayName="QRCode",h.propTypes=d,h.defaultProps={bgColor:"#FFFFFF",fgColor:"#000000",level:"L",size:256},t.Z=(0,s.memo)(h)},38807:(e,t,r)=>{"use strict";var n=r(50320),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var n,o={},u=null,l=null;for(n in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(l=t.ref),t)a.call(t,n)&&!c.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:u,ref:l,props:o,_owner:s.current}}t.Fragment=o,t.jsx=u,t.jsxs=u},56235:(e,t)=>{"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function y(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||p}function b(){}function v(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var w=v.prototype=new b;w.constructor=v,g(w,y.prototype),w.isPureReactComponent=!0;var A=Array.isArray,_=Object.prototype.hasOwnProperty,E={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,n){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,i)&&!x.hasOwnProperty(i)&&(o[i]=t[i]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var u=Array(c),l=0;l<c;l++)u[l]=arguments[l+2];o.children=u}if(e&&e.defaultProps)for(i in c=e.defaultProps)void 0===o[i]&&(o[i]=c[i]);return{$$typeof:r,type:e,key:a,ref:s,props:o,_owner:E.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var C=/\/+/g;function P(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function O(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var c=!1;if(null===e)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case r:case n:c=!0}}if(c)return a=a(c=e),e=""===o?"."+P(c,0):o,A(a)?(i="",null!=e&&(i=e.replace(C,"$&/")+"/"),O(a,t,i,"",(function(e){return e}))):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||c&&c.key===a.key?"":(""+a.key).replace(C,"$&/")+"/")+e)),t.push(a)),1;if(c=0,o=""===o?".":o+":",A(e))for(var u=0;u<e.length;u++){var l=o+P(s=e[u],u);c+=O(s,t,i,l,a)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),u=0;!(s=e.next()).done;)c+=O(s=s.value,t,i,l=o+P(s,u++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function I(e,t,r){if(null==e)return e;var n=[],i=0;return O(e,n,"","",(function(e){return t.call(r,e,i++)})),n}function B(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var T={current:null},M={transition:null},R={ReactCurrentDispatcher:T,ReactCurrentBatchConfig:M,ReactCurrentOwner:E};t.Children={map:I,forEach:function(e,t,r){I(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return I(e,(function(){t++})),t},toArray:function(e){return I(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=i,t.Profiler=a,t.PureComponent=v,t.StrictMode=o,t.Suspense=l,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=g({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=E.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)_.call(t,u)&&!x.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){c=Array(u);for(var l=0;l<u;l++)c[l]=arguments[l+2];i.children=c}return{$$typeof:r,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:B}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=M.transition;M.transition={};try{e()}finally{M.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return T.current.useCallback(e,t)},t.useContext=function(e){return T.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return T.current.useDeferredValue(e)},t.useEffect=function(e,t){return T.current.useEffect(e,t)},t.useId=function(){return T.current.useId()},t.useImperativeHandle=function(e,t,r){return T.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return T.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return T.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return T.current.useMemo(e,t)},t.useReducer=function(e,t,r){return T.current.useReducer(e,t,r)},t.useRef=function(e){return T.current.useRef(e)},t.useState=function(e){return T.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return T.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return T.current.useTransition()},t.version="18.2.0"},50320:(e,t,r)=>{"use strict";e.exports=r(56235)},21272:(e,t,r)=>{"use strict";e.exports=r(38807)},91353:(e,t)=>{"use strict";function r(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,i=e[n];if(!(0<o(i,t)))break e;e[n]=t,e[r]=i,r=n}}function n(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,i=e.length,a=i>>>1;n<a;){var s=2*(n+1)-1,c=e[s],u=s+1,l=e[u];if(0>o(c,r))u<i&&0>o(l,c)?(e[n]=l,e[u]=r,n=u):(e[n]=c,e[s]=r,n=s);else{if(!(u<i&&0>o(l,r)))break e;e[n]=l,e[u]=r,n=u}}}return t}function o(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}var u=[],l=[],f=1,d=null,h=3,p=!1,g=!1,m=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=n(l);null!==t;){if(null===t.callback)i(l);else{if(!(t.startTime<=e))break;i(l),t.sortIndex=t.expirationTime,r(u,t)}t=n(l)}}function A(e){if(m=!1,w(e),!g)if(null!==n(u))g=!0,M(_);else{var t=n(l);null!==t&&R(A,t.startTime-e)}}function _(e,r){g=!1,m&&(m=!1,b(S),S=-1),p=!0;var o=h;try{for(w(r),d=n(u);null!==d&&(!(d.expirationTime>r)||e&&!O());){var a=d.callback;if("function"==typeof a){d.callback=null,h=d.priorityLevel;var s=a(d.expirationTime<=r);r=t.unstable_now(),"function"==typeof s?d.callback=s:d===n(u)&&i(u),w(r)}else i(u);d=n(u)}if(null!==d)var c=!0;else{var f=n(l);null!==f&&R(A,f.startTime-r),c=!1}return c}finally{d=null,h=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,x=!1,k=null,S=-1,C=5,P=-1;function O(){return!(t.unstable_now()-P<C)}function I(){if(null!==k){var e=t.unstable_now();P=e;var r=!0;try{r=k(!0,e)}finally{r?E():(x=!1,k=null)}}else x=!1}if("function"==typeof v)E=function(){v(I)};else if("undefined"!=typeof MessageChannel){var B=new MessageChannel,T=B.port2;B.port1.onmessage=I,E=function(){T.postMessage(null)}}else E=function(){y(I,0)};function M(e){k=e,x||(x=!0,E())}function R(e,r){S=y((function(){e(t.unstable_now())}),r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||p||(g=!0,M(_))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return n(u)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var r=h;h=t;try{return e()}finally{h=r}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=h;h=e;try{return t()}finally{h=r}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?a+o:a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:f++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,r(l,e),null===n(u)&&e===n(l)&&(m?(b(S),S=-1):m=!0,R(A,o-a))):(e.sortIndex=s,r(u,e),g||p||(g=!0,M(_))),e},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(e){var t=h;return function(){var r=h;h=t;try{return e.apply(this,arguments)}finally{h=r}}}},98315:(e,t,r)=>{"use strict";e.exports=r(91353)},71408:(e,t,r)=>{var n={"./english.json":14179,"./german.json":15171,"./japanese.json":15846,"./korean.json":28842,"./mandarin.json":71351,"./spanish.json":34856};function i(e){return Promise.resolve().then((()=>{if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}var i=n[e];return r.t(i,19)}))}i.keys=()=>Object.keys(n),i.id=71408,e.exports=i},88143:()=>{},31850:()=>{},77378:()=>{},69314:()=>{},58722:()=>{},33196:()=>{},38087:()=>{},74753:()=>{},23558:()=>{},74854:()=>{},66602:()=>{},66396:()=>{},85338:()=>{},85297:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},91461:e=>{function t(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=e.apply(r,n);function s(e){t(a,i,o,s,c,"next",e)}function c(e){t(a,i,o,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},53100:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},98870:e=>{function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},1147:e=>{function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},68230:(e,t,r)=>{var n=r(78560);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},71600:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},60421:(e,t,r)=>{var n=r(67425).default,i=r(85297);e.exports=function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},27609:(e,t,r)=>{var n=r(67425).default;function i(){"use strict";e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,o=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof p?t:p,o=Object.create(i.prototype),a=new S(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=E(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=d(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h={};function p(){}function g(){}function m(){}var y={};l(y,s,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(C([])));v&&v!==r&&o.call(v,s)&&(y=v);var w=m.prototype=p.prototype=Object.create(y);function A(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,a,s,c){var u=d(e[i],e,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,c)}))}c(u.arg)}var i;this._invoke=function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}}function E(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,h;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function C(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(o.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:P}}function P(){return{value:void 0,done:!0}}return g.prototype=m,l(w,"constructor",m),l(m,"constructor",g),g.displayName=l(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,l(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},A(_.prototype),l(_.prototype,c,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new _(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},A(w),l(w,u,"Generator"),l(w,s,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},78560:e=>{function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},67425:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},82841:(e,t,r)=>{var n=r(27609)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},62191:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof i[n[t]]&&(e[e.length]=n[t]);return e}},29765:(e,t,r)=>{"use strict";var n=r(67286)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},80753:(e,t,r)=>{"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:()=>n})},34795:(e,t,r)=>{"use strict";function n(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,c,"next",e)}function c(e){n(a,i,o,s,c,"throw",e)}s(void 0)}))}}r.d(t,{Z:()=>i})},9249:(e,t,r)=>{"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,{Z:()=>n})},87371:(e,t,r)=>{"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}r.d(t,{Z:()=>i})},56666:(e,t,r)=>{"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{Z:()=>n})},93069:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(95058);function i(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=(0,n.Z)(e)););return e}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=i(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},o.apply(this,arguments)}},95058:(e,t,r)=>{"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:()=>n})},88106:(e,t,r)=>{"use strict";function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)}r.d(t,{Z:()=>i})},11987:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(86522),i=r(80753);function o(e,t){if(t&&("object"===(0,n.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}},86522:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r.d(t,{Z:()=>n})},72558:(e,t,r)=>{"use strict";r.d(t,{O:()=>A,Z:()=>_});var n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,o=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",c=1e14,u=14,l=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,h=1e9;function p(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=u-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function m(e,t){var r,n,i=e.c,o=t.c,a=e.s,s=t.s,c=e.e,u=t.e;if(!a||!s)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=c==u,!i||!o)return n?0:!i^r?1:-1;if(!n)return c>u^r?1:-1;for(s=(c=i.length)<(u=o.length)?c:u,a=0;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^r?1:-1;return c==u?0:c>u^r?1:-1}function y(e,t,r,n){if(e<t||e>r||e!==o(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function b(e){var t=e.c.length-1;return p(e.e/u)==t&&e.c[t]%2!=0}function v(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function w(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var A=function e(t){var r,A,_,E,x,k,S,C,P,O,I=q.prototype={constructor:q,toString:null,valueOf:null},B=new q(1),T=20,M=4,R=-7,N=21,j=-1e7,L=1e7,U=!1,D=1,F=0,z={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},Z="0123456789abcdefghijklmnopqrstuvwxyz",H=!0;function q(e,t){var r,i,a,c,f,d,h,p,g=this;if(!(g instanceof q))return new q(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>L?g.c=g.e=null:e.e<j?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,f=e;f>=10;f/=10,c++);return void(c>L?g.c=g.e=null:(g.e=c,g.c=[e]))}p=String(e)}else{if(!n.test(p=String(e)))return _(g,p,d);g.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(c=p.indexOf("."))>-1&&(p=p.replace(".","")),(f=p.search(/e/i))>0?(c<0&&(c=f),c+=+p.slice(f+1),p=p.substring(0,f)):c<0&&(c=p.length)}else{if(y(t,2,Z.length,"Base"),10==t&&H)return G(g=new q(e),T+g.e+1,M);if(p=String(e),d="number"==typeof e){if(0*e!=0)return _(g,p,d,t);if(g.s=1/e<0?(p=p.slice(1),-1):1,q.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else g.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(r=Z.slice(0,t),c=f=0,h=p.length;f<h;f++)if(r.indexOf(i=p.charAt(f))<0){if("."==i){if(f>c){c=h;continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,f=-1,c=0;continue}return _(g,String(e),d,t)}d=!1,(c=(p=A(p,t,10,g.s)).indexOf("."))>-1?p=p.replace(".",""):c=p.length}for(f=0;48===p.charCodeAt(f);f++);for(h=p.length;48===p.charCodeAt(--h););if(p=p.slice(f,++h)){if(h-=f,d&&q.DEBUG&&h>15&&(e>l||e!==o(e)))throw Error(s+g.s*e);if((c=c-f-1)>L)g.c=g.e=null;else if(c<j)g.c=[g.e=0];else{if(g.e=c,g.c=[],f=(c+1)%u,c<0&&(f+=u),f<h){for(f&&g.c.push(+p.slice(0,f)),h-=u;f<h;)g.c.push(+p.slice(f,f+=u));f=u-(p=p.slice(f)).length}else f-=h;for(;f--;p+="0");g.c.push(+p)}}else g.c=[g.e=0]}function W(e,t,r,n){var i,o,a,s,c;if(null==r?r=M:y(r,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)c=g(e.c),c=1==n||2==n&&(a<=R||a>=N)?v(c,a):w(c,a,"0");else if(o=(e=G(new q(e),t,r)).e,s=(c=g(e.c)).length,1==n||2==n&&(t<=o||o<=R)){for(;s<t;c+="0",s++);c=v(c,o)}else if(t-=a,c=w(c,o,"0"),o+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-s)>0)for(o+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function K(e,t){for(var r,n=1,i=new q(e[0]);n<e.length;n++){if(!(r=new q(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function V(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*u-1)>L?e.c=e.e=null:r<j?e.c=[e.e=0]:(e.e=r,e.c=t),e}function G(e,t,r,n){var a,s,l,d,h,p,g,m=e.c,y=f;if(m){e:{for(a=1,d=m[0];d>=10;d/=10,a++);if((s=t-a)<0)s+=u,l=t,g=(h=m[p=0])/y[a-l-1]%10|0;else if((p=i((s+1)/u))>=m.length){if(!n)break e;for(;m.length<=p;m.push(0));h=g=0,a=1,l=(s%=u)-u+1}else{for(h=d=m[p],a=1;d>=10;d/=10,a++);g=(l=(s%=u)-u+a)<0?0:h/y[a-l-1]%10|0}if(n=n||t<0||null!=m[p+1]||(l<0?h:h%y[a-l-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(s>0?l>0?h/y[a-l]:0:m[p-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=y[(u-t%u)%u],e.e=-t||0):m[0]=e.e=0,e;if(0==s?(m.length=p,d=1,p--):(m.length=p+1,d=y[u-s],m[p]=l>0?o(h/y[a-l]%y[l])*d:0),n)for(;;){if(0==p){for(s=1,l=m[0];l>=10;l/=10,s++);for(l=m[0]+=d,d=1;l>=10;l/=10,d++);s!=d&&(e.e++,m[0]==c&&(m[0]=1));break}if(m[p]+=d,m[p]!=c)break;m[p--]=0,d=1}for(s=m.length;0===m[--s];m.pop());}e.e>L?e.c=e.e=null:e.e<j&&(e.c=[e.e=0])}return e}function $(e){var t,r=e.e;return null===r?e.toString():(t=g(e.c),t=r<=R||r>=N?v(t,r):w(t,r,"0"),e.s<0?"-"+t:t)}return q.clone=e,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.EUCLID=9,q.config=q.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(r=e[t],0,h,t),T=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(r=e[t],0,8,t),M=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(y(r[0],-h,0,t),y(r[1],0,h,t),R=r[0],N=r[1]):(y(r,-h,h,t),R=-(N=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)y(r[0],-h,-1,t),y(r[1],1,h,t),j=r[0],L=r[1];else{if(y(r,-h,h,t),!r)throw Error(a+t+" cannot be zero: "+r);j=-(L=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(a+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!r,Error(a+"crypto unavailable");U=r}else U=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(r=e[t],0,9,t),D=r),e.hasOwnProperty(t="POW_PRECISION")&&(y(r=e[t],0,h,t),F=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(a+t+" not an object: "+r);z=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(a+t+" invalid: "+r);H="0123456789"==r.slice(0,10),Z=r}}return{DECIMAL_PLACES:T,ROUNDING_MODE:M,EXPONENTIAL_AT:[R,N],RANGE:[j,L],CRYPTO:U,MODULO_MODE:D,POW_PRECISION:F,FORMAT:z,ALPHABET:Z}},q.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!q.DEBUG)return!0;var t,r,n=e.c,i=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&i>=-h&&i<=h&&i===o(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%u)<1&&(t+=u),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=c||r!==o(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===s||1===s||-1===s))return!0;throw Error(a+"Invalid BigNumber: "+e)},q.maximum=q.max=function(){return K(arguments,I.lt)},q.minimum=q.min=function(){return K(arguments,I.gt)},q.random=(E=9007199254740992,x=Math.random()*E&2097151?function(){return o(Math.random()*E)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,s,c,l=0,d=[],p=new q(B);if(null==e?e=T:y(e,0,h),s=i(e/u),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(s*=2));l<s;)(c=131072*t[l]+(t[l+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[l]=r[0],t[l+1]=r[1]):(d.push(c%1e14),l+=2);l=s/2}else{if(!crypto.randomBytes)throw U=!1,Error(a+"crypto unavailable");for(t=crypto.randomBytes(s*=7);l<s;)(c=281474976710656*(31&t[l])+1099511627776*t[l+1]+4294967296*t[l+2]+16777216*t[l+3]+(t[l+4]<<16)+(t[l+5]<<8)+t[l+6])>=9e15?crypto.randomBytes(7).copy(t,l):(d.push(c%1e14),l+=7);l=s/7}if(!U)for(;l<s;)(c=x())<9e15&&(d[l++]=c%1e14);for(s=d[--l],e%=u,s&&e&&(c=f[u-e],d[l]=o(s/c)*c);0===d[l];d.pop(),l--);if(l<0)d=[n=0];else{for(n=-1;0===d[0];d.splice(0,1),n-=u);for(l=1,c=d[0];c>=10;c/=10,l++);l<u&&(n-=u-l)}return p.e=n,p.c=d,p}),q.sum=function(){for(var e=1,t=arguments,r=new q(t[0]);e<t.length;)r=r.plus(t[e++]);return r},A=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,a=[0],s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>r-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(n,i,o,a,s){var c,u,l,f,d,h,p,m,y=n.indexOf("."),b=T,v=M;for(y>=0&&(f=F,F=0,n=n.replace(".",""),h=(m=new q(i)).pow(n.length-y),F=f,m.c=t(w(g(h.c),h.e,"0"),10,o,e),m.e=m.c.length),l=f=(p=t(n,i,o,s?(c=Z,e):(c=e,Z))).length;0==p[--f];p.pop());if(!p[0])return c.charAt(0);if(y<0?--l:(h.c=p,h.e=l,h.s=a,p=(h=r(h,m,b,v,o)).c,d=h.r,l=h.e),y=p[u=l+b+1],f=o/2,d=d||u<0||null!=p[u+1],d=v<4?(null!=y||d)&&(0==v||v==(h.s<0?3:2)):y>f||y==f&&(4==v||d||6==v&&1&p[u-1]||v==(h.s<0?8:7)),u<1||!p[0])n=d?w(c.charAt(1),-b,c.charAt(0)):c.charAt(0);else{if(p.length=u,d)for(--o;++p[--u]>o;)p[u]=0,u||(++l,p=[1].concat(p));for(f=p.length;!p[--f];);for(y=0,n="";y<=f;n+=c.charAt(p[y++]));n=w(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,a,s=0,c=e.length,u=t%d,l=t/d|0;for(e=e.slice();c--;)s=((i=u*(o=e[c]%d)+(n=l*o+(a=e[c]/d|0)*u)%d*d+s)/r|0)+(n/d|0)+l*a,e[c]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,a,s,l){var f,d,h,g,m,y,b,v,w,A,_,E,x,k,S,C,P,O=n.s==i.s?1:-1,I=n.c,B=i.c;if(!(I&&I[0]&&B&&B[0]))return new q(n.s&&i.s&&(I?!B||I[0]!=B[0]:B)?I&&0==I[0]||!B?0*O:O/0:NaN);for(w=(v=new q(O)).c=[],O=a+(d=n.e-i.e)+1,l||(l=c,d=p(n.e/u)-p(i.e/u),O=O/u|0),h=0;B[h]==(I[h]||0);h++);if(B[h]>(I[h]||0)&&d--,O<0)w.push(1),g=!0;else{for(k=I.length,C=B.length,h=0,O+=2,(m=o(l/(B[0]+1)))>1&&(B=e(B,m,l),I=e(I,m,l),C=B.length,k=I.length),x=C,_=(A=I.slice(0,C)).length;_<C;A[_++]=0);P=B.slice(),P=[0].concat(P),S=B[0],B[1]>=l/2&&S++;do{if(m=0,(f=t(B,A,C,_))<0){if(E=A[0],C!=_&&(E=E*l+(A[1]||0)),(m=o(E/S))>1)for(m>=l&&(m=l-1),b=(y=e(B,m,l)).length,_=A.length;1==t(y,A,b,_);)m--,r(y,C<b?P:B,b,l),b=y.length,f=1;else 0==m&&(f=m=1),b=(y=B.slice()).length;if(b<_&&(y=[0].concat(y)),r(A,y,_,l),_=A.length,-1==f)for(;t(B,A,C,_)<1;)m++,r(A,C<_?P:B,_,l),_=A.length}else 0===f&&(m++,A=[0]);w[h++]=m,A[0]?A[_++]=I[x]||0:(A=[I[x]],_=1)}while((x++<k||null!=A[0])&&O--);g=null!=A[0],w[0]||w.splice(0,1)}if(l==c){for(h=1,O=w[0];O>=10;O/=10,h++);G(v,a+(v.e=h+d*u-1)+1,s,g)}else v.e=d,v.r=+g;return v}}(),k=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,C=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,_=function(e,t,r,n){var i,o=r?t:t.replace(O,"");if(P.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(k,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(S,"$1").replace(C,"0.$1")),t!=o))return new q(o,i);if(q.DEBUG)throw Error(a+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},I.absoluteValue=I.abs=function(){var e=new q(this);return e.s<0&&(e.s=1),e},I.comparedTo=function(e,t){return m(this,new q(e,t))},I.decimalPlaces=I.dp=function(e,t){var r,n,i,o=this;if(null!=e)return y(e,0,h),null==t?t=M:y(t,0,8),G(new q(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-p(this.e/u))*u,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},I.dividedBy=I.div=function(e,t){return r(this,new q(e,t),T,M)},I.dividedToIntegerBy=I.idiv=function(e,t){return r(this,new q(e,t),0,1)},I.exponentiatedBy=I.pow=function(e,t){var r,n,s,c,l,f,d,h,p=this;if((e=new q(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+$(e));if(null!=t&&(t=new q(t)),l=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return h=new q(Math.pow(+$(p),l?2-b(e):+$(e))),t?h.mod(t):h;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new q(NaN);(n=!f&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||l&&p.c[1]>=24e7:p.c[0]<8e13||l&&p.c[0]<=9999975e7)))return c=p.s<0&&b(e)?-0:0,p.e>-1&&(c=1/c),new q(f?1/c:c);F&&(c=i(F/u+2))}for(l?(r=new q(.5),f&&(e.s=1),d=b(e)):d=(s=Math.abs(+$(e)))%2,h=new q(B);;){if(d){if(!(h=h.times(p)).c)break;c?h.c.length>c&&(h.c.length=c):n&&(h=h.mod(t))}if(s){if(0===(s=o(s/2)))break;d=s%2}else if(G(e=e.times(r),e.e+1,1),e.e>14)d=b(e);else{if(0==(s=+$(e)))break;d=s%2}p=p.times(p),c?p.c&&p.c.length>c&&(p.c.length=c):n&&(p=p.mod(t))}return n?h:(f&&(h=B.div(h)),t?h.mod(t):c?G(h,F,M,void 0):h)},I.integerValue=function(e){var t=new q(this);return null==e?e=M:y(e,0,8),G(t,t.e+1,e)},I.isEqualTo=I.eq=function(e,t){return 0===m(this,new q(e,t))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(e,t){return m(this,new q(e,t))>0},I.isGreaterThanOrEqualTo=I.gte=function(e,t){return 1===(t=m(this,new q(e,t)))||0===t},I.isInteger=function(){return!!this.c&&p(this.e/u)>this.c.length-2},I.isLessThan=I.lt=function(e,t){return m(this,new q(e,t))<0},I.isLessThanOrEqualTo=I.lte=function(e,t){return-1===(t=m(this,new q(e,t)))||0===t},I.isNaN=function(){return!this.s},I.isNegative=function(){return this.s<0},I.isPositive=function(){return this.s>0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.minus=function(e,t){var r,n,i,o,a=this,s=a.s;if(t=(e=new q(e,t)).s,!s||!t)return new q(NaN);if(s!=t)return e.s=-t,a.plus(e);var l=a.e/u,f=e.e/u,d=a.c,h=e.c;if(!l||!f){if(!d||!h)return d?(e.s=-t,e):new q(h?a:NaN);if(!d[0]||!h[0])return h[0]?(e.s=-t,e):new q(d[0]?a:3==M?-0:0)}if(l=p(l),f=p(f),d=d.slice(),s=l-f){for((o=s<0)?(s=-s,i=d):(f=l,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(o=(s=d.length)<(t=h.length))?s:t,s=t=0;t<n;t++)if(d[t]!=h[t]){o=d[t]<h[t];break}if(o&&(i=d,d=h,h=i,e.s=-e.s),(t=(n=h.length)-(r=d.length))>0)for(;t--;d[r++]=0);for(t=c-1;n>s;){if(d[--n]<h[n]){for(r=n;r&&!d[--r];d[r]=t);--d[r],d[n]+=c}d[n]-=h[n]}for(;0==d[0];d.splice(0,1),--f);return d[0]?V(e,d,f):(e.s=3==M?-1:1,e.c=[e.e=0],e)},I.modulo=I.mod=function(e,t){var n,i,o=this;return e=new q(e,t),!o.c||!e.s||e.c&&!e.c[0]?new q(NaN):!e.c||o.c&&!o.c[0]?new q(o):(9==D?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,D),(e=o.minus(n.times(e))).c[0]||1!=D||(e.s=o.s),e)},I.multipliedBy=I.times=function(e,t){var r,n,i,o,a,s,l,f,h,g,m,y,b,v,w,A=this,_=A.c,E=(e=new q(e,t)).c;if(!(_&&E&&_[0]&&E[0]))return!A.s||!e.s||_&&!_[0]&&!E||E&&!E[0]&&!_?e.c=e.e=e.s=null:(e.s*=A.s,_&&E?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=p(A.e/u)+p(e.e/u),e.s*=A.s,(l=_.length)<(g=E.length)&&(b=_,_=E,E=b,i=l,l=g,g=i),i=l+g,b=[];i--;b.push(0));for(v=c,w=d,i=g;--i>=0;){for(r=0,m=E[i]%w,y=E[i]/w|0,o=i+(a=l);o>i;)r=((f=m*(f=_[--a]%w)+(s=y*f+(h=_[a]/w|0)*m)%w*w+b[o]+r)/v|0)+(s/w|0)+y*h,b[o--]=f%v;b[o]=r}return r?++n:b.splice(0,1),V(e,b,n)},I.negated=function(){var e=new q(this);return e.s=-e.s||null,e},I.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new q(e,t)).s,!i||!t)return new q(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/u,a=e.e/u,s=n.c,l=e.c;if(!o||!a){if(!s||!l)return new q(i/0);if(!s[0]||!l[0])return l[0]?e:new q(s[0]?n:0*i)}if(o=p(o),a=p(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=l):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=l.length)<0&&(r=l,l=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+l[t]+i)/c|0,s[t]=c===s[t]?0:s[t]%c;return i&&(s=[i].concat(s),++a),V(e,s,a)},I.precision=I.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return y(e,1,h),null==t?t=M:y(t,0,8),G(new q(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*u+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},I.shiftedBy=function(e){return y(e,-9007199254740991,l),this.times("1e"+e)},I.squareRoot=I.sqrt=function(){var e,t,n,i,o,a=this,s=a.c,c=a.s,u=a.e,l=T+4,f=new q("0.5");if(1!==c||!s||!s[0])return new q(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+$(a)))||c==1/0?(((t=g(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=p((u+1)/2)-(u<0||u%2),n=new q(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new q(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(o=n,n=f.times(o.plus(r(a,o,l,1))),g(o.c).slice(0,c)===(t=g(n.c)).slice(0,c)){if(n.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(G(n,n.e+T+2,1),e=!n.times(n).eq(a));break}if(!i&&(G(o,o.e+T+2,0),o.times(o).eq(a))){n=o;break}l+=4,c+=4,i=1}return G(n,n.e+T+1,M,e)},I.toExponential=function(e,t){return null!=e&&(y(e,0,h),e++),W(this,e,t,1)},I.toFixed=function(e,t){return null!=e&&(y(e,0,h),e=e+this.e+1),W(this,e,t)},I.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=z;else if("object"!=typeof r)throw Error(a+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,s=n.split("."),c=+r.groupSize,u=+r.secondaryGroupSize,l=r.groupSeparator||"",f=s[0],d=s[1],h=i.s<0,p=h?f.slice(1):f,g=p.length;if(u&&(o=c,c=u,u=o,g-=o),c>0&&g>0){for(o=g%c||c,f=p.substr(0,o);o<g;o+=c)f+=l+p.substr(o,c);u>0&&(f+=l+p.slice(o)),h&&(f="-"+f)}n=d?f+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):f}return(r.prefix||"")+n+(r.suffix||"")},I.toFraction=function(e){var t,n,i,o,s,c,l,d,h,p,m,y,b=this,v=b.c;if(null!=e&&(!(l=new q(e)).isInteger()&&(l.c||1!==l.s)||l.lt(B)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+$(l));if(!v)return new q(b);for(t=new q(B),h=n=new q(B),i=d=new q(B),y=g(v),s=t.e=y.length-b.e-1,t.c[0]=f[(c=s%u)<0?u+c:c],e=!e||l.comparedTo(t)>0?s>0?t:h:l,c=L,L=1/0,l=new q(y),d.c[0]=0;p=r(l,t,0,1),1!=(o=n.plus(p.times(i))).comparedTo(e);)n=i,i=o,h=d.plus(p.times(o=h)),d=o,t=l.minus(p.times(o=t)),l=o;return o=r(e.minus(n),i,0,1),d=d.plus(o.times(h)),n=n.plus(o.times(i)),d.s=h.s=b.s,m=r(h,i,s*=2,M).minus(b).abs().comparedTo(r(d,n,s,M).minus(b).abs())<1?[h,i]:[d,n],L=c,m},I.toNumber=function(){return+$(this)},I.toPrecision=function(e,t){return null!=e&&y(e,1,h),W(this,e,t,2)},I.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=i<=R||i>=N?v(g(r.c),i):w(g(r.c),i,"0"):10===e&&H?t=w(g((r=G(new q(r),T+i+1,M)).c),r.e,"0"):(y(e,2,Z.length,"Base"),t=A(w(g(r.c),i,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},I.valueOf=I.toJSON=function(){return $(this)},I._isBigNumber=!0,I[Symbol.toStringTag]="BigNumber",I[Symbol.for("nodejs.util.inspect.custom")]=I.valueOf,null!=t&&q.set(t),q}();const _=A},24579:e=>{"use strict";e.exports=JSON.parse('{"name":"goerli","chainId":5,"networkId":5,"defaultHardfork":"merge","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"Cross-client PoA test network","url":"https://github.com/goerli/testnet","genesis":{"timestamp":"0x5c51a607","gasLimit":10485760,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"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"},{"//_comment":"The forkHash will remain same as mergeForkIdTransition is post merge","name":"merge","ttd":"10790000","block":null,"forkHash":"0xb8c6299d"},{"name":"mergeForkIdTransition","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":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"]}')},73192:e=>{"use strict";e.exports=JSON.parse('{"name":"mainnet","chainId":1,"networkId":1,"defaultHardfork":"merge","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"The Ethereum main chain","url":"https://ethstats.net/","genesis":{"gasLimit":5000,"difficulty":17179869184,"nonce":"0x0000000000000042","extraData":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"},"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":"arrowGlacier","block":13773000,"forkHash":"0x20c327fc"},{"name":"grayGlacier","block":15050000,"forkHash":"0xf0afd0e3"},{"name":"mergeForkIdTransition","block":null,"forkHash":null},{"name":"merge","ttd":"58750000000000000000000","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":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"]}')},14002:e=>{"use strict";e.exports=JSON.parse('{"name":"rinkeby","chainId":4,"networkId":4,"defaultHardfork":"london","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"PoA test network","url":"https://www.rinkeby.io","genesis":{"timestamp":"0x58ee40ba","gasLimit":4700000,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"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,"forkHash":null},{"name":"shanghai","block":null,"forkHash":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"]}')},27623:e=>{"use strict";e.exports=JSON.parse('{"name":"ropsten","chainId":3,"networkId":3,"defaultHardfork":"merge","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"PoW test network","url":"https://github.com/ethereum/ropsten","genesis":{"gasLimit":16777216,"difficulty":1048576,"nonce":"0x0000000000000042","extraData":"0x3535353535353535353535353535353535353535353535353535353535353535"},"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"},{"//_comment":"The forkHash will remain same as mergeForkIdTransition is post merge","name":"merge","ttd":"50000000000000000","block":null,"forkHash":"0x7119b6b3"},{"name":"mergeForkIdTransition","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":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"]}')},86369:e=>{"use strict";e.exports=JSON.parse('{"name":"sepolia","chainId":11155111,"networkId":11155111,"defaultHardfork":"merge","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"PoW test network to replace Ropsten","url":"https://github.com/ethereum/go-ethereum/pull/23730","genesis":{"timestamp":"0x6159af19","gasLimit":30000000,"difficulty":131072,"nonce":"0x0000000000000000","extraData":"0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xfe3366e7"},{"name":"homestead","block":0,"forkHash":"0xfe3366e7"},{"name":"tangerineWhistle","block":0,"forkHash":"0xfe3366e7"},{"name":"spuriousDragon","block":0,"forkHash":"0xfe3366e7"},{"name":"byzantium","block":0,"forkHash":"0xfe3366e7"},{"name":"constantinople","block":0,"forkHash":"0xfe3366e7"},{"name":"petersburg","block":0,"forkHash":"0xfe3366e7"},{"name":"istanbul","block":0,"forkHash":"0xfe3366e7"},{"name":"muirGlacier","block":0,"forkHash":"0xfe3366e7"},{"name":"berlin","block":0,"forkHash":"0xfe3366e7"},{"name":"london","block":0,"forkHash":"0xfe3366e7"},{"//_comment":"The forkHash will remain same as mergeForkIdTransition is post merge","name":"merge","ttd":"17000000000000000","block":null,"forkHash":"0xfe3366e7"},{"name":"mergeForkIdTransition","block":1735371,"forkHash":"0xb96cbd13"},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"18.168.182.86","port":30303,"id":"9246d00bc8fd1742e5ad2428b80fc4dc45d786283e05ef6edbd9002cbc335d40998444732fbe921cb88e1d2c73d1b1de53bae6a2237996e9bfe14f871baf7066","location":"","comment":"geth"},{"ip":"52.14.151.177","port":30303,"id":"ec66ddcf1a974950bd4c782789a7e04f8aa7110a72569b6e65fcd51e937e74eed303b1ea734e4d19cfaec9fbff9b6ee65bf31dcb50ba79acce9dd63a6aca61c7","location":"","comment":"besu"},{"ip":"165.22.196.173","port":30303,"id":"ce970ad2e9daa9e14593de84a8b49da3d54ccfdf83cbc4fe519cb8b36b5918ed4eab087dedd4a62479b8d50756b492d5f762367c8d20329a7854ec01547568a6","location":"","comment":"EF"},{"ip":"65.108.95.67","port":30303,"id":"075503b13ed736244896efcde2a992ec0b451357d46cb7a8132c0384721742597fc8f0d91bbb40bb52e7d6e66728d36a1fda09176294e4a30cfac55dcce26bc6","location":"","comment":"lodestar"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net"]}')},59765:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-1153","number":1153,"comment":"Transient Storage","url":"https://eips.ethereum.org/EIPS/eip-1153","status":"Review","minimumHardfork":"chainstart","requiredEIPs":[],"gasConfig":{},"gasPrices":{"tstore":{"v":100,"d":"Base fee of the TSTORE opcode"},"tload":{"v":100,"d":"Base fee of the TLOAD opcode"}},"vm":{},"pow":{}}')},59659:e=>{"use strict";e.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":"Final","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":{}}')},609:e=>{"use strict";e.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":{}}')},34335:e=>{"use strict";e.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":{}}')},40354:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2565","number":2565,"comment":"ModExp gas cost","url":"https://eips.ethereum.org/EIPS/eip-2565","status":"Final","minimumHardfork":"byzantium","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":3,"d":"Gquaddivisor from modexp precompile for gas calculation"}},"vm":{},"pow":{}}')},43928:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2718","comment":"Typed Transaction Envelope","url":"https://eips.ethereum.org/EIPS/eip-2718","status":"Final","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},10810:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2929","comment":"Gas cost increases for state access opcodes","url":"https://eips.ethereum.org/EIPS/eip-2929","status":"Final","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":{}}')},33501:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2930","comment":"Optional access lists","url":"https://eips.ethereum.org/EIPS/eip-2930","status":"Final","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":{}}')},96973:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3074","number":3074,"comment":"AUTH and AUTHCALL opcodes","url":"https://eips.ethereum.org/EIPS/eip-3074","status":"Review","minimumHardfork":"london","gasConfig":{},"gasPrices":{"auth":{"v":3100,"d":"Gas cost of the AUTH opcode"},"authcall":{"v":0,"d":"Gas cost of the AUTHCALL opcode"},"authcallValueTransfer":{"v":6700,"d":"Paid for CALL when the value transfer is non-zero"}},"vm":{},"pow":{}}')},24984:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3198","number":3198,"comment":"BASEFEE opcode","url":"https://eips.ethereum.org/EIPS/eip-3198","status":"Final","minimumHardfork":"london","gasConfig":{},"gasPrices":{"basefee":{"v":2,"d":"Gas cost of the BASEFEE opcode"}},"vm":{},"pow":{}}')},3573:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3529","comment":"Reduction in refunds","url":"https://eips.ethereum.org/EIPS/eip-3529","status":"Final","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":{}}')},36685:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3540","number":3540,"comment":"EVM Object Format (EOF) v1","url":"https://eips.ethereum.org/EIPS/eip-3540","status":"Review","minimumHardfork":"london","requiredEIPs":[3541],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},96309:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3541","comment":"Reject new contracts starting with the 0xEF byte","url":"https://eips.ethereum.org/EIPS/eip-3541","status":"Final","minimumHardfork":"berlin","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},93609:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3554","comment":"Reduction in refunds","url":"Difficulty Bomb Delay to December 1st 2021","status":"Final","minimumHardfork":"muirGlacier","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9500000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},4204:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3607","number":3607,"comment":"Reject transactions from senders with deployed code","url":"https://eips.ethereum.org/EIPS/eip-3607","status":"Final","minimumHardfork":"chainstart","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},69727:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3651","number":3198,"comment":"Warm COINBASE","url":"https://eips.ethereum.org/EIPS/eip-3651","status":"Review","minimumHardfork":"london","requiredEIPs":[2929],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},18038:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3670","number":3670,"comment":"EOF - Code Validation","url":"https://eips.ethereum.org/EIPS/eip-3670","status":"Review","minimumHardfork":"london","requiredEIPs":[3540],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},33021:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3675","number":3675,"comment":"Upgrade consensus to Proof-of-Stake","url":"https://eips.ethereum.org/EIPS/eip-3675","status":"Review","minimumHardfork":"london","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},94222:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3855","number":3855,"comment":"PUSH0 instruction","url":"https://eips.ethereum.org/EIPS/eip-3855","status":"Review","minimumHardfork":"chainstart","requiredEIPs":[],"gasConfig":{},"gasPrices":{"push0":{"v":2,"d":"Base fee of the PUSH0 opcode"}},"vm":{},"pow":{}}')},54359:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3860","number":3860,"comment":"Limit and meter initcode","url":"https://eips.ethereum.org/EIPS/eip-3860","status":"Review","minimumHardfork":"spuriousDragon","requiredEIPs":[],"gasConfig":{},"gasPrices":{"initCodeWordCost":{"v":2,"d":"Gas to pay for each word (32 bytes) of initcode when creating a contract"}},"vm":{"maxInitCodeSize":{"v":49152,"d":"Maximum length of initialization code when creating a contract"}},"pow":{}}')},58444:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-4345","number":4345,"comment":"Difficulty Bomb Delay to June 2022","url":"https://eips.ethereum.org/EIPS/eip-4345","status":"Final","minimumHardfork":"london","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":10700000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},46401:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-4399","number":4399,"comment":"Supplant DIFFICULTY opcode with PREVRANDAO","url":"https://eips.ethereum.org/EIPS/eip-4399","status":"Review","minimumHardfork":"london","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},29694:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-5133","number":5133,"comment":"Delaying Difficulty Bomb to mid-September 2022","url":"https://eips.ethereum.org/EIPS/eip-5133","status":"Draft","minimumHardfork":"grayGlacier","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":11400000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},98874:e=>{"use strict";e.exports=JSON.parse('{"name":"arrowGlacier","comment":"HF to delay the difficulty bomb","url":"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md","status":"Final","eips":[4345],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},45515:e=>{"use strict";e.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":"Final","eips":[2565,2929,2718,2930]}')},21773:e=>{"use strict";e.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"}}}')},80021:e=>{"use strict";e.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"}}}')},29517:e=>{"use strict";e.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"}}}')},75774:e=>{"use strict";e.exports=JSON.parse('{"name":"dao","comment":"DAO rescue hardfork","url":"https://eips.ethereum.org/EIPS/eip-779","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},13292:e=>{"use strict";e.exports=JSON.parse('{"name":"grayGlacier","comment":"Delaying the difficulty bomb to Mid September 2022","url":"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md","status":"Draft","eips":[5133],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},72001:e=>{"use strict";e.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":{}}')},23316:e=>{"use strict";e.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":"Final","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":{}}')},46497:e=>{"use strict";e.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":"Final","eips":[1559,3198,3529,3541]}')},69024:e=>{"use strict";e.exports=JSON.parse('{"name":"merge","comment":"Hardfork to upgrade the consensus mechanism to Proof-of-Stake","url":"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md","status":"Draft","consensus":{"type":"pos","algorithm":"casper","casper":{}},"eips":[3675,4399]}')},76552:e=>{"use strict";e.exports=JSON.parse('{"name":"mergeForkIdTransition","comment":"Pre-merge hardfork to fork off non-upgraded clients","url":"https://eips.ethereum.org/EIPS/eip-3675","status":"Draft","eips":[]}')},68288:e=>{"use strict";e.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"}}}')},76694:e=>{"use strict";e.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":"Final","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":{}}')},23317:e=>{"use strict";e.exports=JSON.parse('{"name":"shanghai","comment":"Next feature hardfork after the merge hardfork","url":"https://github.com/ethereum/pm/issues/356","status":"Pre-Draft","eips":[]}')},40610:e=>{"use strict";e.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":{}}')},70116:e=>{"use strict";e.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":{}}')},57089:e=>{"use strict";e.exports=JSON.parse('{"name":"@toruslabs/solana-embed","version":"0.3.0","description":"Embed script for solana blockchain","main":"dist/solanaEmbed.cjs.js","module":"dist/solanaEmbed.esm.js","unpkg":"dist/solanaEmbed.umd.min.js","jsdelivr":"dist/solanaEmbed.umd.min.js","types":"dist/types/index.d.ts","files":["dist","src"],"scripts":{"start":"torus-scripts start","build":"torus-scripts build","build:test":"cross-env NODE_ENV=testing torus-scripts build","release":"torus-scripts release","prepack":"npm run build","lint:ts":"eslint --fix \'src/**/*.ts\'","prepare":"husky install"},"repository":{"type":"git","url":"git+https://github.com/torusresearch/solana-embed.git"},"dependencies":{"@solana/web3.js":"^1.36.0","@toruslabs/base-controllers":"^2.2.3","@toruslabs/http-helpers":"^3.0.0","@toruslabs/openlogin-jrpc":"^2.0.0","eth-rpc-errors":"^4.0.3","fast-deep-equal":"^3.1.3","is-stream":"^2.0.1","lodash-es":"^4.17.21","loglevel":"^1.8.0","pump":"^3.0.0"},"peerDependencies":{"@babel/runtime":"7.x"},"devDependencies":{"@babel/register":"^7.17.7","@babel/runtime":"^7.18.9","@commitlint/cli":"^16.2.4","@commitlint/config-conventional":"^16.2.4","@commitlint/is-ignored":"^16.2.4","@toruslabs/eslint-config-typescript":"^1.0.6","@toruslabs/torus-scripts":"^1.0.9","@types/bs58":"^4.0.1","@types/node":"^17.0.45","@types/once":"^1.4.0","@types/pump":"^1.1.1","@types/readable-stream":"^2.3.14","@typescript-eslint/eslint-plugin":"^5.25.0","@typescript-eslint/parser":"^5.25.0","cross-env":"^7.0.3","eslint":"^8.15.0","eslint-plugin-import":"^2.26.0","eslint-plugin-mocha":"^10.0.5","eslint-plugin-n":"^15.2.4","eslint-plugin-prettier":"^4.0.0","eslint-plugin-promise":"^6.0.0","eslint-plugin-simple-import-sort":"^7.0.0","eslint-plugin-tsdoc":"^0.2.16","husky":"^8.0.1","lint-staged":"^12.4.3","mocha":"^10.0.0","prettier":"^2.6.2","puppeteer":"^14.1.2","rimraf":"^3.0.2","ts-node":"^10.7.0","typescript":"^4.6.4"},"mocha":{"timeout":0},"keywords":["torus","wallet","Solana","embed","login","OAuth","crypto"],"author":"Torus Labs","license":"ISC","bugs":{"url":"https://github.com/torusresearch/solana-embed/issues"},"homepage":"https://github.com/torusresearch/solana-embed#readme","lint-staged":{"!(*d).{js,ts}":["eslint --cache --fix","prettier --write"],"*.{json, md}":["prettier --write"]},"engines":{"node":">=14.17.0","npm":">=6.x"}}')},49234:e=>{"use strict";e.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"}}')},40026:e=>{"use strict";e.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"}}')},39167:e=>{"use strict";e.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"}')},23418:e=>{"use strict";e.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"}}')},40763:e=>{"use strict";e.exports={i8:"6.5.4"}},68675:e=>{"use strict";e.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"}')},14179:e=>{"use strict";e.exports=JSON.parse('{"modal":{"adapter-loader":{"message":"Verify on your {{adapter}} account to continue"},"external":{"title":"External wallet","walletconnect-subtitle":"Scan QR code with a WalletConnect-compatible wallet","walletconnect-connect":"Connect","connect":"Connect with Wallet","back":"Back"},"footer":{"message":"Self-custodial login by","terms":"Terms of use","policy":"Privacy policy"},"network":{"switch-request":"This site is requesting to switch Network","to":"To","cancel":"Cancel","proceed":"Proceed","add-request":"This site is requesting to add Network","from":"From"},"social":{"email":"Email","view-more":"View more options","email-continue":"Continue with Email","continue":"Continue with","view-less":"View less options"},"header-subtitle":"Select one of the following to continue","header-title":"Sign in"}}')},15171:e=>{"use strict";e.exports=JSON.parse('{"modal":{"adapter-loader":{"message":"Bestätigen Sie Ihr {{adapter}}-Konto, um fortzufahren"},"external":{"title":"Externe Geldbörse","walletconnect-subtitle":"QR-Code mit einem WalletConnect-kompatiblen Wallet scannen","walletconnect-connect":"Verbinden","connect":"Verbinden Sie sich mit Wallet","back":"Der Rücken"},"footer":{"message":"Selbstverwahrungs-Login durch","terms":"Nutzungsbedingungen","policy":"Datenschutz-Bestimmungen"},"network":{"switch-request":"Diese Website fordert einen Netzwerkwechsel an","to":"Zu","cancel":"Absagen","proceed":"Fortfahren","add-request":"Diese Website fordert das Hinzufügen eines Netzwerks an","from":"Aus"},"social":{"email":"Email","view-more":"Weitere Optionen anzeigen","email-continue":"Fahren Sie mit E-Mail fort","continue":"Weitermachen mit","view-less":"Weniger Optionen anzeigen"},"header-subtitle":"Wählen Sie eine der folgenden Optionen aus, um fortzufahren","header-title":"Einloggen"}}')},15846:e=>{"use strict";e.exports=JSON.parse('{"modal":{"adapter-loader":{"message":"続行するには、{{adapter}} アカウントで確認してください"},"external":{"title":"外部ウォレット","walletconnect-subtitle":"WalletConnect対応ウォレットでQRコードをスキャン","walletconnect-connect":"接続","connect":"ウォレットと接続","back":"戻る"},"footer":{"message":"による自己管理ログイン","terms":"利用規約","policy":"プライバシーポリシー"},"network":{"switch-request":"このサイトはネットワークの切り替えを要求しています","to":"に","cancel":"キャンセル","proceed":"続行","add-request":"このサイトはネットワークの追加をリクエストしています","from":"から"},"social":{"email":"Eメール","view-more":"その他のオプションを表示","email-continue":"メールで続行","continue":"続ける","view-less":"オプションを少なく表示"},"header-subtitle":"次のいずれかを選択して続行します","header-title":"ログイン"}}')},28842:e=>{"use strict";e.exports=JSON.parse('{"modal":{"adapter-loader":{"message":"계속하려면 {{adapter}} 계정에서 인증하세요."},"external":{"title":"외부 지갑","walletconnect-subtitle":"WalletConnect 호환 지갑으로 QR 코드 스캔","walletconnect-connect":"연결하다","connect":"지갑과 연결","back":"뒤"},"footer":{"message":"자가 관리 로그인","terms":"이용약관","policy":"개인 정보 정책"},"network":{"switch-request":"이 사이트는 네트워크 전환을 요청하고 있습니다","to":"에게","cancel":"취소","proceed":"진행하다","add-request":"이 사이트는 네트워크 추가를 요청하고 있습니다","from":"에서"},"social":{"email":"이메일","view-more":"더 많은 옵션 보기","email-continue":"이메일로 계속","continue":"계속","view-less":"더 적은 옵션 보기"},"header-subtitle":"계속하려면 다음 중 하나를 선택하세요.","header-title":"로그인"}}')},71351:e=>{"use strict";e.exports=JSON.parse('{"modal":{"adapter-loader":{"message":"验证您的 {{adapter}} 帐户以继续"},"external":{"title":"外部钱包","walletconnect-subtitle":"使用兼容 WalletConnect 的钱包扫描 QR 码","walletconnect-connect":"连接","connect":"连接钱包","back":"后退"},"footer":{"message":"自托管登录由","terms":"使用条款","policy":"隐私政策"},"network":{"switch-request":"此站点正在请求切换网络","to":"至","cancel":"取消","proceed":"继续","add-request":"此站点正在请求添加网络","from":"从"},"social":{"email":"电子邮件","view-more":"查看更多选项","email-continue":"继续使用电子邮件","continue":"继续","view-less":"查看更少的选项"},"header-subtitle":"选择以下一项以继续","header-title":"登入"}}')},34856:e=>{"use strict";e.exports=JSON.parse('{"modal":{"adapter-loader":{"message":"Verifica tu cuenta de {{adapter}} para continuar"},"external":{"title":"Monedero externo","walletconnect-subtitle":"Escanea el código QR con una billetera compatible con WalletConnect","walletconnect-connect":"Conectar","connect":"Conectar con Monedero","back":"atrás"},"footer":{"message":"Inicio de sesión con autocustodia por","terms":"Términos de Uso","policy":"Política de privacidad"},"network":{"switch-request":"Este sitio está solicitando cambiar de red","to":"A","cancel":"Cancelar","proceed":"Proceder","add-request":"Este sitio está solicitando agregar Red","from":"De"},"social":{"email":"Correo electrónico","view-more":"Ver más opciones","email-continue":"Continuar con correo electrónico","continue":"Continua con","view-less":"Ver menos opciones"},"header-subtitle":"Seleccione uno de los siguientes para continuar","header-title":"Iniciar sesión"}}')}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.amdO={},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var o=Object.create(null);i.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,i.d(o,a),o},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.e=()=>Promise.resolve(),i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.nc=void 0;var o={};return(()=>{"use strict";i.r(o),i.d(o,{Web3Auth:()=>n.$,defaultEvmDappModalConfig:()=>e.OW,defaultEvmWalletModalConfig:()=>e.ql,defaultOtherModalConfig:()=>e.ue,defaultSolanaDappModalConfig:()=>e.Jx,defaultSolanaWalletModalConfig:()=>e.K8});var e=i(89591),t=i(1510),r={};for(const e in t)["default","defaultEvmDappModalConfig","defaultEvmWalletModalConfig","defaultOtherModalConfig","defaultSolanaDappModalConfig","defaultSolanaWalletModalConfig"].indexOf(e)<0&&(r[e]=()=>t[e]);i.d(o,r);var n=i(37491)})(),o})()));
|
|
3
|
+
//# sourceMappingURL=modal.umd.min.js.map
|