From 281ba5e8cc5cb48141241f2b14f5a11e2867a928 Mon Sep 17 00:00:00 2001 From: sshmatrix <19473027+sshmatrix@users.noreply.github.com> Date: Thu, 14 Sep 2023 17:12:11 +0530 Subject: [PATCH] WebWorker for RSAGEN() (#30) * RainbowKit placement fix * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * RainbowKit styling * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Fix for Wagmi2.0 and RainbowKit1.0 migration * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Fix for Wagmi2.0 and RainbowKit1.0 migration: 2 * auto-commit: gh-pages * auto-commit: gh-pages * Fix for Wagmi2.0 and RainbowKit1.0 migration: 3 * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * rSync * auto-commit: gh-pages * Mainnet Ready * auto-commit: gh-pages * Refresh buttons * auto-commit: gh-pages * auto-commit: gh-pages * Search function * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Testing Goerli-v7 * HTTP Gateway Integration * auto-commit: gh-pages * HTTP Gateway Integration: 2 * auto-commit: gh-pages * auto-commit: gh-pages * Finetune * Confirmation tab for Ownerhash * auto-commit: gh-pages * Caching while setting Ownerhash * auto-commit: gh-pages * Some triggers fixed * auto-commit: gh-pages * Signer Signature * auto-commit: gh-pages * Export Signatures * Fix for queue * Finetune: 2 * auto-commit: gh-pages * auto-commit: gh-pages * Finetune: 3 * auto-commit: gh-pages * Update Signature text for SIG1 * auto-commit: gh-pages * Password Dialogue improvements * auto-commit: gh-pages * Bad Password Break * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Several bug fixes * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Preview Panel Load Fix * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * rSync * fast * Merge rSync * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Mainnet Release: v1.0.0 * PWA and other improvements * Support for NFT avatars (#17) * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * NFT Avatar Support * Emoji Support (#18) * Support for NFT avatars * Emoji Support * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Client Help Page * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Cleanup keygen.ts * auto-commit: gh-pages * Minor Fixes in Search Tab * auto-commit: gh-pages * Minor Fixes in Search Tab: 2 * auto-commit: gh-pages * rSync * Labels on Export Fields & GoDID Link * auto-commit: gh-pages * IPFS Hash Export * auto-commit: gh-pages * IPFS Hash Export: 2 * IPFS Hash Export: 3 * auto-commit: gh-pages * Fix for names with Config * auto-commit: gh-pages * Fix Manager vs Owner issue * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Contenthash Regex Fix * Minor Fixes * auto-commit: gh-pages * rSync * Minor Makeup * Security Fixes * auto-commit: gh-pages * Stealth Payment (#24) * WIP * Stealth Payments * auto-commit: gh-pages * auto-commit: gh-pages * Stealth Payments: 2 * Stealth Payments: 3 * auto-commit: gh-pages * Stealth Payments: Finetune * Stealth Payments: Finetune 2 * WIP: Gateway * WIP: Gateway as Ownerhash * auto-commit: gh-pages * WIP: RSA * Stealth Payments & Gateways * Stealth Payments & Gateways: 2 * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Socials and Addresses * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Socials and Addresses: 2 * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Several Fixes * non-BTC coinTypes * non-BTC coinTypes: 2 * auto-commit: gh-pages * auto-commit: gh-pages * Block non-BTC coinTypes * auto-commit: gh-pages * auto-commit: gh-pages * Minor Fixes * v1.1-beta * auto-commit: gh-pages * rSync 'dev' (#29) * v1.1-beta (#27) * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * RainbowKit placement fix * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * RainbowKit styling * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Fix for Wagmi2.0 and RainbowKit1.0 migration * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Fix for Wagmi2.0 and RainbowKit1.0 migration: 2 * auto-commit: gh-pages * auto-commit: gh-pages * Fix for Wagmi2.0 and RainbowKit1.0 migration: 3 * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * rSync * auto-commit: gh-pages * Mainnet Ready * auto-commit: gh-pages * Refresh buttons * auto-commit: gh-pages * auto-commit: gh-pages * Search function * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Testing Goerli-v7 * HTTP Gateway Integration * auto-commit: gh-pages * HTTP Gateway Integration: 2 * auto-commit: gh-pages * auto-commit: gh-pages * Finetune * Confirmation tab for Ownerhash * auto-commit: gh-pages * Caching while setting Ownerhash * auto-commit: gh-pages * Some triggers fixed * auto-commit: gh-pages * Signer Signature * auto-commit: gh-pages * Export Signatures * Fix for queue * Finetune: 2 * auto-commit: gh-pages * auto-commit: gh-pages * Finetune: 3 * auto-commit: gh-pages * Update Signature text for SIG1 * auto-commit: gh-pages * Password Dialogue improvements * auto-commit: gh-pages * Bad Password Break * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Several bug fixes * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Preview Panel Load Fix * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * rSync * fast * Merge rSync * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Mainnet Release: v1.0.0 * PWA and other improvements * Support for NFT avatars (#17) * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * NFT Avatar Support * Emoji Support (#18) * Support for NFT avatars * Emoji Support * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Client Help Page * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Cleanup keygen.ts * auto-commit: gh-pages * Minor Fixes in Search Tab * auto-commit: gh-pages * Minor Fixes in Search Tab: 2 * auto-commit: gh-pages * rSync * Labels on Export Fields & GoDID Link * auto-commit: gh-pages * IPFS Hash Export * auto-commit: gh-pages * IPFS Hash Export: 2 * IPFS Hash Export: 3 * auto-commit: gh-pages * Fix for names with Config * auto-commit: gh-pages * Fix Manager vs Owner issue * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Contenthash Regex Fix * Minor Fixes * auto-commit: gh-pages * rSync * Minor Makeup * Security Fixes * auto-commit: gh-pages * Stealth Payment (#24) * WIP * Stealth Payments * auto-commit: gh-pages * auto-commit: gh-pages * Stealth Payments: 2 * Stealth Payments: 3 * auto-commit: gh-pages * Stealth Payments: Finetune * Stealth Payments: Finetune 2 * WIP: Gateway * WIP: Gateway as Ownerhash * auto-commit: gh-pages * WIP: RSA * Stealth Payments & Gateways * Stealth Payments & Gateways: 2 * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Socials and Addresses * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Socials and Addresses: 2 * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * Several Fixes * non-BTC coinTypes * non-BTC coinTypes: 2 * auto-commit: gh-pages * auto-commit: gh-pages * Block non-BTC coinTypes * auto-commit: gh-pages * auto-commit: gh-pages * Minor Fixes * v1.1-beta * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * v1.1-beta: 2 * auto-commit: gh-pages * auto-commit: gh-pages * Final v1.1-beta release * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * auto-commit: gh-pages * WebWorker for RSAGEN() * rSync --- components/Error.tsx | 1 - components/Gas.tsx | 1 - components/Preview.tsx | 4 +- components/Salt.tsx | 1 - components/Stealth.tsx | 120 ++++++++++++++---- components/Success.tsx | 3 +- out/.nojekyll | 0 out/404.html | 4 +- out/404.html.html | 4 +- .../7B-6x4C0oL8E4_p07T6FF/_buildManifest.js | 1 - .../static/chunks/1469-2f1e551b079174d0.js | 1 + .../static/chunks/1469-3f9839cb080aea51.js | 1 - .../static/chunks/2174.f6baa39611ece47e.js | 1 + ...729b5b05cf.js => 5246-750e02a737a02c02.js} | 2 +- .../static/chunks/556.bab5f5b7ff8ff120.js | 1 + .../static/chunks/5660.294b57e99702d064.js | 1 + .../static/chunks/6724-b954bf9a27972ff7.js | 1 + .../static/chunks/main-235b4afd80b524a5.js | 2 +- ...779e80c94b.js => _app-ae9b86c99babcf6d.js} | 2 +- ...85e98e0.js => account-ae3559ecb1f387d6.js} | 2 +- ...f8ed1ec2b.js => index-547ce76aec519803.js} | 2 +- .../static/chunks/webpack-48b731e940c7534a.js | 1 - .../static/chunks/webpack-8ca24e60d412662e.js | 1 + out/_next/static/css/3458e6a5de51a375.css | 2 +- .../oKEdDSaokOxbKjibcSZIi/_buildManifest.js | 1 + .../_middlewareManifest.js | 0 .../_ssgManifest.js | 0 out/account.html | 4 +- out/fallback.html | 2 +- out/index.html | 4 +- out/sw.js | 2 +- package.json | 4 +- public/sw.js | 2 +- run_ids.txt | 25 ---- src/worker/worker.ts | 18 +++ tsconfig.json | 2 +- typings/worker.ts | 6 + utils/constants.ts | 41 ++++-- 38 files changed, 180 insertions(+), 90 deletions(-) delete mode 100644 out/.nojekyll delete mode 100644 out/_next/static/7B-6x4C0oL8E4_p07T6FF/_buildManifest.js create mode 100644 out/_next/static/chunks/1469-2f1e551b079174d0.js delete mode 100644 out/_next/static/chunks/1469-3f9839cb080aea51.js create mode 100644 out/_next/static/chunks/2174.f6baa39611ece47e.js rename out/_next/static/chunks/{3482-541ec2729b5b05cf.js => 5246-750e02a737a02c02.js} (88%) create mode 100644 out/_next/static/chunks/556.bab5f5b7ff8ff120.js create mode 100644 out/_next/static/chunks/5660.294b57e99702d064.js create mode 100644 out/_next/static/chunks/6724-b954bf9a27972ff7.js rename out/_next/static/chunks/pages/{_app-1f4b9b779e80c94b.js => _app-ae9b86c99babcf6d.js} (81%) rename out/_next/static/chunks/pages/{account-e36a6a73785e98e0.js => account-ae3559ecb1f387d6.js} (57%) rename out/_next/static/chunks/pages/{index-6b71d8ff8ed1ec2b.js => index-547ce76aec519803.js} (63%) delete mode 100644 out/_next/static/chunks/webpack-48b731e940c7534a.js create mode 100644 out/_next/static/chunks/webpack-8ca24e60d412662e.js create mode 100644 out/_next/static/oKEdDSaokOxbKjibcSZIi/_buildManifest.js rename out/_next/static/{7B-6x4C0oL8E4_p07T6FF => oKEdDSaokOxbKjibcSZIi}/_middlewareManifest.js (100%) rename out/_next/static/{7B-6x4C0oL8E4_p07T6FF => oKEdDSaokOxbKjibcSZIi}/_ssgManifest.js (100%) delete mode 100644 run_ids.txt create mode 100644 src/worker/worker.ts create mode 100644 typings/worker.ts diff --git a/components/Error.tsx b/components/Error.tsx index e6529963..2333726f 100644 --- a/components/Error.tsx +++ b/components/Error.tsx @@ -78,7 +78,6 @@ const StyledModalHeader = styled.div` const StyledModal = styled.div` position: fixed; - top: 300px; background: red; width: 400px; height: auto; diff --git a/components/Gas.tsx b/components/Gas.tsx index fcbf31a7..316b9a64 100644 --- a/components/Gas.tsx +++ b/components/Gas.tsx @@ -169,7 +169,6 @@ const StyledModalHeader = styled.div` const StyledModal = styled.div` position: fixed; - top: 250px; background: rgba(66,46,40,1); background-size: 400% 400%; width: auto; diff --git a/components/Preview.tsx b/components/Preview.tsx index 44630bcc..e4a29cb1 100644 --- a/components/Preview.tsx +++ b/components/Preview.tsx @@ -3447,7 +3447,7 @@ const StyledModalHeader = styled.div` const StyledModal = styled.div` position: fixed; - top: 60px; + top: 60px; width: auto; min-width: 400px; border-radius: 6px; @@ -3460,7 +3460,7 @@ const StyledModal = styled.div` const StyledModalOverlay = styled.div` position: absolute; - top: -60px; + top: 0; left: 0; width: 100%; height: 100%; diff --git a/components/Salt.tsx b/components/Salt.tsx index 153d1167..7d0ff449 100644 --- a/components/Salt.tsx +++ b/components/Salt.tsx @@ -302,7 +302,6 @@ const StyledModalHeader = styled.div` const StyledModal = styled.div` position: fixed; - top: 200px; background: rgba(66,46,40,1); background-size: 400% 400%; width: 460px; diff --git a/components/Stealth.tsx b/components/Stealth.tsx index 00aa8e5b..56f6e6d1 100644 --- a/components/Stealth.tsx +++ b/components/Stealth.tsx @@ -93,7 +93,7 @@ const Stealth: React.FC = ({ show, onClose, _ENS_, chain, handlePare const [gas, setGas] = React.useState<{}>({}); // Sets historical gas savings const [wrapped, setWrapped] = React.useState(false); // Indicates if the ENS Domain is wrapped const [keypairIPNS, setKeypairIPNS] = React.useState<[string, string]>(); // Sets generated K_IPNS keys - const [keypairRSA, setKeypairRSA] = React.useState<[string, string]>(); // Sets generated K_RSA keys + const [keypairRSA, setKeypairRSA] = React.useState<[any, string]>(); // Sets generated K_RSA keys const [keypairSigner, setKeypairSigner] = React.useState<[string, string]>(); // Sets generated K_IPNS and K_SIGNER keys const [updateRecords, setUpdateRecords] = React.useState(false); // Triggers signature for record update const [write, setWrite] = React.useState(false); // Triggers update of record to the NameSys backend and IPNS @@ -149,6 +149,8 @@ const Stealth: React.FC = ({ show, onClose, _ENS_, chain, handlePare const origin = `eth:${_Wallet_ || constants.zeroAddress}` const PORT = process.env.NEXT_PUBLIC_PORT const SERVER = process.env.NEXT_PUBLIC_SERVER + + // Wagmi Signature hook const { data: signature, error: signError, @@ -159,7 +161,7 @@ const Stealth: React.FC = ({ show, onClose, _ENS_, chain, handlePare const address = verifyMessage(variables.message, data) recoveredAddress.current = address }, - }) // Wagmi Signature hook + }) // Write hooks const { config: sendPayment } = usePrepareSendTransaction({ @@ -398,7 +400,7 @@ const Stealth: React.FC = ({ show, onClose, _ENS_, chain, handlePare // Signature S_RSA statement; S_RSA(K_WALLET) [Signer Keygen] // S_RSA generates AES-encrypted text function statementEncryptionKey(extradata: string) { - let _toSign = `Requesting Signature To Generate Encryption Key\n\nOrigin: ${ENS}\nKey Type: RSA-1048\nExtradata: ${extradata}\nSigned By: ${caip10}` + let _toSign = `Requesting Signature To Generate Encryption Key\n\nOrigin: ${ENS}\nKey Type: RSA-2048\nExtradata: ${extradata}\nSigned By: ${caip10}` let _digest = _toSign return _digest } @@ -723,7 +725,7 @@ const Stealth: React.FC = ({ show, onClose, _ENS_, chain, handlePare const _revision = JSON.parse(JSON.stringify(revision, (key, value) => { return typeof value === 'bigint' ? String(value) : value })) - if(_revision._name._privKey) _revision._name._privKey._key = {} + if (_revision._name._privKey) _revision._name._privKey._key = {} __revision = JSON.stringify(_revision) } else { __revision = JSON.stringify(__revision) @@ -1150,14 +1152,47 @@ const Stealth: React.FC = ({ show, onClose, _ENS_, chain, handlePare React.useEffect(() => { if (isPayment && keygen) { if (sigRSA && saltModalState.trigger) { - setMessage(['Generating Encryption Key', '']) - const keygen = async () => { - const _origin = hashType !== 'recordhash' ? `eth:${_Wallet_ || constants.zeroAddress}` : ENS - const __keypair = await RSAGEN(_origin, caip10, sigRSA, saltModalState.modalData) - setKeypairRSA(__keypair) + setMessage(['Generating Encryption Key', '+']) + const origin = hashType !== 'recordhash' ? `eth:${_Wallet_ || constants.zeroAddress}` : ENS + const worker = new Worker(new URL('../src/worker/worker', import.meta.url)) + worker.onmessage = (event) => { + const _deserialisedRSAKey = constants.deserialiseRSAKey(event.data[0]) + const _rehydratedKey = Object.assign(Object.create(constants.prototypeRSAKey), _deserialisedRSAKey) + setKeypairRSA([_rehydratedKey, event.data[1]]) setMessage(['Encryption Keypair Generated', '']) + return + } + worker.onerror = (event) => { + if (event instanceof Event) { + console.error('❌ ERROR:', event) + setKeypairRSA(undefined) + setLoading(false) + setMessage(['Failed To Generate RSA Key', '']) + doCrash() + setColor('orangered') + setSigCount(0) + setProcessCount(0) + return + } + console.error('❌ UNKNOWN ERROR:', event) + setKeypairRSA(undefined) + setLoading(false) + setMessage(['Unknown Error While Generating RSA Key', '']) + doCrash() + setColor('orangered') + setSigCount(0) + setProcessCount(0) + return + } + worker.postMessage({ + "_origin": origin, + "_caip10": caip10, + "_sigRSA": sigRSA, + "_salt": saltModalState.modalData + }) + return () => { + worker.terminate() } - keygen() } } // eslint-disable-next-line react-hooks/exhaustive-deps @@ -1196,6 +1231,7 @@ const Stealth: React.FC = ({ show, onClose, _ENS_, chain, handlePare } resolve() } catch (error) { + console.error('ERROR:', error) setLoading(false) setMessage(['Bad Invoice', '']) doCrash() @@ -1225,15 +1261,47 @@ const Stealth: React.FC = ({ show, onClose, _ENS_, chain, handlePare setGoodSalt(true) } } else if (sigRSA && !keypairRSA && isSigner) { - setLoading(true) - setMessage(['Generating Encryption Key', '']) - const keygen = async () => { - const _origin = hashType !== 'recordhash' ? `eth:${_Wallet_ || constants.zeroAddress}` : ENS - const __keypair = await RSAGEN(_origin, caip10, sigRSA, saltModalState.modalData) - setKeypairRSA(__keypair) + setMessage(['Generating Encryption Key', '+']) + const origin = hashType !== 'recordhash' ? `eth:${_Wallet_ || constants.zeroAddress}` : ENS + const worker = new Worker(new URL('../src/worker/worker', import.meta.url)) + worker.onmessage = (event) => { + const _deserialisedRSAKey = constants.deserialiseRSAKey(event.data[0]) + const _rehydratedKey = Object.assign(Object.create(constants.prototypeRSAKey), _deserialisedRSAKey) + setKeypairRSA([_rehydratedKey, event.data[1]]) setMessage(['Encryption Keypair Generated', '']) + return + } + worker.onerror = (event) => { + if (event instanceof Event) { + console.error('❌ ERROR:', event) + setKeypairRSA(undefined) + setLoading(false) + setMessage(['Failed To Generate RSA Key', '']) + doCrash() + setColor('orangered') + setSigCount(0) + setProcessCount(0) + return + } + console.error('❌ UNKNOWN ERROR:', event) + setKeypairRSA(undefined) + setLoading(false) + setMessage(['Unknown Error While Generating RSA Key', '']) + doCrash() + setColor('orangered') + setSigCount(0) + setProcessCount(0) + return + } + worker.postMessage({ + "_origin": origin, + "_caip10": caip10, + "_sigRSA": sigRSA, + "_salt": saltModalState.modalData + }) + return () => { + worker.terminate() } - keygen() } // eslint-disable-next-line react-hooks/exhaustive-deps }, [keygen, keypairIPNS, goodSalt, write, sigIPNS, isSigner, sigRSA, keypairRSA, isPayment]) @@ -1398,11 +1466,7 @@ const Stealth: React.FC = ({ show, onClose, _ENS_, chain, handlePare setMessage(['Waiting For Signature', '2']) _RSA = response let _encryptionResult: any = {} - if (keypairRSA) { - _encryptionResult = cryptico.encrypt(`{"payer":"${_Payer}","payee":"${_Payee}","amount":"${_Amount}"}`, _RSA, keypairRSA[0]) - } else { - _encryptionResult = cryptico.encrypt(`{"payer":"${_Payer}","payee":"${_Payee}","amount":"${_Amount}"}`, _RSA) - } + _encryptionResult = cryptico.encrypt(`{"payer":"${_Payer}","payee":"${_Payee}","amount":"${_Amount}"}`, _RSA) const _THIS = newValues _THIS['stealth'] = _encryptionResult.cipher setNewValues(_THIS) @@ -1908,7 +1972,7 @@ const Stealth: React.FC = ({ show, onClose, _ENS_, chain, handlePare {message[0]} - {message[1] && message[1] !== '-' && ( + {message[1] && !['-', '+'].includes(message[1]) && (
= ({ show, onClose, _ENS_, chain, handlePare
)} - {message[1] && message[1] === '-' && ( + {message[1] && ['-', '+'].includes(message[1]) && (
= ({ show, onClose, _ENS_, chain, handlePare fontWeight: '700' }} > - {message[0].includes('Refresh') ? 'Please Be Patient' : 'Please Be Patient'} + {message[1] === '-' ? 'Please Be Patient' : 'This Will Take Time. Hang on'}
)} @@ -2144,7 +2208,7 @@ const Stealth: React.FC = ({ show, onClose, _ENS_, chain, handlePare marginLeft: '-5px' }} > - {item.type === 'stealth' ? 'gpp_good': (RSA ? 'gpp_good' : 'gpp_bad')} + {item.type === 'stealth' ? 'gpp_good' : (RSA ? 'gpp_good' : 'gpp_bad')} )} @@ -2685,7 +2749,7 @@ const StyledModalHeader = styled.div` const StyledModal = styled.div` position: fixed; - top: 60px; + top: 60px; width: auto; min-width: 400px; border-radius: 6px; @@ -2698,7 +2762,7 @@ const StyledModal = styled.div` const StyledModalOverlay = styled.div` position: absolute; - top: -60px; + top: 0; left: 0; width: 100%; height: 100%; diff --git a/components/Success.tsx b/components/Success.tsx index 2f43918c..6e49c36b 100644 --- a/components/Success.tsx +++ b/components/Success.tsx @@ -133,8 +133,7 @@ const StyledModalHeader = styled.div` ` const StyledModal = styled.div` - position: fixed; - top: 250px; + position: fixed; background: rgba(66,46,40,1); background-size: 400% 400%; width: auto; diff --git a/out/.nojekyll b/out/.nojekyll deleted file mode 100644 index e69de29b..00000000 diff --git a/out/404.html b/out/404.html index 894c5bba..8a2d4874 100644 --- a/out/404.html +++ b/out/404.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file + }

404

This page could not be found.

\ No newline at end of file diff --git a/out/404.html.html b/out/404.html.html index 894c5bba..8a2d4874 100644 --- a/out/404.html.html +++ b/out/404.html.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file + }

404

This page could not be found.

\ No newline at end of file diff --git a/out/_next/static/7B-6x4C0oL8E4_p07T6FF/_buildManifest.js b/out/_next/static/7B-6x4C0oL8E4_p07T6FF/_buildManifest.js deleted file mode 100644 index f6b583d9..00000000 --- a/out/_next/static/7B-6x4C0oL8E4_p07T6FF/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST=function(a,s,c,f,e,t){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[a,s,c,f,e,t,"static/chunks/pages/index-6b71d8ff8ed1ec2b.js"],"/_error":["static/chunks/pages/_error-4a934674346210d3.js"],"/account":[a,s,c,f,e,t,"static/chunks/pages/account-e36a6a73785e98e0.js"],"/fallback":["static/chunks/pages/fallback-6fab776daa9ae5fc.js"],sortedPages:["/","/_app","/_error","/account","/fallback"]}}("static/chunks/de297ff1-639b71474d4cca8e.js","static/chunks/e97c7a19-0d10bf4e9f3c1869.js","static/chunks/8764-593a836a579a1569.js","static/chunks/8109-144fa7e49c07249e.js","static/chunks/3482-541ec2729b5b05cf.js","static/chunks/1469-3f9839cb080aea51.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/out/_next/static/chunks/1469-2f1e551b079174d0.js b/out/_next/static/chunks/1469-2f1e551b079174d0.js new file mode 100644 index 00000000..5a500e44 --- /dev/null +++ b/out/_next/static/chunks/1469-2f1e551b079174d0.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1469],{88006:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(73935),d=n(14141),c=n(22794),m=n(85893),f=d.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 10px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 15px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n"]))),b=d.ZP.div(s||(s=(0,p.Z)(["\n margin-top: -10px;\n font-size: 17px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n margin-bottom: 0px;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n"]))),h=d.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),g=d.ZP.div(r||(r=(0,p.Z)(["\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 450px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 5px;\n"]))),x=d.ZP.div(o||(o=(0,p.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.show,n=e.onClose,a=e.children,s=e.handleModalData,i=e.handleTrigger,r=y.useState(!1),o=(0,l.Z)(r,2),p=o[0],d=o[1],v=y.useState(!1),T=(0,l.Z)(v,2),w=T[0],S=T[1],j=y.useState(""),k=(0,l.Z)(j,2),N=k[0],M=k[1];y.useEffect((function(){d(!0)}),[]);var Z=function(e){s(e),i(!0),n()},R=t?(0,m.jsxs)(x,{children:[(0,m.jsxs)(g,{children:[(0,m.jsx)(h,{children:(0,m.jsx)("a",{href:"#",onClick:function(e){s(void 0),i(!1),e.preventDefault(),n()},children:(0,m.jsx)("span",{className:"material-icons",children:"close"})})}),t&&(0,m.jsx)(b,{children:(0,m.jsx)("div",{className:"material-icons",style:{marginTop:"4px",fontSize:"66px"},children:"notification_important"})}),(0,m.jsx)(f,{children:(0,m.jsxs)("div",{className:"flex-column",style:{marginTop:"10px",marginBottom:"10px"},children:["1"===a&&(0,m.jsxs)("div",{style:{lineHeight:"16px",fontWeight:"700",fontSize:"15px"},children:[(0,m.jsx)("span",{style:{lineHeight:"20px"},children:"Beware that will set a new on-chain"}),"\xa0",(0,m.jsx)("span",{style:{color:"cyan",fontWeight:"700",lineHeight:"20px"},children:"Recordhash"}),"\xa0Or\xa0",(0,m.jsx)("span",{style:{color:"cyan",fontWeight:"700",lineHeight:"20px"},children:"Gateway"}),". If you intend to set a global\xa0",(0,m.jsx)("span",{style:{color:"cyan",fontWeight:"700",lineHeight:"20px"},children:"Ownerhash"}),",\xa0please update it in\xa0",(0,m.jsx)("span",{style:{color:"orange",fontWeight:"700",lineHeight:"20px"},children:"UTILS"}),"\xa0tab"]}),"0"===a&&(0,m.jsxs)("div",{style:{lineHeight:"16px",fontWeight:"700",fontSize:"15px"},children:[(0,m.jsx)("span",{style:{lineHeight:"20px"},children:"This will set a new on-chain"}),"\xa0",(0,m.jsx)("span",{style:{color:"cyan",fontWeight:"700",lineHeight:"20px"},children:"Ownerhash"}),"\xa0Or\xa0",(0,m.jsx)("span",{style:{color:"cyan",fontWeight:"700",lineHeight:"20px"},children:"HTTP Gateway"})]}),(0,m.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,m.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"20px",fontSize:"15px",fontWeight:"700"},onClick:function(){Z("0")},"data-tooltip":"0"===a?"Continue With Ownerhash":"Continue With Recordhash",children:(0,m.jsxs)("div",{className:"flex-row",children:["0"===a?"Ownerhash":"Recordhash","\xa0",(0,m.jsx)("span",{className:"material-icons chonk",children:"hub"})]})}),(0,m.jsx)("button",{className:"button-tiny",onClick:function(){S(!0),M(''.concat("0"===a?"Ownerhash":"Recordhash"," is specific to one ").concat("0"===a?"wallet":"name",' and it is the permissionless and decentralised option'))},"data-tooltip":"Enlighten Me",children:(0,m.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"16px"},children:"info_outline"})})]}),(0,m.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,m.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){Z("1")},"data-tooltip":"Continue With HTTP Gateway",disabled:!a,children:(0,m.jsxs)("div",{className:"flex-row",children:["HTTP Gateway","\xa0",(0,m.jsx)("span",{className:"material-icons chonk",children:"dns"})]})}),(0,m.jsx)("button",{className:"button-tiny",onClick:function(){S(!0),M('HTTP Gateway could point to a web2 gateway or L2 proxy')},"data-tooltip":"Continue With Gateway",children:(0,m.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"16px"},children:"info_outline"})})]})]})})]}),(0,m.jsx)("div",{id:"modal-inner",children:(0,m.jsx)(c.Z,{color:"cyan",icon:"info",onClose:function(){return S(!1)},show:w,position:"",children:N})})]}):null;return p?u.createPortal(R,document.getElementById("modal")):null}},64637:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(73935),d=n(14141),c=n(85893),m=d.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 20px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 10px;\n display: flex;\n height: auto;\n justify-content: center;\n overflow-y: auto;\n font-size: 18px;\n color: white;\n font-weight: 700;\n text-align: center;\n align-items: center;\n line-height: 20px;\n"]))),f=d.ZP.div(s||(s=(0,p.Z)(["\n font-size: 18px;\n display: flex;\n justify-content: center;\n font-weight: 700;\n color: white;\n margin-top: -20px;\n"]))),b=d.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n font-size: 20px;\n"]))),h=d.ZP.div(r||(r=(0,p.Z)(["\n position: fixed;\n background: red;\n width: 400px;\n height: auto;\n border-radius: 6px;\n padding: 15px;\n overflow-y: initial !important\n padding-bottom: 20px;\n justify-content: center;\n"]))),g=d.ZP.div(o||(o=(0,p.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.show,n=e.onClose,a=(e.color,e.title),s=e.children,i=y.useState(!1),r=(0,l.Z)(i,2),o=r[0],p=r[1];y.useEffect((function(){p(!0)}),[]);var d=t?(0,c.jsx)(g,{children:(0,c.jsxs)(h,{children:[(0,c.jsx)(b,{children:(0,c.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),n()},children:(0,c.jsx)("span",{className:"material-icons",children:"cancel"})})}),a&&(0,c.jsx)(f,{children:(0,c.jsx)("div",{className:"flex-column",children:(0,c.jsx)("div",{className:"material-icons miui-small",children:a})})}),(0,c.jsx)(m,{dangerouslySetInnerHTML:{__html:s}})]})}):null;return o?u.createPortal(d,document.getElementById("modal")):null}},92673:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(73935),d=n(14141),c=n(85893),m=d.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 10px;\n padding-left: 20px;\n padding-right: 40px;\n padding-bottom: 20px;\n display: flex;\n justify-content: center;\n height: 500px;\n overflow-y: auto;\n color: white;\n"]))),f=d.ZP.div(s||(s=(0,p.Z)(["\n padding-top: 0px;\n font-size: 22px;\n display: flex;\n justify-content: center;\n font-weight: 800;\n margin-bottom: 20px;\n color: white;\n"]))),b=d.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n font-size: 20px;\n"]))),h=d.ZP.div(r||(r=(0,p.Z)(["\n background: linear-gradient(112deg, rgba(66,46,40,1) 0%, rgba(0,0,0,1) 48%, rgba(70,63,55,1) 100%);\n background-size: 400% 400%;\n width: 500px;\n height: 600px;\n border-radius: 6px;\n padding: 15px;\n overflow-y: initial !important\n padding-bottom: 20px;\n"]))),g=d.ZP.div(o||(o=(0,p.Z)(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.show,n=e.onClose,a=y.useState(!1),s=(0,l.Z)(a,2),i=s[0],r=s[1];y.useEffect((function(){r(!0)}),[]);var o=t?(0,c.jsx)(g,{children:(0,c.jsxs)(h,{children:[(0,c.jsx)(b,{children:(0,c.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),n()},children:(0,c.jsx)("span",{className:"material-icons",style:{marginTop:"4px"},children:"close"})})}),(0,c.jsx)(f,{children:(0,c.jsx)("span",{className:"material-icons miui-small",style:{marginTop:"4px"},children:"info_outline"})}),(0,c.jsx)(m,{})]})}):null;return i?u.createPortal(o,document.getElementById("modal")):null}},27921:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(85518),d=n(73935),c=n(14141),m=n(22794),f=n(62012),b=n(85893),h=c.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 5px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 25px;\n display: flex;_\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n margin-top: -15px;\n"]))),g=c.ZP.div(s||(s=(0,p.Z)(["\n margin-top: -15px;\n font-size: 14px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n margin-bottom: 15px;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n"]))),x=c.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),v=c.ZP.div(r||(r=(0,p.Z)(["\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 400px;\n max-width: ",";\n height: 220px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 3px;\n"])),u.tq?"90%":"60%"),T=c.ZP.div(o||(o=(0,p.Z)(["\n position: absolute;\n top: -60px;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.show,n=e.onClose,a=(e.children,e.handleModalData),s=e.handleTrigger,i=y.useState(f.U8),r=(0,l.Z)(i,2),o=r[0],p=r[1],u=y.useState(!1),c=(0,l.Z)(u,2),w=c[0],S=c[1],j=y.useState(!1),k=(0,l.Z)(j,2),N=k[0],M=k[1],Z=y.useState(""),R=(0,l.Z)(Z,2),C=R[0],E=R[1];y.useEffect((function(){S(!0)}),[]);var P=t?(0,b.jsxs)(T,{children:[(0,b.jsxs)(v,{children:[(0,b.jsx)(x,{children:(0,b.jsx)("a",{href:"#",onClick:function(e){a(void 0),s(!1),e.preventDefault(),n()},children:(0,b.jsx)("span",{className:"material-icons",children:"close"})})}),t&&(0,b.jsxs)(g,{children:[(0,b.jsx)("div",{className:"material-icons",style:{marginTop:"4px",fontSize:"46px"},children:"dns"}),(0,b.jsxs)("div",{style:{marginTop:"5px",marginBottom:"10px",fontSize:"18px"},children:[(0,b.jsx)("span",{style:{fontWeight:"700"},children:"Enter HTTP Gateway URL"}),(0,b.jsx)("button",{className:"button-tiny",style:{marginBottom:"-7.5px"},onClick:function(){M(!0),E('HTTP Gateway should be a HTTPS:// URL')},"data-tooltip":"Enlighten Me",children:(0,b.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]})]}),(0,b.jsxs)(h,{children:[(0,b.jsx)("input",{id:"keyid",placeholder:o,type:"text",value:o,onChange:function(e){p(e.target.value)},style:{background:"black",outline:"none",border:"none",padding:"5px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"14px",width:"100%",wordWrap:"break-word",textAlign:"left",color:"rgb(255, 255, 255, 0.6)",cursor:"copy"}},"0"),(0,b.jsx)("button",{className:"button",style:{height:"30px",width:"120px",marginTop:"17px",fontSize:"15px"},onClick:function(e){a(o),s(!0),e.preventDefault(),n()},"data-tooltip":"Confirm",children:(0,b.jsxs)("div",{className:"flex-row",style:{fontSize:"15px",fontWeight:"700"},children:["Confirm","\xa0",(0,b.jsx)("span",{className:"material-icons smoller",children:"local_laundry_service"})]})})]})]}),(0,b.jsx)("div",{id:"modal-inner",children:(0,b.jsx)(m.Z,{color:"cyan",icon:"info",onClose:function(){return M(!1)},show:N,position:"",children:C})})]}):null;return w?d.createPortal(P,document.getElementById("modal")):null}},22794:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(73935),d=n(14141),c=n(85518),m=n(85893),f=d.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 0px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 15px;\n display: flex;\n justify-content: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n line-height: 20px;\n max-width: 400px;\n"]))),b=d.ZP.div(s||(s=(0,p.Z)(["\n margin-top: -15px;\n font-size: 20px;\n display: flex;\n justify-content: center;\n font-weight: 700;\n margin-bottom: 15px;\n color: white;\n"]))),h=d.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),g=d.ZP.div(r||(r=(0,p.Z)(["\n position: fixed;\n top: ","; \n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: auto;\n max-width: ",";\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n padding: 5px;\n justify-content: center;\n text-align: center;\n"])),(function(e){return e.top}),c.tq?"90%":"60%"),x=d.ZP.div(o||(o=(0,p.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.icon,n=e.color,a=e.show,s=e.onClose,i=e.children,r=e.position,o=y.useState(!1),p=(0,l.Z)(o,2),d=p[0],c=p[1];y.useEffect((function(){c(!0)}),[]);var v=a?(0,m.jsx)(x,{children:(0,m.jsxs)(g,{top:r,children:[(0,m.jsx)(h,{children:(0,m.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),s()},children:(0,m.jsx)("span",{className:"material-icons",style:{margin:"4px"},children:"close"})})}),t&&(0,m.jsx)(b,{children:(0,m.jsx)("span",{className:"material-icons",style:{marginTop:"4px",fontSize:"36px",color:n},children:t})}),(0,m.jsx)(f,{dangerouslySetInnerHTML:{__html:i}})]})}):null;return d?u.createPortal(v,document.getElementById("modal")):null}},58595:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});for(var a=n(16835),s=n(67294),i=n(22794),r=["\u0660","\u0661","\u0662","\u0663","\u0664","\u0665","\u0666","\u0667","\u0668","\u0669"],o=["\u06f9","\u06f8","\u06f7","\u06f6","\u06f5","\u06f4","\u06f3","\u06f2","\u06f1","\u06f0"],p=["\u0966","\u0967","\u0968","\u0969","\u096a","\u096b","\u096c","\u096d","\u096e","\u096f"],l=["\uc601","\uc77c","\uc774","\uc0bc","\uc0ac","\uc624","\uc721","\uce60","\ud314","\uad6c"],y=["\u3007","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d"],u=n(85518),d=n(85893),c=[],m=65;m<=90;m++)"x"!==String.fromCharCode(m).toLocaleLowerCase()&&c.push(String.fromCharCode(m).toLocaleLowerCase());var f=function(e){var t=e.label,n=e.items,c=e.onItemClickStealth,m=e.onItemClickPreview,f=s.useState(""),b=(0,a.Z)(f,2),h=b[0],g=b[1],x=s.useState(""),v=(0,a.Z)(x,2),T=v[0],w=v[1],S=s.useState(""),j=(0,a.Z)(S,2),k=j[0],N=j[1],M=s.useState(!1),Z=(0,a.Z)(M,2),R=Z[0],C=Z[1];return(0,d.jsx)("ul",{className:"flex-column",style:{listStyle:"none",color:"white"},children:n.map((function(e){return(0,d.jsxs)("li",{style:{display:"flex",flexDirection:"column",width:"100%",marginLeft:u.tq?"-10.5%":"-9.5%"},children:[(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,d.jsxs)("span",{style:{marginBottom:"-3px",color:"white"},children:[(0,d.jsxs)("div",{children:[e.name.split("").map((function(e,t){return(0,d.jsx)("span",{style:{fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"600",fontSize:r.includes(e)||p.includes(e)||o.includes(e)||y.includes(e)||l.includes(e)?"24px":"21px"},children:e.toLowerCase()},t)})),(0,d.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"15px",color:"cyan"},children:"."}),(0,d.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:"11px",color:"cyan",fontWeight:"700",letterSpacing:"0px"},children:"ETH"}),"1"===e.migrated&&(0,d.jsx)("button",{className:"button-tiny",onClick:function(){C(!0),g("gpp_good"),N("lime"),w('Ready For Off-chain Use. Domain-specific Recordhash is Set')},"data-tooltip":"Ready With IPNS Recordhash",children:(0,d.jsx)("div",{className:"material-icons-round smol",style:{color:"lime"},children:"gpp_good"})}),"3/4"===e.migrated&&(0,d.jsx)("button",{className:"button-tiny",onClick:function(){C(!0),g("gpp_good"),N("cyan"),w('Ready For Off-chain Use. Global Ownerhash is Set')},"data-tooltip":"Ready With IPNS Ownerhash",children:(0,d.jsx)("div",{className:"material-icons-round smol",style:{color:"cyan"},children:"gpp_good"})}),"4/5"===e.migrated&&(0,d.jsx)("button",{className:"button-tiny",onClick:function(){C(!0),g("gpp_good"),N("yellow"),w('Ready For Off-chain Use. HTTP Gateway is Set')},"data-tooltip":"Ready With HTTP Gateway",children:(0,d.jsx)("div",{className:"material-icons-round smol",style:{color:"yellow"},children:"gpp_good"})}),"1/2"===e.migrated&&(0,d.jsx)("button",{className:"button-tiny",onClick:function(){C(!0),g("gpp_good"),N("orange"),w('Resolver is migrated but Storage is not Set')},"data-tooltip":"Using Default Gateway",children:(0,d.jsx)("div",{className:"material-icons-round smol",style:{color:"orange"},children:"gpp_good"})}),"0"===e.migrated&&(0,d.jsx)("button",{className:"button-tiny",onClick:function(){C(!0),g("gpp_maybe"),N("orangered"),w('Resolver is not migrated. Please MIGRATE to enable off-chain Records')},"data-tooltip":"Resolver Not Migrated",children:(0,d.jsx)("div",{className:"material-icons-round smol",style:{color:"orangered"},children:"gpp_maybe"})})]}),(0,d.jsx)(i.Z,{color:k,icon:h,onClose:function(){return C(!1)},show:R,position:"",children:T})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("a",{href:"https://app.ens.domains/name/".concat(e.name.toLowerCase(),".eth"),target:"_blank",rel:"noreferrer",children:(0,d.jsx)("img",{className:"icon-ens-small",alt:"ens-icon",src:"ens.png"})}),(0,d.jsx)("a",{href:"https://ens.vision/name/".concat(e.name),target:"_blank",rel:"noreferrer",children:(0,d.jsx)("img",{className:"icon-vision-small",alt:"ensvision-icon",src:"ens-vision.png"})}),(0,d.jsx)("a",{style:{marginRight:"15px"},href:"https://godid.io/items/".concat(e.name.toLowerCase(),".eth"),target:"_blank",rel:"noreferrer",children:(0,d.jsx)("img",{className:"icon-godid-small",alt:"godid-icon",src:"godid.svg"})}),(0,d.jsx)("button",{className:"button",style:{alignSelf:"flex-end",height:"40px",width:"40px"},onClick:function(){return c(e.name+".eth")},disabled:["0"].includes(e.migrated)||"view"===t,"data-tooltip":"Stealth Payments",children:(0,d.jsx)("div",{className:"flex-sans-direction",children:(0,d.jsx)("span",{className:"material-icons-round smoller",style:{fontSize:"25px",fontWeight:"700"},children:"account_balance_wallet"})})}),(0,d.jsx)("button",{className:"button",style:{alignSelf:"flex-end",height:"40px",width:"40px",marginLeft:"5px"},onClick:function(){return m(e.name+".eth")},"data-tooltip":"".concat(t," Your Records"),children:(0,d.jsx)("div",{className:"flex-sans-direction",children:(0,d.jsx)("span",{className:"material-icons-round smoller",style:{fontSize:"25px",fontWeight:"700"},children:"view"===t?"policy":"edit"})})})]})]}),(0,d.jsx)("hr",{})]},e.key)}))})}},22661:function(e,t,n){"use strict";n(67294);var a=n(85893);t.Z=function(e){var t=e.height,n=e.width,s='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ');return(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:s}})}},20321:function(e,t,n){"use strict";n.d(t,{Z:function(){return Ae}});var a,s,i,r,o,p,l,y,u,d,c,m,f,b,h,g=n(71383),x=n(27812),v=n(50029),T=n(59499),w=n(16835),S=n(87794),j=n.n(S),k=n(67294),N=n(73935),M=n(14141),Z=n(79911),R=n(2593),C=n(27586),E=n(83875),P=n(16441),_=n(84243),D=n(84917),O=n(8198),I=n(38197),A=n(31886),W=n(57734),z=n(37918),F=n.n(z),L=n(56371),B=n(22794),U=n(41894),q=n(27921),K=n(85893),G=M.ZP.div(a||(a=(0,g.Z)(["\n padding-top: 10px;\n padding-left: 50px;\n padding-right: 50px;\n padding-bottom: 25px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n"]))),H=M.ZP.div(s||(s=(0,g.Z)(["\n margin-top: -10px;\n font-size: 17px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n margin-bottom: 0px;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n"]))),J=M.ZP.div(i||(i=(0,g.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),V=M.ZP.div(r||(r=(0,g.Z)(["\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 450px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 5px;\n"]))),Y=M.ZP.div(o||(o=(0,g.Z)(["\n position: absolute;\n top: -60px;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"]))),$=function(e){var t=e.show,n=e.onClose,a=e.children,s=e.handleModalData,i=e.handleTrigger,r=k.useState(!1),o=(0,w.Z)(r,2),p=o[0],l=o[1],y=k.useState(!1),u=(0,w.Z)(y,2),d=u[0],c=u[1],m=k.useState(""),f=(0,w.Z)(m,2),b=f[0],h=f[1];k.useEffect((function(){l(!0)}),[]);var g=t?(0,K.jsxs)(Y,{children:[(0,K.jsxs)(V,{children:[(0,K.jsx)(J,{children:(0,K.jsx)("a",{href:"#",onClick:function(e){s(void 0),i(!1),e.preventDefault(),n()},children:(0,K.jsx)("span",{className:"material-icons",children:"close"})})}),t&&(0,K.jsxs)(H,{children:[(0,K.jsx)("div",{className:"material-icons",style:{marginTop:"4px",fontSize:"66px"},children:"cloud_upload"}),(0,K.jsx)("div",{style:{marginTop:"15px"},children:"Please choose your Storage"})]}),(0,K.jsxs)(G,{children:[(0,K.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,K.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){s("0"),i(!0),n()},"data-tooltip":a?"Uses Preset Global Ownerhash":"No Global Ownerhash Found",disabled:!a,children:(0,K.jsxs)("div",{className:"flex-row",children:["Ownerhash","\xa0",(0,K.jsx)("span",{className:"material-icons chonk",children:"recycling"})]})}),(0,K.jsx)("button",{className:"button-tiny",onClick:function(){c(!0),h('Ownerhash works for all your names in a wallet and must be set in UTILS. This is a slower but cheaper option. If you prefer this option, please go to UTILS tab first and set the Ownerhash')},"data-tooltip":"Cheaper but Slower IPNS",children:(0,K.jsx)("div",{className:"material-icons smol",style:{color:"yellow",marginLeft:"5px",marginTop:"21px"},children:"info_outline"})})]}),(0,K.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,K.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){s("1"),i(!0),n()},"data-tooltip":"Sets New On-chain Recordhash",children:(0,K.jsxs)("div",{className:"flex-row",children:["Recordhash","\xa0",(0,K.jsx)("span",{className:"material-icons chonk",children:"create"})]})}),(0,K.jsx)("button",{className:"button-tiny",onClick:function(){c(!0),h('Recordhash is specific to each name and it is a faster but expensive option')},"data-tooltip":"Faster but Expensive IPNS",children:(0,K.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"16px"},children:"info_outline"})})]}),(0,K.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,K.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){s("2"),i(!0),n()},"data-tooltip":"Sets New On-chain Gateway",children:(0,K.jsxs)("div",{className:"flex-row",children:["HTTP Gateway","\xa0",(0,K.jsx)("span",{className:"material-icons chonk",children:"dns"})]})}),(0,K.jsx)("button",{className:"button-tiny",onClick:function(){c(!0),h('HTTP Gateway can point to a web2 gateway or L2 proxy')},"data-tooltip":"Rapid But Centralised",children:(0,K.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"16px"},children:"info_outline"})})]})]})]}),(0,K.jsx)("div",{id:"modal-inner",children:(0,K.jsx)(B.Z,{color:"cyan",icon:"info",onClose:function(){return c(!1)},show:d,position:"",children:b})})]}):null;return p?N.createPortal(g,document.getElementById("modal")):null},Q=n(64637),X=n(85518),ee=n(62012),te=M.ZP.div(p||(p=(0,g.Z)(["\n padding-top: 5px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 25px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n margin-top: 5px;\n"]))),ne=M.ZP.div(l||(l=(0,g.Z)(["\n margin-top: -15px;\n font-size: 14px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n margin-left: 10px;\n"]))),ae=M.ZP.div(y||(y=(0,g.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),se=M.ZP.div(u||(u=(0,g.Z)(["\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 460px;\n max-width: ",";\n height: 270px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 3px;\n"])),X.tq?"90%":"60%"),ie=M.ZP.div(d||(d=(0,g.Z)(["\n position: absolute;\n top: -60px;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"]))),re=function(e){var t=e.show,n=e.onClose,a=e.children,s=e.handleModalData,i=e.handleTrigger,r=k.useState(!1),o=(0,w.Z)(r,2),p=o[0],l=o[1],y=k.useState("cyan"),u=(0,w.Z)(y,2),d=u[0],c=u[1];k.useEffect((function(){l(!0)}),[]);var m=function(e){i(!1),s(""),c("cyan"),e.preventDefault(),n()},f=t?(0,K.jsx)(ie,{children:(0,K.jsxs)(se,{children:[(0,K.jsx)(ae,{children:(0,K.jsx)("a",{href:"#",onClick:m,children:(0,K.jsx)("span",{className:"material-icons",children:"close"})})}),t&&(0,K.jsxs)(ne,{children:[(0,K.jsx)("div",{className:"material-icons",style:{marginTop:"10px",fontSize:"66px"},children:"hub"}),(0,K.jsx)("div",{style:{marginTop:"17px",marginBottom:"8px"},children:(0,K.jsx)("span",{style:{fontSize:"24px",fontWeight:"700"},children:"Your IPFS Hash"})})]}),(0,K.jsxs)(te,{children:[(0,K.jsxs)("div",{className:"flex-row",style:{width:"400px"},children:[(0,K.jsx)("input",{id:"info",value:a,type:"text",style:{background:"black",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"150%",wordWrap:"break-word",textAlign:"left",color:d,cursor:"copy",paddingRight:"32px"},disabled:!0},"1"),(0,K.jsx)("button",{className:"button-empty",onClick:function(){c("lime"),ee.vQ("info")},style:{marginLeft:"-25px",marginTop:"2px",color:d||"cyan"},children:(0,K.jsx)("span",{className:"material-icons",style:{fontSize:"22px",fontWeight:"700"},children:"content_copy"})})]}),(0,K.jsx)("button",{className:"button",style:{height:"33px",width:"140px",padding:"5px",marginTop:"20px",fontSize:"17px",fontWeight:"700"},onClick:m,"data-tooltip":"Roger That",children:(0,K.jsxs)("div",{className:"flex-row",style:{fontSize:"17px"},children:["Ok","\xa0",(0,K.jsx)("span",{className:"material-icons smoller",children:"done_all"})]})})]})]})}):null;return p?N.createPortal(f,document.getElementById("modal")):null},oe=n(75533);function pe(e){var t=0;for(var n in e)e.hasOwnProperty(n)&&(t+=e[n]);return t}var le,ye,ue,de,ce,me=M.ZP.div(c||(c=(0,g.Z)(["\n padding-top: 0px;\n padding-left: ",";\n padding-right: ",";\n padding-bottom: ",";\n margin-top: 0px;\n margin-left: ",";\n margin-right: ",";\n margin-bottom: ",";\n display: flex;\n justify-content: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n line-height: 20px;\n max-width: 450px;\n"])),X.tq?"10px":"20px",X.tq?"10px":"20px",X.tq?"10px":"20px",X.tq?"10px":"20px",X.tq?"10px":"20px",X.tq?"10px":"20px"),fe=M.ZP.div(m||(m=(0,g.Z)(["\n margin-top: -15px;\n font-size: 20px;\n display: flex;\n justify-content: center;\n font-weight: 700;\n margin-bottom: 15px;\n color: white;\n"]))),be=M.ZP.div(f||(f=(0,g.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),he=M.ZP.div(b||(b=(0,g.Z)(["\n position: fixed;\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: auto;\n max-width: ",";\n height: 275px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n width: 450px;\n"])),X.tq?"90%":"60%"),ge=M.ZP.div(h||(h=(0,g.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"]))),xe=function(e){var t=e.icon,n=e.color,a=e.show,s=e.onClose,i=e.children,r=k.useState(!1),o=(0,w.Z)(r,2),p=o[0],l=o[1];k.useEffect((function(){l(!0)}),[]);var y=a?(0,K.jsx)(ge,{children:(0,K.jsxs)(he,{children:[(0,K.jsx)(be,{children:(0,K.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),s()},children:(0,K.jsx)("span",{className:"material-icons",style:{margin:"4px"},children:"close"})})}),t&&(0,K.jsx)(fe,{children:(0,K.jsx)("span",{className:"material-icons",style:{marginTop:"14px",fontSize:"72px",color:n},children:"verified"})}),(0,K.jsx)(me,{children:(0,K.jsxs)("div",{className:"flex-column",style:{marginBottom:"15px"},children:[(0,K.jsx)("div",{style:{fontSize:"24px",marginTop:"10px",color:"lime",fontWeight:"700"},children:"Off-Chain Records set"}),(0,K.jsxs)("div",{style:{marginTop:"20px",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",fontSize:"20px",fontWeight:"700"},children:[(0,K.jsx)("div",{children:"Your"}),"\xa0",(0,K.jsx)("div",{className:"material-icons",style:{marginBottom:"3px",fontSize:"28px",color:n},children:"local_gas_station"}),"\xa0",(0,K.jsx)("div",{children:"savings"})]}),(0,K.jsxs)("div",{style:{marginTop:"18px",fontFamily:"SF Mono",fontSize:"24px",fontWeight:"600",color:"lime"},children:[pe(i).toPrecision(3),"\xa0",(0,K.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:"21px",fontWeight:"700"},children:"ETH"})]})]})})]})}):null;return p?N.createPortal(y,document.getElementById("modal")):null},ve=n(22661),Te=n(59595),we=n(88006),Se=n(36490),je=n(19745),ke=n(24978),Ne=n(67191),Me=n(71775),Ze=n(35133),Re=n(59654);function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Ee(e){for(var t=1;tOn-chain Record Storage Pointer',tooltip:"Set New Storage"},{key:1,header:"Resolver",type:"resolver",value:He,editable:!1,active:He!==Cr,state:!1,label:"Migrate",help:'Please migrate resolver to enjoy off-chain records',tooltip:"Please Migrate Resolver"},{key:2,header:"Contenthash",type:"contenthash",value:n,editable:He===Cr&&hr>0,active:ee.rv(n)&&hr>0,state:!1,label:"Edit",help:'Set your web contenthash',tooltip:"Set Contenthash"},{key:3,header:"Address",type:"addr",value:t,editable:He===Cr&&hr>0,active:ee.Q1(t)&&hr>0,state:!1,label:"Edit",help:'Set your default address',tooltip:"Set Address"},{key:4,header:"Avatar",type:"avatar",value:a,editable:He===Cr&&hr>0,active:ee.tr(a)&&hr>0,state:!1,label:"Edit",help:'Set your avatar',tooltip:"Set Avatar"},{key:5,header:"Public Key",type:"pubkey",value:s,editable:He===Cr&&hr>0,active:ee.V4(s)&&hr>0,state:!1,label:"Edit",help:'Set your Public Key',tooltip:"Set Public Key"},{key:6,header:"Email",type:"email",value:i,editable:He===Cr&&hr>0,active:ee.Jh(i)&&hr>0,state:!1,label:"Edit",help:'Set your Email',tooltip:"Set Email Record"},{key:7,header:"Github",type:"github",value:r,editable:He===Cr&&hr>0,active:ee.wE(r)&&hr>0,state:!1,label:"Edit",help:'Set your Github username',tooltip:"Set Github Record"},{key:8,header:"Url",type:"url",value:o,editable:He===Cr&&hr>0,active:ee.CB(o)&&hr>0,state:!1,label:"Edit",help:'Set your URL',tooltip:"Set URL Record"},{key:9,header:"Twitter",type:"twitter",value:p,editable:He===Cr&&hr>0,active:ee.L3(p)&&hr>0,state:!1,label:"Edit",help:'Set your Twitter username',tooltip:"Set Twitter Record"},{key:10,header:"Discord",type:"discord",value:l,editable:He===Cr&&hr>0,active:ee.Iu(l)&&hr>0,state:!1,label:"Edit",help:'Set your Discord username',tooltip:"Set Discord Record"},{key:11,header:"Farcaster",type:"farcaster",value:y,editable:He===Cr&&hr>0,active:ee.Io(y)&&hr>0,state:!1,label:"Edit",help:'Set your Farcaster username',tooltip:"Set Farcaster Record"},{key:12,header:"Nostr",type:"nostr",value:u,editable:He===Cr&&hr>0,active:ee.$o(u)&&hr>0,state:!1,label:"Edit",help:'Set your Nostr username',tooltip:"Set Discord Record"},{key:13,header:"Bitcoin",type:"btc",value:d,editable:He===Cr&&hr>0,active:ee.MP(d)&&hr>0,state:!1,label:"Edit",help:'Set your BTC Address',tooltip:"Set BTC Address"},{key:14,header:"Litecoin",type:"ltc",value:c,editable:He===Cr&&hr>0,active:ee.Yo(c)&&hr>0,state:!1,label:"Edit",help:'Set your LTC Address',tooltip:"Set LTC Address"},{key:15,header:"Dogecoin",type:"doge",value:m,editable:He===Cr&&hr>0,active:ee.fp(m)&&hr>0,state:!1,label:"Edit",help:'Set your DOGE Address',tooltip:"Set DOGE Address"},{key:16,header:"Solana",type:"sol",value:f,editable:He===Cr&&hr>0,active:ee.A2(f)&&hr>0,state:!1,label:"Edit",help:'Set your SOL Address',tooltip:"Set SOL Address"},{key:17,header:"Cosmos",type:"atom",value:b,editable:He===Cr&&hr>0,active:ee.s8(b)&&hr>0,state:!1,label:"Edit",help:'Set your ATOM Address',tooltip:"Set ATOM Address"}];(h=g)&&ga(h)}function _o(e){return!ee.vc.includes(e.type)&&us.length>1&&!us.includes("resolver")&&!us.includes("storage")}function Do(e){return ee.IN.includes(e.type)||!ca[e.key].active||!Ys[e.type]||e.state||!Mr||!zn.includes(String(Mr))||!ee.vc.includes(e.type)&&fs===ee.K5()}function Oo(e,t,n){var a="eip155:"+s+":"+E.computeAddress("0x".concat(n));return"Requesting Signature To Update ENS Record\n\nOrigin: ".concat(ye,"\nRecord Type: ").concat(e,"\nExtradata: ").concat(t,"\nSigned By: ").concat(a)}function Io(e){var t="eip155:"+s+":"+E.computeAddress("0x".concat(e));return"Requesting Signature To Approve ENS Records Signer\n\nOrigin: ".concat(ye,"\nApproved Signer: ").concat(t,"\nApproved By: ").concat(Ar)}function Ao(e){return"Requesting Signature To Generate ENS Records Signer\n\nOrigin: ".concat(ye,"\nKey Type: secp256k1\nExtradata: ").concat(e,"\nSigned By: ").concat(Ar)}function Wo(e,t){var n="",a="";["avatar","email","pubkey","github","url","twitter","discord","farcaster","nostr","zonehash"].includes(e)&&(a="string",n=t),["btc","ltc","doge","sol","atom"].includes(e)&&(a="bytes",n="0x".concat(Re.Z_[e.toUpperCase()].decoder(t).toString("hex"))),"contenthash"===e&&(a="bytes",n=Ne.vb(t).encoded),"addr"===e&&(a="address",n=t);var s=_.$.encode([a],[n]),i=[ee.z7];return new O.vU(i).encodeFunctionData("signedRecord",[Xa?E.computeAddress("0x".concat(Xa[0])):ee.DR,Us[e],ir,s])}function zo(e,t){var n="",a="";["avatar","email","pubkey","github","url","twitter","discord","farcaster","nostr","zonehash"].includes(e)&&(n="string",a=t),["btc","ltc","doge","sol","atom"].includes(e)&&(n="bytes",a="0x".concat(Re.Z_[e.toUpperCase()].decoder(t).toString("hex"))),"contenthash"===e&&(n="bytes",a=Ne.vb(t).encoded),"addr"===e&&(n="address",a=t);var s=_.$.encode([n],[a]),i=I.keccak256(s);return P.hexlify(A.pack(["bytes"],[i]))}function Fo(){return Hr&&Vr?String(Hr)===ee.O["1"===s?7:3]?Qr?String(Qr):ee.DR:String(Vr):ee.DR}function Lo(e,t){"avatar"===e&&yt(t),"email"===e&&mt(t),"pubkey"===e&>(t),"github"===e&&wt(t),"url"===e&&Nt(t),"twitter"===e&&Ct(t),"discord"===e&&Dt(t),"farcaster"===e&&Wt(t),"nostr"===e&&Bt(t),"btc"===e&&Gt(t),"ltc"===e&&Yt(t),"doge"===e&&en(t),"sol"===e&&sn(t),"atom"===e&&ln(t),"zonehash"===e&&dn(t)}function Bo(e){tp(e,"avatar"),tp(e,"email"),tp(e,"pubkey"),tp(e,"github"),tp(e,"url"),tp(e,"twitter"),tp(e,"discord"),tp(e,"farcaster"),tp(e,"nostr"),ap(e,"btc"),ap(e,"ltc"),ap(e,"doge"),ap(e,"sol"),ap(e,"atom")}function Uo(e){"avatar"===e&&yt(""),"email"===e&&mt(""),"pubkey"===e&>(""),"github"===e&&wt(""),"url"===e&&Nt(""),"twitter"===e&&Ct(""),"discord"===e&&Dt(""),"farcaster"===e&&Wt(""),"nostr"===e&&Bt(""),"btc"===e&&Gt(""),"ltc"===e&&Yt(""),"doge"===e&&en(""),"sol"===e&&sn(""),"atom"===e&&ln(""),"zonehash"===e&&dn(""),nt(!0)}function qo(){te(!0),wa(""),ds([]),ie(""),nr(""),es(void 0),Ya(void 0),b(!1),Qi(""),Jn(!1),ji(!1),os&&ps(!1),Ii({modalData:void 0,trigger:!1}),Pi({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1})}function Ko(){vs("gpp_good"),js("lime"),$s(ee.gk()),Jn(!1),b(!1),gr(1),es(void 0),Ya(void 0),nr(""),Qi(""),ie(""),Da(!1),Zi({modalData:void 0,trigger:!1}),Ii({modalData:void 0,trigger:!1}),Pi({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1}),ji(!1),wa(""),os&&ps(!1),ss(!1)}function Go(e){return Ho.apply(this,arguments)}function Ho(){return Ho=(0,v.Z)(j().mark((function e(t){var n,a;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Xa){e.next=4;break}return n=function(){var e=(0,v.Z)(j().mark((function e(){var n,a;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Z.Wallet("0x"+Xa[0],Dr),e.next=3,n.signMessage(t.message);case 3:if(!(a=e.sent)){e.next=6;break}return e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=n(),e.abrupt("return",a);case 4:case"end":return e.stop()}}),e)}))),Ho.apply(this,arguments)}function Jo(){return Jo=(0,v.Z)(j().mark((function e(){var t;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:yr(3),Zs(["Waiting For Signature","3"]),Xa&&(t=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Kr({message:Io(Xa[0])});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),t());case 3:case"end":return e.stop()}}),e)}))),Jo.apply(this,arguments)}function Vo(e){return Yo.apply(this,arguments)}function Yo(){return Yo=(0,v.Z)(j().mark((function e(t){var n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Kr({message:Ao(I.keccak256(A.pack(["bytes32","address"],[I.keccak256(A.pack(["string"],[t])),Mr])))});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n();case 2:case"end":return e.stop()}}),e)}))),Yo.apply(this,arguments)}function $o(e,t){return Qo.apply(this,arguments)}function Qo(){return Qo=(0,v.Z)(j().mark((function e(t,n){var a,s;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=function(){var e=(0,v.Z)(j().mark((function e(){var a,s,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=new Ir.eth.Contract(ee.qP[6].contractInterface,ee.qP[6].addressOrName),"contenthash"!==t){e.next=7;break}return e.next=4,a.methods.setContenthash(C.VM(ye),Ne.vb(n).encoded).estimateGas({from:Mr});case 4:s=e.sent,e.next=24;break;case 7:if(!["avatar","email","pubkey","github","url","twitter","discord","farcaster","nostr","zonehash"].includes(t)){e.next=13;break}return e.next=10,a.methods.setText(C.VM(ye),t,n).estimateGas({from:Mr});case 10:s=e.sent,e.next=24;break;case 13:if(!["btc","ltc","doge","sol","atom"].includes(t)){e.next=20;break}return i="btc"===t?0:"ltc"===t?2:"doge"===t?3:"sol"===t?501:118,e.next=17,a.methods.setAddr(C.VM(ye),i,"0x".concat(Re.Z_[t.toUpperCase()].decoder(n).toString("hex"))).estimateGas({from:Mr});case 17:s=e.sent,e.next=24;break;case 20:if("addr"!==t){e.next=24;break}return e.next=23,a.methods.setAddr(C.VM(ye),n).estimateGas({from:Mr});case 23:s=e.sent;case 24:return e.abrupt("return",s);case 25:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=3,a();case 3:return s=e.sent,e.abrupt("return",s);case 5:case"end":return e.stop()}}),e)}))),Qo.apply(this,arguments)}function Xo(e){return ep.apply(this,arguments)}function ep(){return ep=(0,v.Z)(j().mark((function e(t){var n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=ai).contenthash="-",si(n),nt(!0),e.next=6,t.getContentHash().then((function(e){e?(n.contenthash="1",qn(e),si(n)):(n.contenthash="0",qn(""),si(n)),ip(t)})).catch((function(){n.contenthash="0",qn(""),si(n),ip(t)}));case 6:case"end":return e.stop()}}),e)}))),ep.apply(this,arguments)}function tp(e,t){return np.apply(this,arguments)}function np(){return np=(0,v.Z)(j().mark((function e(t,n){var a;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a=ai)[n]="-",si(a),e.next=5,t.getText(n).then((function(e){e?(a[n]="1",Lo(n,e),si(a)):(a[n]="0",Uo(n),si(a))})).catch((function(){a[n]="0",Uo(n),si(a)}));case 5:case"end":return e.stop()}}),e)}))),np.apply(this,arguments)}function ap(e,t){return sp.apply(this,arguments)}function sp(){return sp=(0,v.Z)(j().mark((function e(t,n){var a,s;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a="btc"===n?0:"ltc"===n?2:"doge"===n?3:"sol"===n?501:118,(s=ai)[n]="-",si(s),"btc"!==n){e.next=7;break}return e.next=7,t.getAddress(a).then((function(e){e?(s[n]="1",Lo(n,e),si(s)):(s[n]="0",Uo(n),si(s))})).catch((function(){s[n]="0",Uo(n),si(s)}));case 7:case"end":return e.stop()}}),e)}))),sp.apply(this,arguments)}function ip(e){return rp.apply(this,arguments)}function rp(){return rp=(0,v.Z)(j().mark((function e(t){var n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=ai).addr="-",si(n),e.next=5,Dr.resolveName(ye).then((function(e){e?(n.addr="1",rt(e),si(n),Bo(t)):(n.addr="0",rt(""),si(n),Bo(t))})).catch((function(){n.addr="0",rt(""),si(n),Bo(t)}));case 5:case"end":return e.stop()}}),e)}))),rp.apply(this,arguments)}function op(){return(op=(0,v.Z)(j().mark((function e(t,n){var a,s,i,r,o,p,l,y,u,d,c,m,f,b,h,g,x,v,T;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Dr.getResolver(n);case 3:if(null===(a=e.sent)||void 0===a||!a.address){e.next=95;break}if(Je(a.address),Qe(a),a.address!==Cr){e.next=27;break}return e.next=10,Me.I7(n,Er,Fo());case 10:if(s=e.sent,!(t.ownerstamp.length>1)){e.next=22;break}r=0;case 13:if(!(r<2)){e.next=20;break}return e.next=16,ee.TN(Ne.K5(s[0]).decoded,r);case 16:i=e.sent;case 17:r++,e.next=13;break;case 20:e.next=23;break;case 22:i=1===t.ownerstamp.length?{_value:"//",_sequence:"-1"}:{_value:"//",_sequence:""};case 23:di(i._value.split("/")[2]),t.ownerstamp.length>=1&&i._sequence&&t.timestamp.revision&&Number(i._sequence)===Number(t.timestamp.revision)-1&&s[1]?(t.revision.addr?rt(t.addr):rt(""),t.revision.contenthash?qn(t.contenthash):qn(""),t.revision.avatar?yt(t.avatar):yt(""),t.revision.email?mt(t.email):mt(""),t.revision.github?wt(t.github):wt(""),t.revision.url?Nt(t.url):Nt(""),t.revision.twitter?Ct(t.twitter):Ct(""),t.revision.discord?Ct(t.discord):Dt(""),t.revision.farcaster?Wt(t.farcaster):Wt(""),t.revision.nostr?Bt(t.nostr):Bt(""),t.revision.btc?Gt(t.btc):Gt(""),t.revision.ltc?Yt(t.ltc):Yt(""),t.revision.doge?en(t.doge):en(""),t.revision.sol?sn(t.sol):sn(""),t.revision.atom?ln(t.atom):ln(""),nt(!0)):Xo(a),e.next=93;break;case 27:return nt(!0),e.next=30,pp(["addr",""],a,n,!1);case 30:return o=e.sent,rt(o||""),e.next=34,pp(["contenthash",""],a,n,!1);case 34:return p=e.sent,qn(p||""),e.next=38,pp(["avatar",""],a,n,!1);case 38:if(l=e.sent){e.next=43;break}return e.next=42,pp(["text","avatar"],a,n,!1);case 42:l=e.sent;case 43:return yt(l||""),e.next=46,pp(["text","email"],a,n,!1);case 46:return y=e.sent,mt(y||""),gt(""),e.next=51,pp(["text","github"],a,n,!1);case 51:return u=e.sent,wt(u||""),e.next=55,pp(["text","url"],a,n,!1);case 55:return d=e.sent,Nt(d||""),e.next=59,pp(["text","twitter"],a,n,!1);case 59:return c=e.sent,Ct(c||""),e.next=63,pp(["text","discord"],a,n,!1);case 63:return m=e.sent,Dt(m||""),e.next=67,pp(["text","farcaster"],a,n,!1);case 67:return f=e.sent,Wt(f||""),e.next=71,pp(["text","nostr"],a,n,!1);case 71:return b=e.sent,Bt(b||""),e.next=75,pp(["address","btc"],a,n,!1);case 75:return h=e.sent,Gt(h||""),e.next=79,pp(["address","ltc"],a,n,!1);case 79:return g=e.sent,Yt(g||""),e.next=83,pp(["address","doge"],a,n,!1);case 83:return x=e.sent,en(x||""),e.next=87,pp(["address","sol"],a,n,!1);case 87:return v=e.sent,sn(v||""),e.next=91,pp(["address","atom"],a,n,!1);case 91:T=e.sent,ln(T||"");case 93:e.next=114;break;case 95:Qe(a),Je(""),rt(""),qn(""),yt(""),mt(""),gt(""),wt(""),Nt(""),Ct(""),Dt(""),Wt(""),Bt(""),Gt(""),Yt(""),en(""),sn(""),ln(""),nt(!0);case 114:e.next=119;break;case 116:e.prev=116,e.t0=e.catch(0),console.error("Error in getResolver():",e.t0);case 119:case"end":return e.stop()}}),e,null,[[0,116]])})))).apply(this,arguments)}function pp(e,t,n,a){return lp.apply(this,arguments)}function lp(){return(lp=(0,v.Z)(j().mark((function e(t,n,a,s){var i,r,o,p,l,y;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s&&(t[1]?na(t[1]):na(t[0])),e.prev=1,"addr"!==t[0]){e.next=12;break}return e.next=5,Dr.resolveName(a);case 5:if(!(i=e.sent)){e.next=9;break}return s&&(rt(i),ya(i),na("1")),e.abrupt("return",i);case 9:case 19:case 34:case 44:case 59:return e.abrupt("return","");case 12:if("avatar"!==t[0]){e.next=22;break}return e.next=15,Dr.getAvatar(a);case 15:if(!(r=e.sent)){e.next=19;break}return s&&(yt(r),ya(r),na("1")),e.abrupt("return",r);case 22:if("pubkey"!==t[0]){e.next=27;break}return s&&(gt(""),ya(""),na("1")),e.abrupt("return","");case 27:if("contenthash"!==t[0]){e.next=37;break}return e.next=30,n.getContentHash();case 30:if(!(o=e.sent)){e.next=34;break}return s&&(qn(o),ya(o),na("1")),e.abrupt("return",o);case 37:if("text"!==t[0]){e.next=47;break}return e.next=40,n.getText(t[1]);case 40:if(!(p=e.sent)){e.next=44;break}return s&&("avatar"===t[1]&&yt(p),"email"===t[1]&&mt(p),"github"===t[1]&&wt(p),"url"===t[1]&&Nt(p),"twitter"===t[1]&&Ct(p),ya(p),na("1")),e.abrupt("return",p);case 47:if("address"!==t[0]){e.next=60;break}if(l="btc"===t[1]?0:"ltc"===t[1]?2:"doge"===t[1]?3:"sol"===t[1]?501:118,y="","btc"!==t[1]){e.next=56;break}return e.next=53,n.getAddress(l);case 53:y=e.sent,e.next=56;break;case 56:if(!y){e.next=59;break}return s&&("btc"===t[1]&&Gt(y),"ltc"===t[1]&&Yt(y),"doge"===t[1]&&en(y),"sol"===t[1]&&sn(y),"atom"===t[1]&&ln(y),ya(y),na("1")),e.abrupt("return",y);case 60:return s&&na("0"),e.abrupt("return","");case 64:return e.prev=64,e.t0=e.catch(1),console.error("Error in refreshRecord('".concat(t,"'):"),e.t0),s&&na("0"),e.abrupt("return","");case 69:case"end":return e.stop()}}),e,null,[[1,64]])})))).apply(this,arguments)}function yp(e,t,n,a){return up.apply(this,arguments)}function up(){return up=(0,v.Z)(j().mark((function e(t,n,a,i){var r,o,p;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},t?((o=JSON.parse(JSON.stringify(t,(function(e,t){return"bigint"===typeof t?String(t):t}))))._name._privKey&&(o._name._privKey._key={}),r=JSON.stringify(o)):r=JSON.stringify(r),p={ens:ye,controller:Mr,manager:Xa?E.computeAddress("0x".concat(Xa[0])):ee.DR,managerSignature:ir,revision:t?Zr.encode(t):{},chain:s,ipns:se,ipfs:i,gas:JSON.stringify(n),version:r,timestamp:a,hashType:oi},e.prev=3,e.next=6,fetch("".concat(Fr,":").concat(zr,"/revision"),{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}).then((function(e){return e.json()})).then((function(e){return!!e.status&&"true"===e.status}));case 6:e.next=16;break;case 8:e.prev=8,e.t0=e.catch(3),console.error("ERROR:","Failed to write Revision to CCIP2 backend"),Zs(["Revision Update Failed",""]),te(!0),b(!1),wr(!0),js("orangered");case 16:case"end":return e.stop()}}),e,null,[[3,8]])}))),up.apply(this,arguments)}function dp(){return(dp=(0,v.Z)(j().mark((function e(t,n,a){var i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={type:"read",ens:ye,controller:Fo(),recordsTypes:"all",recordsValues:"all",chain:s,storage:t,hashType:a},e.prev=1,e.next=4,fetch("".concat(Fr,":").concat(zr,"/read"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}).then((function(e){return e.json()})).then((function(e){var a={type:e.response.type,contenthash:e.response.contenthash,addr:e.response.addr,email:e.response.email,pubkey:e.response.pubkey,avatar:e.response.avatar,github:e.response.github,url:e.response.url,twitter:e.response.twitter,discord:e.response.discord,farcaster:e.response.farcaster,nostr:e.response.nostr,btc:e.response.btc,ltc:e.response.ltc,doge:e.response.doge,sol:e.response.sol,atom:e.response.atom,version:e.response.version,revision:e.response.revision,timestamp:e.response.timestamp,queue:ee.UW(e.response.timestamp),ownerstamp:e.response.ownerstamp};Ji(a);var s=[];if(a.ownerstamp.length>0)for(var i in a.ownerstamp)s.push(Number(a.ownerstamp[i]));t&&s.length>0&&"ownerhash"===n?gr(Math.round(Date.now()/1e3)-Math.max.apply(Math,s)-ee.A7):t&&s.length>0&&"recordhash"===n?gr(Math.round(Date.now()/1e3)-ee.UW(e.response.timestamp)-ee.A7):gr(1)}));case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.error("ERROR:","Failed to read from CCIP2 backend");case 9:case"end":return e.stop()}}),e,null,[[1,6]])})))).apply(this,arguments)}function cp(e){i(e),r(!0)}k.useEffect((function(){a.endsWith("#")||a.endsWith("-")||a.endsWith(":")||a.endsWith("&")?(y(!0),ue(a.slice(0,-1)),Zs([a.endsWith("-")||a.endsWith("&")?"Refreshing Records":a.endsWith("#")?"Checking History":"Loading Records","-"])):y(!1)}),[]),k.useEffect((function(){if(l&&ye){var e=C.VM(ye),t=I.keccak256(D.Y0(ye.split(".eth")[0]));Zn(e),Pn(String(R.O$.from(t))),In(String(R.O$.from(e))),qe(!0)}}),[l,ye]),k.useEffect((function(){ha&&ma(ha)}),[ha]),k.useEffect((function(){Yr&&Nr(String(Yr))}),[Yr]),k.useEffect((function(){if(Xr)if(String(Xr).length>2){var e="";(e=String(Xr).startsWith(ee.Kv)?"ipns://".concat(Ne.K5(String(Xr)).decoded):D.ZN(String(Xr))).startsWith("https://"),jn("".concat(e))}else jn("")}),[Xr]),k.useEffect((function(){if(eo)if(String(eo).length>2&&eo!==Xr){var e="";(e=String(eo).startsWith(ee.Kv)?"ipns://".concat(Ne.K5(String(eo)).decoded):D.ZN(String(eo))).startsWith("https://"),vn("".concat(e)),Zs(["This May Take a While",""]),Zs([a.endsWith("-")||a.endsWith("&")?"Refreshing Records":a.endsWith("#")?"Checking History":"Loading Records","-"])}else"0x"===String(eo)&&eo===Xr?vn(He===Cr?ee.U8:""):vn("")}),[eo,Xr,He]),k.useEffect((function(){Ui.trigger&&Ui.modalData&&(To?cp("".concat(ye,"#")):ko?cp("".concat(ye,"-")):Ro&&cp("".concat(ye,"&")))}),[Ui,To,ko,Ro]),k.useEffect((function(){Oi.trigger&&Oi.modalData&&(Is(!1),"0"===Oi.modalData?(Jn(!0),mr(1)):Qn(!0))}),[Oi]),k.useEffect((function(){"1"===ka&&(Ta&&!os?"storage"===Ta?pi("0"===Oi.modalData?"recordhash":"gateway"):Ei.trigger&&(pi("1"===Ei.modalData?"recordhash":"2"===Ei.modalData?"gateway":"ownerhash"),mr(1),ao()):Ta&&os&&(xn&&(xn.startsWith("https://")?pi("gateway"):pi("recordhash")),Sn&&!xn&&(Sn.startsWith("https://")?pi("gateway"):pi("ownerhash")),ss(!0)))}),[Ta,Ei,os,ka,Oi]),k.useEffect((function(){if(Mr)if(kr&&"true"===String(kr))Fn([Mr]);else{var e=Fo();Fn([e])}}),[Mn,Hr,Qr,kr,On]),k.useEffect((function(){Hr&&(String(Hr)===ee.O["1"===s?7:3]?Ga(!0):Ga(!1))}),[Hr]),k.useEffect((function(){var e="";if(lt.startsWith("ipfs://"))e="https://ipfs.io/ipfs/".concat(lt.split("ipfs://")[1]),ee.Hc(e).then((function(){bi(!0),bn(e)})).catch((function(){bi(!1),bn("")}));else if(lt.startsWith("eip155:".concat(s))){var t=lt.split(":")[2].split("/")[0],n=lt.split(":")[2].split("/")[1];ee.iJ.nft.getNftMetadata(t,n).then((function(t){e=t.media[0].thumbnail||t.media[0].gateway,ee.Hc(e).then((function(){bi(!0),bn(e)})).catch((function(){bi(!1),bn("")}))}))}else lt.startsWith("https://")&&(e=lt,ee.Hc(e).then((function(){bi(!0),bn(e)})).catch((function(){bi(!1),bn("")})))}),[lt]),k.useEffect((function(){if(zi.trigger&&void 0!==zi.modalData&&os){b(!0),Zs(["Waiting For Signature","gateway"!==oi?"1":"2"]);var e=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:yr(2),mr(2),Vo(ee.O1(10));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}else zi.trigger&&void 0!==zi.modalData&&!os&&ie(zi.modalData)}),[zi,oi,os]),k.useEffect((function(){var e,t;Mi.trigger&&void 0!==Mi.modalData&&!Va&&Ta&&ka&&(yr(1),mr(os?3:1),Zs(["Waiting For Signature","1"]),Kr({message:(e=I.keccak256(A.pack(["bytes32","address"],[I.keccak256(A.pack(["string"],[Mi.modalData])),Mr])),t=oi,"Requesting Signature To Generate IPNS Key\n\nOrigin: ".concat(["recordhash","gateway"].includes(t)?ye:Wr,"\nKey Type: ed25519\nExtradata: ").concat(e,"\nSigned By: ").concat(Ar))}),H(!0))}),[Mi,xn,Ta,ka,oi,os,us,Va]),k.useEffect((function(){if($i&&!Va){b(!0),Zs(["Generating IPNS Key",""]);var e=function(){var e=(0,v.Z)(j().mark((function e(){var t,n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="ownerhash"===oi?"eth:".concat(Mr||ee.DR):ye,e.next=3,(0,Se.x_)(t,Ar,$i,Mi.modalData);case 3:n=e.sent,Ya(n[0]),Zs(["IPNS Keypair Generated",""]);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[G,Va,Si,os,$i]),k.useEffect((function(){if(os&&Mi.trigger&&Si){Zs(["Waiting For Signature","2"]);var e=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:void 0!==Mi.modalData&&(yr(2),mr(3),Vo(Mi.modalData));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[Mi,Si,os,Ta]),k.useEffect((function(){if(os&&Si&&tr&&!_a){Hs([Fo(),C.VM(ye),Xa?E.computeAddress("0x".concat(Xa[0])):ee.DR]),b(!0),Zs(["Generating Signer Key",""]);var e=function(){var e=(0,v.Z)(j().mark((function e(){var t,n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="recordhash"!==oi?"eth:".concat(Mr||ee.DR):ye,e.next=3,(0,Se.x_)(t,Ar,tr,Mi.modalData);case 3:n=e.sent,es(n[1]),Da(!0),Zs(["Signer Keypair Generated",""]);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[tr,Si,os,_a]),k.useEffect((function(){if(Va&&$i){if("gateway"!==oi){var e=function(){var e=(0,v.Z)(j().mark((function e(){var t,n,a,s,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=ee.yt(Va),e.next=3,je.Dp(ke.UG.hexToBytes(t));case 3:n=e.sent,a=String(n),s=xn?xn.split("ipns://")[1]:"",i=Sn?Sn.split("ipns://")[1]:"",os&&(!a||a!==s&&a!==i)?a&&a!==s&&a!==i&&(Zi({modalData:void 0,trigger:!1}),Zs(["Seems Like Bad Password",""]),qo(),js("orangered"),yr(0),mr(0)):(ji(!0),ie(a));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}else os&&"gateway"===oi&&(ji(!0),ie(xn||Sn))}),[Va,$i,xn,Sn,os,oi]),k.useEffect((function(){Br&&1===lr?Qi(Br):Br&&3===lr?rr(Br):Br&&2===lr&&nr(Br)}),[Br,lr]),k.useEffect((function(){se&&!os?(mr(1),se.startsWith("k5")?lo():se.startsWith("https://")&&bo()):os&&(se.startsWith("k5")?mr(3):se.startsWith("https://")&&mr(2))}),[se,os]),k.useEffect((function(){if(us.length>1){var e=ca.map((function(e){return!ee.vc.includes(e.type)&&us.includes(e.type)?Ee(Ee({},e),{},{label:"Edit",help:"Set Record"}):Ee(Ee({},e),{},{label:"resolver"!==e.type?"storage"!==e.type?"Edit":"Set":"Migrate"})}));ga(e)}}),[us]),k.useEffect((function(){tt&&(Po(xn||(Sn||xn),it,Un,lt,ht,ct,Tt,kt,Rt,_t,At,Lt,Kt,Vt,Xt,an,pn),b(!1))}),[tt,oi,xn,Sn,He,it,Un,lt,ct,ht,Tt,kt,Rt,_t,At,Lt,Kt,Vt,Xt,an,pn]),k.useEffect((function(){Ue&&function(e,t,n){dp.apply(this,arguments)}(xn||Sn,xn&&xn.startsWith("ipns://")?"recordhash":Sn&&Sn.startsWith("ipns://")?"ownerhash":"gateway",xn&&xn.startsWith("ipns://")?"recordhash":Sn&&Sn.startsWith("ipns://")?"ownerhash":"gateway")}),[Ue,Sn,xn]),k.useEffect((function(){hr&&ye&&!tt&&function(e,t){op.apply(this,arguments)}(Hi,ye)}),[Hi,hr,ye,tt]),k.useEffect((function(){Hi&&hr&&!tt&&(xn?xn.startsWith("https://")?pi("gateway"):pi("recordhash"):Sn?Sn.startsWith("https://")?pi("gateway"):pi("ownerhash"):pi("storage"))}),[Hi,hr,He,xn,Sn,tt]),k.useEffect((function(){if(Ta&&us.length>0){var e=ca.map((function(e){return us.includes(e.type)&&!ee.ID.includes(e.type)?Ee(Ee({},e),{},{editable:hr>0,active:hr>0}):!us.includes(e.type)&&["resolver"].includes(e.type)?Ee(Ee({},e),{},{editable:!1,active:!1}):["storage"].includes(e.type)?Ee(Ee({},e),{},{editable:!1,active:He===Cr}):e}));ga(e)}}),[Ta,He,us]),k.useEffect((function(){as&&os&&(Va&&Xa&&Xa[0]&&se?us.length>0&&(b(!0),Zs(["Setting Records",String(us.length)]),mr(us.length)):("gateway"!==oi?Mi.trigger||Jn(!0):(Mi.trigger||Jn(!0),Ya(["0x","0x"])),ss(!1)))}),[as,Xa,se,os,oi,Mi]),k.useEffect((function(){if(ta&&["0","1"].includes(ta)){if("1"===ta){var e=ca.map((function(e){return e.type===ia?Ee(Ee({},e),{},{value:la}):Ee({},e)}));ga(e)}setTimeout((function(){na(".")}),1e4),setTimeout((function(){na("")}),3e4)}}),[ta,la,ia]),k.useEffect((function(){if(os&&Xa&&Xa[0]&&fs&&!ee.xb(fs)&&us.length>0){var e=ee.K5();us.forEach(function(){var t=(0,v.Z)(j().mark((function t(n){var a;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!fs[n]){t.next=4;break}return t.next=3,Go({message:Oo(ee.Th[ee.t8.indexOf(n)],zo(n,fs[n]),Xa[0])});case 3:a=t.sent;case 4:a&&(e[n]=a);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),qs(e)}}),[os,Xa,fs,us]),k.useEffect((function(){!os||kr||ir||ee.xb(Us)?os&&kr&&!ee.xb(Us)&&rr("0x"):(mr(3),function(){Jo.apply(this,arguments)}())}),[kr,Us,oi]),k.useEffect((function(){var e=0;for(var t in Us)Us.hasOwnProperty(t)&&""!==Us[t]&&e++;if(os&&se&&e===us.length&&e>0&&ir){var n=ee.K5();for(var a in fs)fs.hasOwnProperty(a)&&""!==fs[a]&&(n[a]=Wo(a,fs[a]));var i={signatures:Us,manager:Xa?E.computeAddress("0x".concat(Xa[0])):ee.DR,managerSignature:ir,ens:ye,controller:Mr||ee.DR,ipns:se,recordsTypes:us,recordsValues:n,recordsRaw:fs,revision:Hi.revision,chain:s,hashType:oi},r=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Zs(["Writing Records",""]),e.prev=1,e.next=4,fetch("".concat(Fr,":").concat(zr,"/write"),{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}).then((function(e){return e.json()})).then(function(){var e=(0,v.Z)(j().mark((function e(t){var n,a,s,i,r;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Zs(["gateway"!==oi?"Publishing to IPNS":"Publishing to Gateway",""]),!Xa||!t.response){e.next=7;break}return n={},ca.map(function(){var e=(0,v.Z)(j().mark((function e(a){var s,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("resolver"===a.type||!t.response.meta[a.type]){e.next=22;break}return s=$o(a.type,t.response[a.type]),i=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([s]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=5,i();case 5:s.then((function(e){var t=d&&d.formatted&&d.formatted.gasPrice?Number(d.formatted.gasPrice):0;n[a.type]=e*t*1e-9})),"avatar"===a.type&&yt(t.response.avatar),"email"===a.type&&mt(t.response.email),"pubkey"===a.type&>(t.response.pubkey),"github"===a.type&&wt(t.response.github),"url"===a.type&&Nt(t.response.url),"twitter"===a.type&&Ct(t.response.twitter),"discord"===a.type&&Dt(t.response.discord),"farcaster"===a.type&&Wt(t.response.farcaster),"nostr"===a.type&&Bt(t.response.nostr),"btc"===a.type&&Gt(t.response.btc),"ltc"===a.type&&Yt(t.response.ltc),"doge"===a.type&&en(t.response.doge),"sol"===a.type&&sn(t.response.sol),"atom"===a.type&&ln(t.response.atom),"zonehash"===a.type&&dn(t.response.zonehash),"contenthash"===a.type&&qn(t.response.contenthash);case 22:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=6,new Promise((function(e){!function t(){Object.keys(n).length>0?e():setTimeout(t,100)}()}));case 6:"gateway"!==oi&&Va?(a=ee.yt(Va),i=function(){var e=(0,v.Z)(j().mark((function e(){var i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,je.Dp(ke.UG.hexToBytes(a));case 2:s=e.sent,i=function(){var e=(0,v.Z)(j().mark((function e(){var a,i,r,o;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.response.ipfs&&s&&n)){e.next=30;break}if(di(t.response.ipfs.split("ipfs://")[1]),a="/ipfs/"+t.response.ipfs.split("ipfs://")[1],Hi.revision){e.next=9;break}return e.next=6,je.v0(s,a);case 6:i=e.sent,e.next=13;break;case 9:return r=Zr.decode(new Uint8Array(Object.values(JSON.parse(JSON.stringify(Hi.revision))))),e.next=12,je.nP(r,a);case 12:i=e.sent;case 13:return ei(t.response.timestamp),e.next=16,yp(i,n,t.response.timestamp,t.response.ipfs.split("ipfs://")[1]);case 16:return e.next=18,je.nY(i,s.key);case 18:Ba(n),Fe(!0),ds([]),$s(ee.gk()),b(!1),o=ca.map((function(e){if(ee.vc.includes(e.type))return e;var n=Math.round(Date.now()/1e3)-ee.UW(t.response.timestamp)-ee.A7;return gr("gateway"===oi?1:n),t.response.meta[e.type]?Ee(Ee({},e),{},{value:t.response[e.type],state:!0,label:"edit",active:n>0,editable:n>0}):Ee(Ee({},e),{},{active:n>0,editable:n>0})})),ga(o),bs(ee.K5()),qs(ee.K5()),ss(!1),yr(0),Zi({modalData:void 0,trigger:!1});case 30:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Object.keys(n).length>0&&i();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i()):(r=function(){var e=(0,v.Z)(j().mark((function e(){var a;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=17;break}return ei(t.response.timestamp),e.next=4,yp(void 0,n,t.response.timestamp,"");case 4:Ba(n),Fe(!0),ds([]),$s(ee.gk()),b(!1),a=ca.map((function(e){if(ee.vc.includes(e.type))return e;return gr(1),t.response.meta[e.type]?Ee(Ee({},e),{},{value:t.response[e.type],state:!0,label:"edit",active:!0,editable:!0}):Ee(Ee({},e),{},{active:!0,editable:!0})})),ga(a),bs(ee.K5()),qs(ee.K5()),ss(!1),yr(0),Zi({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1});case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r());case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 4:e.next=14;break;case 6:e.prev=6,e.t0=e.catch(1),console.error("ERROR:","Failed to write to CCIP2 backend"),Zs(["Record Update Failed",""]),te(!0),b(!1),wr(!0),js("orangered");case 14:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(){return e.apply(this,arguments)}}();r()}os||ss(!1)}),[ir]),k.useEffect((function(){io&&To&&T&&!os&&!Y&&(us.includes("resolver")?(Wa("1"===Ei.modalData?'Resolver Migrated! You may now set IPNS Storage next':'Resolver Migrated! You may now set HTTP Storage next'),Ce(!0),Ko()):(Wa('Off-chain Setup Complete with Ownerhash. Enjoy!'),Ce(!0),Ko()))}),[io,To,T,us,He,os]),k.useEffect((function(){if(uo&&ko&&se){var e=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yp(void 0,{},"","");case 2:vn("ipns://".concat(se)),Zs(["Transaction Confirmed","1"]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[uo,ko,se]),k.useEffect((function(){go&&Ro&&se&&(vn("".concat(se)),Zs(["Transaction Confirmed","1"]))}),[go,Ro,se]),k.useEffect((function(){xn&&ko&&!os&&!Y?(Wa('Off-chain Setup Complete with Recordhash. Enjoy!'),Ce(!0),Ko()):xn&&Ro&&!os&&!Y&&(Wa('Off-chain Setup Complete with HTTP Gateway. Enjoy!'),Ce(!0),Ko())}),[xn,ko,Ro,os]),k.useEffect((function(){if(io&&To){var e=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Zs(["Transaction Confirmed","1"]),setTimeout((function(){Je(Cr),S(!0)}),2e3);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[io,To]),k.useEffect((function(){so&&!ro?(b(!0),Zs(["Waiting for Transaction","1"]),xi&&vi(!1)):ro&&!so&&(xi?xi&&vi(!1):(Zs(["Transaction Declined by User",""]),qo()),Zi({modalData:void 0,trigger:!1}),Pi({modalData:void 0,trigger:!1}))}),[so,ro]),k.useEffect((function(){So&&!wo?(b(!0),Zs(["Waiting for Confirmation","1"]),xi&&vi(!1)):!So&&wo&&(xi?xi&&vi(!1):(Zs(["Transaction Failed",us.includes("storage")?"1":"2"]),qo()),Zi({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1}))}),[So,wo]),k.useEffect((function(){!co&&yo?(b(!0),Zs(["Waiting for Transaction","1"]),xi&&vi(!1)):co&&!yo&&(xi?xi&&vi(!1):(Zs(["Transaction Declined by User",""]),qo()),Zi({modalData:void 0,trigger:!1}),Ii({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1}))}),[yo,co]),k.useEffect((function(){!xo&&ho?(b(!0),Zs(["Waiting for Transaction","1"]),xi&&vi(!1)):xo&&!ho&&(xi?xi&&vi(!1):(Zs(["Transaction Declined by User",""]),qo()),Zi({modalData:void 0,trigger:!1}),Ii({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1}))}),[ho,xo]),k.useEffect((function(){Mo&&!No?(b(!0),Zs(["Waiting for Confirmation",us.includes("storage")?"1":"2"]),xi&&vi(!1)):!Mo&&No&&(xi?xi&&vi(!1):(Zs(["Transaction Failed",us.includes("storage")?"1":"2"]),qo()),Zi({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1}))}),[Mo,No]),k.useEffect((function(){Eo&&!Co?(b(!0),Zs(["Waiting for Confirmation",us.includes("storage")?"1":"2"]),xi&&vi(!1)):!Eo&&Co&&(xi?xi&&vi(!1):(Zs(["Transaction Failed",us.includes("storage")?"1":"2"]),qo()),Zi({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1}))}),[Eo,Co]),k.useEffect((function(){if(qr&&!Ur&&Ta)b(!0),xi&&vi(!1);else if(Ur&&!qr&&Ta){if(xi)xi&&vi(!1);else{Zs(["Signature Failed",String(lr)]),qo(),ps(!1),ss(!1),$s(ee.gk()),bs(ee.K5());var e=ca.map((function(e){return"storage"!==e.type?e:Ee(Ee({},e),{},{state:!1})}));ga(e),us.includes("resolver")&&cp("".concat(ye,"#")),Na("0")}Zi({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1})}}),[qr,Ur,Ta,lr,us]);var mp=t?(0,K.jsx)(Ie,{style:{backgroundColor:f?"black":"rgba(0, 0, 0, 1)"},children:(0,K.jsxs)(Oe,{style:{background:f?"none":"#121212"},children:[(0,K.jsx)(De,{children:(0,K.jsx)("a",{href:"#",onClick:function(e){rr(""),qs(ee.K5()),es(void 0),Ya(void 0),nr(""),Qi(""),i("".concat(ye,"+")),r(!0),e.preventDefault(),n()},children:(0,K.jsx)("span",{className:"material-icons-round",style:{marginTop:f?"120px":"7px"},children:"close"})})}),ye&&f&&(0,K.jsx)(_e,{children:(0,K.jsx)("span",{className:"material-icons-round miui-small",style:{marginTop:"4px"}})}),ye&<&&fi&&!f&&ca.length>0&&(0,K.jsx)(_e,{children:(0,K.jsx)("img",{src:fn||lt,width:"100px",alt:ye,onError:function(){return bi(!1)}})}),ye&&(!lt||!fi)&&!f&&ca.length>0&&(0,K.jsxs)(_e,{children:["-"===ai.avatar&&(0,K.jsx)("div",{className:"flex-column",children:(0,K.jsx)(oe.ZP.Bars,{width:"110px",fill:"#fc6603"})}),["0","1",""].includes(ai.avatar)&&(0,K.jsx)("span",{className:"material-icons-round miui",style:{marginTop:"4px"},children:"portrait"})]}),ye&&f&&(0,K.jsx)(Pe,{children:(0,K.jsxs)("div",{className:"flex-column",style:{marginTop:"-10px",marginBottom:"80px"},children:[(0,K.jsx)("div",{style:{marginTop:"20px"},children:(0,K.jsx)(ve.Z,{height:50,width:50})}),(0,K.jsx)("div",{style:{marginTop:"20px"},children:(0,K.jsx)("span",{style:{color:"#fc6603",fontSize:"20px",fontWeight:"700"},children:Ms[0]})}),Ms[1]&&"-"!==Ms[1]&&(0,K.jsx)("div",{style:{marginTop:"10px"},children:(0,K.jsxs)("span",{style:{color:"white",fontSize:"18px",fontWeight:"700"},children:[(0,K.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"22px"},children:"gateway"!==oi?Ms[1]:os?String(Number(Ms[1])-1):Ms[1]}),(0,K.jsx)("span",{children:" Of "}),(0,K.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"22px"},children:"gateway"!==oi?cr:os?cr-1:cr})]})}),Ms[1]&&"-"===Ms[1]&&(0,K.jsx)("div",{style:{marginTop:"10px"},children:(0,K.jsx)("span",{style:{color:"white",fontSize:"18px",fontWeight:"700"},children:(0,K.jsx)("span",{children:Ms[0].includes("Refresh")?"Please Be Patient":"This May Take Some Time"})})})]})}),ye&&ca.length>0&&!f&&(0,K.jsx)(Pe,{children:(0,K.jsxs)("div",{className:"flex-column",children:[(0,K.jsxs)("div",{style:{marginBottom:"15px",marginTop:"-15px"},children:[(0,K.jsx)("span",{style:{color:"white",fontSize:"20px",fontWeight:"700",fontFamily:"SF Mono"},children:ye.split(".eth")[0]}),(0,K.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"15px",color:"cyan"},children:"."}),(0,K.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:"11px",color:"cyan",fontWeight:"700",letterSpacing:"0px",marginTop:"13px"},children:"ETH"})]}),(0,K.jsx)("div",{className:"scrollable-div",style:{maxHeight:"500px",overflowY:"scroll"},children:(0,K.jsx)("ul",{style:{listStyle:"none",color:"white",marginLeft:X.tq?"0":"-5%"},children:(0,K.jsx)("div",{className:"flex-column",style:{paddingBottom:X.tq?"5px":"15px",paddingTop:"10px"},children:ca.map((function(e){return(0,K.jsxs)("li",{style:{display:"flex",flexDirection:"column",width:X.tq?"480px":"530px",maxWidth:X.tq?"85%":"95%",paddingLeft:"15px",paddingRight:"15px"},children:[(0,K.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",flexDirection:"column"},children:[(0,K.jsxs)("div",{style:{marginBottom:"10px",display:"flex",justifyContent:"space-between",width:X.tq?"90%":"100%"},children:[(0,K.jsxs)("span",{style:{fontFamily:"Spotnik",fontWeight:"700",fontSize:"15px",color:ee.IN.includes(e.type)?"orange":"cyan",marginRight:"15px"},children:["storage"===e.type&&(0,K.jsxs)("span",{children:[(0,K.jsx)("span",{className:"material-icons-round smol",style:{fontSize:"20px",display:"inline-block",color:"white"},children:"cloud_circle"}),"\xa0",(0,K.jsx)("span",{style:{position:"relative",top:"-2px",left:"1px"},children:oi})]}),"storage"!==e.type&&(0,K.jsxs)("span",{children:[(0,K.jsx)("span",{className:"material-icons-round smol",style:{fontSize:"20px",display:"inline-block",color:"white"},children:"storage"===e.type?"cloud_circle":"resolver"===e.type?"gavel":"avatar"===e.type?"portrait":"addr"===e.type?"account_balance_wallet":"contenthash"===e.type?"public":"github"===e.type?"code":"url"===e.type?"share":"email"===e.type?"email":"pubkey"===e.type?"key":"discord"===e.type?"group_add":"farcaster"===e.type?"people_alt":"nostr"===e.type?"groups":"btc"===e.type?"currency_bitcoin":"ltc"===e.type?"currency_lira":"doge"===e.type?"pets":"sol"===e.type?"flash_on":"atom"===e.type?"font_download":"zonehash"===e.type?"tag":"circle_notifications"}),"\xa0",(0,K.jsx)("span",{style:{position:"relative",top:"-2px",left:"1px"},children:e.header})]}),ee.vc.includes(e.type)&&He===Cr&&!xn&&Sn&&(0,K.jsx)("button",{className:"button-tiny",onClick:function(){fe(!0),vs("gpp_good"),js("resolver"===e.type?"lime":Sn===ee.U8?"yellow":"cyan"),Ca("resolver"===e.type?'Resolver is Migrated':'Global '.concat(Sn.startsWith("https://")?Sn===ee.U8?"Default Storage":"Custom Gateway":"IPNS",' is set as Ownerhash'))},"data-tooltip":"resolver"===e.type?"Resolver Is Migrated":"".concat(Sn.startsWith("https://")?Sn===ee.U8?"Default Storage Is Ownerhash":"Custom Gateway Is Ownerhash":"IPNS Ownerhash Is Set"),children:(0,K.jsx)("div",{className:"material-icons-round smol",style:{color:"resolver"===e.type?"lime":Sn===ee.U8?"yellow":(Sn.startsWith("https://"),"cyan")},children:"gpp_good"})}),ee.vc.includes(e.type)&&He===Cr&&xn&&(0,K.jsx)("button",{className:"button-tiny",onClick:function(){fe(!0),vs("gpp_good"),js("resolver"===e.type?"lime":xn.startsWith("https://")?xn===ee.U8?"yellow":"cyan":"lime"),Ca("resolver"===e.type?'Resolver is Migrated':''.concat(xn.startsWith("https://")?xn===ee.U8?"Default Storage":"Custom Gateway":"IPNS"," is set as Recordhash"))},"data-tooltip":"resolver"===e.type?"Resolver Is Migrated":"".concat(xn.startsWith("https://")?xn===ee.U8?"Default Storage":"Custom Gateway":"Recordhash"," Is Set"),children:(0,K.jsx)("div",{className:"material-icons-round smol",style:{color:"resolver"===e.type?"lime":xn.startsWith("https://")?xn===ee.U8?"yellow":"cyan":"lime",marginLeft:(e.type,"5px")},children:"gpp_good"})}),ee.vc.includes(e.type)&&He!==Cr&&!xn&&!Sn&&(0,K.jsx)("button",{className:"button-tiny",onClick:function(){fe(!0),vs("resolver"===e.type?"gpp_bad":"cancel"),js("orangered"),Ca((e.type,'Resolver is not Migrated'))},"data-tooltip":(e.type,"Resolver Not Migrated"),children:(0,K.jsx)("div",{className:"material-icons-round smol",style:{color:"orangered",marginLeft:(e.type,"5px")},children:"resolver"===e.type?"gpp_bad":"cancel"})}),ee.vc.includes(e.type)&&He!==Cr&&(xn||Sn)&&(0,K.jsx)("button",{className:"button-tiny",onClick:function(){fe(!0),vs("resolver"===e.type?"gpp_bad":"gpp_maybe"),js("resolver"===e.type?"orangered":xn?"orange":"lightblue"),Ca("resolver"===e.type?'Resolver not Migrated':xn?''.concat(xn.startsWith("https://")?"Gateway":"Recordhash",' is Set as Recordhash'):''.concat(Sn.startsWith("https://")?"Gateway":"Ownerhash",' is Set as Ownerhash'))},"data-tooltip":xn?"Resolver not Migrated. ".concat(xn.startsWith("https://")?"Gateway":"Recordhash"," Exists as Recordhash"):"Resolver not Migrated. ".concat(Sn.startsWith("https://")?"Gateway":"Ownerhash"," Exists as Ownerhash"),children:(0,K.jsx)("div",{className:"material-icons-round smol",style:{color:"resolver"===e.type?"orangered":xn?"orange":"lightblue",marginLeft:(e.type,"5px")},children:"resolver"===e.type?"gpp_bad":"gpp_maybe"})}),"storage"===e.type&&(0,K.jsx)("button",{className:"button-tiny",onClick:function(){Fs(!0)},"data-tooltip":"Click For IPFS Hash",disabled:!ui,children:(0,K.jsx)("div",{className:"material-icons-round smoller",style:{color:ui?xn&&xn!==ee.U8?"lime":"cyan":"orange",fontSize:"17px",marginLeft:"-5.5px"},children:"rss_feed"})}),"resolver"!==e.type&&(0,K.jsx)("button",{className:"button-tiny",onClick:function(){fe(!0),vs("info"),js(ee.IN.includes(e.type)?"orange":"cyan"),Ca(ee.IN.includes(e.type)?'In Process of Bug Fixing':"".concat(e.help,""))},"data-tooltip":ee.IN.includes(e.type)?"Coming Soon":"Enlighten Me",children:(0,K.jsx)("div",{className:"material-icons-round smol",style:{color:ee.IN.includes(e.type)?"orange":"cyan",marginLeft:"storage"===e.type?"-5px":"5px"},children:"info_outline"})}),!ee.vc.includes(e.type)&&!ee.IN.includes(e.type)&&He===Cr&&(xn||Sn)&&(0,K.jsx)("button",{className:"button-tiny",onClick:function(){fe(!0),vs("timer"),js(hr<0?"orange":"lime"),Ca(hr<0?'Too Soon To Update. Please wait at least one hour between updates':'Ready For Next Record Update')},"data-tooltip":hr<0?"Too Soon To Update":"Ready For Next Update",children:(0,K.jsx)("div",{className:"material-icons-round smol",style:{color:hr<0?"orange":"lime",marginLeft:"-5px"},children:"timer"})}),!ee.vc.includes(e.type)&&!ee.IN.includes(e.type)&&He===Cr&&Mr&&(xn||Sn)&&Hi.ownerstamp.length>0&&(0,K.jsx)("button",{className:["",".","0","1"].includes(ta)||ta!==e.type?"button-tiny":"button-tiny blink",onClick:function(){""===ta&&pp([e.type,""],$e,ye,!0),ra(e.type)},"data-tooltip":[e.type,".","0","1"].includes(ta)?[".","","0","1"].includes(ta)?"1"===ta?"Record Updated":"0"===ta?"No New Update":"."===ta?"Please Wait to Refresh again":"-"===ta?"No New Update":"Click to Refresh":"Refresh in Progress":e.value.toLowerCase()===Hi[e.type].toLowerCase()?"Record in Sync with ".concat("gateway"===oi?"Gateway":"IPNS"):"Record not in Sync. Click to refresh",children:(0,K.jsx)("div",{className:"material-icons-round smol",style:{color:[e.type,".","0","1"].includes(ta)?[".","","0","1"].includes(ta)?"1"===ta?"lime":"0"===ta?"yellow":"."===ta?"white":"-"===ta?"yellow":"cyan":"white":e.value.toLowerCase()===Hi[e.type].toLowerCase()?"lightgreen":"orange",marginLeft:"-5px"},children:"sync"})}),e.state&&(0,K.jsx)("div",{className:"material-icons-round smol",style:{color:Y&&Tr?"orangered":"lime",marginLeft:"-5px"},children:Y&&Tr?"cancel":"task_alt"})]}),(0,K.jsx)("button",{className:"resolver"===e.type&&He!==Cr&&zn.includes(String(Mr))?"button emphasis":"button",hidden:"resolver"===e.type&&Do(e)||!Mr,disabled:Do(e),style:{alignSelf:"flex-end",height:"25px",width:"auto",marginBottom:"6px",background:Do(e)?_o(e)?"none":"rgb(255, 255, 255, 0.2)":_o(e)?"none":"linear-gradient(112deg, rgba(190,95,65,1) 0%, rgba(191,41,36,1) 48%, rgba(203,111,0,1) 100%)"},onClick:function(){wa(e.type),Na("1"),"resolver"===e.type?Ps(!0):"storage"===e.type?Is(!0):ps(!0),ee.vc.includes(e.type)&&ds((function(t){return[].concat((0,x.Z)(t),[e.type])}))},"data-tooltip":e.tooltip,children:(0,K.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"13px",color:ee.vc.includes(e.type)?"white":Ys[e.type]?us.length>1?"lime":"white":"grey"},children:[_o(e)?"":e.label,"\xa0",(0,K.jsx)("span",{className:"material-icons-round smoller",children:_o(e)?Ys[e.type]?"task_alt":"cancel":"manage_history"})]})})]}),(0,K.jsxs)("div",{className:"flex-row",style:{width:"100%"},children:[(0,K.jsx)("input",{className:ee.vc.includes(e.type)?He!==Cr?"inputextra_":"storage"===e.type&&e.value==ee.U8?"inputextra__":"inputextra":He!==Cr?"inputextra_":ee.IN.includes(e.type)?"inputextra___":"inputextra",id:e.key,placeholder:ee.IN.includes(e.type)?"Coming Soon":e.value,type:"text",disabled:!e.editable||ee.IN.includes(e.type)||!zn.includes(String(Mr)),style:{background:He!==Cr||ee.IN.includes(e.type)||!zn.includes(String(Mr))?ee.vc.includes(e.type)?"linear-gradient(90deg, rgba(100,0,0,0.5) 0%, rgba(100,25,25,0.5) 50%, rgba(100,0,0,0.5) 100%)":"none":"storage"===e.type&&e.value===ee.U8?"linear-gradient(90deg, rgba(50,50,0,0.5) 0%, rgba(50,50,25,0.5) 50%, rgba(50,50,0,0.5) 100%)":"linear-gradient(90deg, rgba(0,50,0,0.5) 0%, rgba(25,50,25,0.5) 50%, rgba(0,50,0,0.5) 100%)",fontFamily:"SF Mono",fontWeight:"400",fontSize:"14px",width:"100%",wordWrap:"break-word",textAlign:"left",marginTop:"-5px",marginBottom:"-5px",paddingRight:ee.vc.includes(e.type)?"0":"10px",color:Ys[e.type]?"storage"===e.type&&e.value===ee.U8?"yellow":"lightgreen":"white",cursor:"copy"},onChange:function(t){!function(e,t){var n=t.trim(),a=Ys;if(a.resolver=!1,"storage"===e)a[e]=!0;else if("contenthash"===e)a[e]=ee.rv(n);else if("addr"===e)a[e]=ee.Q1(n);else if("avatar"===e)a[e]=ee.tr(n);else if("email"===e)a[e]=ee.Jh(n);else if("pubkey"===e)a[e]=ee.V4(n);else if("github"===e)a[e]=ee.wE(n);else if("url"===e)a[e]=ee.CB(n);else if("twitter"===e)a[e]=ee.L3(n);else if("discord"===e)a[e]=ee.Iu(n);else if("farcaster"===e)a[e]=ee.Io(n);else if("nostr"===e)a[e]=ee.Jh(n)||ee.MP(n);else if("btc"===e)a[e]=ee.MP(n);else if("ltc"===e)a[e]=ee.Yo(n);else if("doge"===e)a[e]=ee.fp(n);else if("sol"===e)a[e]=ee.A2(n);else if("atom"===e)a[e]=ee.s8(n);else{if("zonehash"!==e)return ds((function(t){return[].concat((0,x.Z)(t),[e])})),void console.error("Error:","Illegal State Checkpoint");a[e]=ee.MS(n)}$s(a);var s=fs;s[e]=n,bs(s);var i=us;!i.includes(e)&&fs[e]?ds((function(t){return[].concat((0,x.Z)(t),[e])})):i.includes(e)&&!fs[e]&&ds((function(t){return t.filter((function(t){return t!==e}))}));var r=ca.map((function(e){return us.includes(e.type)?Ee(Ee({},e),{},{editable:!0,active:!0,state:!1}):e}));ga(r)}(e.type,t.target.value)}},e.key),!ee.vc.includes(e.type)&&!ee.IN.includes(e.type)&&(0,K.jsx)("div",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700",marginLeft:"-25px",color:"1"===ai[e.type]?"lightgreen":"-"===ai[e.type]?"white":"grey"},children:"1"===ai[e.type]?"hourglass_bottom":"-"===ai[e.type]?"hourglass_top":"hourglass_empty"})]})]}),(0,K.jsx)("hr",{style:{marginTop:"5px"}})]},e.key)}))})})}),us.length>1&&!us.includes("resolver")&&!us.includes("storage")&&(0,K.jsx)("div",{style:{marginTop:"-10px",marginBottom:"40px"},children:(0,K.jsx)("button",{className:"button flex-column",hidden:us.length<2,disabled:!Mr||!zn.includes(String(Mr))||fs===ee.K5(),style:{alignSelf:"flex-end",height:"30px",width:"auto",marginTop:"-3px"},onClick:function(){wa("records"),Na("1"),ps(!0)},"data-tooltip":"Set Multiple Records in One Click",children:(0,K.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"15px"},children:["Edit All","\xa0",(0,K.jsx)("span",{className:"material-icons-round smoller",children:"manage_history"})]})})})]})}),(0,K.jsxs)("div",{id:"modal-inner",children:[(0,K.jsx)(B.Z,{color:Ss,icon:xs,onClose:function(){return fe(!1)},show:me,position:"",children:Ra}),(0,K.jsx)(Te.Z,{color:Ss,icon:xs,onClose:function(){return Ce(!1)},show:ge,handleTrigger:function(e){qi((function(t){return Ee(Ee({},t),{},{trigger:e})}))},handleModalData:function(e){qi((function(t){return Ee(Ee({},t),{},{modalData:e})}))},children:Aa}),(0,K.jsx)(xe,{color:"lime",icon:"free_breakfast",onClose:function(){Fe(!1),b(!1)},show:ze,children:La}),(0,K.jsx)(re,{handleTrigger:function(e){},handleModalData:function(e){},onClose:function(){Fs(!1)},show:zs,children:ui}),(0,K.jsx)(U.Z,{handleTrigger:function(e){Zi((function(t){return Ee(Ee({},t),{},{trigger:e})})),e?Na("1"):(Na("0"),wa("")),Jn(!1)},handleModalData:function(e){Zi((function(t){return Ee(Ee({},t),{},{modalData:e})}))},onClose:function(){Jn(!1)},show:Hn,children:[ye,oi]}),(0,K.jsx)(q.Z,{handleTrigger:function(e){Fi((function(t){return Ee(Ee({},t),{},{trigger:e})})),e?Na("1"):(Na("0"),wa(""))},handleModalData:function(e){Fi((function(t){return Ee(Ee({},t),{},{modalData:e})}))},onClose:function(){Qn(!1)},show:$n}),(0,K.jsx)($,{handleTrigger:function(e){Pi((function(t){return Ee(Ee({},t),{},{trigger:e})})),e?Na("1"):(Na("0"),wa(""))},handleModalData:function(e){Pi((function(t){return Ee(Ee({},t),{},{modalData:e})}))},onClose:function(){Ps(!1)},show:Es&&"resolver"===Ta,children:!!Sn||!!xn}),(0,K.jsx)(we.Z,{handleTrigger:function(e){Ii((function(t){return Ee(Ee({},t),{},{trigger:e})})),e?Na("1"):(Na("0"),wa(""))},handleModalData:function(e){Ii((function(t){return Ee(Ee({},t),{},{modalData:e})}))},onClose:function(){Is(!1)},show:Os&&!Hn,children:"1"}),(0,K.jsx)(Q.Z,{onClose:function(){te(!1),vi(!0)},color:Ss,show:Y&&!f,title:"cancel",children:Ms[0]})]})]})}):null;return l?N.createPortal(mp,document.getElementById("modal")):null}},41894:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(85518),d=n(73935),c=n(14141),m=n(22794),f=n(85893),b=c.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 5px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 25px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n margin-top: 5px;\n"]))),h=c.ZP.div(s||(s=(0,p.Z)(["\n margin-top: -15px;\n font-size: 14px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n margin-left: 10px;\n"]))),g=c.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),x=c.ZP.div(r||(r=(0,p.Z)(["\n position: fixed;\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 460px;\n max-width: ",";\n height: 310px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 3px;\n"])),u.tq?"90%":"60%"),v=c.ZP.div(o||(o=(0,p.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.show,n=e.onClose,a=e.children,s=e.handleModalData,i=e.handleTrigger,r=y.useState(""),o=(0,l.Z)(r,2),p=o[0],u=o[1],c=y.useState(""),T=(0,l.Z)(c,2),w=T[0],S=T[1],j=y.useState(!1),k=(0,l.Z)(j,2),N=k[0],M=k[1],Z=y.useState(!1),R=(0,l.Z)(Z,2),C=R[0],E=R[1],P=y.useState(""),_=(0,l.Z)(P,2),D=_[0],O=_[1];y.useEffect((function(){M(!0)}),[]);var I=t?(0,f.jsxs)(v,{children:[(0,f.jsxs)(x,{children:[(0,f.jsx)(g,{children:(0,f.jsx)("a",{href:"#",onClick:function(e){s(void 0),i(!1),u(""),S(""),e.preventDefault(),n()},children:(0,f.jsx)("span",{className:"material-icons",children:"close"})})}),t&&(0,f.jsxs)(h,{children:[(0,f.jsx)("div",{className:"material-icons",style:{marginTop:"4px",fontSize:"66px",color:"lightgreen"},children:"key"}),(0,f.jsxs)("div",{style:{marginTop:"5px"},children:[(0,f.jsx)("span",{style:{fontSize:"16px",fontWeight:"700"},children:"Enter Secret Key Identifier"}),(0,f.jsx)("button",{className:"button-tiny",style:{marginTop:"-7.5px"},onClick:function(){E(!0),O('Secret identifier or Password is an Optional Value required to generate a secure IPNS key or the Record Signer key or RSA Encryption key.

You will need it to update your records in the future. Please remember your choice.

Your provided password will apply to all three Key types.
')},"data-tooltip":"Enlighten Me",children:(0,f.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]})]}),(0,f.jsxs)(b,{children:[(0,f.jsxs)("form",{className:"flex-column",style:{marginLeft:"13px",marginTop:"7px"},children:[(0,f.jsxs)("div",{className:"flex-row",style:{width:"150%"},children:[(0,f.jsx)("input",{id:"username",placeholder:"username (.eth domain)",type:"text",value:w||(a&&a.length>0?a[0]:""),readOnly:!!(a&&a.length>0),onChange:function(e){S(e.target.value)},style:{background:"black",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"150%",wordWrap:"break-word",textAlign:"left",color:w?w.endsWith(".eth")?"lime":"white":a&&a.length>0?"cyan":"rgb(255, 255, 255, 0.6)",cursor:"copy",marginBottom:"10px"}},"0"),(0,f.jsx)("button",{className:"button-tiny",style:{marginTop:"-12.5px"},disabled:!0,onClick:function(){E(!0),O('Username')},"data-tooltip":"Username",children:(0,f.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]}),(0,f.jsxs)("div",{className:"flex-row",style:{width:"150%"},children:[(0,f.jsx)("input",{id:"password",placeholder:"password (optional)",type:"password",value:p,onChange:function(e){u(e.target.value)},style:{background:"black",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"150%",wordWrap:"break-word",textAlign:"left",color:p?"white":"rgb(255, 255, 255, 0.6)",cursor:"copy"}},"1"),(0,f.jsx)("button",{className:"button-tiny",style:{marginTop:"0px"},disabled:!0,onClick:function(){E(!0),O('Secret IPNS identifier')},"data-tooltip":"Password",children:(0,f.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]})]}),(0,f.jsx)("button",{className:"button",style:{height:"33px",width:"130px",padding:"5px",marginTop:"20px",fontSize:"16px",fontWeight:"700"},onClick:function(){s(a&&a.length>0?p:"".concat(w,":").concat(p)),i(!0),u(""),S(""),n()},"data-tooltip":"Click to proceed",children:(0,f.jsxs)("div",{className:"flex-row",style:{fontSize:"15px"},children:["proceed","\xa0",(0,f.jsx)("span",{className:"material-icons smoller",children:"vpn_key"})]})})]})]}),(0,f.jsx)("div",{id:"modal-inner",children:(0,f.jsx)(m.Z,{color:"cyan",icon:"info",onClose:function(){return E(!1)},show:C,position:"",children:D})})]}):null;return N?d.createPortal(I,document.getElementById("modal")):null}},46822:function(e,t,n){"use strict";n.d(t,{Z:function(){return de}});var a,s,i,r,o,p,l,y,u,d,c=n(71383),m=n(27812),f=n(50029),b=n(59499),h=n(16835),g=n(87794),x=n.n(g),v=n(67294),T=n(73935),w=n(14141),S=n(79911),j=n(2593),k=n(27586),N=n(83875),M=n(16441),Z=n(84243),R=n(8198),C=n(38197),E=n(31886),P=n(84917),_=n(57734),D=n(37918),O=n.n(D),I=n(56371),A=n(22794),W=n(41894),z=n(85518),F=n(62012),L=n(85893),B=w.ZP.div(a||(a=(0,c.Z)(["\n padding-top: 5px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 25px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n margin-top: 5px;\n"]))),U=w.ZP.div(s||(s=(0,c.Z)(["\n margin-top: -15px;\n font-size: 14px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n margin-left: 10px;\n"]))),q=w.ZP.div(i||(i=(0,c.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),K=w.ZP.div(r||(r=(0,c.Z)(["\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 460px;\n max-width: ",";\n height: 360px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 3px;\n"])),z.tq?"90%":"60%"),G=w.ZP.div(o||(o=(0,c.Z)(["\n position: fixed;\n top: -30px;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"]))),H=function(e){var t=e.show,n=e.onClose,a=(e.children,e.handleModalData),s=e.handleTrigger,i=v.useState(!1),r=(0,h.Z)(i,2),o=r[0],p=r[1],l=v.useState(["white","white"]),y=(0,h.Z)(l,2),u=y[0],d=y[1],c=v.useState(""),m=(0,h.Z)(c,2),f=m[0],b=m[1],g=v.useState(""),x=(0,h.Z)(g,2),w=x[0],S=x[1],j=v.useState(""),k=(0,h.Z)(j,2),N=k[0],M=k[1],Z=v.useState(!1),R=(0,h.Z)(Z,2),C=R[0],E=R[1],P=v.useState(""),_=(0,h.Z)(P,2),D=_[0],O=_[1];v.useEffect((function(){p(!0)}),[]);var I=t?(0,L.jsxs)(G,{children:[(0,L.jsxs)(K,{children:[(0,L.jsx)(q,{children:(0,L.jsx)("a",{href:"#",onClick:function(e){s(!1),a(void 0),d(["white","white"]),e.preventDefault(),n()},children:(0,L.jsx)("span",{className:"material-icons",children:"close"})})}),(0,L.jsxs)(U,{children:[(0,L.jsx)("div",{className:"material-icons",style:{marginTop:"10px",fontSize:"66px",color:"lightgreen"},children:"shopping_cart_checkout"}),(0,L.jsxs)("div",{style:{marginTop:"17px",marginBottom:"0px"},children:[(0,L.jsx)("span",{style:{fontSize:"18px",fontWeight:"700"},children:"Enter Payment Info"}),(0,L.jsx)("button",{className:"button-tiny",style:{marginTop:"-7.5px",marginLeft:"5px"},onClick:function(){E(!0),O("Please Specify the Requested Details To Receive Private Payment")},"data-tooltip":"Enlighten Me",children:(0,L.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]})]}),(0,L.jsxs)(B,{children:[(0,L.jsxs)("div",{className:"flex-row",style:{width:"400px",marginTop:"5px"},children:[(0,L.jsx)("input",{id:"info",placeholder:"enter payer .eth",type:"text",style:{background:"black",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"90%",wordWrap:"break-word",textAlign:"left",color:u[0],cursor:"copy"},onChange:function(e){var t;(t=e.target.value).endsWith(".eth")?(b(t),d(["lime",u[1],u[2]])):(b(""),d(["white",u[1],u[2]]))}},"0"),(0,L.jsx)("button",{className:"button-tiny",style:{marginTop:"0px"},onClick:function(){E(!0),O('ENS Of Sender')},"data-tooltip":"Sender",children:(0,L.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]}),(0,L.jsxs)("div",{className:"flex-row",style:{width:"400px",marginTop:"7px"},children:[(0,L.jsx)("input",{id:"info",placeholder:"enter payee address or .eth",type:"text",style:{background:"black",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"90%",wordWrap:"break-word",textAlign:"left",color:u[1],cursor:"copy"},onChange:function(e){var t;t=e.target.value,F.Q1(t)||F.K9(t)?(S(t),d([u[0],"lime",u[2]])):(S(""),d([u[0],"white",u[2]]))}},"1"),(0,L.jsx)("button",{className:"button-tiny",style:{marginTop:"0px"},onClick:function(){E(!0),O('Private Address Of Receiver')},"data-tooltip":"Receiver",children:(0,L.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]}),(0,L.jsxs)("div",{className:"flex-row",style:{width:"400px",marginTop:"7px"},children:[(0,L.jsx)("input",{id:"info",placeholder:"enter amount to receive",type:"text",style:{background:"black",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"90%",wordWrap:"break-word",textAlign:"left",color:u[2],cursor:"copy"},onChange:function(e){var t;"0"===(t=e.target.value)||"0."===t||/[a-zA-Z]/.test(t)?(M(""),d([u[0],u[1],"white"])):(M(t),d([u[0],u[1],"lime"]))}},"2"),(0,L.jsx)("button",{className:"button-tiny",style:{marginTop:"0px"},onClick:function(){E(!0),O('Amount To Receiver')},"data-tooltip":"Ether",children:(0,L.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]}),(0,L.jsx)("button",{className:"button",style:{height:"33px",width:"90px",padding:"5px",marginTop:"17px",fontSize:"16px",fontWeight:"700"},onClick:function(e){s(!0),a("".concat(f,":").concat(w,":").concat(N)),d(["white","white","white"]),e.preventDefault(),n()},disabled:!f||!w||!N,"data-tooltip":"Confirm",children:(0,L.jsxs)("div",{className:"flex-row",style:{fontSize:"15px"},children:["Next","\xa0",(0,L.jsx)("span",{className:"material-icons smoller",children:"navigate_next"})]})})]})]}),(0,L.jsx)("div",{id:"modal-inner",children:(0,L.jsx)(A.Z,{color:"cyan",icon:"info",onClose:function(){return E(!1)},show:C,position:"",children:D})})]}):null;return o?T.createPortal(I,document.getElementById("modal")):null},J=n(64637),V=n(22661),Y=n(59595),$=n(36490),Q=n(19745),X=n(24978),ee=n(67191),te=n(71775),ne=n(35133),ae=n(21429),se=n(58903);function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function re(e){for(var t=1;t0,state:!1,label:"Set",help:'Set Encryption Public Key To Send Money',tooltip:"Set New RSA PubKey"},{key:1,header:"Encrypted Payment",type:"stealth",value:e,editable:!1,active:Qe===oi&&Js>0,state:!1,label:"Set",help:'Encrypted Payment Address To Receive Money',tooltip:"Set New Stealth Payment"}])}function qi(e,t){return"Requesting Signature To Generate IPNS Key\n\nOrigin: ".concat(["recordhash","storage"].includes(t)?ve:fi,"\nKey Type: ed25519\nExtradata: ").concat(e,"\nSigned By: ").concat(mi)}function Ki(e,t,n){var a="eip155:"+i+":"+N.computeAddress("0x".concat(n));return"Requesting Signature To Update ENS Record\n\nOrigin: ".concat(ve,"\nRecord Type: ").concat(e,"\nExtradata: ").concat(t,"\nSigned By: ").concat(a)}function Gi(e){var t="eip155:"+i+":"+N.computeAddress("0x".concat(e));return"Requesting Signature To Approve ENS Records Signer\n\nOrigin: ".concat(ve,"\nApproved Signer: ").concat(t,"\nApproved By: ").concat(mi)}function Hi(e){return"Requesting Signature To Generate ENS Records Signer\n\nOrigin: ".concat(ve,"\nKey Type: secp256k1\nExtradata: ").concat(e,"\nSigned By: ").concat(mi)}function Ji(e){return"Requesting Signature To Generate Encryption Key\n\nOrigin: ".concat(ve,"\nKey Type: RSA-2048\nExtradata: ").concat(e,"\nSigned By: ").concat(mi)}function Vi(e,t){var n="",a="";["stealth","rsa"].includes(e)&&(a="string",n=t);var s=Z.$.encode([a],[n]),i=[F.z7];return new R.vU(i).encodeFunctionData("signedRecord",[$n?N.computeAddress("0x".concat($n[0])):F.DR,Aa[e],Is,s])}function Yi(e,t){var n="",a="";["stealth","rsa"].includes(e)&&(n="string",a=t);var s=Z.$.encode([n],[a]),i=C.keccak256(s);return M.hexlify(E.pack(["bytes"],[i]))}function $i(){return Ei&&_i?String(Ei)===F.O["1"===i?7:3]?Ii?String(Ii):F.DR:String(_i):F.DR}function Qi(){ce(!0),mn(""),ya([]),he(""),_s(""),Qn(void 0),qn(void 0),Jn(void 0),D(!1),ks(""),Rs(""),Nn(!1),Ut(!1),ls({modalData:void 0,trigger:!1}),cs({modalData:void 0,trigger:!1}),is(!1),ia&&ra(!1)}function Xi(){ga("gpp_good"),wa("lime"),Ut(!1),Qn(void 0),qn(void 0),Jn(void 0),_s(""),ks(""),Rs(""),he(""),Nn(!1),ls({modalData:void 0,trigger:!1}),cs({modalData:void 0,trigger:!1}),is(!1),mn(""),D(!1),ia&&ra(!1),na(!1)}function er(e){return tr.apply(this,arguments)}function tr(){return tr=(0,f.Z)(x().mark((function e(t){var n,a;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!$n){e.next=4;break}return n=function(){var e=(0,f.Z)(x().mark((function e(){var n,a;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new S.Wallet("0x"+$n[0],ui),e.next=3,n.signMessage(t.message);case 3:if(!(a=e.sent)){e.next=6;break}return e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=n(),e.abrupt("return",a);case 4:case"end":return e.stop()}}),e)}))),tr.apply(this,arguments)}function nr(){return nr=(0,f.Z)(x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ls(4),Na(["Waiting For Signature","rsa"===cn?"4":"3"]),$n&&(t=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:wi({message:Gi($n[0])});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),t());case 3:case"end":return e.stop()}}),e)}))),nr.apply(this,arguments)}function ar(e){return sr.apply(this,arguments)}function sr(){return sr=(0,f.Z)(x().mark((function e(t){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ls(2),n=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:wi({message:Hi(C.keccak256(E.pack(["bytes32","address"],[C.keccak256(E.pack(["string"],[t])),si])))});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n();case 3:case"end":return e.stop()}}),e)}))),sr.apply(this,arguments)}function ir(e,t){return rr.apply(this,arguments)}function rr(){return rr=(0,f.Z)(x().mark((function e(t,n){var a,s;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=function(){var e=(0,f.Z)(x().mark((function e(){var a,s;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=new ci.eth.Contract(F.qP[6].contractInterface,F.qP[6].addressOrName),!["stealth","rsa"].includes(t)){e.next=5;break}return e.next=4,a.methods.setText(k.VM(ve),t,n).estimateGas({from:si});case 4:s=e.sent;case 5:return e.abrupt("return",s);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=3,a();case 3:return s=e.sent,e.abrupt("return",s);case 5:case"end":return e.stop()}}),e)}))),rr.apply(this,arguments)}function or(e){return pr.apply(this,arguments)}function pr(){return pr=(0,f.Z)(x().mark((function e(t){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getText("stealth").then((function(e){e?(Ot(e),lr(t)):(Ot(""),lr(t))})).catch((function(){Ot(""),lr(t)}));case 2:case"end":return e.stop()}}),e)}))),pr.apply(this,arguments)}function lr(e){return yr.apply(this,arguments)}function yr(){return yr=(0,f.Z)(x().mark((function e(t){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getText("rsa").then((function(e){e?(zt(e),ot(!0)):(zt(""),ot(!0))})).catch((function(){zt(""),ot(!0)}));case 2:case"end":return e.stop()}}),e)}))),yr.apply(this,arguments)}function ur(){return(ur=(0,f.Z)(x().mark((function e(t,n){var a,s,i,r,o,p;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ui.getResolver(n);case 3:if(null===(a=e.sent)||void 0===a||!a.address){e.next=38;break}if(Xe(a.address),at(a),a.address!==oi){e.next=27;break}return e.next=10,te.I7(n,pi,$i());case 10:if(s=e.sent,!(t.ownerstamp.length>1)){e.next=22;break}r=0;case 13:if(!(r<2)){e.next=20;break}return e.next=16,F.TN(ee.K5(s[0]).decoded,r);case 16:i=e.sent;case 17:r++,e.next=13;break;case 20:e.next=23;break;case 22:i=1===t.ownerstamp.length?{_value:"//",_sequence:"-1"}:{_value:"//",_sequence:""};case 23:$a(i._value.split("/")[2]),t.ownerstamp.length>=1&&Number(i._sequence)===Number(t.timestamp.revision)-1&&s[1]?(t.stealth||t.rsa?(Ot(t.stealth),zt(t.rsa)):(Ot(""),zt("")),ot(!0)):or(a),e.next=36;break;case 27:return e.next=29,dr(["text","stealth"],a,n,!1);case 29:return o=e.sent,Ot(o||""),e.next=33,dr(["text","rsa"],a,n,!1);case 33:p=e.sent,zt(p||""),ot(!0);case 36:e.next=43;break;case 38:at(a),Xe(""),Ot(""),zt(""),ot(!0);case 43:e.next=48;break;case 45:e.prev=45,e.t0=e.catch(0),console.error("Error in getResolver():",e.t0);case 48:case"end":return e.stop()}}),e,null,[[0,45]])})))).apply(this,arguments)}function dr(e,t,n,a){return cr.apply(this,arguments)}function cr(){return(cr=(0,f.Z)(x().mark((function e(t,n,a,s){var i;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s&&(t[1]?Ht(t[1]):Ht(t[0])),e.prev=1,"text"!==t[0]){e.next=10;break}return e.next=5,n.getText(t[1]);case 5:if(!(i=e.sent)){e.next=10;break}return"stealth"===t[1]?Ot(i):"rsa"===t[1]&&zt(i),s&&(tn(i),Ht("1")),e.abrupt("return",i);case 10:return s&&Ht("0"),e.abrupt("return","");case 14:return e.prev=14,e.t0=e.catch(1),console.error("Error in refreshRecord('".concat(t,"'):"),e.t0),s&&Ht("0"),e.abrupt("return","");case 19:case"end":return e.stop()}}),e,null,[[1,14]])})))).apply(this,arguments)}function mr(e,t,n,a){return fr.apply(this,arguments)}function fr(){return fr=(0,f.Z)(x().mark((function e(t,n,a,s){var r,o,p;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},t?((o=JSON.parse(JSON.stringify(t,(function(e,t){return"bigint"===typeof t?String(t):t}))))._name._privKey&&(o._name._privKey._key={}),r=JSON.stringify(o)):r=JSON.stringify(r),p={ens:ve,controller:si,manager:$n?N.computeAddress("0x".concat($n[0])):F.DR,managerSignature:Is,revision:t?ii.encode(t):{},chain:i,ipns:be,ipfs:s,gas:JSON.stringify(n),version:r,timestamp:a,hashType:Ha},e.prev=3,e.next=6,fetch("".concat(hi,":").concat(bi,"/revision"),{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}).then((function(e){return e.json()})).then((function(e){return!!e.status&&"true"===e.status}));case 6:e.next=16;break;case 8:e.prev=8,e.t0=e.catch(3),console.error("ERROR:","Failed to write Revision to CCIP2 backend"),Na(["Revision Update Failed",""]),ce(!0),D(!1),Xs(!0),wa("orangered");case 16:case"end":return e.stop()}}),e,null,[[3,8]])}))),fr.apply(this,arguments)}function br(){return br=(0,f.Z)(x().mark((function e(t,n,a){var s;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={type:"read",ens:ve,controller:$i(),recordsTypes:["stealth","rsa","revision","version"],recordsValues:"all",chain:i,storage:t,hashType:a},e.prev=1,e.next=4,fetch("".concat(hi,":").concat(bi,"/read"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then((function(e){return e.json()})).then((function(e){var a={type:e.response.type,stealth:e.response.stealth,rsa:e.response.rsa,version:e.response.version,revision:e.response.revision,timestamp:e.response.timestamp,queue:F.UW(e.response.timestamp),ownerstamp:e.response.ownerstamp};Ts(a);var s=[];if(a.ownerstamp.length>0)for(var i in a.ownerstamp)s.push(Number(a.ownerstamp[i]));t&&s.length>0&&"ownerhash"===n?Vs(Math.round(Date.now()/1e3)-Math.max.apply(Math,s)-F.A7):t&&s.length>0&&"recordhash"===n?Vs(Math.round(Date.now()/1e3)-F.UW(e.response.timestamp)-F.A7):Vs(1)}));case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.error("ERROR:","Failed to read from CCIP2 backend");case 9:case"end":return e.stop()}}),e,null,[[1,6]])}))),br.apply(this,arguments)}v.useEffect((function(){s.endsWith(".eth")?(u(!0),Te(s),Na(["Loading Stealth Records","-"])):u(!1)}),[]),v.useEffect((function(){if(y&&ve){var e=k.VM(ve),t=C.keccak256(P.Y0(ve.split(".eth")[0]));xt(e),St(String(j.O$.from(t))),Mt(String(j.O$.from(e))),Ve(!0)}}),[y,ve]),v.useEffect((function(){ln&&rn(ln)}),[ln]),v.useEffect((function(){Di&&ai(String(Di))}),[Di]),v.useEffect((function(){if(Ai)if(String(Ai).length>2){var e="";(e=String(Ai).startsWith(F.Kv)?"ipns://".concat(ee.K5(String(Ai)).decoded):P.ZN(String(Ai))).startsWith("https://"),ft("".concat(e))}else ft(void 0)}),[Ai]),v.useEffect((function(){if(Wi)if(String(Wi).length>2&&Wi!==Ai){var e="";(e=String(Wi).startsWith(F.Kv)?"ipns://".concat(ee.K5(String(Wi)).decoded):P.ZN(String(Wi))).startsWith("https://"),ut("".concat(e)),Na(["Loading Stealth Records","-"])}else ut(void 0)}),[Wi,Ai]),v.useEffect((function(){bs.trigger&&bs.modalData}),[bs]),v.useEffect((function(){"1"===hn&&cn&&ia&&(yt&&(yt.startsWith("https://")?Ja("gateway"):Ja("recordhash")),mt&&!yt&&(mt.startsWith("https://")?Ja("gateway"):Ja("ownerhash")),na(!0))}),[cn,ia,hn]),v.useEffect((function(){if(si)if(ni&&"true"===String(ni))Et([si]);else{var e=$i();Et([e])}}),[gt,Ei,Ii,ni,Nt]),v.useEffect((function(){Ei&&(String(Ei)===F.O["1"===i?7:3]?Fn(!0):Fn(!1))}),[Ei]),v.useEffect((function(){if(Ri&&Fi){var e=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Na(["Transaction Confirmed",""]),setTimeout((function(){Dn('Payment Sent Successfully'),Ke(!0),Xi()}),1e3);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[Ri,Fi]),v.useEffect((function(){Zi&&!Mi?(D(!0),Na(["Waiting for Transaction",""]),es&&ts(!1)):Mi&&!Zi&&(es?es&&ts(!1):(Na(["Transaction Declined by User",""]),Qi()),ls({modalData:void 0,trigger:!1}))}),[Zi,Mi]),v.useEffect((function(){Bi&&!Li?(D(!0),Na(["Waiting for Confirmation",""]),es&&ts(!1)):!Bi&&Li&&(es?es&&ts(!1):(Na(["Transaction Failed",""]),Qi()),ls({modalData:void 0,trigger:!1}))}),[Bi,Li]),v.useEffect((function(){var e="";ds.trigger&&ds.modalData,ps.trigger&&void 0!==ps.modalData&&(e=ps.modalData),"rsa"===cn&&"gateway"!==Ha?ps.trigger&&!Un&&hn&&(Ls(1),Na(["Waiting For Signature","1"]),wi({message:qi(C.keccak256(E.pack(["bytes32","address"],[C.keccak256(E.pack(["string"],[e])),si])),Ha)}),K(!0)):"stealth"===cn&&"gateway"!==Ha?ds.trigger&&!Un&&hn&&!F.xb(ca)&&(Ls(1),Na(["Waiting For Signature","1"]),wi({message:qi(C.keccak256(E.pack(["bytes32","address"],[C.keccak256(E.pack(["string"],[e])),si])),Ha)}),K(!0)):cn&&"gateway"===Ha&&ks("0")}),[ps,ds,yt,cn,hn,Ha,ia,la,Un]),v.useEffect((function(){"stealth"===cn&&ps.trigger&&void 0!==ps.modalData&&Ca(!0)}),[ps,cn]),v.useEffect((function(){"stealth"===cn&&(ds.trigger||ds.modalData||(ls({modalData:void 0,trigger:!1}),Ca(!1)))}),[ds,cn]),v.useEffect((function(){Rn&&ps.trigger&&void 0!==ps.modalData&&(Ls(3),Ks(1),Na(["Waiting For Signature","1"]),wi({message:Ji(C.keccak256(E.pack(["bytes32","address"],[C.keccak256(E.pack(["string"],[ps.modalData])),si])))}),K(!0))}),[ps,Rn,Ha]),v.useEffect((function(){if(Rn&&q&&Zs&&ps.trigger){Na(["Generating Encryption Key","+"]);var e="recordhash"!==Ha?"eth:".concat(si||F.DR):ve,t=new Worker(new URL(n.p+n.u(556),n.b));return t.onmessage=function(e){var t=F.T5(e.data[0]),n=Object.assign(Object.create(F.IQ),t);Jn([n,e.data[1]]),Na(["Encryption Keypair Generated",""])},t.onerror=function(e){if(e instanceof Event)return console.error("\u274c ERROR:",e),Jn(void 0),D(!1),Na(["Failed To Generate RSA Key",""]),Qi(),wa("orangered"),Ls(0),void Ks(0);console.error("\u274c UNKNOWN ERROR:",e),Jn(void 0),D(!1),Na(["Unknown Error While Generating RSA Key",""]),Qi(),wa("orangered"),Ls(0),Ks(0)},t.postMessage({_origin:e,_caip10:mi,_sigRSA:Zs,_salt:ps.modalData}),function(){t.terminate()}}}),[Zs,Rn,q,ps]),v.useEffect((function(){if(Rn&&void 0!==Hn&&Ze){Na(["Decrypting Invoice",""]);try{var e=ae.decrypt(Ze,Hn[0]),t=JSON.parse(e.plaintext).payee,n=JSON.parse(e.plaintext).amount,a=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.endsWith(".eth")){e.next=5;break}return e.next=3,ui.resolveName(t).then((function(e){e&&_e(e)})).catch((function(){D(!1),Na(["Bad Payee",""]),Qi(),wa("orangered"),Ls(0),Ks(0)}));case 3:e.next=6;break;case 5:_e(t);case 6:Ae(n),D(!1);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();a()}catch(s){console.error("ERROR:",s),D(!1),Na(["Bad Invoice",""]),Qi(),wa("orangered"),Ls(0),Ks(0)}}}),[Hn,Rn,Ze]),v.useEffect((function(){if(!js||Un||kn||Rn){if(Zs&&!Hn&&kn){Na(["Generating Encryption Key","+"]);var e="recordhash"!==Ha?"eth:".concat(si||F.DR):ve,t=new Worker(new URL(n.p+n.u(2174),n.b));return t.onmessage=function(e){var t=F.T5(e.data[0]),n=Object.assign(Object.create(F.IQ),t);Jn([n,e.data[1]]),Na(["Encryption Keypair Generated",""])},t.onerror=function(e){if(e instanceof Event)return console.error("\u274c ERROR:",e),Jn(void 0),D(!1),Na(["Failed To Generate RSA Key",""]),Qi(),wa("orangered"),Ls(0),void Ks(0);console.error("\u274c UNKNOWN ERROR:",e),Jn(void 0),D(!1),Na(["Unknown Error While Generating RSA Key",""]),Qi(),wa("orangered"),Ls(0),Ks(0)},t.postMessage({_origin:e,_caip10:mi,_sigRSA:Zs,_salt:ps.modalData}),function(){t.terminate()}}}else if("0"!==js){D(!0),Na(["Generating IPNS Key",""]);var a=function(){var e=(0,f.Z)(x().mark((function e(){var t,n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="ownerhash"===Ha?"eth:".concat(si||F.DR):ve,e.next=3,(0,$.x_)(t,mi,js,ps.modalData);case 3:n=e.sent,qn(n[0]),Na(["IPNS Keypair Generated",""]);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();a()}else qn(["0x","0x"]),is(!0)}),[q,Un,ss,ia,js,kn,Zs,Hn,Rn]),v.useEffect((function(){if(ia&&ps.trigger&&ss&&(_a||"rsa"===cn)){Na(["Waiting For Signature","2"]);var e=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:void 0!==ps.modalData&&(Ls(2),Ks("rsa"===cn?4:3),ar(ps.modalData));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[ps,ss,ia,_a,cn]),v.useEffect((function(){if(ia&&ss&&Ps&&!kn){La([$i(),k.VM(ve),$n?N.computeAddress("0x".concat($n[0])):F.DR]),D(!0),Na(["Generating Signer Key",""]);var e=function(){var e=(0,f.Z)(x().mark((function e(){var t,n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="recordhash"!==Ha?"eth:".concat(si||F.DR):ve,e.next=3,(0,$.x_)(t,mi,Ps,ps.modalData);case 3:n=e.sent,Qn(n[1]),Nn(!0),Na(["Signer Keypair Generated",""]);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[Ps,ss,ia,kn]),v.useEffect((function(){var e="";ps.trigger&&void 0!==ps.modalData&&(e=ps.modalData),"rsa"===cn&&hn&&kn&&ps.trigger?(Ls(3),Na(["Waiting For Signature","3"]),wi({message:Ji(C.keccak256(E.pack(["bytes32","address"],[C.keccak256(E.pack(["string"],[e])),si])))}),K(!0)):"stealth"===cn&&hn&&kn&&ps.trigger&&Na(["Waiting For Signature","2"])}),[kn,ps,cn]),v.useEffect((function(){"stealth"===cn?Ks(3):"rsa"===cn&&Ks(4)}),[cn]),v.useEffect((function(){if(Un&&js){if("gateway"!==Ha){var e=function(){var e=(0,f.Z)(x().mark((function e(){var t,n,a,s,i;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=F.yt(Un),e.next=3,Q.Dp(X.UG.hexToBytes(t));case 3:n=e.sent,a=String(n),s=yt?yt.split("ipns://")[1]:"",i=mt?mt.split("ipns://")[1]:"",ia&&(!a||a!==s&&a!==i?a&&a!==s&&a!==i&&(ls({modalData:void 0,trigger:!1}),Na(["Seems Like Bad Password",""]),Qi(),wa("orangered"),Ls(0),Ks(0)):(is(!0),he(a)));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}else ia&&"gateway"===Ha&&(is(!0),he("gateway"))}),[Un,js,Ha,yt,mt,ia]),v.useEffect((function(){xi&&1===Fs?ks(xi):xi&&4===Fs?As(xi):xi&&2===Fs?_s(xi):xi&&3===Fs&&Rs(xi)}),[xi,Fs]),v.useEffect((function(){if(ds.trigger&&ds.modalData){Na(["Fetching Payer Encryption Key",""]),D(!0);var e=ds.modalData.split(":")[0],t=ds.modalData.split(":")[1],n=ds.modalData.split(":")[2],a=function(){var a=(0,f.Z)(x().mark((function a(){var s,i;return x().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,ui.getResolver(e);case 2:if(null===(s=a.sent)||void 0===s||!s.address){a.next=9;break}return i="",a.next=7,s.getText("rsa").then((function(a){if(a){Na(["Waiting For Signature","2"]),i=a;var s;s=ae.encrypt('{"payer":"'.concat(e,'","payee":"').concat(t,'","amount":"').concat(n,'"}'),i);var r=ca;r.stealth=s.cipher,ma(r),Da(!0);var o=la;!o.includes("stealth")&&ca.stealth?ya((function(e){return[].concat((0,m.Z)(e),["stealth"])})):o.includes("stealth")&&!ca.stealth&&ya((function(e){return e.filter((function(e){return"stealth"!==e}))}))}else i="",D(!1),Na(["Payer Has No Encryption Record",""]),Qi(),wa("orangered"),Ls(0),Ks(0)})).catch((function(){i="",D(!1),Na(["Failed To Fetch Encryption Record",""]),Qi(),wa("orangered"),Ls(0),Ks(0)}));case 7:a.next=15;break;case 9:Na(["Payer Has No Resolver",""]),D(!1),Qi(),wa("orangered"),Ls(0),Ks(0);case 15:case"end":return a.stop()}}),a)})));return function(){return a.apply(this,arguments)}}();a()}else if(Hn&&!ds.trigger){var s=ca;s.rsa=Hn[1],ma(s);var i=la;!i.includes("rsa")&&ca.rsa?ya((function(e){return[].concat((0,m.Z)(e),["rsa"])})):i.includes("rsa")&&!ca.rsa&&ya((function(e){return e.filter((function(e){return"rsa"!==e}))}))}}),[be,Hn,ia,ds]),v.useEffect((function(){rt&&(Ui(Dt,Wt),D(!1))}),[rt,yt,mt,Qe,Ha,Dt,Wt]),v.useEffect((function(){Je&&function(e,t,n){br.apply(this,arguments)}(yt||mt,yt&&yt.startsWith("ipns://")?"recordhash":mt&&mt.startsWith("ipns://")?"ownerhash":"gateway",yt&&yt.startsWith("ipns://")?"recordhash":mt&&mt.startsWith("ipns://")?"ownerhash":"gateway")}),[Je,mt,yt]),v.useEffect((function(){Js&&ve&&!rt&&function(e,t){ur.apply(this,arguments)}(vs,ve)}),[vs,Js,ve,rt]),v.useEffect((function(){vs&&Js&&!rt&&(yt?yt.startsWith("https://")?Ja("gateway"):Ja("recordhash"):mt?mt.startsWith("https://")?Ja("gateway"):Ja("ownerhash"):Ja("storage"))}),[vs,Js,Qe,yt,mt,rt]),v.useEffect((function(){if(cn&&la.length>0){var e=sn.map((function(e){return la.includes(e.type)&&!F.ID.includes(e.type)?re(re({},e),{},{editable:Js>0,active:Js>0}):e}));yn(e)}}),[cn,Qe,la]),v.useEffect((function(){ta&&ia&&Un&&$n&&$n[0]&&be&&la.length>0&&(D(!0),Na(["Setting Records",String(la.length)]))}),[ta,$n,be,ia,Ha]),v.useEffect((function(){if(Gt&&["0","1"].includes(Gt)){if("1"===Gt){var e=sn.map((function(e){return e.type===Yt?re(re({},e),{},{value:en}):re({},e)}));yn(e)}setTimeout((function(){Ht(".")}),1e4),setTimeout((function(){Ht("")}),3e4)}}),[Gt,en,Yt]),v.useEffect((function(){if(ia&&$n&&$n[0]&&ca&&!F.xb(ca)&&la.length>0){var e=F.RY();la.forEach(function(){var t=(0,f.Z)(x().mark((function t(n){var a;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!ca[n]){t.next=4;break}return t.next=3,er({message:Ki(F.yc[F.IX.indexOf(n)],Yi(n,ca[n]),$n[0])});case 3:a=t.sent;case 4:a&&(e[n]=a);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),Wa(e)}}),[ia,$n,ca,la]),v.useEffect((function(){!ia||ni||Is||F.xb(Aa)?ia&&ni&&!F.xb(Aa)&&As("0x"):(Ks("rsa"===cn?4:3),function(){nr.apply(this,arguments)}())}),[ni,Aa,Ha]),v.useEffect((function(){var e=0;for(var t in Aa)Aa.hasOwnProperty(t)&&""!==Aa[t]&&e++;if(ia&&be&&e===la.length&&e>0&&Is){var n=F.RY();for(var a in ca)ca.hasOwnProperty(a)&&""!==ca[a]&&(n[a]=Vi(a,ca[a]));var s={signatures:Aa,manager:$n?N.computeAddress("0x".concat($n[0])):F.DR,managerSignature:Is,ens:ve,controller:si||F.DR,ipns:be,recordsTypes:la,recordsValues:n,recordsRaw:ca,revision:vs.revision,chain:i,hashType:Ha},r=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Na(["Writing Records",""]),e.prev=1,e.next=4,fetch("".concat(hi,":").concat(bi,"/write"),{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then((function(e){return e.json()})).then(function(){var e=(0,f.Z)(x().mark((function e(t){var n,a,s,i,r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Na(["gateway"!==Ha?"Publishing to IPNS":"Publishing to Gateway",""]),!$n||!t.response){e.next=7;break}return n={},sn.map(function(){var e=(0,f.Z)(x().mark((function e(a){var s,i;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!["stealth","rsa"].includes(a.type)||!t.response.meta[a.type]){e.next=7;break}return s=ir(a.type,t.response[a.type]),i=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([s]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=5,i();case 5:s.then((function(e){var t=c&&c.formatted&&c.formatted.gasPrice?Number(c.formatted.gasPrice):0;n[a.type]=e*t*1e-9})),"stealth"===a.type?Ot(t.response.stealth):"rsa"===a.type&&zt(t.response.rsa);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=6,new Promise((function(e){!function t(){Object.keys(n).length>0?e():setTimeout(t,100)}()}));case 6:"gateway"!==Ha&&Un?(a=F.yt(Un),i=function(){var e=(0,f.Z)(x().mark((function e(){var i;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Q.Dp(X.UG.hexToBytes(a));case 2:s=e.sent,i=function(){var e=(0,f.Z)(x().mark((function e(){var a,i,r,o;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.response.ipfs&&s&&n)){e.next=31;break}if($a(t.response.ipfs.split("ipfs://")[1]),a="/ipfs/"+t.response.ipfs.split("ipfs://")[1],vs.revision){e.next=9;break}return e.next=6,Q.v0(s,a);case 6:i=e.sent,e.next=13;break;case 9:return r=ii.decode(new Uint8Array(Object.values(JSON.parse(JSON.stringify(vs.revision))))),e.next=12,Q.nP(r,a);case 12:i=e.sent;case 13:return qa(t.response.timestamp),e.next=16,mr(i,n,t.response.timestamp,t.response.ipfs.split("ipfs://")[1]);case 16:return e.next=18,Q.nY(i,s.key);case 18:An(n),ya([]),o=sn.map((function(e){if(["stealth","rsa"].includes(e.type)){var n=Math.round(Date.now()/1e3)-F.UW(t.response.timestamp)-F.A7;return Vs(n),t.response.meta[e.type]?re(re({},e),{},{value:t.response[e.type],state:!0,active:n>0}):re(re({},e),{},{active:n>0})}return e})),yn(o),ma(F.RY()),Wa(F.RY()),na(!1),Ls(0),ls({modalData:void 0,trigger:!1}),Dn("stealth"===cn?'Stealth Record Set! You may now Receive Private Payments':'Encryption Key Set! You may now Send Private Payments'),Ke(!0),_e(""),Xi();case 31:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Object.keys(n).length>0&&i();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i()):(r=function(){var e=(0,f.Z)(x().mark((function e(){var a;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=18;break}return qa(t.response.timestamp),e.next=4,mr(void 0,n,t.response.timestamp,"");case 4:An(n),ya([]),D(!1),a=sn.map((function(e){if(["resolver","storage"].includes(e.type))return e;return Vs(1),t.response.meta[e.type]?re(re({},e),{},{value:t.response[e.type],state:!0,active:!0}):re(re({},e),{},{active:!0})})),yn(a),ma(F.K5()),Wa(F.K5()),na(!1),Ls(0),ls({modalData:void 0,trigger:!1}),Dn("stealth"===cn?'Stealth Record Set! You may now Receive Private Payments':'Encryption Key Set! You may now Send Private Payments'),Ke(!0),_e(""),Xi();case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r());case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 4:e.next=14;break;case 6:e.prev=6,e.t0=e.catch(1),console.error("ERROR:","Failed to write to CCIP2 backend"),Na(["Record Update Failed",""]),ce(!0),D(!1),Xs(!0),wa("orangered");case 14:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(){return e.apply(this,arguments)}}();r()}ia||na(!1)}),[Is]),v.useEffect((function(){if(Ti&&!vi&&cn)D(!0),es&&ts(!1);else if(vi&&!Ti&&cn){if(es)es&&ts(!1);else{Na(["Signature Failed",String(Fs)]),Qi(),ra(!1),na(!1),ma(F.RY());var e=sn.map((function(e){return"storage"!==e.type?e:re(re({},e),{},{state:!1})}));yn(e),gn("0")}ls({modalData:void 0,trigger:!1})}}),[Ti,vi,cn,Fs,la]);var hr=t?(0,L.jsx)(ue,{style:{backgroundColor:w?"black":"rgba(0, 0, 0, 1)"},children:(0,L.jsxs)(ye,{style:{background:w?"none":"#121212"},children:[(0,L.jsx)(le,{children:(0,L.jsx)("a",{href:"#",onClick:function(e){As(""),Wa(F.RY()),Qn(void 0),qn(void 0),Jn(void 0),_s(""),ks(""),Rs(""),Re(""),r("".concat(ve)),o(!0),e.preventDefault(),a()},children:(0,L.jsx)("span",{className:"material-icons-round",style:{marginTop:w?"120px":"7px"},children:"close"})})}),ve&&w&&(0,L.jsx)(oe,{children:(0,L.jsxs)("div",{className:"flex-column",style:{marginTop:"-10px",marginBottom:"80px"},children:[(0,L.jsx)("div",{style:{marginTop:"20px"},children:(0,L.jsx)(V.Z,{height:50,width:50})}),(0,L.jsx)("div",{style:{marginTop:"20px"},children:(0,L.jsx)("span",{style:{color:"#fc6603",fontSize:"20px",fontWeight:"700"},children:ka[0]})}),ka[1]&&!["-","+"].includes(ka[1])&&(0,L.jsx)("div",{style:{marginTop:"10px"},children:(0,L.jsxs)("span",{style:{color:"white",fontSize:"18px",fontWeight:"700"},children:[(0,L.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"22px"},children:"gateway"!==Ha?ka[1]:ia?String(Number(ka[1])-1):ka[1]}),(0,L.jsx)("span",{children:" Of "}),(0,L.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"22px"},children:"gateway"!==Ha||!ia&&Rn?qs:qs-1})]})}),ka[1]&&["-","+"].includes(ka[1])&&(0,L.jsx)("div",{style:{marginTop:"10px"},children:(0,L.jsx)("span",{style:{color:"white",fontSize:"18px",fontWeight:"700"},children:(0,L.jsx)("span",{children:"-"===ka[1]?"Please Be Patient":"This Will Take Time. Hang on"})})})]})}),ve&&!w&&(0,L.jsx)(pe,{children:(0,L.jsx)("span",{className:"material-icons miui",style:{marginTop:"-15px",color:Wt?"lightgreen":"orange",fontSize:"86px",marginLeft:"3%"},children:"account_balance"})}),ve&&sn.length>0&&!w&&(0,L.jsx)(oe,{children:(0,L.jsxs)("div",{className:"flex-column",children:[(0,L.jsx)("div",{style:{marginTop:"-25px",marginLeft:"2%"},children:(0,L.jsx)("span",{style:{color:"cyan",fontSize:"13px",fontWeight:"700"},children:"Receive Stealth Payment To"})}),(0,L.jsxs)("div",{style:{marginBottom:"15px",marginTop:"5px",marginLeft:"2%"},children:[(0,L.jsx)("span",{style:{color:"white",fontSize:"20px",fontWeight:"700",fontFamily:"SF Mono"},children:ve.split(".eth")[0]}),(0,L.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"15px",color:"cyan"},children:"."}),(0,L.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:"11px",color:"cyan",fontWeight:"700",letterSpacing:"0px",marginTop:"13px"},children:"ETH"})]}),(0,L.jsx)("ul",{style:{listStyle:"none",color:"white",marginLeft:z.tq?"0":"-5%",marginTop:"20px"},children:(0,L.jsxs)("div",{className:"flex-column",style:{paddingBottom:z.tq?"5px":"15px"},children:[sn.map((function(e){return(0,L.jsxs)("li",{style:{display:"flex",flexDirection:"column",width:z.tq?"480px":"500px",maxWidth:z.tq?"85%":"95%",paddingLeft:"5px",paddingRight:"5px"},children:[(0,L.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",flexDirection:"column"},children:[(0,L.jsxs)("div",{style:{marginBottom:"10px",display:"flex",justifyContent:"space-between",width:z.tq?"90%":"100%"},children:[(0,L.jsxs)("span",{style:{fontFamily:"Spotnik",fontWeight:"700",fontSize:"15px",color:F.IN.includes(e.type)?"orange":"cyan",marginRight:"15px"},children:[["stealth","rsa"].includes(e.type)&&(0,L.jsxs)("span",{children:[(0,L.jsx)("span",{className:"material-icons-round smol",style:{fontSize:"20px",display:"inline-block",color:"white"},children:"stealth"===e.type?"lock":"vpn_key"}),"\xa0",(0,L.jsx)("span",{style:{position:"relative",top:"-2px",left:"1px"},children:e.type})]}),["stealth","rsa"].includes(e.type)&&(0,L.jsx)("button",{className:"button-tiny",onClick:function(){Le(!0),ga("info"),wa(F.IN.includes(e.type)?"orange":"cyan"),wn(F.IN.includes(e.type)?'In Process of Bug Fixing':"".concat(e.help,""))},"data-tooltip":F.IN.includes(e.type)?"Temporarily Unavailable":"Enlighten Me",children:(0,L.jsx)("div",{className:"material-icons-round smol",style:{color:F.IN.includes(e.type)?"orange":"cyan",marginLeft:"storage"===e.type?"-5px":"5px"},children:"info_outline"})}),["stealth","rsa"].includes(e.type)&&(0,L.jsx)("button",{className:"button-tiny",onClick:function(){Le(!0),ga("stealth"===e.type||Wt?"gpp_good":"gpp_bad"),wa("stealth"===e.type||Wt?"lime":"orangered"),wn("stealth"===e.type?'Please set the Stealth Invoice to Receive Private Payment':Wt?'Encryption Key Set':'Please Set Encryption Key To Send Private Payments')},"data-tooltip":"stealth"===e.type?"Set Encrypted Invoice":Wt?"Encryption Key Set":"Encryption Key Missing",children:(0,L.jsx)("div",{className:"material-icons-round smol",style:{color:"stealth"===e.type||Wt?"lime":"orangered",marginLeft:"-5px"},children:"stealth"===e.type||Wt?"gpp_good":"gpp_bad"})}),["stealth","rsa"].includes(e.type)&&!F.IN.includes(e.type)&&Qe===oi&&(yt||mt)&&(0,L.jsx)("button",{className:"button-tiny",onClick:function(){Le(!0),ga("timer"),wa(Js<0?"orange":"lime"),wn(Js<0?'Too Soon To Update. Please wait at least one hour between updates':'Ready For Next Record Update')},"data-tooltip":Js<0?"Too Soon To Update":"Ready For Next Update",children:(0,L.jsx)("div",{className:"material-icons-round smol",style:{color:Js<0?"orange":"lime",marginLeft:"-5px"},children:"timer"})}),["stealth","rsa"].includes(e.type)&&!F.IN.includes(e.type)&&Qe===oi&&si&&(yt||mt)&&vs.ownerstamp.length>0&&(0,L.jsx)("button",{className:!["",".","0","1"].includes(Gt)&&[e.type].includes(Gt)?"button-tiny blink":"button-tiny",onClick:function(){""===Gt&&dr(["text",e.type],nt,ve,!0),$t(e.type)},"data-tooltip":[e.type,".","0","1"].includes(Gt)?[".","","0","1"].includes(Gt)?"1"===Gt?"Record Updated":"0"===Gt?"No New Update":"."===Gt?"Please Wait to Refresh again":"-"===Gt?"No New Update":"Click to Refresh":"Refresh in Progress":e.value.toLowerCase()===vs[e.type].toLowerCase()?"Record in Sync with ".concat("gateway"===Ha?"Gateway":"IPNS"):"Record not in Sync. Click to refresh",children:(0,L.jsx)("div",{className:"material-icons-round smol",style:{color:[e.type,".","0","1"].includes(Gt)?[".","","0","1"].includes(Gt)?"1"===Gt?"lime":"0"===Gt?"yellow":"."===Gt?"white":"-"===Gt?"yellow":"cyan":"white":e.value.toLowerCase()===vs[e.type].toLowerCase()?"lightgreen":"orange",marginLeft:"-5px"},children:"sync"})}),e.state&&(0,L.jsx)("div",{className:"material-icons-round smol emphasis",style:{color:de&&Qs?"orangered":"lime",marginLeft:"-5px"},children:de&&Qs?"cancel":"task_alt"})]}),(0,L.jsx)("button",{className:"button",disabled:F.IN.includes(e.type)||!sn[e.key].active||e.state||!si||!Ct.includes(String(si)),style:{alignSelf:"flex-end",height:"25px",width:"auto",marginBottom:"6px"},onClick:function(){Ut(!0),"stealth"===e.type&&cs({modalData:void 0,trigger:!1}),mn(e.type),gn("1"),ra(!0)},"data-tooltip":e.tooltip,children:(0,L.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"13px"},children:[e.label,"\xa0",(0,L.jsx)("span",{className:"material-icons-round smoller",children:"manage_history"})]})})]}),(0,L.jsx)("input",{className:"inputextra",id:e.key,placeholder:F.IN.includes(e.type)?"Temporarily Unavailable":e.value,type:"text",disabled:!e.editable||F.IN.includes(e.type)||!Ct.includes(String(si)),style:{background:Wt&&!F.IN.includes(e.type)&&Ct.includes(String(si))?"linear-gradient(90deg, rgba(0,50,0,0.5) 0%, rgba(25,50,25,0.5) 50%, rgba(0,50,0,0.5) 100%)":"linear-gradient(90deg, rgba(100,0,0,0.5) 0%, rgba(100,25,25,0.5) 50%, rgba(100,0,0,0.5) 100%)",fontFamily:"SF Mono",fontWeight:"400",fontSize:"14px",width:"100%",wordWrap:"break-word",textAlign:"left",marginTop:"-10px",marginBottom:"-5px",color:"lightgreen",cursor:"copy"}},e.key)]}),(0,L.jsx)("hr",{style:{marginTop:"5px"}})]},e.key)})),(0,L.jsx)("hr",{style:{marginTop:"5px"}}),(0,L.jsxs)("div",{className:"flex-column",style:{marginBottom:"15px",marginTop:"-15px"},children:[(0,L.jsx)(pe,{children:(0,L.jsx)("span",{className:"material-icons-round miui",style:{color:Wt?"lightgreen":"orange",fontSize:"76px"},children:"security"})}),(0,L.jsx)("span",{style:{color:"cyan",fontSize:"13px",fontWeight:"700",marginTop:"5px"},children:"Send Stealth Payment From"}),(0,L.jsxs)("div",{style:{marginBottom:"15px",marginTop:"5px"},children:[(0,L.jsx)("span",{style:{color:"white",fontSize:"20px",fontWeight:"700",fontFamily:"SF Mono"},children:ve.split(".eth")[0]}),(0,L.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"15px",color:"cyan"},children:"."}),(0,L.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:"11px",color:"cyan",fontWeight:"700",letterSpacing:"0px",marginTop:"13px"},children:"ETH"})]}),!Pe&&(0,L.jsxs)("div",{className:"flex-column",style:{width:"100%",marginLeft:"32px"},children:[(0,L.jsx)("input",{id:"decrypt",placeholder:"enter payee .eth",type:"text",disabled:!Wt,style:{background:Wt?"linear-gradient(90deg, rgba(0,50,0,0.5) 0%, rgba(25,50,25,0.5) 50%, rgba(0,50,0,0.5) 100%)":"linear-gradient(90deg, rgba(100,0,0,0.5) 0%, rgba(100,25,25,0.5) 50%, rgba(100,0,0,0.5) 100%)",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"130%",wordWrap:"break-word",textAlign:"center",color:je?"lime":"white",cursor:"copy",marginLeft:"-15%",marginTop:"15px"},onChange:function(e){var t;(t=e.target.value).endsWith(".eth")?ke(t):ke("")}},"decrypt"),(0,L.jsx)("hr",{style:{marginTop:"0",marginLeft:"-15%",width:"130%"}})]}),Pe&&(0,L.jsxs)("div",{className:"flex-column",children:[(0,L.jsxs)("div",{className:"flex-column",style:{width:"450px",marginLeft:"3px"},children:[(0,L.jsx)("input",{id:"amount",type:"text",value:Ie,style:{background:"0.0"===Ie?"linear-gradient(90deg, rgba(100,0,0,0.5) 0%, rgba(100,25,25,0.5) 50%, rgba(100,0,0,0.5) 100%)":"linear-gradient(90deg, rgba(0,50,0,0.5) 0%, rgba(25,50,25,0.5) 50%, rgba(0,50,0,0.5) 100%)",marginBottom:"10px",outline:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"90%",paddingRight:"32px",wordWrap:"break-word",textAlign:"left",color:"0.0"===Ie?"grey":"lime",cursor:"copy"}},"amount"),(0,L.jsx)("hr",{style:{marginTop:"-5px",marginLeft:"0",width:"90%"}})]}),(0,L.jsx)("div",{className:"flex-row",style:{width:"200%"},children:(0,L.jsxs)("div",{className:"flex-column",children:[(0,L.jsxs)("div",{className:"flex-row",style:{width:"450px",marginLeft:"3px"},children:[(0,L.jsx)("input",{id:"pay",type:"text",value:Pe,style:{background:Pe===F.DR?"linear-gradient(90deg, rgba(100,0,0,0.5) 0%, rgba(100,25,25,0.5) 50%, rgba(100,0,0,0.5) 100%)":"linear-gradient(90deg, rgba(0,50,0,0.5) 0%, rgba(25,50,25,0.5) 50%, rgba(0,50,0,0.5) 100%)",outline:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"90%",paddingRight:"32px",wordWrap:"break-word",textAlign:"left",color:Pe===F.DR?"grey":"lime",cursor:"copy"}},"pay"),(0,L.jsx)("button",{className:"button-empty",onClick:function(){F.vQ("pay")},hidden:Pe===F.DR,"data-tooltip":"Copy Address",style:{marginLeft:"-25px",color:"lime"},children:(0,L.jsx)("span",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700"},children:"content_copy"})})]}),(0,L.jsx)("hr",{style:{marginTop:"5px",marginLeft:"0",width:"90%"}})]})})]}),(0,L.jsxs)("div",{children:[(0,L.jsx)("button",{className:"button",style:{height:"33px",width:Pe?"80px":"120px",padding:"5px",marginTop:"10px",fontSize:"16px",fontWeight:"700",backgroundImage:Pe&&Pe!==F.DR?"linear-gradient(81deg, rgba(0,154,0,1) 0%, rgba(0,182,24,1) 52%, rgba(0,154,0,1) 100%)":"linear-gradient(112deg, rgba(190,95,65,1) 0%, rgba(191,41,36,1) 48%, rgba(203,111,0,1) 100%)"},onClick:function(){return Pe&&Pe!==F.DR?null===Ni||void 0===Ni?void 0:Ni():function(){Na(["Searching For Payment",""]),D(!0);var e=function(){var e=(0,f.Z)(x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ui.getResolver(je);case 2:if(null===(t=e.sent)||void 0===t||!t.address){e.next=8;break}return e.next=6,t.getText("stealth").then((function(e){e?(Na(["Decrypting Payment Data",""]),Ut(!0),Cn(!0),Re(e)):(D(!1),_e(F.DR),Ae("0.0"),Na(["Payer Has No Payment For You",""]),Qi(),wa("orangered"))})).catch((function(){D(!1),_e(F.DR),Ae("0.0"),Na(["Error Fetching Payment Data",""]),Qi(),wa("orangered")}));case 6:e.next=14;break;case 8:D(!1),_e(F.DR),Ae("0.0"),Na(["Payer Has No Resolver",""]),Qi(),wa("orangered");case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}()},disabled:!je||Pe===F.DR,hidden:!Wt,"data-tooltip":Pe&&Pe!==F.DR?"Send Transaction":"Fetch and Decrypt",children:(0,L.jsxs)("div",{className:"flex-row",style:{fontSize:"14px"},children:[Pe?"Pay":"Decrypt","\xa0",(0,L.jsx)("span",{className:"material-icons-round smoller",children:"lock_open"})]})}),(0,L.jsx)("button",{className:"button",style:{height:"33px",width:"110px",padding:"5px",marginTop:"20px",fontSize:"16px",fontWeight:"700",marginLeft:"20px",background:"red"},onClick:function(){return _e("")},disabled:!je,hidden:!Pe,"data-tooltip":"Cancel Transaction",children:(0,L.jsxs)("div",{className:"flex-row",style:{fontSize:"14px"},children:["Cancel","\xa0",(0,L.jsx)("span",{className:"material-icons-round smoller",children:"cancel"})]})})]})]})]})}),la.length>1&&(0,L.jsx)("div",{style:{marginTop:"-10px",marginBottom:"40px"},children:(0,L.jsx)("button",{className:"button flex-column",hidden:la.length<2,disabled:!si||!Ct.includes(String(si))||ca===F.RY(),style:{alignSelf:"flex-end",height:"25px",width:"auto",marginTop:"-3px"},onClick:function(){Ut(!0),ra(!0),mn("records"),gn("1"),ra(!0)},"data-tooltip":"Set Multiple Records in One Click",children:(0,L.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"15px"},children:["Edit All","\xa0",(0,L.jsx)("span",{className:"material-icons-round smoller",children:"manage_history"})]})})})]})}),(0,L.jsxs)("div",{id:"modal-inner",children:[(0,L.jsx)(A.Z,{color:Ta,icon:ha,onClose:function(){return Le(!1)},show:Fe,position:"",children:Tn}),(0,L.jsx)(Y.Z,{color:Ta,icon:ha,onClose:function(){return Ke(!1)},show:qe,handleTrigger:function(e){hs((function(t){return re(re({},t),{},{trigger:e})}))},handleModalData:function(e){hs((function(t){return re(re({},t),{},{modalData:e})}))},children:_n}),(0,L.jsx)(H,{handleTrigger:function(e){cs((function(t){return re(re({},t),{},{trigger:e})})),e?gn("1"):(gn("0"),mn("")),Ca(!1)},handleModalData:function(e){cs((function(t){return re(re({},t),{},{modalData:e})}))},onClose:function(){Ca(!1)},show:Ra,children:""}),(0,L.jsx)(W.Z,{handleTrigger:function(e){ls((function(t){return re(re({},t),{},{trigger:e})})),e?gn("1"):(gn("0"),mn("")),Ut(!1)},handleModalData:function(e){ls((function(t){return re(re({},t),{},{modalData:e})}))},onClose:function(){Ut(!1)},show:Bt,children:[ve,Ha]}),(0,L.jsx)(J.Z,{onClose:function(){ce(!1),ts(!0)},color:Ta,show:de&&!w,title:"cancel",children:ka[0]})]})]})}):null;return y?T.createPortal(hr,document.getElementById("modal")):null}},59595:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(73935),d=n(14141),c=n(85518),m=n(85893),f=d.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 0px;\n padding-left: ",";\n padding-right: ",";\n padding-bottom: 5px;\n margin-top: 0px;\n margin-left: ",";\n margin-right: ",";\n margin-bottom: ",";\n display: flex;\n justify-content: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 18px;\n font-weight: 700;\n line-height: 22px;\n max-width: ",";\n"])),c.tq?"10px":"20px",c.tq?"10px":"20px",c.tq?"10px":"20px",c.tq?"10px":"20px",c.tq?"15px":"20px",(c.tq,"400px")),b=d.ZP.div(s||(s=(0,p.Z)(["\n margin-top: -15px;\n font-size: 20px;\n display: flex;\n justify-content: center;\n font-weight: 700;\n margin-bottom: 15px;\n color: white;\n"]))),h=d.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),g=d.ZP.div(r||(r=(0,p.Z)(["\n position: fixed; \n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: auto;\n max-width: ",";\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n"])),c.tq?"90%":"60%"),x=d.ZP.div(o||(o=(0,p.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.icon,n=e.color,a=e.show,s=e.onClose,i=e.children,r=e.handleModalData,o=e.handleTrigger,p=y.useState(!1),d=(0,l.Z)(p,2),c=d[0],v=d[1];y.useEffect((function(){v(!0)}),[]);var T=function(e){r("0"),o(!0),e.preventDefault(),s()},w=a?(0,m.jsx)(x,{children:(0,m.jsxs)(g,{children:[(0,m.jsx)(h,{children:(0,m.jsx)("a",{href:"#",onClick:T,children:(0,m.jsx)("span",{className:"material-icons",style:{margin:"4px"},children:"close"})})}),t&&(0,m.jsx)(b,{children:(0,m.jsx)("span",{className:"material-icons",style:{marginTop:"4px",fontSize:"68px",color:n},children:t})}),(0,m.jsx)(f,{dangerouslySetInnerHTML:{__html:i}}),(0,m.jsx)(f,{children:(0,m.jsx)("div",{className:"flex-row",style:{marginLeft:"0px"},children:(0,m.jsx)("button",{className:"button-option",style:{height:"35px",width:"105px"},onClick:T,"data-tooltip":"Continue",children:(0,m.jsxs)("div",{className:"flex-row",style:{fontSize:"15px",fontWeight:"700"},children:["OK","\xa0",(0,m.jsx)("span",{className:"material-icons chonk",children:"done_all"})]})})})})]})}):null;return c?u.createPortal(w,document.getElementById("modal")):null}},92675:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(73935),d=n(14141),c=n(85893),m=d.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 10px;\n padding-left: 20px;\n padding-right: 40px;\n padding-bottom: 20px;\n display: flex;\n justify-content: center;\n height: 500px;\n overflow-y: auto;\n"]))),f=d.ZP.div(s||(s=(0,p.Z)(["\n padding-top: 20px;\n font-size: 22px;\n display: flex;\n justify-content: center;\n font-weight: 800;\n margin-bottom: 20px;\n"]))),b=d.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n font-size: 20px;\n"]))),h=d.ZP.div(r||(r=(0,p.Z)(["\n background: linear-gradient(112deg, rgba(66,46,40,1) 0%, rgba(0,0,0,1) 48%, rgba(70,63,55,1) 100%);\n background-size: 400% 400%;\n width: 500px;\n height: 600px;\n border-radius: 6px;\n padding: 15px;\n overflow-y: initial !important\n padding-bottom: 20px;\n"]))),g=d.ZP.div(o||(o=(0,p.Z)(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n background-size: contain;\n"])));t.Z=function(e){var t=e.show,n=e.onClose,a=y.useState(!1),s=(0,l.Z)(a,2),i=s[0],r=s[1];y.useEffect((function(){r(!0)}),[]);var o=t?(0,c.jsx)(g,{children:(0,c.jsxs)(h,{children:[(0,c.jsx)(b,{children:(0,c.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),n()},children:(0,c.jsx)("span",{className:"material-icons",style:{marginTop:"4px"},children:"close"})})}),(0,c.jsx)(f,{children:(0,c.jsx)("span",{className:"material-icons miui-small",style:{marginTop:"4px",color:"white"},children:"gavel"})}),(0,c.jsx)(m,{})]})}):null;return i?u.createPortal(o,document.getElementById("modal")):null}},40342:function(e,t,n){"use strict";n(67294);var a=n(85893);t.Z=function(e){var t=e.variable;return(0,a.jsxs)("button",{className:"button-tiny",style:{color:"lightgreen",marginRight:"15px",fontSize:"16px",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},"data-tooltip":"Total Gas Saved by Off-chain Records",children:[(0,a.jsx)("div",{className:"material-icons smol",style:{color:"lightgreen",fontSize:"22px",marginRight:"5px"},children:"local_gas_station"}),(0,a.jsx)("div",{children:(0,a.jsxs)("span",{style:{fontFamily:"SF Mono",color:"white",fontSize:"16px",fontWeight:"700"},children:[t||"0.00","\xa0",(0,a.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:"15px",fontWeight:"700"},children:"ETH"})]})})]})}},62012:function(e,t,n){"use strict";n.d(t,{gk:function(){return Fe},Bf:function(){return Le},qB:function(){return Be},K5:function(){return We},RY:function(){return ze},iJ:function(){return ne},wU:function(){return te},IN:function(){return M},hh:function(){return le},bt:function(){return se},K0:function(){return de},Hc:function(){return he},vc:function(){return k},vQ:function(){return be},U8:function(){return ie},T5:function(){return Ve},vb:function(){return fe},qP:function(){return ue},O:function(){return oe},Th:function(){return C},yc:function(){return E},ID:function(){return N},yt:function(){return me},TN:function(){return Ue},Wp:function(){return I},Kv:function(){return O},s8:function(){return De},Q1:function(){return ve},tr:function(){return Te},MP:function(){return Ce},rv:function(){return Ie},fp:function(){return Pe},Iu:function(){return Me},Jh:function(){return Se},xb:function(){return ge},Io:function(){return Ze},wE:function(){return je},Yo:function(){return Ee},K9:function(){return xe},$o:function(){return Re},V4:function(){return we},A2:function(){return _e},L3:function(){return Ne},CB:function(){return ke},MS:function(){return Oe},UW:function(){return Ae},IQ:function(){return He},Ap:function(){return ae},O1:function(){return Ke},hc:function(){return ce},z7:function(){return P},t8:function(){return Z},IX:function(){return R},A7:function(){return re},DR:function(){return _},dR:function(){return D}});var a=n(50029),s=n(59499),i=n(87794),r=n.n(i),o=n(59205),p=n(57734),l=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_old","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"label","type":"bytes32"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"NewOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"resolver","type":"address"}],"name":"NewResolver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"NewTTL","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"old","outputs":[{"internalType":"contract ENS","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"recordExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"resolver","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setRecord","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"label","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"}],"name":"setSubnodeOwner","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"label","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setSubnodeRecord","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setTTL","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"ttl","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"}]'),y=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"},{"internalType":"bytes32","name":"_baseNode","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"controller","type":"address"}],"name":"ControllerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"controller","type":"address"}],"name":"ControllerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"expires","type":"uint256"}],"name":"NameMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"expires","type":"uint256"}],"name":"NameRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expires","type":"uint256"}],"name":"NameRenewed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"GRACE_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"addController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"available","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"baseNode","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"controllers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ens","outputs":[{"internalType":"contract ENS","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"nameExpires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"reclaim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"register","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"registerOnly","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"removeController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"renew","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]'),u=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"},{"internalType":"contract INameWrapper","name":"wrapperAddress","type":"address"},{"internalType":"address","name":"_trustedETHController","type":"address"},{"internalType":"address","name":"_trustedReverseRegistrar","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"coinType","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"newAddress","type":"bytes"}],"name":"AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"bool","name":"approved","type":"bool"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"hash","type":"bytes"}],"name":"ContenthashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"record","type":"bytes"}],"name":"DNSRecordChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"}],"name":"DNSRecordDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"lastzonehash","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"zonehash","type":"bytes"}],"name":"DNSZonehashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"indexed":false,"internalType":"address","name":"implementer","type":"address"}],"name":"InterfaceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"x","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"PubkeyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"string","name":"indexedKey","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"TextChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"newVersion","type":"uint64"}],"name":"VersionChanged","type":"event"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentTypes","type":"uint256"}],"name":"ABI","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"clearRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"uint16","name":"resource","type":"uint16"}],"name":"dnsRecord","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"}],"name":"hasDNSRecords","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"interfaceImplementer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"}],"name":"isApprovedFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"nodehash","type":"bytes32"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicallWithNodeCheck","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"recordVersions","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentType","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setABI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setDNSRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"internalType":"address","name":"implementer","type":"address"}],"name":"setInterface","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"newName","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setZonehash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"zonehash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"}]'),d=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"},{"internalType":"contract INameWrapper","name":"wrapperAddress","type":"address"},{"internalType":"address","name":"_trustedETHController","type":"address"},{"internalType":"address","name":"_trustedReverseRegistrar","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"coinType","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"newAddress","type":"bytes"}],"name":"AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"bool","name":"approved","type":"bool"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"hash","type":"bytes"}],"name":"ContenthashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"record","type":"bytes"}],"name":"DNSRecordChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"}],"name":"DNSRecordDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"lastzonehash","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"zonehash","type":"bytes"}],"name":"DNSZonehashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"indexed":false,"internalType":"address","name":"implementer","type":"address"}],"name":"InterfaceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"x","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"PubkeyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"string","name":"indexedKey","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"TextChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"newVersion","type":"uint64"}],"name":"VersionChanged","type":"event"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentTypes","type":"uint256"}],"name":"ABI","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"clearRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"uint16","name":"resource","type":"uint16"}],"name":"dnsRecord","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"}],"name":"hasDNSRecords","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"interfaceImplementer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"}],"name":"isApprovedFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"nodehash","type":"bytes32"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicallWithNodeCheck","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"recordVersions","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"resolve","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentType","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setABI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setDNSRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"internalType":"address","name":"implementer","type":"address"}],"name":"setInterface","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"newName","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setZonehash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"zonehash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"}]'),c=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"coinType","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"newAddress","type":"bytes"}],"name":"AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bool","name":"isAuthorised","type":"bool"}],"name":"AuthorisationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"hash","type":"bytes"}],"name":"ContenthashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"record","type":"bytes"}],"name":"DNSRecordChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"}],"name":"DNSRecordDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"DNSZoneCleared","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"indexed":false,"internalType":"address","name":"implementer","type":"address"}],"name":"InterfaceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"x","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"PubkeyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"string","name":"indexedKey","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"}],"name":"TextChanged","type":"event"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentTypes","type":"uint256"}],"name":"ABI","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"authorisations","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"clearDNSZone","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"uint16","name":"resource","type":"uint16"}],"name":"dnsRecord","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"}],"name":"hasDNSRecords","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"interfaceImplementer","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentType","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setABI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"isAuthorised","type":"bool"}],"name":"setAuthorisation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setDNSRecords","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"internalType":"address","name":"implementer","type":"address"}],"name":"setInterface","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"name","type":"string"}],"name":"setName","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"}]'),m=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"},{"internalType":"contract INameWrapper","name":"wrapperAddress","type":"address"},{"internalType":"address","name":"_trustedETHController","type":"address"},{"internalType":"address","name":"_trustedReverseRegistrar","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"coinType","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"newAddress","type":"bytes"}],"name":"AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"bool","name":"approved","type":"bool"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"hash","type":"bytes"}],"name":"ContenthashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"record","type":"bytes"}],"name":"DNSRecordChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"}],"name":"DNSRecordDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"lastzonehash","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"zonehash","type":"bytes"}],"name":"DNSZonehashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"indexed":false,"internalType":"address","name":"implementer","type":"address"}],"name":"InterfaceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"x","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"PubkeyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"string","name":"indexedKey","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"TextChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"newVersion","type":"uint64"}],"name":"VersionChanged","type":"event"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentTypes","type":"uint256"}],"name":"ABI","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"clearRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"uint16","name":"resource","type":"uint16"}],"name":"dnsRecord","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"}],"name":"hasDNSRecords","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"interfaceImplementer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"}],"name":"isApprovedFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"nodehash","type":"bytes32"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicallWithNodeCheck","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"recordVersions","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentType","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setABI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setDNSRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"internalType":"address","name":"implementer","type":"address"}],"name":"setInterface","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"newName","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setZonehash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"zonehash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"}]'),f=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"},{"internalType":"contract IBaseRegistrar","name":"_registrar","type":"address"},{"internalType":"contract IMetadataService","name":"_metadataService","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CannotUpgrade","type":"error"},{"inputs":[],"name":"IncompatibleParent","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"IncorrectTargetOwner","type":"error"},{"inputs":[],"name":"IncorrectTokenType","type":"error"},{"inputs":[{"internalType":"bytes32","name":"labelHash","type":"bytes32"},{"internalType":"bytes32","name":"expectedLabelhash","type":"bytes32"}],"name":"LabelMismatch","type":"error"},{"inputs":[{"internalType":"string","name":"label","type":"string"}],"name":"LabelTooLong","type":"error"},{"inputs":[],"name":"LabelTooShort","type":"error"},{"inputs":[],"name":"NameIsNotWrapped","type":"error"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"OperationProhibited","type":"error"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"Unauthorised","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"controller","type":"address"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"ControllerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"ExpiryExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"fuses","type":"uint32"}],"name":"FusesSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"NameUnwrapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint32","name":"fuses","type":"uint32"},{"indexed":false,"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"NameWrapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_tokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint32","name":"fuseMask","type":"uint32"}],"name":"allFusesBurned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"canExtendSubnames","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"canModifyName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"controllers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ens","outputs":[{"internalType":"contract ENS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"extendExpiry","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getData","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"}],"name":"isWrapped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"isWrapped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataService","outputs":[{"internalType":"contract IMetadataService","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"names","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"wrappedOwner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint16","name":"ownerControlledFuses","type":"uint16"}],"name":"registerAndWrapETH2LD","outputs":[{"internalType":"uint256","name":"registrarExpiry","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registrar","outputs":[{"internalType":"contract IBaseRegistrar","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"renew","outputs":[{"internalType":"uint256","name":"expires","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"setChildFuses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"},{"internalType":"bool","name":"active","type":"bool"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint16","name":"ownerControlledFuses","type":"uint16"}],"name":"setFuses","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMetadataService","name":"_metadataService","type":"address"}],"name":"setMetadataService","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setRecord","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"setSubnodeOwner","outputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint64","name":"ttl","type":"uint64"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"setSubnodeRecord","outputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setTTL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract INameWrapperUpgrade","name":"_upgradeAddress","type":"address"}],"name":"setUpgradeContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"address","name":"controller","type":"address"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"address","name":"registrant","type":"address"},{"internalType":"address","name":"controller","type":"address"}],"name":"unwrapETH2LD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"name","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upgradeContract","outputs":[{"internalType":"contract INameWrapperUpgrade","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"name","type":"bytes"},{"internalType":"address","name":"wrappedOwner","type":"address"},{"internalType":"address","name":"resolver","type":"address"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"wrappedOwner","type":"address"},{"internalType":"uint16","name":"ownerControlledFuses","type":"uint16"},{"internalType":"address","name":"resolver","type":"address"}],"name":"wrapETH2LD","outputs":[{"internalType":"uint64","name":"expiry","type":"uint64"}],"stateMutability":"nonpayable","type":"function"}]'),b=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"},{"internalType":"contract IBaseRegistrar","name":"_registrar","type":"address"},{"internalType":"contract IMetadataService","name":"_metadataService","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CannotUpgrade","type":"error"},{"inputs":[],"name":"IncompatibleParent","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"IncorrectTargetOwner","type":"error"},{"inputs":[],"name":"IncorrectTokenType","type":"error"},{"inputs":[{"internalType":"bytes32","name":"labelHash","type":"bytes32"},{"internalType":"bytes32","name":"expectedLabelhash","type":"bytes32"}],"name":"LabelMismatch","type":"error"},{"inputs":[{"internalType":"string","name":"label","type":"string"}],"name":"LabelTooLong","type":"error"},{"inputs":[],"name":"LabelTooShort","type":"error"},{"inputs":[],"name":"NameIsNotWrapped","type":"error"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"OperationProhibited","type":"error"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"Unauthorised","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"controller","type":"address"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"ControllerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"ExpiryExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"fuses","type":"uint32"}],"name":"FusesSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"NameUnwrapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint32","name":"fuses","type":"uint32"},{"indexed":false,"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"NameWrapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_tokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint32","name":"fuseMask","type":"uint32"}],"name":"allFusesBurned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"canExtendSubnames","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"canModifyName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"controllers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ens","outputs":[{"internalType":"contract ENS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"extendExpiry","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getData","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"}],"name":"isWrapped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"isWrapped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataService","outputs":[{"internalType":"contract IMetadataService","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"names","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"wrappedOwner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint16","name":"ownerControlledFuses","type":"uint16"}],"name":"registerAndWrapETH2LD","outputs":[{"internalType":"uint256","name":"registrarExpiry","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registrar","outputs":[{"internalType":"contract IBaseRegistrar","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"renew","outputs":[{"internalType":"uint256","name":"expires","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"setChildFuses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"},{"internalType":"bool","name":"active","type":"bool"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint16","name":"ownerControlledFuses","type":"uint16"}],"name":"setFuses","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMetadataService","name":"_metadataService","type":"address"}],"name":"setMetadataService","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setRecord","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"setSubnodeOwner","outputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint64","name":"ttl","type":"uint64"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"setSubnodeRecord","outputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setTTL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract INameWrapperUpgrade","name":"_upgradeAddress","type":"address"}],"name":"setUpgradeContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"address","name":"controller","type":"address"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"address","name":"registrant","type":"address"},{"internalType":"address","name":"controller","type":"address"}],"name":"unwrapETH2LD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"name","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upgradeContract","outputs":[{"internalType":"contract INameWrapperUpgrade","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"name","type":"bytes"},{"internalType":"address","name":"wrappedOwner","type":"address"},{"internalType":"address","name":"resolver","type":"address"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"wrappedOwner","type":"address"},{"internalType":"uint16","name":"ownerControlledFuses","type":"uint16"},{"internalType":"address","name":"resolver","type":"address"}],"name":"wrapETH2LD","outputs":[{"internalType":"uint64","name":"expiry","type":"uint64"}],"stateMutability":"nonpayable","type":"function"}]'),h=JSON.parse('[{"inputs":[{"internalType":"address","name":"_gateway","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"BadConfig","type":"error"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"InvalidRequest","type":"error"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"NotAuthorised","type":"error"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"string[]","name":"_gateways","type":"string[]"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes4","name":"_callbackFunction","type":"bytes4"},{"internalType":"bytes","name":"_extradata","type":"bytes"}],"name":"OffchainLookup","type":"error"},{"inputs":[],"name":"PlsFundDevs","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovedSigner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddr","type":"address"},{"indexed":true,"internalType":"address","name":"newAddr","type":"address"}],"name":"GatewayUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"InterfaceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"contenthash","type":"bytes"}],"name":"RecordhashUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":true,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ThankYou","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddr","type":"address"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"UpdatedWrapper","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ENS","outputs":[{"internalType":"contract iENS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"response","type":"bytes"},{"internalType":"bytes","name":"extradata","type":"bytes"}],"name":"__callback","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"bool","name":"_approval","type":"bool"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"address","name":"_signer","type":"address"}],"name":"approved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_approvedSigner","type":"address"},{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"string","name":"_domain","type":"string"}],"name":"approvedSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gateway","outputs":[{"internalType":"contract iGatewayManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"}],"name":"getRecordhash","outputs":[{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_message","type":"string"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"getSigner","outputs":[{"internalType":"address","name":"_signer","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWrapper","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_node","type":"bytes32[]"},{"internalType":"address[]","name":"_signer","type":"address[]"},{"internalType":"bool[]","name":"_approval","type":"bool[]"}],"name":"multiApprove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerhashFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"recordhash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_encoded","type":"bytes"},{"internalType":"bytes","name":"_requested","type":"bytes"}],"name":"redirectService","outputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"},{"internalType":"bytes32","name":"_namehash","type":"bytes32"},{"internalType":"bytes","name":"_redirectRequest","type":"bytes"},{"internalType":"string","name":"domain","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"name","type":"bytes"},{"internalType":"bytes","name":"request","type":"bytes"}],"name":"resolve","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"safeWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"string[]","name":"_subdomain","type":"string[]"},{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setDeepSubRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setOwnerhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_recordhash","type":"bytes32"}],"name":"setShortOwnerhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"bytes32","name":"_recordhash","type":"bytes32"}],"name":"setShortRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"string","name":"_subdomain","type":"string"},{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setSubRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updateChainID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gateway","type":"address"}],"name":"updateGateway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sig","type":"bytes4"},{"internalType":"bool","name":"_set","type":"bool"}],"name":"updateInterface","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wei","type":"uint256"}],"name":"updateOwnerhashFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"bool","name":"_set","type":"bool"}],"name":"updateWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_balance","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]'),g=JSON.parse('[{"inputs":[{"internalType":"address","name":"_gateway","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"BadConfig","type":"error"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"InvalidRequest","type":"error"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"NotAuthorised","type":"error"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"string[]","name":"_gateways","type":"string[]"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes4","name":"_callbackFunction","type":"bytes4"},{"internalType":"bytes","name":"_extradata","type":"bytes"}],"name":"OffchainLookup","type":"error"},{"inputs":[],"name":"PlsFundDevs","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovedSigner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddr","type":"address"},{"indexed":true,"internalType":"address","name":"newAddr","type":"address"}],"name":"GatewayUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"InterfaceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"contenthash","type":"bytes"}],"name":"RecordhashUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":true,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ThankYou","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddr","type":"address"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"UpdatedWrapper","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ENS","outputs":[{"internalType":"contract iENS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"response","type":"bytes"},{"internalType":"bytes","name":"extradata","type":"bytes"}],"name":"__callback","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"bool","name":"_approval","type":"bool"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"address","name":"_signer","type":"address"}],"name":"approved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_approvedSigner","type":"address"},{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"string","name":"_domain","type":"string"}],"name":"approvedSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gateway","outputs":[{"internalType":"contract iGatewayManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"}],"name":"getRecordhash","outputs":[{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_message","type":"string"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"getSigner","outputs":[{"internalType":"address","name":"_signer","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWrapper","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_node","type":"bytes32[]"},{"internalType":"address[]","name":"_signer","type":"address[]"},{"internalType":"bool[]","name":"_approval","type":"bool[]"}],"name":"multiApprove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerhashFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"recordhash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_encoded","type":"bytes"},{"internalType":"bytes","name":"_requested","type":"bytes"}],"name":"redirectService","outputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"},{"internalType":"bytes32","name":"_namehash","type":"bytes32"},{"internalType":"bytes","name":"_redirectRequest","type":"bytes"},{"internalType":"string","name":"domain","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"name","type":"bytes"},{"internalType":"bytes","name":"request","type":"bytes"}],"name":"resolve","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"safeWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"string[]","name":"_subdomain","type":"string[]"},{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setDeepSubRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setOwnerhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_recordhash","type":"bytes32"}],"name":"setShortOwnerhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"bytes32","name":"_recordhash","type":"bytes32"}],"name":"setShortRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"string","name":"_subdomain","type":"string"},{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setSubRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updateChainID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gateway","type":"address"}],"name":"updateGateway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sig","type":"bytes4"},{"internalType":"bool","name":"_set","type":"bool"}],"name":"updateInterface","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wei","type":"uint256"}],"name":"updateOwnerhashFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"bool","name":"_set","type":"bool"}],"name":"updateWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_balance","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]'),x=n(67191),v=n(21429);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function w(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:s}}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 i,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,i=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw i}}}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nenergy_savings_leaf

Gasless ENS Records','hub

Decentralised Records Storage on IPFS','recycling

Unlimited Record Updates With IPNS','badge

Dynamic Records and More','

Enjoy ENS Hassle Free'],ye=[h,g],ue=[{addressOrName:oe[0],contractInterface:pe[0]},{addressOrName:oe[1],contractInterface:pe[1]},{addressOrName:oe[2],contractInterface:pe[2]},{addressOrName:oe[3],contractInterface:pe[3]},{addressOrName:oe[4],contractInterface:pe[4]},{addressOrName:oe[5],contractInterface:pe[5]},{addressOrName:oe[6],contractInterface:pe[6]},{addressOrName:oe[7],contractInterface:pe[7]}],de=[{addressOrName:se[0],contractInterface:ye[0]},{addressOrName:se[1],contractInterface:ye[1]}];function ce(e){var t=document.getElementById("overlay");t&&(t.style.display="block",setTimeout((function(){!function(){var e=document.getElementById("overlay");e&&(e.style.display="none")}()}),1e3*e))}function me(e){return"08011240"+e[0]+e[1]}function fe(e){return e&&!e.startsWith("https://")?x.vb("ipns://".concat(e)).encoded:""}function be(e){var t=document.getElementById(e);t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value).then((function(){})).catch((function(e){console.error("ERROR:",e)}))}function he(e){return new Promise((function(t,n){var a=new Image;a.onload=function(){t(!0)},a.onerror=function(){console.error("Image Failed to Load"),n(!1)},a.src=e}))}function ge(e){for(var t in e)if(e.hasOwnProperty(t)&&""!==e[t])return!1;return!0}function xe(e){return e.endsWith(".eth")&&e.length<=36}function ve(e){return e.startsWith("0x")&&42===e.length&&B.test(e.split("0x")[1])}function Te(e){return L.test(e)||e.startsWith("ipfs://")||e.startsWith("eip155:")}function we(e){return e.length>0}function Se(e){return G.test(e)}function je(e){return U.test(e)}function ke(e){return L.test(e)}function Ne(e){return q.test(e)}function Me(e){return H.test(e)}function Ze(e){return J.test(e)}function Re(e){return V.test(e)||G.test(e)}function Ce(e){return V.test(e)}function Ee(e){return Y.test(e)}function Pe(e){return $.test(e)}function _e(e){return Q.test(e)}function De(e){return X.test(e)}function Oe(e){return K.test(e)}function Ie(e){var t=e.substring(0,7),n=e.substring(0,8);return"ipns://"===t&&A.test(e.substring(7))||"ipfs://"===t&&W.test(e.substring(7))||"ipfs://"===t&&z.test(e.substring(7))||"onion://"===n&&F.test(e.substring(8))}function Ae(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&!["revision","version"].includes(n)&&e[n]&&t.push(Number(e[n]));return Math.max.apply(Math,t)}function We(){var e,t={},n=S(Z);try{for(n.s();!(e=n.n()).done;){var a=e.value;k.includes(a)||(t[a]="")}}catch(s){n.e(s)}finally{n.f()}return t}function ze(){var e,t={},n=S(R);try{for(n.s();!(e=n.n()).done;){t[e.value]=""}}catch(a){n.e(a)}finally{n.f()}return t}function Fe(){var e,t={},n=S(Z);try{for(n.s();!(e=n.n()).done;){var a=e.value;t[a]=!![].concat(k,["revision"]).includes(a)}}catch(s){n.e(s)}finally{n.f()}return t}var Le={type:"",addr:"",contenthash:"",avatar:"",revision:"",version:"",timestamp:w({},We()),queue:1,ownerstamp:[]},Be={type:"",stealth:"",rsa:"",revision:"",version:"",timestamp:w({},ze()),queue:1,ownerstamp:[]};function Ue(e,t){return qe.apply(this,arguments)}function qe(){return(qe=(0,a.Z)(r().mark((function e(t,n){var a,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("https://".concat(t,".ipfs2.eth.limo/revision.json?t=").concat(String(n)));case 3:if((a=e.sent).ok){e.next=7;break}return console.error("Error:","Fetch Gone Wrong"),e.abrupt("return",{_value:"//",_sequence:""});case 7:return e.next=9,a.json();case 9:return s=e.sent,e.abrupt("return",{_value:s.ipfs?"/ipfs/".concat(s.ipfs):"//",_sequence:s.sequence||""});case 13:return e.prev=13,e.t0=e.catch(0),console.error("Error:",e.t0),e.abrupt("return",{_value:"//",_sequence:""});case 17:case"end":return e.stop()}}),e,null,[[0,13]])})))).apply(this,arguments)}function Ke(e){for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=n.length,s=0;s=4?n="0x".concat(i().encode("ipfs-ns",t)):"ipns"===e?n="0x".concat(i().encode("ipns-ns",t)):"bzz"===e&&t.length>=4?n="0x".concat(i().fromSwarm(t)):"onion"===e&&16===t.length?n="0x".concat(i().encode("onion",t)):"onion3"===e&&56===t.length?n="0x".concat(i().encode("onion3",t)):"sia"===e&&46===t.length?n="0x".concat(i().encode("skynet-ns",t)):"arweave"===e&&43===t.length?n="0x".concat(i().encode("arweave-ns",t)):a="Invalid content id"}catch(s){a=s instanceof Error?s.message:String(s)}return{encoded:n,error:a}}(n[1],n[2])}},36490:function(e,t,n){"use strict";n.d(t,{x_:function(){return u}});var a=n(50029),s=n(87794),i=n.n(s),r=n(24978),o=n(35689),p=n(26894),l=n(11606),y=n(27760);n(21429);try{fetch}catch(c){}function u(e,t,n,a){return d.apply(this,arguments)}function d(){return(d=(0,a.Z)(i().mark((function e(t,n,a,s){var u,d,c,m,f,b,h,g;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a.length<64)){e.next=2;break}throw new Error("SIGNATURE TOO SHORT; LENGTH SHOULD BE 65 BYTES");case 2:return u=(0,l.J)(r.UG.hexToBytes(a.toLowerCase().startsWith("0x")?a.slice(2):a)),d="".concat(n,":").concat(t),c=(0,l.J)("".concat(d,":").concat(s||"",":").concat(a.slice(-64))),m=(0,p.Di)(l.J,u,c,d,42),f=o.P6.hashToPrivateScalar(m).toString(16).padStart(64,"0"),e.t0=r.UG,e.next=10,o.$3(f);case 10:return e.t1=e.sent,b=e.t0.bytesToHex.call(e.t0,e.t1),h=y.P6.bytesToHex(y.P6.hashToPrivateKey(m)),g=y.P6.bytesToHex(y.$3(f)),e.abrupt("return",[[f,b],[h,g]]);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},71775:function(e,t,n){"use strict";n.d(t,{I7:function(){return d},Yy:function(){return m},cU:function(){return y}});var a=n(50029),s=n(87794),i=n.n(s),r=n(62012),o=n(64146),p=n(27586),l=n(16441);function y(e,t,n){return u.apply(this,arguments)}function u(){return(u=(0,a.Z)(i().mark((function e(t,n,a){var s,y,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=new o.CH(n.addressOrName,n.contractInterface,r.Ap),e.next=3,s.getRecordhash(p.VM(t));case 3:return y=e.sent,e.next=6,s.getRecordhash(l.hexZeroPad(a,32).toLowerCase());case 6:return u=e.sent,e.abrupt("return",new Promise((function(e,t){y?e("0x"===String(y)||String(y)===String(u)?"0":String(y).startsWith("0x6874")?"2":"1"):t(new Error("Failed to fetch Recordhash"))})));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n){return c.apply(this,arguments)}function c(){return(c=(0,a.Z)(i().mark((function e(t,n,a){var s,y,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=new o.CH(n.addressOrName,n.contractInterface,r.Ap),e.next=3,s.getRecordhash(p.VM(t));case 3:return y=e.sent,e.next=6,s.getRecordhash(l.hexZeroPad(a,32).toLowerCase());case 6:return u=e.sent,e.abrupt("return",new Promise((function(e,t){y?e("0x"===String(y)?["0x",!1]:String(y)===String(u)?[String(u),!1]:[String(y),!0]):t(new Error("Failed to fetch Recordhash"))})));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t){return f.apply(this,arguments)}function f(){return(f=(0,a.Z)(i().mark((function e(t,n){var a,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new o.CH(t.addressOrName,t.contractInterface,r.Ap),e.next=3,a.getRecordhash(l.hexZeroPad(n,32).toLowerCase());case 3:return s=e.sent,e.abrupt("return",new Promise((function(e,t){s?e("0x"!==String(s)?String(s).startsWith("0x6874")?"2":"1":"0"):t(new Error("Failed to fetch Ownerhash"))})));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},88677:function(){},62808:function(){},43094:function(){},95856:function(){},69159:function(){},46601:function(){},33397:function(){},62678:function(){},25819:function(){},24112:function(){}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/1469-3f9839cb080aea51.js b/out/_next/static/chunks/1469-3f9839cb080aea51.js deleted file mode 100644 index 55bd86f2..00000000 --- a/out/_next/static/chunks/1469-3f9839cb080aea51.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1469],{88006:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(73935),d=n(14141),c=n(22794),m=n(85893),f=d.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 10px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 15px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n"]))),b=d.ZP.div(s||(s=(0,p.Z)(["\n margin-top: -10px;\n font-size: 17px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n margin-bottom: 0px;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n"]))),h=d.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),g=d.ZP.div(r||(r=(0,p.Z)(["\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 450px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 5px;\n"]))),x=d.ZP.div(o||(o=(0,p.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.show,n=e.onClose,a=e.children,s=e.handleModalData,i=e.handleTrigger,r=y.useState(!1),o=(0,l.Z)(r,2),p=o[0],d=o[1],v=y.useState(!1),T=(0,l.Z)(v,2),w=T[0],S=T[1],j=y.useState(""),k=(0,l.Z)(j,2),N=k[0],M=k[1];y.useEffect((function(){d(!0)}),[]);var Z=function(e){s(e),i(!0),n()},R=t?(0,m.jsxs)(x,{children:[(0,m.jsxs)(g,{children:[(0,m.jsx)(h,{children:(0,m.jsx)("a",{href:"#",onClick:function(e){s(void 0),i(!1),e.preventDefault(),n()},children:(0,m.jsx)("span",{className:"material-icons",children:"close"})})}),t&&(0,m.jsx)(b,{children:(0,m.jsx)("div",{className:"material-icons",style:{marginTop:"4px",fontSize:"66px"},children:"notification_important"})}),(0,m.jsx)(f,{children:(0,m.jsxs)("div",{className:"flex-column",style:{marginTop:"10px",marginBottom:"10px"},children:["1"===a&&(0,m.jsxs)("div",{style:{lineHeight:"16px",fontWeight:"700",fontSize:"15px"},children:[(0,m.jsx)("span",{style:{lineHeight:"20px"},children:"Beware that will set a new on-chain"}),"\xa0",(0,m.jsx)("span",{style:{color:"cyan",fontWeight:"700",lineHeight:"20px"},children:"Recordhash"}),"\xa0Or\xa0",(0,m.jsx)("span",{style:{color:"cyan",fontWeight:"700",lineHeight:"20px"},children:"Gateway"}),". If you intend to set a global\xa0",(0,m.jsx)("span",{style:{color:"cyan",fontWeight:"700",lineHeight:"20px"},children:"Ownerhash"}),",\xa0please update it in\xa0",(0,m.jsx)("span",{style:{color:"orange",fontWeight:"700",lineHeight:"20px"},children:"UTILS"}),"\xa0tab"]}),"0"===a&&(0,m.jsxs)("div",{style:{lineHeight:"16px",fontWeight:"700",fontSize:"15px"},children:[(0,m.jsx)("span",{style:{lineHeight:"20px"},children:"This will set a new on-chain"}),"\xa0",(0,m.jsx)("span",{style:{color:"cyan",fontWeight:"700",lineHeight:"20px"},children:"Ownerhash"}),"\xa0Or\xa0",(0,m.jsx)("span",{style:{color:"cyan",fontWeight:"700",lineHeight:"20px"},children:"HTTP Gateway"})]}),(0,m.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,m.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"20px",fontSize:"15px",fontWeight:"700"},onClick:function(){Z("0")},"data-tooltip":"0"===a?"Continue With Ownerhash":"Continue With Recordhash",children:(0,m.jsxs)("div",{className:"flex-row",children:["0"===a?"Ownerhash":"Recordhash","\xa0",(0,m.jsx)("span",{className:"material-icons chonk",children:"hub"})]})}),(0,m.jsx)("button",{className:"button-tiny",onClick:function(){S(!0),M(''.concat("0"===a?"Ownerhash":"Recordhash"," is specific to one ").concat("0"===a?"wallet":"name",' and it is the permissionless and decentralised option'))},"data-tooltip":"Enlighten Me",children:(0,m.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"16px"},children:"info_outline"})})]}),(0,m.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,m.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){Z("1")},"data-tooltip":"Continue With HTTP Gateway",disabled:!a,children:(0,m.jsxs)("div",{className:"flex-row",children:["HTTP Gateway","\xa0",(0,m.jsx)("span",{className:"material-icons chonk",children:"dns"})]})}),(0,m.jsx)("button",{className:"button-tiny",onClick:function(){S(!0),M('HTTP Gateway could point to a web2 gateway or L2 proxy')},"data-tooltip":"Continue With Gateway",children:(0,m.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"16px"},children:"info_outline"})})]})]})})]}),(0,m.jsx)("div",{id:"modal-inner",children:(0,m.jsx)(c.Z,{color:"cyan",icon:"info",onClose:function(){return S(!1)},show:w,position:"",children:N})})]}):null;return p?u.createPortal(R,document.getElementById("modal")):null}},64637:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(73935),d=n(14141),c=n(85893),m=d.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 20px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 10px;\n display: flex;\n height: auto;\n justify-content: center;\n overflow-y: auto;\n font-size: 18px;\n color: white;\n font-weight: 700;\n text-align: center;\n align-items: center;\n line-height: 20px;\n"]))),f=d.ZP.div(s||(s=(0,p.Z)(["\n font-size: 18px;\n display: flex;\n justify-content: center;\n font-weight: 700;\n color: white;\n margin-top: -20px;\n"]))),b=d.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n font-size: 20px;\n"]))),h=d.ZP.div(r||(r=(0,p.Z)(["\n position: fixed;\n top: 300px; \n background: red;\n width: 400px;\n height: auto;\n border-radius: 6px;\n padding: 15px;\n overflow-y: initial !important\n padding-bottom: 20px;\n justify-content: center;\n"]))),g=d.ZP.div(o||(o=(0,p.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.show,n=e.onClose,a=(e.color,e.title),s=e.children,i=y.useState(!1),r=(0,l.Z)(i,2),o=r[0],p=r[1];y.useEffect((function(){p(!0)}),[]);var d=t?(0,c.jsx)(g,{children:(0,c.jsxs)(h,{children:[(0,c.jsx)(b,{children:(0,c.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),n()},children:(0,c.jsx)("span",{className:"material-icons",children:"cancel"})})}),a&&(0,c.jsx)(f,{children:(0,c.jsx)("div",{className:"flex-column",children:(0,c.jsx)("div",{className:"material-icons miui-small",children:a})})}),(0,c.jsx)(m,{dangerouslySetInnerHTML:{__html:s}})]})}):null;return o?u.createPortal(d,document.getElementById("modal")):null}},92673:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(73935),d=n(14141),c=n(85893),m=d.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 10px;\n padding-left: 20px;\n padding-right: 40px;\n padding-bottom: 20px;\n display: flex;\n justify-content: center;\n height: 500px;\n overflow-y: auto;\n color: white;\n"]))),f=d.ZP.div(s||(s=(0,p.Z)(["\n padding-top: 0px;\n font-size: 22px;\n display: flex;\n justify-content: center;\n font-weight: 800;\n margin-bottom: 20px;\n color: white;\n"]))),b=d.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n font-size: 20px;\n"]))),h=d.ZP.div(r||(r=(0,p.Z)(["\n background: linear-gradient(112deg, rgba(66,46,40,1) 0%, rgba(0,0,0,1) 48%, rgba(70,63,55,1) 100%);\n background-size: 400% 400%;\n width: 500px;\n height: 600px;\n border-radius: 6px;\n padding: 15px;\n overflow-y: initial !important\n padding-bottom: 20px;\n"]))),g=d.ZP.div(o||(o=(0,p.Z)(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.show,n=e.onClose,a=y.useState(!1),s=(0,l.Z)(a,2),i=s[0],r=s[1];y.useEffect((function(){r(!0)}),[]);var o=t?(0,c.jsx)(g,{children:(0,c.jsxs)(h,{children:[(0,c.jsx)(b,{children:(0,c.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),n()},children:(0,c.jsx)("span",{className:"material-icons",style:{marginTop:"4px"},children:"close"})})}),(0,c.jsx)(f,{children:(0,c.jsx)("span",{className:"material-icons miui-small",style:{marginTop:"4px"},children:"info_outline"})}),(0,c.jsx)(m,{})]})}):null;return i?u.createPortal(o,document.getElementById("modal")):null}},27921:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(85518),d=n(73935),c=n(14141),m=n(22794),f=n(62012),b=n(85893),h=c.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 5px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 25px;\n display: flex;_\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n margin-top: -15px;\n"]))),g=c.ZP.div(s||(s=(0,p.Z)(["\n margin-top: -15px;\n font-size: 14px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n margin-bottom: 15px;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n"]))),x=c.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),v=c.ZP.div(r||(r=(0,p.Z)(["\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 400px;\n max-width: ",";\n height: 220px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 3px;\n"])),u.tq?"90%":"60%"),T=c.ZP.div(o||(o=(0,p.Z)(["\n position: absolute;\n top: -60px;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.show,n=e.onClose,a=(e.children,e.handleModalData),s=e.handleTrigger,i=y.useState(f.U8),r=(0,l.Z)(i,2),o=r[0],p=r[1],u=y.useState(!1),c=(0,l.Z)(u,2),w=c[0],S=c[1],j=y.useState(!1),k=(0,l.Z)(j,2),N=k[0],M=k[1],Z=y.useState(""),R=(0,l.Z)(Z,2),C=R[0],P=R[1];y.useEffect((function(){S(!0)}),[]);var E=t?(0,b.jsxs)(T,{children:[(0,b.jsxs)(v,{children:[(0,b.jsx)(x,{children:(0,b.jsx)("a",{href:"#",onClick:function(e){a(void 0),s(!1),e.preventDefault(),n()},children:(0,b.jsx)("span",{className:"material-icons",children:"close"})})}),t&&(0,b.jsxs)(g,{children:[(0,b.jsx)("div",{className:"material-icons",style:{marginTop:"4px",fontSize:"46px"},children:"dns"}),(0,b.jsxs)("div",{style:{marginTop:"5px",marginBottom:"10px",fontSize:"18px"},children:[(0,b.jsx)("span",{style:{fontWeight:"700"},children:"Enter HTTP Gateway URL"}),(0,b.jsx)("button",{className:"button-tiny",style:{marginBottom:"-7.5px"},onClick:function(){M(!0),P('HTTP Gateway should be a HTTPS:// URL')},"data-tooltip":"Enlighten Me",children:(0,b.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]})]}),(0,b.jsxs)(h,{children:[(0,b.jsx)("input",{id:"keyid",placeholder:o,type:"text",value:o,onChange:function(e){p(e.target.value)},style:{background:"black",outline:"none",border:"none",padding:"5px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"14px",width:"100%",wordWrap:"break-word",textAlign:"left",color:"rgb(255, 255, 255, 0.6)",cursor:"copy"}},"0"),(0,b.jsx)("button",{className:"button",style:{height:"30px",width:"120px",marginTop:"17px",fontSize:"15px"},onClick:function(e){a(o),s(!0),e.preventDefault(),n()},"data-tooltip":"Confirm",children:(0,b.jsxs)("div",{className:"flex-row",style:{fontSize:"15px",fontWeight:"700"},children:["Confirm","\xa0",(0,b.jsx)("span",{className:"material-icons smoller",children:"local_laundry_service"})]})})]})]}),(0,b.jsx)("div",{id:"modal-inner",children:(0,b.jsx)(m.Z,{color:"cyan",icon:"info",onClose:function(){return M(!1)},show:N,position:"",children:C})})]}):null;return w?d.createPortal(E,document.getElementById("modal")):null}},22794:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(73935),d=n(14141),c=n(85518),m=n(85893),f=d.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 0px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 15px;\n display: flex;\n justify-content: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n line-height: 20px;\n max-width: 400px;\n"]))),b=d.ZP.div(s||(s=(0,p.Z)(["\n margin-top: -15px;\n font-size: 20px;\n display: flex;\n justify-content: center;\n font-weight: 700;\n margin-bottom: 15px;\n color: white;\n"]))),h=d.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),g=d.ZP.div(r||(r=(0,p.Z)(["\n position: fixed;\n top: ","; \n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: auto;\n max-width: ",";\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n padding: 5px;\n justify-content: center;\n text-align: center;\n"])),(function(e){return e.top}),c.tq?"90%":"60%"),x=d.ZP.div(o||(o=(0,p.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.icon,n=e.color,a=e.show,s=e.onClose,i=e.children,r=e.position,o=y.useState(!1),p=(0,l.Z)(o,2),d=p[0],c=p[1];y.useEffect((function(){c(!0)}),[]);var v=a?(0,m.jsx)(x,{children:(0,m.jsxs)(g,{top:r,children:[(0,m.jsx)(h,{children:(0,m.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),s()},children:(0,m.jsx)("span",{className:"material-icons",style:{margin:"4px"},children:"close"})})}),t&&(0,m.jsx)(b,{children:(0,m.jsx)("span",{className:"material-icons",style:{marginTop:"4px",fontSize:"36px",color:n},children:t})}),(0,m.jsx)(f,{dangerouslySetInnerHTML:{__html:i}})]})}):null;return d?u.createPortal(v,document.getElementById("modal")):null}},58595:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});for(var a=n(16835),s=n(67294),i=n(22794),r=["\u0660","\u0661","\u0662","\u0663","\u0664","\u0665","\u0666","\u0667","\u0668","\u0669"],o=["\u06f9","\u06f8","\u06f7","\u06f6","\u06f5","\u06f4","\u06f3","\u06f2","\u06f1","\u06f0"],p=["\u0966","\u0967","\u0968","\u0969","\u096a","\u096b","\u096c","\u096d","\u096e","\u096f"],l=["\uc601","\uc77c","\uc774","\uc0bc","\uc0ac","\uc624","\uc721","\uce60","\ud314","\uad6c"],y=["\u3007","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d"],u=n(85518),d=n(85893),c=[],m=65;m<=90;m++)"x"!==String.fromCharCode(m).toLocaleLowerCase()&&c.push(String.fromCharCode(m).toLocaleLowerCase());var f=function(e){var t=e.label,n=e.items,c=e.onItemClickStealth,m=e.onItemClickPreview,f=s.useState(""),b=(0,a.Z)(f,2),h=b[0],g=b[1],x=s.useState(""),v=(0,a.Z)(x,2),T=v[0],w=v[1],S=s.useState(""),j=(0,a.Z)(S,2),k=j[0],N=j[1],M=s.useState(!1),Z=(0,a.Z)(M,2),R=Z[0],C=Z[1];return(0,d.jsx)("ul",{className:"flex-column",style:{listStyle:"none",color:"white"},children:n.map((function(e){return(0,d.jsxs)("li",{style:{display:"flex",flexDirection:"column",width:"100%",marginLeft:u.tq?"-10.5%":"-9.5%"},children:[(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,d.jsxs)("span",{style:{marginBottom:"-3px",color:"white"},children:[(0,d.jsxs)("div",{children:[e.name.split("").map((function(e,t){return(0,d.jsx)("span",{style:{fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"600",fontSize:r.includes(e)||p.includes(e)||o.includes(e)||y.includes(e)||l.includes(e)?"24px":"21px"},children:e.toLowerCase()},t)})),(0,d.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"15px",color:"cyan"},children:"."}),(0,d.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:"11px",color:"cyan",fontWeight:"700",letterSpacing:"0px"},children:"ETH"}),"1"===e.migrated&&(0,d.jsx)("button",{className:"button-tiny",onClick:function(){C(!0),g("gpp_good"),N("lime"),w('Ready For Off-chain Use. Domain-specific Recordhash is Set')},"data-tooltip":"Ready With IPNS Recordhash",children:(0,d.jsx)("div",{className:"material-icons-round smol",style:{color:"lime"},children:"gpp_good"})}),"3/4"===e.migrated&&(0,d.jsx)("button",{className:"button-tiny",onClick:function(){C(!0),g("gpp_good"),N("cyan"),w('Ready For Off-chain Use. Global Ownerhash is Set')},"data-tooltip":"Ready With IPNS Ownerhash",children:(0,d.jsx)("div",{className:"material-icons-round smol",style:{color:"cyan"},children:"gpp_good"})}),"4/5"===e.migrated&&(0,d.jsx)("button",{className:"button-tiny",onClick:function(){C(!0),g("gpp_good"),N("yellow"),w('Ready For Off-chain Use. HTTP Gateway is Set')},"data-tooltip":"Ready With HTTP Gateway",children:(0,d.jsx)("div",{className:"material-icons-round smol",style:{color:"yellow"},children:"gpp_good"})}),"1/2"===e.migrated&&(0,d.jsx)("button",{className:"button-tiny",onClick:function(){C(!0),g("gpp_good"),N("orange"),w('Resolver is migrated but Storage is not Set')},"data-tooltip":"Using Default Gateway",children:(0,d.jsx)("div",{className:"material-icons-round smol",style:{color:"orange"},children:"gpp_good"})}),"0"===e.migrated&&(0,d.jsx)("button",{className:"button-tiny",onClick:function(){C(!0),g("gpp_maybe"),N("orangered"),w('Resolver is not migrated. Please MIGRATE to enable off-chain Records')},"data-tooltip":"Resolver Not Migrated",children:(0,d.jsx)("div",{className:"material-icons-round smol",style:{color:"orangered"},children:"gpp_maybe"})})]}),(0,d.jsx)(i.Z,{color:k,icon:h,onClose:function(){return C(!1)},show:R,position:"",children:T})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("a",{href:"https://app.ens.domains/name/".concat(e.name.toLowerCase(),".eth"),target:"_blank",rel:"noreferrer",children:(0,d.jsx)("img",{className:"icon-ens-small",alt:"ens-icon",src:"ens.png"})}),(0,d.jsx)("a",{href:"https://ens.vision/name/".concat(e.name),target:"_blank",rel:"noreferrer",children:(0,d.jsx)("img",{className:"icon-vision-small",alt:"ensvision-icon",src:"ens-vision.png"})}),(0,d.jsx)("a",{style:{marginRight:"15px"},href:"https://godid.io/items/".concat(e.name.toLowerCase(),".eth"),target:"_blank",rel:"noreferrer",children:(0,d.jsx)("img",{className:"icon-godid-small",alt:"godid-icon",src:"godid.svg"})}),(0,d.jsx)("button",{className:"button",style:{alignSelf:"flex-end",height:"40px",width:"40px"},onClick:function(){return c(e.name+".eth")},disabled:["0"].includes(e.migrated)||"view"===t,"data-tooltip":"Stealth Payments",children:(0,d.jsx)("div",{className:"flex-sans-direction",children:(0,d.jsx)("span",{className:"material-icons-round smoller",style:{fontSize:"25px",fontWeight:"700"},children:"account_balance_wallet"})})}),(0,d.jsx)("button",{className:"button",style:{alignSelf:"flex-end",height:"40px",width:"40px",marginLeft:"5px"},onClick:function(){return m(e.name+".eth")},"data-tooltip":"".concat(t," Your Records"),children:(0,d.jsx)("div",{className:"flex-sans-direction",children:(0,d.jsx)("span",{className:"material-icons-round smoller",style:{fontSize:"25px",fontWeight:"700"},children:"view"===t?"policy":"edit"})})})]})]}),(0,d.jsx)("hr",{})]},e.key)}))})}},22661:function(e,t,n){"use strict";n(67294);var a=n(85893);t.Z=function(e){var t=e.height,n=e.width,s='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ');return(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:s}})}},20321:function(e,t,n){"use strict";n.d(t,{Z:function(){return Ae}});var a,s,i,r,o,p,l,y,u,d,c,m,f,b,h,g=n(71383),x=n(27812),v=n(50029),T=n(59499),w=n(16835),S=n(87794),j=n.n(S),k=n(67294),N=n(73935),M=n(14141),Z=n(79911),R=n(2593),C=n(27586),P=n(83875),E=n(16441),D=n(84243),_=n(84917),O=n(8198),I=n(38197),A=n(31886),W=n(57734),z=n(37918),F=n.n(z),L=n(56371),B=n(22794),U=n(41894),G=n(27921),q=n(85893),K=M.ZP.div(a||(a=(0,g.Z)(["\n padding-top: 10px;\n padding-left: 50px;\n padding-right: 50px;\n padding-bottom: 25px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n"]))),H=M.ZP.div(s||(s=(0,g.Z)(["\n margin-top: -10px;\n font-size: 17px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n margin-bottom: 0px;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n"]))),J=M.ZP.div(i||(i=(0,g.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),V=M.ZP.div(r||(r=(0,g.Z)(["\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 450px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 5px;\n"]))),Y=M.ZP.div(o||(o=(0,g.Z)(["\n position: absolute;\n top: -60px;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"]))),$=function(e){var t=e.show,n=e.onClose,a=e.children,s=e.handleModalData,i=e.handleTrigger,r=k.useState(!1),o=(0,w.Z)(r,2),p=o[0],l=o[1],y=k.useState(!1),u=(0,w.Z)(y,2),d=u[0],c=u[1],m=k.useState(""),f=(0,w.Z)(m,2),b=f[0],h=f[1];k.useEffect((function(){l(!0)}),[]);var g=t?(0,q.jsxs)(Y,{children:[(0,q.jsxs)(V,{children:[(0,q.jsx)(J,{children:(0,q.jsx)("a",{href:"#",onClick:function(e){s(void 0),i(!1),e.preventDefault(),n()},children:(0,q.jsx)("span",{className:"material-icons",children:"close"})})}),t&&(0,q.jsxs)(H,{children:[(0,q.jsx)("div",{className:"material-icons",style:{marginTop:"4px",fontSize:"66px"},children:"cloud_upload"}),(0,q.jsx)("div",{style:{marginTop:"15px"},children:"Please choose your Storage"})]}),(0,q.jsxs)(K,{children:[(0,q.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,q.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){s("0"),i(!0),n()},"data-tooltip":a?"Uses Preset Global Ownerhash":"No Global Ownerhash Found",disabled:!a,children:(0,q.jsxs)("div",{className:"flex-row",children:["Ownerhash","\xa0",(0,q.jsx)("span",{className:"material-icons chonk",children:"recycling"})]})}),(0,q.jsx)("button",{className:"button-tiny",onClick:function(){c(!0),h('Ownerhash works for all your names in a wallet and must be set in UTILS. This is a slower but cheaper option. If you prefer this option, please go to UTILS tab first and set the Ownerhash')},"data-tooltip":"Cheaper but Slower IPNS",children:(0,q.jsx)("div",{className:"material-icons smol",style:{color:"yellow",marginLeft:"5px",marginTop:"21px"},children:"info_outline"})})]}),(0,q.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,q.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){s("1"),i(!0),n()},"data-tooltip":"Sets New On-chain Recordhash",children:(0,q.jsxs)("div",{className:"flex-row",children:["Recordhash","\xa0",(0,q.jsx)("span",{className:"material-icons chonk",children:"create"})]})}),(0,q.jsx)("button",{className:"button-tiny",onClick:function(){c(!0),h('Recordhash is specific to each name and it is a faster but expensive option')},"data-tooltip":"Faster but Expensive IPNS",children:(0,q.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"16px"},children:"info_outline"})})]}),(0,q.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,q.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){s("2"),i(!0),n()},"data-tooltip":"Sets New On-chain Gateway",children:(0,q.jsxs)("div",{className:"flex-row",children:["HTTP Gateway","\xa0",(0,q.jsx)("span",{className:"material-icons chonk",children:"dns"})]})}),(0,q.jsx)("button",{className:"button-tiny",onClick:function(){c(!0),h('HTTP Gateway can point to a web2 gateway or L2 proxy')},"data-tooltip":"Rapid But Centralised",children:(0,q.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"16px"},children:"info_outline"})})]})]})]}),(0,q.jsx)("div",{id:"modal-inner",children:(0,q.jsx)(B.Z,{color:"cyan",icon:"info",onClose:function(){return c(!1)},show:d,position:"",children:b})})]}):null;return p?N.createPortal(g,document.getElementById("modal")):null},Q=n(64637),X=n(85518),ee=n(62012),te=M.ZP.div(p||(p=(0,g.Z)(["\n padding-top: 5px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 25px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n margin-top: 5px;\n"]))),ne=M.ZP.div(l||(l=(0,g.Z)(["\n margin-top: -15px;\n font-size: 14px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n margin-left: 10px;\n"]))),ae=M.ZP.div(y||(y=(0,g.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),se=M.ZP.div(u||(u=(0,g.Z)(["\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 460px;\n max-width: ",";\n height: 270px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 3px;\n"])),X.tq?"90%":"60%"),ie=M.ZP.div(d||(d=(0,g.Z)(["\n position: absolute;\n top: -60px;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"]))),re=function(e){var t=e.show,n=e.onClose,a=e.children,s=e.handleModalData,i=e.handleTrigger,r=k.useState(!1),o=(0,w.Z)(r,2),p=o[0],l=o[1],y=k.useState("cyan"),u=(0,w.Z)(y,2),d=u[0],c=u[1];k.useEffect((function(){l(!0)}),[]);var m=function(e){i(!1),s(""),c("cyan"),e.preventDefault(),n()},f=t?(0,q.jsx)(ie,{children:(0,q.jsxs)(se,{children:[(0,q.jsx)(ae,{children:(0,q.jsx)("a",{href:"#",onClick:m,children:(0,q.jsx)("span",{className:"material-icons",children:"close"})})}),t&&(0,q.jsxs)(ne,{children:[(0,q.jsx)("div",{className:"material-icons",style:{marginTop:"10px",fontSize:"66px"},children:"hub"}),(0,q.jsx)("div",{style:{marginTop:"17px",marginBottom:"8px"},children:(0,q.jsx)("span",{style:{fontSize:"24px",fontWeight:"700"},children:"Your IPFS Hash"})})]}),(0,q.jsxs)(te,{children:[(0,q.jsxs)("div",{className:"flex-row",style:{width:"400px"},children:[(0,q.jsx)("input",{id:"info",value:a,type:"text",style:{background:"black",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"150%",wordWrap:"break-word",textAlign:"left",color:d,cursor:"copy",paddingRight:"32px"},disabled:!0},"1"),(0,q.jsx)("button",{className:"button-empty",onClick:function(){c("lime"),ee.vQ("info")},style:{marginLeft:"-25px",marginTop:"2px",color:d||"cyan"},children:(0,q.jsx)("span",{className:"material-icons",style:{fontSize:"22px",fontWeight:"700"},children:"content_copy"})})]}),(0,q.jsx)("button",{className:"button",style:{height:"33px",width:"140px",padding:"5px",marginTop:"20px",fontSize:"17px",fontWeight:"700"},onClick:m,"data-tooltip":"Roger That",children:(0,q.jsxs)("div",{className:"flex-row",style:{fontSize:"17px"},children:["Ok","\xa0",(0,q.jsx)("span",{className:"material-icons smoller",children:"done_all"})]})})]})]})}):null;return p?N.createPortal(f,document.getElementById("modal")):null},oe=n(75533);function pe(e){var t=0;for(var n in e)e.hasOwnProperty(n)&&(t+=e[n]);return t}var le,ye,ue,de,ce,me=M.ZP.div(c||(c=(0,g.Z)(["\n padding-top: 0px;\n padding-left: ",";\n padding-right: ",";\n padding-bottom: ",";\n margin-top: 0px;\n margin-left: ",";\n margin-right: ",";\n margin-bottom: ",";\n display: flex;\n justify-content: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n line-height: 20px;\n max-width: 450px;\n"])),X.tq?"10px":"20px",X.tq?"10px":"20px",X.tq?"10px":"20px",X.tq?"10px":"20px",X.tq?"10px":"20px",X.tq?"10px":"20px"),fe=M.ZP.div(m||(m=(0,g.Z)(["\n margin-top: -15px;\n font-size: 20px;\n display: flex;\n justify-content: center;\n font-weight: 700;\n margin-bottom: 15px;\n color: white;\n"]))),be=M.ZP.div(f||(f=(0,g.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),he=M.ZP.div(b||(b=(0,g.Z)(["\n position: fixed;\n top: 250px; \n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: auto;\n max-width: ",";\n height: 275px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n width: 450px;\n"])),X.tq?"90%":"60%"),ge=M.ZP.div(h||(h=(0,g.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"]))),xe=function(e){var t=e.icon,n=e.color,a=e.show,s=e.onClose,i=e.children,r=k.useState(!1),o=(0,w.Z)(r,2),p=o[0],l=o[1];k.useEffect((function(){l(!0)}),[]);var y=a?(0,q.jsx)(ge,{children:(0,q.jsxs)(he,{children:[(0,q.jsx)(be,{children:(0,q.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),s()},children:(0,q.jsx)("span",{className:"material-icons",style:{margin:"4px"},children:"close"})})}),t&&(0,q.jsx)(fe,{children:(0,q.jsx)("span",{className:"material-icons",style:{marginTop:"14px",fontSize:"72px",color:n},children:"verified"})}),(0,q.jsx)(me,{children:(0,q.jsxs)("div",{className:"flex-column",style:{marginBottom:"15px"},children:[(0,q.jsx)("div",{style:{fontSize:"24px",marginTop:"10px",color:"lime",fontWeight:"700"},children:"Off-Chain Records set"}),(0,q.jsxs)("div",{style:{marginTop:"20px",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",fontSize:"20px",fontWeight:"700"},children:[(0,q.jsx)("div",{children:"Your"}),"\xa0",(0,q.jsx)("div",{className:"material-icons",style:{marginBottom:"3px",fontSize:"28px",color:n},children:"local_gas_station"}),"\xa0",(0,q.jsx)("div",{children:"savings"})]}),(0,q.jsxs)("div",{style:{marginTop:"18px",fontFamily:"SF Mono",fontSize:"24px",fontWeight:"600",color:"lime"},children:[pe(i).toPrecision(3),"\xa0",(0,q.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:"21px",fontWeight:"700"},children:"ETH"})]})]})})]})}):null;return p?N.createPortal(y,document.getElementById("modal")):null},ve=n(22661),Te=n(59595),we=n(88006),Se=n(36490),je=n(19745),ke=n(24978),Ne=n(67191),Me=n(71775),Ze=n(35133),Re=n(59654);function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Pe(e){for(var t=1;tOn-chain Record Storage Pointer
',tooltip:"Set New Storage"},{key:1,header:"Resolver",type:"resolver",value:He,editable:!1,active:He!==Cr,state:!1,label:"Migrate",help:'Please migrate resolver to enjoy off-chain records',tooltip:"Please Migrate Resolver"},{key:2,header:"Contenthash",type:"contenthash",value:n,editable:He===Cr&&hr>0,active:ee.rv(n)&&hr>0,state:!1,label:"Edit",help:'Set your web contenthash',tooltip:"Set Contenthash"},{key:3,header:"Address",type:"addr",value:t,editable:He===Cr&&hr>0,active:ee.Q1(t)&&hr>0,state:!1,label:"Edit",help:'Set your default address',tooltip:"Set Address"},{key:4,header:"Avatar",type:"avatar",value:a,editable:He===Cr&&hr>0,active:ee.tr(a)&&hr>0,state:!1,label:"Edit",help:'Set your avatar',tooltip:"Set Avatar"},{key:5,header:"Public Key",type:"pubkey",value:s,editable:He===Cr&&hr>0,active:ee.V4(s)&&hr>0,state:!1,label:"Edit",help:'Set your Public Key',tooltip:"Set Public Key"},{key:6,header:"Email",type:"email",value:i,editable:He===Cr&&hr>0,active:ee.Jh(i)&&hr>0,state:!1,label:"Edit",help:'Set your Email',tooltip:"Set Email Record"},{key:7,header:"Github",type:"github",value:r,editable:He===Cr&&hr>0,active:ee.wE(r)&&hr>0,state:!1,label:"Edit",help:'Set your Github username',tooltip:"Set Github Record"},{key:8,header:"Url",type:"url",value:o,editable:He===Cr&&hr>0,active:ee.CB(o)&&hr>0,state:!1,label:"Edit",help:'Set your URL',tooltip:"Set URL Record"},{key:9,header:"Twitter",type:"twitter",value:p,editable:He===Cr&&hr>0,active:ee.L3(p)&&hr>0,state:!1,label:"Edit",help:'Set your Twitter username',tooltip:"Set Twitter Record"},{key:10,header:"Discord",type:"discord",value:l,editable:He===Cr&&hr>0,active:ee.Iu(l)&&hr>0,state:!1,label:"Edit",help:'Set your Discord username',tooltip:"Set Discord Record"},{key:11,header:"Farcaster",type:"farcaster",value:y,editable:He===Cr&&hr>0,active:ee.Io(y)&&hr>0,state:!1,label:"Edit",help:'Set your Farcaster username',tooltip:"Set Farcaster Record"},{key:12,header:"Nostr",type:"nostr",value:u,editable:He===Cr&&hr>0,active:ee.$o(u)&&hr>0,state:!1,label:"Edit",help:'Set your Nostr username',tooltip:"Set Discord Record"},{key:13,header:"Bitcoin",type:"btc",value:d,editable:He===Cr&&hr>0,active:ee.MP(d)&&hr>0,state:!1,label:"Edit",help:'Set your BTC Address',tooltip:"Set BTC Address"},{key:14,header:"Litecoin",type:"ltc",value:c,editable:He===Cr&&hr>0,active:ee.Yo(c)&&hr>0,state:!1,label:"Edit",help:'Set your LTC Address',tooltip:"Set LTC Address"},{key:15,header:"Dogecoin",type:"doge",value:m,editable:He===Cr&&hr>0,active:ee.fp(m)&&hr>0,state:!1,label:"Edit",help:'Set your DOGE Address',tooltip:"Set DOGE Address"},{key:16,header:"Solana",type:"sol",value:f,editable:He===Cr&&hr>0,active:ee.A2(f)&&hr>0,state:!1,label:"Edit",help:'Set your SOL Address',tooltip:"Set SOL Address"},{key:17,header:"Cosmos",type:"atom",value:b,editable:He===Cr&&hr>0,active:ee.s8(b)&&hr>0,state:!1,label:"Edit",help:'Set your ATOM Address',tooltip:"Set ATOM Address"}];(h=g)&&ga(h)}function Do(e){return!ee.vc.includes(e.type)&&us.length>1&&!us.includes("resolver")&&!us.includes("storage")}function _o(e){return ee.IN.includes(e.type)||!ca[e.key].active||!Ys[e.type]||e.state||!Mr||!zn.includes(String(Mr))||!ee.vc.includes(e.type)&&fs===ee.K5()}function Oo(e,t,n){var a="eip155:"+s+":"+P.computeAddress("0x".concat(n));return"Requesting Signature To Update ENS Record\n\nOrigin: ".concat(ye,"\nRecord Type: ").concat(e,"\nExtradata: ").concat(t,"\nSigned By: ").concat(a)}function Io(e){var t="eip155:"+s+":"+P.computeAddress("0x".concat(e));return"Requesting Signature To Approve ENS Records Signer\n\nOrigin: ".concat(ye,"\nApproved Signer: ").concat(t,"\nApproved By: ").concat(Ar)}function Ao(e){return"Requesting Signature To Generate ENS Records Signer\n\nOrigin: ".concat(ye,"\nKey Type: secp256k1\nExtradata: ").concat(e,"\nSigned By: ").concat(Ar)}function Wo(e,t){var n="",a="";["avatar","email","pubkey","github","url","twitter","discord","farcaster","nostr","zonehash"].includes(e)&&(a="string",n=t),["btc","ltc","doge","sol","atom"].includes(e)&&(a="bytes",n="0x".concat(Re.Z_[e.toUpperCase()].decoder(t).toString("hex"))),"contenthash"===e&&(a="bytes",n=Ne.vb(t).encoded),"addr"===e&&(a="address",n=t);var s=D.$.encode([a],[n]),i=[ee.z7];return new O.vU(i).encodeFunctionData("signedRecord",[Xa?P.computeAddress("0x".concat(Xa[0])):ee.DR,Us[e],ir,s])}function zo(e,t){var n="",a="";["avatar","email","pubkey","github","url","twitter","discord","farcaster","nostr","zonehash"].includes(e)&&(n="string",a=t),["btc","ltc","doge","sol","atom"].includes(e)&&(n="bytes",a="0x".concat(Re.Z_[e.toUpperCase()].decoder(t).toString("hex"))),"contenthash"===e&&(n="bytes",a=Ne.vb(t).encoded),"addr"===e&&(n="address",a=t);var s=D.$.encode([n],[a]),i=I.keccak256(s);return E.hexlify(A.pack(["bytes"],[i]))}function Fo(){return Hr&&Vr?String(Hr)===ee.O["1"===s?7:3]?Qr?String(Qr):ee.DR:String(Vr):ee.DR}function Lo(e,t){"avatar"===e&&yt(t),"email"===e&&mt(t),"pubkey"===e&>(t),"github"===e&&wt(t),"url"===e&&Nt(t),"twitter"===e&&Ct(t),"discord"===e&&_t(t),"farcaster"===e&&Wt(t),"nostr"===e&&Bt(t),"btc"===e&&Kt(t),"ltc"===e&&Yt(t),"doge"===e&&en(t),"sol"===e&&sn(t),"atom"===e&&ln(t),"zonehash"===e&&dn(t)}function Bo(e){tp(e,"avatar"),tp(e,"email"),tp(e,"pubkey"),tp(e,"github"),tp(e,"url"),tp(e,"twitter"),tp(e,"discord"),tp(e,"farcaster"),tp(e,"nostr"),ap(e,"btc"),ap(e,"ltc"),ap(e,"doge"),ap(e,"sol"),ap(e,"atom")}function Uo(e){"avatar"===e&&yt(""),"email"===e&&mt(""),"pubkey"===e&>(""),"github"===e&&wt(""),"url"===e&&Nt(""),"twitter"===e&&Ct(""),"discord"===e&&_t(""),"farcaster"===e&&Wt(""),"nostr"===e&&Bt(""),"btc"===e&&Kt(""),"ltc"===e&&Yt(""),"doge"===e&&en(""),"sol"===e&&sn(""),"atom"===e&&ln(""),"zonehash"===e&&dn(""),nt(!0)}function Go(){te(!0),wa(""),ds([]),ie(""),nr(""),es(void 0),Ya(void 0),b(!1),Qi(""),Jn(!1),ji(!1),os&&ps(!1),Ii({modalData:void 0,trigger:!1}),Ei({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1})}function qo(){vs("gpp_good"),js("lime"),$s(ee.gk()),Jn(!1),b(!1),gr(1),es(void 0),Ya(void 0),nr(""),Qi(""),ie(""),_a(!1),Zi({modalData:void 0,trigger:!1}),Ii({modalData:void 0,trigger:!1}),Ei({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1}),ji(!1),wa(""),os&&ps(!1),ss(!1)}function Ko(e){return Ho.apply(this,arguments)}function Ho(){return Ho=(0,v.Z)(j().mark((function e(t){var n,a;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Xa){e.next=4;break}return n=function(){var e=(0,v.Z)(j().mark((function e(){var n,a;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Z.Wallet("0x"+Xa[0],_r),e.next=3,n.signMessage(t.message);case 3:if(!(a=e.sent)){e.next=6;break}return e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=n(),e.abrupt("return",a);case 4:case"end":return e.stop()}}),e)}))),Ho.apply(this,arguments)}function Jo(){return Jo=(0,v.Z)(j().mark((function e(){var t;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:yr(3),Zs(["Waiting For Signature","3"]),Xa&&(t=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:qr({message:Io(Xa[0])});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),t());case 3:case"end":return e.stop()}}),e)}))),Jo.apply(this,arguments)}function Vo(e){return Yo.apply(this,arguments)}function Yo(){return Yo=(0,v.Z)(j().mark((function e(t){var n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:qr({message:Ao(I.keccak256(A.pack(["bytes32","address"],[I.keccak256(A.pack(["string"],[t])),Mr])))});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n();case 2:case"end":return e.stop()}}),e)}))),Yo.apply(this,arguments)}function $o(e,t){return Qo.apply(this,arguments)}function Qo(){return Qo=(0,v.Z)(j().mark((function e(t,n){var a,s;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=function(){var e=(0,v.Z)(j().mark((function e(){var a,s,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=new Ir.eth.Contract(ee.qP[6].contractInterface,ee.qP[6].addressOrName),"contenthash"!==t){e.next=7;break}return e.next=4,a.methods.setContenthash(C.VM(ye),Ne.vb(n).encoded).estimateGas({from:Mr});case 4:s=e.sent,e.next=24;break;case 7:if(!["avatar","email","pubkey","github","url","twitter","discord","farcaster","nostr","zonehash"].includes(t)){e.next=13;break}return e.next=10,a.methods.setText(C.VM(ye),t,n).estimateGas({from:Mr});case 10:s=e.sent,e.next=24;break;case 13:if(!["btc","ltc","doge","sol","atom"].includes(t)){e.next=20;break}return i="btc"===t?0:"ltc"===t?2:"doge"===t?3:"sol"===t?501:118,e.next=17,a.methods.setAddr(C.VM(ye),i,"0x".concat(Re.Z_[t.toUpperCase()].decoder(n).toString("hex"))).estimateGas({from:Mr});case 17:s=e.sent,e.next=24;break;case 20:if("addr"!==t){e.next=24;break}return e.next=23,a.methods.setAddr(C.VM(ye),n).estimateGas({from:Mr});case 23:s=e.sent;case 24:return e.abrupt("return",s);case 25:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=3,a();case 3:return s=e.sent,e.abrupt("return",s);case 5:case"end":return e.stop()}}),e)}))),Qo.apply(this,arguments)}function Xo(e){return ep.apply(this,arguments)}function ep(){return ep=(0,v.Z)(j().mark((function e(t){var n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=ai).contenthash="-",si(n),nt(!0),e.next=6,t.getContentHash().then((function(e){e?(n.contenthash="1",Gn(e),si(n)):(n.contenthash="0",Gn(""),si(n)),ip(t)})).catch((function(){n.contenthash="0",Gn(""),si(n),ip(t)}));case 6:case"end":return e.stop()}}),e)}))),ep.apply(this,arguments)}function tp(e,t){return np.apply(this,arguments)}function np(){return np=(0,v.Z)(j().mark((function e(t,n){var a;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a=ai)[n]="-",si(a),e.next=5,t.getText(n).then((function(e){e?(a[n]="1",Lo(n,e),si(a)):(a[n]="0",Uo(n),si(a))})).catch((function(){a[n]="0",Uo(n),si(a)}));case 5:case"end":return e.stop()}}),e)}))),np.apply(this,arguments)}function ap(e,t){return sp.apply(this,arguments)}function sp(){return sp=(0,v.Z)(j().mark((function e(t,n){var a,s;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a="btc"===n?0:"ltc"===n?2:"doge"===n?3:"sol"===n?501:118,(s=ai)[n]="-",si(s),"btc"!==n){e.next=7;break}return e.next=7,t.getAddress(a).then((function(e){e?(s[n]="1",Lo(n,e),si(s)):(s[n]="0",Uo(n),si(s))})).catch((function(){s[n]="0",Uo(n),si(s)}));case 7:case"end":return e.stop()}}),e)}))),sp.apply(this,arguments)}function ip(e){return rp.apply(this,arguments)}function rp(){return rp=(0,v.Z)(j().mark((function e(t){var n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=ai).addr="-",si(n),e.next=5,_r.resolveName(ye).then((function(e){e?(n.addr="1",rt(e),si(n),Bo(t)):(n.addr="0",rt(""),si(n),Bo(t))})).catch((function(){n.addr="0",rt(""),si(n),Bo(t)}));case 5:case"end":return e.stop()}}),e)}))),rp.apply(this,arguments)}function op(){return(op=(0,v.Z)(j().mark((function e(t,n){var a,s,i,r,o,p,l,y,u,d,c,m,f,b,h,g,x,v,T;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,_r.getResolver(n);case 3:if(null===(a=e.sent)||void 0===a||!a.address){e.next=95;break}if(Je(a.address),Qe(a),a.address!==Cr){e.next=27;break}return e.next=10,Me.I7(n,Pr,Fo());case 10:if(s=e.sent,!(t.ownerstamp.length>1)){e.next=22;break}r=0;case 13:if(!(r<2)){e.next=20;break}return e.next=16,ee.TN(Ne.K5(s[0]).decoded,r);case 16:i=e.sent;case 17:r++,e.next=13;break;case 20:e.next=23;break;case 22:i=1===t.ownerstamp.length?{_value:"//",_sequence:"-1"}:{_value:"//",_sequence:""};case 23:di(i._value.split("/")[2]),t.ownerstamp.length>=1&&i._sequence&&t.timestamp.revision&&Number(i._sequence)===Number(t.timestamp.revision)-1&&s[1]?(t.revision.addr?rt(t.addr):rt(""),t.revision.contenthash?Gn(t.contenthash):Gn(""),t.revision.avatar?yt(t.avatar):yt(""),t.revision.email?mt(t.email):mt(""),t.revision.github?wt(t.github):wt(""),t.revision.url?Nt(t.url):Nt(""),t.revision.twitter?Ct(t.twitter):Ct(""),t.revision.discord?Ct(t.discord):_t(""),t.revision.farcaster?Wt(t.farcaster):Wt(""),t.revision.nostr?Bt(t.nostr):Bt(""),t.revision.btc?Kt(t.btc):Kt(""),t.revision.ltc?Yt(t.ltc):Yt(""),t.revision.doge?en(t.doge):en(""),t.revision.sol?sn(t.sol):sn(""),t.revision.atom?ln(t.atom):ln(""),nt(!0)):Xo(a),e.next=93;break;case 27:return nt(!0),e.next=30,pp(["addr",""],a,n,!1);case 30:return o=e.sent,rt(o||""),e.next=34,pp(["contenthash",""],a,n,!1);case 34:return p=e.sent,Gn(p||""),e.next=38,pp(["avatar",""],a,n,!1);case 38:if(l=e.sent){e.next=43;break}return e.next=42,pp(["text","avatar"],a,n,!1);case 42:l=e.sent;case 43:return yt(l||""),e.next=46,pp(["text","email"],a,n,!1);case 46:return y=e.sent,mt(y||""),gt(""),e.next=51,pp(["text","github"],a,n,!1);case 51:return u=e.sent,wt(u||""),e.next=55,pp(["text","url"],a,n,!1);case 55:return d=e.sent,Nt(d||""),e.next=59,pp(["text","twitter"],a,n,!1);case 59:return c=e.sent,Ct(c||""),e.next=63,pp(["text","discord"],a,n,!1);case 63:return m=e.sent,_t(m||""),e.next=67,pp(["text","farcaster"],a,n,!1);case 67:return f=e.sent,Wt(f||""),e.next=71,pp(["text","nostr"],a,n,!1);case 71:return b=e.sent,Bt(b||""),e.next=75,pp(["address","btc"],a,n,!1);case 75:return h=e.sent,Kt(h||""),e.next=79,pp(["address","ltc"],a,n,!1);case 79:return g=e.sent,Yt(g||""),e.next=83,pp(["address","doge"],a,n,!1);case 83:return x=e.sent,en(x||""),e.next=87,pp(["address","sol"],a,n,!1);case 87:return v=e.sent,sn(v||""),e.next=91,pp(["address","atom"],a,n,!1);case 91:T=e.sent,ln(T||"");case 93:e.next=114;break;case 95:Qe(a),Je(""),rt(""),Gn(""),yt(""),mt(""),gt(""),wt(""),Nt(""),Ct(""),_t(""),Wt(""),Bt(""),Kt(""),Yt(""),en(""),sn(""),ln(""),nt(!0);case 114:e.next=119;break;case 116:e.prev=116,e.t0=e.catch(0),console.error("Error in getResolver():",e.t0);case 119:case"end":return e.stop()}}),e,null,[[0,116]])})))).apply(this,arguments)}function pp(e,t,n,a){return lp.apply(this,arguments)}function lp(){return(lp=(0,v.Z)(j().mark((function e(t,n,a,s){var i,r,o,p,l,y;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s&&(t[1]?na(t[1]):na(t[0])),e.prev=1,"addr"!==t[0]){e.next=12;break}return e.next=5,_r.resolveName(a);case 5:if(!(i=e.sent)){e.next=9;break}return s&&(rt(i),ya(i),na("1")),e.abrupt("return",i);case 9:case 19:case 34:case 44:case 59:return e.abrupt("return","");case 12:if("avatar"!==t[0]){e.next=22;break}return e.next=15,_r.getAvatar(a);case 15:if(!(r=e.sent)){e.next=19;break}return s&&(yt(r),ya(r),na("1")),e.abrupt("return",r);case 22:if("pubkey"!==t[0]){e.next=27;break}return s&&(gt(""),ya(""),na("1")),e.abrupt("return","");case 27:if("contenthash"!==t[0]){e.next=37;break}return e.next=30,n.getContentHash();case 30:if(!(o=e.sent)){e.next=34;break}return s&&(Gn(o),ya(o),na("1")),e.abrupt("return",o);case 37:if("text"!==t[0]){e.next=47;break}return e.next=40,n.getText(t[1]);case 40:if(!(p=e.sent)){e.next=44;break}return s&&("avatar"===t[1]&&yt(p),"email"===t[1]&&mt(p),"github"===t[1]&&wt(p),"url"===t[1]&&Nt(p),"twitter"===t[1]&&Ct(p),ya(p),na("1")),e.abrupt("return",p);case 47:if("address"!==t[0]){e.next=60;break}if(l="btc"===t[1]?0:"ltc"===t[1]?2:"doge"===t[1]?3:"sol"===t[1]?501:118,y="","btc"!==t[1]){e.next=56;break}return e.next=53,n.getAddress(l);case 53:y=e.sent,e.next=56;break;case 56:if(!y){e.next=59;break}return s&&("btc"===t[1]&&Kt(y),"ltc"===t[1]&&Yt(y),"doge"===t[1]&&en(y),"sol"===t[1]&&sn(y),"atom"===t[1]&&ln(y),ya(y),na("1")),e.abrupt("return",y);case 60:return s&&na("0"),e.abrupt("return","");case 64:return e.prev=64,e.t0=e.catch(1),console.error("Error in refreshRecord('".concat(t,"'):"),e.t0),s&&na("0"),e.abrupt("return","");case 69:case"end":return e.stop()}}),e,null,[[1,64]])})))).apply(this,arguments)}function yp(e,t,n,a){return up.apply(this,arguments)}function up(){return up=(0,v.Z)(j().mark((function e(t,n,a,i){var r,o,p;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},t?((o=JSON.parse(JSON.stringify(t,(function(e,t){return"bigint"===typeof t?String(t):t}))))._name._privKey&&(o._name._privKey._key={}),r=JSON.stringify(o)):r=JSON.stringify(r),p={ens:ye,controller:Mr,manager:Xa?P.computeAddress("0x".concat(Xa[0])):ee.DR,managerSignature:ir,revision:t?Zr.encode(t):{},chain:s,ipns:se,ipfs:i,gas:JSON.stringify(n),version:r,timestamp:a,hashType:oi},e.prev=3,e.next=6,fetch("".concat(Fr,":").concat(zr,"/revision"),{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}).then((function(e){return e.json()})).then((function(e){return!!e.status&&"true"===e.status}));case 6:e.next=16;break;case 8:e.prev=8,e.t0=e.catch(3),console.error("ERROR:","Failed to write Revision to CCIP2 backend"),Zs(["Revision Update Failed",""]),te(!0),b(!1),wr(!0),js("orangered");case 16:case"end":return e.stop()}}),e,null,[[3,8]])}))),up.apply(this,arguments)}function dp(){return(dp=(0,v.Z)(j().mark((function e(t,n,a){var i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={type:"read",ens:ye,controller:Fo(),recordsTypes:"all",recordsValues:"all",chain:s,storage:t,hashType:a},e.prev=1,e.next=4,fetch("".concat(Fr,":").concat(zr,"/read"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}).then((function(e){return e.json()})).then((function(e){var a={type:e.response.type,contenthash:e.response.contenthash,addr:e.response.addr,email:e.response.email,pubkey:e.response.pubkey,avatar:e.response.avatar,github:e.response.github,url:e.response.url,twitter:e.response.twitter,discord:e.response.discord,farcaster:e.response.farcaster,nostr:e.response.nostr,btc:e.response.btc,ltc:e.response.ltc,doge:e.response.doge,sol:e.response.sol,atom:e.response.atom,version:e.response.version,revision:e.response.revision,timestamp:e.response.timestamp,queue:ee.UW(e.response.timestamp),ownerstamp:e.response.ownerstamp};Ji(a);var s=[];if(a.ownerstamp.length>0)for(var i in a.ownerstamp)s.push(Number(a.ownerstamp[i]));t&&s.length>0&&"ownerhash"===n?gr(Math.round(Date.now()/1e3)-Math.max.apply(Math,s)-ee.A7):t&&s.length>0&&"recordhash"===n?gr(Math.round(Date.now()/1e3)-ee.UW(e.response.timestamp)-ee.A7):gr(1)}));case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.error("ERROR:","Failed to read from CCIP2 backend");case 9:case"end":return e.stop()}}),e,null,[[1,6]])})))).apply(this,arguments)}function cp(e){i(e),r(!0)}k.useEffect((function(){a.endsWith("#")||a.endsWith("-")||a.endsWith(":")||a.endsWith("&")?(y(!0),ue(a.slice(0,-1)),Zs([a.endsWith("-")||a.endsWith("&")?"Refreshing Records":a.endsWith("#")?"Checking History":"Loading Records","-"])):y(!1)}),[]),k.useEffect((function(){if(l&&ye){var e=C.VM(ye),t=I.keccak256(_.Y0(ye.split(".eth")[0]));Zn(e),En(String(R.O$.from(t))),In(String(R.O$.from(e))),Ge(!0)}}),[l,ye]),k.useEffect((function(){ha&&ma(ha)}),[ha]),k.useEffect((function(){Yr&&Nr(String(Yr))}),[Yr]),k.useEffect((function(){if(Xr)if(String(Xr).length>2){var e="";(e=String(Xr).startsWith(ee.Kv)?"ipns://".concat(Ne.K5(String(Xr)).decoded):_.ZN(String(Xr))).startsWith("https://"),jn("".concat(e))}else jn("")}),[Xr]),k.useEffect((function(){if(eo)if(String(eo).length>2&&eo!==Xr){var e="";(e=String(eo).startsWith(ee.Kv)?"ipns://".concat(Ne.K5(String(eo)).decoded):_.ZN(String(eo))).startsWith("https://"),vn("".concat(e)),Zs(["This May Take a While",""]),Zs([a.endsWith("-")||a.endsWith("&")?"Refreshing Records":a.endsWith("#")?"Checking History":"Loading Records","-"])}else"0x"===String(eo)&&eo===Xr?vn(He===Cr?ee.U8:""):vn("")}),[eo,Xr,He]),k.useEffect((function(){Ui.trigger&&Ui.modalData&&(To?cp("".concat(ye,"#")):ko?cp("".concat(ye,"-")):Ro&&cp("".concat(ye,"&")))}),[Ui,To,ko,Ro]),k.useEffect((function(){Oi.trigger&&Oi.modalData&&(Is(!1),"0"===Oi.modalData?(Jn(!0),mr(1)):Qn(!0))}),[Oi]),k.useEffect((function(){"1"===ka&&(Ta&&!os?"storage"===Ta?pi("0"===Oi.modalData?"recordhash":"gateway"):Pi.trigger&&(pi("1"===Pi.modalData?"recordhash":"2"===Pi.modalData?"gateway":"ownerhash"),mr(1),ao()):Ta&&os&&(xn&&(xn.startsWith("https://")?pi("gateway"):pi("recordhash")),Sn&&!xn&&(Sn.startsWith("https://")?pi("gateway"):pi("ownerhash")),ss(!0)))}),[Ta,Pi,os,ka,Oi]),k.useEffect((function(){if(Mr)if(kr&&"true"===String(kr))Fn([Mr]);else{var e=Fo();Fn([e])}}),[Mn,Hr,Qr,kr,On]),k.useEffect((function(){Hr&&(String(Hr)===ee.O["1"===s?7:3]?Ka(!0):Ka(!1))}),[Hr]),k.useEffect((function(){var e="";if(lt.startsWith("ipfs://"))e="https://ipfs.io/ipfs/".concat(lt.split("ipfs://")[1]),ee.Hc(e).then((function(){bi(!0),bn(e)})).catch((function(){bi(!1),bn("")}));else if(lt.startsWith("eip155:".concat(s))){var t=lt.split(":")[2].split("/")[0],n=lt.split(":")[2].split("/")[1];ee.iJ.nft.getNftMetadata(t,n).then((function(t){e=t.media[0].thumbnail||t.media[0].gateway,ee.Hc(e).then((function(){bi(!0),bn(e)})).catch((function(){bi(!1),bn("")}))}))}else lt.startsWith("https://")&&(e=lt,ee.Hc(e).then((function(){bi(!0),bn(e)})).catch((function(){bi(!1),bn("")})))}),[lt]),k.useEffect((function(){if(zi.trigger&&void 0!==zi.modalData&&os){b(!0),Zs(["Waiting For Signature","gateway"!==oi?"1":"2"]);var e=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:yr(2),mr(2),Vo(ee.O1(10));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}else zi.trigger&&void 0!==zi.modalData&&!os&&ie(zi.modalData)}),[zi,oi,os]),k.useEffect((function(){var e,t;Mi.trigger&&void 0!==Mi.modalData&&!Va&&Ta&&ka&&(yr(1),mr(os?3:1),Zs(["Waiting For Signature","1"]),qr({message:(e=I.keccak256(A.pack(["bytes32","address"],[I.keccak256(A.pack(["string"],[Mi.modalData])),Mr])),t=oi,"Requesting Signature To Generate IPNS Key\n\nOrigin: ".concat(["recordhash","gateway"].includes(t)?ye:Wr,"\nKey Type: ed25519\nExtradata: ").concat(e,"\nSigned By: ").concat(Ar))}),H(!0))}),[Mi,xn,Ta,ka,oi,os,us,Va]),k.useEffect((function(){if($i&&!Va){b(!0),Zs(["Generating IPNS Key",""]);var e=function(){var e=(0,v.Z)(j().mark((function e(){var t,n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="ownerhash"===oi?"eth:".concat(Mr||ee.DR):ye,e.next=3,(0,Se.x_)(t,Ar,$i,Mi.modalData);case 3:n=e.sent,Ya(n[0]),Zs(["IPNS Keypair Generated",""]);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[K,Va,Si,os,$i]),k.useEffect((function(){if(os&&Mi.trigger&&Si){Zs(["Waiting For Signature","2"]);var e=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:void 0!==Mi.modalData&&(yr(2),mr(3),Vo(Mi.modalData));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[Mi,Si,os,Ta]),k.useEffect((function(){if(os&&Si&&tr&&!Da){Hs([Fo(),C.VM(ye),Xa?P.computeAddress("0x".concat(Xa[0])):ee.DR]),b(!0),Zs(["Generating Signer Key",""]);var e=function(){var e=(0,v.Z)(j().mark((function e(){var t,n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="recordhash"!==oi?"eth:".concat(Mr||ee.DR):ye,e.next=3,(0,Se.x_)(t,Ar,tr,Mi.modalData);case 3:n=e.sent,es(n[1]),_a(!0),Zs(["Signer Keypair Generated",""]);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[tr,Si,os,Da]),k.useEffect((function(){if(Va&&$i){if("gateway"!==oi){var e=function(){var e=(0,v.Z)(j().mark((function e(){var t,n,a,s,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=ee.yt(Va),e.next=3,je.Dp(ke.UG.hexToBytes(t));case 3:n=e.sent,a=String(n),s=xn?xn.split("ipns://")[1]:"",i=Sn?Sn.split("ipns://")[1]:"",os&&(!a||a!==s&&a!==i)?a&&a!==s&&a!==i&&(Zi({modalData:void 0,trigger:!1}),Zs(["Seems Like Bad Password",""]),Go(),js("orangered"),yr(0),mr(0)):(ji(!0),ie(a));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}else os&&"gateway"===oi&&(ji(!0),ie(xn||Sn))}),[Va,$i,xn,Sn,os,oi]),k.useEffect((function(){Br&&1===lr?Qi(Br):Br&&3===lr?rr(Br):Br&&2===lr&&nr(Br)}),[Br,lr]),k.useEffect((function(){se&&!os?(mr(1),se.startsWith("k5")?lo():se.startsWith("https://")&&bo()):os&&(se.startsWith("k5")?mr(3):se.startsWith("https://")&&mr(2))}),[se,os]),k.useEffect((function(){if(us.length>1){var e=ca.map((function(e){return!ee.vc.includes(e.type)&&us.includes(e.type)?Pe(Pe({},e),{},{label:"Edit",help:"Set Record"}):Pe(Pe({},e),{},{label:"resolver"!==e.type?"storage"!==e.type?"Edit":"Set":"Migrate"})}));ga(e)}}),[us]),k.useEffect((function(){tt&&(Eo(xn||(Sn||xn),it,Un,lt,ht,ct,Tt,kt,Rt,Dt,At,Lt,qt,Vt,Xt,an,pn),b(!1))}),[tt,oi,xn,Sn,He,it,Un,lt,ct,ht,Tt,kt,Rt,Dt,At,Lt,qt,Vt,Xt,an,pn]),k.useEffect((function(){Ue&&function(e,t,n){dp.apply(this,arguments)}(xn||Sn,xn&&xn.startsWith("ipns://")?"recordhash":Sn&&Sn.startsWith("ipns://")?"ownerhash":"gateway",xn&&xn.startsWith("ipns://")?"recordhash":Sn&&Sn.startsWith("ipns://")?"ownerhash":"gateway")}),[Ue,Sn,xn]),k.useEffect((function(){hr&&ye&&!tt&&function(e,t){op.apply(this,arguments)}(Hi,ye)}),[Hi,hr,ye,tt]),k.useEffect((function(){Hi&&hr&&!tt&&(xn?xn.startsWith("https://")?pi("gateway"):pi("recordhash"):Sn?Sn.startsWith("https://")?pi("gateway"):pi("ownerhash"):pi("storage"))}),[Hi,hr,He,xn,Sn,tt]),k.useEffect((function(){if(Ta&&us.length>0){var e=ca.map((function(e){return us.includes(e.type)&&!ee.ID.includes(e.type)?Pe(Pe({},e),{},{editable:hr>0,active:hr>0}):!us.includes(e.type)&&["resolver"].includes(e.type)?Pe(Pe({},e),{},{editable:!1,active:!1}):["storage"].includes(e.type)?Pe(Pe({},e),{},{editable:!1,active:He===Cr}):e}));ga(e)}}),[Ta,He,us]),k.useEffect((function(){as&&os&&(Va&&Xa&&Xa[0]&&se?us.length>0&&(b(!0),Zs(["Setting Records",String(us.length)]),mr(us.length)):("gateway"!==oi?Mi.trigger||Jn(!0):(Mi.trigger||Jn(!0),Ya(["0x","0x"])),ss(!1)))}),[as,Xa,se,os,oi,Mi]),k.useEffect((function(){if(ta&&["0","1"].includes(ta)){if("1"===ta){var e=ca.map((function(e){return e.type===ia?Pe(Pe({},e),{},{value:la}):Pe({},e)}));ga(e)}setTimeout((function(){na(".")}),1e4),setTimeout((function(){na("")}),3e4)}}),[ta,la,ia]),k.useEffect((function(){if(os&&Xa&&Xa[0]&&fs&&!ee.xb(fs)&&us.length>0){var e=ee.K5();us.forEach(function(){var t=(0,v.Z)(j().mark((function t(n){var a;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!fs[n]){t.next=4;break}return t.next=3,Ko({message:Oo(ee.Th[ee.t8.indexOf(n)],zo(n,fs[n]),Xa[0])});case 3:a=t.sent;case 4:a&&(e[n]=a);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),Gs(e)}}),[os,Xa,fs,us]),k.useEffect((function(){!os||kr||ir||ee.xb(Us)?os&&kr&&!ee.xb(Us)&&rr("0x"):(mr(3),function(){Jo.apply(this,arguments)}())}),[kr,Us,oi]),k.useEffect((function(){var e=0;for(var t in Us)Us.hasOwnProperty(t)&&""!==Us[t]&&e++;if(os&&se&&e===us.length&&e>0&&ir){var n=ee.K5();for(var a in fs)fs.hasOwnProperty(a)&&""!==fs[a]&&(n[a]=Wo(a,fs[a]));var i={signatures:Us,manager:Xa?P.computeAddress("0x".concat(Xa[0])):ee.DR,managerSignature:ir,ens:ye,controller:Mr||ee.DR,ipns:se,recordsTypes:us,recordsValues:n,recordsRaw:fs,revision:Hi.revision,chain:s,hashType:oi},r=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Zs(["Writing Records",""]),e.prev=1,e.next=4,fetch("".concat(Fr,":").concat(zr,"/write"),{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}).then((function(e){return e.json()})).then(function(){var e=(0,v.Z)(j().mark((function e(t){var n,a,s,i,r;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Zs(["gateway"!==oi?"Publishing to IPNS":"Publishing to Gateway",""]),!Xa||!t.response){e.next=7;break}return n={},ca.map(function(){var e=(0,v.Z)(j().mark((function e(a){var s,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("resolver"===a.type||!t.response.meta[a.type]){e.next=22;break}return s=$o(a.type,t.response[a.type]),i=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([s]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=5,i();case 5:s.then((function(e){var t=d&&d.formatted&&d.formatted.gasPrice?Number(d.formatted.gasPrice):0;n[a.type]=e*t*1e-9})),"avatar"===a.type&&yt(t.response.avatar),"email"===a.type&&mt(t.response.email),"pubkey"===a.type&>(t.response.pubkey),"github"===a.type&&wt(t.response.github),"url"===a.type&&Nt(t.response.url),"twitter"===a.type&&Ct(t.response.twitter),"discord"===a.type&&_t(t.response.discord),"farcaster"===a.type&&Wt(t.response.farcaster),"nostr"===a.type&&Bt(t.response.nostr),"btc"===a.type&&Kt(t.response.btc),"ltc"===a.type&&Yt(t.response.ltc),"doge"===a.type&&en(t.response.doge),"sol"===a.type&&sn(t.response.sol),"atom"===a.type&&ln(t.response.atom),"zonehash"===a.type&&dn(t.response.zonehash),"contenthash"===a.type&&Gn(t.response.contenthash);case 22:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=6,new Promise((function(e){!function t(){Object.keys(n).length>0?e():setTimeout(t,100)}()}));case 6:"gateway"!==oi&&Va?(a=ee.yt(Va),i=function(){var e=(0,v.Z)(j().mark((function e(){var i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,je.Dp(ke.UG.hexToBytes(a));case 2:s=e.sent,i=function(){var e=(0,v.Z)(j().mark((function e(){var a,i,r,o;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.response.ipfs&&s&&n)){e.next=30;break}if(di(t.response.ipfs.split("ipfs://")[1]),a="/ipfs/"+t.response.ipfs.split("ipfs://")[1],Hi.revision){e.next=9;break}return e.next=6,je.v0(s,a);case 6:i=e.sent,e.next=13;break;case 9:return r=Zr.decode(new Uint8Array(Object.values(JSON.parse(JSON.stringify(Hi.revision))))),e.next=12,je.nP(r,a);case 12:i=e.sent;case 13:return ei(t.response.timestamp),e.next=16,yp(i,n,t.response.timestamp,t.response.ipfs.split("ipfs://")[1]);case 16:return e.next=18,je.nY(i,s.key);case 18:Ba(n),Fe(!0),ds([]),$s(ee.gk()),b(!1),o=ca.map((function(e){if(ee.vc.includes(e.type))return e;var n=Math.round(Date.now()/1e3)-ee.UW(t.response.timestamp)-ee.A7;return gr("gateway"===oi?1:n),t.response.meta[e.type]?Pe(Pe({},e),{},{value:t.response[e.type],state:!0,label:"edit",active:n>0,editable:n>0}):Pe(Pe({},e),{},{active:n>0,editable:n>0})})),ga(o),bs(ee.K5()),Gs(ee.K5()),ss(!1),yr(0),Zi({modalData:void 0,trigger:!1});case 30:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Object.keys(n).length>0&&i();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i()):(r=function(){var e=(0,v.Z)(j().mark((function e(){var a;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=17;break}return ei(t.response.timestamp),e.next=4,yp(void 0,n,t.response.timestamp,"");case 4:Ba(n),Fe(!0),ds([]),$s(ee.gk()),b(!1),a=ca.map((function(e){if(ee.vc.includes(e.type))return e;return gr(1),t.response.meta[e.type]?Pe(Pe({},e),{},{value:t.response[e.type],state:!0,label:"edit",active:!0,editable:!0}):Pe(Pe({},e),{},{active:!0,editable:!0})})),ga(a),bs(ee.K5()),Gs(ee.K5()),ss(!1),yr(0),Zi({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1});case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r());case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 4:e.next=14;break;case 6:e.prev=6,e.t0=e.catch(1),console.error("ERROR:","Failed to write to CCIP2 backend"),Zs(["Record Update Failed",""]),te(!0),b(!1),wr(!0),js("orangered");case 14:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(){return e.apply(this,arguments)}}();r()}os||ss(!1)}),[ir]),k.useEffect((function(){io&&To&&T&&!os&&!Y&&(us.includes("resolver")?(Wa("1"===Pi.modalData?'Resolver Migrated! You may now set IPNS Storage next':'Resolver Migrated! You may now set HTTP Storage next'),Ce(!0),qo()):(Wa('Off-chain Setup Complete with Ownerhash. Enjoy!'),Ce(!0),qo()))}),[io,To,T,us,He,os]),k.useEffect((function(){if(uo&&ko&&se){var e=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yp(void 0,{},"","");case 2:vn("ipns://".concat(se)),Zs(["Transaction Confirmed","1"]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[uo,ko,se]),k.useEffect((function(){go&&Ro&&se&&(vn("".concat(se)),Zs(["Transaction Confirmed","1"]))}),[go,Ro,se]),k.useEffect((function(){xn&&ko&&!os&&!Y?(Wa('Off-chain Setup Complete with Recordhash. Enjoy!'),Ce(!0),qo()):xn&&Ro&&!os&&!Y&&(Wa('Off-chain Setup Complete with HTTP Gateway. Enjoy!'),Ce(!0),qo())}),[xn,ko,Ro,os]),k.useEffect((function(){if(io&&To){var e=function(){var e=(0,v.Z)(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Zs(["Transaction Confirmed","1"]),setTimeout((function(){Je(Cr),S(!0)}),2e3);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[io,To]),k.useEffect((function(){so&&!ro?(b(!0),Zs(["Waiting for Transaction","1"]),xi&&vi(!1)):ro&&!so&&(xi?xi&&vi(!1):(Zs(["Transaction Declined by User",""]),Go()),Zi({modalData:void 0,trigger:!1}),Ei({modalData:void 0,trigger:!1}))}),[so,ro]),k.useEffect((function(){So&&!wo?(b(!0),Zs(["Waiting for Confirmation","1"]),xi&&vi(!1)):!So&&wo&&(xi?xi&&vi(!1):(Zs(["Transaction Failed",us.includes("storage")?"1":"2"]),Go()),Zi({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1}))}),[So,wo]),k.useEffect((function(){!co&&yo?(b(!0),Zs(["Waiting for Transaction","1"]),xi&&vi(!1)):co&&!yo&&(xi?xi&&vi(!1):(Zs(["Transaction Declined by User",""]),Go()),Zi({modalData:void 0,trigger:!1}),Ii({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1}))}),[yo,co]),k.useEffect((function(){!xo&&ho?(b(!0),Zs(["Waiting for Transaction","1"]),xi&&vi(!1)):xo&&!ho&&(xi?xi&&vi(!1):(Zs(["Transaction Declined by User",""]),Go()),Zi({modalData:void 0,trigger:!1}),Ii({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1}))}),[ho,xo]),k.useEffect((function(){Mo&&!No?(b(!0),Zs(["Waiting for Confirmation",us.includes("storage")?"1":"2"]),xi&&vi(!1)):!Mo&&No&&(xi?xi&&vi(!1):(Zs(["Transaction Failed",us.includes("storage")?"1":"2"]),Go()),Zi({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1}))}),[Mo,No]),k.useEffect((function(){Po&&!Co?(b(!0),Zs(["Waiting for Confirmation",us.includes("storage")?"1":"2"]),xi&&vi(!1)):!Po&&Co&&(xi?xi&&vi(!1):(Zs(["Transaction Failed",us.includes("storage")?"1":"2"]),Go()),Zi({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1}))}),[Po,Co]),k.useEffect((function(){if(Gr&&!Ur&&Ta)b(!0),xi&&vi(!1);else if(Ur&&!Gr&&Ta){if(xi)xi&&vi(!1);else{Zs(["Signature Failed",String(lr)]),Go(),ps(!1),ss(!1),$s(ee.gk()),bs(ee.K5());var e=ca.map((function(e){return"storage"!==e.type?e:Pe(Pe({},e),{},{state:!1})}));ga(e),us.includes("resolver")&&cp("".concat(ye,"#")),Na("0")}Zi({modalData:void 0,trigger:!1}),Fi({modalData:void 0,trigger:!1})}}),[Gr,Ur,Ta,lr,us]);var mp=t?(0,q.jsx)(Ie,{style:{backgroundColor:f?"black":"rgba(0, 0, 0, 1)"},children:(0,q.jsxs)(Oe,{style:{background:f?"none":"#121212"},children:[(0,q.jsx)(_e,{children:(0,q.jsx)("a",{href:"#",onClick:function(e){rr(""),Gs(ee.K5()),es(void 0),Ya(void 0),nr(""),Qi(""),i("".concat(ye,"+")),r(!0),e.preventDefault(),n()},children:(0,q.jsx)("span",{className:"material-icons-round",style:{marginTop:f?"120px":"7px"},children:"close"})})}),ye&&f&&(0,q.jsx)(De,{children:(0,q.jsx)("span",{className:"material-icons-round miui-small",style:{marginTop:"4px"}})}),ye&<&&fi&&!f&&ca.length>0&&(0,q.jsx)(De,{children:(0,q.jsx)("img",{src:fn||lt,width:"100px",alt:ye,onError:function(){return bi(!1)}})}),ye&&(!lt||!fi)&&!f&&ca.length>0&&(0,q.jsxs)(De,{children:["-"===ai.avatar&&(0,q.jsx)("div",{className:"flex-column",children:(0,q.jsx)(oe.ZP.Bars,{width:"110px",fill:"#fc6603"})}),["0","1",""].includes(ai.avatar)&&(0,q.jsx)("span",{className:"material-icons-round miui",style:{marginTop:"4px"},children:"portrait"})]}),ye&&f&&(0,q.jsx)(Ee,{children:(0,q.jsxs)("div",{className:"flex-column",style:{marginTop:"-10px",marginBottom:"80px"},children:[(0,q.jsx)("div",{style:{marginTop:"20px"},children:(0,q.jsx)(ve.Z,{height:50,width:50})}),(0,q.jsx)("div",{style:{marginTop:"20px"},children:(0,q.jsx)("span",{style:{color:"#fc6603",fontSize:"20px",fontWeight:"700"},children:Ms[0]})}),Ms[1]&&"-"!==Ms[1]&&(0,q.jsx)("div",{style:{marginTop:"10px"},children:(0,q.jsxs)("span",{style:{color:"white",fontSize:"18px",fontWeight:"700"},children:[(0,q.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"22px"},children:"gateway"!==oi?Ms[1]:os?String(Number(Ms[1])-1):Ms[1]}),(0,q.jsx)("span",{children:" Of "}),(0,q.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"22px"},children:"gateway"!==oi?cr:os?cr-1:cr})]})}),Ms[1]&&"-"===Ms[1]&&(0,q.jsx)("div",{style:{marginTop:"10px"},children:(0,q.jsx)("span",{style:{color:"white",fontSize:"18px",fontWeight:"700"},children:(0,q.jsx)("span",{children:Ms[0].includes("Refresh")?"Please Be Patient":"This May Take Some Time"})})})]})}),ye&&ca.length>0&&!f&&(0,q.jsx)(Ee,{children:(0,q.jsxs)("div",{className:"flex-column",children:[(0,q.jsxs)("div",{style:{marginBottom:"15px",marginTop:"-15px"},children:[(0,q.jsx)("span",{style:{color:"white",fontSize:"20px",fontWeight:"700",fontFamily:"SF Mono"},children:ye.split(".eth")[0]}),(0,q.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"15px",color:"cyan"},children:"."}),(0,q.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:"11px",color:"cyan",fontWeight:"700",letterSpacing:"0px",marginTop:"13px"},children:"ETH"})]}),(0,q.jsx)("div",{className:"scrollable-div",style:{maxHeight:"500px",overflowY:"scroll"},children:(0,q.jsx)("ul",{style:{listStyle:"none",color:"white",marginLeft:X.tq?"0":"-5%"},children:(0,q.jsx)("div",{className:"flex-column",style:{paddingBottom:X.tq?"5px":"15px",paddingTop:"10px"},children:ca.map((function(e){return(0,q.jsxs)("li",{style:{display:"flex",flexDirection:"column",width:X.tq?"480px":"530px",maxWidth:X.tq?"85%":"95%",paddingLeft:"15px",paddingRight:"15px"},children:[(0,q.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",flexDirection:"column"},children:[(0,q.jsxs)("div",{style:{marginBottom:"10px",display:"flex",justifyContent:"space-between",width:X.tq?"90%":"100%"},children:[(0,q.jsxs)("span",{style:{fontFamily:"Spotnik",fontWeight:"700",fontSize:"15px",color:ee.IN.includes(e.type)?"orange":"cyan",marginRight:"15px"},children:["storage"===e.type&&(0,q.jsxs)("span",{children:[(0,q.jsx)("span",{className:"material-icons-round smol",style:{fontSize:"20px",display:"inline-block",color:"white"},children:"cloud_circle"}),"\xa0",(0,q.jsx)("span",{style:{position:"relative",top:"-2px",left:"1px"},children:oi})]}),"storage"!==e.type&&(0,q.jsxs)("span",{children:[(0,q.jsx)("span",{className:"material-icons-round smol",style:{fontSize:"20px",display:"inline-block",color:"white"},children:"storage"===e.type?"cloud_circle":"resolver"===e.type?"gavel":"avatar"===e.type?"portrait":"addr"===e.type?"account_balance_wallet":"contenthash"===e.type?"public":"github"===e.type?"code":"url"===e.type?"share":"email"===e.type?"email":"pubkey"===e.type?"key":"discord"===e.type?"group_add":"farcaster"===e.type?"people_alt":"nostr"===e.type?"groups":"btc"===e.type?"currency_bitcoin":"ltc"===e.type?"currency_lira":"doge"===e.type?"pets":"sol"===e.type?"flash_on":"atom"===e.type?"font_download":"zonehash"===e.type?"tag":"circle_notifications"}),"\xa0",(0,q.jsx)("span",{style:{position:"relative",top:"-2px",left:"1px"},children:e.header})]}),ee.vc.includes(e.type)&&He===Cr&&!xn&&Sn&&(0,q.jsx)("button",{className:"button-tiny",onClick:function(){fe(!0),vs("gpp_good"),js("resolver"===e.type?"lime":Sn===ee.U8?"yellow":"cyan"),Ca("resolver"===e.type?'Resolver is Migrated':'Global '.concat(Sn.startsWith("https://")?Sn===ee.U8?"Default Storage":"Custom Gateway":"IPNS",' is set as Ownerhash'))},"data-tooltip":"resolver"===e.type?"Resolver Is Migrated":"".concat(Sn.startsWith("https://")?Sn===ee.U8?"Default Storage Is Ownerhash":"Custom Gateway Is Ownerhash":"IPNS Ownerhash Is Set"),children:(0,q.jsx)("div",{className:"material-icons-round smol",style:{color:"resolver"===e.type?"lime":Sn===ee.U8?"yellow":(Sn.startsWith("https://"),"cyan")},children:"gpp_good"})}),ee.vc.includes(e.type)&&He===Cr&&xn&&(0,q.jsx)("button",{className:"button-tiny",onClick:function(){fe(!0),vs("gpp_good"),js("resolver"===e.type?"lime":xn.startsWith("https://")?xn===ee.U8?"yellow":"cyan":"lime"),Ca("resolver"===e.type?'Resolver is Migrated':''.concat(xn.startsWith("https://")?xn===ee.U8?"Default Storage":"Custom Gateway":"IPNS"," is set as Recordhash"))},"data-tooltip":"resolver"===e.type?"Resolver Is Migrated":"".concat(xn.startsWith("https://")?xn===ee.U8?"Default Storage":"Custom Gateway":"Recordhash"," Is Set"),children:(0,q.jsx)("div",{className:"material-icons-round smol",style:{color:"resolver"===e.type?"lime":xn.startsWith("https://")?xn===ee.U8?"yellow":"cyan":"lime",marginLeft:(e.type,"5px")},children:"gpp_good"})}),ee.vc.includes(e.type)&&He!==Cr&&!xn&&!Sn&&(0,q.jsx)("button",{className:"button-tiny",onClick:function(){fe(!0),vs("resolver"===e.type?"gpp_bad":"cancel"),js("orangered"),Ca((e.type,'Resolver is not Migrated'))},"data-tooltip":(e.type,"Resolver Not Migrated"),children:(0,q.jsx)("div",{className:"material-icons-round smol",style:{color:"orangered",marginLeft:(e.type,"5px")},children:"resolver"===e.type?"gpp_bad":"cancel"})}),ee.vc.includes(e.type)&&He!==Cr&&(xn||Sn)&&(0,q.jsx)("button",{className:"button-tiny",onClick:function(){fe(!0),vs("resolver"===e.type?"gpp_bad":"gpp_maybe"),js("resolver"===e.type?"orangered":xn?"orange":"lightblue"),Ca("resolver"===e.type?'Resolver not Migrated':xn?''.concat(xn.startsWith("https://")?"Gateway":"Recordhash",' is Set as Recordhash'):''.concat(Sn.startsWith("https://")?"Gateway":"Ownerhash",' is Set as Ownerhash'))},"data-tooltip":xn?"Resolver not Migrated. ".concat(xn.startsWith("https://")?"Gateway":"Recordhash"," Exists as Recordhash"):"Resolver not Migrated. ".concat(Sn.startsWith("https://")?"Gateway":"Ownerhash"," Exists as Ownerhash"),children:(0,q.jsx)("div",{className:"material-icons-round smol",style:{color:"resolver"===e.type?"orangered":xn?"orange":"lightblue",marginLeft:(e.type,"5px")},children:"resolver"===e.type?"gpp_bad":"gpp_maybe"})}),"storage"===e.type&&(0,q.jsx)("button",{className:"button-tiny",onClick:function(){Fs(!0)},"data-tooltip":"Click For IPFS Hash",disabled:!ui,children:(0,q.jsx)("div",{className:"material-icons-round smoller",style:{color:ui?xn&&xn!==ee.U8?"lime":"cyan":"orange",fontSize:"17px",marginLeft:"-5.5px"},children:"rss_feed"})}),"resolver"!==e.type&&(0,q.jsx)("button",{className:"button-tiny",onClick:function(){fe(!0),vs("info"),js(ee.IN.includes(e.type)?"orange":"cyan"),Ca(ee.IN.includes(e.type)?'In Process of Bug Fixing':"".concat(e.help,""))},"data-tooltip":ee.IN.includes(e.type)?"Coming Soon":"Enlighten Me",children:(0,q.jsx)("div",{className:"material-icons-round smol",style:{color:ee.IN.includes(e.type)?"orange":"cyan",marginLeft:"storage"===e.type?"-5px":"5px"},children:"info_outline"})}),!ee.vc.includes(e.type)&&!ee.IN.includes(e.type)&&He===Cr&&(xn||Sn)&&(0,q.jsx)("button",{className:"button-tiny",onClick:function(){fe(!0),vs("timer"),js(hr<0?"orange":"lime"),Ca(hr<0?'Too Soon To Update. Please wait at least one hour between updates':'Ready For Next Record Update')},"data-tooltip":hr<0?"Too Soon To Update":"Ready For Next Update",children:(0,q.jsx)("div",{className:"material-icons-round smol",style:{color:hr<0?"orange":"lime",marginLeft:"-5px"},children:"timer"})}),!ee.vc.includes(e.type)&&!ee.IN.includes(e.type)&&He===Cr&&Mr&&(xn||Sn)&&Hi.ownerstamp.length>0&&(0,q.jsx)("button",{className:["",".","0","1"].includes(ta)||ta!==e.type?"button-tiny":"button-tiny blink",onClick:function(){""===ta&&pp([e.type,""],$e,ye,!0),ra(e.type)},"data-tooltip":[e.type,".","0","1"].includes(ta)?[".","","0","1"].includes(ta)?"1"===ta?"Record Updated":"0"===ta?"No New Update":"."===ta?"Please Wait to Refresh again":"-"===ta?"No New Update":"Click to Refresh":"Refresh in Progress":e.value.toLowerCase()===Hi[e.type].toLowerCase()?"Record in Sync with ".concat("gateway"===oi?"Gateway":"IPNS"):"Record not in Sync. Click to refresh",children:(0,q.jsx)("div",{className:"material-icons-round smol",style:{color:[e.type,".","0","1"].includes(ta)?[".","","0","1"].includes(ta)?"1"===ta?"lime":"0"===ta?"yellow":"."===ta?"white":"-"===ta?"yellow":"cyan":"white":e.value.toLowerCase()===Hi[e.type].toLowerCase()?"lightgreen":"orange",marginLeft:"-5px"},children:"sync"})}),e.state&&(0,q.jsx)("div",{className:"material-icons-round smol",style:{color:Y&&Tr?"orangered":"lime",marginLeft:"-5px"},children:Y&&Tr?"cancel":"task_alt"})]}),(0,q.jsx)("button",{className:"resolver"===e.type&&He!==Cr&&zn.includes(String(Mr))?"button emphasis":"button",hidden:"resolver"===e.type&&_o(e)||!Mr,disabled:_o(e),style:{alignSelf:"flex-end",height:"25px",width:"auto",marginBottom:"6px",background:_o(e)?Do(e)?"none":"rgb(255, 255, 255, 0.2)":Do(e)?"none":"linear-gradient(112deg, rgba(190,95,65,1) 0%, rgba(191,41,36,1) 48%, rgba(203,111,0,1) 100%)"},onClick:function(){wa(e.type),Na("1"),"resolver"===e.type?Es(!0):"storage"===e.type?Is(!0):ps(!0),ee.vc.includes(e.type)&&ds((function(t){return[].concat((0,x.Z)(t),[e.type])}))},"data-tooltip":e.tooltip,children:(0,q.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"13px",color:ee.vc.includes(e.type)?"white":Ys[e.type]?us.length>1?"lime":"white":"grey"},children:[Do(e)?"":e.label,"\xa0",(0,q.jsx)("span",{className:"material-icons-round smoller",children:Do(e)?Ys[e.type]?"task_alt":"cancel":"manage_history"})]})})]}),(0,q.jsxs)("div",{className:"flex-row",style:{width:"100%"},children:[(0,q.jsx)("input",{className:ee.vc.includes(e.type)?He!==Cr?"inputextra_":"storage"===e.type&&e.value==ee.U8?"inputextra__":"inputextra":He!==Cr?"inputextra_":ee.IN.includes(e.type)?"inputextra___":"inputextra",id:e.key,placeholder:ee.IN.includes(e.type)?"Coming Soon":e.value,type:"text",disabled:!e.editable||ee.IN.includes(e.type)||!zn.includes(String(Mr)),style:{background:He!==Cr||ee.IN.includes(e.type)||!zn.includes(String(Mr))?ee.vc.includes(e.type)?"linear-gradient(90deg, rgba(100,0,0,0.5) 0%, rgba(100,25,25,0.5) 50%, rgba(100,0,0,0.5) 100%)":"none":"storage"===e.type&&e.value===ee.U8?"linear-gradient(90deg, rgba(50,50,0,0.5) 0%, rgba(50,50,25,0.5) 50%, rgba(50,50,0,0.5) 100%)":"linear-gradient(90deg, rgba(0,50,0,0.5) 0%, rgba(25,50,25,0.5) 50%, rgba(0,50,0,0.5) 100%)",fontFamily:"SF Mono",fontWeight:"400",fontSize:"14px",width:"100%",wordWrap:"break-word",textAlign:"left",marginTop:"-5px",marginBottom:"-5px",paddingRight:ee.vc.includes(e.type)?"0":"10px",color:Ys[e.type]?"storage"===e.type&&e.value===ee.U8?"yellow":"lightgreen":"white",cursor:"copy"},onChange:function(t){!function(e,t){var n=t.trim(),a=Ys;if(a.resolver=!1,"storage"===e)a[e]=!0;else if("contenthash"===e)a[e]=ee.rv(n);else if("addr"===e)a[e]=ee.Q1(n);else if("avatar"===e)a[e]=ee.tr(n);else if("email"===e)a[e]=ee.Jh(n);else if("pubkey"===e)a[e]=ee.V4(n);else if("github"===e)a[e]=ee.wE(n);else if("url"===e)a[e]=ee.CB(n);else if("twitter"===e)a[e]=ee.L3(n);else if("discord"===e)a[e]=ee.Iu(n);else if("farcaster"===e)a[e]=ee.Io(n);else if("nostr"===e)a[e]=ee.Jh(n)||ee.MP(n);else if("btc"===e)a[e]=ee.MP(n);else if("ltc"===e)a[e]=ee.Yo(n);else if("doge"===e)a[e]=ee.fp(n);else if("sol"===e)a[e]=ee.A2(n);else if("atom"===e)a[e]=ee.s8(n);else{if("zonehash"!==e)return ds((function(t){return[].concat((0,x.Z)(t),[e])})),void console.error("Error:","Illegal State Checkpoint");a[e]=ee.MS(n)}$s(a);var s=fs;s[e]=n,bs(s);var i=us;!i.includes(e)&&fs[e]?ds((function(t){return[].concat((0,x.Z)(t),[e])})):i.includes(e)&&!fs[e]&&ds((function(t){return t.filter((function(t){return t!==e}))}));var r=ca.map((function(e){return us.includes(e.type)?Pe(Pe({},e),{},{editable:!0,active:!0,state:!1}):e}));ga(r)}(e.type,t.target.value)}},e.key),!ee.vc.includes(e.type)&&!ee.IN.includes(e.type)&&(0,q.jsx)("div",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700",marginLeft:"-25px",color:"1"===ai[e.type]?"lightgreen":"-"===ai[e.type]?"white":"grey"},children:"1"===ai[e.type]?"hourglass_bottom":"-"===ai[e.type]?"hourglass_top":"hourglass_empty"})]})]}),(0,q.jsx)("hr",{style:{marginTop:"5px"}})]},e.key)}))})})}),us.length>1&&!us.includes("resolver")&&!us.includes("storage")&&(0,q.jsx)("div",{style:{marginTop:"-10px",marginBottom:"40px"},children:(0,q.jsx)("button",{className:"button flex-column",hidden:us.length<2,disabled:!Mr||!zn.includes(String(Mr))||fs===ee.K5(),style:{alignSelf:"flex-end",height:"30px",width:"auto",marginTop:"-3px"},onClick:function(){wa("records"),Na("1"),ps(!0)},"data-tooltip":"Set Multiple Records in One Click",children:(0,q.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"15px"},children:["Edit All","\xa0",(0,q.jsx)("span",{className:"material-icons-round smoller",children:"manage_history"})]})})})]})}),(0,q.jsxs)("div",{id:"modal-inner",children:[(0,q.jsx)(B.Z,{color:Ss,icon:xs,onClose:function(){return fe(!1)},show:me,position:"",children:Ra}),(0,q.jsx)(Te.Z,{color:Ss,icon:xs,onClose:function(){return Ce(!1)},show:ge,handleTrigger:function(e){Gi((function(t){return Pe(Pe({},t),{},{trigger:e})}))},handleModalData:function(e){Gi((function(t){return Pe(Pe({},t),{},{modalData:e})}))},children:Aa}),(0,q.jsx)(xe,{color:"lime",icon:"free_breakfast",onClose:function(){Fe(!1),b(!1)},show:ze,children:La}),(0,q.jsx)(re,{handleTrigger:function(e){},handleModalData:function(e){},onClose:function(){Fs(!1)},show:zs,children:ui}),(0,q.jsx)(U.Z,{handleTrigger:function(e){Zi((function(t){return Pe(Pe({},t),{},{trigger:e})})),e?Na("1"):(Na("0"),wa("")),Jn(!1)},handleModalData:function(e){Zi((function(t){return Pe(Pe({},t),{},{modalData:e})}))},onClose:function(){Jn(!1)},show:Hn,children:[ye,oi]}),(0,q.jsx)(G.Z,{handleTrigger:function(e){Fi((function(t){return Pe(Pe({},t),{},{trigger:e})})),e?Na("1"):(Na("0"),wa(""))},handleModalData:function(e){Fi((function(t){return Pe(Pe({},t),{},{modalData:e})}))},onClose:function(){Qn(!1)},show:$n}),(0,q.jsx)($,{handleTrigger:function(e){Ei((function(t){return Pe(Pe({},t),{},{trigger:e})})),e?Na("1"):(Na("0"),wa(""))},handleModalData:function(e){Ei((function(t){return Pe(Pe({},t),{},{modalData:e})}))},onClose:function(){Es(!1)},show:Ps&&"resolver"===Ta,children:!!Sn||!!xn}),(0,q.jsx)(we.Z,{handleTrigger:function(e){Ii((function(t){return Pe(Pe({},t),{},{trigger:e})})),e?Na("1"):(Na("0"),wa(""))},handleModalData:function(e){Ii((function(t){return Pe(Pe({},t),{},{modalData:e})}))},onClose:function(){Is(!1)},show:Os&&!Hn,children:"1"}),(0,q.jsx)(Q.Z,{onClose:function(){te(!1),vi(!0)},color:Ss,show:Y&&!f,title:"cancel",children:Ms[0]})]})]})}):null;return l?N.createPortal(mp,document.getElementById("modal")):null}},41894:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(85518),d=n(73935),c=n(14141),m=n(22794),f=n(85893),b=c.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 5px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 25px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n margin-top: 5px;\n"]))),h=c.ZP.div(s||(s=(0,p.Z)(["\n margin-top: -15px;\n font-size: 14px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n margin-left: 10px;\n"]))),g=c.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),x=c.ZP.div(r||(r=(0,p.Z)(["\n position: fixed;\n top: 200px; \n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 460px;\n max-width: ",";\n height: 310px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 3px;\n"])),u.tq?"90%":"60%"),v=c.ZP.div(o||(o=(0,p.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.show,n=e.onClose,a=e.children,s=e.handleModalData,i=e.handleTrigger,r=y.useState(""),o=(0,l.Z)(r,2),p=o[0],u=o[1],c=y.useState(""),T=(0,l.Z)(c,2),w=T[0],S=T[1],j=y.useState(!1),k=(0,l.Z)(j,2),N=k[0],M=k[1],Z=y.useState(!1),R=(0,l.Z)(Z,2),C=R[0],P=R[1],E=y.useState(""),D=(0,l.Z)(E,2),_=D[0],O=D[1];y.useEffect((function(){M(!0)}),[]);var I=t?(0,f.jsxs)(v,{children:[(0,f.jsxs)(x,{children:[(0,f.jsx)(g,{children:(0,f.jsx)("a",{href:"#",onClick:function(e){s(void 0),i(!1),u(""),S(""),e.preventDefault(),n()},children:(0,f.jsx)("span",{className:"material-icons",children:"close"})})}),t&&(0,f.jsxs)(h,{children:[(0,f.jsx)("div",{className:"material-icons",style:{marginTop:"4px",fontSize:"66px",color:"lightgreen"},children:"key"}),(0,f.jsxs)("div",{style:{marginTop:"5px"},children:[(0,f.jsx)("span",{style:{fontSize:"16px",fontWeight:"700"},children:"Enter Secret Key Identifier"}),(0,f.jsx)("button",{className:"button-tiny",style:{marginTop:"-7.5px"},onClick:function(){P(!0),O('Secret identifier or Password is an Optional Value required to generate a secure IPNS key or the Record Signer key or RSA Encryption key.

You will need it to update your records in the future. Please remember your choice.

Your provided password will apply to all three Key types.
')},"data-tooltip":"Enlighten Me",children:(0,f.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]})]}),(0,f.jsxs)(b,{children:[(0,f.jsxs)("form",{className:"flex-column",style:{marginLeft:"13px",marginTop:"7px"},children:[(0,f.jsxs)("div",{className:"flex-row",style:{width:"150%"},children:[(0,f.jsx)("input",{id:"username",placeholder:"username (.eth domain)",type:"text",value:w||(a&&a.length>0?a[0]:""),readOnly:!!(a&&a.length>0),onChange:function(e){S(e.target.value)},style:{background:"black",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"150%",wordWrap:"break-word",textAlign:"left",color:w?w.endsWith(".eth")?"lime":"white":a&&a.length>0?"cyan":"rgb(255, 255, 255, 0.6)",cursor:"copy",marginBottom:"10px"}},"0"),(0,f.jsx)("button",{className:"button-tiny",style:{marginTop:"-12.5px"},disabled:!0,onClick:function(){P(!0),O('Username')},"data-tooltip":"Username",children:(0,f.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]}),(0,f.jsxs)("div",{className:"flex-row",style:{width:"150%"},children:[(0,f.jsx)("input",{id:"password",placeholder:"password (optional)",type:"password",value:p,onChange:function(e){u(e.target.value)},style:{background:"black",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"150%",wordWrap:"break-word",textAlign:"left",color:p?"white":"rgb(255, 255, 255, 0.6)",cursor:"copy"}},"1"),(0,f.jsx)("button",{className:"button-tiny",style:{marginTop:"0px"},disabled:!0,onClick:function(){P(!0),O('Secret IPNS identifier')},"data-tooltip":"Password",children:(0,f.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]})]}),(0,f.jsx)("button",{className:"button",style:{height:"33px",width:"130px",padding:"5px",marginTop:"20px",fontSize:"16px",fontWeight:"700"},onClick:function(){s(a&&a.length>0?p:"".concat(w,":").concat(p)),i(!0),u(""),S(""),n()},"data-tooltip":"Click to proceed",children:(0,f.jsxs)("div",{className:"flex-row",style:{fontSize:"15px"},children:["proceed","\xa0",(0,f.jsx)("span",{className:"material-icons smoller",children:"vpn_key"})]})})]})]}),(0,f.jsx)("div",{id:"modal-inner",children:(0,f.jsx)(m.Z,{color:"cyan",icon:"info",onClose:function(){return P(!1)},show:C,position:"",children:_})})]}):null;return N?d.createPortal(I,document.getElementById("modal")):null}},46822:function(e,t,n){"use strict";n.d(t,{Z:function(){return de}});var a,s,i,r,o,p,l,y,u,d,c=n(71383),m=n(27812),f=n(50029),b=n(59499),h=n(16835),g=n(87794),x=n.n(g),v=n(67294),T=n(73935),w=n(14141),S=n(79911),j=n(2593),k=n(27586),N=n(83875),M=n(16441),Z=n(84243),R=n(8198),C=n(38197),P=n(31886),E=n(84917),D=n(57734),_=n(37918),O=n.n(_),I=n(56371),A=n(22794),W=n(41894),z=n(85518),F=n(62012),L=n(85893),B=w.ZP.div(a||(a=(0,c.Z)(["\n padding-top: 5px;\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 25px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n margin-top: 5px;\n"]))),U=w.ZP.div(s||(s=(0,c.Z)(["\n margin-top: -15px;\n font-size: 14px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n margin-left: 10px;\n"]))),G=w.ZP.div(i||(i=(0,c.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),q=w.ZP.div(r||(r=(0,c.Z)(["\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 460px;\n max-width: ",";\n height: 360px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 3px;\n"])),z.tq?"90%":"60%"),K=w.ZP.div(o||(o=(0,c.Z)(["\n position: fixed;\n top: -30px;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"]))),H=function(e){var t=e.show,n=e.onClose,a=(e.children,e.handleModalData),s=e.handleTrigger,i=v.useState(!1),r=(0,h.Z)(i,2),o=r[0],p=r[1],l=v.useState(["white","white"]),y=(0,h.Z)(l,2),u=y[0],d=y[1],c=v.useState(""),m=(0,h.Z)(c,2),f=m[0],b=m[1],g=v.useState(""),x=(0,h.Z)(g,2),w=x[0],S=x[1],j=v.useState(""),k=(0,h.Z)(j,2),N=k[0],M=k[1],Z=v.useState(!1),R=(0,h.Z)(Z,2),C=R[0],P=R[1],E=v.useState(""),D=(0,h.Z)(E,2),_=D[0],O=D[1];v.useEffect((function(){p(!0)}),[]);var I=t?(0,L.jsxs)(K,{children:[(0,L.jsxs)(q,{children:[(0,L.jsx)(G,{children:(0,L.jsx)("a",{href:"#",onClick:function(e){s(!1),a(void 0),d(["white","white"]),e.preventDefault(),n()},children:(0,L.jsx)("span",{className:"material-icons",children:"close"})})}),(0,L.jsxs)(U,{children:[(0,L.jsx)("div",{className:"material-icons",style:{marginTop:"10px",fontSize:"66px",color:"lightgreen"},children:"shopping_cart_checkout"}),(0,L.jsxs)("div",{style:{marginTop:"17px",marginBottom:"0px"},children:[(0,L.jsx)("span",{style:{fontSize:"18px",fontWeight:"700"},children:"Enter Payment Info"}),(0,L.jsx)("button",{className:"button-tiny",style:{marginTop:"-7.5px",marginLeft:"5px"},onClick:function(){P(!0),O("Please Specify the Requested Details To Receive Private Payment")},"data-tooltip":"Enlighten Me",children:(0,L.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]})]}),(0,L.jsxs)(B,{children:[(0,L.jsxs)("div",{className:"flex-row",style:{width:"400px",marginTop:"5px"},children:[(0,L.jsx)("input",{id:"info",placeholder:"enter payer .eth",type:"text",style:{background:"black",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"90%",wordWrap:"break-word",textAlign:"left",color:u[0],cursor:"copy"},onChange:function(e){var t;(t=e.target.value).endsWith(".eth")?(b(t),d(["lime",u[1],u[2]])):(b(""),d(["white",u[1],u[2]]))}},"0"),(0,L.jsx)("button",{className:"button-tiny",style:{marginTop:"0px"},onClick:function(){P(!0),O('ENS Of Sender')},"data-tooltip":"Sender",children:(0,L.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]}),(0,L.jsxs)("div",{className:"flex-row",style:{width:"400px",marginTop:"7px"},children:[(0,L.jsx)("input",{id:"info",placeholder:"enter payee address or .eth",type:"text",style:{background:"black",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"90%",wordWrap:"break-word",textAlign:"left",color:u[1],cursor:"copy"},onChange:function(e){var t;t=e.target.value,F.Q1(t)||F.K9(t)?(S(t),d([u[0],"lime",u[2]])):(S(""),d([u[0],"white",u[2]]))}},"1"),(0,L.jsx)("button",{className:"button-tiny",style:{marginTop:"0px"},onClick:function(){P(!0),O('Private Address Of Receiver')},"data-tooltip":"Receiver",children:(0,L.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]}),(0,L.jsxs)("div",{className:"flex-row",style:{width:"400px",marginTop:"7px"},children:[(0,L.jsx)("input",{id:"info",placeholder:"enter amount to receive",type:"text",style:{background:"black",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"90%",wordWrap:"break-word",textAlign:"left",color:u[2],cursor:"copy"},onChange:function(e){var t;"0"===(t=e.target.value)||"0."===t||/[a-zA-Z]/.test(t)?(M(""),d([u[0],u[1],"white"])):(M(t),d([u[0],u[1],"lime"]))}},"2"),(0,L.jsx)("button",{className:"button-tiny",style:{marginTop:"0px"},onClick:function(){P(!0),O('Amount To Receiver')},"data-tooltip":"Ether",children:(0,L.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px"},children:"info_outline"})})]}),(0,L.jsx)("button",{className:"button",style:{height:"33px",width:"90px",padding:"5px",marginTop:"17px",fontSize:"16px",fontWeight:"700"},onClick:function(e){s(!0),a("".concat(f,":").concat(w,":").concat(N)),d(["white","white","white"]),e.preventDefault(),n()},disabled:!f||!w||!N,"data-tooltip":"Confirm",children:(0,L.jsxs)("div",{className:"flex-row",style:{fontSize:"15px"},children:["Next","\xa0",(0,L.jsx)("span",{className:"material-icons smoller",children:"navigate_next"})]})})]})]}),(0,L.jsx)("div",{id:"modal-inner",children:(0,L.jsx)(A.Z,{color:"cyan",icon:"info",onClose:function(){return P(!1)},show:C,position:"",children:_})})]}):null;return o?T.createPortal(I,document.getElementById("modal")):null},J=n(64637),V=n(22661),Y=n(59595),$=n(36490),Q=n(19745),X=n(24978),ee=n(67191),te=n(71775),ne=n(35133),ae=n(21429),se=n(58903);function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function re(e){for(var t=1;t0,state:!1,label:"Set",help:'Set Encryption Public Key To Send Money',tooltip:"Set New RSA PubKey"},{key:1,header:"Encrypted Payment",type:"stealth",value:e,editable:!1,active:$e===ri&&Hs>0,state:!1,label:"Set",help:'Encrypted Payment Address To Receive Money',tooltip:"Set New Stealth Payment"}])}function Ui(e,t){return"Requesting Signature To Generate IPNS Key\n\nOrigin: ".concat(["recordhash","storage"].includes(t)?xe:mi,"\nKey Type: ed25519\nExtradata: ").concat(e,"\nSigned By: ").concat(ci)}function Gi(e,t,n){var a="eip155:"+s+":"+N.computeAddress("0x".concat(n));return"Requesting Signature To Update ENS Record\n\nOrigin: ".concat(xe,"\nRecord Type: ").concat(e,"\nExtradata: ").concat(t,"\nSigned By: ").concat(a)}function qi(e){var t="eip155:"+s+":"+N.computeAddress("0x".concat(e));return"Requesting Signature To Approve ENS Records Signer\n\nOrigin: ".concat(xe,"\nApproved Signer: ").concat(t,"\nApproved By: ").concat(ci)}function Ki(e){return"Requesting Signature To Generate ENS Records Signer\n\nOrigin: ".concat(xe,"\nKey Type: secp256k1\nExtradata: ").concat(e,"\nSigned By: ").concat(ci)}function Hi(e){return"Requesting Signature To Generate Encryption Key\n\nOrigin: ".concat(xe,"\nKey Type: RSA-1048\nExtradata: ").concat(e,"\nSigned By: ").concat(ci)}function Ji(e,t){var n="",a="";["stealth","rsa"].includes(e)&&(a="string",n=t);var s=Z.$.encode([a],[n]),i=[F.z7];return new R.vU(i).encodeFunctionData("signedRecord",[Yn?N.computeAddress("0x".concat(Yn[0])):F.DR,Ia[e],Os,s])}function Vi(e,t){var n="",a="";["stealth","rsa"].includes(e)&&(n="string",a=t);var s=Z.$.encode([n],[a]),i=C.keccak256(s);return M.hexlify(P.pack(["bytes"],[i]))}function Yi(){return Ci&&Ei?String(Ci)===F.O["1"===s?7:3]?Oi?String(Oi):F.DR:String(Ei):F.DR}function $i(){de(!0),cn(""),la([]),be(""),Es(""),$n(void 0),Un(void 0),Hn(void 0),w(!1),js(""),Zs(""),kn(!1),Bt(!1),ps({modalData:void 0,trigger:!1}),ds({modalData:void 0,trigger:!1}),ss(!1),sa&&ia(!1)}function Qi(){ha("gpp_good"),Ta("lime"),Bt(!1),$n(void 0),Un(void 0),Hn(void 0),Es(""),js(""),Zs(""),be(""),kn(!1),ps({modalData:void 0,trigger:!1}),ds({modalData:void 0,trigger:!1}),ss(!1),cn(""),w(!1),sa&&ia(!1),ta(!1)}function Xi(e){return er.apply(this,arguments)}function er(){return er=(0,f.Z)(x().mark((function e(t){var n,a;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Yn){e.next=4;break}return n=function(){var e=(0,f.Z)(x().mark((function e(){var n,a;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new S.Wallet("0x"+Yn[0],yi),e.next=3,n.signMessage(t.message);case 3:if(!(a=e.sent)){e.next=6;break}return e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=n(),e.abrupt("return",a);case 4:case"end":return e.stop()}}),e)}))),er.apply(this,arguments)}function tr(){return tr=(0,f.Z)(x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Fs(4),ka(["Waiting For Signature","rsa"===dn?"4":"3"]),Yn&&(t=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ti({message:qi(Yn[0])});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),t());case 3:case"end":return e.stop()}}),e)}))),tr.apply(this,arguments)}function nr(e){return ar.apply(this,arguments)}function ar(){return ar=(0,f.Z)(x().mark((function e(t){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Fs(2),n=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ti({message:Ki(C.keccak256(P.pack(["bytes32","address"],[C.keccak256(P.pack(["string"],[t])),ai])))});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n();case 3:case"end":return e.stop()}}),e)}))),ar.apply(this,arguments)}function sr(e,t){return ir.apply(this,arguments)}function ir(){return ir=(0,f.Z)(x().mark((function e(t,n){var a,s;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=function(){var e=(0,f.Z)(x().mark((function e(){var a,s;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=new di.eth.Contract(F.qP[6].contractInterface,F.qP[6].addressOrName),!["stealth","rsa"].includes(t)){e.next=5;break}return e.next=4,a.methods.setText(k.VM(xe),t,n).estimateGas({from:ai});case 4:s=e.sent;case 5:return e.abrupt("return",s);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=3,a();case 3:return s=e.sent,e.abrupt("return",s);case 5:case"end":return e.stop()}}),e)}))),ir.apply(this,arguments)}function rr(e){return or.apply(this,arguments)}function or(){return or=(0,f.Z)(x().mark((function e(t){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getText("stealth").then((function(e){e?(_t(e),pr(t)):(_t(""),pr(t))})).catch((function(){_t(""),pr(t)}));case 2:case"end":return e.stop()}}),e)}))),or.apply(this,arguments)}function pr(e){return lr.apply(this,arguments)}function lr(){return lr=(0,f.Z)(x().mark((function e(t){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getText("rsa").then((function(e){e?(Wt(e),rt(!0)):(Wt(""),rt(!0))})).catch((function(){Wt(""),rt(!0)}));case 2:case"end":return e.stop()}}),e)}))),lr.apply(this,arguments)}function yr(){return(yr=(0,f.Z)(x().mark((function e(t,n){var a,s,i,r,o,p;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,yi.getResolver(n);case 3:if(null===(a=e.sent)||void 0===a||!a.address){e.next=38;break}if(Qe(a.address),nt(a),a.address!==ri){e.next=27;break}return e.next=10,te.I7(n,oi,Yi());case 10:if(s=e.sent,!(t.ownerstamp.length>1)){e.next=22;break}r=0;case 13:if(!(r<2)){e.next=20;break}return e.next=16,F.TN(ee.K5(s[0]).decoded,r);case 16:i=e.sent;case 17:r++,e.next=13;break;case 20:e.next=23;break;case 22:i=1===t.ownerstamp.length?{_value:"//",_sequence:"-1"}:{_value:"//",_sequence:""};case 23:Ya(i._value.split("/")[2]),t.ownerstamp.length>=1&&Number(i._sequence)===Number(t.timestamp.revision)-1&&s[1]?(t.stealth||t.rsa?(_t(t.stealth),Wt(t.rsa)):(_t(""),Wt("")),rt(!0)):rr(a),e.next=36;break;case 27:return e.next=29,ur(["text","stealth"],a,n,!1);case 29:return o=e.sent,_t(o||""),e.next=33,ur(["text","rsa"],a,n,!1);case 33:p=e.sent,Wt(p||""),rt(!0);case 36:e.next=43;break;case 38:nt(a),Qe(""),_t(""),Wt(""),rt(!0);case 43:e.next=48;break;case 45:e.prev=45,e.t0=e.catch(0),console.error("Error in getResolver():",e.t0);case 48:case"end":return e.stop()}}),e,null,[[0,45]])})))).apply(this,arguments)}function ur(e,t,n,a){return dr.apply(this,arguments)}function dr(){return(dr=(0,f.Z)(x().mark((function e(t,n,a,s){var i;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s&&(t[1]?Kt(t[1]):Kt(t[0])),e.prev=1,"text"!==t[0]){e.next=10;break}return e.next=5,n.getText(t[1]);case 5:if(!(i=e.sent)){e.next=10;break}return"stealth"===t[1]?_t(i):"rsa"===t[1]&&Wt(i),s&&(en(i),Kt("1")),e.abrupt("return",i);case 10:return s&&Kt("0"),e.abrupt("return","");case 14:return e.prev=14,e.t0=e.catch(1),console.error("Error in refreshRecord('".concat(t,"'):"),e.t0),s&&Kt("0"),e.abrupt("return","");case 19:case"end":return e.stop()}}),e,null,[[1,14]])})))).apply(this,arguments)}function cr(e,t,n,a){return mr.apply(this,arguments)}function mr(){return mr=(0,f.Z)(x().mark((function e(t,n,a,i){var r,o,p;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},t?((o=JSON.parse(JSON.stringify(t,(function(e,t){return"bigint"===typeof t?String(t):t}))))._name._privKey&&(o._name._privKey._key={}),r=JSON.stringify(o)):r=JSON.stringify(r),p={ens:xe,controller:ai,manager:Yn?N.computeAddress("0x".concat(Yn[0])):F.DR,managerSignature:Os,revision:t?si.encode(t):{},chain:s,ipns:fe,ipfs:i,gas:JSON.stringify(n),version:r,timestamp:a,hashType:Ka},e.prev=3,e.next=6,fetch("".concat(bi,":").concat(fi,"/revision"),{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}).then((function(e){return e.json()})).then((function(e){return!!e.status&&"true"===e.status}));case 6:e.next=16;break;case 8:e.prev=8,e.t0=e.catch(3),console.error("ERROR:","Failed to write Revision to CCIP2 backend"),ka(["Revision Update Failed",""]),de(!0),w(!1),Qs(!0),Ta("orangered");case 16:case"end":return e.stop()}}),e,null,[[3,8]])}))),mr.apply(this,arguments)}function fr(){return fr=(0,f.Z)(x().mark((function e(t,n,a){var i;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={type:"read",ens:xe,controller:Yi(),recordsTypes:["stealth","rsa","revision","version"],recordsValues:"all",chain:s,storage:t,hashType:a},e.prev=1,e.next=4,fetch("".concat(bi,":").concat(fi,"/read"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}).then((function(e){return e.json()})).then((function(e){var a={type:e.response.type,stealth:e.response.stealth,rsa:e.response.rsa,version:e.response.version,revision:e.response.revision,timestamp:e.response.timestamp,queue:F.UW(e.response.timestamp),ownerstamp:e.response.ownerstamp};vs(a);var s=[];if(a.ownerstamp.length>0)for(var i in a.ownerstamp)s.push(Number(a.ownerstamp[i]));t&&s.length>0&&"ownerhash"===n?Js(Math.round(Date.now()/1e3)-Math.max.apply(Math,s)-F.A7):t&&s.length>0&&"recordhash"===n?Js(Math.round(Date.now()/1e3)-F.UW(e.response.timestamp)-F.A7):Js(1)}));case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.error("ERROR:","Failed to read from CCIP2 backend");case 9:case"end":return e.stop()}}),e,null,[[1,6]])}))),fr.apply(this,arguments)}v.useEffect((function(){a.endsWith(".eth")?(y(!0),ve(a),ka(["Loading Stealth Records","-"])):y(!1)}),[]),v.useEffect((function(){if(l&&xe){var e=k.VM(xe),t=C.keccak256(E.Y0(xe.split(".eth")[0]));gt(e),wt(String(j.O$.from(t))),Nt(String(j.O$.from(e))),Je(!0)}}),[l,xe]),v.useEffect((function(){pn&&sn(pn)}),[pn]),v.useEffect((function(){Di&&ni(String(Di))}),[Di]),v.useEffect((function(){if(Ii)if(String(Ii).length>2){var e="";(e=String(Ii).startsWith(F.Kv)?"ipns://".concat(ee.K5(String(Ii)).decoded):E.ZN(String(Ii))).startsWith("https://"),mt("".concat(e))}else mt(void 0)}),[Ii]),v.useEffect((function(){if(Ai)if(String(Ai).length>2&&Ai!==Ii){var e="";(e=String(Ai).startsWith(F.Kv)?"ipns://".concat(ee.K5(String(Ai)).decoded):E.ZN(String(Ai))).startsWith("https://"),yt("".concat(e)),ka(["Loading Stealth Records","-"])}else yt(void 0)}),[Ai,Ii]),v.useEffect((function(){fs.trigger&&fs.modalData}),[fs]),v.useEffect((function(){"1"===bn&&dn&&sa&&(lt&&(lt.startsWith("https://")?Ha("gateway"):Ha("recordhash")),ct&&!lt&&(ct.startsWith("https://")?Ha("gateway"):Ha("ownerhash")),ta(!0))}),[dn,sa,bn]),v.useEffect((function(){if(ai)if(ti&&"true"===String(ti))Ct([ai]);else{var e=Yi();Ct([e])}}),[ht,Ci,Oi,ti,kt]),v.useEffect((function(){Ci&&(String(Ci)===F.O["1"===s?7:3]?zn(!0):zn(!1))}),[Ci]),v.useEffect((function(){if(Zi&&zi){var e=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ka(["Transaction Confirmed",""]),setTimeout((function(){Dn('Payment Sent Successfully'),Ge(!0),Qi()}),1e3);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[Zi,zi]),v.useEffect((function(){Mi&&!Ni?(w(!0),ka(["Waiting for Transaction",""]),Xa&&es(!1)):Ni&&!Mi&&(Xa?Xa&&es(!1):(ka(["Transaction Declined by User",""]),$i()),ps({modalData:void 0,trigger:!1}))}),[Mi,Ni]),v.useEffect((function(){Li&&!Fi?(w(!0),ka(["Waiting for Confirmation",""]),Xa&&es(!1)):!Li&&Fi&&(Xa?Xa&&es(!1):(ka(["Transaction Failed",""]),$i()),ps({modalData:void 0,trigger:!1}))}),[Li,Fi]),v.useEffect((function(){var e="";us.trigger&&us.modalData,os.trigger&&void 0!==os.modalData&&(e=os.modalData),"rsa"===dn&&"gateway"!==Ka?os.trigger&&!Bn&&bn&&(Fs(1),ka(["Waiting For Signature","1"]),Ti({message:Ui(C.keccak256(P.pack(["bytes32","address"],[C.keccak256(P.pack(["string"],[e])),ai])),Ka)}),G(!0)):"stealth"===dn&&"gateway"!==Ka?us.trigger&&!Bn&&bn&&!F.xb(da)&&(Fs(1),ka(["Waiting For Signature","1"]),Ti({message:Ui(C.keccak256(P.pack(["bytes32","address"],[C.keccak256(P.pack(["string"],[e])),ai])),Ka)}),G(!0)):dn&&"gateway"===Ka&&js("0")}),[os,us,lt,dn,bn,Ka,sa,pa,Bn]),v.useEffect((function(){"stealth"===dn&&os.trigger&&void 0!==os.modalData&&Ra(!0)}),[os,dn]),v.useEffect((function(){"stealth"===dn&&(us.trigger||us.modalData||(ps({modalData:void 0,trigger:!1}),Ra(!1)))}),[us,dn]),v.useEffect((function(){Zn&&os.trigger&&void 0!==os.modalData&&(Fs(3),Gs(1),ka(["Waiting For Signature","1"]),Ti({message:Hi(C.keccak256(P.pack(["bytes32","address"],[C.keccak256(P.pack(["string"],[os.modalData])),ai])))}),G(!0))}),[os,Zn,Ka]),v.useEffect((function(){if(Zn&&U&&Ms&&os.trigger){ka(["Generating Encryption Key",""]);var e=function(){var e=(0,f.Z)(x().mark((function e(){var t,n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="recordhash"!==Ka?"eth:".concat(ai||F.DR):xe,e.next=3,(0,$.rL)(t,ci,Ms,os.modalData);case 3:n=e.sent,Hn(n),ka(["Encryption Keypair Generated",""]);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[Ms,Zn,U,os]),v.useEffect((function(){if(Zn&&void 0!==Kn&&Me){ka(["Decrypting Invoice",""]);try{var e=ae.decrypt(Me,Kn[0]),t=JSON.parse(e.plaintext).payee,n=JSON.parse(e.plaintext).amount,a=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.endsWith(".eth")){e.next=5;break}return e.next=3,yi.resolveName(t).then((function(e){e&&Ee(e)})).catch((function(){w(!1),ka(["Bad Payee",""]),$i(),Ta("orangered"),Fs(0),Gs(0)}));case 3:e.next=6;break;case 5:Ee(t);case 6:Ie(n),w(!1);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();a()}catch(s){w(!1),ka(["Bad Invoice",""]),$i(),Ta("orangered"),Fs(0),Gs(0)}}}),[Kn,Zn,Me]),v.useEffect((function(){if(!Ss||Bn||jn||Zn){if(Ms&&!Kn&&jn){w(!0),ka(["Generating Encryption Key",""]);var e=function(){var e=(0,f.Z)(x().mark((function e(){var t,n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="recordhash"!==Ka?"eth:".concat(ai||F.DR):xe,e.next=3,(0,$.rL)(t,ci,Ms,os.modalData);case 3:n=e.sent,Hn(n),ka(["Encryption Keypair Generated",""]);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}else if("0"!==Ss){w(!0),ka(["Generating IPNS Key",""]);var t=function(){var e=(0,f.Z)(x().mark((function e(){var t,n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="ownerhash"===Ka?"eth:".concat(ai||F.DR):xe,e.next=3,(0,$.x_)(t,ci,Ss,os.modalData);case 3:n=e.sent,Un(n[0]),ka(["IPNS Keypair Generated",""]);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();t()}else Un(["0x","0x"]),ss(!0)}),[U,Bn,as,sa,Ss,jn,Ms,Kn,Zn]),v.useEffect((function(){if(sa&&os.trigger&&as&&(Ea||"rsa"===dn)){ka(["Waiting For Signature","2"]);var e=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:void 0!==os.modalData&&(Fs(2),Gs("rsa"===dn?4:3),nr(os.modalData));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[os,as,sa,Ea,dn]),v.useEffect((function(){if(sa&&as&&Ps&&!jn){Fa([Yi(),k.VM(xe),Yn?N.computeAddress("0x".concat(Yn[0])):F.DR]),w(!0),ka(["Generating Signer Key",""]);var e=function(){var e=(0,f.Z)(x().mark((function e(){var t,n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="recordhash"!==Ka?"eth:".concat(ai||F.DR):xe,e.next=3,(0,$.x_)(t,ci,Ps,os.modalData);case 3:n=e.sent,$n(n[1]),kn(!0),ka(["Signer Keypair Generated",""]);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[Ps,as,sa,jn]),v.useEffect((function(){var e="";os.trigger&&void 0!==os.modalData&&(e=os.modalData),"rsa"===dn&&bn&&jn&&os.trigger?(Fs(3),ka(["Waiting For Signature","3"]),Ti({message:Hi(C.keccak256(P.pack(["bytes32","address"],[C.keccak256(P.pack(["string"],[e])),ai])))}),G(!0)):"stealth"===dn&&bn&&jn&&os.trigger&&ka(["Waiting For Signature","2"])}),[jn,os,dn]),v.useEffect((function(){"stealth"===dn?Gs(3):"rsa"===dn&&Gs(4)}),[dn]),v.useEffect((function(){if(Bn&&Ss){if("gateway"!==Ka){var e=function(){var e=(0,f.Z)(x().mark((function e(){var t,n,a,s,i;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=F.yt(Bn),e.next=3,Q.Dp(X.UG.hexToBytes(t));case 3:n=e.sent,a=String(n),s=lt?lt.split("ipns://")[1]:"",i=ct?ct.split("ipns://")[1]:"",sa&&(!a||a!==s&&a!==i?a&&a!==s&&a!==i&&(ps({modalData:void 0,trigger:!1}),ka(["Seems Like Bad Password",""]),$i(),Ta("orangered"),Fs(0),Gs(0)):(ss(!0),be(a)));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}else sa&&"gateway"===Ka&&(ss(!0),be("gateway"))}),[Bn,Ss,Ka,lt,ct,sa]),v.useEffect((function(){gi&&1===zs?js(gi):gi&&4===zs?Is(gi):gi&&2===zs?Es(gi):gi&&3===zs&&Zs(gi)}),[gi,zs]),v.useEffect((function(){if(us.trigger&&us.modalData){ka(["Fetching Payer Encryption Key",""]),w(!0);var e=us.modalData.split(":")[0],t=us.modalData.split(":")[1],n=us.modalData.split(":")[2],a=function(){var a=(0,f.Z)(x().mark((function a(){var s,i;return x().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,yi.getResolver(e);case 2:if(null===(s=a.sent)||void 0===s||!s.address){a.next=9;break}return i="",a.next=7,s.getText("rsa").then((function(a){if(a){ka(["Waiting For Signature","2"]),i=a;var s={};s=Kn?ae.encrypt('{"payer":"'.concat(e,'","payee":"').concat(t,'","amount":"').concat(n,'"}'),i,Kn[0]):ae.encrypt('{"payer":"'.concat(e,'","payee":"').concat(t,'","amount":"').concat(n,'"}'),i);var r=da;r.stealth=s.cipher,ca(r),Da(!0);var o=pa;!o.includes("stealth")&&da.stealth?la((function(e){return[].concat((0,m.Z)(e),["stealth"])})):o.includes("stealth")&&!da.stealth&&la((function(e){return e.filter((function(e){return"stealth"!==e}))}))}else i="",w(!1),ka(["Payer Has No Encryption Record",""]),$i(),Ta("orangered"),Fs(0),Gs(0)})).catch((function(){i="",w(!1),ka(["Failed To Fetch Encryption Record",""]),$i(),Ta("orangered"),Fs(0),Gs(0)}));case 7:a.next=15;break;case 9:ka(["Payer Has No Resolver",""]),w(!1),$i(),Ta("orangered"),Fs(0),Gs(0);case 15:case"end":return a.stop()}}),a)})));return function(){return a.apply(this,arguments)}}();a()}else if(Kn&&!us.trigger){var s=da;s.rsa=Kn[1],ca(s);var i=pa;!i.includes("rsa")&&da.rsa?la((function(e){return[].concat((0,m.Z)(e),["rsa"])})):i.includes("rsa")&&!da.rsa&&la((function(e){return e.filter((function(e){return"rsa"!==e}))}))}}),[fe,Kn,sa,us]),v.useEffect((function(){it&&(Bi(Dt,At),w(!1))}),[it,lt,ct,$e,Ka,Dt,At]),v.useEffect((function(){He&&function(e,t,n){fr.apply(this,arguments)}(lt||ct,lt&<.startsWith("ipns://")?"recordhash":ct&&ct.startsWith("ipns://")?"ownerhash":"gateway",lt&<.startsWith("ipns://")?"recordhash":ct&&ct.startsWith("ipns://")?"ownerhash":"gateway")}),[He,ct,lt]),v.useEffect((function(){Hs&&xe&&!it&&function(e,t){yr.apply(this,arguments)}(xs,xe)}),[xs,Hs,xe,it]),v.useEffect((function(){xs&&Hs&&!it&&(lt?lt.startsWith("https://")?Ha("gateway"):Ha("recordhash"):ct?ct.startsWith("https://")?Ha("gateway"):Ha("ownerhash"):Ha("storage"))}),[xs,Hs,$e,lt,ct,it]),v.useEffect((function(){if(dn&&pa.length>0){var e=an.map((function(e){return pa.includes(e.type)&&!F.ID.includes(e.type)?re(re({},e),{},{editable:Hs>0,active:Hs>0}):e}));ln(e)}}),[dn,$e,pa]),v.useEffect((function(){ea&&sa&&Bn&&Yn&&Yn[0]&&fe&&pa.length>0&&(w(!0),ka(["Setting Records",String(pa.length)]))}),[ea,Yn,fe,sa,Ka]),v.useEffect((function(){if(qt&&["0","1"].includes(qt)){if("1"===qt){var e=an.map((function(e){return e.type===Vt?re(re({},e),{},{value:Xt}):re({},e)}));ln(e)}setTimeout((function(){Kt(".")}),1e4),setTimeout((function(){Kt("")}),3e4)}}),[qt,Xt,Vt]),v.useEffect((function(){if(sa&&Yn&&Yn[0]&&da&&!F.xb(da)&&pa.length>0){var e=F.RY();pa.forEach(function(){var t=(0,f.Z)(x().mark((function t(n){var a;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!da[n]){t.next=4;break}return t.next=3,Xi({message:Gi(F.yc[F.IX.indexOf(n)],Vi(n,da[n]),Yn[0])});case 3:a=t.sent;case 4:a&&(e[n]=a);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),Aa(e)}}),[sa,Yn,da,pa]),v.useEffect((function(){!sa||ti||Os||F.xb(Ia)?sa&&ti&&!F.xb(Ia)&&Is("0x"):(Gs("rsa"===dn?4:3),function(){tr.apply(this,arguments)}())}),[ti,Ia,Ka]),v.useEffect((function(){var e=0;for(var t in Ia)Ia.hasOwnProperty(t)&&""!==Ia[t]&&e++;if(sa&&fe&&e===pa.length&&e>0&&Os){var n=F.RY();for(var a in da)da.hasOwnProperty(a)&&""!==da[a]&&(n[a]=Ji(a,da[a]));var i={signatures:Ia,manager:Yn?N.computeAddress("0x".concat(Yn[0])):F.DR,managerSignature:Os,ens:xe,controller:ai||F.DR,ipns:fe,recordsTypes:pa,recordsValues:n,recordsRaw:da,revision:xs.revision,chain:s,hashType:Ka},r=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ka(["Writing Records",""]),e.prev=1,e.next=4,fetch("".concat(bi,":").concat(fi,"/write"),{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}).then((function(e){return e.json()})).then(function(){var e=(0,f.Z)(x().mark((function e(t){var n,a,s,i,r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ka(["gateway"!==Ka?"Publishing to IPNS":"Publishing to Gateway",""]),!Yn||!t.response){e.next=7;break}return n={},an.map(function(){var e=(0,f.Z)(x().mark((function e(a){var s,i;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!["stealth","rsa"].includes(a.type)||!t.response.meta[a.type]){e.next=7;break}return s=sr(a.type,t.response[a.type]),i=function(){var e=(0,f.Z)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([s]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=5,i();case 5:s.then((function(e){var t=d&&d.formatted&&d.formatted.gasPrice?Number(d.formatted.gasPrice):0;n[a.type]=e*t*1e-9})),"stealth"===a.type?_t(t.response.stealth):"rsa"===a.type&&Wt(t.response.rsa);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=6,new Promise((function(e){!function t(){Object.keys(n).length>0?e():setTimeout(t,100)}()}));case 6:"gateway"!==Ka&&Bn?(a=F.yt(Bn),i=function(){var e=(0,f.Z)(x().mark((function e(){var i;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Q.Dp(X.UG.hexToBytes(a));case 2:s=e.sent,i=function(){var e=(0,f.Z)(x().mark((function e(){var a,i,r,o;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.response.ipfs&&s&&n)){e.next=31;break}if(Ya(t.response.ipfs.split("ipfs://")[1]),a="/ipfs/"+t.response.ipfs.split("ipfs://")[1],xs.revision){e.next=9;break}return e.next=6,Q.v0(s,a);case 6:i=e.sent,e.next=13;break;case 9:return r=si.decode(new Uint8Array(Object.values(JSON.parse(JSON.stringify(xs.revision))))),e.next=12,Q.nP(r,a);case 12:i=e.sent;case 13:return Ua(t.response.timestamp),e.next=16,cr(i,n,t.response.timestamp,t.response.ipfs.split("ipfs://")[1]);case 16:return e.next=18,Q.nY(i,s.key);case 18:In(n),la([]),o=an.map((function(e){if(["stealth","rsa"].includes(e.type)){var n=Math.round(Date.now()/1e3)-F.UW(t.response.timestamp)-F.A7;return Js(n),t.response.meta[e.type]?re(re({},e),{},{value:t.response[e.type],state:!0,active:n>0}):re(re({},e),{},{active:n>0})}return e})),ln(o),ca(F.RY()),Aa(F.RY()),ta(!1),Fs(0),ps({modalData:void 0,trigger:!1}),Dn("stealth"===dn?'Stealth Record Set! You may now Receive Private Payments':'Encryption Key Set! You may now Send Private Payments'),Ge(!0),Ee(""),Qi();case 31:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Object.keys(n).length>0&&i();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i()):(r=function(){var e=(0,f.Z)(x().mark((function e(){var a;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=18;break}return Ua(t.response.timestamp),e.next=4,cr(void 0,n,t.response.timestamp,"");case 4:In(n),la([]),w(!1),a=an.map((function(e){if(["resolver","storage"].includes(e.type))return e;return Js(1),t.response.meta[e.type]?re(re({},e),{},{value:t.response[e.type],state:!0,active:!0}):re(re({},e),{},{active:!0})})),ln(a),ca(F.K5()),Aa(F.K5()),ta(!1),Fs(0),ps({modalData:void 0,trigger:!1}),Dn("stealth"===dn?'Stealth Record Set! You may now Receive Private Payments':'Encryption Key Set! You may now Send Private Payments'),Ge(!0),Ee(""),Qi();case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r());case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 4:e.next=14;break;case 6:e.prev=6,e.t0=e.catch(1),console.error("ERROR:","Failed to write to CCIP2 backend"),ka(["Record Update Failed",""]),de(!0),w(!1),Qs(!0),Ta("orangered");case 14:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(){return e.apply(this,arguments)}}();r()}sa||ta(!1)}),[Os]),v.useEffect((function(){if(vi&&!xi&&dn)w(!0),Xa&&es(!1);else if(xi&&!vi&&dn){if(Xa)Xa&&es(!1);else{ka(["Signature Failed",String(zs)]),$i(),ia(!1),ta(!1),ca(F.RY());var e=an.map((function(e){return"storage"!==e.type?e:re(re({},e),{},{state:!1})}));ln(e),hn("0")}ps({modalData:void 0,trigger:!1})}}),[vi,xi,dn,zs,pa]);var br=t?(0,L.jsx)(ue,{style:{backgroundColor:g?"black":"rgba(0, 0, 0, 1)"},children:(0,L.jsxs)(ye,{style:{background:g?"none":"#121212"},children:[(0,L.jsx)(le,{children:(0,L.jsx)("a",{href:"#",onClick:function(e){Is(""),Aa(F.RY()),$n(void 0),Un(void 0),Hn(void 0),Es(""),js(""),Zs(""),Ze(""),i("".concat(xe)),r(!0),e.preventDefault(),n()},children:(0,L.jsx)("span",{className:"material-icons-round",style:{marginTop:g?"120px":"7px"},children:"close"})})}),xe&&g&&(0,L.jsx)(oe,{children:(0,L.jsxs)("div",{className:"flex-column",style:{marginTop:"-10px",marginBottom:"80px"},children:[(0,L.jsx)("div",{style:{marginTop:"20px"},children:(0,L.jsx)(V.Z,{height:50,width:50})}),(0,L.jsx)("div",{style:{marginTop:"20px"},children:(0,L.jsx)("span",{style:{color:"#fc6603",fontSize:"20px",fontWeight:"700"},children:ja[0]})}),ja[1]&&"-"!==ja[1]&&(0,L.jsx)("div",{style:{marginTop:"10px"},children:(0,L.jsxs)("span",{style:{color:"white",fontSize:"18px",fontWeight:"700"},children:[(0,L.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"22px"},children:"gateway"!==Ka?ja[1]:sa?String(Number(ja[1])-1):ja[1]}),(0,L.jsx)("span",{children:" Of "}),(0,L.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"22px"},children:"gateway"!==Ka||!sa&&Zn?Us:Us-1})]})}),ja[1]&&"-"===ja[1]&&(0,L.jsx)("div",{style:{marginTop:"10px"},children:(0,L.jsx)("span",{style:{color:"white",fontSize:"18px",fontWeight:"700"},children:(0,L.jsx)("span",{children:(ja[0].includes("Refresh"),"Please Be Patient")})})})]})}),xe&&!g&&(0,L.jsx)(pe,{children:(0,L.jsx)("span",{className:"material-icons miui",style:{marginTop:"-15px",color:At?"lightgreen":"orange",fontSize:"86px",marginLeft:"3%"},children:"account_balance"})}),xe&&an.length>0&&!g&&(0,L.jsx)(oe,{children:(0,L.jsxs)("div",{className:"flex-column",children:[(0,L.jsx)("div",{style:{marginTop:"-25px",marginLeft:"2%"},children:(0,L.jsx)("span",{style:{color:"cyan",fontSize:"13px",fontWeight:"700"},children:"Receive Stealth Payment To"})}),(0,L.jsxs)("div",{style:{marginBottom:"15px",marginTop:"5px",marginLeft:"2%"},children:[(0,L.jsx)("span",{style:{color:"white",fontSize:"20px",fontWeight:"700",fontFamily:"SF Mono"},children:xe.split(".eth")[0]}),(0,L.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"15px",color:"cyan"},children:"."}),(0,L.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:"11px",color:"cyan",fontWeight:"700",letterSpacing:"0px",marginTop:"13px"},children:"ETH"})]}),(0,L.jsx)("ul",{style:{listStyle:"none",color:"white",marginLeft:z.tq?"0":"-5%",marginTop:"20px"},children:(0,L.jsxs)("div",{className:"flex-column",style:{paddingBottom:z.tq?"5px":"15px"},children:[an.map((function(e){return(0,L.jsxs)("li",{style:{display:"flex",flexDirection:"column",width:z.tq?"480px":"500px",maxWidth:z.tq?"85%":"95%",paddingLeft:"5px",paddingRight:"5px"},children:[(0,L.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",flexDirection:"column"},children:[(0,L.jsxs)("div",{style:{marginBottom:"10px",display:"flex",justifyContent:"space-between",width:z.tq?"90%":"100%"},children:[(0,L.jsxs)("span",{style:{fontFamily:"Spotnik",fontWeight:"700",fontSize:"15px",color:F.IN.includes(e.type)?"orange":"cyan",marginRight:"15px"},children:[["stealth","rsa"].includes(e.type)&&(0,L.jsxs)("span",{children:[(0,L.jsx)("span",{className:"material-icons-round smol",style:{fontSize:"20px",display:"inline-block",color:"white"},children:"stealth"===e.type?"lock":"vpn_key"}),"\xa0",(0,L.jsx)("span",{style:{position:"relative",top:"-2px",left:"1px"},children:e.type})]}),["stealth","rsa"].includes(e.type)&&(0,L.jsx)("button",{className:"button-tiny",onClick:function(){Fe(!0),ha("info"),Ta(F.IN.includes(e.type)?"orange":"cyan"),Tn(F.IN.includes(e.type)?'In Process of Bug Fixing':"".concat(e.help,""))},"data-tooltip":F.IN.includes(e.type)?"Temporarily Unavailable":"Enlighten Me",children:(0,L.jsx)("div",{className:"material-icons-round smol",style:{color:F.IN.includes(e.type)?"orange":"cyan",marginLeft:"storage"===e.type?"-5px":"5px"},children:"info_outline"})}),["stealth","rsa"].includes(e.type)&&(0,L.jsx)("button",{className:"button-tiny",onClick:function(){Fe(!0),ha("stealth"===e.type||At?"gpp_good":"gpp_bad"),Ta("stealth"===e.type||At?"lime":"orangered"),Tn("stealth"===e.type?'Please set the Stealth Invoice to Receive Private Payment':At?'Encryption Key Set':'Please Set Encryption Key To Send Private Payments')},"data-tooltip":"stealth"===e.type?"Set Encrypted Invoice":At?"Encryption Key Set":"Encryption Key Missing",children:(0,L.jsx)("div",{className:"material-icons-round smol",style:{color:"stealth"===e.type||At?"lime":"orangered",marginLeft:"-5px"},children:"stealth"===e.type||At?"gpp_good":"gpp_bad"})}),["stealth","rsa"].includes(e.type)&&!F.IN.includes(e.type)&&$e===ri&&(lt||ct)&&(0,L.jsx)("button",{className:"button-tiny",onClick:function(){Fe(!0),ha("timer"),Ta(Hs<0?"orange":"lime"),Tn(Hs<0?'Too Soon To Update. Please wait at least one hour between updates':'Ready For Next Record Update')},"data-tooltip":Hs<0?"Too Soon To Update":"Ready For Next Update",children:(0,L.jsx)("div",{className:"material-icons-round smol",style:{color:Hs<0?"orange":"lime",marginLeft:"-5px"},children:"timer"})}),["stealth","rsa"].includes(e.type)&&!F.IN.includes(e.type)&&$e===ri&&ai&&(lt||ct)&&xs.ownerstamp.length>0&&(0,L.jsx)("button",{className:!["",".","0","1"].includes(qt)&&[e.type].includes(qt)?"button-tiny blink":"button-tiny",onClick:function(){""===qt&&ur(["text",e.type],tt,xe,!0),Yt(e.type)},"data-tooltip":[e.type,".","0","1"].includes(qt)?[".","","0","1"].includes(qt)?"1"===qt?"Record Updated":"0"===qt?"No New Update":"."===qt?"Please Wait to Refresh again":"-"===qt?"No New Update":"Click to Refresh":"Refresh in Progress":e.value.toLowerCase()===xs[e.type].toLowerCase()?"Record in Sync with ".concat("gateway"===Ka?"Gateway":"IPNS"):"Record not in Sync. Click to refresh",children:(0,L.jsx)("div",{className:"material-icons-round smol",style:{color:[e.type,".","0","1"].includes(qt)?[".","","0","1"].includes(qt)?"1"===qt?"lime":"0"===qt?"yellow":"."===qt?"white":"-"===qt?"yellow":"cyan":"white":e.value.toLowerCase()===xs[e.type].toLowerCase()?"lightgreen":"orange",marginLeft:"-5px"},children:"sync"})}),e.state&&(0,L.jsx)("div",{className:"material-icons-round smol emphasis",style:{color:ie&&$s?"orangered":"lime",marginLeft:"-5px"},children:ie&&$s?"cancel":"task_alt"})]}),(0,L.jsx)("button",{className:"button",disabled:F.IN.includes(e.type)||!an[e.key].active||e.state||!ai||!Rt.includes(String(ai)),style:{alignSelf:"flex-end",height:"25px",width:"auto",marginBottom:"6px"},onClick:function(){Bt(!0),"stealth"===e.type&&ds({modalData:void 0,trigger:!1}),cn(e.type),hn("1"),ia(!0)},"data-tooltip":e.tooltip,children:(0,L.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"13px"},children:[e.label,"\xa0",(0,L.jsx)("span",{className:"material-icons-round smoller",children:"manage_history"})]})})]}),(0,L.jsx)("input",{className:"inputextra",id:e.key,placeholder:F.IN.includes(e.type)?"Temporarily Unavailable":e.value,type:"text",disabled:!e.editable||F.IN.includes(e.type)||!Rt.includes(String(ai)),style:{background:At&&!F.IN.includes(e.type)&&Rt.includes(String(ai))?"linear-gradient(90deg, rgba(0,50,0,0.5) 0%, rgba(25,50,25,0.5) 50%, rgba(0,50,0,0.5) 100%)":"linear-gradient(90deg, rgba(100,0,0,0.5) 0%, rgba(100,25,25,0.5) 50%, rgba(100,0,0,0.5) 100%)",fontFamily:"SF Mono",fontWeight:"400",fontSize:"14px",width:"100%",wordWrap:"break-word",textAlign:"left",marginTop:"-10px",marginBottom:"-5px",color:"lightgreen",cursor:"copy"}},e.key)]}),(0,L.jsx)("hr",{style:{marginTop:"5px"}})]},e.key)})),(0,L.jsx)("hr",{style:{marginTop:"5px"}}),(0,L.jsxs)("div",{className:"flex-column",style:{marginBottom:"15px",marginTop:"-15px"},children:[(0,L.jsx)(pe,{children:(0,L.jsx)("span",{className:"material-icons-round miui",style:{color:At?"lightgreen":"orange",fontSize:"76px"},children:"security"})}),(0,L.jsx)("span",{style:{color:"cyan",fontSize:"13px",fontWeight:"700",marginTop:"5px"},children:"Send Stealth Payment From"}),(0,L.jsxs)("div",{style:{marginBottom:"15px",marginTop:"5px"},children:[(0,L.jsx)("span",{style:{color:"white",fontSize:"20px",fontWeight:"700",fontFamily:"SF Mono"},children:xe.split(".eth")[0]}),(0,L.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"15px",color:"cyan"},children:"."}),(0,L.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:"11px",color:"cyan",fontWeight:"700",letterSpacing:"0px",marginTop:"13px"},children:"ETH"})]}),!Pe&&(0,L.jsxs)("div",{className:"flex-column",style:{width:"100%",marginLeft:"32px"},children:[(0,L.jsx)("input",{id:"decrypt",placeholder:"enter payee .eth",type:"text",disabled:!At,style:{background:At?"linear-gradient(90deg, rgba(0,50,0,0.5) 0%, rgba(25,50,25,0.5) 50%, rgba(0,50,0,0.5) 100%)":"linear-gradient(90deg, rgba(100,0,0,0.5) 0%, rgba(100,25,25,0.5) 50%, rgba(100,0,0,0.5) 100%)",outline:"none",border:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"130%",wordWrap:"break-word",textAlign:"center",color:Se?"lime":"white",cursor:"copy",marginLeft:"-15%",marginTop:"15px"},onChange:function(e){var t;(t=e.target.value).endsWith(".eth")?je(t):je("")}},"decrypt"),(0,L.jsx)("hr",{style:{marginTop:"0",marginLeft:"-15%",width:"130%"}})]}),Pe&&(0,L.jsxs)("div",{className:"flex-column",children:[(0,L.jsxs)("div",{className:"flex-column",style:{width:"450px",marginLeft:"3px"},children:[(0,L.jsx)("input",{id:"amount",type:"text",value:Oe,style:{background:"0.0"===Oe?"linear-gradient(90deg, rgba(100,0,0,0.5) 0%, rgba(100,25,25,0.5) 50%, rgba(100,0,0,0.5) 100%)":"linear-gradient(90deg, rgba(0,50,0,0.5) 0%, rgba(25,50,25,0.5) 50%, rgba(0,50,0,0.5) 100%)",marginBottom:"10px",outline:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"90%",paddingRight:"32px",wordWrap:"break-word",textAlign:"left",color:"0.0"===Oe?"grey":"lime",cursor:"copy"}},"amount"),(0,L.jsx)("hr",{style:{marginTop:"-5px",marginLeft:"0",width:"90%"}})]}),(0,L.jsx)("div",{className:"flex-row",style:{width:"200%"},children:(0,L.jsxs)("div",{className:"flex-column",children:[(0,L.jsxs)("div",{className:"flex-row",style:{width:"450px",marginLeft:"3px"},children:[(0,L.jsx)("input",{id:"pay",type:"text",value:Pe,style:{background:Pe===F.DR?"linear-gradient(90deg, rgba(100,0,0,0.5) 0%, rgba(100,25,25,0.5) 50%, rgba(100,0,0,0.5) 100%)":"linear-gradient(90deg, rgba(0,50,0,0.5) 0%, rgba(25,50,25,0.5) 50%, rgba(0,50,0,0.5) 100%)",outline:"none",padding:"7px",borderRadius:"3px",fontFamily:"SF Mono",letterSpacing:"-0.5px",fontWeight:"400",fontSize:"15px",width:"90%",paddingRight:"32px",wordWrap:"break-word",textAlign:"left",color:Pe===F.DR?"grey":"lime",cursor:"copy"}},"pay"),(0,L.jsx)("button",{className:"button-empty",onClick:function(){F.vQ("pay")},hidden:Pe===F.DR,"data-tooltip":"Copy Address",style:{marginLeft:"-25px",color:"lime"},children:(0,L.jsx)("span",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700"},children:"content_copy"})})]}),(0,L.jsx)("hr",{style:{marginTop:"5px",marginLeft:"0",width:"90%"}})]})})]}),(0,L.jsxs)("div",{children:[(0,L.jsx)("button",{className:"button",style:{height:"33px",width:Pe?"80px":"120px",padding:"5px",marginTop:"10px",fontSize:"16px",fontWeight:"700",backgroundImage:Pe&&Pe!==F.DR?"linear-gradient(81deg, rgba(0,154,0,1) 0%, rgba(0,182,24,1) 52%, rgba(0,154,0,1) 100%)":"linear-gradient(112deg, rgba(190,95,65,1) 0%, rgba(191,41,36,1) 48%, rgba(203,111,0,1) 100%)"},onClick:function(){return Pe&&Pe!==F.DR?null===ki||void 0===ki?void 0:ki():function(){ka(["Searching For Payment",""]),w(!0);var e=function(){var e=(0,f.Z)(x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yi.getResolver(Se);case 2:if(null===(t=e.sent)||void 0===t||!t.address){e.next=8;break}return e.next=6,t.getText("stealth").then((function(e){e?(ka(["Decrypting Payment Data",""]),Bt(!0),Rn(!0),Ze(e)):(w(!1),Ee(F.DR),Ie("0.0"),ka(["Payer Has No Payment For You",""]),$i(),Ta("orangered"))})).catch((function(){w(!1),Ee(F.DR),Ie("0.0"),ka(["Error Fetching Payment Data",""]),$i(),Ta("orangered")}));case 6:e.next=14;break;case 8:w(!1),Ee(F.DR),Ie("0.0"),ka(["Payer Has No Resolver",""]),$i(),Ta("orangered");case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}()},disabled:!Se||Pe===F.DR,hidden:!At,"data-tooltip":Pe&&Pe!==F.DR?"Send Transaction":"Fetch and Decrypt",children:(0,L.jsxs)("div",{className:"flex-row",style:{fontSize:"14px"},children:[Pe?"Pay":"Decrypt","\xa0",(0,L.jsx)("span",{className:"material-icons-round smoller",children:"lock_open"})]})}),(0,L.jsx)("button",{className:"button",style:{height:"33px",width:"110px",padding:"5px",marginTop:"20px",fontSize:"16px",fontWeight:"700",marginLeft:"20px",background:"red"},onClick:function(){return Ee("")},disabled:!Se,hidden:!Pe,"data-tooltip":"Cancel Transaction",children:(0,L.jsxs)("div",{className:"flex-row",style:{fontSize:"14px"},children:["Cancel","\xa0",(0,L.jsx)("span",{className:"material-icons-round smoller",children:"cancel"})]})})]})]})]})}),pa.length>1&&(0,L.jsx)("div",{style:{marginTop:"-10px",marginBottom:"40px"},children:(0,L.jsx)("button",{className:"button flex-column",hidden:pa.length<2,disabled:!ai||!Rt.includes(String(ai))||da===F.RY(),style:{alignSelf:"flex-end",height:"25px",width:"auto",marginTop:"-3px"},onClick:function(){Bt(!0),ia(!0),cn("records"),hn("1"),ia(!0)},"data-tooltip":"Set Multiple Records in One Click",children:(0,L.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"15px"},children:["Edit All","\xa0",(0,L.jsx)("span",{className:"material-icons-round smoller",children:"manage_history"})]})})})]})}),(0,L.jsxs)("div",{id:"modal-inner",children:[(0,L.jsx)(A.Z,{color:va,icon:ba,onClose:function(){return Fe(!1)},show:ze,position:"",children:vn}),(0,L.jsx)(Y.Z,{color:va,icon:ba,onClose:function(){return Ge(!1)},show:Ue,handleTrigger:function(e){bs((function(t){return re(re({},t),{},{trigger:e})}))},handleModalData:function(e){bs((function(t){return re(re({},t),{},{modalData:e})}))},children:En}),(0,L.jsx)(H,{handleTrigger:function(e){ds((function(t){return re(re({},t),{},{trigger:e})})),e?hn("1"):(hn("0"),cn("")),Ra(!1)},handleModalData:function(e){ds((function(t){return re(re({},t),{},{modalData:e})}))},onClose:function(){Ra(!1)},show:Za,children:""}),(0,L.jsx)(W.Z,{handleTrigger:function(e){ps((function(t){return re(re({},t),{},{trigger:e})})),e?hn("1"):(hn("0"),cn("")),Bt(!1)},handleModalData:function(e){ps((function(t){return re(re({},t),{},{modalData:e})}))},onClose:function(){Bt(!1)},show:Lt,children:[xe,Ka]}),(0,L.jsx)(J.Z,{onClose:function(){de(!1),es(!0)},color:va,show:ie&&!g,title:"cancel",children:ja[0]})]})]})}):null;return l?T.createPortal(br,document.getElementById("modal")):null}},59595:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(73935),d=n(14141),c=n(85518),m=n(85893),f=d.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 0px;\n padding-left: ",";\n padding-right: ",";\n padding-bottom: 5px;\n margin-top: 0px;\n margin-left: ",";\n margin-right: ",";\n margin-bottom: ",";\n display: flex;\n justify-content: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 18px;\n font-weight: 700;\n line-height: 22px;\n max-width: ",";\n"])),c.tq?"10px":"20px",c.tq?"10px":"20px",c.tq?"10px":"20px",c.tq?"10px":"20px",c.tq?"15px":"20px",(c.tq,"400px")),b=d.ZP.div(s||(s=(0,p.Z)(["\n margin-top: -15px;\n font-size: 20px;\n display: flex;\n justify-content: center;\n font-weight: 700;\n margin-bottom: 15px;\n color: white;\n"]))),h=d.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),g=d.ZP.div(r||(r=(0,p.Z)(["\n position: fixed;\n top: 250px; \n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: auto;\n max-width: ",";\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n"])),c.tq?"90%":"60%"),x=d.ZP.div(o||(o=(0,p.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"])));t.Z=function(e){var t=e.icon,n=e.color,a=e.show,s=e.onClose,i=e.children,r=e.handleModalData,o=e.handleTrigger,p=y.useState(!1),d=(0,l.Z)(p,2),c=d[0],v=d[1];y.useEffect((function(){v(!0)}),[]);var T=function(e){r("0"),o(!0),e.preventDefault(),s()},w=a?(0,m.jsx)(x,{children:(0,m.jsxs)(g,{children:[(0,m.jsx)(h,{children:(0,m.jsx)("a",{href:"#",onClick:T,children:(0,m.jsx)("span",{className:"material-icons",style:{margin:"4px"},children:"close"})})}),t&&(0,m.jsx)(b,{children:(0,m.jsx)("span",{className:"material-icons",style:{marginTop:"4px",fontSize:"68px",color:n},children:t})}),(0,m.jsx)(f,{dangerouslySetInnerHTML:{__html:i}}),(0,m.jsx)(f,{children:(0,m.jsx)("div",{className:"flex-row",style:{marginLeft:"0px"},children:(0,m.jsx)("button",{className:"button-option",style:{height:"35px",width:"105px"},onClick:T,"data-tooltip":"Continue",children:(0,m.jsxs)("div",{className:"flex-row",style:{fontSize:"15px",fontWeight:"700"},children:["OK","\xa0",(0,m.jsx)("span",{className:"material-icons chonk",children:"done_all"})]})})})})]})}):null;return c?u.createPortal(w,document.getElementById("modal")):null}},92675:function(e,t,n){"use strict";var a,s,i,r,o,p=n(71383),l=n(16835),y=n(67294),u=n(73935),d=n(14141),c=n(85893),m=d.ZP.div(a||(a=(0,p.Z)(["\n padding-top: 10px;\n padding-left: 20px;\n padding-right: 40px;\n padding-bottom: 20px;\n display: flex;\n justify-content: center;\n height: 500px;\n overflow-y: auto;\n"]))),f=d.ZP.div(s||(s=(0,p.Z)(["\n padding-top: 20px;\n font-size: 22px;\n display: flex;\n justify-content: center;\n font-weight: 800;\n margin-bottom: 20px;\n"]))),b=d.ZP.div(i||(i=(0,p.Z)(["\n display: flex;\n justify-content: flex-end;\n font-size: 20px;\n"]))),h=d.ZP.div(r||(r=(0,p.Z)(["\n background: linear-gradient(112deg, rgba(66,46,40,1) 0%, rgba(0,0,0,1) 48%, rgba(70,63,55,1) 100%);\n background-size: 400% 400%;\n width: 500px;\n height: 600px;\n border-radius: 6px;\n padding: 15px;\n overflow-y: initial !important\n padding-bottom: 20px;\n"]))),g=d.ZP.div(o||(o=(0,p.Z)(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n background-size: contain;\n"])));t.Z=function(e){var t=e.show,n=e.onClose,a=y.useState(!1),s=(0,l.Z)(a,2),i=s[0],r=s[1];y.useEffect((function(){r(!0)}),[]);var o=t?(0,c.jsx)(g,{children:(0,c.jsxs)(h,{children:[(0,c.jsx)(b,{children:(0,c.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),n()},children:(0,c.jsx)("span",{className:"material-icons",style:{marginTop:"4px"},children:"close"})})}),(0,c.jsx)(f,{children:(0,c.jsx)("span",{className:"material-icons miui-small",style:{marginTop:"4px",color:"white"},children:"gavel"})}),(0,c.jsx)(m,{})]})}):null;return i?u.createPortal(o,document.getElementById("modal")):null}},40342:function(e,t,n){"use strict";n(67294);var a=n(85893);t.Z=function(e){var t=e.variable;return(0,a.jsxs)("button",{className:"button-tiny",style:{color:"lightgreen",marginRight:"15px",fontSize:"16px",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},"data-tooltip":"Total Gas Saved by Off-chain Records",children:[(0,a.jsx)("div",{className:"material-icons smol",style:{color:"lightgreen",fontSize:"22px",marginRight:"5px"},children:"local_gas_station"}),(0,a.jsx)("div",{children:(0,a.jsxs)("span",{style:{fontFamily:"SF Mono",color:"white",fontSize:"16px",fontWeight:"700"},children:[t||"0.00","\xa0",(0,a.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:"15px",fontWeight:"700"},children:"ETH"})]})})]})}},62012:function(e,t,n){"use strict";n.d(t,{gk:function(){return ze},Bf:function(){return Fe},qB:function(){return Le},K5:function(){return Ae},RY:function(){return We},iJ:function(){return te},wU:function(){return ee},IN:function(){return N},hh:function(){return pe},bt:function(){return ae},K0:function(){return ue},Hc:function(){return be},vc:function(){return j},vQ:function(){return fe},U8:function(){return se},vb:function(){return me},qP:function(){return ye},O:function(){return re},Th:function(){return R},yc:function(){return C},ID:function(){return k},yt:function(){return ce},TN:function(){return Be},Wp:function(){return O},Kv:function(){return _},s8:function(){return De},Q1:function(){return xe},tr:function(){return ve},MP:function(){return Re},rv:function(){return Oe},fp:function(){return Pe},Iu:function(){return Ne},Jh:function(){return we},xb:function(){return he},Io:function(){return Me},wE:function(){return Se},Yo:function(){return Ce},K9:function(){return ge},$o:function(){return Ze},V4:function(){return Te},A2:function(){return Ee},L3:function(){return ke},CB:function(){return je},MS:function(){return _e},UW:function(){return Ie},Ap:function(){return ne},O1:function(){return Ge},hc:function(){return de},z7:function(){return P},t8:function(){return M},IX:function(){return Z},A7:function(){return ie},DR:function(){return E},dR:function(){return D}});var a=n(50029),s=n(59499),i=n(87794),r=n.n(i),o=n(59205),p=n(57734),l=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_old","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"label","type":"bytes32"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"NewOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"resolver","type":"address"}],"name":"NewResolver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"NewTTL","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"old","outputs":[{"internalType":"contract ENS","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"recordExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"resolver","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setRecord","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"label","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"}],"name":"setSubnodeOwner","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"label","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setSubnodeRecord","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setTTL","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"ttl","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"}]'),y=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"},{"internalType":"bytes32","name":"_baseNode","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"controller","type":"address"}],"name":"ControllerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"controller","type":"address"}],"name":"ControllerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"expires","type":"uint256"}],"name":"NameMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"expires","type":"uint256"}],"name":"NameRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expires","type":"uint256"}],"name":"NameRenewed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"GRACE_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"addController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"available","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"baseNode","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"controllers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ens","outputs":[{"internalType":"contract ENS","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"nameExpires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"reclaim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"register","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"registerOnly","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"removeController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"renew","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]'),u=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"},{"internalType":"contract INameWrapper","name":"wrapperAddress","type":"address"},{"internalType":"address","name":"_trustedETHController","type":"address"},{"internalType":"address","name":"_trustedReverseRegistrar","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"coinType","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"newAddress","type":"bytes"}],"name":"AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"bool","name":"approved","type":"bool"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"hash","type":"bytes"}],"name":"ContenthashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"record","type":"bytes"}],"name":"DNSRecordChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"}],"name":"DNSRecordDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"lastzonehash","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"zonehash","type":"bytes"}],"name":"DNSZonehashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"indexed":false,"internalType":"address","name":"implementer","type":"address"}],"name":"InterfaceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"x","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"PubkeyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"string","name":"indexedKey","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"TextChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"newVersion","type":"uint64"}],"name":"VersionChanged","type":"event"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentTypes","type":"uint256"}],"name":"ABI","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"clearRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"uint16","name":"resource","type":"uint16"}],"name":"dnsRecord","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"}],"name":"hasDNSRecords","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"interfaceImplementer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"}],"name":"isApprovedFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"nodehash","type":"bytes32"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicallWithNodeCheck","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"recordVersions","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentType","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setABI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setDNSRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"internalType":"address","name":"implementer","type":"address"}],"name":"setInterface","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"newName","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setZonehash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"zonehash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"}]'),d=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"},{"internalType":"contract INameWrapper","name":"wrapperAddress","type":"address"},{"internalType":"address","name":"_trustedETHController","type":"address"},{"internalType":"address","name":"_trustedReverseRegistrar","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"coinType","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"newAddress","type":"bytes"}],"name":"AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"bool","name":"approved","type":"bool"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"hash","type":"bytes"}],"name":"ContenthashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"record","type":"bytes"}],"name":"DNSRecordChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"}],"name":"DNSRecordDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"lastzonehash","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"zonehash","type":"bytes"}],"name":"DNSZonehashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"indexed":false,"internalType":"address","name":"implementer","type":"address"}],"name":"InterfaceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"x","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"PubkeyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"string","name":"indexedKey","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"TextChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"newVersion","type":"uint64"}],"name":"VersionChanged","type":"event"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentTypes","type":"uint256"}],"name":"ABI","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"clearRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"uint16","name":"resource","type":"uint16"}],"name":"dnsRecord","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"}],"name":"hasDNSRecords","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"interfaceImplementer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"}],"name":"isApprovedFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"nodehash","type":"bytes32"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicallWithNodeCheck","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"recordVersions","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"resolve","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentType","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setABI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setDNSRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"internalType":"address","name":"implementer","type":"address"}],"name":"setInterface","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"newName","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setZonehash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"zonehash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"}]'),c=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"coinType","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"newAddress","type":"bytes"}],"name":"AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bool","name":"isAuthorised","type":"bool"}],"name":"AuthorisationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"hash","type":"bytes"}],"name":"ContenthashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"record","type":"bytes"}],"name":"DNSRecordChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"}],"name":"DNSRecordDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"DNSZoneCleared","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"indexed":false,"internalType":"address","name":"implementer","type":"address"}],"name":"InterfaceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"x","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"PubkeyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"string","name":"indexedKey","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"}],"name":"TextChanged","type":"event"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentTypes","type":"uint256"}],"name":"ABI","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"authorisations","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"clearDNSZone","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"uint16","name":"resource","type":"uint16"}],"name":"dnsRecord","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"}],"name":"hasDNSRecords","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"interfaceImplementer","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentType","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setABI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"isAuthorised","type":"bool"}],"name":"setAuthorisation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setDNSRecords","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"internalType":"address","name":"implementer","type":"address"}],"name":"setInterface","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"name","type":"string"}],"name":"setName","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"}]'),m=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"},{"internalType":"contract INameWrapper","name":"wrapperAddress","type":"address"},{"internalType":"address","name":"_trustedETHController","type":"address"},{"internalType":"address","name":"_trustedReverseRegistrar","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"coinType","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"newAddress","type":"bytes"}],"name":"AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"bool","name":"approved","type":"bool"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"hash","type":"bytes"}],"name":"ContenthashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"record","type":"bytes"}],"name":"DNSRecordChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"resource","type":"uint16"}],"name":"DNSRecordDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"lastzonehash","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"zonehash","type":"bytes"}],"name":"DNSZonehashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"indexed":false,"internalType":"address","name":"implementer","type":"address"}],"name":"InterfaceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"x","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"PubkeyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"string","name":"indexedKey","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"TextChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"newVersion","type":"uint64"}],"name":"VersionChanged","type":"event"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentTypes","type":"uint256"}],"name":"ABI","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"clearRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"uint16","name":"resource","type":"uint16"}],"name":"dnsRecord","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"}],"name":"hasDNSRecords","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"interfaceImplementer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"}],"name":"isApprovedFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"nodehash","type":"bytes32"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicallWithNodeCheck","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"recordVersions","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentType","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setABI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setDNSRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"internalType":"address","name":"implementer","type":"address"}],"name":"setInterface","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"newName","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setZonehash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"zonehash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"}]'),f=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"},{"internalType":"contract IBaseRegistrar","name":"_registrar","type":"address"},{"internalType":"contract IMetadataService","name":"_metadataService","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CannotUpgrade","type":"error"},{"inputs":[],"name":"IncompatibleParent","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"IncorrectTargetOwner","type":"error"},{"inputs":[],"name":"IncorrectTokenType","type":"error"},{"inputs":[{"internalType":"bytes32","name":"labelHash","type":"bytes32"},{"internalType":"bytes32","name":"expectedLabelhash","type":"bytes32"}],"name":"LabelMismatch","type":"error"},{"inputs":[{"internalType":"string","name":"label","type":"string"}],"name":"LabelTooLong","type":"error"},{"inputs":[],"name":"LabelTooShort","type":"error"},{"inputs":[],"name":"NameIsNotWrapped","type":"error"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"OperationProhibited","type":"error"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"Unauthorised","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"controller","type":"address"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"ControllerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"ExpiryExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"fuses","type":"uint32"}],"name":"FusesSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"NameUnwrapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint32","name":"fuses","type":"uint32"},{"indexed":false,"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"NameWrapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_tokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint32","name":"fuseMask","type":"uint32"}],"name":"allFusesBurned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"canExtendSubnames","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"canModifyName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"controllers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ens","outputs":[{"internalType":"contract ENS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"extendExpiry","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getData","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"}],"name":"isWrapped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"isWrapped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataService","outputs":[{"internalType":"contract IMetadataService","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"names","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"wrappedOwner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint16","name":"ownerControlledFuses","type":"uint16"}],"name":"registerAndWrapETH2LD","outputs":[{"internalType":"uint256","name":"registrarExpiry","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registrar","outputs":[{"internalType":"contract IBaseRegistrar","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"renew","outputs":[{"internalType":"uint256","name":"expires","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"setChildFuses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"},{"internalType":"bool","name":"active","type":"bool"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint16","name":"ownerControlledFuses","type":"uint16"}],"name":"setFuses","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMetadataService","name":"_metadataService","type":"address"}],"name":"setMetadataService","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setRecord","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"setSubnodeOwner","outputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint64","name":"ttl","type":"uint64"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"setSubnodeRecord","outputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setTTL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract INameWrapperUpgrade","name":"_upgradeAddress","type":"address"}],"name":"setUpgradeContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"address","name":"controller","type":"address"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"address","name":"registrant","type":"address"},{"internalType":"address","name":"controller","type":"address"}],"name":"unwrapETH2LD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"name","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upgradeContract","outputs":[{"internalType":"contract INameWrapperUpgrade","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"name","type":"bytes"},{"internalType":"address","name":"wrappedOwner","type":"address"},{"internalType":"address","name":"resolver","type":"address"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"wrappedOwner","type":"address"},{"internalType":"uint16","name":"ownerControlledFuses","type":"uint16"},{"internalType":"address","name":"resolver","type":"address"}],"name":"wrapETH2LD","outputs":[{"internalType":"uint64","name":"expiry","type":"uint64"}],"stateMutability":"nonpayable","type":"function"}]'),b=JSON.parse('[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"},{"internalType":"contract IBaseRegistrar","name":"_registrar","type":"address"},{"internalType":"contract IMetadataService","name":"_metadataService","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CannotUpgrade","type":"error"},{"inputs":[],"name":"IncompatibleParent","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"IncorrectTargetOwner","type":"error"},{"inputs":[],"name":"IncorrectTokenType","type":"error"},{"inputs":[{"internalType":"bytes32","name":"labelHash","type":"bytes32"},{"internalType":"bytes32","name":"expectedLabelhash","type":"bytes32"}],"name":"LabelMismatch","type":"error"},{"inputs":[{"internalType":"string","name":"label","type":"string"}],"name":"LabelTooLong","type":"error"},{"inputs":[],"name":"LabelTooShort","type":"error"},{"inputs":[],"name":"NameIsNotWrapped","type":"error"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"OperationProhibited","type":"error"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"Unauthorised","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"controller","type":"address"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"ControllerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"ExpiryExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"fuses","type":"uint32"}],"name":"FusesSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"NameUnwrapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"name","type":"bytes"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint32","name":"fuses","type":"uint32"},{"indexed":false,"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"NameWrapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_tokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint32","name":"fuseMask","type":"uint32"}],"name":"allFusesBurned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"canExtendSubnames","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"canModifyName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"controllers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ens","outputs":[{"internalType":"contract ENS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"extendExpiry","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getData","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"}],"name":"isWrapped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"isWrapped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataService","outputs":[{"internalType":"contract IMetadataService","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"names","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"wrappedOwner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint16","name":"ownerControlledFuses","type":"uint16"}],"name":"registerAndWrapETH2LD","outputs":[{"internalType":"uint256","name":"registrarExpiry","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registrar","outputs":[{"internalType":"contract IBaseRegistrar","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"renew","outputs":[{"internalType":"uint256","name":"expires","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"setChildFuses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"},{"internalType":"bool","name":"active","type":"bool"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint16","name":"ownerControlledFuses","type":"uint16"}],"name":"setFuses","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMetadataService","name":"_metadataService","type":"address"}],"name":"setMetadataService","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setRecord","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"setSubnodeOwner","outputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"uint64","name":"ttl","type":"uint64"},{"internalType":"uint32","name":"fuses","type":"uint32"},{"internalType":"uint64","name":"expiry","type":"uint64"}],"name":"setSubnodeRecord","outputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint64","name":"ttl","type":"uint64"}],"name":"setTTL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract INameWrapperUpgrade","name":"_upgradeAddress","type":"address"}],"name":"setUpgradeContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"},{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"address","name":"controller","type":"address"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"labelhash","type":"bytes32"},{"internalType":"address","name":"registrant","type":"address"},{"internalType":"address","name":"controller","type":"address"}],"name":"unwrapETH2LD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"name","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upgradeContract","outputs":[{"internalType":"contract INameWrapperUpgrade","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"name","type":"bytes"},{"internalType":"address","name":"wrappedOwner","type":"address"},{"internalType":"address","name":"resolver","type":"address"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"label","type":"string"},{"internalType":"address","name":"wrappedOwner","type":"address"},{"internalType":"uint16","name":"ownerControlledFuses","type":"uint16"},{"internalType":"address","name":"resolver","type":"address"}],"name":"wrapETH2LD","outputs":[{"internalType":"uint64","name":"expiry","type":"uint64"}],"stateMutability":"nonpayable","type":"function"}]'),h=JSON.parse('[{"inputs":[{"internalType":"address","name":"_gateway","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"BadConfig","type":"error"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"InvalidRequest","type":"error"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"NotAuthorised","type":"error"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"string[]","name":"_gateways","type":"string[]"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes4","name":"_callbackFunction","type":"bytes4"},{"internalType":"bytes","name":"_extradata","type":"bytes"}],"name":"OffchainLookup","type":"error"},{"inputs":[],"name":"PlsFundDevs","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovedSigner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddr","type":"address"},{"indexed":true,"internalType":"address","name":"newAddr","type":"address"}],"name":"GatewayUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"InterfaceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"contenthash","type":"bytes"}],"name":"RecordhashUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":true,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ThankYou","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddr","type":"address"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"UpdatedWrapper","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ENS","outputs":[{"internalType":"contract iENS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"response","type":"bytes"},{"internalType":"bytes","name":"extradata","type":"bytes"}],"name":"__callback","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"bool","name":"_approval","type":"bool"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"address","name":"_signer","type":"address"}],"name":"approved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_approvedSigner","type":"address"},{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"string","name":"_domain","type":"string"}],"name":"approvedSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gateway","outputs":[{"internalType":"contract iGatewayManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"}],"name":"getRecordhash","outputs":[{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_message","type":"string"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"getSigner","outputs":[{"internalType":"address","name":"_signer","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWrapper","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_node","type":"bytes32[]"},{"internalType":"address[]","name":"_signer","type":"address[]"},{"internalType":"bool[]","name":"_approval","type":"bool[]"}],"name":"multiApprove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerhashFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"recordhash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_encoded","type":"bytes"},{"internalType":"bytes","name":"_requested","type":"bytes"}],"name":"redirectService","outputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"},{"internalType":"bytes32","name":"_namehash","type":"bytes32"},{"internalType":"bytes","name":"_redirectRequest","type":"bytes"},{"internalType":"string","name":"domain","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"name","type":"bytes"},{"internalType":"bytes","name":"request","type":"bytes"}],"name":"resolve","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"safeWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"string[]","name":"_subdomain","type":"string[]"},{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setDeepSubRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setOwnerhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_recordhash","type":"bytes32"}],"name":"setShortOwnerhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"bytes32","name":"_recordhash","type":"bytes32"}],"name":"setShortRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"string","name":"_subdomain","type":"string"},{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setSubRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updateChainID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gateway","type":"address"}],"name":"updateGateway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sig","type":"bytes4"},{"internalType":"bool","name":"_set","type":"bool"}],"name":"updateInterface","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wei","type":"uint256"}],"name":"updateOwnerhashFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"bool","name":"_set","type":"bool"}],"name":"updateWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_balance","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]'),g=JSON.parse('[{"inputs":[{"internalType":"address","name":"_gateway","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"BadConfig","type":"error"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"InvalidRequest","type":"error"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"string","name":"_message","type":"string"}],"name":"NotAuthorised","type":"error"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"string[]","name":"_gateways","type":"string[]"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes4","name":"_callbackFunction","type":"bytes4"},{"internalType":"bytes","name":"_extradata","type":"bytes"}],"name":"OffchainLookup","type":"error"},{"inputs":[],"name":"PlsFundDevs","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovedSigner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddr","type":"address"},{"indexed":true,"internalType":"address","name":"newAddr","type":"address"}],"name":"GatewayUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"InterfaceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"contenthash","type":"bytes"}],"name":"RecordhashUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":true,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ThankYou","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddr","type":"address"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"UpdatedWrapper","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ENS","outputs":[{"internalType":"contract iENS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"response","type":"bytes"},{"internalType":"bytes","name":"extradata","type":"bytes"}],"name":"__callback","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"bool","name":"_approval","type":"bool"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"address","name":"_signer","type":"address"}],"name":"approved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_approvedSigner","type":"address"},{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"string","name":"_domain","type":"string"}],"name":"approvedSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gateway","outputs":[{"internalType":"contract iGatewayManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"}],"name":"getRecordhash","outputs":[{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_message","type":"string"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"getSigner","outputs":[{"internalType":"address","name":"_signer","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWrapper","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_node","type":"bytes32[]"},{"internalType":"address[]","name":"_signer","type":"address[]"},{"internalType":"bool[]","name":"_approval","type":"bool[]"}],"name":"multiApprove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerhashFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"recordhash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_encoded","type":"bytes"},{"internalType":"bytes","name":"_requested","type":"bytes"}],"name":"redirectService","outputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"},{"internalType":"bytes32","name":"_namehash","type":"bytes32"},{"internalType":"bytes","name":"_redirectRequest","type":"bytes"},{"internalType":"string","name":"domain","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"name","type":"bytes"},{"internalType":"bytes","name":"request","type":"bytes"}],"name":"resolve","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"safeWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"string[]","name":"_subdomain","type":"string[]"},{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setDeepSubRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setOwnerhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_recordhash","type":"bytes32"}],"name":"setShortOwnerhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"bytes32","name":"_recordhash","type":"bytes32"}],"name":"setShortRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_node","type":"bytes32"},{"internalType":"string","name":"_subdomain","type":"string"},{"internalType":"bytes","name":"_recordhash","type":"bytes"}],"name":"setSubRecordhash","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updateChainID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gateway","type":"address"}],"name":"updateGateway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sig","type":"bytes4"},{"internalType":"bool","name":"_set","type":"bool"}],"name":"updateInterface","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wei","type":"uint256"}],"name":"updateOwnerhashFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"bool","name":"_set","type":"bool"}],"name":"updateWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_balance","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]'),x=n(67191);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function T(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:s}}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 i,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,i=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw i}}}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nenergy_savings_leaf

Gasless ENS Records','hub

Decentralised Records Storage on IPFS','recycling

Unlimited Record Updates With IPNS','badge

Dynamic Records and More','

Enjoy ENS Hassle Free'],le=[h,g],ye=[{addressOrName:re[0],contractInterface:oe[0]},{addressOrName:re[1],contractInterface:oe[1]},{addressOrName:re[2],contractInterface:oe[2]},{addressOrName:re[3],contractInterface:oe[3]},{addressOrName:re[4],contractInterface:oe[4]},{addressOrName:re[5],contractInterface:oe[5]},{addressOrName:re[6],contractInterface:oe[6]},{addressOrName:re[7],contractInterface:oe[7]}],ue=[{addressOrName:ae[0],contractInterface:le[0]},{addressOrName:ae[1],contractInterface:le[1]}];function de(e){var t=document.getElementById("overlay");t&&(t.style.display="block",setTimeout((function(){!function(){var e=document.getElementById("overlay");e&&(e.style.display="none")}()}),1e3*e))}function ce(e){return"08011240"+e[0]+e[1]}function me(e){return e&&!e.startsWith("https://")?x.vb("ipns://".concat(e)).encoded:""}function fe(e){var t=document.getElementById(e);t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value).then((function(){})).catch((function(e){console.error("ERROR:",e)}))}function be(e){return new Promise((function(t,n){var a=new Image;a.onload=function(){t(!0)},a.onerror=function(){console.error("Image Failed to Load"),n(!1)},a.src=e}))}function he(e){for(var t in e)if(e.hasOwnProperty(t)&&""!==e[t])return!1;return!0}function ge(e){return e.endsWith(".eth")&&e.length<=36}function xe(e){return e.startsWith("0x")&&42===e.length&&L.test(e.split("0x")[1])}function ve(e){return F.test(e)||e.startsWith("ipfs://")||e.startsWith("eip155:")}function Te(e){return e.length>0}function we(e){return q.test(e)}function Se(e){return B.test(e)}function je(e){return F.test(e)}function ke(e){return U.test(e)}function Ne(e){return K.test(e)}function Me(e){return H.test(e)}function Ze(e){return J.test(e)||q.test(e)}function Re(e){return J.test(e)}function Ce(e){return V.test(e)}function Pe(e){return Y.test(e)}function Ee(e){return $.test(e)}function De(e){return Q.test(e)}function _e(e){return G.test(e)}function Oe(e){var t=e.substring(0,7),n=e.substring(0,8);return"ipns://"===t&&I.test(e.substring(7))||"ipfs://"===t&&A.test(e.substring(7))||"ipfs://"===t&&W.test(e.substring(7))||"onion://"===n&&z.test(e.substring(8))}function Ie(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&!["revision","version"].includes(n)&&e[n]&&t.push(Number(e[n]));return Math.max.apply(Math,t)}function Ae(){var e,t={},n=w(M);try{for(n.s();!(e=n.n()).done;){var a=e.value;j.includes(a)||(t[a]="")}}catch(s){n.e(s)}finally{n.f()}return t}function We(){var e,t={},n=w(Z);try{for(n.s();!(e=n.n()).done;){t[e.value]=""}}catch(a){n.e(a)}finally{n.f()}return t}function ze(){var e,t={},n=w(M);try{for(n.s();!(e=n.n()).done;){var a=e.value;t[a]=!![].concat(j,["revision"]).includes(a)}}catch(s){n.e(s)}finally{n.f()}return t}var Fe={type:"",addr:"",contenthash:"",avatar:"",revision:"",version:"",timestamp:T({},Ae()),queue:1,ownerstamp:[]},Le={type:"",stealth:"",rsa:"",revision:"",version:"",timestamp:T({},We()),queue:1,ownerstamp:[]};function Be(e,t){return Ue.apply(this,arguments)}function Ue(){return(Ue=(0,a.Z)(r().mark((function e(t,n){var a,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("https://".concat(t,".ipfs2.eth.limo/revision.json?t=").concat(String(n)));case 3:if((a=e.sent).ok){e.next=7;break}return console.error("Error:","Fetch Gone Wrong"),e.abrupt("return",{_value:"//",_sequence:""});case 7:return e.next=9,a.json();case 9:return s=e.sent,e.abrupt("return",{_value:s.ipfs?"/ipfs/".concat(s.ipfs):"//",_sequence:s.sequence||""});case 13:return e.prev=13,e.t0=e.catch(0),console.error("Error:",e.t0),e.abrupt("return",{_value:"//",_sequence:""});case 17:case"end":return e.stop()}}),e,null,[[0,13]])})))).apply(this,arguments)}function Ge(e){for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=n.length,s=0;s=4?n="0x".concat(i().encode("ipfs-ns",t)):"ipns"===e?n="0x".concat(i().encode("ipns-ns",t)):"bzz"===e&&t.length>=4?n="0x".concat(i().fromSwarm(t)):"onion"===e&&16===t.length?n="0x".concat(i().encode("onion",t)):"onion3"===e&&56===t.length?n="0x".concat(i().encode("onion3",t)):"sia"===e&&46===t.length?n="0x".concat(i().encode("skynet-ns",t)):"arweave"===e&&43===t.length?n="0x".concat(i().encode("arweave-ns",t)):a="Invalid content id"}catch(s){a=s instanceof Error?s.message:String(s)}return{encoded:n,error:a}}(n[1],n[2])}},36490:function(e,t,n){"use strict";n.d(t,{rL:function(){return m},x_:function(){return d}});var a=n(50029),s=n(87794),i=n.n(s),r=n(24978),o=n(35689),p=n(26894),l=n(11606),y=n(27760),u=n(21429);try{fetch}catch(b){}function d(e,t,n,a){return c.apply(this,arguments)}function c(){return(c=(0,a.Z)(i().mark((function e(t,n,a,s){var u,d,c,m,f,b,h,g;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a.length<64)){e.next=2;break}throw new Error("SIGNATURE TOO SHORT; LENGTH SHOULD BE 65 BYTES");case 2:return u=(0,l.J)(r.UG.hexToBytes(a.toLowerCase().startsWith("0x")?a.slice(2):a)),d="".concat(n,":").concat(t),c=(0,l.J)("".concat(d,":").concat(s||"",":").concat(a.slice(-64))),m=(0,p.Di)(l.J,u,c,d,42),f=o.P6.hashToPrivateScalar(m).toString(16).padStart(64,"0"),e.t0=r.UG,e.next=10,o.$3(f);case 10:return e.t1=e.sent,b=e.t0.bytesToHex.call(e.t0,e.t1),h=y.P6.bytesToHex(y.P6.hashToPrivateKey(m)),g=y.P6.bytesToHex(y.$3(f)),e.abrupt("return",[[f,b],[h,g]]);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t,n,a){return f.apply(this,arguments)}function f(){return(f=(0,a.Z)(i().mark((function e(t,n,a,s){var o,y,d,c,m,f;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a.length<64)){e.next=2;break}throw new Error("SIGNATURE TOO SHORT; LENGTH SHOULD BE 65 BYTES");case 2:return o=(0,l.J)(r.UG.hexToBytes(a.toLowerCase().startsWith("0x")?a.slice(2):a)),2048,y="".concat(n,":").concat(t),d=(0,l.J)("".concat(y,":").concat(s||"",":").concat(a.slice(-64))),c=(0,p.Di)(l.J,o,d,y,42),m=u.generateRSAKey(c,2048),f=u.publicKeyString(m),e.abrupt("return",[m,f]);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},71775:function(e,t,n){"use strict";n.d(t,{I7:function(){return d},Yy:function(){return m},cU:function(){return y}});var a=n(50029),s=n(87794),i=n.n(s),r=n(62012),o=n(64146),p=n(27586),l=n(16441);function y(e,t,n){return u.apply(this,arguments)}function u(){return(u=(0,a.Z)(i().mark((function e(t,n,a){var s,y,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=new o.CH(n.addressOrName,n.contractInterface,r.Ap),e.next=3,s.getRecordhash(p.VM(t));case 3:return y=e.sent,e.next=6,s.getRecordhash(l.hexZeroPad(a,32).toLowerCase());case 6:return u=e.sent,e.abrupt("return",new Promise((function(e,t){y?e("0x"===String(y)||String(y)===String(u)?"0":String(y).startsWith("0x6874")?"2":"1"):t(new Error("Failed to fetch Recordhash"))})));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n){return c.apply(this,arguments)}function c(){return(c=(0,a.Z)(i().mark((function e(t,n,a){var s,y,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=new o.CH(n.addressOrName,n.contractInterface,r.Ap),e.next=3,s.getRecordhash(p.VM(t));case 3:return y=e.sent,e.next=6,s.getRecordhash(l.hexZeroPad(a,32).toLowerCase());case 6:return u=e.sent,e.abrupt("return",new Promise((function(e,t){y?e("0x"===String(y)?["0x",!1]:String(y)===String(u)?[String(u),!1]:[String(y),!0]):t(new Error("Failed to fetch Recordhash"))})));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t){return f.apply(this,arguments)}function f(){return(f=(0,a.Z)(i().mark((function e(t,n){var a,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new o.CH(t.addressOrName,t.contractInterface,r.Ap),e.next=3,a.getRecordhash(l.hexZeroPad(n,32).toLowerCase());case 3:return s=e.sent,e.abrupt("return",new Promise((function(e,t){s?e("0x"!==String(s)?String(s).startsWith("0x6874")?"2":"1":"0"):t(new Error("Failed to fetch Ownerhash"))})));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},88677:function(){},62808:function(){},43094:function(){},95856:function(){},69159:function(){},46601:function(){},33397:function(){},62678:function(){},25819:function(){},24112:function(){}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/2174.f6baa39611ece47e.js b/out/_next/static/chunks/2174.f6baa39611ece47e.js new file mode 100644 index 00000000..dfddb3f9 --- /dev/null +++ b/out/_next/static/chunks/2174.f6baa39611ece47e.js @@ -0,0 +1 @@ +!function(){var t={70512:function(t,n,e){"use strict";var r=e(50029),o=e(87794),u=e.n(o),c=e(24978),i=(e(35689),e(26894)),f=e(11606),a=(e(27760),e(21429));try{fetch}catch(l){}function s(t,n,e,r){return p.apply(this,arguments)}function p(){return(p=(0,r.Z)(u().mark((function t(n,e,r,o){var s,p,l,v,d,y;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r.length<64)){t.next=2;break}throw new Error("SIGNATURE TOO SHORT; LENGTH SHOULD BE 65 BYTES");case 2:return s=(0,f.J)(c.UG.hexToBytes(r.toLowerCase().startsWith("0x")?r.slice(2):r)),2048,p="".concat(e,":").concat(n),l=(0,f.J)("".concat(p,":").concat(o||"",":").concat(r.slice(-64))),v=(0,i.Di)(f.J,s,l,p,42),d=a.generateRSAKey(v,2048),y=a.publicKeyString(d),t.abrupt("return",[d,y]);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}addEventListener("message",(function(t){var n=t.data,e=function(){var t=(0,r.Z)(u().mark((function t(){var e;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s(n._origin,n._caip10,n._sigRSA,n._salt);case 2:e=t.sent,postMessage(e);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();e()}))},95856:function(){},33397:function(){}},n={};function e(r){var o=n[r];if(void 0!==o)return o.exports;var u=n[r]={exports:{}},c=!0;try{t[r](u,u.exports,e),c=!1}finally{c&&delete n[r]}return u.exports}e.m=t,e.x=function(){var t=e.O(void 0,[6724,5660],(function(){return e(70512)}));return t=e.O(t)},function(){var t=[];e.O=function(n,r,o,u){if(!r){var c=1/0;for(s=0;s=u)&&Object.keys(e.O).every((function(t){return e.O[t](r[f])}))?r.splice(f--,1):(i=!1,u0&&t[s-1][2]>u;s--)t[s]=t[s-1];t[s]=[r,o,u]}}(),e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},function(){var t,n=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__};e.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var u=Object.create(null);e.r(u);var c={};t=t||[null,n({}),n([]),n(n)];for(var i=2&o&&r;"object"==typeof i&&!~t.indexOf(i);i=n(i))Object.getOwnPropertyNames(i).forEach((function(t){c[t]=function(){return r[t]}}));return c.default=function(){return r},e.d(u,c),u}}(),e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.f={},e.e=function(t){return Promise.all(Object.keys(e.f).reduce((function(n,r){return e.f[r](t,n),n}),[]))},e.u=function(t){return 6724===t?"static/chunks/6724-b954bf9a27972ff7.js":"static/chunks/"+t+".294b57e99702d064.js"},e.miniCssF=function(t){},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.p="/_next/",function(){var t={2174:1,556:1};e.f.i=function(n,r){t[n]||importScripts(e.p+e.u(n))};var n=self.webpackChunk_N_E=self.webpackChunk_N_E||[],r=n.push.bind(n);n.push=function(n){var o=n[0],u=n[1],c=n[2];for(var i in u)e.o(u,i)&&(e.m[i]=u[i]);for(c&&c(e);o.length;)t[o.pop()]=1;r(n)}}(),function(){var t=e.x;e.x=function(){return Promise.all([e.e(6724),e.e(5660)]).then(t)}}();var r=e.x();_N_E=r}(); \ No newline at end of file diff --git a/out/_next/static/chunks/3482-541ec2729b5b05cf.js b/out/_next/static/chunks/5246-750e02a737a02c02.js similarity index 88% rename from out/_next/static/chunks/3482-541ec2729b5b05cf.js rename to out/_next/static/chunks/5246-750e02a737a02c02.js index df0d7bf4..87bc0517 100644 --- a/out/_next/static/chunks/3482-541ec2729b5b05cf.js +++ b/out/_next/static/chunks/5246-750e02a737a02c02.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3482],{59654:function(t,e,r){"use strict";r.d(e,{Z_:function(){return en}});var n=r(27715),i=r(1191),o=r(77191),s=r.n(o),a=r(35682),u=r(58162),h=r.n(u),c=r(89509),l=r(24736),f=r.n(l);const d=new Array(16),p=M([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=M([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]),y=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]),m=M([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),v=I([0,1518500249,1859775393,2400959708,2840853838]),b=I([1352829926,1548603684,1836072691,2053994217,0]);function w(t,e){return t<>>32-e}function E(t,e,r,n,i,o,s,a){return w(t+(e^r^n)+o+s|0,a)+i|0}function A(t,e,r,n,i,o,s,a){return w(t+(e&r|~e&n)+o+s|0,a)+i|0}function k(t,e,r,n,i,o,s,a){return w(t+((e|~r)^n)+o+s|0,a)+i|0}function S(t,e,r,n,i,o,s,a){return w(t+(e&n|r&~n)+o+s|0,a)+i|0}function B(t,e,r,n,i,o,s,a){return w(t+(e^(r|~n))+o+s|0,a)+i|0}function x(t,e,r){return e=+e,t[(r>>>=0)+3]=e>>>24,t[r+2]=e>>>16,t[r+1]=e>>>8,t[r]=255&e,r+4}function C(t,e,r){return e=+e,t[r>>>=0]=255&e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,r+4}function I(t){return"undefined"!==typeof Uint32Array?new Uint32Array(t):t}function M(t){return"undefined"!==typeof Uint8Array?new Uint8Array(t):t}function T(t){return"undefined"!==typeof Uint8Array?new Uint8Array(t):new Array(t)}class O{constructor(){this._block=T(64),this._blockSize=64,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1,this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}update(t){if(this._finalized)throw new Error("Digest already called");const e=this._block;let r=0;for(;this._blockOffset+t.length-r>=this._blockSize;){for(let n=this._blockOffset;n0;++n)this._length[n]+=i,i=this._length[n]/4294967296|0,i>0&&(this._length[n]-=4294967296*i);return this}_update(){const t=d;for(let d=0;d<16;++d)t[d]=(e=this._block,r=4*d,e[r>>>=0]|e[r+1]<<8|e[r+2]<<16|e[r+3]<<24);var e,r;let n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,u=0|this._a,h=0|this._b,c=0|this._c,l=0|this._d,f=0|this._e;for(let d=0;d<80;d+=1){let e,r;d<16?(e=E(n,i,o,s,a,t[p[d]],v[0],y[d]),r=B(u,h,c,l,f,t[g[d]],b[0],m[d])):d<32?(e=A(n,i,o,s,a,t[p[d]],v[1],y[d]),r=S(u,h,c,l,f,t[g[d]],b[1],m[d])):d<48?(e=k(n,i,o,s,a,t[p[d]],v[2],y[d]),r=k(u,h,c,l,f,t[g[d]],b[2],m[d])):d<64?(e=S(n,i,o,s,a,t[p[d]],v[3],y[d]),r=A(u,h,c,l,f,t[g[d]],b[3],m[d])):(e=B(n,i,o,s,a,t[p[d]],v[4],y[d]),r=E(u,h,c,l,f,t[g[d]],b[4],m[d])),n=a,a=s,s=w(o,10),o=i,i=e,u=f,f=l,l=w(c,10),c=h,h=r}const x=this._b+o+l|0;this._b=this._c+s+f|0,this._c=this._d+a+u|0,this._d=this._e+n+h|0,this._e=this._a+i+c|0,this._a=x}digest(){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,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),x(this._block,this._length[0],56),x(this._block,this._length[1],60),this._update();const t=T(20);C(t,this._a,0),C(t,this._b,4),C(t,this._c,8),C(t,this._d,12),C(t,this._e,16),this._block.fill(0),this._blockOffset=0;for(let e=0;e<4;++e)this._length[e]=0;return t}}var R=r(8442),_=r(48764).Buffer,P="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",N=function(t){for(var e=t.toString(),r="",n=0;n>2,r[5*n+1]=(3&i[1])<<6|i[2]<<1|i[3]>>4,r[5*n+2]=(15&i[3])<<4|i[4]>>1,r[5*n+3]=(1&i[4])<<7|i[5]<<2|i[6]>>3,r[5*n+4]=(7&i[6])<<5|i[7]}return r},L=function(t){var e=[],r=Math.floor(t.length/5),n=t.length%5;if(0!=n){for(var i=0;i<5-n;i++)t+="\0";r+=1}for(var o=0;o>3)),e.push(P.charAt((7&t.charCodeAt(5*o))<<2|t.charCodeAt(5*o+1)>>6)),e.push(P.charAt((63&t.charCodeAt(5*o+1))>>1)),e.push(P.charAt((1&t.charCodeAt(5*o+1))<<4|t.charCodeAt(5*o+2)>>4)),e.push(P.charAt((15&t.charCodeAt(5*o+2))<<1|t.charCodeAt(5*o+3)>>7)),e.push(P.charAt((127&t.charCodeAt(5*o+3))>>2)),e.push(P.charAt((3&t.charCodeAt(5*o+3))<<3|t.charCodeAt(5*o+4)>>5)),e.push(P.charAt(31&t.charCodeAt(5*o+4)));var s=0;1==n?s=6:2==n?s=4:3==n?s=3:4==n&&(s=1);for(var a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0;this._block.writeUInt32BE((r-n)/4294967296,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return t?i.toString(t):i},j.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var K,z,H=[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],q=new Array(64);function V(){this.init(),this._w=q,j.call(this,64,56)}function G(t,e,r){return r^t&(e^r)}function W(t,e,r){return t&e|r&(t|e)}function Z(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function J(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function Q(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function X(t){return void 0!==t.length}K=V,(z=j)&&(K.super_=z,K.prototype=Object.create(z.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}})),V.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},V.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,u=0|this._f,h=0|this._g,c=0|this._h,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<64;++l)r[l]=0|(((e=r[l-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[l-7]+Q(r[l-15])+r[l-16];for(var f=0;f<64;++f){var d=c+J(a)+G(a,u,h)+H[f]+r[f]|0,p=Z(n)+W(n,i,o)|0;c=h,h=u,u=a,a=s+d|0,s=o,o=i,i=n,n=d+p|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=a+this._e|0,this._f=u+this._f|0,this._g=h+this._g|0,this._h=c+this._h|0},V.prototype._hash=function(){var t=c.Buffer.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var Y=new(function(){function t(t){this.sha256=t.sha256,this.alphabet=t.alphabet,this.codec=h()(this.alphabet),this.base=this.alphabet.length}var e=t.prototype;return e.encodeChecked=function(t){var e=this.sha256(this.sha256(t)).slice(0,4);return this.encodeRaw(_.from(function(){var t=[];return[].slice.call(arguments).forEach((function(e){if(X(e))for(var r=0;r= 5");if(!this.verifyCheckSum(e))throw new Error("checksum_invalid");return e.slice(0,-4)},e.decodeRaw=function(t){return this.codec.decode(t)},e.verifyCheckSum=function(t){return function(t,e){if(t.length!==e.length)return!1;for(var r=0;r=8?n[s].toUpperCase():n[s];return o};var et=function(t,e){if(!t)throw e},rt=function(t,e){if(!_.isBuffer(t))throw e},nt=f().one,it=f().zero,ot=f()(3);function st(t,e){return t.and(nt.shiftLeft(e)).notEquals(it)}function at(t){return f().fromArray(Array.prototype.slice.call(t,0),256)}function ut(t,e){var r=t.toArray(256).value,n=e?Math.max(e-r.length,0):0;return _.from([].concat(Array(n).fill(0),r))}function ht(t,e,r,n){et(void 0!==n,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=r,this.z=n,this._zInv=null,this.compressed=!0}Object.defineProperty(ht.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInv(this.curve.p)),this._zInv}}),Object.defineProperty(ht.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(ht.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),ht.fromAffine=function(t,e,r){return new ht(t,e,r,nt)},ht.prototype.equals=function(t){return t===this||(this.curve.isInfinity(this)?this.curve.isInfinity(t):this.curve.isInfinity(t)?this.curve.isInfinity(this):0===t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p).compare(it)&&0===t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p).compare(it))},ht.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new ht(this.curve,this.x,t,this.z)},ht.prototype.add=function(t){if(this.curve.isInfinity(this))return t;if(this.curve.isInfinity(t))return this;var e=this.x,r=this.y,n=t.x,i=t.y.multiply(this.z).subtract(r.multiply(t.z)).mod(this.curve.p),o=n.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===o.compare(it))return 0===i.compare(it)?this.twice():this.curve.infinity;var s=o.square(),a=s.multiply(o),u=e.multiply(s),h=i.square().multiply(this.z),c=h.subtract(u.shiftLeft(1)).multiply(t.z).subtract(a).multiply(o).mod(this.curve.p),l=u.multiply(ot).multiply(i).subtract(r.multiply(a)).subtract(h.multiply(i)).multiply(t.z).add(i.multiply(a)).mod(this.curve.p),f=a.multiply(this.z).multiply(t.z).mod(this.curve.p);return new ht(this.curve,c,l,f)},ht.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(0===this.y.compare(it))return this.curve.infinity;var t=this.x,e=this.y,r=e.multiply(this.z).mod(this.curve.p),n=r.multiply(e).mod(this.curve.p),i=this.curve.a,o=t.square().multiply(ot);0!==i.compare(it)&&(o=o.add(this.z.square().multiply(i)));var s=(o=o.mod(this.curve.p)).square().subtract(t.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.p),a=o.multiply(ot).multiply(t).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(o.pow(3)).mod(this.curve.p),u=r.pow(3).shiftLeft(3).mod(this.curve.p);return new ht(this.curve,s,a,u)},ht.prototype.multiply=function(t){if(this.curve.isInfinity(this))return this;if(0===t.compare(it))return this.curve.infinity;for(var e=t,r=e.multiply(ot),n=this.negate(),i=this,o=r.bitLength()-2;o>0;--o){var s=st(r,o),a=st(e,o);i=i.twice(),s!==a&&(i=i.add(s?this:n))}return i},ht.prototype.multiplyTwo=function(t,e,r){for(var n=Math.max(t.bitLength(),r.bitLength())-1,i=this.curve.infinity,o=this.add(e);n>=0;){var s=st(t,n),a=st(r,n);i=i.twice(),s?i=i.add(a?o:this):a&&(i=i.add(e)),--n}return i},ht.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return new _("00","hex");var e,r=this.affineX,n=this.affineY,i=this.curve.pLength;return t?(e=new _(1+i)).writeUInt8(n.isEven()?2:3,0):((e=new _(1+i+i)).writeUInt8(4,0),ut(n,i).copy(e,1+i)),ut(r,i).copy(e,1),e},ht.decodeFrom=function(t,e){var r,n=e.readUInt8(0),i=4!==n,o=Math.floor((t.p.bitLength()+7)/8),s=at(e.slice(1,1+o));if(i)et(e.length===o+1,"Invalid sequence length"),et(2===n||3===n,"Invalid sequence tag"),r=t.pointFromX(3===n,s);else{et(e.length===1+o+o,"Invalid sequence length");var a=at(e.slice(1+o));r=ht.fromAffine(t,s,a)}return r.compressed=i,r},ht.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"};var ct=f().zero,lt=f().one;function ft(t,e,r,n,i,o,s){this.p=t,this.a=e,this.b=r,this.G=ht.fromAffine(this,n,i),this.n=o,this.h=s,this.infinity=new ht(this,null,null,ct),this.pOverFour=t.add(lt).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}ft.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p).modPow(this.pOverFour,this.p),n=r;return r.isEven()^!t&&(n=this.p.subtract(n)),ht.fromAffine(this,e,n)},ft.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.compare(ct)&&0!==t.y.compare(ct)},ft.prototype.isOnCurve=function(t){if(this.isInfinity(t))return!0;var e=t.affineX,r=t.affineY,n=this.a,i=this.b,o=this.p;if(e.compare(ct)<0||e.compareTo(o)>=0)return!1;if(r.compare(ct)<0||r.compareTo(o)>=0)return!1;var s=r.square().mod(o),a=e.pow(3).add(n.multiply(e)).add(i).mod(o);return s.equals(a)},ft.prototype.validate=function(t){et(!this.isInfinity(t),"Point is at infinity"),et(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return et(this.isInfinity(e),"Point is not a scalar multiple of G"),!0};var dt={p:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",a:"00",b:"07",n:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",h:"01",Gx:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",Gy:"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"};function pt(t,e){return new a.Aj(256).update(t).digest(e)}function gt(t){return _.from((new O).update(t).digest())}function yt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(rt(t,"expecting keyBuffer"),"sha256x2"===e){var r=pt(pt(t)).slice(0,4);return s().encode(_.concat([t,r]))}var n=[t];e&&n.push(_.from(e));var i=gt(_.concat(n)).slice(0,4);return s().encode(_.concat([t,i]))}function mt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;et(t,"private key expected");var r,n=new _(s().decode(t)),i=n.slice(-4),o=n.slice(0,-4);if("sha256x2"===e)r=pt(pt(o)).slice(0,4);else{var a=[o];e&&a.push(_.from(e)),r=gt(_.concat(a)).slice(0,4)}if(i.toString("hex")!==r.toString("hex"))throw new Error("Invalid checksum, "+"".concat(i.toString("hex")," != ").concat(r.toString("hex")));return o}var vt=function(t){var e=dt;if(!e)return null;var r=f()(e.p,16),n=f()(e.a,16),i=f()(e.b,16),o=f()(e.n,16),s=f()(e.h,16);return new ft(r,n,i,f()(e.Gx,16),f()(e.Gy,16),o,s)}();function bt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EOS";if("string"==typeof t)return bt.fromString(t,e);if(_.isBuffer(t))return bt.fromBuffer(t);if("object"==typeof t&&t.Q)return bt(t.Q);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.compressed;return t.getEncoded(e)}function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"EOS";return t+yt(r())}function i(){return r().toString("hex")}return{Q:t,toString:n,toBuffer:r,toHex:i}}bt.isValid=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EOS";try{return bt(t,e),!0}catch(t){return!1}},bt.fromBuffer=function(t){return bt(ht.decodeFrom(vt,t))},bt.fromString=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EOS";try{return bt.fromStringOrThrow(t,e)}catch(t){return null}},bt.fromStringOrThrow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EOS",r=t.match(/^PUB_([A-Za-z0-9]+)_([A-Za-z0-9]+)$/);if(null===r){var n=new RegExp("^"+e);return n.test(t)&&(t=t.substring(e.length)),bt.fromBuffer(mt(t))}var i=r[1],o=r[2];return bt.fromBuffer(mt(o,i))},bt.fromHex=function(t){return bt.fromBuffer(new _(t,"hex"))},bt.fromStringHex=function(t){return bt.fromString(new _(t,"hex"))};var wt=h()("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Et=wt.encode,At=wt.decode,kt=function(t){return void 0===t},St={ed25519PublicKey:48,ed25519SecretSeed:144,preAuthTx:152,sha256Hash:184},Bt=function(t){var e=_.alloc(2);return e.writeUInt16LE(function(t,e){_.isBuffer(t)||(t=new _);for(var r=0,n=0;n>>8&255;i^=255&t[n],r=r<<8&65535,r^=i^=i>>>4,r^=i=i<<5&65535,r^=i=i<<7&65535}return r}(t),0),e},xt=function(t,e){if(t.length!==e.length)return!1;if(0===t.length)return!0;for(var r=0;r>>=t,e|=this.hi<<32-t):e=this.hi>>>t-32),e},t}(),jt=_.allocUnsafe(105),Kt="qpzry9x8gf2tvdw0s3jn54khce6mua7l",zt=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,15,-1,10,17,21,20,26,30,7,5,-1,-1,-1,-1,-1,-1,-1,29,-1,24,13,25,9,8,23,-1,18,22,31,27,19,-1,1,0,3,16,11,28,12,14,6,4,2,-1,-1,-1,-1,-1,-1,29,-1,24,13,25,9,8,23,-1,18,22,31,27,19,-1,1,0,3,16,11,28,12,14,6,4,2,-1,-1,-1,-1,-1],Ht=new Ft(7,4294967295),qt=[new Ft(152,4072443489),new Ft(121,3077413346),new Ft(243,1046459332),new Ft(174,783016616),new Ft(30,1329849456)];function Vt(t,e){var r=t,n=r.hi>>>3;r.hi&=Ht.hi,r.lo&=Ht.lo,r.hi<<=5,r.hi|=r.lo>>>27,r.lo<<=5;for(var i=0;i>>i&1&&(r.hi^=qt[i].hi,r.lo^=qt[i].lo);return r.lo^=e,r}function Gt(t,e,r,n,i,o,s){Dt(_.isBuffer(t)),Dt(e>>>0===e),Dt(_.isBuffer(r)),Dt(n>>>0===n),Dt((255&i)===i),Dt((255&o)===o),Dt("boolean"==typeof s);for(var a=(1<>>i!=0)throw new Error("Invalid bits.");for(u=u<=o;)r[n++]=u>>>(h-=o)&a}if(s)h&&(r[n++]=u<=i||u<83)throw new Error("Invalid cashaddr prefix.");var n=function(t){switch(Dt(t>>>0===t),t){case 20:return 0;case 24:return 1;case 28:return 2;case 32:return 3;case 40:return 4;case 48:return 5;case 56:return 6;case 64:return 7;default:throw new Error("Non standard length.")}}(r.length),i=_.allocUnsafe(r.length+1);return i[0]=e<<3|n,r.copy(i,1),function(t,e){Dt("string"==typeof t),Dt(_.isBuffer(e));for(var r=new Ft(0,1),n="",i=!1,o=!1,s=0;s>>5==0)throw new Error("Invalid cashaddr character.");if(a>=97&&a<=122)o=!0;else if(a>=65&&a<=90)i=!0,a=a-65+97;else if(a>=48&&a<=57)throw new Error("Invalid cashaddr prefix.");Vt(r,31&a),n+=String.fromCharCode(a)}if(o&&i)throw new Error("Invalid cashaddr prefix.");Vt(r,0),n+=":";for(var u=0;u>>5!=0)throw new Error("Invalid cashaddr value.");Vt(r,h),n+=Kt[h]}for(var c=0;c<8;c++)Vt(r,0);r.lo^=1;for(var l=0;l<8;l++){var f=31&r.ushrn32(5*(7-l));n+=Kt[f]}return n}(t,Gt(i,0,jt,0,8,5,!0))}var Zt=function(t){function e(e){var r=e.slice(0,-4),n=e.slice(-4),i=t(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{bs58Encode:function(e){var r=t(e);return s().encode(_.concat([e,r],e.length+4))},bs58Decode:function(t){var r=e(s().decode(t));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(t){var r=s().decodeUnsafe(t);if(r)return e(r)}}}((function(t){var e=(new V).update(t).digest();return(new V).update(e).digest()})),Jt=Zt.bs58Decode,Qt=Zt.bs58Encode,Xt=r(30728),Yt=r(93434),$t=r(83854),te=r(72023),ee=r(48764).Buffer;function re(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var ie,oe=(function(t){var e=function(t){var r=1e7,n=9007199254740992,i=c(n),o=Math.log(n);function s(t,e){return void 0===t?s[0]:void 0!==e?10==+e?V(t):F(t,e):V(t)}function a(t,e){this.value=t,this.sign=e,this.isSmall=!1}function u(t){this.value=t,this.sign=t<0,this.isSmall=!0}function h(t){return-n0?Math.floor(t):Math.ceil(t)}function g(t,e){var n,i,o=t.length,s=e.length,a=new Array(o),u=0,h=r;for(i=0;i=h?1:0)*h;for(;i0&&a.push(u),a}function y(t,e){return t.length>=e.length?g(t,e):g(e,t)}function m(t,e){var n,i,o=t.length,s=new Array(o),a=r;for(i=0;i0;)s[i++]=e%a,e=Math.floor(e/a);return s}function v(t,e){var r,n,i=t.length,o=e.length,s=new Array(i),a=0;for(r=0;r0;)s[i++]=u%a,u=Math.floor(u/a);return s}function A(t,e){for(var r=[];e-- >0;)r.push(0);return r.concat(t)}function k(t,e,n){return new a(t=0;--r)i=(o=1e7*i+t[r])-(n=p(o/e))*e,a[r]=0|n;return[a,0|i]}function x(t,e){var n,i,o=V(e),h=t.value,g=o.value;if(0===g)throw new Error("Cannot divide by zero");if(t.isSmall)return o.isSmall?[new u(p(h/g)),new u(h%g)]:[s[0],t];if(o.isSmall){if(1===g)return[t,s[0]];if(-1==g)return[t.negate(),s[0]];var y=Math.abs(g);if(y=0;i--){for(n=p-1,v[i+f]!==y&&(n=Math.floor((v[i+f]*p+v[i+f-1])/y)),o=0,s=0,u=b.length,a=0;aa&&(i=1e7*(i+1)),r=Math.ceil(i/(1e7*e[a-1]+e[a-2]));do{if(C(o=E(e,r),h)<=0)break;r--}while(r);u.push(r),h=v(h,o)}return u.reverse(),[l(u),l(h)]}(h,g);var w=t.sign!==o.sign,A=n[1],k=t.sign;return"number"==typeof(i=n[0])?(w&&(i=-i),i=new u(i)):i=new a(i,w),"number"==typeof A?(k&&(A=-A),A=new u(A)):A=new a(A,k),[i,A]}function C(t,e){if(t.length!==e.length)return t.length>e.length?1:-1;for(var r=t.length-1;r>=0;r--)if(t[r]!==e[r])return t[r]>e[r]?1:-1;return 0}function I(t){var e=t.abs();return!e.isUnit()&&(!!(e.equals(2)||e.equals(3)||e.equals(5))||!(e.isEven()||e.isDivisibleBy(3)||e.isDivisibleBy(5))&&(!!e.lesser(49)||void 0))}function M(t,r){for(var n,i,o,a=t.prev(),u=a,h=0;u.isEven();)u=u.divide(2),h++;t:for(i=0;i=0?n=v(t,e):(n=v(e,t),r=!r),"number"==typeof(n=l(n))?(r&&(n=-n),new u(n)):new a(n,r)}(r,n,this.sign)},a.prototype.minus=a.prototype.subtract,u.prototype.subtract=function(t){var e=V(t),r=this.value;if(r<0!==e.sign)return this.add(e.negate());var n=e.value;return e.isSmall?new u(r-n):b(n,Math.abs(r),r>=0)},u.prototype.minus=u.prototype.subtract,a.prototype.negate=function(){return new a(this.value,!this.sign)},u.prototype.negate=function(){var t=this.sign,e=new u(-this.value);return e.sign=!t,e},a.prototype.abs=function(){return new a(this.value,!1)},u.prototype.abs=function(){return new u(Math.abs(this.value))},a.prototype.multiply=function(t){var e,n,i,o=V(t),u=this.value,h=o.value,l=this.sign!==o.sign;if(o.isSmall){if(0===h)return s[0];if(1===h)return this;if(-1===h)return this.negate();if((e=Math.abs(h))0?new a(function t(e,r){var n=Math.max(e.length,r.length);if(n<=30)return w(e,r);n=Math.ceil(n/2);var i=e.slice(n),o=e.slice(0,n),s=r.slice(n),a=r.slice(0,n),u=t(o,a),h=t(i,s),c=t(y(o,i),y(a,s)),l=y(y(u,A(v(v(c,u),h),n)),A(h,2*n));return f(l),l}(u,h),l):new a(w(u,h),l)},a.prototype.times=a.prototype.multiply,u.prototype._multiplyBySmall=function(t){return h(t.value*this.value)?new u(t.value*this.value):k(Math.abs(t.value),c(Math.abs(this.value)),this.sign!==t.sign)},a.prototype._multiplyBySmall=function(t){return 0===t.value?s[0]:1===t.value?this:-1===t.value?this.negate():k(Math.abs(t.value),this.value,this.sign!==t.sign)},u.prototype.times=u.prototype.multiply=function(t){return V(t)._multiplyBySmall(this)},a.prototype.square=function(){return new a(S(this.value),!1)},u.prototype.square=function(){var t=this.value*this.value;return h(t)?new u(t):new a(S(c(Math.abs(this.value))),!1)},u.prototype.divmod=a.prototype.divmod=function(t){var e=x(this,t);return{quotient:e[0],remainder:e[1]}},u.prototype.over=u.prototype.divide=a.prototype.over=a.prototype.divide=function(t){return x(this,t)[0]},u.prototype.remainder=u.prototype.mod=a.prototype.remainder=a.prototype.mod=function(t){return x(this,t)[1]},a.prototype.pow=function(t){var e,r,n,i=V(t),o=this.value,a=i.value;if(0===a)return s[1];if(0===o)return s[0];if(1===o)return s[1];if(-1===o)return i.isEven()?s[1]:s[-1];if(i.sign)return s[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&h(e=Math.pow(o,a)))return new u(p(e));for(r=this,n=s[1];!0&a&&(n=n.times(r),--a),0!==a;)a/=2,r=r.square();return n},u.prototype.pow=a.prototype.pow,u.prototype.modPow=a.prototype.modPow=function(t,e){if(t=V(t),(e=V(e)).isZero())throw new Error("Cannot take modPow with modulus 0");for(var r=s[1],n=this.mod(e);t.isPositive();){if(n.isZero())return s[0];t.isOdd()&&(r=r.multiply(n).mod(e)),t=t.divide(2),n=n.square().mod(e)}return r},a.prototype.compareAbs=function(t){var e=V(t);return e.isSmall?1:C(this.value,e.value)},u.prototype.compareAbs=function(t){var e=V(t),r=Math.abs(this.value),n=e.value;return e.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},a.prototype.compareTo=a.prototype.compare=function(t){if(1/0===t)return-1;if(-1/0===t)return 1;var e=V(t);return this.sign!==e.sign?e.sign?1:-1:e.isSmall?this.sign?-1:1:C(this.value,e.value)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare=function(t){if(1/0===t)return-1;if(-1/0===t)return 1;var e=V(t),r=this.value,n=e.value;return e.isSmall?r==n?0:r>n?1:-1:r<0!==e.sign?r<0?-1:1:r<0?1:-1},u.prototype.eq=u.prototype.equals=a.prototype.eq=a.prototype.equals=function(t){return 0===this.compare(t)},u.prototype.neq=u.prototype.notEquals=a.prototype.neq=a.prototype.notEquals=function(t){return 0!==this.compare(t)},u.prototype.gt=u.prototype.greater=a.prototype.gt=a.prototype.greater=function(t){return this.compare(t)>0},u.prototype.lt=u.prototype.lesser=a.prototype.lt=a.prototype.lesser=function(t){return this.compare(t)<0},u.prototype.geq=u.prototype.greaterOrEquals=a.prototype.geq=a.prototype.greaterOrEquals=function(t){return this.compare(t)>=0},u.prototype.leq=u.prototype.lesserOrEquals=a.prototype.leq=a.prototype.lesserOrEquals=function(t){return this.compare(t)<=0},a.prototype.isEven=function(){return 0==(1&this.value[0])},u.prototype.isEven=function(){return 0==(1&this.value)},a.prototype.isOdd=function(){return 1==(1&this.value[0])},u.prototype.isOdd=function(){return 1==(1&this.value)},a.prototype.isPositive=function(){return!this.sign},u.prototype.isPositive=function(){return this.value>0},a.prototype.isNegative=function(){return this.sign},u.prototype.isNegative=function(){return this.value<0},a.prototype.isUnit=function(){return!1},u.prototype.isUnit=function(){return 1===Math.abs(this.value)},a.prototype.isZero=function(){return!1},u.prototype.isZero=function(){return 0===this.value},u.prototype.isDivisibleBy=a.prototype.isDivisibleBy=function(t){var e=V(t),r=e.value;return 0!==r&&(1===r||(2===r?this.isEven():this.mod(e).equals(s[0])))},u.prototype.isPrime=a.prototype.isPrime=function(t){var r=I(this);if(void 0!==r)return r;var n=this.abs(),i=n.bitLength();if(i<=64)return M(n,[2,325,9375,28178,450775,9780504,1795265022]);for(var o=Math.log(2)*i,s=Math.ceil(!0===t?2*Math.pow(o,2):o),a=[],u=0;u-n?new u(t-1):new a(i,!0)};for(var T=[1];2*T[T.length-1]<=r;)T.push(2*T[T.length-1]);var O=T.length,R=T[O-1];function _(t){return("number"==typeof t||"string"==typeof t)&&+Math.abs(t)<=r||t instanceof a&&t.value.length<=1}function P(t,r,n){r=V(r);for(var i=t.isNegative(),o=r.isNegative(),s=i?t.not():t,a=o?r.not():r,u=0,h=0,c=null,l=null,f=[];!s.isZero()||!a.isZero();)u=(c=x(s,R))[1].toJSNumber(),i&&(u=R-1-u),h=(l=x(a,R))[1].toJSNumber(),o&&(h=R-1-h),s=c[0],a=l[0],f.push(n(u,h));for(var d=0!==n(i?1:0,o?1:0)?e(-1):e(0),p=f.length-1;p>=0;p-=1)d=d.multiply(R).add(e(f[p]));return d}function N(t){var e=t.value,n="number"==typeof e?e|1<<30:e[0]+e[1]*r|1073758208;return n&-n}function U(t,e){return t=V(t),e=V(e),t.greater(e)?t:e}function L(t,e){return t=V(t),e=V(e),t.lesser(e)?t:e}function D(t,e){if(t=V(t).abs(),e=V(e).abs(),t.equals(e))return t;if(t.isZero())return e;if(e.isZero())return t;for(var r,n,i=s[1];t.isEven()&&e.isEven();)r=Math.min(N(t),N(e)),t=t.divide(r),e=e.divide(r),i=i.multiply(r);for(;t.isEven();)t=t.divide(N(t));do{for(;e.isEven();)e=e.divide(N(e));t.greater(e)&&(n=e,e=t,t=n),e=e.subtract(t)}while(!e.isZero());return i.isUnit()?t:t.multiply(i)}u.prototype.shiftLeft=a.prototype.shiftLeft=function(t){if(!_(t))throw new Error(String(t)+" is too large for shifting.");if((t=+t)<0)return this.shiftRight(-t);var e=this;if(e.isZero())return e;for(;t>=O;)e=e.multiply(R),t-=O-1;return e.multiply(T[t])},u.prototype.shiftRight=a.prototype.shiftRight=function(t){var e;if(!_(t))throw new Error(String(t)+" is too large for shifting.");if((t=+t)<0)return this.shiftLeft(-t);for(var r=this;t>=O;){if(r.isZero()||r.isNegative()&&r.isUnit())return r;r=(e=x(r,R))[1].isNegative()?e[0].prev():e[0],t-=O-1}return(e=x(r,T[t]))[1].isNegative()?e[0].prev():e[0]},u.prototype.not=a.prototype.not=function(){return this.negate().prev()},u.prototype.and=a.prototype.and=function(t){return P(this,t,(function(t,e){return t&e}))},u.prototype.or=a.prototype.or=function(t){return P(this,t,(function(t,e){return t|e}))},u.prototype.xor=a.prototype.xor=function(t){return P(this,t,(function(t,e){return t^e}))},u.prototype.bitLength=a.prototype.bitLength=function(){var t=this;return t.compareTo(e(0))<0&&(t=t.negate().subtract(e(1))),0===t.compareTo(e(0))?e(0):e(function t(r,n){if(n.compareTo(r)<=0){var i=t(r,n.square(n)),o=i.p,s=i.e,a=o.multiply(n);return a.compareTo(r)<=0?{p:a,e:2*s+1}:{p:o,e:2*s}}return{p:e(1),e:0}}(t,e(2)).e).add(e(1))};var F=function(t,e){for(var r=t.length,n=Math.abs(e),i=0;i=n){if("1"===c&&1===n)continue;throw new Error(c+" is not a valid digit in base "+e+".")}if(c.charCodeAt(0)-87>=n)throw new Error(c+" is not a valid digit in base "+e+".")}if(2<=e&&e<=36&&r<=o/Math.log(e)){var s=parseInt(t,e);if(isNaN(s))throw new Error(c+" is not a valid digit in base "+e+".");return new u(parseInt(t,e))}e=V(e);var a=[],h="-"===t[0];for(i=h?1:0;i"!==t[i]);a.push(V(t.slice(f+1,i)))}}return j(a,e,h)};function j(t,e,r){var n,i=s[0],o=s[1];for(n=t.length-1;n>=0;n--)i=i.add(t[n].times(o)),o=o.times(e);return r?i.negate():i}function K(t){return t<=35?"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t):"<"+t+">"}function z(t,r){if((r=e(r)).isZero()){if(t.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(r.equals(-1)){if(t.isZero())return{value:[0],isNegative:!1};if(t.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-t)).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var n=Array.apply(null,Array(+t-1)).map(Array.prototype.valueOf,[0,1]);return n.unshift([1]),{value:[].concat.apply([],n),isNegative:!1}}var i=!1;if(t.isNegative()&&r.isPositive()&&(i=!0,t=t.abs()),r.equals(1))return t.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(+t)).map(Number.prototype.valueOf,1),isNegative:i};for(var o,s=[],a=t;a.isNegative()||a.compareAbs(r)>=0;){o=a.divmod(r),a=o.quotient;var u=o.remainder;u.isNegative()&&(u=r.minus(u).abs(),a=a.next()),s.push(u.toJSNumber())}return s.push(a.toJSNumber()),{value:s.reverse(),isNegative:i}}function H(t,e){var r=z(t,e);return(r.isNegative?"-":"")+r.value.map(K).join("")}function q(t){if(h(+t)){var e=+t;if(e===p(e))return new u(e);throw new Error("Invalid integer: "+t)}var r="-"===t[0];r&&(t=t.slice(1));var n=t.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var i=n[1];if("+"===i[0]&&(i=i.slice(1)),(i=+i)!==p(i)||!h(i))throw new Error("Invalid integer: "+i+" is not a valid exponent.");var o=n[0],s=o.indexOf(".");if(s>=0&&(i-=o.length-s-1,o=o.slice(0,s)+o.slice(s+1)),i<0)throw new Error("Cannot include negative exponent part for integers");t=o+=new Array(i+1).join("0")}if(!/^([0-9][0-9]*)$/.test(t))throw new Error("Invalid integer: "+t);for(var c=[],l=t.length,d=l-7;l>0;)c.push(+t.slice(d,l)),(d-=7)<0&&(d=0),l-=7;return f(c),new a(c,r)}function V(t){return"number"==typeof t?function(t){if(h(t)){if(t!==p(t))throw new Error(t+" is not an integer.");return new u(t)}return q(t.toString())}(t):"string"==typeof t?q(t):t}a.prototype.toArray=function(t){return z(this,t)},u.prototype.toArray=function(t){return z(this,t)},a.prototype.toString=function(t){if(void 0===t&&(t=10),10!==t)return H(this,t);for(var e,r=this.value,n=r.length,i=String(r[--n]);--n>=0;)e=String(r[n]),i+="0000000".slice(e.length)+e;return(this.sign?"-":"")+i},u.prototype.toString=function(t){return void 0===t&&(t=10),10!=t?H(this,t):String(this.value)},a.prototype.toJSON=u.prototype.toJSON=function(){return this.toString()},a.prototype.toJSNumber=a.prototype.valueOf=function(){return parseInt(this.toString(),10)},u.prototype.toJSNumber=u.prototype.valueOf=function(){return this.value};for(var G=0;G<1e3;G++)s[G]=new u(G),G>0&&(s[-G]=new u(-G));return s.one=s[1],s.zero=s[0],s.minusOne=s[-1],s.max=U,s.min=L,s.gcd=D,s.lcm=function(t,e){return t=V(t).abs(),e=V(e).abs(),t.divide(D(t,e)).multiply(e)},s.isInstance=function(t){return t instanceof a||t instanceof u},s.randBetween=function(t,e){var n=L(t=V(t),e=V(e)),i=U(t,e).subtract(n).add(1);if(i.isSmall)return n.add(Math.floor(Math.random()*i));for(var o=[],s=!0,h=i.value.length-1;h>=0;h--){var c=s?i.value[h]:r,f=p(Math.random()*c);o.unshift(f),f=0;n--)if(r<4){var i=ae.indexOf(t[n])>>r,o=0;0!==n&&(o=ae.indexOf(t[n-1]));var s=1+r;r=s,e.unshift(se[i+(o%(1<>7!=0;)n+=7;return r}(new ge(n)).toString();r=t+String(i)+o}else{var s=ee.from([i]),a=me(ee.concat([s,n])),u=ee.concat([n,ee.from(a)]),h=N(u.toString("hex")),c=L(h).replace(/=/g,"").toLowerCase();r=String(t)+String(i)+c}return r}function be(t,e){var r=ee.from([t]),n=ee.concat([r,e]);return new ye(n)}var we=[BigInt(1),BigInt(2),BigInt(4),BigInt(8),BigInt(16),BigInt(32),BigInt(64),BigInt(128),BigInt(256),BigInt(512),BigInt(1024),BigInt(2048),BigInt(4096),BigInt(8192),BigInt(16384),BigInt(32768),BigInt(65536),BigInt(131072),BigInt(262144),BigInt(471693),BigInt(419994),BigInt(397615),BigInt(395339),BigInt(275453),BigInt(273067),BigInt(268625),BigInt(144334),BigInt(141953),BigInt(137544),BigInt(126816),BigInt(122570),BigInt(116281),BigInt(114136),BigInt(107829),BigInt(103596),BigInt(101446),BigInt(90923),BigInt(86683),BigInt(84547),BigInt(78212),BigInt(76098),BigInt(71873),BigInt(63506),BigInt(57383),BigInt(53262),BigInt(51260),BigInt(45085),BigInt(43057),BigInt(38955),BigInt(28724),BigInt(26666),BigInt(22553),BigInt(14343),BigInt(2002),BigInt(1831),BigInt(1678),BigInt(1660),BigInt(1437),BigInt(1259),BigInt(948),BigInt(874),BigInt(729),BigInt(455),BigInt(63)],Ee=function(t){this.codeword=t};function Ae(t,e){this.hi=t>>>0,this.lo=e>>>0}function ke(t,e){return new Ae(t,e)}function Se(){var t=arguments,e=t[0].hi,r=t[0].lo,n=t.length-1;do{e^=t[n].hi,r^=t[n].lo,n--}while(n>0);return new this.u64(e,r)}function Be(t,e,r,n,i){i|=0;for(var o=0;o>>3):0,r=new Array(e),n=0;n>>24,e[4*n+1]=(16711680&t[n])>>>16,e[4*n+2]=(65280&t[n])>>>8,e[4*n+3]=255&t[n],n++;return e}Ee.mainnet=new Ee(BigInt(0)),Ee.testnet=new Ee(BigInt(0x6834ba37b3980400)),Ee.emulator=new Ee(BigInt(0x1cb159857af02000)),Ae.prototype.set=function(t){this.lo=t.lo,this.hi=t.hi},Ae.prototype.add=function(t){var e,r,n,i;return i=(this.hi>>>16)+(t.hi>>>16)+((n=(65535&this.hi)+(65535&t.hi)+((r=(this.lo>>>16)+(t.lo>>>16)+((e=(65535&this.lo)+(65535&t.lo))>>>16))>>>16))>>>16),this.lo=r<<16|65535&e,this.hi=i<<16|65535&n,this},Ae.prototype.addOne=function(){-1===this.lo||4294967295===this.lo?(this.lo=0,this.hi++):this.lo++},Ae.prototype.plus=function(t){var e,r,n,i,o=new Ae(0,0);return i=(this.hi>>>16)+(t.hi>>>16)+((n=(65535&this.hi)+(65535&t.hi)+((r=(this.lo>>>16)+(t.lo>>>16)+((e=(65535&this.lo)+(65535&t.lo))>>>16))>>>16))>>>16),o.lo=r<<16|65535&e,o.hi=i<<16|65535&n,o},Ae.prototype.not=function(){return new Ae(~this.hi,~this.lo)},Ae.prototype.one=function(){return new Ae(0,1)},Ae.prototype.zero=function(){return new Ae(0,0)},Ae.prototype.neg=function(){return this.not().plus(this.one())},Ae.prototype.minus=function(t){return this.plus(t.neg())},Ae.prototype.isZero=function(){return 0===this.lo&&0===this.hi},Ae.prototype.multiply=function(t){if(this.isZero())return this.zero();var e;if(!0!==((e=t)&&e.__isLong__)&&(t=function(t){return isNaN(t)||!isFinite(t)?this.zero():new Ae(t%1|0,t/1|0)}(t)),t.isZero())return this.zero();var r=65535&this.hi,n=this.lo>>>16,i=65535&this.lo,o=65535&t.hi,s=t.lo>>>16,a=65535&t.lo,u=0,h=0,c=0,l=0;return c+=(l+=i*a)>>>16,h+=(c+=n*a)>>>16,c&=65535,h+=(c+=i*s)>>>16,u+=(h+=r*a)>>>16,h&=65535,u+=(h+=n*s)>>>16,h&=65535,u+=(h+=i*o)>>>16,u+=(this.hi>>>16)*a+r*s+n*o+i*(t.hi>>>16),new Ae((u&=65535)<<16|(h&=65535),(c&=65535)<<16|(l&=65535))},Ae.prototype.shiftLeft=function(t){t%=64;var e=new Ae(0,0);if(0===t)return this.clone();if(t>31)e.lo=0,e.hi=this.lo<>>32-t;e.lo=this.lo<63&&(t%=64),t>31)this.hi=this.lo<>>32-t;this.lo<<=t,this.hi=this.hi<=32)e.hi=0,e.lo=this.hi>>>t-32;else{var r=32-t,n=this.hi<>>r;e.hi=this.hi>>>t,e.lo=this.lo>>>t|n<32)return this.rotateRight(64-t);var e=new Ae(0,0);return 0===t?(e.lo=this.lo>>>0,e.hi=this.hi>>>0):32===t?(e.lo=this.hi,e.hi=this.lo):(e.lo=this.lo<>>32-t,e.hi=this.hi<>>32-t),e},Ae.prototype.setRotateLeft=function(t){return t>32?this.setRotateRight(64-t):(0===t||(32===t?(e=this.lo,this.lo=this.hi,this.hi=e):(e=this.hi<>>32-t,this.lo=this.lo<>>32-t,this.hi=e)),this);var e},Ae.prototype.rotateRight=function(t){if(t>32)return this.rotateLeft(64-t);var e=new Ae(0,0);return 0===t?(e.lo=this.lo>>>0,e.hi=this.hi>>>0):32===t?(e.lo=this.hi,e.hi=this.lo):(e.lo=this.hi<<32-t|this.lo>>>t,e.hi=this.lo<<32-t|this.hi>>>t),e},Ae.prototype.setFlip=function(){var t;return t=this.lo,this.lo=this.hi,this.hi=t,this},Ae.prototype.setRotateRight=function(t){return t>32?this.setRotateLeft(64-t):(0===t||(32===t?(e=this.lo,this.lo=this.hi,this.hi=e):(newHigh=this.lo<<32-t|this.hi>>>t,this.lo=this.hi<<32-t|this.lo>>>t,this.hi=newHigh)),this);var e},Ae.prototype.xor=function(t){var e=new Ae(0,0);return e.hi=this.hi^t.hi,e.lo=this.lo^t.lo,e},Ae.prototype.setxorOne=function(t){return this.hi^=t.hi,this.lo^=t.lo,this},Ae.prototype.and=function(t){var e=new Ae(0,0);return e.hi=this.hi&t.hi,e.lo=this.lo&t.lo,e},Ae.prototype.clone=function(){return new Ae(this.hi,this.lo)},Ae.prototype.setxor64=function(){for(var t=arguments,e=t.length;e--;)this.hi^=t[e].hi,this.lo^=t[e].lo;return this};var Ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Me(t){var e,r,n,i,o,s,a=[],u=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");u>2,r=(3&o)<<6|(s=Ie.indexOf(t.charAt(u++))),a.push(n<<2|i>>4),64!==o&&a.push(e),64!==s&&a.push(r);return a}var Te=xe(Me("xjL0pfSXpcb4b5eEl+uE+O5esJmwx5nu9nqMjYz3jfb/6BcNF+UN/9YK3L3ct73W3hbIscinsd6RbfxU/DlUkWCQ8FDwwFBgAgcFAwUEAwLOLuCp4IepzlbRh32HrH1W58wrGSvVGee1E6ZipnFitU18MeYxmuZN7Fm1mrXDmuyPQM9FzwVFjx+jvJ28Pp0fiUnAQMAJQIn6aJKHku+H+u/QPxU/xRXvspQm6yZ/67KOzkDJQAfJjvvmHQsd7Qv7QW4v7C+C7EGzGqlnqX1ns19DHP0cvv1fRWAl6iWK6kUj+dq/2ka/I1NRAvcCpvdT5EWhlqHTluSbdu1b7S1bm3UoXcJd6sJ14cUkHCTZHOE91Omu6XquPUzyvmq+mGpMbILuWu7YWmx+vcNBw/xBfvXzBgIG8QL1g1LRT9EdT4NojORc5NBcaFFWB/QHovRR0Y1cNFy5NNH54RgIGOkI+eJMrpOu35Piqz6Vc5VNc6til/VT9cRTYiprQT9BVD8qCBwUDBQQDAiVY/ZS9jFSlUbpr2WvjGVGnX/iXuIhXp0wSHgoeGAoMDfP+KH4bqE3ChsRDxEUDwov68S1xF61Lw4VGwkbHAkOJH5aNlpINiQbrbabtjabG9+YRz1HpT3fzadqJmqBJs1O9btpu5xpTn8zTM1M/s1/6lC6n7rPn+oSPy0bLSQbEh2kuZ65Op4dWMScdJywdFg0RnIucmguNDZBdy13bC023BHNss2jsty0nSnuKXPutFtNFvsWtvtbpKUB9gFT9qR2oddN1+xNdrcUo2GjdWG3fTRJzkn6zn1S3417jaR7Ut2fQj5CoT7dXs2TcZO8cV4TsaKXoiaXE6aiBPUEV/WmuQG4aLhpaLkAAAAAAAAAAMG1dCx0mSzBQOCgYKCAYEDjwiEfId0f43k6Q8hD8sh5tpos7Sx37bbUDdm+2bO+1I1HykbKAUaNZxdw2XDO2Wdyr91L3eRLcpTted55M96UmP9n1Gcr1JiwkyPoI3vosIVb3kreEUqFuwa9a71ta7vFu34qfpEqxU97NOU0nuVP7dc6FjrBFu2G0lTFVBfFhpr4YtdiL9eaZpn/Vf/MVWYRtqeUpyKUEYrASs9KD8+K6dkwEDDJEOkEDgoGCggGBP5mmIGY54H+oKsL8Atb8KB4tMxEzPBEeCXw1brVSrolS3U+4z6W40uirA7zDl/zol1EGf4Zuv5dgNtbwFsbwIAFgIWKhQqKBT/T7K3sfq0/If7fvN9CvCFwqNhI2OBIcPH9DAQM+QTxYxl633rG32N3L1jBWO7Bd68wn3WfRXWvQuelY6WEY0IgcFAwUEAwIOXLLhou0Rrl/e8SDhLhDv2/CLdtt2Vtv4FV1EzUGUyBGCQ8FDwwFBgmeV81X0w1JsOycS9xnS/DvoY44Thn4b41yP2i/WqiNYjHT8xPC8yILmVLOUtcOS6TavlX+T1Xk1VYDfINqvJV/GGdgp3jgvx6s8lHyfRHesgn76zvi6zIuogy5zJv57oyT30rfWQrMuZCpJWk15XmwDv7oPuboMAZqrOYszKYGZ72aNFoJ9GeoyKBf4Fdf6NE7qpmqohmRFTWgn6CqH5UO93mq+Z2qzsLlZ6DnhaDC4zJRcpFA8qMx7x7KXuVKcdrBW7TbtbTayhsRDxEUDwopyyLeYtVeae8gT3iPWPivBYxJx0nLB0WrTeadppBdq3blk07Ta0722Se+lb6yFZkdKbSTtLoTnQUNiIeIigeFJLkdtt2P9uSDBIeCh4YCgxI/LRstJBsSLiPN+Q3a+S4n3jnXeclXZ+9D7JusmFuvUNpKu8qhu9DxDXxpvGTpsQ52uOo43KoOTHG96T3YqQx04pZN1m9N9PydIaLhv+L8tWDVjJWsTLVi07FQ8UNQ4tuhetZ69xZbtoYwrfCr7faAY6PjI8CjAGxHaxkrHlksZzxbdJtI9KcSXI74DuS4EnYH8e0x6u02Ky5FfoVQ/qs8/oJBwn9B/PPoG8lb4Ulz8og6q/qj6/K9H2JjonzjvRHZyDpII7pRxA4KBgoIBgQbwtk1WTe1W/wc4OIg/uI8Er7sW+xlG9KXMqWcpa4clw4VGwkbHAkOFdfCPEIrvFXcyFSx1Lmx3OXZPNR8zVRl8uuZSNljSPLoSWEfIRZfKHoV7+cv8uc6D5dYyFjfCE+lup83Xw33ZZhHn/cf8LcYQ2ckYaRGoYND5uUhZQehQ/gS6uQq9uQ4Hy6xkLG+EJ8cSZXxFfixHHMKeWq5YOqzJDjc9hzO9iQBgkPBQ8MBQb39AMBA/UB9xwqNhI2OBIcwjz+o/6fo8Jqi+Ff4dRfaq6+EPkQR/muaQJr0GvS0GkXv6iRqC6RF5lx6FjoKViZOlNpJ2l0Jzon99C50E65J9mRSDhIqTjZ6941EzXNE+sr5c6zzlazKyJ3VTNVRDMi0gTWu9a/u9KpOZBwkElwqQeHgImADokHM8Hyp/JmpzMt7MG2wVq2LTxaZiJmeCI8Fbitkq0qkhXJqWAgYIkgyYdc20nbFUmHqrAa/xpP/6pQ2Ih4iKB4UKUrjnqOUXqlA4mKj4oGjwNZShP4E7L4WQmSm4CbEoAJGiM5Fzk0FxplEHXadcraZdeEUzFTtTHXhNVRxlETxoTQA9O407u40ILcXsNeH8OCKeLLsMtSsClaw5l3mbR3Wh4tMxEzPBEeez1Gy0b2y3uotx/8H0v8qG0MYdZh2tZtLGJOOk5YOiw=")),Oe=xe(Me("xsYy9KX0l6X4+G+XhJfrhO7uXrCZsMeZ9vZ6jI2M943//+gXDRflDdbWCty93Le93t4WyLHIp7GRkW38VPw5VGBgkPBQ8MBQAgIHBQMFBAPOzi7gqeCHqVZW0Yd9h6x95+fMKxkr1Rm1tROmYqZxYk1NfDHmMZrm7OxZtZq1w5qPj0DPRc8FRR8fo7ydvD6diYlJwEDACUD6+miSh5Lvh+/v0D8VP8UVsrKUJusmf+uOjs5AyUAHyfv75h0LHe0LQUFuL+wvguyzsxqpZ6l9Z19fQxz9HL79RUVgJeoliuojI/nav9pGv1NTUQL3Aqb35ORFoZah05abm3btW+0tW3V1KF3CXerC4eHFJBwk2Rw9PdTprul6rkxM8r5qvphqbGyC7lru2Fp+fr3DQcP8QfX18wYCBvECg4NS0U/RHU9oaIzkXOTQXFFRVgf0B6L00dGNXDRcuTT5+eEYCBjpCOLiTK6Trt+Tq6s+lXOVTXNiYpf1U/XEUyoqa0E/QVQ/CAgcFAwUEAyVlWP2UvYxUkZG6a9lr4xlnZ1/4l7iIV4wMEh4KHhgKDc3z/ih+G6hCgobEQ8RFA8vL+vEtcRetQ4OFRsJGxwJJCR+WjZaSDYbG622m7Y2m9/fmEc9R6U9zc2naiZqgSZOTvW7abucaX9/M0zNTP7N6upQup+6z58SEj8tGy0kGx0dpLmeuTqeWFjEnHScsHQ0NEZyLnJoLjY2QXctd2wt3NwRzbLNo7K0tJ0p7ilz7ltbTRb7Frb7pKSlAfYBU/Z2dqHXTdfsTbe3FKNho3VhfX00Sc5J+s5SUt+Ne42ke93dn0I+QqE+Xl7Nk3GTvHETE7Gil6Iml6amogT1BFf1ubkBuGi4aWgAAAAAAAAAAMHBtXQsdJksQEDgoGCggGDj48IhHyHdH3l5OkPIQ/LItraaLO0sd+3U1A3Zvtmzvo2NR8pGygFGZ2cXcNlwztlycq/dS93kS5SU7XneeTPemJj/Z9RnK9SwsJMj6CN76IWFW95K3hFKu7sGvWu9bWvFxbt+Kn6RKk9PezTlNJ7l7e3XOhY6wRaGhtJUxVQXxZqa+GLXYi/XZmaZ/1X/zFUREbanlKcilIqKwErPSg/P6enZMBAwyRAEBA4KBgoIBv7+ZpiBmOeBoKCrC/ALW/B4eLTMRMzwRCUl8NW61Uq6S0t1PuM+luOioqwO8w5f811dRBn+Gbr+gIDbW8BbG8AFBYCFioUKij8/0+yt7H6tISH+37zfQrxwcKjYSNjgSPHx/QwEDPkEY2MZet96xt93dy9YwVjuwa+vMJ91n0V1QkLnpWOlhGMgIHBQMFBAMOXlyy4aLtEa/f3vEg4S4Q6/vwi3bbdlbYGBVdRM1BlMGBgkPBQ8MBQmJnlfNV9MNcPDsnEvcZ0vvr6GOOE4Z+E1Ncj9ov1qooiIx0/MTwvMLi5lSzlLXDmTk2r5V/k9V1VVWA3yDary/PxhnYKd44J6erPJR8n0R8jIJ++s74usurqIMucyb+cyMk99K31kK+bmQqSVpNeVwMA7+6D7m6AZGaqzmLMymJ6e9mjRaCfRo6MigX+BXX9ERO6qZqqIZlRU1oJ+gqh+Ozvd5qvmdqsLC5Weg54Wg4yMyUXKRQPKx8e8eyl7lSlrawVu027W0ygobEQ8RFA8p6csi3mLVXm8vIE94j1j4hYWMScdJywdra03mnaaQXbb25ZNO02tO2RknvpW+shWdHSm0k7S6E4UFDYiHiIoHpKS5Hbbdj/bDAwSHgoeGApISPy0bLSQbLi4jzfkN2vkn594513nJV29vQ+ybrJhbkNDaSrvKobvxMQ18abxk6Y5OdrjqONyqDExxvek92Kk09OKWTdZvTfy8nSGi4b/i9XVg1YyVrEyi4tOxUPFDUNuboXrWevcWdraGMK3wq+3AQGOj4yPAoyxsR2sZKx5ZJyc8W3SbSPSSUlyO+A7kuDY2B/HtMertKysuRX6FUP68/P6CQcJ/QfPz6BvJW+FJcrKIOqv6o+v9PR9iY6J845HR2cg6SCO6RAQOCgYKCAYb28LZNVk3tXw8HODiIP7iEpK+7FvsZRvXFzKlnKWuHI4OFRsJGxwJFdXXwjxCK7xc3MhUsdS5seXl2TzUfM1UcvLrmUjZY0joaElhHyEWXzo6Fe/nL/LnD4+XWMhY3whlpbqfN18N91hYR5/3H/C3A0NnJGGkRqGDw+blIWUHoXg4EurkKvbkHx8usZCxvhCcXEmV8RX4sTMzCnlquWDqpCQ43PYczvYBgYJDwUPDAX39/QDAQP1ARwcKjYSNjgSwsI8/qP+n6NqaovhX+HUX66uvhD5EEf5aWkCa9Br0tAXF7+okagukZmZcehY6ClYOjpTaSdpdCcnJ/fQudBOudnZkUg4SKk46+veNRM1zRMrK+XOs85WsyIid1UzVUQz0tIE1rvWv7upqTmQcJBJcAcHh4CJgA6JMzPB8qfyZqctLezBtsFatjw8WmYiZngiFRW4rZKtKpLJyalgIGCJIIeHXNtJ2xVJqqqwGv8aT/9QUNiIeIigeKWlK456jlF6AwOJio+KBo9ZWUoT+BOy+AkJkpuAmxKAGhojORc5NBdlZRB12nXK2tfXhFMxU7UxhITVUcZRE8bQ0APTuNO7uIKC3F7DXh/DKSniy7DLUrBaWsOZd5m0dx4eLTMRMzwRe3s9RstG9suoqLcf/B9L/G1tDGHWYdrWLCxiTjpOWDo=")),Re=xe(Me("pcbGMvSl9JeE+Phvl4SX65nu7l6wmbDHjfb2eoyNjPcN///oFw0X5b3W1grcvdy3sd7eFsixyKdUkZFt/FT8OVBgYJDwUPDAAwICBwUDBQSpzs4u4Kngh31WVtGHfYesGefnzCsZK9VitbUTpmKmceZNTXwx5jGamuzsWbWatcNFj49Az0XPBZ0fH6O8nbw+QImJScBAwAmH+vpokoeS7xXv79A/FT/F67KylCbrJn/Jjo7OQMlABwv7++YdCx3t7EFBbi/sL4Jns7MaqWepff1fX0Mc/Ry+6kVFYCXqJYq/IyP52r/aRvdTU1EC9wKmluTkRaGWodNbm5t27VvtLcJ1dShdwl3qHOHhxSQcJNmuPT3U6a7pempMTPK+ar6YWmxsgu5a7thBfn69w0HD/AL19fMGAgbxT4ODUtFP0R1caGiM5Fzk0PRRUVYH9AeiNNHRjVw0XLkI+fnhGAgY6ZPi4kyuk67fc6urPpVzlU1TYmKX9VP1xD8qKmtBP0FUDAgIHBQMFBBSlZVj9lL2MWVGRumvZa+MXp2df+Je4iEoMDBIeCh4YKE3N8/4ofhuDwoKGxEPERS1Ly/rxLXEXgkODhUbCRscNiQkflo2WkibGxuttpu2Nj3f35hHPUelJs3Np2omaoFpTk71u2m7nM1/fzNMzUz+n+rqULqfus8bEhI/LRstJJ4dHaS5nrk6dFhYxJx0nLAuNDRGci5yaC02NkF3LXdsstzcEc2yzaPutLSdKe4pc/tbW00W+xa29qSkpQH2AVNNdnah103X7GG3txSjYaN1zn19NEnOSfp7UlLfjXuNpD7d3Z9CPkKhcV5ezZNxk7yXExOxopeiJvWmpqIE9QRXaLm5AbhouGkAAAAAAAAAACzBwbV0LHSZYEBA4KBgoIAf4+PCIR8h3ch5eTpDyEPy7ba2miztLHe+1NQN2b7Zs0aNjUfKRsoB2WdnF3DZcM5LcnKv3Uvd5N6UlO153nkz1JiY/2fUZyvosLCTI+gje0qFhVveSt4Ra7u7Br1rvW0qxcW7fip+keVPT3s05TSeFu3t1zoWOsHFhobSVMVUF9eamvhi12IvVWZmmf9V/8yUERG2p5SnIs+KisBKz0oPEOnp2TAQMMkGBAQOCgYKCIH+/maYgZjn8KCgqwvwC1tEeHi0zETM8LolJfDVutVK40tLdT7jPpbzoqKsDvMOX/5dXUQZ/hm6wICA21vAWxuKBQWAhYqFCq0/P9Psrex+vCEh/t+830JIcHCo2EjY4ATx8f0MBAz532NjGXrfesbBd3cvWMFY7nWvrzCfdZ9FY0JC56VjpYQwICBwUDBQQBrl5csuGi7RDv397xIOEuFtv78It223ZUyBgVXUTNQZFBgYJDwUPDA1JiZ5XzVfTC/Dw7JxL3Gd4b6+hjjhOGeiNTXI/aL9asyIiMdPzE8LOS4uZUs5S1xXk5Nq+Vf5PfJVVVgN8g2qgvz8YZ2CneNHenqzyUfJ9KzIyCfvrO+L57q6iDLnMm8rMjJPfSt9ZJXm5kKklaTXoMDAO/ug+5uYGRmqs5izMtGenvZo0Wgnf6OjIoF/gV1mRETuqmaqiH5UVNaCfoKoqzs73ear5naDCwuVnoOeFsqMjMlFykUDKcfHvHspe5XTa2sFbtNu1jwoKGxEPERQeaenLIt5i1XivLyBPeI9Yx0WFjEnHScsdq2tN5p2mkE729uWTTtNrVZkZJ76VvrITnR0ptJO0ugeFBQ2Ih4iKNuSkuR223Y/CgwMEh4KHhhsSEj8tGy0kOS4uI835DdrXZ+feOdd5yVuvb0Psm6yYe9DQ2kq7yqGpsTENfGm8ZOoOTna46jjcqQxMcb3pPdiN9PTilk3Wb2L8vJ0houG/zLV1YNWMlaxQ4uLTsVDxQ1Zbm6F61nr3Lfa2hjCt8KvjAEBjo+MjwJksbEdrGSsedKcnPFt0m0j4ElJcjvgO5K02Ngfx7THq/qsrLkV+hVDB/Pz+gkHCf0lz8+gbyVvha/KyiDqr+qPjvT0fYmOifPpR0dnIOkgjhgQEDgoGCgg1W9vC2TVZN6I8PBzg4iD+29KSvuxb7GUclxcypZylrgkODhUbCRscPFXV18I8Qiux3NzIVLHUuZRl5dk81HzNSPLy65lI2WNfKGhJYR8hFmc6OhXv5y/yyE+Pl1jIWN83ZaW6nzdfDfcYWEef9x/woYNDZyRhpEahQ8Pm5SFlB6Q4OBLq5Cr20J8fLrGQsb4xHFxJlfEV+KqzMwp5arlg9iQkONz2HM7BQYGCQ8FDwwB9/f0AwED9RIcHCo2EjY4o8LCPP6j/p9famqL4V/h1Pmurr4Q+RBH0GlpAmvQa9KRFxe/qJGoLliZmXHoWOgpJzo6U2knaXS5Jyf30LnQTjjZ2ZFIOEipE+vr3jUTNc2zKyvlzrPOVjMiIndVM1VEu9LSBNa71r9wqak5kHCQSYkHB4eAiYAOpzMzwfKn8ma2LS3swbbBWiI8PFpmImZ4khUVuK2SrSogycmpYCBgiUmHh1zbSdsV/6qqsBr/Gk94UFDYiHiIoHqlpSuOeo5RjwMDiYqPigb4WVlKE/gTsoAJCZKbgJsSFxoaIzkXOTTaZWUQddp1yjHX14RTMVO1xoSE1VHGURO40NAD07jTu8OCgtxew14fsCkp4suwy1J3WlrDmXeZtBEeHi0zETM8y3t7PUbLRvb8qKi3H/wfS9ZtbQxh1mHaOiwsYk46Tlg=")),_e=xe(Me("l6XGxjL0pfTrhPj4b5eEl8eZ7u5esJmw94329nqMjYzlDf//6BcNF7e91tYK3L3cp7He3hbIscg5VJGRbfxU/MBQYGCQ8FDwBAMCAgcFAwWHqc7OLuCp4Kx9VlbRh32H1Rnn58wrGStxYrW1E6ZipprmTU18MeYxw5rs7Fm1mrUFRY+PQM9Fzz6dHx+jvJ28CUCJiUnAQMDvh/r6aJKHksUV7+/QPxU/f+uyspQm6yYHyY6OzkDJQO0L+/vmHQsdguxBQW4v7C99Z7OzGqlnqb79X19DHP0ciupFRWAl6iVGvyMj+dq/2qb3U1NRAvcC05bk5EWhlqEtW5ubdu1b7erCdXUoXcJd2Rzh4cUkHCR6rj091Omu6ZhqTEzyvmq+2FpsbILuWu78QX5+vcNBw/EC9fXzBgIGHU+Dg1LRT9HQXGhojORc5KL0UVFWB/QHuTTR0Y1cNFzpCPn54RgIGN+T4uJMrpOuTXOrqz6Vc5XEU2Jil/VT9VQ/KiprQT9BEAwICBwUDBQxUpWVY/ZS9oxlRkbpr2WvIV6dnX/iXuJgKDAwSHgoeG6hNzfP+KH4FA8KChsRDxFetS8v68S1xBwJDg4VGwkbSDYkJH5aNlo2mxsbrbabtqU939+YRz1HgSbNzadqJmqcaU5O9btpu/7Nf38zTM1Mz5/q6lC6n7okGxISPy0bLTqeHR2kuZ65sHRYWMScdJxoLjQ0RnIucmwtNjZBdy13o7Lc3BHNss1z7rS0nSnuKbb7W1tNFvsWU/akpKUB9gHsTXZ2oddN13Vht7cUo2Gj+s59fTRJzkmke1JS3417jaE+3d2fQj5CvHFeXs2TcZMmlxMTsaKXolf1pqaiBPUEaWi5uQG4aLgAAAAAAAAAAJkswcG1dCx0gGBAQOCgYKDdH+PjwiEfIfLIeXk6Q8hDd+22tpos7SyzvtTUDdm+2QFGjY1HykbKztlnZxdw2XDkS3Jyr91L3TPelJTted55K9SYmP9n1Gd76LCwkyPoIxFKhYVb3krebWu7uwa9a72RKsXFu34qfp7lT097NOU0wRbt7dc6FjoXxYaG0lTFVC/Xmpr4YtdizFVmZpn/Vf8ilBERtqeUpw/PiorASs9KyRDp6dkwEDAIBgQEDgoGCueB/v5mmIGYW/CgoKsL8AvwRHh4tMxEzEq6JSXw1brVluNLS3U+4z5f86KirA7zDrr+XV1EGf4ZG8CAgNtbwFsKigUFgIWKhX6tPz/T7K3sQrwhIf7fvN/gSHBwqNhI2PkE8fH9DAQMxt9jYxl633ruwXd3L1jBWEV1r68wn3WfhGNCQuelY6VAMCAgcFAwUNEa5eXLLhou4Q79/e8SDhJlbb+/CLdttxlMgYFV1EzUMBQYGCQ8FDxMNSYmeV81X50vw8OycS9xZ+G+voY44ThqojU1yP2i/QvMiIjHT8xPXDkuLmVLOUs9V5OTavlX+aryVVVYDfIN44L8/GGdgp30R3p6s8lHyYusyMgn76zvb+e6uogy5zJkKzIyT30rfdeV5uZCpJWkm6DAwDv7oPsymBkZqrOYsyfRnp72aNFoXX+joyKBf4GIZkRE7qpmqqh+VFTWgn6Cdqs7O93mq+YWgwsLlZ6DngPKjIzJRcpFlSnHx7x7KXvW02trBW7TblA8KChsRDxEVXmnpyyLeYtj4ry8gT3iPSwdFhYxJx0nQXatrTeadpqtO9vblk07TchWZGSe+lb66E50dKbSTtIoHhQUNiIeIj/bkpLkdtt2GAoMDBIeCh6QbEhI/LRstGvkuLiPN+Q3JV2fn3jnXedhbr29D7JusobvQ0NpKu8qk6bExDXxpvFyqDk52uOo42KkMTHG96T3vTfT04pZN1n/i/LydIaLhrEy1dWDVjJWDUOLi07FQ8XcWW5uhetZ66+32toYwrfCAowBAY6PjI95ZLGxHaxkrCPSnJzxbdJtkuBJSXI74DurtNjYH8e0x0P6rKy5FfoV/Qfz8/oJBwmFJc/PoG8lb4+vysog6q/q84709H2JjomO6UdHZyDpICAYEBA4KBgo3tVvbwtk1WT7iPDwc4OIg5RvSkr7sW+xuHJcXMqWcpZwJDg4VGwkbK7xV1dfCPEI5sdzcyFSx1I1UZeXZPNR840jy8uuZSNlWXyhoSWEfITLnOjoV7+cv3whPj5dYyFjN92Wlup83XzC3GFhHn/cfxqGDQ2ckYaRHoUPD5uUhZTbkODgS6uQq/hCfHy6xkLG4sRxcSZXxFeDqszMKeWq5TvYkJDjc9hzDAUGBgkPBQ/1Aff39AMBAzgSHBwqNhI2n6PCwjz+o/7UX2pqi+Ff4Uf5rq6+EPkQ0tBpaQJr0GsukRcXv6iRqClYmZlx6FjodCc6OlNpJ2lOuScn99C50Kk42dmRSDhIzRPr6941EzVWsysr5c6zzkQzIiJ3VTNVv7vS0gTWu9ZJcKmpOZBwkA6JBweHgImAZqczM8Hyp/Jati0t7MG2wXgiPDxaZiJmKpIVFbitkq2JIMnJqWAgYBVJh4dc20nbT/+qqrAa/xqgeFBQ2Ih4iFF6paUrjnqOBo8DA4mKj4qy+FlZShP4ExKACQmSm4CbNBcaGiM5FznK2mVlEHXadbUx19eEUzFTE8aEhNVRxlG7uNDQA9O40x/DgoLcXsNeUrApKeLLsMu0d1paw5l3mTwRHh4tMxEz9st7ez1Gy0ZL/Kiotx/8H9rWbW0MYdZhWDosLGJOOk4=")),Pe=xe(Me("9JelxsYy9KWX64T4+G+XhLDHme7uXrCZjPeN9vZ6jI0X5Q3//+gXDdy3vdbWCty9yKex3t4WyLH8OVSRkW38VPDAUGBgkPBQBQQDAgIHBQPgh6nOzi7gqYesfVZW0Yd9K9UZ5+fMKxmmcWK1tROmYjGa5k1NfDHmtcOa7OxZtZrPBUWPj0DPRbw+nR8fo7ydwAlAiYlJwECS74f6+miShz/FFe/v0D8VJn/rsrKUJutAB8mOjs5AyR3tC/v75h0LL4LsQUFuL+ypfWezsxqpZxy+/V9fQxz9JYrqRUVgJeraRr8jI/navwKm91NTUQL3odOW5ORFoZbtLVubm3btW13qwnV1KF3CJNkc4eHFJBzpeq49PdTprr6YakxM8r5q7thabGyC7lrD/EF+fr3DQQbxAvX18wYC0R1Pg4NS0U/k0FxoaIzkXAei9FFRVgf0XLk00dGNXDQY6Qj5+eEYCK7fk+LiTK6TlU1zq6s+lXP1xFNiYpf1U0FUPyoqa0E/FBAMCAgcFAz2MVKVlWP2Uq+MZUZG6a9l4iFenZ1/4l54YCgwMEh4KPhuoTc3z/ihERQPCgobEQ/EXrUvL+vEtRscCQ4OFRsJWkg2JCR+Wja2NpsbG622m0elPd/fmEc9aoEmzc2naia7nGlOTvW7aUz+zX9/M0zNus+f6upQup8tJBsSEj8tG7k6nh0dpLmenLB0WFjEnHRyaC40NEZyLndsLTY2QXctzaOy3NwRzbIpc+60tJ0p7ha2+1tbTRb7AVP2pKSlAfbX7E12dqHXTaN1Ybe3FKNhSfrOfX00Sc6NpHtSUt+Ne0KhPt3dn0I+k7xxXl7Nk3GiJpcTE7GilwRX9aamogT1uGloubkBuGgAAAAAAAAAAHSZLMHBtXQsoIBgQEDgoGAh3R/j48IhH0PyyHl5OkPILHfttraaLO3Zs77U1A3ZvsoBRo2NR8pGcM7ZZ2cXcNnd5Etycq/dS3kz3pSU7XneZyvUmJj/Z9Qje+iwsJMj6N4RSoWFW95KvW1ru7sGvWt+kSrFxbt+KjSe5U9PezTlOsEW7e3XOhZUF8WGhtJUxWIv15qa+GLX/8xVZmaZ/1WnIpQREbanlEoPz4qKwErPMMkQ6enZMBAKCAYEBA4KBpjngf7+ZpiBC1vwoKCrC/DM8ER4eLTMRNVKuiUl8NW6PpbjS0t1PuMOX/OioqwO8xm6/l1dRBn+WxvAgIDbW8CFCooFBYCFiux+rT8/0+yt30K8ISH+37zY4EhwcKjYSAz5BPHx/QwEesbfY2MZet9Y7sF3dy9YwZ9Fda+vMJ91pYRjQkLnpWNQQDAgIHBQMC7RGuXlyy4aEuEO/f3vEg63ZW2/vwi3bdQZTIGBVdRMPDAUGBgkPBRfTDUmJnlfNXGdL8PDsnEvOGfhvr6GOOH9aqI1Ncj9ok8LzIiIx0/MS1w5Li5lSzn5PVeTk2r5Vw2q8lVVWA3yneOC/PxhnYLJ9Ed6erPJR++LrMjIJ++sMm/nurqIMud9ZCsyMk99K6TXlebmQqSV+5ugwMA7+6CzMpgZGaqzmGgn0Z6e9mjRgV1/o6MigX+qiGZERO6qZoKoflRU1oJ+5narOzvd5queFoMLC5Weg0UDyoyMyUXKe5Upx8e8eylu1tNrawVu00RQPCgobEQ8i1V5p6csi3k9Y+K8vIE94icsHRYWMScdmkF2ra03mnZNrTvb25ZNO/rIVmRknvpW0uhOdHSm0k4iKB4UFDYiHnY/25KS5HbbHhgKDAwSHgq0kGxISPy0bDdr5Li4jzfk5yVdn594512yYW69vQ+ybiqG70NDaSrv8ZOmxMQ18abjcqg5OdrjqPdipDExxvekWb0309OKWTeG/4vy8nSGi1axMtXVg1YyxQ1Di4tOxUPr3FluboXrWcKvt9raGMK3jwKMAQGOj4yseWSxsR2sZG0j0pyc8W3SO5LgSUlyO+DHq7TY2B/HtBVD+qysuRX6Cf0H8/P6CQdvhSXPz6BvJeqPr8rKIOqvifOO9PR9iY4gjulHR2cg6SggGBAQOCgYZN7Vb28LZNWD+4jw8HODiLGUb0pK+7FvlrhyXFzKlnJscCQ4OFRsJAiu8VdXXwjxUubHc3MhUsfzNVGXl2TzUWWNI8vLrmUjhFl8oaElhHy/y5zo6Fe/nGN8IT4+XWMhfDfdlpbqfN1/wtxhYR5/3JEahg0NnJGGlB6FDw+blIWr25Dg4EurkMb4Qnx8usZCV+LEcXEmV8Tlg6rMzCnlqnM72JCQ43PYDwwFBgYJDwUD9QH39/QDATY4EhwcKjYS/p+jwsI8/qPh1F9qaovhXxBH+a6uvhD5a9LQaWkCa9CoLpEXF7+okegpWJmZcehYaXQnOjpTaSfQTrknJ/fQuUipONnZkUg4Nc0T6+veNRPOVrMrK+XOs1VEMyIid1Uz1r+70tIE1ruQSXCpqTmQcIAOiQcHh4CJ8manMzPB8qfBWrYtLezBtmZ4Ijw8WmYirSqSFRW4rZJgiSDJyalgINsVSYeHXNtJGk//qqqwGv+IoHhQUNiIeI5ReqWlK456igaPAwOJio8TsvhZWUoT+JsSgAkJkpuAOTQXGhojORd1ytplZRB12lO1MdfXhFMxURPGhITVUcbTu7jQ0APTuF4fw4KC3F7Dy1KwKSniy7CZtHdaWsOZdzM8ER4eLTMRRvbLe3s9RssfS/yoqLcf/GHa1m1tDGHWTlg6LCxiTjo=")),Ne=xe(Me("pfSXpcbGMvSEl+uE+Phvl5mwx5nu7l6wjYz3jfb2eowNF+UN///oF73ct73W1grcscinsd7eFshU/DlUkZFt/FDwwFBgYJDwAwUEAwICBwWp4Iepzs4u4H2HrH1WVtGHGSvVGefnzCtipnFitbUTpuYxmuZNTXwxmrXDmuzsWbVFzwVFj49Az528Pp0fH6O8QMAJQImJScCHku+H+vpokhU/xRXv79A/6yZ/67KylCbJQAfJjo7OQAsd7Qv7++Yd7C+C7EFBbi9nqX1ns7Maqf0cvv1fX0Mc6iWK6kVFYCW/2ka/IyP52vcCpvdTU1EClqHTluTkRaFb7S1bm5t27cJd6sJ1dShdHCTZHOHhxSSu6XquPT3U6Wq+mGpMTPK+Wu7YWmxsgu5Bw/xBfn69wwIG8QL19fMGT9EdT4ODUtFc5NBcaGiM5PQHovRRUVYHNFy5NNHRjVwIGOkI+fnhGJOu35Pi4kyuc5VNc6urPpVT9cRTYmKX9T9BVD8qKmtBDBQQDAgIHBRS9jFSlZVj9mWvjGVGRumvXuIhXp2df+IoeGAoMDBIeKH4bqE3N8/4DxEUDwoKGxG1xF61Ly/rxAkbHAkODhUbNlpINiQkflqbtjabGxuttj1HpT3f35hHJmqBJs3Np2ppu5xpTk71u81M/s1/fzNMn7rPn+rqULobLSQbEhI/LZ65Op4dHaS5dJywdFhYxJwucmguNDRGci13bC02NkF3ss2jstzcEc3uKXPutLSdKfsWtvtbW00W9gFT9qSkpQFN1+xNdnah12GjdWG3txSjzkn6zn19NEl7jaR7UlLfjT5CoT7d3Z9CcZO8cV5ezZOXoiaXExOxovUEV/WmpqIEaLhpaLm5AbgAAAAAAAAAACx0mSzBwbV0YKCAYEBA4KAfId0f4+PCIchD8sh5eTpD7Sx37ba2miy+2bO+1NQN2UbKAUaNjUfK2XDO2WdnF3BL3eRLcnKv3d55M96UlO151Gcr1JiY/2foI3vosLCTI0reEUqFhVvea71ta7u7Br0qfpEqxcW7fuU0nuVPT3s0FjrBFu3t1zrFVBfFhobSVNdiL9eamvhiVf/MVWZmmf+UpyKUERG2p89KD8+KisBKEDDJEOnp2TAGCggGBAQOCoGY54H+/maY8Atb8KCgqwtEzPBEeHi0zLrVSrolJfDV4z6W40tLdT7zDl/zoqKsDv4Zuv5dXUQZwFsbwICA21uKhQqKBQWAha3sfq0/P9PsvN9CvCEh/t9I2OBIcHCo2AQM+QTx8f0M33rG32NjGXrBWO7Bd3cvWHWfRXWvrzCfY6WEY0JC56UwUEAwICBwUBou0Rrl5csuDhLhDv397xJtt2Vtv78It0zUGUyBgVXUFDwwFBgYJDw1X0w1JiZ5Xy9xnS/Dw7Jx4Thn4b6+hjii/WqiNTXI/cxPC8yIiMdPOUtcOS4uZUtX+T1Xk5Nq+fINqvJVVVgNgp3jgvz8YZ1HyfRHenqzyazvi6zIyCfv5zJv57q6iDIrfWQrMjJPfZWk15Xm5kKkoPuboMDAO/uYszKYGRmqs9FoJ9GenvZof4Fdf6OjIoFmqohmRETuqn6CqH5UVNaCq+Z2qzs73eaDnhaDCwuVnspFA8qMjMlFKXuVKcfHvHvTbtbTa2sFbjxEUDwoKGxEeYtVeaenLIviPWPivLyBPR0nLB0WFjEndppBdq2tN5o7Ta0729uWTVb6yFZkZJ76TtLoTnR0ptIeIigeFBQ2Itt2P9uSkuR2Ch4YCgwMEh5stJBsSEj8tOQ3a+S4uI83XeclXZ+feOdusmFuvb0Psu8qhu9DQ2kqpvGTpsTENfGo43KoOTna46T3YqQxMcb3N1m9N9PTilmLhv+L8vJ0hjJWsTLV1YNWQ8UNQ4uLTsVZ69xZbm6F67fCr7fa2hjCjI8CjAEBjo9krHlksbEdrNJtI9KcnPFt4DuS4ElJcju0x6u02Ngfx/oVQ/qsrLkVBwn9B/Pz+gklb4Ulz8+gb6/qj6/KyiDqjonzjvT0fYnpII7pR0dnIBgoIBgQEDgo1WTe1W9vC2SIg/uI8PBzg2+xlG9KSvuxcpa4clxcypYkbHAkODhUbPEIrvFXV18Ix1Lmx3NzIVJR8zVRl5dk8yNljSPLy65lfIRZfKGhJYScv8uc6OhXvyFjfCE+Pl1j3Xw33ZaW6nzcf8LcYWEef4aRGoYNDZyRhZQehQ8Pm5SQq9uQ4OBLq0LG+EJ8fLrGxFfixHFxJleq5YOqzMwp5dhzO9iQkONzBQ8MBQYGCQ8BA/UB9/f0AxI2OBIcHCo2o/6fo8LCPP5f4dRfamqL4fkQR/murr4Q0GvS0GlpAmuRqC6RFxe/qFjoKViZmXHoJ2l0Jzo6U2m50E65Jyf30DhIqTjZ2ZFIEzXNE+vr3jWzzlazKyvlzjNVRDMiIndVu9a/u9LSBNZwkElwqak5kImADokHB4eAp/JmpzMzwfK2wVq2LS3swSJmeCI8PFpmkq0qkhUVuK0gYIkgycmpYEnbFUmHh1zb/xpP/6qqsBp4iKB4UFDYiHqOUXqlpSuOj4oGjwMDiYr4E7L4WVlKE4CbEoAJCZKbFzk0FxoaIznadcraZWUQdTFTtTHX14RTxlETxoSE1VG407u40NAD08NeH8OCgtxesMtSsCkp4st3mbR3WlrDmREzPBEeHi0zy0b2y3t7PUb8H0v8qKi3H9Zh2tZtbQxhOk5YOiwsYk4=")),Ue=xe(Me("9KX0l6XGxjKXhJfrhPj4b7CZsMeZ7u5ejI2M94329noXDRflDf//6Ny93Le91tYKyLHIp7He3hb8VPw5VJGRbfBQ8MBQYGCQBQMFBAMCAgfgqeCHqc7OLod9h6x9VlbRKxkr1Rnn58ymYqZxYrW1EzHmMZrmTU18tZq1w5rs7FnPRc8FRY+PQLydvD6dHx+jwEDACUCJiUmSh5Lvh/r6aD8VP8UV7+/QJusmf+uyspRAyUAHyY6Ozh0LHe0L+/vmL+wvguxBQW6pZ6l9Z7OzGhz9HL79X19DJeoliupFRWDav9pGvyMj+QL3Aqb3U1NRoZah05bk5EXtW+0tW5ubdl3CXerCdXUoJBwk2Rzh4cXprul6rj091L5qvphqTEzy7lru2FpsbILDQcP8QX5+vQYCBvEC9fXz0U/RHU+Dg1LkXOTQXGhojAf0B6L0UVFWXDRcuTTR0Y0YCBjpCPn54a6Trt+T4uJMlXOVTXOrqz71U/XEU2Jil0E/QVQ/KiprFAwUEAwICBz2UvYxUpWVY69lr4xlRkbp4l7iIV6dnX94KHhgKDAwSPih+G6hNzfPEQ8RFA8KChvEtcRetS8v6xsJGxwJDg4VWjZaSDYkJH62m7Y2mxsbrUc9R6U939+YaiZqgSbNzae7abucaU5O9UzNTP7Nf38zup+6z5/q6lAtGy0kGxISP7meuTqeHR2knHScsHRYWMRyLnJoLjQ0Rnctd2wtNjZBzbLNo7Lc3BEp7ilz7rS0nRb7Frb7W1tNAfYBU/akpKXXTdfsTXZ2oaNho3Vht7cUSc5J+s59fTSNe42ke1JS30I+QqE+3d2fk3GTvHFeXs2il6ImlxMTsQT1BFf1pqaiuGi4aWi5uQEAAAAAAAAAAHQsdJkswcG1oGCggGBAQOAhHyHdH+PjwkPIQ/LIeXk6LO0sd+22tprZvtmzvtTUDcpGygFGjY1HcNlwztlnZxfdS93kS3Jyr3neeTPelJTtZ9RnK9SYmP8j6CN76LCwk95K3hFKhYVbvWu9bWu7uwZ+Kn6RKsXFuzTlNJ7lT097OhY6wRbt7ddUxVQXxYaG0mLXYi/Xmpr4/1X/zFVmZpmnlKcilBERtkrPSg/PiorAMBAwyRDp6dkKBgoIBgQEDpiBmOeB/v5mC/ALW/CgoKvMRMzwRHh4tNW61Uq6JSXwPuM+luNLS3UO8w5f86KirBn+Gbr+XV1EW8BbG8CAgNuFioUKigUFgOyt7H6tPz/T37zfQrwhIf7YSNjgSHBwqAwEDPkE8fH9et96xt9jYxlYwVjuwXd3L591n0V1r68wpWOlhGNCQudQMFBAMCAgcC4aLtEa5eXLEg4S4Q79/e+3bbdlbb+/CNRM1BlMgYFVPBQ8MBQYGCRfNV9MNSYmeXEvcZ0vw8OyOOE4Z+G+vob9ov1qojU1yE/MTwvMiIjHSzlLXDkuLmX5V/k9V5OTag3yDaryVVVYnYKd44L8/GHJR8n0R3p6s++s74usyMgnMucyb+e6uoh9K31kKzIyT6SVpNeV5uZC+6D7m6DAwDuzmLMymBkZqmjRaCfRnp72gX+BXX+joyKqZqqIZkRE7oJ+gqh+VFTW5qvmdqs7O92eg54WgwsLlUXKRQPKjIzJeyl7lSnHx7xu027W02trBUQ8RFA8KChsi3mLVXmnpyw94j1j4ry8gScdJywdFhYxmnaaQXatrTdNO02tO9vblvpW+shWZGSe0k7S6E50dKYiHiIoHhQUNnbbdj/bkpLkHgoeGAoMDBK0bLSQbEhI/DfkN2vkuLiP513nJV2fn3iybrJhbr29DyrvKobvQ0Np8abxk6bExDXjqONyqDk52vek92KkMTHGWTdZvTfT04qGi4b/i/LydFYyVrEy1dWDxUPFDUOLi07rWevcWW5uhcK3wq+32toYj4yPAowBAY6sZKx5ZLGxHW3SbSPSnJzxO+A7kuBJSXLHtMertNjYHxX6FUP6rKy5CQcJ/Qfz8/pvJW+FJc/PoOqv6o+vysogiY6J84709H0g6SCO6UdHZygYKCAYEBA4ZNVk3tVvbwuDiIP7iPDwc7FvsZRvSkr7lnKWuHJcXMpsJGxwJDg4VAjxCK7xV1dfUsdS5sdzcyHzUfM1UZeXZGUjZY0jy8uuhHyEWXyhoSW/nL/LnOjoV2MhY3whPj5dfN18N92Wlup/3H/C3GFhHpGGkRqGDQ2clIWUHoUPD5urkKvbkODgS8ZCxvhCfHy6V8RX4sRxcSblquWDqszMKXPYczvYkJDjDwUPDAUGBgkDAQP1Aff39DYSNjgSHBwq/qP+n6PCwjzhX+HUX2pqixD5EEf5rq6+a9Br0tBpaQKokagukRcXv+hY6ClYmZlxaSdpdCc6OlPQudBOuScn90g4SKk42dmRNRM1zRPr697Os85Wsysr5VUzVUQzIiJ31rvWv7vS0gSQcJBJcKmpOYCJgA6JBweH8qfyZqczM8HBtsFati0t7GYiZngiPDxarZKtKpIVFbhgIGCJIMnJqdtJ2xVJh4dcGv8aT/+qqrCIeIigeFBQ2I56jlF6paUrio+KBo8DA4kT+BOy+FlZSpuAmxKACQmSORc5NBcaGiN12nXK2mVlEFMxU7Ux19eEUcZRE8aEhNXTuNO7uNDQA17DXh/DgoLcy7DLUrApKeKZd5m0d1pawzMRMzwRHh4tRstG9st7ez0f/B9L/Kiot2HWYdrWbW0MTjpOWDosLGI=")),Le=xe(Me("MvSl9JelxsZvl4SX64T4+F6wmbDHme7ueoyNjPeN9vboFw0X5Q3//wrcvdy3vdbWFsixyKex3t5t/FT8OVSRkZDwUPDAUGBgBwUDBQQDAgIu4Kngh6nOztGHfYesfVZWzCsZK9UZ5+cTpmKmcWK1tXwx5jGa5k1NWbWatcOa7OxAz0XPBUWPj6O8nbw+nR8fScBAwAlAiYlokoeS74f6+tA/FT/FFe/vlCbrJn/rsrLOQMlAB8mOjuYdCx3tC/v7bi/sL4LsQUEaqWepfWezs0Mc/Ry+/V9fYCXqJYrqRUX52r/aRr8jI1EC9wKm91NTRaGWodOW5OR27VvtLVubmyhdwl3qwnV1xSQcJNkc4eHU6a7peq49PfK+ar6YakxMgu5a7thabGy9w0HD/EF+fvMGAgbxAvX1UtFP0R1Pg4OM5Fzk0FxoaFYH9Aei9FFRjVw0XLk00dHhGAgY6Qj5+Uyuk67fk+LiPpVzlU1zq6uX9VP1xFNiYmtBP0FUPyoqHBQMFBAMCAhj9lL2MVKVlemvZa+MZUZGf+Je4iFenZ1IeCh4YCgwMM/4ofhuoTc3GxEPERQPCgrrxLXEXrUvLxUbCRscCQ4Oflo2Wkg2JCSttpu2NpsbG5hHPUelPd/fp2omaoEmzc31u2m7nGlOTjNMzUz+zX9/ULqfus+f6uo/LRstJBsSEqS5nrk6nh0dxJx0nLB0WFhGci5yaC40NEF3LXdsLTY2Ec2yzaOy3NydKe4pc+60tE0W+xa2+1tbpQH2AVP2pKSh103X7E12dhSjYaN1Ybe3NEnOSfrOfX3fjXuNpHtSUp9CPkKhPt3dzZNxk7xxXl6xopeiJpcTE6IE9QRX9aamAbhouGloubkAAAAAAAAAALV0LHSZLMHB4KBgoIBgQEDCIR8h3R/j4zpDyEPyyHl5miztLHfttrYN2b7Zs77U1EfKRsoBRo2NF3DZcM7ZZ2ev3Uvd5Etycu153nkz3pSU/2fUZyvUmJiTI+gje+iwsFveSt4RSoWFBr1rvW1ru7u7fip+kSrFxXs05TSe5U9P1zoWOsEW7e3SVMVUF8WGhvhi12Iv15qamf9V/8xVZma2p5SnIpQREcBKz0oPz4qK2TAQMMkQ6ekOCgYKCAYEBGaYgZjngf7+qwvwC1vwoKC0zETM8ER4ePDVutVKuiUldT7jPpbjS0usDvMOX/OiokQZ/hm6/l1d21vAWxvAgICAhYqFCooFBdPsrex+rT8//t+830K8ISGo2EjY4EhwcP0MBAz5BPHxGXrfesbfY2MvWMFY7sF3dzCfdZ9Fda+v56VjpYRjQkJwUDBQQDAgIMsuGi7RGuXl7xIOEuEO/f0It223ZW2/v1XUTNQZTIGBJDwUPDAUGBh5XzVfTDUmJrJxL3GdL8PDhjjhOGfhvr7I/aL9aqI1NcdPzE8LzIiIZUs5S1w5Li5q+Vf5PVeTk1gN8g2q8lVVYZ2CneOC/PyzyUfJ9Ed6eifvrO+LrMjIiDLnMm/nurpPfSt9ZCsyMkKklaTXlebmO/ug+5ugwMCqs5izMpgZGfZo0Wgn0Z6eIoF/gV1/o6PuqmaqiGZERNaCfoKoflRU3ear5narOzuVnoOeFoMLC8lFykUDyoyMvHspe5Upx8cFbtNu1tNra2xEPERQPCgoLIt5i1V5p6eBPeI9Y+K8vDEnHScsHRYWN5p2mkF2ra2WTTtNrTvb2576VvrIVmRkptJO0uhOdHQ2Ih4iKB4UFOR223Y/25KSEh4KHhgKDAz8tGy0kGxISI835Ddr5Li4eOdd5yVdn58Psm6yYW69vWkq7yqG70NDNfGm8ZOmxMTa46jjcqg5Ocb3pPdipDExilk3Wb0309N0houG/4vy8oNWMlaxMtXVTsVDxQ1Di4uF61nr3FlubhjCt8Kvt9rajo+MjwKMAQEdrGSseWSxsfFt0m0j0pyccjvgO5LgSUkfx7THq7TY2LkV+hVD+qys+gkHCf0H8/OgbyVvhSXPzyDqr+qPr8rKfYmOifOO9PRnIOkgjulHRzgoGCggGBAQC2TVZN7Vb29zg4iD+4jw8Puxb7GUb0pKypZylrhyXFxUbCRscCQ4OF8I8Qiu8VdXIVLHUubHc3Nk81HzNVGXl65lI2WNI8vLJYR8hFl8oaFXv5y/y5zo6F1jIWN8IT4+6nzdfDfdlpYef9x/wtxhYZyRhpEahg0Nm5SFlB6FDw9Lq5Cr25Dg4LrGQsb4Qnx8JlfEV+LEcXEp5arlg6rMzONz2HM72JCQCQ8FDwwFBgb0AwED9QH39yo2EjY4EhwcPP6j/p+jwsKL4V/h1F9qar4Q+RBH+a6uAmvQa9LQaWm/qJGoLpEXF3HoWOgpWJmZU2knaXQnOjr30LnQTrknJ5FIOEipONnZ3jUTNc0T6+vlzrPOVrMrK3dVM1VEMyIiBNa71r+70tI5kHCQSXCpqYeAiYAOiQcHwfKn8manMzPswbbBWrYtLVpmImZ4Ijw8uK2SrSqSFRWpYCBgiSDJyVzbSdsVSYeHsBr/Gk//qqrYiHiIoHhQUCuOeo5ReqWliYqPigaPAwNKE/gTsvhZWZKbgJsSgAkJIzkXOTQXGhoQddp1ytplZYRTMVO1MdfX1VHGURPGhIQD07jTu7jQ0Nxew14fw4KC4suwy1KwKSnDmXeZtHdaWi0zETM8ER4ePUbLRvbLe3u3H/wfS/yoqAxh1mHa1m1tYk46Tlg6LCw=")),De=function(t,e){if(7===t)return 255&e.lo;var r=8*(7-t);if(r>=32)return e.hi>>>r-32&255;var n=32-r;return 255&(e.lo>>>r|e.hi<>>n<0;){var s=t.buffer.length-i;if(s>r&&(s=r),Be(n,i,e,s),i+=s,e=e.slice(s),r-=s,i===t.buffer.length){var a=xe(n);ze(a,o),t.count.addOne(),i=0}}t.state=o,t.ptr=i};function qe(t,e,r){var n;n=1===e?t:2===e?Ce(t):function(t){for(var e=t.length,r=new Array(e),n=0;n>>24,n[i+1]=o.hi>>>16&255,n[i+2]=o.hi>>>8&255,n[i+3]=255&o.hi,n[i+4]=o.lo>>>24,n[i+5]=o.lo>>>16&255,n[i+6]=o.lo>>>8&255,n[i+7]=255&o.lo,He(t,a,e),function(t){var e=new Array(16);!function(t,e,r,n){for(var i=0;i<16;)t[i+0]=r[i].clone(),i++}(e,0,t);for(var r=new Array(16),n=0;n<14;n++){for(var i=0;i<16;i++)e[i].setxor64(Fe[i].plus(Ke[n]).setShiftLeft(56));for(var o=0;o<16;o++)r[o]=Se(Te[De(0,e[o])],Oe[De(1,e[o+1&15])],Re[De(2,e[o+2&15])],_e[De(3,e[o+3&15])],Pe[De(4,e[o+4&15])],Ne[De(5,e[o+5&15])],Ue[De(6,e[o+6&15])],Le[De(7,e[o+11&15])]);var s=e;e=r,r=s}for(var a=0;a<16;a++)t[a].setxor64(e[a])}(t.state);for(var u=new Array(16),h=0,c=8;h<8;h++,c++)u[2*h]=t.state[c].hi,u[2*h+1]=t.state[c].lo;return u}(i);return 2===r?s:1===r?Ce(s):function(t){for(var e="",r=t.length,n=0;n0&&(s=Ve.encodeBlock(e.subarray(8*n,8*n+i),s,11*n)),function(t){for(var e=[],r=0,n=Object.keys(t);r0&&(o=Ve.decodeBlock(e.subarray(11*r,11*r+n),o,8*r)),ee.from(function(t){for(var e=[],r=0,n=Object.keys(t);r=48&&e<=57?t:(e-55).toString()})).join(""),r="",n=0;n11)throw Error("Invalid block length: "+t.length);for(var n=function(t){if(t.length<1||t.length>8)throw Error("Invalid input length");var e=oe.zero,r=oe(2).pow(8),n=0;switch(9-t.length){case 1:e=e.add(t[n++]);case 2:e=e.multiply(r).add(t[n++]);case 3:e=e.multiply(r).add(t[n++]);case 4:e=e.multiply(r).add(t[n++]);case 5:e=e.multiply(r).add(t[n++]);case 6:e=e.multiply(r).add(t[n++]);case 7:e=e.multiply(r).add(t[n++]);case 8:e=e.multiply(r).add(t[n++]);break;default:throw Error("Impossible condition")}return e}(t),i=Je[t.length]-1;1===n.compare(0);){var o=n.divmod(Qe);n=o.quotient,e[r+i]=We[parseInt(o.remainder.toString(),10)],i--}return e},Ve.decodeBlock=function(t,e,r){if(t.length<1||t.length>11)throw Error("Invalid block length: "+t.length);var n=Je.indexOf(t.length);if(n<=0)throw Error("Invalid block size");for(var i=oe(0),o=oe(1),s=t.length-1;s>=0;s--){var a=We.indexOf(t[s]);if(a<0)throw Error("Invalid symbol");var u=o.multiply(a).add(i);if(1===u.compare(oe(2).pow(64)))throw Error("Overflow");i=u,o=o.multiply(Qe)}if(n<8&&oe(2).pow(8*n).compare(i)<=0)throw Error("Overflow 2");return e.set(function(t,e){var r=new Uint8Array(e);if(e<1||e>8)throw Error("Invalid input length");for(var n=oe(2).pow(8),i=e-1;i>=0;i--)r[i]=parseInt(t.remainder(n).toString(),10),t=t.divide(n);return r}(i,n),r),e};var rr=r(13550);function nr(t,e){return"string"==typeof t&&(t=t.toLowerCase()),"string"==typeof t&&function(t){return/^0x[0-9a-f]*$/i.test(t)}(t)&&!e?new rr(tr(t),"hex"):new rr(t,e)}function ir(t){return er(t.toString("hex"))}var or=nr(0),sr=nr(2).pow(nr(251));function ar(t){return"number"==typeof t&&t==t&&t%1==0}function ur(t){var e,r,n=tr(function(t){!function(t,e,r,n){void 0===n&&(n="");var i=""===n?"invalid length":"invalid "+n+" length",o=nr(t);!function(t,e){if(!t)throw new Error(e||"Assertion failed")}(o.gte(nr(e))&&o.lt(nr(r)),"Message not signable, "+i+".")}(t,or,sr,"Starknet Address");var e=function(t){return er(tr(ir(nr(t))).padStart(64,"0"))}(t);if(!e.match(/^(0x)?[0-9a-fA-F]{64}$/))throw new Error("Invalid Address Format");return e}(t)).toLowerCase().split(""),i=function(t,e){if(e||(e={}),"number"==typeof t){!function(t,e){if("number"==typeof t){if(null==e&&(e="value not safe"),t<0||t>=9007199254740991)throw e;if(t%1)throw e}}(t,"invalid arrayify value");for(var r=[];t;)r.unshift(255&t),t=parseInt(String(t/256),10);return 0===r.length&&r.push(0),new Uint8Array(r)}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),function(t){return!!t.toHexString}(t)&&(t=t.toHexString()),function(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))}(t)){var n=t.substring(2);if(n.length%2)if("left"===e.hexPad)n="0"+n;else{if("right"!==e.hexPad)throw Error("hex data is odd-lengthvalue"+t);n+="0"}for(var i=[],o=0;o=256)return!1}return!0}(t))return new Uint8Array(t)}((r=(e=tr(ir(nr(t)))).length%2==0?e:"0"+e,er(new a.C4(256).update(ee.from(function(t){if("string"!=typeof t)throw new TypeError("hexToBytes: expected string, got "+typeof t);if(t.length%2)throw new Error("hexToBytes: received invalid unpadded hex");for(var e=new Uint8Array(t.length/2),r=0;r>1]>>4>=8&&(n[o]=n[o].toUpperCase()),(15&i[o>>1])>=8&&(n[o+1]=n[o+1].toUpperCase());return er(n.join(""))}nr(2).pow(nr(128)).add(nr(1));var hr=n.gW.decode,cr=n.gW.encode,lr=n.gW.fromWords,fr=n.gW.toWords;function dr(t,e){return function(r){var n;switch(r.readUInt8(0)){case 118:if(169!==r.readUInt8(1)||136!==r.readUInt8(r.length-2)||172!==r.readUInt8(r.length-1))throw Error("Unrecognised address format");return n=ee.concat([ee.from(t),r.slice(3,3+r.readUInt8(2))]),Qt(n);case 169:if(135!==r.readUInt8(r.length-1))throw Error("Unrecognised address format");return n=ee.concat([ee.from(e),r.slice(2,2+r.readUInt8(1))]),Qt(n);default:throw Error("Unrecognised address format")}}}function pr(t,e){return function(r){var n=Jt(r),i=function(t){return t.every((function(t,e){return e=81&&r<=96)r-=80;else if(0!==r)throw Error("Unrecognised address format");var n=[r].concat(fr(e.slice(2,e.readUInt8(1)+2)));return cr(t,n)}}function mr(t){return function(e){var r=hr(e),n=r.words;if(r.prefix!==t)throw Error("Unexpected human-readable part in bech32 encoded address");var i=lr(n.slice(1)),o=n[0];return o>0&&(o+=80),ee.concat([ee.from([o,i.length]),ee.from(i)])}}function vr(t,e,r){var n=yr(t),i=dr(e,r);return function(t){try{return i(t)}catch(e){return n(t)}}}function br(t,e,r){var n=mr(t),i=pr(e,r);return function(e){return e.toLowerCase().startsWith(t+"1")?n(e):i(e)}}var wr=function(t,e,r,n,i){return{coinType:e,decoder:br(r,n,i),encoder:vr(r,n[0],i[0]),name:t}};function Er(t,e,r){var n=Or(t),i=dr(e,r);return function(t){try{return i(t)}catch(e){return n(t)}}}function Ar(t,e,r){var n=pr(e,r),i=Rr(t);return function(e){return e.toLowerCase().startsWith(t)?i(e):n(e)}}var kr=function(t,e,r,n,i){return{coinType:e,decoder:Ar(r,n,i),encoder:Er(r,n[0],i[0]),name:t}};function Sr(t){var e,r=(e=qe(t,1,2),Ce(e=(e=qe(e,2,2)).slice(0,8)));return ee.from(r)}function Br(t){var e=Sr(t);return(0,o.encode)(ee.concat([t,e],t.length+4))}function xr(t){return function(e){return tt(e.toString("hex"),t||null)}}function Cr(t){return function(e){var r=$(e);if(!function(t,e){return function(t){return/^0x[0-9a-fA-F]{40}$/.test(t)}(t)&&tt(t,e)===t}(e,t||null)&&r!==r.toLowerCase()&&r!==r.toUpperCase())throw Error("Invalid address checksum");return ee.from($(e),"hex")}}var Ir=function(t,e,r){return{coinType:e,decoder:Cr(r),encoder:xr(r),name:t}},Mr=function(t){if(t>=2147483648)throw Error("chainId "+t+" must be less than 2147483648");return(2147483648|t)>>>0},Tr=function(t,e){return{coinType:Mr(e),decoder:Cr(),encoder:xr(),name:t}};function Or(t,e){return function(r){return cr(t,fr(r),e)}}function Rr(t,e){return function(r){var n=hr(r,e),i=n.words;if(n.prefix!==t)throw Error("Unrecognised address format");return ee.from(lr(i))}}var _r=function(t,e,r,n){return{coinType:e,decoder:Rr(r,n),encoder:Or(r,n),name:t}};function Pr(t){return function(e){if(!bt.isValid(e))throw Error("Unrecognised address format");return bt.fromHex(e).toString().replace(/^.{3}/g,t)}}function Nr(t){return function(e){if(!bt.isValid(e))throw Error("Unrecognised address format");var r=new RegExp("^.{"+t.length+"}","g");return bt(e.replace(r,"EOS")).toBuffer()}}var Ur=function(t,e,r){return{coinType:e,decoder:Nr(r),encoder:Pr(r),name:t}};function Lr(t){return ee.from(function(t,e){var r;void 0===e&&(e=0);try{r=s().decode(t)}catch(t){return null}if(-1===Rt.indexOf(r[0]))return null;if(r.length<3)return null;var n,i=r.length<=3?1:r.length<=5?2:r.length<=9?4:r.length<=17?8:32,o=r.length-1-i,a=r.slice(1,1+i);r.slice(1+r.length),32===i&&(n=a);var u=i<32?new Pt(function(t){var e=0,r=1;return t.forEach((function(t){e+=t*r,r*=256})),e}(a)):new _.from(a);if(r[0]%1&&!n&&!e)return null;for(var h=(0,R.blake2b)(Nt(_t,r[0]%1?n||e(u):r.slice(0,1+i))),c=0;c>=4:e&=15,i+=r[s]>"9"&&e<=7?r[s].toUpperCase():r[s];return i}function Fr(t){if(5!==t.readInt8(0)||t.readInt8(1)!=="M".charCodeAt(0)||26!==t.length)return!1;var e,r=t.slice(-4),n=(e=t.slice(0,-4),new a.C4(256).update(ee.from((0,i.blake2b)(Uint8Array.from(e),null,32))).digest().slice(0,4));return r.equals(n)}var jr=[0,0,1,18,2,5,19,11,3,29,6,27,20,8,12,23,4,10,30,17,7,22,28,26,21,25,9,16,13,14,24,15],Kr=[1,2,4,8,16,5,10,20,13,26,17,7,14,28,29,31,27,19,3,6,12,24,21,15,30,25,23,11,22,9,18,1],zr="23456789ABCDEFGHJKLMNPQRSTUVWXYZ",Hr=[3,2,1,0,7,6,5,4,13,14,15,16,12,8,9,10,11];function qr(t){return Yt.sha512_256.update(t).hex().substr(-8)}var Vr,Gr,Wr,Zr,Jr,Qr,Xr,Yr,$r=function(t,e,r,n){return{coinType:e,decoder:n,encoder:r,name:t}},tn=[wr("BTC",0,"bc",[[0]],[[5]]),wr("LTC",2,"ltc",[[48]],[[50],[5]]),gr("DOGE",3,[[30]],[[22]]),gr("RDD",4,[[61]],[[5]]),gr("DASH",5,[[76]],[[16]]),gr("PPC",6,[[55]],[[117]]),$r("NMC",7,Qt,Jt),gr("VIA",14,[[71]],[[33]]),(Vr=[[36]],Gr=[[5]],{coinType:17,decoder:function(t,e,r){var n=mr("grs"),i=function(t,e){return function(r){var n=function(t){var e=function(t){var e=t.slice(0,-4),r=t.slice(-4),n=Sr(e);return r[0]^n[0]|r[1]^n[1]|r[2]^n[2]|r[3]^n[3]?ee.from([]):e}((0,o.decode)(t));if(0===e.length)throw new Error("Invalid checksum");return e}(r),i=function(t){return t.every((function(t,e){return e22)throw new Error("Address length does not match requirements. Expected between 2 and 22 characters.");if("L"!==t[t.length-1])throw new Error('Address format does not match requirements. Expected "L" at the end.');if(t.includes("."))throw new Error("Address format does not match requirements. Address includes invalid character: `.`.")}(t),ee.from(oe(t.slice(0,-1)).toString(16),"hex")})),Ur("STEEM",135,"STM"),gr("FIRO",136,[[82]],[[7]]),Ir("RSK",137,30),gr("KMD",141,[[60]],[[85]]),$r("XRP",144,(function(t){return Y.encodeChecked(t)}),(function(t){return Y.decodeChecked(t)})),$r("BCH",145,(function(t){switch(t.readUInt8(0)){case 118:if(169!==t.readUInt8(1)||136!==t.readUInt8(t.length-2)||172!==t.readUInt8(t.length-1))throw Error("Unrecognised address format");return Wt("bitcoincash",0,t.slice(3,3+t.readUInt8(2)));case 169:if(135!==t.readUInt8(t.length-1))throw Error("Unrecognised address format");return Wt("bitcoincash",1,t.slice(2,2+t.readUInt8(1)));default:throw Error("Unrecognised address format")}}),(function(t){var e=pr([[0]],[[5]]);try{return e(t)}catch(e){return function(t){var e=function(t,e){void 0===e&&(e="bitcoincash"),Dt("string"==typeof t),Dt("string"==typeof e);var r=function(t,e){if(Dt("string"==typeof t),t.length<8||t.length>196)throw new Error("Invalid cashaddr data length.");for(var r=!1,n=!1,i=!1,o=0,s=0;s=97&&a<=122)r=!0;else if(a>=65&&a<=90)n=!0;else if(a>=48&&a<=57)i=!0;else{if(58!==a)throw new Error("Invalid cashaddr character.");if(i||0===s||s>83)throw new Error("Invalid cashaddr prefix.");if(0!==o)throw new Error("Invalid cashaddr separators.");o=s}}if(n&&r)throw new Error("Invalid cashaddr casing.");var u,h=new Ft(0,1);0===o?u=e.toLowerCase():(u=t.substring(0,o).toLowerCase(),o+=1);for(var c=0;c112)throw new Error("Invalid cashaddr data length.");for(var f=_.allocUnsafe(l),d=o;d=5)throw new Error("Invalid padding in data.");if(i[i.length-1]&(1<>>3&31,u=s.slice(1),h=20+4*(3&s[0]);if(4&s[0]&&(h*=2),h!==u.length)throw new Error("Invalid cashaddr data length.");return{prefix:n,type:a,hash:u}}(t),r=e.type,n=e.hash;if(0===r)return ee.concat([ee.from([118,169,20]),ee.from(n),ee.from([136,172])]);if(1===r)return ee.concat([ee.from([169,20]),ee.from(n),ee.from([135])]);throw Error("Unrecognised address format")}(t)}})),$r("XLM",148,(function(t){return function(t,e){if(null===e||kt(e))throw new Error("cannot encode null data");var r=St[t];if(kt(r))throw new Error(t+' is not a valid version byte name. expected one of "ed25519PublicKey", "ed25519SecretSeed", "preAuthTx", "sha256Hash"');e=_.from(e);var n=_.from([r]),i=_.concat([n,e]),o=Bt(i),s=_.concat([i,o]);return Et(s)}("ed25519PublicKey",t)}),(function(t){return function(t,e){if("string"!=typeof e)throw new TypeError("encoded argument must be of type String");var r=At(e),n=r[0],i=r.slice(0,-2),o=i.slice(1),s=r.slice(-2);if(e!==Et(r))throw new Error("invalid encoded string");var a=St[t];if(kt(a))throw new Error(t+' is not a valid version byte name. expected one of "accountId" or "seed"');if(n!==a)throw new Error("invalid version byte. expected "+a+", got "+n);var u=Bt(i);if(!xt(u,s))throw new Error("invalid checksum");return _.from(o)}("ed25519PublicKey",t)})),$r("BTM",153,yr("bm"),mr("bm")),wr("BTG",156,"btg",[[38]],[[23]]),$r("NANO",165,(function(t){var e=(0,$t.encode)(Uint8Array.from(t)),r=(0,i.blake2b)(Uint8Array.from(t),null,5).reverse();return"nano_"+e+(0,$t.encode)(r)}),(function(t){var e=(0,$t.decode)(t.slice(5));return ee.from(e).slice(0,-5)})),gr("RVN",175,[[60]],[[122]]),Ir("POA_LEGACY",178),wr("LCC",192,"lcc",[[28]],[[50],[5]]),Ur("EOS",194,"EOS"),$r("TRX",195,Qt,Jt),$r("BCN",204,(function(t){var e=new a.C4(256).update(t).digest().slice(0,4);return Xe(ee.concat([t,e]))}),(function(t){var e=Ye(t),r=e.slice(0,-68).toString("hex");if(e.length<68||"06"!==r&&"cef622"!==r)throw Error("Unrecognised address format");var n=e.slice(-4);if(!new a.C4(256).update(e.slice(0,-4)).digest().slice(0,4).equals(n))throw Error("Invalid checksum");return e.slice(0,-4)})),Ur("FIO",235,"FIO"),$r("BSV",236,(function(t){var e=ee.concat([ee.from([0]),t]);return Qt(e)}),(function(t){var e=Jt(t);if(21!==e.length)throw Error("Unrecognised address format");if(0!==e[0])throw Error("Invalid version byte");return e.slice(1)})),$r("NEO",239,Qt,Jt),$r("NIM",242,(function(t){var e=function(t,e){void 0===e&&(e="0123456789ABCDEFGHJKLMNPQRSTUVXY");var r,n,i=3,o=0,s="";for(n=0;n>i)],i>5&&(s+=e[31&r>>(i-=5)]),o=r<<(i=5-i),i=8-i;for(3!==i&&(s+=e[31&o]);s.length%8!=0&&33===e.length;)s+=e[32];return s}(t);return("NQ"+$e(e,"NQ")+e).replace(/.{4}/g,"$& ").trim()}),(function(t){if(!t.startsWith("NQ"))throw Error("Unrecognised address format");var e=t.replace(/ /g,""),r=e.slice(2,4),n=e.slice(4);if(r!==$e(n,"NQ"))throw Error("Unrecognised address format");return function(t,e){void 0===e&&(e="0123456789ABCDEFGHJKLMNPQRSTUVXY");var r,n={};e.toUpperCase().split("").forEach((function(t,e){t in n||(n[t]=e)}));var i=8,o=0,s=[];return t.toUpperCase().split("").forEach((function(t){33===e.length&&t===e[32]||(r=255&n[t],(i-=5)>0?o|=r<>-i),o=r<<(i+=8)&255):(s.push(o|r),i=8,o=0))})),8!==i&&0!==o&&s.push(o),ee.from(s)}(n)})),Ir("EWT_LEGACY",246),$r("ALGO",283,(function(t){var e=qr(t);return L(N(t.toString("hex").concat(e))).replace(/=/g,"")}),(function(t){var e=U(t);if(36!==e.length)throw Error("Unrecognised address format");var r=e.slice(0,-4),n=e.slice(-4),i=qr(r);if(n.toString("hex")!==i)throw Error("Unrecognised address format");return r})),$r("IOST",291,o.encode,o.decode),gr("DIVI",301,[[30]],[[13]]),_r("IOTX",304,"io"),Ur("BTS",308,"BTS"),_r("CKB",309,"ckb"),$r("MRX",326,Qt,Jt),_r("LUNA",330,"terra"),$r("DOT",354,(function(t){return Ut(Uint8Array.from(t),0)}),Lr),$r("VSYS",360,(function(t){if(!Fr(t))throw new Error("VSYS: Invalid checksum");return(0,o.encode)(t)}),(function(t){var e=t;if(t.startsWith("address:")&&(e=t.substr(t.length)),e.length>36)throw new Error("VSYS: Address length should not be more than 36");var r=(0,o.decode)(e);if(!Fr(r))throw new Error("VSYS: Invalid checksum");return r})),Ur("ABBC",367,"ABBC"),$r("NEAR",397,(function(t){var e=t.toString();if(e.length>64||e.length<2)throw Error("Invalid address format");return e}),(function(t){if(/(^(([a-z\d]+[\-_])*[a-z\d]+\.)*([a-z\d]+[\-_])*[a-z\d]+$)/g.test(t)){if(t.length>64||t.length<2)throw Error("Invalid address format");return ee.from(t)}throw Error("Invalid address string")})),$r("ETN",415,(function(t){var e=ee.concat([ee.from([18]),t]),r=new a.C4(256).update(e).digest().slice(0,4);return Xe(ee.concat([e,r]))}),(function(t){var e=Ye(t);if(18!==e[0])throw Error("Unrecognised address format");var r=e.slice(65,69);if(!new a.C4(256).update(e.slice(0,65)).digest().slice(0,4).equals(r))throw Error("Invalid checksum");return e.slice(1,65)})),$r("AION",425,(function(t){return"0x".concat(t.toString("hex"))}),(function(t){var e=t;if(null==e||0===e.length||e.length<64)throw Error("Unrecognised address format");if(e.startsWith("0x")&&(e=e.slice(2)),e.startsWith("a0")&&(64!==e.length||!e.substring(2).match("^[0-9A-Fa-f]+$")))throw Error("Unrecognised address format");return ee.from(e,"hex")})),$r("KSM",434,(function(t){return Ut(Uint8Array.from(t),2)}),Lr),$r("AE",457,(function(t){return"ak_"+Qt(t.slice(2))}),(function(t){return ee.concat([ee.from("0x"),Jt(t.split("_")[1])])})),_r("KAVA",459,"kava"),$r("FIL",461,(function(t){return ve("f",be(t[0],t.slice(1))).toString()}),(function(t){return function(t){!function(t){if(!t)throw Error("No bytes to validate.");if(t.length<3)throw Error("Address is too short to validate.");if("f"!==t[0]&&"t"!==t[0])throw Error("Unknown address network.");switch(t[1]){case"0":if(t.length>22)throw Error("Invalid ID address length.");break;case"1":if(41!==t.length)throw Error("Invalid secp256k1 address length.");break;case"2":if(41!==t.length)throw Error("Invalid Actor address length.");break;case"3":if(86!==t.length)throw Error("Invalid BLS address length.");break;default:throw new Error("Invalid address protocol.")}}(t);var e,r=t[0],n=parseInt(t[1],10),i=ee.from([n]),o=t.slice(2);if(0===n)return be(n,ee.from((function(t,e){for(var r=new pe(t);;){var n=r.maskn(7).toNumber();if(r.ishrn(7),r.isZero()){e.write([n]);break}e.write([128|n])}}(o,e=new ge),e.buffer)));var s,a,u=ee.from(U(o.toUpperCase())),h=u.length,c=u.slice(0,h-4);if(s=u.slice(h-4,h),a=me(ee.concat([i,c])),ee.compare(ee.from(a),s))throw Error("Checksums don't match");var l=be(n,c);if(ve(r,l)!==t)throw Error("Did not encode this address properly: "+t);return l}(t).str})),$r("AR",472,(function(t){return t.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}),(function(t){return t=(t=t.replace(/\-/g,"+").replace(/\_/g,"/")).concat("=".repeat(t.length%4==0?0:4-t.length%4)),ee.from(t,"base64")})),gr("CCA",489,[[11]],[[5]]),Ir("THETA_LEGACY",500),$r("SOL",501,o.encode,o.decode),$r("XHV",535,Xe,Ye),$r("FLOW",539,(function(t){var e=ee.alloc(8,0);return t.length>8&&(e=t.slice(-8)),t.copy(e,8-t.length),"0x"+e.toString("hex").toLowerCase()}),(function(t){if(!function(t,e){var r=t;if((r=BigInt(r)^BigInt(e.codeword))===BigInt(0))return!1;for(var n=BigInt(0),i=0;i<64;i++)(BigInt(r)&BigInt(1))===BigInt(1)&&(n=BigInt(n)^BigInt(we[i])),r=BigInt(r)>>BigInt(1);return n===BigInt(0)&&r===BigInt(0)}(BigInt(t),Ee.mainnet))throw Error("Unrecognised address format");return ee.from($(t).replace(/^0+/,""),"hex")})),_r("IRIS",566,"iaa"),gr("LRG",568,[[30]],[[13]]),$r("SERO",569,(function(t){return(0,o.encode)(t)}),(function(t){var e=(0,o.decode)(t);if(96===e.length)return e;throw Error("Unrecognised address format")})),$r("BDX",570,Xe,Ye),wr("CCXX",571,"ccx",[[137]],[[75],[5]]),$r("SRM",573,o.encode,o.decode),$r("VLX",574,o.encode,o.decode),gr("BPS",576,[[0]],[[5]]),Ir("TFUEL",589),_r("GRIN",592,"grin"),Ir("GNO_LEGACY",700),Ir("VET",703),_r("BNB",714,"bnb"),Ir("CLO_LEGACY",820),Ur("HIVE",825,"STM"),Ir("TOMO_LEGACY",889),$r("HNT",904,(function(t){var e=ee.concat([ee.from([0]),t]);return Qt(e)}),(function(t){var e=Jt(t);if(0!==e[0])throw Error("Invalid version byte");return e.slice(1)})),_r("RUNE",931,"thor"),wr("BCD",999,"bcd",[[0]],[[5]]),Ir("TT_LEGACY",1001),Ir("FTM_LEGACY",1007),_r("ONE",1023,"one"),$r("ONT",1024,(function(t){return Qt(ee.concat([ee.from([23]),t]))}),(function(t){var e=Jt(t);if(23===e.readUInt8(0))return e.slice(1);throw Error("Unrecognised address format")})),_r("NOSTR",1237,"npub"),{coinType:1729,decoder:function(t){var e=Jt(t).slice(3);switch(t.substring(0,3)){case"tz1":return ee.concat([ee.from([0,0]),e]);case"tz2":return ee.concat([ee.from([0,1]),e]);case"tz3":return ee.concat([ee.from([0,2]),e]);case"KT1":return ee.concat([ee.from([1]),e,ee.from([0])]);default:throw Error("Unrecognised address format")}},encoder:function(t){if(22!==t.length&&21!==t.length)throw Error("Unrecognised address format");var e;switch(t.readUInt8(0)){case 0:if(0===t.readUInt8(1))e=ee.from([6,161,159]);else if(1===t.readUInt8(1))e=ee.from([6,161,161]);else{if(2!==t.readUInt8(1))throw Error("Unrecognised address format");e=ee.from([6,161,164])}return Qt(ee.concat([e,t.slice(2)]));case 1:return e=ee.from([2,90,121]),Qt(ee.concat([e,t.slice(1,21)]));default:throw Error("Unrecognised address format")}},name:"XTZ"},{coinType:1815,decoder:function(t){var e=Rr("addr",104);return function(t){return t.toLowerCase().startsWith("addr")?e(t):function(t){var e=(0,o.decode)(t),r=function(t,e,r){var n=new DataView(t),i=new Uint8Array(t),o=0;function s(t,e){return o+=t,e}function a(e){return s(e,new Uint8Array(t,o,e))}function u(){return s(1,i[o])}function h(){return s(2,n.getUint16(o))}function c(){return s(4,n.getUint32(o))}function l(){return 255===i[o]&&(o+=1,!0)}function f(t){if(t<24)return t;if(24===t)return u();if(25===t)return h();if(26===t)return c();if(27===t)return 4294967296*c()+c();if(31===t)return-1;throw new Error("Invalid length encoding")}function d(t){var e=u();if(255===e)return-1;var r=f(31&e);if(r<0||e>>5!==t)throw new Error("Invalid indefinite length element");return r}function p(t,e){for(var r=0;r>10),t.push(56320|1023&n))}}var g=function t(){var e,r,i,c=u(),g=c>>5,y=31&c;if(7===g)switch(y){case 25:return function(){var t=new ArrayBuffer(4),e=new DataView(t),r=h(),n=32768&r,i=31744&r,o=1023&r;if(31744===i)i=261120;else if(0!==i)i+=114688;else if(0!==o)return(n?-1:1)*o*5.960464477539063e-8;return e.setUint32(0,n<<16|i<<13|o<<13),e.getFloat32(0)}();case 26:return s(4,n.getFloat32(o));case 27:return s(8,n.getFloat64(o))}if((r=f(y))<0&&(g<2||6=0;)v+=r,m.push(a(r));var b=new Uint8Array(v),w=0;for(e=0;e=0;)p(E,r);else p(E,r);var A="";for(e=0;e>2,c=0;c>6),i.push(128|63&p)):(p=(1023&p)<<10,p|=1023&e.charCodeAt(++r),i.push(240|(p+=65536)>>18),i.push(128|p>>12&63),i.push(128|p>>6&63),i.push(128|63&p))}return d(3,i.length),h(i);default:var g,y;if(Array.isArray(e))for(d(4,g=e.length),r=0;r=0;s--){4===o&&(n.unshift(ae[i]),o=0,i=0);var a=(se.indexOf(t[s])<>4)>1<<(o+=1))throw new Error("Panic error in decoding.");n.unshift(u)}n.unshift(ae[i]),n.length%2==1&&n.unshift("0");for(var h=0,c=0;c127?n-256:n,i^=n;r[t.length]=i;var a="";if(1===e)a="NULS";else if(2===e)a="tNULS";else{var u=ee.concat([ee.from([255&e>>0]),ee.from([255&e>>8])]);a=(0,o.encode)(u).toUpperCase()}return a+["a","b","c","d","e"][a.length-1]+(0,o.encode)(r)}),(function(t){if(t.startsWith("NULS"))t=t.substring(5);else if(t.startsWith("tNULS"))t=t.substring(6);else for(var e=0;e=97){t=t.substring(e+1);break}for(var r=(0,o.decode)(t),n=0,i=0,s=0;s127?n-256:n,i^=n;if(i<0&&(i=256+i),i!==r[r.length-1])throw Error("Unrecognised address format");return r.slice(0,-1)})),$r("AVAX",9e3,Or("avax"),(Wr=Rr("avax"),function(t){var e=t.split("-");return Wr(e[1]||e[0])})),$r("STRK",9004,(function(t){return ur("0x"+t.toString("hex"))}),(function(t){if(ur(e=t)!==e)throw Error("Invalid checksum");var e;return ee.from($(t),"hex")})),Ir("NRG_LEGACY",9797),$r("ARDR",16754,(function(t){for(var e=t.toString("hex"),r=[],n=0,i=0;n=zr.length||17!==r.length)throw Error("Unrecognised address format");o+=zr[r[a]],(a<12&&(a+1)%4==0||16===a)&&(s.push(o),o="")}return"ARDOR-"+s.join("-")}),(function(t){var e=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];if("ARDOR"!==(t=t.replace(/(^\s+)|(\s+$)/g,"").toUpperCase()).slice(0,5)||5!==t.split("-").length)throw Error("Unrecognised address format");for(var r,n=[],i=0,o=ne(t=t.substr(t.indexOf("-")));!(r=o()).done;){var s=zr.indexOf(r.value);if(s>=0&&(n[i++]=s,i>17))throw Error("Unrecognised address format")}for(var a=0,u=0;a12&&s<27)){var a=s;s>26&&(a-=14),o^=(r=Kr[i*s%31],0===(e=t[a])||0===r?0:Kr[(jr[e]+jr[r])%31])}n|=o}return 0===n}(e))throw Error("Unrecognised address format");return ee.from(e)})),kr("ZEL",19167,"za",[[28,184]],[[28,189]]),Ir("CELO_LEGACY",52752),gr("WICC",99999,[[73]],[[51]]),$r("WAN",5718350,(function(t){return Dr("0x"+t.toString("hex"))}),(function(t){if(/^0x[0-9a-fA-F]{40}$/.test(e=t)&&Dr(e)===e)return ee.from($(t),"hex");throw Error("Invalid address checksum");var e})),$r("WAVES",5741564,o.encode,(function(t){var e=(0,o.decode)(t);if(1!==e[0])throw Error("Bad program version");if(87!==e[1]||26!==e.length)throw Error("Unrecognised address format");var r=e.slice(0,22),n=e.slice(22,26);if(!new a.C4(256).update(ee.from((0,i.blake2b)(Uint8Array.from(r),null,32))).digest().slice(0,4).equals(n))throw Error("Invalid checksum");return e})),Tr("OP",10),Tr("CRO",25),Tr("BSC",56),Tr("GO",60),Tr("ETC",61),Tr("TOMO",88),Tr("POA",99),Tr("GNO",100),Tr("TT",108),Tr("MATIC",137),Tr("EWT",246),Tr("FTM",250),Tr("THETA",361),Tr("CLO",820),Tr("NRG",39797),Tr("ARB1",42161),Tr("CELO",42220),Tr("AVAXC",43114)],en=Object.assign.apply(Object,[{}].concat(tn.map((function(t){var e;return(e={})[t.name]=t,e})))),rn=Object.assign.apply(Object,[{}].concat(tn.map((function(t){var e;return(e={})[t.coinType]=t,e}))));new Proxy(rn,{get:function(t,e){var r=parseInt(e,10);if(t[e])return t[e];if(0!=(2147483648&r)){var n=t[60];return{coinType:r,decoder:n.decoder,encoder:n.encoder,name:""}}}})},53102:function(t,e,r){const n=r(98878);e.cidForWeb=t=>{let e=new n(t);0===e.version&&(e=e.toV1());let r=e.toString("base32");if(r.length>63){const t=e.toString("base36");if(t.length<=63)return t;throw new TypeError("CID is longer than DNS limit of 63 characters and is not compatible with public gateways")}return r};e.cidV0ToV1Base32=t=>{let e=new n(t);return 0===e.version&&(e=e.toV1()),e.toString("base32")}},34116:function(t,e,r){const n=r(76883),i=r(18370),{hexStringToBuffer:o,profiles:s}=r(56790),{cidForWeb:a,cidV0ToV1Base32:u}=r(53102);t.exports={helpers:{cidForWeb:a,cidV0ToV1Base32:u},decode:function(t){const e=o(t),r=n.getCodec(e),i=n.rmPrefix(e);let a=s[r];return a||(a=s.default),a.decode(i)},fromIpfs:function(t){return this.encode("ipfs-ns",t)},fromSkylink:function(t){return this.encode("skynet-ns",t)},fromSwarm:function(t){return this.encode("swarm-ns",t)},fromArweave:function(t){return this.encode("arweave-ns",t)},encode:function(t,e){let r=s[t];r||(r=s.default);const o=r.encode(e);return i.toHexString(n.addPrefix(t,o))},getCodec:function(t){let e=o(t);return n.getCodec(e)}}},56790:function(t,e,r){var n=r(48764).Buffer;const i=r(98878),o=r(18370),s=r(12130),a=t=>{let e=t.slice(0,2),r=t.slice(2),n="";return n="0x"===e?r:t,o.fromHexString(n)},u=t=>{try{const{multihash:e}=t;if(e.length<38){const t=o.decode(e);if("identity"===t.name&&t.length<36)return!1}return!0}catch(e){return!1}},h={skynet:t=>s.toUint8Array(t),swarm:t=>{const e=o.encode(a(t),"keccak-256");return new i(1,"swarm-manifest",e).bytes},ipfs:t=>new i(t).toV1().bytes,ipns:t=>{const e=new i(t);if(!u(e))throw Error("ipns-ns allows only valid cryptographic libp2p-key identifiers, try using ED25519 pubkey instead");return new i(1,"libp2p-key",e.multihash).bytes},utf8:t=>n.from(t,"utf8"),arweave:t=>s.toUint8Array(t)},c={hexMultiHash:t=>{const e=new i(t);return o.decode(e.multihash).digest.toString("hex")},ipfs:t=>{const e=new i(t).toV1();return e.toString("libp2p-key"===e.codec?"base36":"base32")},ipns:t=>{const e=new i(t).toV1();return u(e)?e.toString("base36"):(console.warn("[ensdomains/content-hash] use of non-cryptographic identifiers in ipns-ns is deprecated and will be removed, migrate to ED25519 libp2p-key"),String(o.decode(new i(t).multihash).digest))},utf8:t=>t.toString("utf8"),base64:t=>s.fromUint8Array(t,!0)},l={"skynet-ns":{encode:h.skynet,decode:c.base64},"swarm-ns":{encode:h.swarm,decode:c.hexMultiHash},"ipfs-ns":{encode:h.ipfs,decode:c.ipfs},"ipns-ns":{encode:h.ipns,decode:c.ipns},"arweave-ns":{encode:h.arweave,decode:c.base64},default:{encode:h.utf8,decode:c.utf8}};e.hexStringToBuffer=a,e.profiles=l},95851:function(t,e,r){"use strict";r.d(e,{i:function(){return n}});const n="abi/5.7.0"},84243:function(t,e,r){"use strict";r.d(e,{R:function(){return T},$:function(){return O}});var n=r(16441),i=r(6881),o=r(1581),s=r(95851),a=r(61184),u=r(19485);class h extends a.XI{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){try{e=(0,u.getAddress)(e)}catch(r){this._throwError(r.message,e)}return t.writeValue(e)}decode(t){return(0,u.getAddress)((0,n.hexZeroPad)(t.readValue().toHexString(),20))}}class c extends a.XI{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}const l=new o.Logger(s.i);function f(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){let t={};n=e.map((e=>{const n=e.localName;return n||l.throwError("cannot encode object for signature with missing names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]&&l.throwError("cannot encode object for signature with duplicate names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]=!0,r[n]}))}else l.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&l.throwArgumentError("types/value length mismatch","tuple",r);let i=new a.QV(t.wordSize),s=new a.QV(t.wordSize),u=[];e.forEach(((t,e)=>{let r=n[e];if(t.dynamic){let e=s.length;t.encode(s,r);let n=i.writeUpdatableValue();u.push((t=>{n(t+e)}))}else t.encode(i,r)})),u.forEach((t=>{t(i.length)}));let h=t.appendWriter(i);return h+=t.appendWriter(s),h}function d(t,e){let r=[],n=t.subReader(0);e.forEach((e=>{let i=null;if(e.dynamic){let r=t.readValue(),a=n.subReader(r.toNumber());try{i=e.decode(a)}catch(s){if(s.code===o.Logger.errors.BUFFER_OVERRUN)throw s;i=s,i.baseType=e.name,i.name=e.localName,i.type=e.type}}else try{i=e.decode(t)}catch(s){if(s.code===o.Logger.errors.BUFFER_OVERRUN)throw s;i=s,i.baseType=e.name,i.name=e.localName,i.type=e.type}void 0!=i&&r.push(i)}));const i=e.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach(((t,e)=>{let n=t.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[e];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let o=0;o{throw t}})}return Object.freeze(r)}class p extends a.XI{constructor(t,e,r){super("array",t.type+"["+(e>=0?e:"")+"]",r,-1===e||t.dynamic),this.coder=t,this.length=e}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;rt._data.length&&l.throwError("insufficient data length",o.Logger.errors.BUFFER_OVERRUN,{length:t._data.length,count:e}));let r=[];for(let n=0;n{t.dynamic&&(r=!0),n.push(t.type)}));super("tuple","tuple("+n.join(",")+")",e,r),this.coders=t}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===e[i]&&("length"===i&&(i="_length"),null==t[i]&&(t[i]=t[n]))})),Object.freeze(t)}encode(t,e){return f(t,this.coders,e)}decode(t){return t.coerce(this.name,d(t,this.coders))}}var x=r(11388);const C=new o.Logger(s.i),I=new RegExp(/^bytes([0-9]*)$/),M=new RegExp(/^(u?int)([0-9]*)$/);class T{constructor(t){(0,i.defineReadOnly)(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new h(t.name);case"bool":return new g(t.name);case"string":return new S(t.name);case"bytes":return new m(t.name);case"array":return new p(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new B((t.components||[]).map((t=>this._getCoder(t))),t.name);case"":return new b(t.name)}let e=t.type.match(M);if(e){let r=parseInt(e[2]||"256");return(0===r||r>256||r%8!==0)&&C.throwArgumentError("invalid "+e[1]+" bit length","param",t),new A(r/8,"int"===e[1],t.name)}if(e=t.type.match(I),e){let r=parseInt(e[1]);return(0===r||r>32)&&C.throwArgumentError("invalid bytes length","param",t),new v(r,t.name)}return C.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new a.Ej(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new a.QV(this._getWordSize())}getDefaultValue(t){const e=t.map((t=>this._getCoder(x._R.from(t))));return new B(e,"_").defaultValue()}encode(t,e){t.length!==e.length&&C.throwError("types/values length mismatch",o.Logger.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});const r=t.map((t=>this._getCoder(x._R.from(t)))),n=new B(r,"_"),i=this._getWriter();return n.encode(i,e),i.data}decode(t,e,r){const i=t.map((t=>this._getCoder(x._R.from(t))));return new B(i,"_").decode(this._getReader((0,n.arrayify)(e),r))}}const O=new T},61184:function(t,e,r){"use strict";r.d(e,{BR:function(){return h},Ej:function(){return f},QV:function(){return l},XI:function(){return c}});var n=r(16441),i=r(2593),o=r(6881),s=r(1581),a=r(95851);const u=new s.Logger(a.i);function h(t){const e=[],r=function(t,n){if(Array.isArray(n))for(let o in n){const s=t.slice();s.push(o);try{r(s,n[o])}catch(i){e.push({path:s,error:i})}}};return r([],t),e}class c{constructor(t,e,r,n){this.name=t,this.type=e,this.localName=r,this.dynamic=n}_throwError(t,e){u.throwArgumentError(t,this.localName,e)}}class l{constructor(t){(0,o.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return(0,n.hexConcat)(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData((0,n.concat)(t._data))}writeBytes(t){let e=(0,n.arrayify)(t);const r=e.length%this.wordSize;return r&&(e=(0,n.concat)([e,this._padding.slice(r)])),this._writeData(e)}_getValue(t){let e=(0,n.arrayify)(i.O$.from(t));return e.length>this.wordSize&&u.throwError("value out-of-bounds",s.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=(0,n.concat)([this._padding.slice(e.length%this.wordSize),e])),e}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class f{constructor(t,e,r,i){(0,o.defineReadOnly)(this,"_data",(0,n.arrayify)(t)),(0,o.defineReadOnly)(this,"wordSize",e||32),(0,o.defineReadOnly)(this,"_coerceFunc",r),(0,o.defineReadOnly)(this,"allowLoose",i),this._offset=0}get data(){return(0,n.hexlify)(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):f.coerce(t,e)}_peekBytes(t,e,r){let n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:u.throwError("data out-of-bounds",s.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(t){return new f(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return i.O$.from(this.readBytes(this.wordSize))}}},11388:function(t,e,r){"use strict";r.d(e,{HY:function(){return m},IC:function(){return B},QV:function(){return v},Xg:function(){return A},YW:function(){return k},_R:function(){return g},pc:function(){return d}});var n=r(2593),i=r(6881),o=r(1581),s=r(95851);const a=new o.Logger(s.i),u={};let h={calldata:!0,memory:!0,storage:!0},c={calldata:!0,memory:!0};function l(t,e){if("bytes"===t||"string"===t){if(h[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&c[e])return!0;return(h[e]||"payable"===e)&&a.throwArgumentError("invalid modifier","name",e),!1}function f(t,e){for(let r in e)(0,i.defineReadOnly)(t,r,e[r])}const d=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),p=new RegExp(/^(.*)\[([0-9]*)\]$/);class g{constructor(t,e){t!==u&&a.throwError("use fromString",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),f(this,e);let r=this.type.match(p);f(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:g.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=d.sighash),d[t]||a.throwArgumentError("invalid format type","format",t),t===d.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==d.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===d.full?", ":",")+")"):e+=this.type,t!==d.sighash&&(!0===this.indexed&&(e+=" indexed"),t===d.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"===typeof t?g.fromString(t,e):g.fromObject(t)}static fromObject(t){return g.isParamType(t)?t:new g(u,{name:t.name||null,type:x(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(g.fromObject):null})}static fromString(t,e){return r=function(t,e){let r=t;function n(e){a.throwArgumentError(`unexpected character at position ${e}`,"param",t)}function i(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},s=o;for(let a=0;ag.fromString(t,e)))}class m{constructor(t,e){t!==u&&a.throwError("use a static from method",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),f(this,e),this._isFragment=!0,Object.freeze(this)}static from(t){return m.isFragment(t)?t:"string"===typeof t?m.fromString(t):m.fromObject(t)}static fromObject(t){if(m.isFragment(t))return t;switch(t.type){case"function":return k.fromObject(t);case"event":return v.fromObject(t);case"constructor":return A.fromObject(t);case"error":return B.fromObject(t);case"fallback":case"receive":return null}return a.throwArgumentError("invalid fragment object","value",t)}static fromString(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?v.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?k.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?A.fromString(t.trim()):"error"===t.split(" ")[0]?B.fromString(t.substring(5).trim()):a.throwArgumentError("unsupported fragment","value",t)}static isFragment(t){return!(!t||!t._isFragment)}}class v extends m{format(t){if(t||(t=d.sighash),d[t]||a.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",t!==d.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}static from(t){return"string"===typeof t?v.fromString(t):v.fromObject(t)}static fromObject(t){if(v.isEventFragment(t))return t;"event"!==t.type&&a.throwArgumentError("invalid event object","value",t);const e={name:I(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(g.fromObject):[],type:"event"};return new v(u,e)}static fromString(t){let e=t.match(M);e||a.throwArgumentError("invalid event string","value",t);let r=!1;return e[3].split(" ").forEach((t=>{switch(t.trim()){case"anonymous":r=!0;break;case"":break;default:a.warn("unknown modifier: "+t)}})),v.fromObject({name:e[1].trim(),anonymous:r,inputs:y(e[2],!0),type:"event"})}static isEventFragment(t){return t&&t._isFragment&&"event"===t.type}}function b(t,e){e.gas=null;let r=t.split("@");return 1!==r.length?(r.length>2&&a.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||a.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=n.O$.from(r[1]),r[0]):t}function w(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function E(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&a.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&a.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||a.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&a.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&a.throwArgumentError("unable to determine stateMutability","value",t),e}class A extends m{format(t){if(t||(t=d.sighash),d[t]||a.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});t===d.sighash&&a.throwError("cannot format a constructor for sighash",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let e="constructor("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}static from(t){return"string"===typeof t?A.fromString(t):A.fromObject(t)}static fromObject(t){if(A.isConstructorFragment(t))return t;"constructor"!==t.type&&a.throwArgumentError("invalid constructor object","value",t);let e=E(t);e.constant&&a.throwArgumentError("constructor cannot be constant","value",t);const r={name:null,type:t.type,inputs:t.inputs?t.inputs.map(g.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?n.O$.from(t.gas):null};return new A(u,r)}static fromString(t){let e={type:"constructor"},r=(t=b(t,e)).match(M);return r&&"constructor"===r[1].trim()||a.throwArgumentError("invalid constructor string","value",t),e.inputs=y(r[2].trim(),!1),w(r[3].trim(),e),A.fromObject(e)}static isConstructorFragment(t){return t&&t._isFragment&&"constructor"===t.type}}class k extends A{format(t){if(t||(t=d.sighash),d[t]||a.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",t!==d.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((e=>e.format(t))).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}static from(t){return"string"===typeof t?k.fromString(t):k.fromObject(t)}static fromObject(t){if(k.isFunctionFragment(t))return t;"function"!==t.type&&a.throwArgumentError("invalid function object","value",t);let e=E(t);const r={type:t.type,name:I(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(g.fromObject):[],outputs:t.outputs?t.outputs.map(g.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?n.O$.from(t.gas):null};return new k(u,r)}static fromString(t){let e={type:"function"},r=(t=b(t,e)).split(" returns ");r.length>2&&a.throwArgumentError("invalid function string","value",t);let n=r[0].match(M);if(n||a.throwArgumentError("invalid function signature","value",t),e.name=n[1].trim(),e.name&&I(e.name),e.inputs=y(n[2],!1),w(n[3].trim(),e),r.length>1){let n=r[1].match(M);""==n[1].trim()&&""==n[3].trim()||a.throwArgumentError("unexpected tokens","value",t),e.outputs=y(n[2],!1)}else e.outputs=[];return k.fromObject(e)}static isFunctionFragment(t){return t&&t._isFragment&&"function"===t.type}}function S(t){const e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||a.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class B extends m{format(t){if(t||(t=d.sighash),d[t]||a.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="error "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",e.trim()}static from(t){return"string"===typeof t?B.fromString(t):B.fromObject(t)}static fromObject(t){if(B.isErrorFragment(t))return t;"error"!==t.type&&a.throwArgumentError("invalid error object","value",t);const e={type:t.type,name:I(t.name),inputs:t.inputs?t.inputs.map(g.fromObject):[]};return S(new B(u,e))}static fromString(t){let e={type:"error"},r=t.match(M);return r||a.throwArgumentError("invalid error signature","value",t),e.name=r[1].trim(),e.name&&I(e.name),e.inputs=y(r[2],!1),S(B.fromObject(e))}static isErrorFragment(t){return t&&t._isFragment&&"error"===t.type}}function x(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const C=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function I(t){return t&&t.match(C)||a.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const M=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},83893:function(t,e,r){"use strict";r.r(e),r.d(e,{AbiCoder:function(){return i.R},ConstructorFragment:function(){return n.Xg},ErrorFragment:function(){return n.IC},EventFragment:function(){return n.QV},FormatTypes:function(){return n.pc},Fragment:function(){return n.HY},FunctionFragment:function(){return n.YW},Indexed:function(){return o.Hk},Interface:function(){return o.vU},LogDescription:function(){return o.CC},ParamType:function(){return n._R},TransactionDescription:function(){return o.vk},checkResultErrors:function(){return s.BR},defaultAbiCoder:function(){return i.$}});var n=r(11388),i=r(84243),o=r(8198),s=r(61184)},8198:function(t,e,r){"use strict";r.d(e,{CC:function(){return p},Hk:function(){return m},vU:function(){return w},vk:function(){return g}});var n=r(19485),i=r(2593),o=r(16441),s=r(32046),a=r(38197),u=r(6881),h=r(84243),c=r(11388),l=r(1581),f=r(95851);const d=new l.Logger(f.i);class p extends u.Description{}class g extends u.Description{}class y extends u.Description{}class m extends u.Description{static isIndexed(t){return!(!t||!t._isIndexed)}}const v={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function b(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class w{constructor(t){let e=[];e="string"===typeof t?JSON.parse(t):t,(0,u.defineReadOnly)(this,"fragments",e.map((t=>c.HY.from(t))).filter((t=>null!=t))),(0,u.defineReadOnly)(this,"_abiCoder",(0,u.getStatic)(new.target,"getAbiCoder")()),(0,u.defineReadOnly)(this,"functions",{}),(0,u.defineReadOnly)(this,"errors",{}),(0,u.defineReadOnly)(this,"events",{}),(0,u.defineReadOnly)(this,"structs",{}),this.fragments.forEach((t=>{let e=null;switch(t.type){case"constructor":return this.deploy?void d.warn("duplicate definition - constructor"):void(0,u.defineReadOnly)(this,"deploy",t);case"function":e=this.functions;break;case"event":e=this.events;break;case"error":e=this.errors;break;default:return}let r=t.format();e[r]?d.warn("duplicate definition - "+r):e[r]=t})),this.deploy||(0,u.defineReadOnly)(this,"deploy",c.Xg.from({payable:!1,type:"constructor"})),(0,u.defineReadOnly)(this,"_isInterface",!0)}format(t){t||(t=c.pc.full),t===c.pc.sighash&&d.throwArgumentError("interface does not support formatting sighash","format",t);const e=this.fragments.map((e=>e.format(t)));return t===c.pc.json?JSON.stringify(e.map((t=>JSON.parse(t)))):e}static getAbiCoder(){return h.$}static getAddress(t){return(0,n.getAddress)(t)}static getSighash(t){return(0,o.hexDataSlice)((0,s.id)(t.format()),0,4)}static getEventTopic(t){return(0,s.id)(t.format())}getFunction(t){if((0,o.isHexString)(t)){for(const e in this.functions)if(t===this.getSighash(e))return this.functions[e];d.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.functions).filter((t=>t.split("(")[0]===e));return 0===r.length?d.throwArgumentError("no matching function","name",e):r.length>1&&d.throwArgumentError("multiple matching functions","name",e),this.functions[r[0]]}const e=this.functions[c.YW.fromString(t).format()];return e||d.throwArgumentError("no matching function","signature",t),e}getEvent(t){if((0,o.isHexString)(t)){const e=t.toLowerCase();for(const t in this.events)if(e===this.getEventTopic(t))return this.events[t];d.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.events).filter((t=>t.split("(")[0]===e));return 0===r.length?d.throwArgumentError("no matching event","name",e):r.length>1&&d.throwArgumentError("multiple matching events","name",e),this.events[r[0]]}const e=this.events[c.QV.fromString(t).format()];return e||d.throwArgumentError("no matching event","signature",t),e}getError(t){if((0,o.isHexString)(t)){const e=(0,u.getStatic)(this.constructor,"getSighash");for(const r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}d.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.errors).filter((t=>t.split("(")[0]===e));return 0===r.length?d.throwArgumentError("no matching error","name",e):r.length>1&&d.throwArgumentError("multiple matching errors","name",e),this.errors[r[0]]}const e=this.errors[c.YW.fromString(t).format()];return e||d.throwArgumentError("no matching error","signature",t),e}getSighash(t){if("string"===typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(r){throw e}}return(0,u.getStatic)(this.constructor,"getSighash")(t)}getEventTopic(t){return"string"===typeof t&&(t=this.getEvent(t)),(0,u.getStatic)(this.constructor,"getEventTopic")(t)}_decodeParams(t,e){return this._abiCoder.decode(t,e)}_encodeParams(t,e){return this._abiCoder.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){"string"===typeof t&&(t=this.getError(t));const r=(0,o.arrayify)(e);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(t)&&d.throwArgumentError(`data signature does not match error ${t.name}.`,"data",(0,o.hexlify)(r)),this._decodeParams(t.inputs,r.slice(4))}encodeErrorResult(t,e){return"string"===typeof t&&(t=this.getError(t)),(0,o.hexlify)((0,o.concat)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionData(t,e){"string"===typeof t&&(t=this.getFunction(t));const r=(0,o.arrayify)(e);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(t)&&d.throwArgumentError(`data signature does not match function ${t.name}.`,"data",(0,o.hexlify)(r)),this._decodeParams(t.inputs,r.slice(4))}encodeFunctionData(t,e){return"string"===typeof t&&(t=this.getFunction(t)),(0,o.hexlify)((0,o.concat)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionResult(t,e){"string"===typeof t&&(t=this.getFunction(t));let r=(0,o.arrayify)(e),n=null,i="",s=null,a=null,u=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,r)}catch(h){}break;case 4:{const t=(0,o.hexlify)(r.slice(0,4)),e=v[t];if(e)s=this._abiCoder.decode(e.inputs,r.slice(4)),a=e.name,u=e.signature,e.reason&&(n=s[0]),"Error"===a?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:"Panic"===a&&(i=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{const e=this.getError(t);s=this._abiCoder.decode(e.inputs,r.slice(4)),a=e.name,u=e.format()}catch(h){}break}}return d.throwError("call revert exception"+i,l.Logger.errors.CALL_EXCEPTION,{method:t.format(),data:(0,o.hexlify)(e),errorArgs:s,errorName:a,errorSignature:u,reason:n})}encodeFunctionResult(t,e){return"string"===typeof t&&(t=this.getFunction(t)),(0,o.hexlify)(this._abiCoder.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){"string"===typeof t&&(t=this.getEvent(t)),e.length>t.inputs.length&&d.throwError("too many arguments for "+t.format(),l.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e});let r=[];t.anonymous||r.push(this.getEventTopic(t));const n=(t,e)=>"string"===t.type?(0,s.id)(e):"bytes"===t.type?(0,a.keccak256)((0,o.hexlify)(e)):("bool"===t.type&&"boolean"===typeof e&&(e=e?"0x01":"0x00"),t.type.match(/^u?int/)&&(e=i.O$.from(e).toHexString()),"address"===t.type&&this._abiCoder.encode(["address"],[e]),(0,o.hexZeroPad)((0,o.hexlify)(e),32));for(e.forEach(((e,i)=>{let o=t.inputs[i];o.indexed?null==e?r.push(null):"array"===o.baseType||"tuple"===o.baseType?d.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,e):Array.isArray(e)?r.push(e.map((t=>n(o,t)))):r.push(n(o,e)):null!=e&&d.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,e)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(t,e){"string"===typeof t&&(t=this.getEvent(t));const r=[],n=[],i=[];return t.anonymous||r.push(this.getEventTopic(t)),e.length!==t.inputs.length&&d.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach(((t,o)=>{const u=e[o];if(t.indexed)if("string"===t.type)r.push((0,s.id)(u));else if("bytes"===t.type)r.push((0,a.keccak256)(u));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([t.type],[u]))}else n.push(t),i.push(u)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(t,e,r){if("string"===typeof t&&(t=this.getEvent(t)),null!=r&&!t.anonymous){let e=this.getEventTopic(t);(0,o.isHexString)(r[0],32)&&r[0].toLowerCase()===e||d.throwError("fragment/topic mismatch",l.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:e,value:r[0]}),r=r.slice(1)}let n=[],i=[],s=[];t.inputs.forEach(((t,e)=>{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(n.push(c._R.fromObject({type:"bytes32",name:t.name})),s.push(!0)):(n.push(t),s.push(!1)):(i.push(t),s.push(!1))}));let a=null!=r?this._abiCoder.decode(n,(0,o.concat)(r)):null,u=this._abiCoder.decode(i,e,!0),h=[],f=0,p=0;t.inputs.forEach(((t,e)=>{if(t.indexed)if(null==a)h[e]=new m({_isIndexed:!0,hash:null});else if(s[e])h[e]=new m({_isIndexed:!0,hash:a[p++]});else try{h[e]=a[p++]}catch(r){h[e]=r}else try{h[e]=u[f++]}catch(r){h[e]=r}if(t.name&&null==h[t.name]){const r=h[e];r instanceof Error?Object.defineProperty(h,t.name,{enumerable:!0,get:()=>{throw b(`property ${JSON.stringify(t.name)}`,r)}}):h[t.name]=r}}));for(let o=0;o{throw b(`index ${o}`,t)}})}return Object.freeze(h)}parseTransaction(t){let e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new g({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:i.O$.from(t.value||"0")}):null}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new p({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}parseError(t){const e=(0,o.hexlify)(t);let r=this.getError(e.substring(0,10).toLowerCase());return r?new y({args:this._abiCoder.decode(r.inputs,"0x"+e.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(t){return!(!t||!t._isInterface)}}},81556:function(t,e,r){"use strict";r.d(e,{Sg:function(){return u},zt:function(){return h}});var n=r(2593),i=r(6881),o=r(1581);var s=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const a=new o.Logger("abstract-provider/5.7.0");class u extends i.Description{static isForkEvent(t){return!(!t||!t._isForkEvent)}}class h{constructor(){a.checkAbstract(new.target,h),(0,i.defineReadOnly)(this,"_isProvider",!0)}getFeeData(){return s(this,void 0,void 0,(function*(){const{block:t,gasPrice:e}=yield(0,i.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((t=>null))});let r=null,o=null,s=null;return t&&t.baseFeePerGas&&(r=t.baseFeePerGas,s=n.O$.from("1500000000"),o=t.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:r,maxFeePerGas:o,maxPriorityFeePerGas:s,gasPrice:e}}))}addListener(t,e){return this.on(t,e)}removeListener(t,e){return this.off(t,e)}static isProvider(t){return!(!t||!t._isProvider)}}},48088:function(t,e,r){"use strict";r.d(e,{E:function(){return h},b:function(){return c}});var n=r(6881),i=r(1581);var o=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const s=new i.Logger("abstract-signer/5.7.0"),a=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],u=[i.Logger.errors.INSUFFICIENT_FUNDS,i.Logger.errors.NONCE_EXPIRED,i.Logger.errors.REPLACEMENT_UNDERPRICED];class h{constructor(){s.checkAbstract(new.target,h),(0,n.defineReadOnly)(this,"_isSigner",!0)}getBalance(t){return o(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),t)}))}getTransactionCount(t){return o(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),t)}))}estimateGas(t){return o(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const e=yield(0,n.resolveProperties)(this.checkTransaction(t));return yield this.provider.estimateGas(e)}))}call(t,e){return o(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield(0,n.resolveProperties)(this.checkTransaction(t));return yield this.provider.call(r,e)}))}sendTransaction(t){return o(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const e=yield this.populateTransaction(t),r=yield this.signTransaction(e);return yield this.provider.sendTransaction(r)}))}getChainId(){return o(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(t){return o(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(t)}))}checkTransaction(t){for(const r in t)-1===a.indexOf(r)&&s.throwArgumentError("invalid transaction key: "+r,"transaction",t);const e=(0,n.shallowCopy)(t);return null==e.from?e.from=this.getAddress():e.from=Promise.all([Promise.resolve(e.from),this.getAddress()]).then((e=>(e[0].toLowerCase()!==e[1].toLowerCase()&&s.throwArgumentError("from address mismatch","transaction",t),e[0]))),e}populateTransaction(t){return o(this,void 0,void 0,(function*(){const e=yield(0,n.resolveProperties)(this.checkTransaction(t));null!=e.to&&(e.to=Promise.resolve(e.to).then((t=>o(this,void 0,void 0,(function*(){if(null==t)return null;const e=yield this.resolveName(t);return null==e&&s.throwArgumentError("provided ENS name resolves to null","tx.to",t),e})))),e.to.catch((t=>{})));const r=null!=e.maxFeePerGas||null!=e.maxPriorityFeePerGas;if(null==e.gasPrice||2!==e.type&&!r?0!==e.type&&1!==e.type||!r||s.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",t):s.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",t),2!==e.type&&null!=e.type||null==e.maxFeePerGas||null==e.maxPriorityFeePerGas)if(0===e.type||1===e.type)null==e.gasPrice&&(e.gasPrice=this.getGasPrice());else{const t=yield this.getFeeData();if(null==e.type)if(null!=t.maxFeePerGas&&null!=t.maxPriorityFeePerGas)if(e.type=2,null!=e.gasPrice){const t=e.gasPrice;delete e.gasPrice,e.maxFeePerGas=t,e.maxPriorityFeePerGas=t}else null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas);else null!=t.gasPrice?(r&&s.throwError("network does not support EIP-1559",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==e.gasPrice&&(e.gasPrice=t.gasPrice),e.type=0):s.throwError("failed to get consistent fee data",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===e.type&&(null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas))}else e.type=2;return null==e.nonce&&(e.nonce=this.getTransactionCount("pending")),null==e.gasLimit&&(e.gasLimit=this.estimateGas(e).catch((t=>{if(u.indexOf(t.code)>=0)throw t;return s.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,tx:e})}))),null==e.chainId?e.chainId=this.getChainId():e.chainId=Promise.all([Promise.resolve(e.chainId),this.getChainId()]).then((e=>(0!==e[1]&&e[0]!==e[1]&&s.throwArgumentError("chainId address mismatch","transaction",t),e[0]))),yield(0,n.resolveProperties)(e)}))}_checkProvider(t){this.provider||s.throwError("missing provider",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:t||"_checkProvider"})}static isSigner(t){return!(!t||!t._isSigner)}}class c extends h{constructor(t,e){super(),(0,n.defineReadOnly)(this,"address",t),(0,n.defineReadOnly)(this,"provider",e||null)}getAddress(){return Promise.resolve(this.address)}_fail(t,e){return Promise.resolve().then((()=>{s.throwError(t,i.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})}))}signMessage(t){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(t){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(t,e,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(t){return new c(this.address,t)}}},19485:function(t,e,r){"use strict";r.r(e),r.d(e,{getAddress:function(){return d},getContractAddress:function(){return y},getCreate2Address:function(){return m},getIcapAddress:function(){return g},isAddress:function(){return p}});var n=r(16441),i=r(2593),o=r(38197),s=r(59052);const a=new(r(1581).Logger)("address/5.7.0");function u(t){(0,n.isHexString)(t,20)||a.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let n=0;n<40;n++)r[n]=e[n].charCodeAt(0);const i=(0,n.arrayify)((0,o.keccak256)(r));for(let n=0;n<40;n+=2)i[n>>1]>>4>=8&&(e[n]=e[n].toUpperCase()),(15&i[n>>1])>=8&&(e[n+1]=e[n+1].toUpperCase());return"0x"+e.join("")}const h={};for(let v=0;v<10;v++)h[String(v)]=String(v);for(let v=0;v<26;v++)h[String.fromCharCode(65+v)]=String(10+v);const c=Math.floor((l=9007199254740991,Math.log10?Math.log10(l):Math.log(l)/Math.LN10));var l;function f(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>h[t])).join("");for(;e.length>=c;){let t=e.substring(0,c);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function d(t){let e=null;if("string"!==typeof t&&a.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=u(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&a.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==f(t)&&a.throwArgumentError("bad icap checksum","address",t),e=(0,i.g$)(t.substring(4));e.length<40;)e="0"+e;e=u("0x"+e)}else a.throwArgumentError("invalid address","address",t);return e}function p(t){try{return d(t),!0}catch(e){}return!1}function g(t){let e=(0,i.t2)(d(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+f("XE00"+e)+e}function y(t){let e=null;try{e=d(t.from)}catch(u){a.throwArgumentError("missing from address","transaction",t)}const r=(0,n.stripZeros)((0,n.arrayify)(i.O$.from(t.nonce).toHexString()));return d((0,n.hexDataSlice)((0,o.keccak256)((0,s.encode)([e,r])),12))}function m(t,e,r){return 32!==(0,n.hexDataLength)(e)&&a.throwArgumentError("salt must be 32 bytes","salt",e),32!==(0,n.hexDataLength)(r)&&a.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),d((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",d(t),e,r])),12))}},59567:function(t,e,r){"use strict";r.d(e,{J:function(){return i},c:function(){return o}});var n=r(16441);function i(t){t=atob(t);const e=[];for(let r=0;r0;)r.push(t%this.base),t=t/this.base|0}let i="";for(let n=0;0===e[n]&&n=0;--n)i+=this.alphabet[r[n]];return i}decode(t){if("string"!==typeof t)throw new TypeError("Expected String");let e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(let r=0;r>=8;for(;i>0;)e.push(255&i),i>>=8}for(let r=0;t[r]===this._leader&&r0&&(10===arguments[0]?d||(d=!0,h.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?h.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",s.Logger.errors.UNEXPECTED_ARGUMENT,{}):h.throwError("BigNumber.toString does not accept parameters",s.Logger.errors.UNEXPECTED_ARGUMENT,{})),m(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof p)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new p(c,g(t)):t.match(/^-?[0-9]+$/)?new p(c,g(new u(t))):h.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&v("underflow","BigNumber.from",t),(t>=l||t<=-l)&&v("overflow","BigNumber.from",t),p.from(String(t));const e=t;if("bigint"===typeof e)return p.from(e.toString());if((0,o.isBytes)(e))return p.from((0,o.hexlify)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return p.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&((0,o.isHexString)(t)||"-"===t[0]&&(0,o.isHexString)(t.substring(1))))return p.from(t)}return h.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function g(t){if("string"!==typeof t)return g(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&h.throwArgumentError("invalid hex","value",t),"0x00"===(t=g(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function y(t){return p.from(g(t))}function m(t){const e=p.from(t).toHexString();return"-"===e[0]?new u("-"+e.substring(3),16):new u(e.substring(2),16)}function v(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),h.throwError(t,s.Logger.errors.NUMERIC_FAULT,n)}function b(t){return new u(t,36).toString(16)}function w(t){return new u(t,16).toString(36)}},83877:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(88677).Buffer}catch(I){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function h(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u=49?h-49+10:h>=17?h-17+10:h,n(h>=0&&s0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c1&&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")]=l}catch(I){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?""}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],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];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?f[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=d[t],c=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var g=l.modrn(c).toString(t);r=(l=l.idivn(c)).isZero()?g+r:f[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=f;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,g=d>>>13,y=0|s[2],m=8191&y,v=y>>>13,b=0|s[3],w=8191&b,E=b>>>13,A=0|s[4],k=8191&A,S=A>>>13,B=0|s[5],x=8191&B,C=B>>>13,I=0|s[6],M=8191&I,T=I>>>13,O=0|s[7],R=8191&O,_=O>>>13,P=0|s[8],N=8191&P,U=P>>>13,L=0|s[9],D=8191&L,F=L>>>13,j=0|a[0],K=8191&j,z=j>>>13,H=0|a[1],q=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Z=G>>>13,J=0|a[3],Q=8191&J,X=J>>>13,Y=0|a[4],$=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,ft=ct>>>13,dt=0|a[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(h+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(f,K)|0))<<13)|0;h=((o=Math.imul(f,z))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,K),i=(i=Math.imul(p,z))+Math.imul(g,K)|0,o=Math.imul(g,z);var mt=(h+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,q)|0))<<13)|0;h=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,K),i=(i=Math.imul(m,z))+Math.imul(v,K)|0,o=Math.imul(v,z),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,V)|0;var vt=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(f,W)|0))<<13)|0;h=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,K),i=(i=Math.imul(w,z))+Math.imul(E,K)|0,o=Math.imul(E,z),n=n+Math.imul(m,q)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,Z)|0;var bt=(h+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,Q)|0))<<13)|0;h=((o=o+Math.imul(f,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(k,K),i=(i=Math.imul(k,z))+Math.imul(S,K)|0,o=Math.imul(S,z),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,X)|0;var wt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,z))+Math.imul(C,K)|0,o=Math.imul(C,z),n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,V)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var Et=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(M,K),i=(i=Math.imul(M,z))+Math.imul(T,K)|0,o=Math.imul(T,z),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var At=(h+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,ot)|0))<<13)|0;h=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(R,K),i=(i=Math.imul(R,z))+Math.imul(_,K)|0,o=Math.imul(_,z),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,X)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var kt=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((o=o+Math.imul(f,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,z))+Math.imul(U,K)|0,o=Math.imul(U,z),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,z))+Math.imul(F,K)|0,o=Math.imul(F,z),n=n+Math.imul(N,q)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(U,q)|0,o=o+Math.imul(U,V)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,ft)|0;var Bt=(h+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,pt)|0))<<13)|0;h=((o=o+Math.imul(f,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,V))+Math.imul(F,q)|0,o=Math.imul(F,V),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Z)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ft)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;h=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,Z))+Math.imul(F,W)|0,o=Math.imul(F,Z),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,X)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ht)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ft)|0;var Ct=(h+(n=n+Math.imul(m,pt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,X))+Math.imul(F,Q)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(U,$)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ft)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ft)|0;var It=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ft)|0;var Mt=(h+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(S,pt)|0))<<13)|0;h=((o=o+Math.imul(S,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(D,rt),i=(i=Math.imul(D,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,ot),i=(i=Math.imul(D,st))+Math.imul(F,ot)|0,o=Math.imul(F,st),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(U,ut)|0,o=o+Math.imul(U,ht)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ft)|0;var Ot=(h+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,ut),i=(i=Math.imul(D,ht))+Math.imul(F,ut)|0,o=Math.imul(F,ht),n=n+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(U,lt)|0,o=o+Math.imul(U,ft)|0;var Rt=(h+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,gt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,lt),i=(i=Math.imul(D,ft))+Math.imul(F,lt)|0,o=Math.imul(F,ft);var _t=(h+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(U,pt)|0))<<13)|0;h=((o=o+Math.imul(U,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863;var Pt=(h+(n=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,gt))+Math.imul(F,pt)|0))<<13)|0;return h=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=yt,u[1]=mt,u[2]=vt,u[3]=bt,u[4]=wt,u[5]=Et,u[6]=At,u[7]=kt,u[8]=St,u[9]=Bt,u[10]=xt,u[11]=Ct,u[12]=It,u[13]=Mt,u[14]=Tt,u[15]=Ot,u[16]=Rt,u[17]=_t,u[18]=Pt,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(t,e,r){return m(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(y=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):r<63?g(this,t,e):r<1024?m(this,t,e):v(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=f)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.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;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function E(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function B(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){x.call(this,t),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)}E.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},E.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},E.prototype.split=function(t,e){t.iushrn(this.n,0,e)},E.prototype.imulK=function(t){return t.imul(this.k)},i(A,E),A.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},A.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new A;else if("p224"===t)e=new k;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new B}return w[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(c(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var g=d,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,x),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),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(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},16441:function(t,e,r){"use strict";r.r(e),r.d(e,{arrayify:function(){return h},concat:function(){return c},hexConcat:function(){return v},hexDataLength:function(){return y},hexDataSlice:function(){return m},hexStripZeros:function(){return w},hexValue:function(){return b},hexZeroPad:function(){return E},hexlify:function(){return g},isBytes:function(){return u},isBytesLike:function(){return s},isHexString:function(){return d},joinSignature:function(){return k},splitSignature:function(){return A},stripZeros:function(){return l},zeroPad:function(){return f}});const n=new(r(1581).Logger)("bytes/5.7.0");function i(t){return!!t.toHexString}function o(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function s(t){return d(t)&&!(t.length%2)||u(t)}function a(t){return"number"===typeof t&&t==t&&t%1===0}function u(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"===typeof t)return!1;if(!a(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function h(t,e){if(e||(e={}),"number"===typeof t){n.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),o(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t)&&(t=t.toHexString()),d(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",t));const i=[];for(let t=0;th(t))),r=e.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(r);return e.reduce(((t,e)=>(n.set(e,t),t+e.length)),0),o(n)}function l(t){let e=h(t);if(0===e.length)return e;let r=0;for(;re&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),o(r)}function d(t,e){return!("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}const p="0123456789abcdef";function g(t,e){if(e||(e={}),"number"===typeof t){n.checkSafeUint53(t,"invalid hexlify value");let e="";for(;t;)e=p[15&t]+e,t=Math.floor(t/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if("bigint"===typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t))return t.toHexString();if(d(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":n.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(u(t)){let e="0x";for(let r=0;r>4]+p[15&n]}return e}return n.throwArgumentError("invalid hexlify value","value",t)}function y(t){if("string"!==typeof t)t=g(t);else if(!d(t)||t.length%2)return null;return(t.length-2)/2}function m(t,e,r){return"string"!==typeof t?t=g(t):(!d(t)||t.length%2)&&n.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function v(t){let e="0x";return t.forEach((t=>{e+=g(t).substring(2)})),e}function b(t){const e=w(g(t,{hexPad:"left"}));return"0x"===e?"0x0":e}function w(t){"string"!==typeof t&&(t=g(t)),d(t)||n.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&n.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function A(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(s(t)){let r=h(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=g(r.slice(0,32)),e.s=g(r.slice(32,64))):65===r.length?(e.r=g(r.slice(0,32)),e.s=g(r.slice(32,64)),e.v=r[64]):n.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:n.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=g(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const r=f(h(e._vs),32);e._vs=g(r);const i=r[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=i:e.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;const o=g(r);null==e.s?e.s=o:e.s!==o&&n.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?n.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const r=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&d(e.r)?e.r=E(e.r,32):n.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&d(e.s)?e.s=E(e.s,32):n.throwArgumentError("signature missing or invalid s","signature",t);const r=h(e.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const i=g(r);e._vs&&(d(e._vs)||n.throwArgumentError("signature invalid _vs","signature",t),e._vs=E(e._vs,32)),null==e._vs?e._vs=i:e._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function k(t){return g(c([(t=A(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},9279:function(t,e,r){"use strict";r.d(e,{d:function(){return n}});const n="0x0000000000000000000000000000000000000000"},21046:function(t,e,r){"use strict";r.d(e,{Bz:function(){return a},_Y:function(){return o},fh:function(){return s},tL:function(){return i}});var n=r(2593);const i=n.O$.from(-1),o=n.O$.from(0),s=n.O$.from(1),a=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},57218:function(t,e,r){"use strict";r.d(e,{R:function(){return n}});const n="0x0000000000000000000000000000000000000000000000000000000000000000"},64146:function(t,e,r){"use strict";r.d(e,{CH:function(){return x}});var n=r(61184),i=r(8198),o=r(81556),s=r(48088),a=r(19485),u=r(2593),h=r(16441),c=r(6881),l=r(83875),f=r(1581);var d=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const p=new f.Logger("contracts/5.7.0");function g(t,e){return d(this,void 0,void 0,(function*(){const r=yield e;"string"!==typeof r&&p.throwArgumentError("invalid address or ENS name","name",r);try{return(0,a.getAddress)(r)}catch(i){}t||p.throwError("a provider or signer is needed to resolve ENS names",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return null==n&&p.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function y(t,e,r){return d(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>y(t,Array.isArray(e)?e[n]:e[r.name],r)))):"address"===r.type?yield g(t,e):"tuple"===r.type?yield y(t,e,r.components):"array"===r.baseType?Array.isArray(e)?yield Promise.all(e.map((e=>y(t,e,r.arrayChildren)))):Promise.reject(p.makeError("invalid value for array",f.Logger.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e}))}function m(t,e,r){return d(this,void 0,void 0,(function*(){let n={};r.length===e.inputs.length+1&&"object"===typeof r[r.length-1]&&(n=(0,c.shallowCopy)(r.pop())),p.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=(0,c.resolveProperties)({override:g(t.signer,n.from),signer:t.signer.getAddress()}).then((t=>d(this,void 0,void 0,(function*(){return(0,a.getAddress)(t.signer)!==t.override&&p.throwError("Contract with a Signer cannot override from",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.override})))):n.from=t.signer.getAddress():n.from&&(n.from=g(t.provider,n.from));const i=yield(0,c.resolveProperties)({args:y(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:(0,c.resolveProperties)(n)||{}}),o=t.interface.encodeFunctionData(e,i.args),s={data:o,to:i.address},m=i.overrides;if(null!=m.nonce&&(s.nonce=u.O$.from(m.nonce).toNumber()),null!=m.gasLimit&&(s.gasLimit=u.O$.from(m.gasLimit)),null!=m.gasPrice&&(s.gasPrice=u.O$.from(m.gasPrice)),null!=m.maxFeePerGas&&(s.maxFeePerGas=u.O$.from(m.maxFeePerGas)),null!=m.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=u.O$.from(m.maxPriorityFeePerGas)),null!=m.from&&(s.from=m.from),null!=m.type&&(s.type=m.type),null!=m.accessList&&(s.accessList=(0,l.accessListify)(m.accessList)),null==s.gasLimit&&null!=e.gas){let t=21e3;const r=(0,h.arrayify)(o);for(let e=0;enull!=n[t]));return v.length&&p.throwError(`cannot override ${v.map((t=>JSON.stringify(t))).join(",")}`,f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:v}),s}))}function v(t,e){const r=e.wait.bind(e);e.wait=e=>r(e).then((e=>(e.events=e.logs.map((r=>{let n=(0,c.deepCopy)(r),i=null;try{i=t.interface.parseLog(r)}catch(o){}return i&&(n.args=i.args,n.decode=(e,r)=>t.interface.decodeEventLog(i.eventFragment,e,r),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>t.provider,n.getBlock=()=>t.provider.getBlock(e.blockHash),n.getTransaction=()=>t.provider.getTransaction(e.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(e),n})),e)))}function b(t,e,r){const n=t.signer||t.provider;return function(...i){return d(this,void 0,void 0,(function*(){let o;if(i.length===e.inputs.length+1&&"object"===typeof i[i.length-1]){const t=(0,c.shallowCopy)(i.pop());null!=t.blockTag&&(o=yield t.blockTag),delete t.blockTag,i.push(t)}null!=t.deployTransaction&&(yield t._deployed(o));const s=yield m(t,e,i),a=yield n.call(s,o);try{let n=t.interface.decodeFunctionResult(e,a);return r&&1===e.outputs.length&&(n=n[0]),n}catch(u){throw u.code===f.Logger.errors.CALL_EXCEPTION&&(u.address=t.address,u.args=i,u.transaction=s),u}}))}}function w(t,e,r){return e.constant?b(t,e,r):function(t,e){return function(...r){return d(this,void 0,void 0,(function*(){t.signer||p.throwError("sending a transaction requires a signer",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=t.deployTransaction&&(yield t._deployed());const n=yield m(t,e,r),i=yield t.signer.sendTransaction(n);return v(t,i),i}))}}(t,e)}function E(t){return!t.address||null!=t.topics&&0!==t.topics.length?(t.address||"*")+"@"+(t.topics?t.topics.map((t=>Array.isArray(t)?t.join("|"):t)).join(":"):""):"*"}class A{constructor(t,e){(0,c.defineReadOnly)(this,"tag",t),(0,c.defineReadOnly)(this,"filter",e),this._listeners=[]}addListener(t,e){this._listeners.push({listener:t,once:e})}removeListener(t){let e=!1;this._listeners=this._listeners.filter((r=>!(!e&&r.listener===t)||(e=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((t=>t.listener))}listenerCount(){return this._listeners.length}run(t){const e=this.listenerCount();return this._listeners=this._listeners.filter((e=>{const r=t.slice();return setTimeout((()=>{e.listener.apply(this,r)}),0),!e.once})),e}prepareEvent(t){}getEmit(t){return[t]}}class k extends A{constructor(){super("error",null)}}class S extends A{constructor(t,e,r,n){const i={address:t};let o=e.getEventTopic(r);n?(o!==n[0]&&p.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(E(i),i),(0,c.defineReadOnly)(this,"address",t),(0,c.defineReadOnly)(this,"interface",e),(0,c.defineReadOnly)(this,"fragment",r)}prepareEvent(t){super.prepareEvent(t),t.event=this.fragment.name,t.eventSignature=this.fragment.format(),t.decode=(t,e)=>this.interface.decodeEventLog(this.fragment,t,e);try{t.args=this.interface.decodeEventLog(this.fragment,t.data,t.topics)}catch(e){t.args=null,t.decodeError=e}}getEmit(t){const e=(0,n.BR)(t.args);if(e.length)throw e[0].error;const r=(t.args||[]).slice();return r.push(t),r}}class B extends A{constructor(t,e){super("*",{address:t}),(0,c.defineReadOnly)(this,"address",t),(0,c.defineReadOnly)(this,"interface",e)}prepareEvent(t){super.prepareEvent(t);try{const e=this.interface.parseLog(t);t.event=e.name,t.eventSignature=e.signature,t.decode=(t,r)=>this.interface.decodeEventLog(e.eventFragment,t,r),t.args=e.args}catch(e){}}}class x extends class{constructor(t,e,r){(0,c.defineReadOnly)(this,"interface",(0,c.getStatic)(new.target,"getInterface")(e)),null==r?((0,c.defineReadOnly)(this,"provider",null),(0,c.defineReadOnly)(this,"signer",null)):s.E.isSigner(r)?((0,c.defineReadOnly)(this,"provider",r.provider||null),(0,c.defineReadOnly)(this,"signer",r)):o.zt.isProvider(r)?((0,c.defineReadOnly)(this,"provider",r),(0,c.defineReadOnly)(this,"signer",null)):p.throwArgumentError("invalid signer or provider","signerOrProvider",r),(0,c.defineReadOnly)(this,"callStatic",{}),(0,c.defineReadOnly)(this,"estimateGas",{}),(0,c.defineReadOnly)(this,"functions",{}),(0,c.defineReadOnly)(this,"populateTransaction",{}),(0,c.defineReadOnly)(this,"filters",{});{const t={};Object.keys(this.interface.events).forEach((e=>{const r=this.interface.events[e];(0,c.defineReadOnly)(this.filters,e,((...t)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,t)}))),t[r.name]||(t[r.name]=[]),t[r.name].push(e)})),Object.keys(t).forEach((e=>{const r=t[e];1===r.length?(0,c.defineReadOnly)(this.filters,e,this.filters[r[0]]):p.warn(`Duplicate definition of ${e} (${r.join(", ")})`)}))}if((0,c.defineReadOnly)(this,"_runningEvents",{}),(0,c.defineReadOnly)(this,"_wrappedEmits",{}),null==t&&p.throwArgumentError("invalid contract address or ENS name","addressOrName",t),(0,c.defineReadOnly)(this,"address",t),this.provider)(0,c.defineReadOnly)(this,"resolvedAddress",g(this.provider,t));else try{(0,c.defineReadOnly)(this,"resolvedAddress",Promise.resolve((0,a.getAddress)(t)))}catch(u){p.throwError("provider is required to use ENS name as contract address",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((t=>{}));const n={},i={};Object.keys(this.interface.functions).forEach((t=>{const e=this.interface.functions[t];if(i[t])p.warn(`Duplicate ABI entry for ${JSON.stringify(t)}`);else{i[t]=!0;{const r=e.name;n[`%${r}`]||(n[`%${r}`]=[]),n[`%${r}`].push(t)}null==this[t]&&(0,c.defineReadOnly)(this,t,w(this,e,!0)),null==this.functions[t]&&(0,c.defineReadOnly)(this.functions,t,w(this,e,!1)),null==this.callStatic[t]&&(0,c.defineReadOnly)(this.callStatic,t,b(this,e,!0)),null==this.populateTransaction[t]&&(0,c.defineReadOnly)(this.populateTransaction,t,function(t,e){return function(...r){return m(t,e,r)}}(this,e)),null==this.estimateGas[t]&&(0,c.defineReadOnly)(this.estimateGas,t,function(t,e){const r=t.signer||t.provider;return function(...n){return d(this,void 0,void 0,(function*(){r||p.throwError("estimate require a provider or signer",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield m(t,e,n);return yield r.estimateGas(i)}))}}(this,e))}})),Object.keys(n).forEach((t=>{const e=n[t];if(e.length>1)return;t=t.substring(1);const r=e[0];try{null==this[t]&&(0,c.defineReadOnly)(this,t,this[r])}catch(i){}null==this.functions[t]&&(0,c.defineReadOnly)(this.functions,t,this.functions[r]),null==this.callStatic[t]&&(0,c.defineReadOnly)(this.callStatic,t,this.callStatic[r]),null==this.populateTransaction[t]&&(0,c.defineReadOnly)(this.populateTransaction,t,this.populateTransaction[r]),null==this.estimateGas[t]&&(0,c.defineReadOnly)(this.estimateGas,t,this.estimateGas[r])}))}static getContractAddress(t){return(0,a.getContractAddress)(t)}static getInterface(t){return i.vU.isInterface(t)?t:new i.vU(t)}deployed(){return this._deployed()}_deployed(t){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,t).then((t=>("0x"===t&&p.throwError("contract not deployed",f.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(t){this.signer||p.throwError("sending a transactions require a signer",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const e=(0,c.shallowCopy)(t||{});return["from","to"].forEach((function(t){null!=e[t]&&p.throwError("cannot override "+t,f.Logger.errors.UNSUPPORTED_OPERATION,{operation:t})})),e.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(e)))}connect(t){"string"===typeof t&&(t=new s.b(t,this.provider));const e=new this.constructor(this.address,this.interface,t);return this.deployTransaction&&(0,c.defineReadOnly)(e,"deployTransaction",this.deployTransaction),e}attach(t){return new this.constructor(t,this.interface,this.signer||this.provider)}static isIndexed(t){return i.Hk.isIndexed(t)}_normalizeRunningEvent(t){return this._runningEvents[t.tag]?this._runningEvents[t.tag]:t}_getRunningEvent(t){if("string"===typeof t){if("error"===t)return this._normalizeRunningEvent(new k);if("event"===t)return this._normalizeRunningEvent(new A("event",null));if("*"===t)return this._normalizeRunningEvent(new B(this.address,this.interface));const e=this.interface.getEvent(t);return this._normalizeRunningEvent(new S(this.address,this.interface,e))}if(t.topics&&t.topics.length>0){try{const e=t.topics[0];if("string"!==typeof e)throw new Error("invalid topic");const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new S(this.address,this.interface,r,t.topics))}catch(e){}const r={address:this.address,topics:t.topics};return this._normalizeRunningEvent(new A(E(r),r))}return this._normalizeRunningEvent(new B(this.address,this.interface))}_checkRunningEvents(t){if(0===t.listenerCount()){delete this._runningEvents[t.tag];const e=this._wrappedEmits[t.tag];e&&t.filter&&(this.provider.off(t.filter,e),delete this._wrappedEmits[t.tag])}}_wrapEvent(t,e,r){const n=(0,c.deepCopy)(e);return n.removeListener=()=>{r&&(t.removeListener(r),this._checkRunningEvents(t))},n.getBlock=()=>this.provider.getBlock(e.blockHash),n.getTransaction=()=>this.provider.getTransaction(e.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(e.transactionHash),t.prepareEvent(n),n}_addEventListener(t,e,r){if(this.provider||p.throwError("events require a provider or a signer with a provider",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),t.addListener(e,r),this._runningEvents[t.tag]=t,!this._wrappedEmits[t.tag]){const r=r=>{let n=this._wrapEvent(t,r,e);if(null==n.decodeError)try{const e=t.getEmit(n);this.emit(t.filter,...e)}catch(i){n.decodeError=i.error}null!=t.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[t.tag]=r,null!=t.filter&&this.provider.on(t.filter,r)}}queryFilter(t,e,r){const n=this._getRunningEvent(t),i=(0,c.shallowCopy)(n.filter);return"string"===typeof e&&(0,h.isHexString)(e,32)?(null!=r&&p.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=e):(i.fromBlock=null!=e?e:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((t=>t.map((t=>this._wrapEvent(n,t,null)))))}on(t,e){return this._addEventListener(this._getRunningEvent(t),e,!1),this}once(t,e){return this._addEventListener(this._getRunningEvent(t),e,!0),this}emit(t,...e){if(!this.provider)return!1;const r=this._getRunningEvent(t),n=r.run(e)>0;return this._checkRunningEvents(r),n}listenerCount(t){return this.provider?null==t?Object.keys(this._runningEvents).reduce(((t,e)=>t+this._runningEvents[e].listenerCount()),0):this._getRunningEvent(t).listenerCount():0}listeners(t){if(!this.provider)return[];if(null==t){const t=[];for(let e in this._runningEvents)this._runningEvents[e].listeners().forEach((e=>{t.push(e)}));return t}return this._getRunningEvent(t).listeners()}removeAllListeners(t){if(!this.provider)return this;if(null==t){for(const t in this._runningEvents){const e=this._runningEvents[t];e.removeAllListeners(),this._checkRunningEvents(e)}return this}const e=this._getRunningEvent(t);return e.removeAllListeners(),this._checkRunningEvents(e),this}off(t,e){if(!this.provider)return this;const r=this._getRunningEvent(t);return r.removeListener(e),this._checkRunningEvents(r),this}removeListener(t,e){return this.off(t,e)}}{}},35644:function(t,e,r){"use strict";r.d(e,{i:function(){return n}});const n="hash/5.7.0"},32046:function(t,e,r){"use strict";r.d(e,{id:function(){return o}});var n=r(38197),i=r(84917);function o(t){return(0,n.keccak256)((0,i.Y0)(t))}},75931:function(t,e,r){"use strict";r.r(e),r.d(e,{_TypedDataEncoder:function(){return s.E},dnsEncode:function(){return i.Kn},ensNormalize:function(){return i.w3},hashMessage:function(){return o.r},id:function(){return n.id},isValidName:function(){return i.r1},messagePrefix:function(){return o.B},namehash:function(){return i.VM}});var n=r(32046),i=r(27586),o=r(93684),s=r(67827)},93684:function(t,e,r){"use strict";r.d(e,{B:function(){return s},r:function(){return a}});var n=r(16441),i=r(38197),o=r(84917);const s="\x19Ethereum Signed Message:\n";function a(t){return"string"===typeof t&&(t=(0,o.Y0)(t)),(0,i.keccak256)((0,n.concat)([(0,o.Y0)(s),(0,o.Y0)(String(t.length)),t]))}},27586:function(t,e,r){"use strict";r.d(e,{Kn:function(){return P},w3:function(){return O},r1:function(){return R},VM:function(){return _}});var n=r(16441),i=r(84917),o=r(38197),s=r(1581),a=r(35644);function u(t,e){null==e&&(e=1);const r=[],n=r.forEach,i=function(t,e){n.call(t,(function(t){e>0&&Array.isArray(t)?i(t,e-1):r.push(t)}))};return i(t,e),r}function h(t){return function(t){let e=0;return()=>t[e++]}(function(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,o=[0,1];for(let w=1;w>--u&1}const l=Math.pow(2,31),f=l>>>1,d=f>>1,p=l-1;let g=0;for(let w=0;w<31;w++)g=g<<1|c();let y=[],m=0,v=l;for(;;){let t=Math.floor(((g-m+1)*i-1)/v),e=0,r=n;for(;r-e>1;){let n=e+r>>>1;t>>1|c(),s=s<<1^f,a=(a^f)<<1|f|1;m=s,v=1+a-s}let b=n-4;return y.map((e=>{switch(e-b){case 3:return b+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return b+256+(t[a++]<<8|t[a++]);case 1:return b+t[a++];default:return e-1}}))}(t))}function c(t){return 1&t?~t>>1:t>>1}function l(t,e){let r=Array(t);for(let n=0,i=-1;ne[t])):r}function p(t,e,r){let n=Array(t).fill(void 0).map((()=>[]));for(let i=0;in[e].push(t)));return n}function g(t,e){let r=1+e(),n=e(),i=function(t){let e=[];for(;;){let r=t();if(0==r)break;e.push(r)}return e}(e);return u(p(i.length,1+t,e).map(((t,e)=>{const o=t[0],s=t.slice(1);return Array(i[e]).fill(void 0).map(((t,e)=>{let i=e*n;return[o+e*r,s.map((t=>t+i))]}))})))}function y(t,e){return p(1+e(),1+t,e).map((t=>[t[0],t.slice(1)]))}const m=h((0,r(59567).J)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),v=new Set(d(m)),b=new Set(d(m)),w=function(t){let e=[];for(;;){let r=t();if(0==r)break;e.push(g(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(y(r,t))}return function(t){const e={};for(let r=0;rt-e));return function r(){let n=[];for(;;){let i=d(t,e);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((t,e)=>e.set.size-t.set.size));let i=t(),o=i%3;i=i/3|0;let s=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:s,save:1==i,check:2==i}}()}(m);function A(t){return(0,i.XL)(t)}function k(t){return t.filter((t=>65039!=t))}function S(t){for(let r of t.split(".")){let t=A(r);try{for(let e=t.lastIndexOf(95)-1;e>=0;e--)if(95!==t[e])throw new Error("underscore only allowed at start");if(t.length>=4&&t.every((t=>t<128))&&45===t[2]&&45===t[3])throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${r}": ${e.message}`)}}return t}function B(t){return S(function(t,e){let r=A(t).reverse(),n=[];for(;r.length;){let t=x(r);if(t){n.push(...e(t));continue}let i=r.pop();if(v.has(i)){n.push(i);continue}if(b.has(i))continue;let o=w[i];if(!o)throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`);n.push(...o)}return S(function(t){return t.normalize("NFC")}(String.fromCodePoint(...n)))}(t,k))}function x(t,e){var r;let n,i,o=E,s=[],a=t.length;for(e&&(e.length=0);a;){let u=t[--a];if(o=null===(r=o.branches.find((t=>t.set.has(u))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=u;else if(o.check&&u===i)break;s.push(u),o.fe0f&&(s.push(65039),a>0&&65039==t[a-1]&&a--),o.valid&&(n=s.slice(),2==o.valid&&n.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return n}const C=new s.Logger(a.i),I=new Uint8Array(32);function M(t){if(0===t.length)throw new Error("invalid ENS name; empty component");return t}function T(t){const e=(0,i.Y0)(B(t)),r=[];if(0===t.length)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(M(e.slice(n))),r}function O(t){return T(t).map((t=>(0,i.ZN)(t))).join(".")}function R(t){try{return 0!==T(t).length}catch(e){}return!1}function _(t){"string"!==typeof t&&C.throwArgumentError("invalid ENS name; not a string","name",t);let e=I;const r=T(t);for(;r.length;)e=(0,o.keccak256)((0,n.concat)([e,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(e)}function P(t){return(0,n.hexlify)((0,n.concat)(T(t).map((t=>{if(t.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const e=new Uint8Array(t.length+1);return e.set(t,1),e[0]=e.length-1,e}))))+"00"}I.fill(0)},67827:function(t,e,r){"use strict";r.d(e,{E:function(){return x}});var n=r(19485),i=r(2593),o=r(16441),s=r(38197),a=r(6881),u=r(1581),h=r(35644),c=r(32046),l=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const f=new u.Logger(h.i),d=new Uint8Array(32);d.fill(0);const p=i.O$.from(-1),g=i.O$.from(0),y=i.O$.from(1),m=i.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const v=(0,o.hexZeroPad)(y.toHexString(),32),b=(0,o.hexZeroPad)(g.toHexString(),32),w={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},E=["name","version","chainId","verifyingContract","salt"];function A(t){return function(e){return"string"!==typeof e&&f.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const k={name:A("name"),version:A("version"),chainId:function(t){try{return i.O$.from(t).toString()}catch(e){}return f.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return(0,n.getAddress)(t).toLowerCase()}catch(e){}return f.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=(0,o.arrayify)(t);if(32!==e.length)throw new Error("bad length");return(0,o.hexlify)(e)}catch(e){}return f.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function S(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=""===e[1],n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&f.throwArgumentError("invalid numeric width","type",t);const s=m.mask(r?n-1:n),a=r?s.add(y).mul(p):g;return function(e){const r=i.O$.from(e);return(r.lt(a)||r.gt(s))&&f.throwArgumentError(`value out-of-bounds for ${t}`,"value",e),(0,o.hexZeroPad)(r.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(0===r||r>32||e[1]!==String(r))&&f.throwArgumentError("invalid bytes width","type",t),function(e){return(0,o.arrayify)(e).length!==r&&f.throwArgumentError(`invalid length for ${t}`,"value",e),function(t){const e=(0,o.arrayify)(t),r=e.length%32;return r?(0,o.hexConcat)([e,d.slice(r)]):(0,o.hexlify)(e)}(e)}}}switch(t){case"address":return function(t){return(0,o.hexZeroPad)((0,n.getAddress)(t),32)};case"bool":return function(t){return t?v:b};case"bytes":return function(t){return(0,s.keccak256)(t)};case"string":return function(t){return(0,c.id)(t)}}return null}function B(t,e){return`${t}(${e.map((({name:t,type:e})=>e+" "+t)).join(",")})`}class x{constructor(t){(0,a.defineReadOnly)(this,"types",Object.freeze((0,a.deepCopy)(t))),(0,a.defineReadOnly)(this,"_encoderCache",{}),(0,a.defineReadOnly)(this,"_types",{});const e={},r={},n={};Object.keys(t).forEach((t=>{e[t]={},r[t]=[],n[t]={}}));for(const o in t){const n={};t[o].forEach((i=>{n[i.name]&&f.throwArgumentError(`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(o)}`,"types",t),n[i.name]=!0;const s=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===o&&f.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",t);S(s)||(r[s]||f.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",t),r[s].push(o),e[o][s]=!0)}))}const i=Object.keys(r).filter((t=>0===r[t].length));0===i.length?f.throwArgumentError("missing primary type","types",t):i.length>1&&f.throwArgumentError(`ambiguous primary types or unused types: ${i.map((t=>JSON.stringify(t))).join(", ")}`,"types",t),(0,a.defineReadOnly)(this,"primaryType",i[0]),function i(o,s){s[o]&&f.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",t),s[o]=!0,Object.keys(e[o]).forEach((t=>{r[t]&&(i(t,s),Object.keys(s).forEach((e=>{n[e][t]=!0})))})),delete s[o]}(this.primaryType,{});for(const o in n){const e=Object.keys(n[o]);e.sort(),this._types[o]=B(o,t[o])+e.map((e=>B(e,t[e]))).join("")}}getEncoder(t){let e=this._encoderCache[t];return e||(e=this._encoderCache[t]=this._getEncoder(t)),e}_getEncoder(t){{const e=S(t);if(e)return e}const e=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(e){const t=e[1],r=this.getEncoder(t),n=parseInt(e[3]);return e=>{n>=0&&e.length!==n&&f.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);let i=e.map(r);return this._types[t]&&(i=i.map(s.keccak256)),(0,s.keccak256)((0,o.hexConcat)(i))}}const r=this.types[t];if(r){const e=(0,c.id)(this._types[t]);return t=>{const n=r.map((({name:e,type:r})=>{const n=this.getEncoder(r)(t[e]);return this._types[r]?(0,s.keccak256)(n):n}));return n.unshift(e),(0,o.hexConcat)(n)}}return f.throwArgumentError(`unknown type: ${t}`,"type",t)}encodeType(t){const e=this._types[t];return e||f.throwArgumentError(`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return(0,s.keccak256)(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,r){if(S(t))return r(t,e);const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const t=n[1],i=parseInt(n[3]);return i>=0&&e.length!==i&&f.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e),e.map((e=>this._visit(t,e,r)))}const i=this.types[t];return i?i.reduce(((t,{name:n,type:i})=>(t[n]=this._visit(i,e[n],r),t)),{}):f.throwArgumentError(`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new x(t)}static getPrimaryType(t){return x.from(t).primaryType}static hashStruct(t,e,r){return x.from(e).hashStruct(t,r)}static hashDomain(t){const e=[];for(const r in t){const n=w[r];n||f.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",t),e.push({name:r,type:n})}return e.sort(((t,e)=>E.indexOf(t.name)-E.indexOf(e.name))),x.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,r){return(0,o.hexConcat)(["0x1901",x.hashDomain(t),x.from(e).hash(r)])}static hash(t,e,r){return(0,s.keccak256)(x.encode(t,e,r))}static resolveNames(t,e,r,n){return l(this,void 0,void 0,(function*(){t=(0,a.shallowCopy)(t);const i={};t.verifyingContract&&!(0,o.isHexString)(t.verifyingContract,20)&&(i[t.verifyingContract]="0x");const s=x.from(e);s.visit(r,((t,e)=>("address"!==t||(0,o.isHexString)(e,20)||(i[e]="0x"),e)));for(const t in i)i[t]=yield n(t);return t.verifyingContract&&i[t.verifyingContract]&&(t.verifyingContract=i[t.verifyingContract]),r=s.visit(r,((t,e)=>"address"===t&&i[e]?i[e]:e)),{domain:t,value:r}}))}static getPayload(t,e,r){x.hashDomain(t);const n={},s=[];E.forEach((e=>{const r=t[e];null!=r&&(n[e]=k[e](r),s.push({name:e,type:w[e]}))}));const u=x.from(e),h=(0,a.shallowCopy)(e);return h.EIP712Domain?f.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",e):h.EIP712Domain=s,u.encode(r),{types:h,domain:n,primaryType:u.primaryType,message:u.visit(r,((t,e)=>{if(t.match(/^bytes(\d*)/))return(0,o.hexlify)((0,o.arrayify)(e));if(t.match(/^u?int/))return i.O$.from(e).toString();switch(t){case"address":return e.toLowerCase();case"bool":return!!e;case"string":return"string"!==typeof e&&f.throwArgumentError("invalid string","value",e),e}return f.throwArgumentError("unsupported type","type",t)}))}}}},86507:function(t,e,r){"use strict";r.r(e),r.d(e,{HDNode:function(){return O},defaultPath:function(){return T},entropyToMnemonic:function(){return P},getAccountPath:function(){return U},isValidMnemonic:function(){return N},mnemonicToEntropy:function(){return _},mnemonicToSeed:function(){return R}});var n=r(57727),i=r(16441),o=r(2593),s=r(84917),a=r(85306),u=r(6881),h=r(67669),c=r(2006),l=r(21261),f=r(83875),d=r(32046),p=r(1581);const g=new p.Logger("wordlists/5.7.0");class y{constructor(t){g.checkAbstract(new.target,y),(0,u.defineReadOnly)(this,"locale",t)}split(t){return t.toLowerCase().split(/ +/g)}join(t){return t.join(" ")}static check(t){const e=[];for(let r=0;r<2048;r++){const n=t.getWord(r);if(r!==t.getWordIndex(n))return"0x";e.push(n)}return(0,d.id)(e.join("\n")+"\n")}static register(t,e){e||(e=t.locale)}}let m=null;function v(t){if(null==m&&(m="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==y.check(t)))throw m=null,new Error("BIP39 Wordlist for en (English) FAILED")}const b=new class extends y{constructor(){super("en")}getWord(t){return v(this),m[t]}getWordIndex(t){return v(this),m.indexOf(t)}};y.register(b);const w={en:b},E=new p.Logger("hdnode/5.7.0"),A=o.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),k=(0,s.Y0)("Bitcoin seed"),S=2147483648;function B(t){return(1<=256)throw new Error("Depth too large!");return C((0,i.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,i.hexlify)(this.depth),this.parentFingerprint,(0,i.hexZeroPad)((0,i.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,i.concat)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new O(M,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(t){if(t>4294967295)throw new Error("invalid index - "+String(t));let e=this.path;e&&(e+="/"+(2147483647&t));const r=new Uint8Array(37);if(t&S){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set((0,i.arrayify)(this.privateKey),1),e&&(e+="'")}else r.set((0,i.arrayify)(this.publicKey));for(let i=24;i>=0;i-=8)r[33+(i>>3)]=t>>24-i&255;const n=(0,i.arrayify)((0,c.Gy)(l.p.sha512,this.chainCode,r)),s=n.slice(0,32),a=n.slice(32);let u=null,f=null;if(this.privateKey)u=x(o.O$.from(s).add(this.privateKey).mod(A));else{f=new h.SigningKey((0,i.hexlify)(s))._addPoint(this.publicKey)}let d=e;const p=this.mnemonic;return p&&(d=Object.freeze({phrase:p.phrase,path:e,locale:p.locale||"en"})),new O(M,u,f,this.fingerprint,x(a),t,this.depth+1,d)}derivePath(t){const e=t.split("/");if(0===e.length||"m"===e[0]&&0!==this.depth)throw new Error("invalid path - "+t);"m"===e[0]&&e.shift();let r=this;for(let n=0;n=S)throw new Error("invalid path index - "+t);r=r._derive(S+e)}else{if(!t.match(/^[0-9]+$/))throw new Error("invalid path component - "+t);{const e=parseInt(t);if(e>=S)throw new Error("invalid path index - "+t);r=r._derive(e)}}}return r}static _fromSeed(t,e){const r=(0,i.arrayify)(t);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=(0,i.arrayify)((0,c.Gy)(l.p.sha512,k,r));return new O(M,x(n.slice(0,32)),null,"0x00000000",x(n.slice(32)),0,0,e)}static fromMnemonic(t,e,r){return t=P(_(t,r=I(r)),r),O._fromSeed(R(t,e),{phrase:t,path:"m",locale:r.locale})}static fromSeed(t){return O._fromSeed(t,null)}static fromExtendedKey(t){const e=n.Base58.decode(t);82===e.length&&C(e.slice(0,78))===t||E.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=e[4],o=(0,i.hexlify)(e.slice(5,9)),s=parseInt((0,i.hexlify)(e.slice(9,13)).substring(2),16),a=(0,i.hexlify)(e.slice(13,45)),u=e.slice(45,78);switch((0,i.hexlify)(e.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new O(M,null,(0,i.hexlify)(u),o,a,s,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==u[0])break;return new O(M,(0,i.hexlify)(u.slice(1)),null,o,a,s,r,null)}return E.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function R(t,e){e||(e="");const r=(0,s.Y0)("mnemonic"+e,s.Uj.NFKD);return(0,a.n)((0,s.Y0)(t,s.Uj.NFKD),r,2048,64,"sha512")}function _(t,e){e=I(e),E.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=(0,i.arrayify)(new Uint8Array(Math.ceil(11*r.length/8)));let o=0;for(let i=0;i>3]|=1<<7-o%8),o++}const s=32*r.length/3,a=B(r.length/3);if(((0,i.arrayify)((0,c.JQ)(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return(0,i.hexlify)(n.slice(0,s/8))}function P(t,e){if(e=I(e),(t=(0,i.arrayify)(t)).length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let i=0;i8?(r[r.length-1]<<=8,r[r.length-1]|=t[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[i]>>8-n,r.push(t[i]&(1<<8-n)-1),n+=3);const o=t.length/4,s=(0,i.arrayify)((0,c.JQ)(t))[0]&B(o);return r[r.length-1]<<=o,r[r.length-1]|=s>>8-o,e.join(r.map((t=>e.getWord(t))))}function N(t,e){try{return _(t,e),!0}catch(r){}return!1}function U(t){return("number"!==typeof t||t<0||t>=S||t%1)&&E.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}},29816:function(t,e,r){"use strict";r.d(e,{i:function(){return n}});const n="json-wallets/5.7.0"},45659:function(t,e,r){"use strict";r.r(e),r.d(e,{decryptCrowdsale:function(){return y},decryptJsonWallet:function(){return E},decryptJsonWalletSync:function(){return A},decryptKeystore:function(){return w.pe},decryptKeystoreSync:function(){return w.hb},encryptKeystore:function(){return w.HI},getJsonWalletAddress:function(){return b},isCrowdsaleWallet:function(){return m},isKeystoreWallet:function(){return v}});var n=r(78826),i=r.n(n),o=r(19485),s=r(16441),a=r(38197),u=r(85306),h=r(84917),c=r(6881),l=r(1581),f=r(29816),d=r(97013);const p=new l.Logger(f.i);class g extends c.Description{isCrowdsaleAccount(t){return!(!t||!t._isCrowdsaleAccount)}}function y(t,e){const r=JSON.parse(t);e=(0,d.Ij)(e);const n=(0,o.getAddress)((0,d.gx)(r,"ethaddr")),c=(0,d.p3)((0,d.gx)(r,"encseed"));c&&c.length%16===0||p.throwArgumentError("invalid encseed","json",t);const l=(0,s.arrayify)((0,u.n)(e,e,2e3,32,"sha256")).slice(0,16),f=c.slice(0,16),y=c.slice(16),m=new(i().ModeOfOperation.cbc)(l,f),v=i().padding.pkcs7.strip((0,s.arrayify)(m.decrypt(y)));let b="";for(let i=0;i{const r=(e=(0,u.arrayify)(e)).slice(0,16),n=e.slice(16,32),s=e.slice(32,64),a=new(i().Counter)(E),h=new(i().ModeOfOperation.ctr)(r,a),l=(0,u.arrayify)(h.encrypt(o)),p=(0,c.keccak256)((0,u.concat)([n,l])),w={address:t.address.substring(2).toLowerCase(),id:(0,g.EH)(A),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,u.hexlify)(E).substring(2)},ciphertext:(0,u.hexlify)(l).substring(2),kdf:"scrypt",kdfparams:{salt:(0,u.hexlify)(b).substring(2),n:k,dklen:32,p:B,r:S},mac:p.substring(2)}};if(d){const t=(0,f.O)(16),e=new(i().Counter)(t),r=new(i().ModeOfOperation.ctr)(s,e),n=(0,u.arrayify)(r.encrypt(d)),o=new Date,a=o.getUTCFullYear()+"-"+(0,g.VP)(o.getUTCMonth()+1,2)+"-"+(0,g.VP)(o.getUTCDate(),2)+"T"+(0,g.VP)(o.getUTCHours(),2)+"-"+(0,g.VP)(o.getUTCMinutes(),2)+"-"+(0,g.VP)(o.getUTCSeconds(),2)+".0Z";w["x-ethers"]={client:v,gethFilename:"UTC--"+a+"--"+w.address,mnemonicCounter:(0,u.hexlify)(t).substring(2),mnemonicCiphertext:(0,u.hexlify)(n).substring(2),path:y,locale:m,version:"0.1"}}return JSON.stringify(w)}))}},97013:function(t,e,r){"use strict";r.d(e,{EH:function(){return h},Ij:function(){return a},VP:function(){return s},gx:function(){return u},p3:function(){return o}});var n=r(16441),i=r(84917);function o(t){return"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),(0,n.arrayify)(t)}function s(t,e){for(t=String(t);t.length{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var h,c;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(h||(h={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(c||(c={}));const l="0123456789abcdef";class f{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",t),s>o[r]||console.log.apply(console,e)}debug(...t){this._log(f.levels.DEBUG,t)}info(...t){this._log(f.levels.INFO,t)}warn(...t){this._log(f.levels.WARNING,t)}makeError(t,e,r){if(i)return this.makeError("censored error",e,{});e||(e=f.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((t=>{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t>4],r+=l[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(a){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push(`code=${e}`),n.push(`version=${this.version}`);const o=t;let s="";switch(e){case c.NUMERIC_FAULT:{s="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":s+="-"+e;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.UNPREDICTABLE_GAS_LIMIT:s=e}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const a=new Error(t);return a.reason=o,a.code=e,Object.keys(r).forEach((function(t){a[t]=r[t]})),a}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,f.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",f.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",te&&this.throwError("too many arguments"+r,f.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",f.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",f.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",f.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return a||(a=new f("logger/5.7.0")),a}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!t)return;this.globalLogger().throwError("error censorship permanent",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!t,n=!!e}static setLogLevel(t){const e=o[t.toLowerCase()];null!=e?s=e:f.globalLogger().warn("invalid log level - "+t)}static from(t){return new f(t)}}f.errors=c,f.levels=h},45710:function(t,e,r){"use strict";r.d(e,{H:function(){return c}});const n=new(r(1581).Logger)("networks/5.7.1");function i(t){const e=function(e,r){null==r&&(r={});const n=[];if(e.InfuraProvider&&"-"!==r.infura)try{n.push(new e.InfuraProvider(t,r.infura))}catch(i){}if(e.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new e.EtherscanProvider(t,r.etherscan))}catch(i){}if(e.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new e.AlchemyProvider(t,r.alchemy))}catch(i){}if(e.PocketProvider&&"-"!==r.pocket){const o=["goerli","ropsten","rinkeby","sepolia"];try{const i=new e.PocketProvider(t,r.pocket);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(i){}}if(e.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new e.CloudflareProvider(t))}catch(i){}if(e.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new e.AnkrProvider(t,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(i){}if(0===n.length)return null;if(e.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===t&&(i=2),new e.FallbackProvider(n,i)}return n[0]};return e.renetwork=function(t){return i(t)},e}function o(t,e){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(t,e):null};return r.renetwork=function(e){return o(t,e)},r}const s={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:i("homestead")},a={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:i("ropsten")},u={chainId:63,name:"classicMordor",_defaultProvider:o("https://www.ethercluster.com/mordor","classicMordor")},h={unspecified:{chainId:0,name:"unspecified"},homestead:s,mainnet:s,morden:{chainId:2,name:"morden"},ropsten:a,testnet:a,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:i("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:i("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:i("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:i("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:o("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:u,classicTestnet:u,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:o("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:i("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:i("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function c(t){if(null==t)return null;if("number"===typeof t){for(const e in h){const r=h[e];if(r.chainId===t)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"===typeof t){const e=h[t];return null==e?null:{name:e.name,chainId:e.chainId,ensAddress:e.ensAddress,_defaultProvider:e._defaultProvider||null}}const e=h[t.name];if(!e)return"number"!==typeof t.chainId&&n.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==e.chainId&&n.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;var i;return null==r&&e._defaultProvider&&(r=(i=e._defaultProvider)&&"function"===typeof i.renetwork?e._defaultProvider.renetwork(t):e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}},85306:function(t,e,r){"use strict";r.d(e,{n:function(){return o}});var n=r(16441),i=r(2006);function o(t,e,r,o,s){let a;t=(0,n.arrayify)(t),e=(0,n.arrayify)(e);let u=1;const h=new Uint8Array(o),c=new Uint8Array(e.length+4);let l,f;c.set(e);for(let d=1;d<=u;d++){c[e.length]=d>>24&255,c[e.length+1]=d>>16&255,c[e.length+2]=d>>8&255,c[e.length+3]=255&d;let p=(0,n.arrayify)((0,i.Gy)(s,t,c));a||(a=p.length,f=new Uint8Array(a),u=Math.ceil(o/a),l=o-(u-1)*a),f.set(p);for(let e=1;e{const r=t[e];return Promise.resolve(r).then((t=>({key:e,value:t})))}));return(yield Promise.all(e)).reduce(((t,e)=>(t[e.key]=e.value,t)),{})}))}function h(t,e){t&&"object"===typeof t||o.throwArgumentError("invalid object","object",t),Object.keys(t).forEach((r=>{e[r]||o.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)}))}function c(t){const e={};for(const r in t)e[r]=t[r];return e}const l={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function f(t){if(void 0===t||null===t||l[typeof t])return!0;if(Array.isArray(t)||"object"===typeof t){if(!Object.isFrozen(t))return!1;const r=Object.keys(t);for(let n=0;np(t))));if("object"===typeof t){const e={};for(const r in t){const n=t[r];void 0!==n&&s(e,r,p(n))}return e}return o.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function p(t){return d(t)}class g{constructor(t){for(const e in t)this[e]=p(t[e])}}},34216:function(t,e,r){"use strict";r.d(e,{i:function(){return n}});const n="providers/5.7.2"},57734:function(t,e,r){"use strict";r.d(e,{D:function(){return y}});var n=r(6881),i=r(30032),o=r(88089),s=r(1581),a=r(34216),u=r(34674),h=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const c=new s.Logger(a.i);class l extends u.r{detectNetwork(){const t=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return h(this,void 0,void 0,(function*(){let e=this.network;return null==e&&(e=yield t.detectNetwork.call(this),e||c.throwError("no network detected",s.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,n.defineReadOnly)(this,"_network",e),this.emit("network",e,null))),e}))}}class f extends l{constructor(t,e){c.checkAbstract(new.target,f),t=(0,n.getStatic)(new.target,"getNetwork")(t),e=(0,n.getStatic)(new.target,"getApiKey")(e);super((0,n.getStatic)(new.target,"getUrl")(t,e),t),"string"===typeof e?(0,n.defineReadOnly)(this,"apiKey",e):null!=e&&Object.keys(e).forEach((t=>{(0,n.defineReadOnly)(this,t,e[t])}))}_startPending(){c.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(t){return c.throwError("API provider does not support signing",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(t){return t}static getUrl(t,e){return c.throwError("not implemented; sub-classes must override getUrl",s.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const d=new s.Logger(a.i),p="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class g extends o.q{constructor(t,e){const r=new y(t,e);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),(0,n.defineReadOnly)(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===p}}class y extends f{static getWebSocketProvider(t,e){return new g(t,e)}static getApiKey(t){return null==t?p:(t&&"string"!==typeof t&&d.throwArgumentError("invalid apiKey","apiKey",t),t)}static getUrl(t,e){let r=null;switch(t.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:d.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+e,throttleCallback:(t,r)=>(e===p&&(0,i.vh)(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===p}}},30032:function(t,e,r){"use strict";r.d(e,{Mb:function(){return f},vh:function(){return p}});var n=r(19485),i=r(2593),o=r(16441),s=r(9279),a=r(6881),u=r(83875),h=r(1581),c=r(34216);const l=new h.Logger(c.i);class f{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const t={},e=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),s=this.hex.bind(this),u=this.number.bind(this),h=this.type.bind(this);return t.transaction={hash:o,type:h,accessList:f.allowNull(this.accessList.bind(this),null),blockHash:f.allowNull(o,null),blockNumber:f.allowNull(u,null),transactionIndex:f.allowNull(u,null),confirmations:f.allowNull(u,null),from:e,gasPrice:f.allowNull(r),maxPriorityFeePerGas:f.allowNull(r),maxFeePerGas:f.allowNull(r),gasLimit:r,to:f.allowNull(e,null),value:r,nonce:u,data:i,r:f.allowNull(this.uint256),s:f.allowNull(this.uint256),v:f.allowNull(u),creates:f.allowNull(e,null),raw:f.allowNull(i)},t.transactionRequest={from:f.allowNull(e),nonce:f.allowNull(u),gasLimit:f.allowNull(r),gasPrice:f.allowNull(r),maxPriorityFeePerGas:f.allowNull(r),maxFeePerGas:f.allowNull(r),to:f.allowNull(e),value:f.allowNull(r),data:f.allowNull((t=>this.data(t,!0))),type:f.allowNull(u),accessList:f.allowNull(this.accessList.bind(this),null)},t.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:o,address:e,topics:f.arrayOf(o),data:i,logIndex:u,blockHash:o},t.receipt={to:f.allowNull(this.address,null),from:f.allowNull(this.address,null),contractAddress:f.allowNull(e,null),transactionIndex:u,root:f.allowNull(s),gasUsed:r,logsBloom:f.allowNull(i),blockHash:o,transactionHash:o,logs:f.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:f.allowNull(u,null),cumulativeGasUsed:r,effectiveGasPrice:f.allowNull(r),status:f.allowNull(u),type:h},t.block={hash:f.allowNull(o),parentHash:o,number:u,timestamp:u,nonce:f.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:f.allowNull(e),extraData:i,transactions:f.allowNull(f.arrayOf(o)),baseFeePerGas:f.allowNull(r)},t.blockWithTransactions=(0,a.shallowCopy)(t.block),t.blockWithTransactions.transactions=f.allowNull(f.arrayOf(this.transactionResponse.bind(this))),t.filter={fromBlock:f.allowNull(n,void 0),toBlock:f.allowNull(n,void 0),blockHash:f.allowNull(o,void 0),address:f.allowNull(e,void 0),topics:f.allowNull(this.topics.bind(this),void 0)},t.filterLog={blockNumber:f.allowNull(u),blockHash:f.allowNull(o),transactionIndex:u,removed:f.allowNull(this.boolean.bind(this)),address:e,data:f.allowFalsish(i,"0x"),topics:f.arrayOf(o),transactionHash:o,logIndex:u},t}accessList(t){return(0,u.accessListify)(t||[])}number(t){return"0x"===t?0:i.O$.from(t).toNumber()}type(t){return"0x"===t||null==t?0:i.O$.from(t).toNumber()}bigNumber(t){return i.O$.from(t)}boolean(t){if("boolean"===typeof t)return t;if("string"===typeof t){if("true"===(t=t.toLowerCase()))return!0;if("false"===t)return!1}throw new Error("invalid boolean - "+t)}hex(t,e){return"string"===typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),(0,o.isHexString)(t))?t.toLowerCase():l.throwArgumentError("invalid hash","value",t)}data(t,e){const r=this.hex(t,e);if(r.length%2!==0)throw new Error("invalid data; odd-length - "+t);return r}address(t){return(0,n.getAddress)(t)}callAddress(t){if(!(0,o.isHexString)(t,32))return null;const e=(0,n.getAddress)((0,o.hexDataSlice)(t,12));return e===s.d?null:e}contractAddress(t){return(0,n.getContractAddress)(t)}blockTag(t){if(null==t)return"latest";if("earliest"===t)return"0x0";switch(t){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return t}if("number"===typeof t||(0,o.isHexString)(t))return(0,o.hexValue)(t);throw new Error("invalid blockTag")}hash(t,e){const r=this.hex(t,e);return 32!==(0,o.hexDataLength)(r)?l.throwArgumentError("invalid hash","value",t):r}difficulty(t){if(null==t)return null;const e=i.O$.from(t);try{return e.toNumber()}catch(r){}return null}uint256(t){if(!(0,o.isHexString)(t))throw new Error("invalid uint256");return(0,o.hexZeroPad)(t,32)}_block(t,e){null!=t.author&&null==t.miner&&(t.miner=t.author);const r=null!=t._difficulty?t._difficulty:t.difficulty,n=f.check(e,t);return n._difficulty=null==r?null:i.O$.from(r),n}block(t){return this._block(t,this.formats.block)}blockWithTransactions(t){return this._block(t,this.formats.blockWithTransactions)}transactionRequest(t){return f.check(this.formats.transactionRequest,t)}transactionResponse(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&i.O$.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),1!==t.type&&2!==t.type||null!=t.accessList||(t.accessList=[]);const e=f.check(this.formats.transaction,t);if(null!=t.chainId){let r=t.chainId;(0,o.isHexString)(r)&&(r=i.O$.from(r).toNumber()),e.chainId=r}else{let r=t.networkId;null==r&&null==e.v&&(r=t.chainId),(0,o.isHexString)(r)&&(r=i.O$.from(r).toNumber()),"number"!==typeof r&&null!=e.v&&(r=(e.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!==typeof r&&(r=0),e.chainId=r}return e.blockHash&&"x"===e.blockHash.replace(/0/g,"")&&(e.blockHash=null),e}transaction(t){return(0,u.parse)(t)}receiptLog(t){return f.check(this.formats.receiptLog,t)}receipt(t){const e=f.check(this.formats.receipt,t);if(null!=e.root)if(e.root.length<=4){const t=i.O$.from(e.root).toNumber();0===t||1===t?(null!=e.status&&e.status!==t&&l.throwArgumentError("alt-root-status/status mismatch","value",{root:e.root,status:e.status}),e.status=t,delete e.root):l.throwArgumentError("invalid alt-root-status","value.root",e.root)}else 66!==e.root.length&&l.throwArgumentError("invalid root hash","value.root",e.root);return null!=e.status&&(e.byzantium=!0),e}topics(t){return Array.isArray(t)?t.map((t=>this.topics(t))):null!=t?this.hash(t,!0):null}filter(t){return f.check(this.formats.filter,t)}filterLog(t){return f.check(this.formats.filterLog,t)}static check(t,e){const r={};for(const i in t)try{const n=t[i](e[i]);void 0!==n&&(r[i]=n)}catch(n){throw n.checkKey=i,n.checkValue=e[i],n}return r}static allowNull(t,e){return function(r){return null==r?e:t(r)}}static allowFalsish(t,e){return function(r){return r?t(r):e}}static arrayOf(t){return function(e){if(!Array.isArray(e))throw new Error("not an array");const r=[];return e.forEach((function(e){r.push(t(e))})),r}}}let d=!1;function p(){d||(d=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}},34674:function(t,e,r){"use strict";r.d(e,{r:function(){return ot}});var n=r(48088),i=r(2593),o=r(16441),s=r(67827),a=r(6881),u=r(84917),h=r(83875),c=r(37707),l=r(1581),f=r(34216),d=r(81556),p=r(59567),g=r(57727),y=r(57218),m=r(27586),v=r(45710),b=r(2006),w=r(85751),E=r.n(w),A=r(30032),k=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const S=new l.Logger(f.i);function B(t){return null==t?"null":(32!==(0,o.hexDataLength)(t)&&S.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function x(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map((t=>{if(Array.isArray(t)){const e={};t.forEach((t=>{e[B(t)]=!0}));const r=Object.keys(e);return r.sort(),r.join("|")}return B(t)})).join("&")}function C(t){if("string"===typeof t){if(t=t.toLowerCase(),32===(0,o.hexDataLength)(t))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+x(t);if(d.Sg.isForkEvent(t))throw S.warn("not implemented"),new Error("not implemented");if(t&&"object"===typeof t)return"filter:"+(t.address||"*")+":"+x(t.topics||[])}throw new Error("invalid event - "+t)}function I(){return(new Date).getTime()}function M(t){return new Promise((e=>{setTimeout(e,t)}))}const T=["block","network","pending","poll"];class O{constructor(t,e,r){(0,a.defineReadOnly)(this,"tag",t),(0,a.defineReadOnly)(this,"listener",e),(0,a.defineReadOnly)(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const t=this.tag.split(":");return"tx"!==t[0]?null:t[1]}get filter(){const t=this.tag.split(":");if("filter"!==t[0])return null;const e=t[1],r=""===(n=t[2])?[]:n.split(/&/g).map((t=>{if(""===t)return[];const e=t.split("|").map((t=>"null"===t?null:t));return 1===e.length?e[0]:e}));var n;const i={};return r.length>0&&(i.topics=r),e&&"*"!==e&&(i.address=e),i}pollable(){return this.tag.indexOf(":")>=0||T.indexOf(this.tag)>=0}}const R={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function _(t){return(0,o.hexZeroPad)(i.O$.from(t).toHexString(),32)}function P(t){return g.Base58.encode((0,o.concat)([t,(0,o.hexDataSlice)((0,b.JQ)((0,b.JQ)(t)),0,4)]))}const N=new RegExp("^(ipfs)://(.*)$","i"),U=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),N,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function L(t,e){try{return(0,u.ZN)(D(t,e))}catch(r){}return null}function D(t,e){if("0x"===t)return null;const r=i.O$.from((0,o.hexDataSlice)(t,e,e+32)).toNumber(),n=i.O$.from((0,o.hexDataSlice)(t,r,r+32)).toNumber();return(0,o.hexDataSlice)(t,r+32,r+32+n)}function F(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):S.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function j(t){const e=(0,o.arrayify)(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function K(t){if(t.length%32===0)return t;const e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}function z(t){const e=[];let r=0;for(let n=0;ni.O$.from(t).eq(1))).catch((t=>{if(t.code===l.Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,t}))),this._supportsEip2544}_fetch(t,e){return k(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:(0,o.hexConcat)([t,(0,m.VM)(this.name),e||"0x"])};let n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=(0,o.hexConcat)(["0x9061b923",z([(0,m.Kn)(this.name),r.data])]));try{let t=yield this.provider.call(r);return(0,o.arrayify)(t).length%32===4&&S.throwError("resolver threw error",l.Logger.errors.CALL_EXCEPTION,{transaction:r,data:t}),n&&(t=D(t,0)),t}catch(i){if(i.code===l.Logger.errors.CALL_EXCEPTION)return null;throw i}}))}_fetchBytes(t,e){return k(this,void 0,void 0,(function*(){const r=yield this._fetch(t,e);return null!=r?D(r,0):null}))}_getAddress(t,e){const r=R[String(t)];if(null==r&&S.throwError(`unsupported coin type: ${t}`,l.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${t})`}),"eth"===r.ilk)return this.provider.formatter.address(e);const n=(0,o.arrayify)(e);if(null!=r.p2pkh){const t=e.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(t){const e=parseInt(t[1],16);if(t[2].length===2*e&&e>=1&&e<=75)return P((0,o.concat)([[r.p2pkh],"0x"+t[2]]))}}if(null!=r.p2sh){const t=e.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(t){const e=parseInt(t[1],16);if(t[2].length===2*e&&e>=1&&e<=75)return P((0,o.concat)([[r.p2sh],"0x"+t[2]]))}}if(null!=r.prefix){const t=n[1];let e=n[0];if(0===e?20!==t&&32!==t&&(e=-1):e=-1,e>=0&&n.length===2+t&&t>=1&&t<=75){const t=E().toWords(n.slice(2));return t.unshift(e),E().encode(r.prefix,t)}}return null}getAddress(t){return k(this,void 0,void 0,(function*(){if(null==t&&(t=60),60===t)try{const t=yield this._fetch("0x3b3b57de");return"0x"===t||t===y.R?null:this.provider.formatter.callAddress(t)}catch(n){if(n.code===l.Logger.errors.CALL_EXCEPTION)return null;throw n}const e=yield this._fetchBytes("0xf1cb7e06",_(t));if(null==e||"0x"===e)return null;const r=this._getAddress(t,e);return null==r&&S.throwError("invalid or unsupported coin data",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${t})`,coinType:t,data:e}),r}))}getAvatar(){return k(this,void 0,void 0,(function*(){const t=[{type:"name",content:this.name}];try{const e=yield this.getText("avatar");if(null==e)return null;for(let r=0;rt[e]))}return S.throwError("invalid or unsupported content hash data",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t})}))}getText(t){return k(this,void 0,void 0,(function*(){let e=(0,u.Y0)(t);e=(0,o.concat)([_(64),_(e.length),e]),e.length%32!==0&&(e=(0,o.concat)([e,(0,o.hexZeroPad)("0x",32-t.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",(0,o.hexlify)(e));return null==r||"0x"===r?null:(0,u.ZN)(r)}))}}let q=null,V=1;class G extends d.zt{constructor(t){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,a.defineReadOnly)(this,"anyNetwork","any"===t),this.anyNetwork&&(t=this.detectNetwork()),t instanceof Promise)this._networkPromise=t,t.catch((t=>{})),this._ready().catch((t=>{}));else{const e=(0,a.getStatic)(new.target,"getNetwork")(t);e?((0,a.defineReadOnly)(this,"_network",e),this.emit("network",e,null)):S.throwArgumentError("invalid network","network",t)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return k(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(t){}null==e&&(e=yield this.detectNetwork()),e||S.throwError("no network detected",l.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:(0,a.defineReadOnly)(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return(0,c.poll)((()=>this._ready().then((t=>t),(t=>{if(t.code!==l.Logger.errors.NETWORK_ERROR||"noNetwork"!==t.event)throw t}))))}static getFormatter(){return null==q&&(q=new A.Mb),q}static getNetwork(t){return(0,v.H)(null==t?"homestead":t)}ccipReadFetch(t,e,r){return k(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=t.to.toLowerCase(),i=e.toLowerCase(),o=[];for(let t=0;t=0?null:JSON.stringify({data:i,sender:n}),u=yield(0,c.fetchJson)({url:s,errorPassThrough:!0},a,((t,e)=>(t.status=e.statusCode,t)));if(u.data)return u.data;const h=u.message||"unknown error";if(u.status>=400&&u.status<500)return S.throwError(`response not found during CCIP fetch: ${h}`,l.Logger.errors.SERVER_ERROR,{url:e,errorMessage:h});o.push(h)}return S.throwError(`error encountered during CCIP fetch: ${o.map((t=>JSON.stringify(t))).join(", ")}`,l.Logger.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(t){return k(this,void 0,void 0,(function*(){if(yield this._ready(),t>0)for(;this._internalBlockNumber;){const e=this._internalBlockNumber;try{const r=yield e;if(I()-r.respTime<=t)return r.blockNumber;break}catch(n){if(this._internalBlockNumber===e)break}}const e=I(),r=(0,a.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((t=>null),(t=>t))}).then((({blockNumber:t,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const o=I();return(t=i.O$.from(t).toNumber()){this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return k(this,void 0,void 0,(function*(){const t=V++,e=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(n){return void this.emit("error",n)}if(this._setFastBlockNumber(r),this.emit("poll",t,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)S.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",S.makeError("network block skew detected",l.Logger.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let t=this._emitted.block+1;t<=r;t++)this.emit("block",t);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((t=>{if("block"===t)return;const e=this._emitted[t];"pending"!==e&&r-e>12&&delete this._emitted[t]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((t=>{switch(t.type){case"tx":{const r=t.hash;let n=this.getTransactionReceipt(r).then((t=>t&&null!=t.blockNumber?(this._emitted["t:"+r]=t.blockNumber,this.emit(r,t),null):null)).catch((t=>{this.emit("error",t)}));e.push(n);break}case"filter":if(!t._inflight){t._inflight=!0,-2===t._lastBlockNumber&&(t._lastBlockNumber=r-1);const n=t.filter;n.fromBlock=t._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((e=>{t._inflight=!1,0!==e.length&&e.forEach((e=>{e.blockNumber>t._lastBlockNumber&&(t._lastBlockNumber=e.blockNumber),this._emitted["b:"+e.blockHash]=e.blockNumber,this._emitted["t:"+e.transactionHash]=e.blockNumber,this.emit(n,e)}))})).catch((e=>{this.emit("error",e),t._inflight=!1}));e.push(o)}}})),this._lastBlockNumber=r,Promise.all(e).then((()=>{this.emit("didPoll",t)})).catch((t=>{this.emit("error",t)}))}else this.emit("didPoll",t)}))}resetEventsBlock(t){this._lastBlockNumber=t-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return k(this,void 0,void 0,(function*(){return S.throwError("provider does not support network detection",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return k(this,void 0,void 0,(function*(){const t=yield this._ready(),e=yield this.detectNetwork();if(t.chainId!==e.chainId){if(this.anyNetwork)return this._network=e,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",e,t),yield M(0),this._network;const r=S.makeError("underlying network changed",l.Logger.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:e});throw this.emit("error",r),r}return t}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((t=>{this._setFastBlockNumber(t)}),(t=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(t){t&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!t&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(t){if("number"!==typeof t||t<=0||parseInt(String(t))!=t)throw new Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const t=I();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((t=>((null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(t){null!=this._fastBlockNumber&&tthis._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))}waitForTransaction(t,e,r){return k(this,void 0,void 0,(function*(){return this._waitForTransaction(t,null==e?1:e,r||0,null)}))}_waitForTransaction(t,e,r,n){return k(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(t);return(i?i.confirmations:0)>=e?i:new Promise(((i,o)=>{const s=[];let a=!1;const u=function(){return!!a||(a=!0,s.forEach((t=>{t()})),!1)},h=t=>{t.confirmations{this.removeListener(t,h)})),n){let r=n.startBlock,i=null;const h=s=>k(this,void 0,void 0,(function*(){a||(yield M(1e3),this.getTransactionCount(n.from).then((c=>k(this,void 0,void 0,(function*(){if(!a){if(c<=n.nonce)r=s;else{{const e=yield this.getTransaction(t);if(e&&null!=e.blockNumber)return}for(null==i&&(i=r-3,i{a||this.once("block",h)})))}));if(a)return;this.once("block",h),s.push((()=>{this.removeListener("block",h)}))}if("number"===typeof r&&r>0){const t=setTimeout((()=>{u()||o(S.makeError("timeout exceeded",l.Logger.errors.TIMEOUT,{timeout:r}))}),r);t.unref&&t.unref(),s.push((()=>{clearTimeout(t)}))}}))}))}getBlockNumber(){return k(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield this.perform("getGasPrice",{});try{return i.O$.from(t)}catch(e){return S.throwError("bad result from backend",l.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e})}}))}getBalance(t,e){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,a.resolveProperties)({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getBalance",r);try{return i.O$.from(n)}catch(o){return S.throwError("bad result from backend",l.Logger.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:o})}}))}getTransactionCount(t,e){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,a.resolveProperties)({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getTransactionCount",r);try{return i.O$.from(n).toNumber()}catch(o){return S.throwError("bad result from backend",l.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:o})}}))}getCode(t,e){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,a.resolveProperties)({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getCode",r);try{return(0,o.hexlify)(n)}catch(i){return S.throwError("bad result from backend",l.Logger.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:i})}}))}getStorageAt(t,e,r){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield(0,a.resolveProperties)({address:this._getAddress(t),blockTag:this._getBlockTag(r),position:Promise.resolve(e).then((t=>(0,o.hexValue)(t)))}),i=yield this.perform("getStorageAt",n);try{return(0,o.hexlify)(i)}catch(s){return S.throwError("bad result from backend",l.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:s})}}))}_wrapTransaction(t,e,r){if(null!=e&&32!==(0,o.hexDataLength)(e))throw new Error("invalid response - sendTransaction");const n=t;return null!=e&&t.hash!==e&&S.throwError("Transaction hash mismatch from Provider.sendTransaction.",l.Logger.errors.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:e}),n.wait=(e,n)=>k(this,void 0,void 0,(function*(){let i;null==e&&(e=1),null==n&&(n=0),0!==e&&null!=r&&(i={data:t.data,from:t.from,nonce:t.nonce,to:t.to,value:t.value,startBlock:r});const o=yield this._waitForTransaction(t.hash,e,n,i);return null==o&&0===e?null:(this._emitted["t:"+t.hash]=o.blockNumber,0===o.status&&S.throwError("transaction failed",l.Logger.errors.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t,receipt:o}),o)})),n}sendTransaction(t){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield Promise.resolve(t).then((t=>(0,o.hexlify)(t))),r=this.formatter.transaction(t);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const t=yield this.perform("sendTransaction",{signedTransaction:e});return this._wrapTransaction(r,t,n)}catch(i){throw i.transaction=r,i.transactionHash=r.hash,i}}))}_getTransactionRequest(t){return k(this,void 0,void 0,(function*(){const e=yield t,r={};return["from","to"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>t?this._getAddress(t):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>t?i.O$.from(t):null)))})),["type"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>null!=t?t:null)))})),e.accessList&&(r.accessList=this.formatter.accessList(e.accessList)),["data"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>t?(0,o.hexlify)(t):null)))})),this.formatter.transactionRequest(yield(0,a.resolveProperties)(r))}))}_getFilter(t){return k(this,void 0,void 0,(function*(){t=yield t;const e={};return null!=t.address&&(e.address=this._getAddress(t.address)),["blockHash","topics"].forEach((r=>{null!=t[r]&&(e[r]=t[r])})),["fromBlock","toBlock"].forEach((r=>{null!=t[r]&&(e[r]=this._getBlockTag(t[r]))})),this.formatter.filter(yield(0,a.resolveProperties)(e))}))}_call(t,e,r){return k(this,void 0,void 0,(function*(){r>=10&&S.throwError("CCIP read exceeded maximum redirections",l.Logger.errors.SERVER_ERROR,{redirects:r,transaction:t});const n=t.to,s=yield this.perform("call",{transaction:t,blockTag:e});if(r>=0&&"latest"===e&&null!=n&&"0x556f1830"===s.substring(0,10)&&(0,o.hexDataLength)(s)%32===4)try{const a=(0,o.hexDataSlice)(s,4),u=(0,o.hexDataSlice)(a,0,32);i.O$.from(u).eq(n)||S.throwError("CCIP Read sender did not match",l.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:s});const h=[],c=i.O$.from((0,o.hexDataSlice)(a,32,64)).toNumber(),f=i.O$.from((0,o.hexDataSlice)(a,c,c+32)).toNumber(),d=(0,o.hexDataSlice)(a,c+32);for(let e=0;ek(this,void 0,void 0,(function*(){const t=yield this.perform("getBlock",n);if(null==t)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(e){let e=null;for(let n=0;nthis._wrapTransaction(t))),r}return this.formatter.block(t)}))),{oncePoll:this})}))}getBlock(t){return this._getBlock(t,!1)}getBlockWithTransactions(t){return this._getBlock(t,!0)}getTransaction(t){return k(this,void 0,void 0,(function*(){yield this.getNetwork(),t=yield t;const e={transactionHash:this.formatter.hash(t,!0)};return(0,c.poll)((()=>k(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",e);if(null==r)return null==this._emitted["t:"+t]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let t=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;t<=0&&(t=1),n.confirmations=t}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(t){return k(this,void 0,void 0,(function*(){yield this.getNetwork(),t=yield t;const e={transactionHash:this.formatter.hash(t,!0)};return(0,c.poll)((()=>k(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",e);if(null==r)return null==this._emitted["t:"+t]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let t=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;t<=0&&(t=1),n.confirmations=t}return n}))),{oncePoll:this})}))}getLogs(t){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield(0,a.resolveProperties)({filter:this._getFilter(t)}),r=yield this.perform("getLogs",e);return r.forEach((t=>{null==t.removed&&(t.removed=!1)})),A.Mb.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return k(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(t){return k(this,void 0,void 0,(function*(){if("number"===typeof(t=yield t)&&t<0){t%1&&S.throwArgumentError("invalid BlockTag","blockTag",t);let e=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return e+=t,e<0&&(e=0),this.formatter.blockTag(e)}return this.formatter.blockTag(t)}))}getResolver(t){return k(this,void 0,void 0,(function*(){let e=t;for(;;){if(""===e||"."===e)return null;if("eth"!==t&&"eth"===e)return null;const r=yield this._getResolver(e,"getResolver");if(null!=r){const n=new H(this,r,t);return e===t||(yield n.supportsWildcard())?n:null}e=e.split(".").slice(1).join(".")}}))}_getResolver(t,e){return k(this,void 0,void 0,(function*(){null==e&&(e="ENS");const r=yield this.getNetwork();r.ensAddress||S.throwError("network does not support ENS",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:e,network:r.name});try{const e=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+(0,m.VM)(t).substring(2)});return this.formatter.callAddress(e)}catch(n){}return null}))}resolveName(t){return k(this,void 0,void 0,(function*(){t=yield t;try{return Promise.resolve(this.formatter.address(t))}catch(r){if((0,o.isHexString)(t))throw r}"string"!==typeof t&&S.throwArgumentError("invalid ENS name","name",t);const e=yield this.getResolver(t);return e?yield e.getAddress():null}))}lookupAddress(t){return k(this,void 0,void 0,(function*(){t=yield t;const e=(t=this.formatter.address(t)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(e,"lookupAddress");if(null==r)return null;const n=L(yield this.call({to:r,data:"0x691f3431"+(0,m.VM)(e).substring(2)}),0);return(yield this.resolveName(n))!=t?null:n}))}getAvatar(t){return k(this,void 0,void 0,(function*(){let e=null;if((0,o.isHexString)(t)){const r=this.formatter.address(t).substring(2).toLowerCase()+".addr.reverse",i=yield this._getResolver(r,"getAvatar");if(!i)return null;e=new H(this,i,r);try{const t=yield e.getAvatar();if(t)return t.url}catch(n){if(n.code!==l.Logger.errors.CALL_EXCEPTION)throw n}try{const t=L(yield this.call({to:i,data:"0x691f3431"+(0,m.VM)(r).substring(2)}),0);e=yield this.getResolver(t)}catch(n){if(n.code!==l.Logger.errors.CALL_EXCEPTION)throw n;return null}}else if(e=yield this.getResolver(t),!e)return null;const r=yield e.getAvatar();return null==r?null:r.url}))}perform(t,e){return S.throwError(t+" not implemented",l.Logger.errors.NOT_IMPLEMENTED,{operation:t})}_startEvent(t){this.polling=this._events.filter((t=>t.pollable())).length>0}_stopEvent(t){this.polling=this._events.filter((t=>t.pollable())).length>0}_addEventListener(t,e,r){const n=new O(C(t),e,r);return this._events.push(n),this._startEvent(n),this}on(t,e){return this._addEventListener(t,e,!1)}once(t,e){return this._addEventListener(t,e,!0)}emit(t,...e){let r=!1,n=[],i=C(t);return this._events=this._events.filter((t=>t.tag!==i||(setTimeout((()=>{t.listener.apply(this,e)}),0),r=!0,!t.once||(n.push(t),!1)))),n.forEach((t=>{this._stopEvent(t)})),r}listenerCount(t){if(!t)return this._events.length;let e=C(t);return this._events.filter((t=>t.tag===e)).length}listeners(t){if(null==t)return this._events.map((t=>t.listener));let e=C(t);return this._events.filter((t=>t.tag===e)).map((t=>t.listener))}off(t,e){if(null==e)return this.removeAllListeners(t);const r=[];let n=!1,i=C(t);return this._events=this._events.filter((t=>t.tag!==i||t.listener!=e||(!!n||(n=!0,r.push(t),!1)))),r.forEach((t=>{this._stopEvent(t)})),this}removeAllListeners(t){let e=[];if(null==t)e=this._events,this._events=[];else{const r=C(t);this._events=this._events.filter((t=>t.tag!==r||(e.push(t),!1)))}return e.forEach((t=>{this._stopEvent(t)})),this}}var W=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const Z=new l.Logger(f.i),J=["call","estimateGas"];function Q(t,e){if(null==t)return null;if("string"===typeof t.message&&t.message.match("reverted")){const r=(0,o.isHexString)(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if("object"===typeof t){for(const r in t){const n=Q(t[r],e);if(n)return n}return null}if("string"===typeof t)try{return Q(JSON.parse(t),e)}catch(r){}return null}function X(t,e,r){const n=r.transaction||r.signedTransaction;if("call"===t){const t=Q(e,!0);if(t)return t.data;Z.throwError("missing revert data in call exception; Transaction reverted without a reason string",l.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if("estimateGas"===t){let r=Q(e.body,!1);null==r&&(r=Q(e,!1)),r&&Z.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===l.Logger.errors.SERVER_ERROR&&e.error&&"string"===typeof e.error.message?i=e.error.message:"string"===typeof e.body?i=e.body:"string"===typeof e.responseText&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Z.throwError("insufficient funds for intrinsic transaction cost",l.Logger.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Z.throwError("nonce has already been used",l.Logger.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Z.throwError("replacement fee too low",l.Logger.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Z.throwError("legacy pre-eip-155 transactions not supported",l.Logger.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),J.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Z.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function Y(t){return new Promise((function(e){setTimeout(e,t)}))}function $(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function tt(t){return t?t.toLowerCase():t}const et={};class rt extends n.E{constructor(t,e,r){if(super(),t!==et)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,a.defineReadOnly)(this,"provider",e),null==r&&(r=0),"string"===typeof r?((0,a.defineReadOnly)(this,"_address",this.provider.formatter.address(r)),(0,a.defineReadOnly)(this,"_index",null)):"number"===typeof r?((0,a.defineReadOnly)(this,"_index",r),(0,a.defineReadOnly)(this,"_address",null)):Z.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(t){return Z.throwError("cannot alter JSON-RPC Signer connection",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new nt(et,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((t=>(t.length<=this._index&&Z.throwError("unknown account #"+this._index,l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(t[this._index]))))}sendUncheckedTransaction(t){t=(0,a.shallowCopy)(t);const e=this.getAddress().then((t=>(t&&(t=t.toLowerCase()),t)));if(null==t.gasLimit){const r=(0,a.shallowCopy)(t);r.from=e,t.gasLimit=this.provider.estimateGas(r)}return null!=t.to&&(t.to=Promise.resolve(t.to).then((t=>W(this,void 0,void 0,(function*(){if(null==t)return null;const e=yield this.provider.resolveName(t);return null==e&&Z.throwArgumentError("provided ENS name resolves to null","tx.to",t),e}))))),(0,a.resolveProperties)({tx:(0,a.resolveProperties)(t),sender:e}).then((({tx:e,sender:r})=>{null!=e.from?e.from.toLowerCase()!==r&&Z.throwArgumentError("from address mismatch","transaction",t):e.from=r;const n=this.provider.constructor.hexlifyTransaction(e,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((t=>t),(t=>("string"===typeof t.message&&t.message.match(/user denied/i)&&Z.throwError("user rejected transaction",l.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:e}),X("sendTransaction",t,n))))}))}signTransaction(t){return Z.throwError("signing transactions is unsupported",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(t){return W(this,void 0,void 0,(function*(){const e=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(t);try{return yield(0,c.poll)((()=>W(this,void 0,void 0,(function*(){const t=yield this.provider.getTransaction(r);if(null!==t)return this.provider._wrapTransaction(t,r,e)}))),{oncePoll:this.provider})}catch(n){throw n.transactionHash=r,n}}))}signMessage(t){return W(this,void 0,void 0,(function*(){const e="string"===typeof t?(0,u.Y0)(t):t,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,o.hexlify)(e),r.toLowerCase()])}catch(n){throw"string"===typeof n.message&&n.message.match(/user denied/i)&&Z.throwError("user rejected signing",l.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:t}),n}}))}_legacySignMessage(t){return W(this,void 0,void 0,(function*(){const e="string"===typeof t?(0,u.Y0)(t):t,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,o.hexlify)(e)])}catch(n){throw"string"===typeof n.message&&n.message.match(/user denied/i)&&Z.throwError("user rejected signing",l.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:t}),n}}))}_signTypedData(t,e,r){return W(this,void 0,void 0,(function*(){const n=yield s.E.resolveNames(t,e,r,(t=>this.provider.resolveName(t))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(s.E.getPayload(n.domain,e,n.value))])}catch(o){throw"string"===typeof o.message&&o.message.match(/user denied/i)&&Z.throwError("user rejected signing",l.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:e,value:n.value}}),o}}))}unlock(t){return W(this,void 0,void 0,(function*(){const e=this.provider,r=yield this.getAddress();return e.send("personal_unlockAccount",[r.toLowerCase(),t,null])}))}}class nt extends rt{sendTransaction(t){return this.sendUncheckedTransaction(t).then((t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:e=>this.provider.waitForTransaction(t,e)})))}}const it={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class ot extends G{constructor(t,e){let r=e;null==r&&(r=new Promise(((t,e)=>{setTimeout((()=>{this.detectNetwork().then((e=>{t(e)}),(t=>{e(t)}))}),0)}))),super(r),t||(t=(0,a.getStatic)(this.constructor,"defaultUrl")()),"string"===typeof t?(0,a.defineReadOnly)(this,"connection",Object.freeze({url:t})):(0,a.defineReadOnly)(this,"connection",Object.freeze((0,a.shallowCopy)(t))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return W(this,void 0,void 0,(function*(){yield Y(0);let t=null;try{t=yield this.send("eth_chainId",[])}catch(e){try{t=yield this.send("net_version",[])}catch(e){}}if(null!=t){const r=(0,a.getStatic)(this.constructor,"getNetwork");try{return r(i.O$.from(t).toNumber())}catch(e){return Z.throwError("could not detect network",l.Logger.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e})}}return Z.throwError("could not detect network",l.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(t){return new rt(et,this,t)}getUncheckedSigner(t){return this.getSigner(t).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((t=>t.map((t=>this.formatter.address(t)))))}send(t,e){const r={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,a.deepCopy)(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(t)>=0;if(n&&this._cache[t])return this._cache[t];const i=(0,c.fetchJson)(this.connection,JSON.stringify(r),$).then((t=>(this.emit("debug",{action:"response",request:r,response:t,provider:this}),t)),(t=>{throw this.emit("debug",{action:"response",error:t,request:r,provider:this}),t}));return n&&(this._cache[t]=i,setTimeout((()=>{this._cache[t]=null}),0)),i}prepareRequest(t,e){switch(t){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[tt(e.address),e.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[tt(e.address),e.blockTag]];case"getCode":return["eth_getCode",[tt(e.address),e.blockTag]];case"getStorageAt":return["eth_getStorageAt",[tt(e.address),(0,o.hexZeroPad)(e.position,32),e.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[e.signedTransaction]];case"getBlock":return e.blockTag?["eth_getBlockByNumber",[e.blockTag,!!e.includeTransactions]]:e.blockHash?["eth_getBlockByHash",[e.blockHash,!!e.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[e.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[e.transactionHash]];case"call":return["eth_call",[(0,a.getStatic)(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0}),e.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,a.getStatic)(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0})]];case"getLogs":return e.filter&&null!=e.filter.address&&(e.filter.address=tt(e.filter.address)),["eth_getLogs",[e.filter]]}return null}perform(t,e){return W(this,void 0,void 0,(function*(){if("call"===t||"estimateGas"===t){const t=e.transaction;if(t&&null!=t.type&&i.O$.from(t.type).isZero()&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((e=(0,a.shallowCopy)(e)).transaction=(0,a.shallowCopy)(t),delete e.transaction.type)}}const r=this.prepareRequest(t,e);null==r&&Z.throwError(t+" not implemented",l.Logger.errors.NOT_IMPLEMENTED,{operation:t});try{return yield this.send(r[0],r[1])}catch(n){return X(t,n,e)}}))}_startEvent(t){"pending"===t.tag&&this._startPending(),super._startEvent(t)}_startPending(){if(null!=this._pendingFilter)return;const t=this,e=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=e,e.then((function(r){return function n(){t.send("eth_getFilterChanges",[r]).then((function(r){if(t._pendingFilter!=e)return null;let n=Promise.resolve();return r.forEach((function(e){t._emitted["t:"+e.toLowerCase()]="pending",n=n.then((function(){return t.getTransaction(e).then((function(e){return t.emit("pending",e),null}))}))})),n.then((function(){return Y(1e3)}))})).then((function(){if(t._pendingFilter==e)return setTimeout((function(){n()}),0),null;t.send("eth_uninstallFilter",[r])})).catch((t=>{}))}(),r})).catch((t=>{}))}_stopEvent(t){"pending"===t.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(t)}static hexlifyTransaction(t,e){const r=(0,a.shallowCopy)(it);if(e)for(const i in e)e[i]&&(r[i]=!0);(0,a.checkProperties)(t,r);const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(e){if(null==t[e])return;const r=(0,o.hexValue)(i.O$.from(t[e]));"gasLimit"===e&&(e="gas"),n[e]=r})),["from","to","data"].forEach((function(e){null!=t[e]&&(n[e]=(0,o.hexlify)(t[e]))})),t.accessList&&(n.accessList=(0,h.accessListify)(t.accessList)),n}}},88089:function(t,e,r){"use strict";r.d(e,{q:function(){return f}});var n=r(2593),i=r(6881),o=r(34674),s=r(1581),a=r(34216);let u=null;try{if(u=WebSocket,null==u)throw new Error("inject please")}catch(d){const t=new s.Logger(a.i);u=function(){t.throwError("WebSockets not supported in this environment",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var h=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const c=new s.Logger(a.i);let l=1;class f extends o.r{constructor(t,e){"any"===e&&c.throwError("WebSocketProvider does not support 'any' network yet",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"===typeof t?t:"_websocket",e),this._pollingInterval=-1,this._wsReady=!1,"string"===typeof t?(0,i.defineReadOnly)(this,"_websocket",new u(this.connection.url)):(0,i.defineReadOnly)(this,"_websocket",t),(0,i.defineReadOnly)(this,"_requests",{}),(0,i.defineReadOnly)(this,"_subs",{}),(0,i.defineReadOnly)(this,"_subIds",{}),(0,i.defineReadOnly)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((t=>{this.websocket.send(this._requests[t].payload)}))},this.websocket.onmessage=t=>{const e=t.data,r=JSON.parse(e);if(null!=r.id){const t=String(r.id),n=this._requests[t];if(delete this._requests[t],void 0!==r.result)n.callback(null,r.result),this.emit("debug",{action:"response",request:JSON.parse(n.payload),response:r.result,provider:this});else{let t=null;r.error?(t=new Error(r.error.message||"unknown error"),(0,i.defineReadOnly)(t,"code",r.error.code||null),(0,i.defineReadOnly)(t,"response",e)):t=new Error("unknown error"),n.callback(t,void 0),this.emit("debug",{action:"response",error:t,request:JSON.parse(n.payload),provider:this})}}else if("eth_subscription"===r.method){const t=this._subs[r.params.subscription];t&&t.processFunc(r.params.result)}else console.warn("this should not happen")};const r=setInterval((()=>{this.emit("poll")}),1e3);r.unref&&r.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(t){c.throwError("cannot reset events block on WebSocketProvider",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(t){c.throwError("cannot set polling interval on WebSocketProvider",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return h(this,void 0,void 0,(function*(){return null}))}set polling(t){t&&c.throwError("cannot set polling on WebSocketProvider",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(t,e){const r=l++;return new Promise(((n,i)=>{const o=JSON.stringify({method:t,params:e,id:r,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(r)]={callback:function(t,e){return t?i(t):n(e)},payload:o},this._wsReady&&this.websocket.send(o)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(t,e,r){return h(this,void 0,void 0,(function*(){let n=this._subIds[t];null==n&&(n=Promise.all(e).then((t=>this.send("eth_subscribe",t))),this._subIds[t]=n);const i=yield n;this._subs[i]={tag:t,processFunc:r}}))}_startEvent(t){switch(t.type){case"block":this._subscribe("block",["newHeads"],(t=>{const e=n.O$.from(t.number).toNumber();this._emitted.block=e,this.emit("block",e)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(t=>{this.emit("pending",t)}));break;case"filter":this._subscribe(t.tag,["logs",this._getFilter(t.filter)],(e=>{null==e.removed&&(e.removed=!1),this.emit(t.filter,this.formatter.filterLog(e))}));break;case"tx":{const e=t=>{const e=t.hash;this.getTransactionReceipt(e).then((t=>{t&&this.emit(e,t)}))};e(t),this._subscribe("tx",["newHeads"],(t=>{this._events.filter((t=>"tx"===t.type)).forEach(e)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",t)}}_stopEvent(t){let e=t.tag;if("tx"===t.type){if(this._events.filter((t=>"tx"===t.type)).length)return;e="tx"}else if(this.listenerCount(t.event))return;const r=this._subIds[e];r&&(delete this._subIds[e],r.then((t=>{this._subs[t]&&(delete this._subs[t],this.send("eth_unsubscribe",[t]))})))}destroy(){return h(this,void 0,void 0,(function*(){this.websocket.readyState===u.CONNECTING&&(yield new Promise((t=>{this.websocket.onopen=function(){t(!0)},this.websocket.onerror=function(){t(!1)}}))),this.websocket.close(1e3)}))}}},85751:function(t){"use strict";for(var e="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function s(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=o(e)^n>>5}for(e=o(e),r=0;re)return"Exceeds length limit";var n=t.toLowerCase(),i=t.toUpperCase();if(t!==n&&t!==i)return"Mixed-case string "+t;var a=(t=n).lastIndexOf("1");if(-1===a)return"No separator character for "+t;if(0===a)return"Missing prefix for "+t;var u=t.slice(0,a),h=t.slice(a+1);if(h.length<6)return"Data too short";var c=s(u);if("string"===typeof c)return c;for(var l=[],f=0;f=h.length||l.push(p)}return 1!==c?"Invalid checksum for "+t:{prefix:u,words:l}}function u(t,e,r,n){for(var i=0,o=0,s=(1<=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<=e)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=s(t=t.toLowerCase());if("string"===typeof i)throw new Error(i);for(var a=t+"1",u=0;u>5!==0)throw new Error("Non 5-bit word");i=o(i)^h,a+=e.charAt(h)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u){a+=e.charAt(i>>5*(5-u)&31)}return a},toWordsUnsafe:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e},toWords:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e;throw new Error(e)},fromWordsUnsafe:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e},fromWords:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}}},36049:function(t,e,r){"use strict";r.r(e),r.d(e,{randomBytes:function(){return n.O},shuffled:function(){return i}});var n=r(5634);function i(t){for(let e=(t=t.slice()).length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}},5634:function(t,e,r){"use strict";r.d(e,{O:function(){return u}});var n=r(16441),i=r(1581);const o=new i.Logger("random/5.7.0");const s=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof r.g)return r.g;throw new Error("unable to locate global object")}();let a=s.crypto||s.msCrypto;function u(t){(t<=0||t>1024||t%1||t!=t)&&o.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return a.getRandomValues(e),(0,n.arrayify)(e)}a&&a.getRandomValues||(o.warn("WARNING: Missing strong random number source"),a={getRandomValues:function(t){return o.throwError("no secure random source avaialble",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},59052:function(t,e,r){"use strict";r.r(e),r.d(e,{decode:function(){return f},encode:function(){return h}});var n=r(16441),i=r(1581);const o=new i.Logger("rlp/5.7.0");function s(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function a(t,e,r){let n=0;for(let i=0;ie+1+n&&o.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function l(t,e){if(0===t.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&o.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});const n=a(t,e+1,r);return e+1+r+n>t.length&&o.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),c(t,e,e+1+r,r+n)}if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),c(t,e,e+1,r)}if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});const s=a(t,e+1,r);e+1+r+s>t.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r+s,result:(0,n.hexlify)(t.slice(e+1+r,e+1+r+s))}}if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:(0,n.hexlify)(t.slice(e+1,e+1+r))}}return{consumed:1,result:(0,n.hexlify)(t[e])}}function f(t){const e=(0,n.arrayify)(t),r=l(e,0);return r.consumed!==e.length&&o.throwArgumentError("invalid rlp data","data",t),r.result}},91278:function(t,e,r){"use strict";r.r(e),r.d(e,{SupportedAlgorithm:function(){return i.p},computeHmac:function(){return n.Gy},ripemd160:function(){return n.bP},sha256:function(){return n.JQ},sha512:function(){return n.o}});var n=r(2006),i=r(21261)},2006:function(t,e,r){"use strict";r.d(e,{Gy:function(){return f},bP:function(){return h},JQ:function(){return c},o:function(){return l}});var n=r(33715),i=r.n(n),o=r(16441),s=r(21261),a=r(1581);const u=new a.Logger("sha2/5.7.0");function h(t){return"0x"+i().ripemd160().update((0,o.arrayify)(t)).digest("hex")}function c(t){return"0x"+i().sha256().update((0,o.arrayify)(t)).digest("hex")}function l(t){return"0x"+i().sha512().update((0,o.arrayify)(t)).digest("hex")}function f(t,e,r){return s.p[t]||u.throwError("unsupported algorithm "+t,a.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:t}),"0x"+i().hmac(i()[t],(0,o.arrayify)(e)).update((0,o.arrayify)(r)).digest("hex")}},21261:function(t,e,r){"use strict";var n;r.d(e,{p:function(){return n}}),function(t){t.sha256="sha256",t.sha512="sha512"}(n||(n={}))},67669:function(t,e,r){"use strict";r.r(e),r.d(e,{SigningKey:function(){return Z},computePublicKey:function(){return Q},recoverPublicKey:function(){return J}});var n=r(42500),i=r.n(n),o=r(33715),s=r.n(o);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:"undefined"!==typeof self&&self;function a(t,e,r){return r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===e||null===e)&&r.path)}},t(r,r.exports),r.exports}var u=h;function h(t,e){if(!t)throw new Error(e||"Assertion failed")}h.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)};var c=a((function(t,e){var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}})),l=a((function(t,e){var r=e;r.assert=u,r.toArray=c.toArray,r.zero2=c.zero2,r.toHex=c.toHex,r.encode=c.encode,r.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},r.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,u=t.andln(3)+i&3,h=e.andln(3)+o&3;3===u&&(u=-1),3===h&&(h=-1),s=0===(1&u)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==h?u:-u,r[0].push(s),a=0===(1&h)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==u?h:-h,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},r.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(t){return"string"===typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new(i())(t,"hex","le")}})),f=l.getNAF,d=l.getJSF,p=l.assert;function g(t,e){this.type=t,this.p=new(i())(e.p,16),this.red=e.prime?i().red(e.prime):i().mont(this.p),this.zero=new(i())(0).toRed(this.red),this.one=new(i())(1).toRed(this.red),this.two=new(i())(2).toRed(this.red),this.n=e.n&&new(i())(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.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))}var y=g;function m(t,e){this.curve=t,this.type=e,this.precomputed=null}g.prototype.point=function(){throw new Error("Not implemented")},g.prototype.validate=function(){throw new Error("Not implemented")},g.prototype._fixedNafMul=function(t,e){p(t.precomputed);var r=t._getDoubles(),n=f(e,1,this._bitLength),i=(1<=o;u--)s=(s<<1)+n[u];a.push(s)}for(var h=this.jpoint(null,null,null),c=this.jpoint(null,null,null),l=i;l>0;l--){for(o=0;o=0;a--){for(var u=0;a>=0&&0===o[a];a--)u++;if(a>=0&&u++,s=s.dblp(u),a<0)break;var h=o[a];p(0!==h),s="affine"===t.type?h>0?s.mixedAdd(i[h-1>>1]):s.mixedAdd(i[-h-1>>1].neg()):h>0?s.add(i[h-1>>1]):s.add(i[-h-1>>1].neg())}return"affine"===t.type?s.toP():s},g.prototype._wnafMulAdd=function(t,e,r,n,i){var o,s,a,u=this._wnafT1,h=this._wnafT2,c=this._wnafT3,l=0;for(o=0;o=1;o-=2){var g=o-1,y=o;if(1===u[g]&&1===u[y]){var m=[e[g],null,null,e[y]];0===e[g].y.cmp(e[y].y)?(m[1]=e[g].add(e[y]),m[2]=e[g].toJ().mixedAdd(e[y].neg())):0===e[g].y.cmp(e[y].y.redNeg())?(m[1]=e[g].toJ().mixedAdd(e[y]),m[2]=e[g].add(e[y].neg())):(m[1]=e[g].toJ().mixedAdd(e[y]),m[2]=e[g].toJ().mixedAdd(e[y].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=d(r[g],r[y]);for(l=Math.max(b[0].length,l),c[g]=new Array(l),c[y]=new Array(l),s=0;s=0;o--){for(var S=0;o>=0;){var B=!0;for(s=0;s=0&&S++,A=A.dblp(S),o<0)break;for(s=0;s0?a=h[s][x-1>>1]:x<0&&(a=h[s][-x-1>>1].neg()),A="affine"===a.type?A.mixedAdd(a):A.add(a))}}for(o=0;o=Math.ceil((t.bitLength()+1)/e.step)},m.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(s=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},w.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),h=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:u.add(h).neg()}},w.prototype.pointFromX=function(t,e){(t=new(i())(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.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(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},w.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},A.prototype.isInfinity=function(){return this.inf},A.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},A.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},A.prototype.getX=function(){return this.x.fromRed()},A.prototype.getY=function(){return this.y.fromRed()},A.prototype.mul=function(t){return t=new(i())(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},A.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},A.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},A.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},A.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.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 e},A.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},v(k,y.BasePoint),w.prototype.jpoint=function(t,e,r){return new k(this,t,e,r)},k.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},k.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},k.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=a.redSqr(),c=h.redMul(a),l=n.redMul(h),f=u.redSqr().redIAdd(c).redISub(l).redISub(l),d=u.redMul(l.redISub(f)).redISub(o.redMul(c)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(f,d,p)},k.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),h=u.redMul(s),c=r.redMul(u),l=a.redSqr().redIAdd(h).redISub(c).redISub(c),f=a.redMul(c.redISub(l)).redISub(i.redMul(h)),d=this.z.redMul(s);return this.curve.jpoint(l,f,d)},k.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},k.prototype.inspect=function(){return this.isInfinity()?"":""},k.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var S=a((function(t,e){var r=e;r.base=y,r.short=E,r.mont=null,r.edwards=null})),B=a((function(t,e){var r,n=e,i=l.assert;function o(t){"short"===t.type?this.curve=new S.short(t):"edwards"===t.type?this.curve=new S.edwards(t):this.curve=new S.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new o(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,a("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:s().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:s().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:s().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:s().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"]}),a("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:s().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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s().sha256,gRed:!1,g:["9"]}),a("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:s().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(u){r=void 0}a("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:s().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function x(t){if(!(this instanceof x))return new x(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=c.toArray(t.entropy,t.entropyEnc||"hex"),r=c.toArray(t.nonce,t.nonceEnc||"hex"),n=c.toArray(t.pers,t.persEnc||"hex");u(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var C=x;x.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},x.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof e&&(n=r,r=e,e=null),r&&(r=c.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var O=l.assert;function R(t,e){if(t instanceof R)return t;this._importDER(t,e)||(O(t.r&&t.s,"Signature without r or s"),this.r=new(i())(t.r,16),this.s=new(i())(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var _=R;function P(){this.place=0}function N(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return!(i<=127)&&(e.place=s,i)}function U(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}R.prototype._importDER=function(t,e){t=l.toArray(t,e);var r=new P;if(48!==t[r.place++])return!1;var n=N(t,r);if(!1===n)return!1;if(n+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var o=N(t,r);if(!1===o)return!1;var s=t.slice(r.place,o+r.place);if(r.place+=o,2!==t[r.place++])return!1;var a=N(t,r);if(!1===a)return!1;if(t.length!==a+r.place)return!1;var u=t.slice(r.place,a+r.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new(i())(s),this.s=new(i())(u),this.recoveryParam=null,!0},R.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=U(e),r=U(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];L(n,e.length),(n=n.concat(e)).push(2),L(n,r.length);var i=n.concat(r),o=[48];return L(o,i.length),o=o.concat(i),l.encode(o,t)};var D=function(){throw new Error("unsupported")},F=l.assert;function j(t){if(!(this instanceof j))return new j(t);"string"===typeof t&&(F(Object.prototype.hasOwnProperty.call(B,t),"Unknown curve "+t),t=B[t]),t instanceof B.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var K=j;j.prototype.keyPair=function(t){return new T(this,t)},j.prototype.keyFromPrivate=function(t,e){return T.fromPrivate(this,t,e)},j.prototype.keyFromPublic=function(t,e){return T.fromPublic(this,t,e)},j.prototype.genKeyPair=function(t){t||(t={});for(var e=new C({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||D(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(i())(2));;){var o=new(i())(e.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},j.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},j.prototype.sign=function(t,e,r,n){"object"===typeof r&&(n=r,r=null),n||(n={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new(i())(t,16));for(var o=this.n.byteLength(),s=e.getPrivate().toArray("be",o),a=t.toArray("be",o),u=new C({hash:this.hash,entropy:s,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),h=this.n.sub(new(i())(1)),c=0;;c++){var l=n.k?n.k(c):new(i())(u.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(h)>=0)){var f=this.g.mul(l);if(!f.isInfinity()){var d=f.getX(),p=d.umod(this.n);if(0!==p.cmpn(0)){var g=l.invm(this.n).mul(p.mul(e.getPrivate()).iadd(t));if(0!==(g=g.umod(this.n)).cmpn(0)){var y=(f.getY().isOdd()?1:0)|(0!==d.cmp(p)?2:0);return n.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),y^=1),new _({r:p,s:g,recoveryParam:y})}}}}}},j.prototype.verify=function(t,e,r,n){t=this._truncateToN(new(i())(t,16)),r=this.keyFromPublic(r,n);var o=(e=new _(e,"hex")).r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),h=u.mul(t).umod(this.n),c=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(h,r.getPublic(),c)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(h,r.getPublic(),c)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},j.prototype.recoverPubKey=function(t,e,r,n){F((3&r)===r,"The recovery param is more than two bits"),e=new _(e,n);var o=this.n,s=new(i())(t),a=e.r,u=e.s,h=1&r,c=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");a=c?this.curve.pointFromX(a.add(this.curve.n),h):this.curve.pointFromX(a,h);var l=e.r.invm(o),f=o.sub(s).mul(l).umod(o),d=u.mul(l).umod(o);return this.g.mulAdd(f,a,d)},j.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new _(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var z=a((function(t,e){var r=e;r.version="6.5.4",r.utils=l,r.rand=function(){throw new Error("unsupported")},r.curve=S,r.curves=B,r.ec=K,r.eddsa=null})).ec,H=r(16441),q=r(6881);const V=new(r(1581).Logger)("signing-key/5.7.0");let G=null;function W(){return G||(G=new z("secp256k1")),G}class Z{constructor(t){(0,q.defineReadOnly)(this,"curve","secp256k1"),(0,q.defineReadOnly)(this,"privateKey",(0,H.hexlify)(t)),32!==(0,H.hexDataLength)(this.privateKey)&&V.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const e=W().keyFromPrivate((0,H.arrayify)(this.privateKey));(0,q.defineReadOnly)(this,"publicKey","0x"+e.getPublic(!1,"hex")),(0,q.defineReadOnly)(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),(0,q.defineReadOnly)(this,"_isSigningKey",!0)}_addPoint(t){const e=W().keyFromPublic((0,H.arrayify)(this.publicKey)),r=W().keyFromPublic((0,H.arrayify)(t));return"0x"+e.pub.add(r.pub).encodeCompressed("hex")}signDigest(t){const e=W().keyFromPrivate((0,H.arrayify)(this.privateKey)),r=(0,H.arrayify)(t);32!==r.length&&V.throwArgumentError("bad digest length","digest",t);const n=e.sign(r,{canonical:!0});return(0,H.splitSignature)({recoveryParam:n.recoveryParam,r:(0,H.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,H.hexZeroPad)("0x"+n.s.toString(16),32)})}computeSharedSecret(t){const e=W().keyFromPrivate((0,H.arrayify)(this.privateKey)),r=W().keyFromPublic((0,H.arrayify)(Q(t)));return(0,H.hexZeroPad)("0x"+e.derive(r.getPublic()).toString(16),32)}static isSigningKey(t){return!(!t||!t._isSigningKey)}}function J(t,e){const r=(0,H.splitSignature)(e),n={r:(0,H.arrayify)(r.r),s:(0,H.arrayify)(r.s)};return"0x"+W().recoverPubKey((0,H.arrayify)(t),n,r.recoveryParam).encode("hex",!1)}function Q(t,e){const r=(0,H.arrayify)(t);if(32===r.length){const t=new Z(r);return e?"0x"+W().keyFromPrivate(r).getPublic(!0,"hex"):t.publicKey}return 33===r.length?e?(0,H.hexlify)(r):"0x"+W().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?e?"0x"+W().keyFromPublic(r).getPublic(!0,"hex"):(0,H.hexlify)(r):V.throwArgumentError("invalid public or private key","key","[REDACTED]")}},42500:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(62808).Buffer}catch(I){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function h(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u=49?h-49+10:h>=17?h-17+10:h,n(h>=0&&s0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c1&&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")]=l}catch(I){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?""}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],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];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?f[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=d[t],c=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var g=l.modrn(c).toString(t);r=(l=l.idivn(c)).isZero()?g+r:f[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=f;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,g=d>>>13,y=0|s[2],m=8191&y,v=y>>>13,b=0|s[3],w=8191&b,E=b>>>13,A=0|s[4],k=8191&A,S=A>>>13,B=0|s[5],x=8191&B,C=B>>>13,I=0|s[6],M=8191&I,T=I>>>13,O=0|s[7],R=8191&O,_=O>>>13,P=0|s[8],N=8191&P,U=P>>>13,L=0|s[9],D=8191&L,F=L>>>13,j=0|a[0],K=8191&j,z=j>>>13,H=0|a[1],q=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Z=G>>>13,J=0|a[3],Q=8191&J,X=J>>>13,Y=0|a[4],$=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,ft=ct>>>13,dt=0|a[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(h+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(f,K)|0))<<13)|0;h=((o=Math.imul(f,z))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,K),i=(i=Math.imul(p,z))+Math.imul(g,K)|0,o=Math.imul(g,z);var mt=(h+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,q)|0))<<13)|0;h=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,K),i=(i=Math.imul(m,z))+Math.imul(v,K)|0,o=Math.imul(v,z),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,V)|0;var vt=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(f,W)|0))<<13)|0;h=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,K),i=(i=Math.imul(w,z))+Math.imul(E,K)|0,o=Math.imul(E,z),n=n+Math.imul(m,q)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,Z)|0;var bt=(h+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,Q)|0))<<13)|0;h=((o=o+Math.imul(f,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(k,K),i=(i=Math.imul(k,z))+Math.imul(S,K)|0,o=Math.imul(S,z),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,X)|0;var wt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,z))+Math.imul(C,K)|0,o=Math.imul(C,z),n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,V)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var Et=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(M,K),i=(i=Math.imul(M,z))+Math.imul(T,K)|0,o=Math.imul(T,z),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var At=(h+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,ot)|0))<<13)|0;h=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(R,K),i=(i=Math.imul(R,z))+Math.imul(_,K)|0,o=Math.imul(_,z),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,X)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var kt=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((o=o+Math.imul(f,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,z))+Math.imul(U,K)|0,o=Math.imul(U,z),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,z))+Math.imul(F,K)|0,o=Math.imul(F,z),n=n+Math.imul(N,q)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(U,q)|0,o=o+Math.imul(U,V)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,ft)|0;var Bt=(h+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,pt)|0))<<13)|0;h=((o=o+Math.imul(f,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,V))+Math.imul(F,q)|0,o=Math.imul(F,V),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Z)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ft)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;h=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,Z))+Math.imul(F,W)|0,o=Math.imul(F,Z),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,X)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ht)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ft)|0;var Ct=(h+(n=n+Math.imul(m,pt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,X))+Math.imul(F,Q)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(U,$)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ft)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ft)|0;var It=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ft)|0;var Mt=(h+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(S,pt)|0))<<13)|0;h=((o=o+Math.imul(S,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(D,rt),i=(i=Math.imul(D,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,ot),i=(i=Math.imul(D,st))+Math.imul(F,ot)|0,o=Math.imul(F,st),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(U,ut)|0,o=o+Math.imul(U,ht)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ft)|0;var Ot=(h+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,ut),i=(i=Math.imul(D,ht))+Math.imul(F,ut)|0,o=Math.imul(F,ht),n=n+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(U,lt)|0,o=o+Math.imul(U,ft)|0;var Rt=(h+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,gt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,lt),i=(i=Math.imul(D,ft))+Math.imul(F,lt)|0,o=Math.imul(F,ft);var _t=(h+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(U,pt)|0))<<13)|0;h=((o=o+Math.imul(U,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863;var Pt=(h+(n=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,gt))+Math.imul(F,pt)|0))<<13)|0;return h=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=yt,u[1]=mt,u[2]=vt,u[3]=bt,u[4]=wt,u[5]=Et,u[6]=At,u[7]=kt,u[8]=St,u[9]=Bt,u[10]=xt,u[11]=Ct,u[12]=It,u[13]=Mt,u[14]=Tt,u[15]=Ot,u[16]=Rt,u[17]=_t,u[18]=Pt,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(t,e,r){return m(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(y=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):r<63?g(this,t,e):r<1024?m(this,t,e):v(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=f)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.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;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function E(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function B(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){x.call(this,t),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)}E.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},E.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},E.prototype.split=function(t,e){t.iushrn(this.n,0,e)},E.prototype.imulK=function(t){return t.imul(this.k)},i(A,E),A.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},A.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new A;else if("p224"===t)e=new k;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new B}return w[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(c(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var g=d,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,x),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),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(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},31886:function(t,e,r){"use strict";r.r(e),r.d(e,{keccak256:function(){return g},pack:function(){return p},sha256:function(){return y}});var n=r(2593),i=r(16441),o=r(38197),s=r(2006),a=r(84917),u=r(1581);const h=new RegExp("^bytes([0-9]+)$"),c=new RegExp("^(u?int)([0-9]*)$"),l=new RegExp("^(.*)\\[([0-9]*)\\]$"),f=new u.Logger("solidity/5.7.0");function d(t,e,r){switch(t){case"address":return r?(0,i.zeroPad)(e,32):(0,i.arrayify)(e);case"string":return(0,a.Y0)(e);case"bytes":return(0,i.arrayify)(e);case"bool":return e=e?"0x01":"0x00",r?(0,i.zeroPad)(e,32):(0,i.arrayify)(e)}let o=t.match(c);if(o){let s=parseInt(o[2]||"256");return(o[2]&&String(s)!==o[2]||s%8!==0||0===s||s>256)&&f.throwArgumentError("invalid number type","type",t),r&&(s=256),e=n.O$.from(e).toTwos(s),(0,i.zeroPad)(e,s/8)}if(o=t.match(h),o){const n=parseInt(o[1]);return(String(n)!==o[1]||0===n||n>32)&&f.throwArgumentError("invalid bytes type","type",t),(0,i.arrayify)(e).byteLength!==n&&f.throwArgumentError(`invalid value for ${t}`,"value",e),r?(0,i.arrayify)((e+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):e}if(o=t.match(l),o&&Array.isArray(e)){const r=o[1];parseInt(o[2]||String(e.length))!=e.length&&f.throwArgumentError(`invalid array length for ${t}`,"value",e);const n=[];return e.forEach((function(t){n.push(d(r,t,!0))})),(0,i.concat)(n)}return f.throwArgumentError("invalid type","type",t)}function p(t,e){t.length!=e.length&&f.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach((function(t,n){r.push(d(t,e[n]))})),(0,i.hexlify)((0,i.concat)(r))}function g(t,e){return(0,o.keccak256)(p(t,e))}function y(t,e){return(0,s.JQ)(p(t,e))}},22384:function(t,e,r){"use strict";r.r(e),r.d(e,{UnicodeNormalizationForm:function(){return o.Uj},Utf8ErrorFuncs:function(){return o.te},Utf8ErrorReason:function(){return o.Uw},_toEscapedUtf8String:function(){return o.U$},formatBytes32String:function(){return s},nameprep:function(){return v},parseBytes32String:function(){return a},toUtf8Bytes:function(){return o.Y0},toUtf8CodePoints:function(){return o.XL},toUtf8String:function(){return o.ZN}});var n=r(57218),i=r(16441),o=r(84917);function s(t){const e=(0,o.Y0)(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([e,n.R]).slice(0,32))}function a(t){const e=(0,i.arrayify)(t);if(32!==e.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==e[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===e[r-1];)r--;return(0,o.ZN)(e.slice(0,r))}function u(t,e){e||(e=function(t){return[parseInt(t,16)]});let r=0,n={};return t.split(",").forEach((t=>{let i=t.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])})),n}function h(t){let e=0;return t.split(",").map((t=>{let r=t.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=e+parseInt(r[0],16);return e=parseInt(r[1],16),{l:n,h:e}}))}function c(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&-1!==i.e.indexOf(t-r))continue;return i}}return null}const l=h("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),f="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((t=>parseInt(t,16))),d=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],p=u("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),g=u("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),y=u("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{if(f.indexOf(t)>=0)return[];if(t>=65024&&t<=65039)return[];let e=function(t){let e=c(t,d);if(e)return[t+e.s];let r=p[t];if(r)return r;let n=g[t];return n?[t+n[0]]:y[t]||null}(t);return e||[t]})),e=r.reduce(((t,e)=>(e.forEach((e=>{t.push(e)})),t)),[]),e=(0,o.XL)((0,o.uu)(e),o.Uj.NFKC),e.forEach((t=>{if(c(t,m))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),e.forEach((t=>{if(c(t,l))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let n=(0,o.uu)(e);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n}},84917:function(t,e,r){"use strict";r.d(e,{Uj:function(){return o},te:function(){return u},Uw:function(){return s},U$:function(){return f},uu:function(){return d},Y0:function(){return c},XL:function(){return g},ZN:function(){return p}});var n=r(16441);const i=new(r(1581).Logger)("strings/5.7.0");var o,s;function a(t,e,r,n,i){if(t===s.BAD_PREFIX||t===s.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6===2;n++)t++;return t}return t===s.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(o||(o={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(s||(s={}));const u=Object.freeze({error:function(t,e,r,n,o){return i.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)},ignore:a,replace:function(t,e,r,n,i){return t===s.OVERLONG?(n.push(i),0):(n.push(65533),a(t,e,r))}});function h(t,e){null==e&&(e=u.error),t=(0,n.arrayify)(t);const r=[];let i=0;for(;i>7===0){r.push(n);continue}let o=null,a=null;if(192===(224&n))o=1,a=127;else if(224===(240&n))o=2,a=2047;else{if(240!==(248&n)){i+=e(128===(192&n)?s.UNEXPECTED_CONTINUE:s.BAD_PREFIX,i-1,t,r);continue}o=3,a=65535}if(i-1+o>=t.length){i+=e(s.OVERRUN,i-1,t,r);continue}let u=n&(1<<8-o-1)-1;for(let h=0;h1114111?i+=e(s.OUT_OF_RANGE,i-1-o,t,r,u):u>=55296&&u<=57343?i+=e(s.UTF16_SURROGATE,i-1-o,t,r,u):u<=a?i+=e(s.OVERLONG,i-1-o,t,r,u):r.push(u))}return r}function c(t,e=o.current){e!=o.current&&(i.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return(0,n.arrayify)(r)}function l(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function f(t,e){return'"'+h(t,e).map((t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?l(t):l(55296+((t-=65536)>>10&1023))+l(56320+(1023&t))})).join("")+'"'}function d(t){return t.map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}function p(t,e){return d(h(t,e))}function g(t,e=o.current){return h(c(t,e))}},83875:function(t,e,r){"use strict";r.r(e),r.d(e,{TransactionTypes:function(){return d},accessListify:function(){return A},computeAddress:function(){return v},parse:function(){return I},recoverAddress:function(){return b},serialize:function(){return x}});var n=r(19485),i=r(2593),o=r(16441),s=r(21046),a=r(38197),u=r(6881),h=r(59052),c=r(67669),l=r(1581);const f=new l.Logger("transactions/5.7.0");var d;function p(t){return"0x"===t?null:(0,n.getAddress)(t)}function g(t){return"0x"===t?s._Y:i.O$.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(d||(d={}));const y=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],m={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function v(t){const e=(0,c.computePublicKey)(t);return(0,n.getAddress)((0,o.hexDataSlice)((0,a.keccak256)((0,o.hexDataSlice)(e,1)),12))}function b(t,e){return v((0,c.recoverPublicKey)((0,o.arrayify)(t),e))}function w(t,e){const r=(0,o.stripZeros)(i.O$.from(t).toHexString());return r.length>32&&f.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function E(t,e){return{address:(0,n.getAddress)(t),storageKeys:(e||[]).map(((e,r)=>(32!==(0,o.hexDataLength)(e)&&f.throwArgumentError("invalid access list storageKey",`accessList[${t}:${r}]`,e),e.toLowerCase())))}}function A(t){if(Array.isArray(t))return t.map(((t,e)=>Array.isArray(t)?(t.length>2&&f.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${e}]`,t),E(t[0],t[1])):E(t.address,t.storageKeys)));const e=Object.keys(t).map((e=>{const r=t[e].reduce(((t,e)=>(t[e]=!0,t)),{});return E(e,Object.keys(r).sort())}));return e.sort(((t,e)=>t.address.localeCompare(e.address))),e}function k(t){return A(t).map((t=>[t.address,t.storageKeys]))}function S(t,e){if(null!=t.gasPrice){const e=i.O$.from(t.gasPrice),r=i.O$.from(t.maxFeePerGas||0);e.eq(r)||f.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:e,maxFeePerGas:r})}const r=[w(t.chainId||0,"chainId"),w(t.nonce||0,"nonce"),w(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(t.maxFeePerGas||0,"maxFeePerGas"),w(t.gasLimit||0,"gasLimit"),null!=t.to?(0,n.getAddress)(t.to):"0x",w(t.value||0,"value"),t.data||"0x",k(t.accessList||[])];if(e){const t=(0,o.splitSignature)(e);r.push(w(t.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(t.r)),r.push((0,o.stripZeros)(t.s))}return(0,o.hexConcat)(["0x02",h.encode(r)])}function B(t,e){const r=[w(t.chainId||0,"chainId"),w(t.nonce||0,"nonce"),w(t.gasPrice||0,"gasPrice"),w(t.gasLimit||0,"gasLimit"),null!=t.to?(0,n.getAddress)(t.to):"0x",w(t.value||0,"value"),t.data||"0x",k(t.accessList||[])];if(e){const t=(0,o.splitSignature)(e);r.push(w(t.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(t.r)),r.push((0,o.stripZeros)(t.s))}return(0,o.hexConcat)(["0x01",h.encode(r)])}function x(t,e){if(null==t.type||0===t.type)return null!=t.accessList&&f.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),function(t,e){(0,u.checkProperties)(t,m);const r=[];y.forEach((function(e){let n=t[e.name]||[];const i={};e.numeric&&(i.hexPad="left"),n=(0,o.arrayify)((0,o.hexlify)(n,i)),e.length&&n.length!==e.length&&n.length>0&&f.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),e.maxLength&&(n=(0,o.stripZeros)(n),n.length>e.maxLength&&f.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n)),r.push((0,o.hexlify)(n))}));let n=0;if(null!=t.chainId?(n=t.chainId,"number"!==typeof n&&f.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!(0,o.isBytesLike)(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),0!==n&&(r.push((0,o.hexlify)(n)),r.push("0x"),r.push("0x")),!e)return h.encode(r);const i=(0,o.splitSignature)(e);let s=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),s+=2*n+8,i.v>28&&i.v!==s&&f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push((0,o.hexlify)(s)),r.push((0,o.stripZeros)((0,o.arrayify)(i.r))),r.push((0,o.stripZeros)((0,o.arrayify)(i.s))),h.encode(r)}(t,e);switch(t.type){case 1:return B(t,e);case 2:return S(t,e)}return f.throwError(`unsupported transaction type: ${t.type}`,l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function C(t,e,r){try{const r=g(e[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");t.v=r}catch(n){f.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=(0,o.hexZeroPad)(e[1],32),t.s=(0,o.hexZeroPad)(e[2],32);try{const e=(0,a.keccak256)(r(t));t.from=b(e,{r:t.r,s:t.s,recoveryParam:t.v})}catch(n){}}function I(t){const e=(0,o.arrayify)(t);if(e[0]>127)return function(t){const e=h.decode(t);9!==e.length&&6!==e.length&&f.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:g(e[0]).toNumber(),gasPrice:g(e[1]),gasLimit:g(e[2]),to:p(e[3]),value:g(e[4]),data:e[5],chainId:0};if(6===e.length)return r;try{r.v=i.O$.from(e[6]).toNumber()}catch(n){return r}if(r.r=(0,o.hexZeroPad)(e[7],32),r.s=(0,o.hexZeroPad)(e[8],32),i.O$.from(r.r).isZero()&&i.O$.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let i=r.v-27;const s=e.slice(0,6);0!==r.chainId&&(s.push((0,o.hexlify)(r.chainId)),s.push("0x"),s.push("0x"),i-=2*r.chainId+8);const u=(0,a.keccak256)(h.encode(s));try{r.from=b(u,{r:(0,o.hexlify)(r.r),s:(0,o.hexlify)(r.s),recoveryParam:i})}catch(n){}r.hash=(0,a.keccak256)(t)}return r.type=null,r}(e);switch(e[0]){case 1:return function(t){const e=h.decode(t.slice(1));8!==e.length&&11!==e.length&&f.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.hexlify)(t));const r={type:1,chainId:g(e[0]).toNumber(),nonce:g(e[1]).toNumber(),gasPrice:g(e[2]),gasLimit:g(e[3]),to:p(e[4]),value:g(e[5]),data:e[6],accessList:A(e[7])};return 8===e.length||(r.hash=(0,a.keccak256)(t),C(r,e.slice(8),B)),r}(e);case 2:return function(t){const e=h.decode(t.slice(1));9!==e.length&&12!==e.length&&f.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.hexlify)(t));const r=g(e[2]),n=g(e[3]),i={type:2,chainId:g(e[0]).toNumber(),nonce:g(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:g(e[4]),to:p(e[5]),value:g(e[6]),data:e[7],accessList:A(e[8])};return 9===e.length||(i.hash=(0,a.keccak256)(t),C(i,e.slice(9),S)),i}(e)}return f.throwError(`unsupported transaction type: ${e[0]}`,l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}},35553:function(t,e,r){"use strict";r.r(e),r.d(e,{commify:function(){return A},formatEther:function(){return B},formatUnits:function(){return k},parseEther:function(){return x},parseUnits:function(){return S}});var n=r(16441),i=r(1581),o=r(48794),s=r(2593);const a=new i.Logger(o.i),u={},h=s.O$.from(0),c=s.O$.from(-1);function l(t,e,r,n){const o={fault:e,operation:r};return void 0!==n&&(o.value=n),a.throwError(t,i.Logger.errors.NUMERIC_FAULT,o)}let f="0";for(;f.length<256;)f+=f;function d(t){if("number"!==typeof t)try{t=s.O$.from(t).toNumber()}catch(e){}return"number"===typeof t&&t>=0&&t<=256&&!(t%1)?"1"+f.substring(0,t):a.throwArgumentError("invalid decimal size","decimals",t)}function p(t,e){null==e&&(e=0);const r=d(e),n=(t=s.O$.from(t)).lt(h);n&&(t=t.mul(c));let i=t.mod(r).toString();for(;i.length2&&a.throwArgumentError("too many decimal points","value",t);let o=i[0],u=i[1];for(o||(o="0"),u||(u="0");"0"===u[u.length-1];)u=u.substring(0,u.length-1);for(u.length>r.length-1&&l("fractional component exceeds decimals","underflow","parseFixed"),""===u&&(u="0");u.lengthnull==t[e]?n:(typeof t[e]!==r&&a.throwArgumentError("invalid fixed format ("+e+" not "+r+")","format."+e,t[e]),t[e]);e=i("signed","boolean",e),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&a.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&a.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new y(u,e,r,n)}}class m{constructor(t,e,r,n){t!==u&&a.throwError("cannot use FixedNumber constructor; use FixedNumber.from",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=e,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(t){this.format.name!==t.format.name&&a.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",t)}addUnsafe(t){this._checkFormat(t);const e=g(this._value,this.format.decimals),r=g(t._value,t.format.decimals);return m.fromValue(e.add(r),this.format.decimals,this.format)}subUnsafe(t){this._checkFormat(t);const e=g(this._value,this.format.decimals),r=g(t._value,t.format.decimals);return m.fromValue(e.sub(r),this.format.decimals,this.format)}mulUnsafe(t){this._checkFormat(t);const e=g(this._value,this.format.decimals),r=g(t._value,t.format.decimals);return m.fromValue(e.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(t){this._checkFormat(t);const e=g(this._value,this.format.decimals),r=g(t._value,t.format.decimals);return m.fromValue(e.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const t=this.toString().split(".");1===t.length&&t.push("0");let e=m.from(t[0],this.format);const r=!t[1].match(/^(0*)$/);return this.isNegative()&&r&&(e=e.subUnsafe(v.toFormat(e.format))),e}ceiling(){const t=this.toString().split(".");1===t.length&&t.push("0");let e=m.from(t[0],this.format);const r=!t[1].match(/^(0*)$/);return!this.isNegative()&&r&&(e=e.addUnsafe(v.toFormat(e.format))),e}round(t){null==t&&(t=0);const e=this.toString().split(".");if(1===e.length&&e.push("0"),(t<0||t>80||t%1)&&a.throwArgumentError("invalid decimal count","decimals",t),e[1].length<=t)return this;const r=m.from("1"+f.substring(0,t),this.format),n=b.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(t){if(null==t)return this._hex;t%8&&a.throwArgumentError("invalid byte width","width",t);const e=s.O$.from(this._hex).fromTwos(this.format.width).toTwos(t).toHexString();return(0,n.hexZeroPad)(e,t/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(t){return m.fromString(this._value,t)}static fromValue(t,e,r){return null!=r||null==e||(0,s.Zm)(e)||(r=e,e=null),null==e&&(e=0),null==r&&(r="fixed"),m.fromString(p(t,e),y.from(r))}static fromString(t,e){null==e&&(e="fixed");const r=y.from(e),i=g(t,r.decimals);!r.signed&&i.lt(h)&&l("unsigned value cannot be negative","overflow","value",t);let o=null;r.signed?o=i.toTwos(r.width).toHexString():(o=i.toHexString(),o=(0,n.hexZeroPad)(o,r.width/8));const s=p(i,r.decimals);return new m(u,o,s,r)}static fromBytes(t,e){null==e&&(e="fixed");const r=y.from(e);if((0,n.arrayify)(t).length>r.width/8)throw new Error("overflow");let i=s.O$.from(t);r.signed&&(i=i.fromTwos(r.width));const o=i.toTwos((r.signed?0:1)+r.width).toHexString(),a=p(i,r.decimals);return new m(u,o,a,r)}static from(t,e){if("string"===typeof t)return m.fromString(t,e);if((0,n.isBytes)(t))return m.fromBytes(t,e);try{return m.fromValue(t,0,e)}catch(r){if(r.code!==i.Logger.errors.INVALID_ARGUMENT)throw r}return a.throwArgumentError("invalid FixedNumber value","value",t)}static isFixedNumber(t){return!(!t||!t._isFixedNumber)}}const v=m.from(1),b=m.from("0.5"),w=new i.Logger("units/5.7.0"),E=["wei","kwei","mwei","gwei","szabo","finney","ether"];function A(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||"."===t||"-."===t)&&w.throwArgumentError("invalid value","value",t);let r=e[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let i="";for(2===e.length&&(i="."+(e[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);const o=[];for(;r.length;){if(r.length<=3){o.unshift(r);break}{const t=r.length-3;o.unshift(r.substring(t)),r=r.substring(0,t)}}return n+o.join(",")+i}function k(t,e){if("string"===typeof e){const t=E.indexOf(e);-1!==t&&(e=3*t)}return p(t,null!=e?e:18)}function S(t,e){if("string"!==typeof t&&w.throwArgumentError("value must be a string","value",t),"string"===typeof e){const t=E.indexOf(e);-1!==t&&(e=3*t)}return g(t,null!=e?e:18)}function B(t){return k(t,18)}function x(t){return S(t,18)}},79911:function(t,e,r){"use strict";r.r(e),r.d(e,{Wallet:function(){return w},verifyMessage:function(){return E},verifyTypedData:function(){return A}});var n=r(19485),i=r(81556),o=r(48088),s=r(16441),a=r(93684),u=r(67827),h=r(86507),c=r(38197),l=r(6881),f=r(5634),d=r(67669),p=r(45659),g=r(81964),y=r(83875),m=r(1581);var v=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const b=new m.Logger("wallet/5.7.0");class w extends o.E{constructor(t,e){if(super(),null!=(r=t)&&(0,s.isHexString)(r.privateKey,32)&&null!=r.address){const e=new d.SigningKey(t.privateKey);if((0,l.defineReadOnly)(this,"_signingKey",(()=>e)),(0,l.defineReadOnly)(this,"address",(0,y.computeAddress)(this.publicKey)),this.address!==(0,n.getAddress)(t.address)&&b.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(t){const e=t.mnemonic;return e&&e.phrase}(t)){const e=t.mnemonic;(0,l.defineReadOnly)(this,"_mnemonic",(()=>({phrase:e.phrase,path:e.path||h.defaultPath,locale:e.locale||"en"})));const r=this.mnemonic,n=h.HDNode.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);(0,y.computeAddress)(n.privateKey)!==this.address&&b.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,l.defineReadOnly)(this,"_mnemonic",(()=>null))}else{if(d.SigningKey.isSigningKey(t))"secp256k1"!==t.curve&&b.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,l.defineReadOnly)(this,"_signingKey",(()=>t));else{"string"===typeof t&&t.match(/^[0-9a-f]*$/i)&&64===t.length&&(t="0x"+t);const e=new d.SigningKey(t);(0,l.defineReadOnly)(this,"_signingKey",(()=>e))}(0,l.defineReadOnly)(this,"_mnemonic",(()=>null)),(0,l.defineReadOnly)(this,"address",(0,y.computeAddress)(this.publicKey))}var r;e&&!i.zt.isProvider(e)&&b.throwArgumentError("invalid provider","provider",e),(0,l.defineReadOnly)(this,"provider",e||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(t){return new w(this,t)}signTransaction(t){return(0,l.resolveProperties)(t).then((e=>{null!=e.from&&((0,n.getAddress)(e.from)!==this.address&&b.throwArgumentError("transaction from address mismatch","transaction.from",t.from),delete e.from);const r=this._signingKey().signDigest((0,c.keccak256)((0,y.serialize)(e)));return(0,y.serialize)(e,r)}))}signMessage(t){return v(this,void 0,void 0,(function*(){return(0,s.joinSignature)(this._signingKey().signDigest((0,a.r)(t)))}))}_signTypedData(t,e,r){return v(this,void 0,void 0,(function*(){const n=yield u.E.resolveNames(t,e,r,(t=>(null==this.provider&&b.throwError("cannot resolve ENS names without a provider",m.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:t}),this.provider.resolveName(t))));return(0,s.joinSignature)(this._signingKey().signDigest(u.E.hash(n.domain,e,n.value)))}))}encrypt(t,e,r){if("function"!==typeof e||r||(r=e,e={}),r&&"function"!==typeof r)throw new Error("invalid callback");return e||(e={}),(0,g.HI)(this,t,e,r)}static createRandom(t){let e=(0,f.O)(16);t||(t={}),t.extraEntropy&&(e=(0,s.arrayify)((0,s.hexDataSlice)((0,c.keccak256)((0,s.concat)([e,t.extraEntropy])),0,16)));const r=(0,h.entropyToMnemonic)(e,t.locale);return w.fromMnemonic(r,t.path,t.locale)}static fromEncryptedJson(t,e,r){return(0,p.decryptJsonWallet)(t,e,r).then((t=>new w(t)))}static fromEncryptedJsonSync(t,e){return new w((0,p.decryptJsonWalletSync)(t,e))}static fromMnemonic(t,e,r){return e||(e=h.defaultPath),new w(h.HDNode.fromMnemonic(t,null,r).derivePath(e))}}function E(t,e){return(0,y.recoverAddress)((0,a.r)(t),e)}function A(t,e,r,n){return(0,y.recoverAddress)(u.E.hash(t,e,r),n)}},37707:function(t,e,r){"use strict";r.r(e),r.d(e,{_fetchData:function(){return p},fetchJson:function(){return g},poll:function(){return y}});var n=r(59567),i=r(16441),o=r(6881),s=r(84917),a=r(1581);var u=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};function h(t,e){return u(this,void 0,void 0,(function*(){null==e&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(!0!==e.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=e.fetchOptions){const t=e.fetchOptions;t.mode&&(r.mode=t.mode),t.cache&&(r.cache=t.cache),t.credentials&&(r.credentials=t.credentials),t.redirect&&(r.redirect=t.redirect),t.referrer&&(r.referrer=t.referrer)}const n=yield fetch(t,r),o=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach(((t,e)=>{s[e.toLowerCase()]=t})):n.headers.keys().forEach((t=>{s[t.toLowerCase()]=n.headers.get(t)})),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:(0,i.arrayify)(new Uint8Array(o))}}))}var c=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const l=new a.Logger("web/5.7.1");function f(t){return new Promise((e=>{setTimeout(e,t)}))}function d(t,e){if(null==t)return null;if("string"===typeof t)return t;if((0,i.isBytesLike)(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return(0,s.ZN)(t)}catch(r){}return(0,i.hexlify)(t)}return t}function p(t,e,r){const i="object"===typeof t&&null!=t.throttleLimit?t.throttleLimit:12;l.assertArgument(i>0&&i%1===0,"invalid connection throttle limit","connection.throttleLimit",i);const u="object"===typeof t?t.throttleCallback:null,p="object"===typeof t&&"number"===typeof t.throttleSlotInterval?t.throttleSlotInterval:100;l.assertArgument(p>0&&p%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",p);const g="object"===typeof t&&!!t.errorPassThrough,y={};let m=null;const v={method:"GET"};let b=!1,w=12e4;if("string"===typeof t)m=t;else if("object"===typeof t){if(null!=t&&null!=t.url||l.throwArgumentError("missing URL","connection.url",t),m=t.url,"number"===typeof t.timeout&&t.timeout>0&&(w=t.timeout),t.headers)for(const e in t.headers)y[e.toLowerCase()]={key:e,value:String(t.headers[e])},["if-none-match","if-modified-since"].indexOf(e.toLowerCase())>=0&&(b=!0);if(v.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==m.substring(0,6)&&!0!==t.allowInsecureAuthentication&&l.throwError("basic authentication requires a secure https url",a.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:m,user:t.user,password:"[REDACTED]"});const e=t.user+":"+t.password;y.authorization={key:"Authorization",value:"Basic "+(0,n.c)((0,s.Y0)(e))}}null!=t.skipFetchSetup&&(v.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(v.fetchOptions=(0,o.shallowCopy)(t.fetchOptions))}const E=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),A=m?m.match(E):null;if(A)try{const t={statusCode:200,statusMessage:"OK",headers:{"content-type":A[1]||"text/plain"},body:A[2]?(0,n.J)(A[3]):(k=A[3],(0,s.Y0)(k.replace(/%([0-9a-f][0-9a-f])/gi,((t,e)=>String.fromCharCode(parseInt(e,16))))))};let e=t.body;return r&&(e=r(t.body,t)),Promise.resolve(e)}catch(C){l.throwError("processing response error",a.Logger.errors.SERVER_ERROR,{body:d(A[1],A[2]),error:C,requestBody:null,requestMethod:"GET",url:m})}var k;e&&(v.method="POST",v.body=e,null==y["content-type"]&&(y["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==y["content-length"]&&(y["content-length"]={key:"Content-Length",value:String(e.length)}));const S={};Object.keys(y).forEach((t=>{const e=y[t];S[e.key]=e.value})),v.headers=S;const B=function(){let t=null;return{promise:new Promise((function(e,r){w&&(t=setTimeout((()=>{null!=t&&(t=null,r(l.makeError("timeout",a.Logger.errors.TIMEOUT,{requestBody:d(v.body,S["content-type"]),requestMethod:v.method,timeout:w,url:m})))}),w))})),cancel:function(){null!=t&&(clearTimeout(t),t=null)}}}(),x=function(){return c(this,void 0,void 0,(function*(){for(let t=0;t=300)&&(B.cancel(),l.throwError("bad response",a.Logger.errors.SERVER_ERROR,{status:e.statusCode,headers:e.headers,body:d(n,e.headers?e.headers["content-type"]:null),requestBody:d(v.body,S["content-type"]),requestMethod:v.method,url:m})),r)try{const t=yield r(n,e);return B.cancel(),t}catch(C){if(C.throttleRetry&&t"content-type"===t.toLowerCase())).length||(r.headers=(0,o.shallowCopy)(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};t=r}return p(t,n,((t,e)=>{let n=null;if(null!=t)try{n=JSON.parse((0,s.ZN)(t))}catch(i){l.throwError("invalid JSON",a.Logger.errors.SERVER_ERROR,{body:t,error:i})}return r&&(n=r(n,e)),n}))}function y(t,e){return e||(e={}),null==(e=(0,o.shallowCopy)(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){let i=null,o=!1;const s=()=>!o&&(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout((()=>{s()&&n(new Error("timeout"))}),e.timeout));const a=e.retryLimit;let u=0;!function i(){return t().then((function(t){if(void 0!==t)s()&&r(t);else if(e.oncePoll)e.oncePoll.once("poll",i);else if(e.onceBlock)e.onceBlock.once("block",i);else if(!o){if(u++,u>a)return void(s()&&n(new Error("retry limit reached")));let t=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));te.ceiling&&(t=e.ceiling),setTimeout(i,t)}return null}),(function(t){s()&&n(t)}))}()}))}},28820:function(t){"use strict";t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r>>0,h=new Uint8Array(o);t[r];){var c=e[t.charCodeAt(r)];if(255===c)return;for(var l=0,f=o-1;(0!==c||l>>0,h[f]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");i=l,r++}if(" "!==t[r]){for(var d=o-i;d!==o&&0===h[d];)d++;for(var p=new Uint8Array(n+(o-d)),g=n;d!==o;)p[g++]=h[d++];return p}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var u=(o-i)*h+1>>>0,c=new Uint8Array(u);i!==o;){for(var l=e[i],f=0,d=u-1;(0!==l||f>>0,c[d]=l%s>>>0,l=l/s>>>0;if(0!==l)throw new Error("Non-zero carry");n=f,i++}for(var p=u-n;p!==u&&0===c[p];)p++;for(var g=a.repeat(r);pn===i?t:(r[o]=t,N(t*n,e))),o),e);return t.reduceRight(((t,n,o)=>n===i?t:(r[o]=N(t*r[o],e),N(t*n,e))),n),r}(t.map((t=>t.z)));return t.map(((t,r)=>t.toAffine(e[r])))}static normalizeZ(t){return this.toAffineBatch(t).map(this.fromAffine)}equals(t){v(t);const{x:e,y:r,z:n}=this,{x:i,y:o,z:s}=t,a=N(e*s),u=N(i*n),h=N(r*s),c=N(o*n);return a===u&&h===c}negate(){return new y(N(-this.x),this.y,this.z,N(-this.t))}double(){const{x:t,y:e,z:r}=this,{a:n}=h,i=N(t*t),o=N(e*e),a=N(s*N(r*r)),u=N(n*i),c=t+e,l=N(N(c*c)-i-o),f=u+o,d=f-a,p=u-o,g=N(l*d),m=N(f*p),v=N(l*p),b=N(d*f);return new y(g,m,b,v)}add(t){v(t);const{x:e,y:r,z:n,t:o}=this,{x:a,y:u,z:h,t:c}=t,l=N((r-e)*(u+a)),f=N((r+e)*(u-a)),d=N(f-l);if(d===i)return this.double();const p=N(n*s*c),g=N(o*s*h),m=g+p,b=f+l,w=g-p,E=N(m*d),A=N(b*w),k=N(m*w),S=N(d*b);return new y(E,A,S,k)}subtract(t){return this.add(t.negate())}precomputeWindow(t){const e=1+256/t,r=[];let n=this,i=n;for(let o=0;o>=l,r>u&&(r-=c,t+=o);const a=e,d=e+Math.abs(r)-1,p=f%2!==0,g=r<0;0===r?s=s.add(m(p,n[a])):i=i.add(m(g,n[d]))}return y.normalizeZ([i,s])[0]}multiply(t,e){return this.wNAF(H(t,h.l),e)}multiplyUnsafe(t){let e=H(t,h.l,!1);const r=y.BASE,n=y.ZERO;if(e===i)return n;if(this.equals(n)||e===o)return this;if(this.equals(r))return this.wNAF(e);let s=n,a=this;for(;e>i;)e&o&&(s=s.add(a)),a=a.double(),e>>=o;return s}isSmallOrder(){return this.multiplyUnsafe(h.h).equals(y.ZERO)}isTorsionFree(){let t=this.multiplyUnsafe(h.l/s).double();return h.l%s&&(t=t.add(this)),t.equals(y.ZERO)}toAffine(t){const{x:e,y:r,z:n}=this,i=this.equals(y.ZERO);null==t&&(t=i?a:U(n));const s=N(e*t),u=N(r*t),h=N(n*t);if(i)return k.ZERO;if(h!==o)throw new Error("invZ was invalid");return new k(s,u)}fromRistrettoBytes(){w()}toRistrettoBytes(){w()}fromRistrettoHash(){w()}}function m(t,e){const r=e.negate();return t?r:e}function v(t){if(!(t instanceof y))throw new TypeError("ExtendedPoint expected")}function b(t){if(!(t instanceof E))throw new TypeError("RistrettoPoint expected")}function w(){throw new Error("Legacy method: switch to RistrettoPoint")}e.ExtendedPoint=y,y.BASE=new y(h.Gx,h.Gy,o,N(h.Gx*h.Gy)),y.ZERO=new y(i,o,o,i);class E{constructor(t){this.ep=t}static calcElligatorRistrettoMap(t){const{d:e}=h,r=N(l*t*t),n=N((r+o)*p);let i=BigInt(-1);const s=N((i-e*r)*N(r+e));let{isValid:a,value:u}=F(n,s),c=N(u*t);O(c)||(c=N(-c)),a||(u=c),a||(i=r);const d=N(i*(r-o)*g-s),m=u*u,v=N((u+u)*s),b=N(d*f),w=N(o-m),E=N(o+m);return new y(N(v*E),N(w*b),N(b*E),N(v*w))}static hashToCurve(t){const e=P((t=z(t,64)).slice(0,32)),r=this.calcElligatorRistrettoMap(e),n=P(t.slice(32,64)),i=this.calcElligatorRistrettoMap(n);return new E(r.add(i))}static fromHex(t){t=z(t,32);const{a:e,d:r}=h,n="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",s=P(t);if(!function(t,e){if(t.length!==e.length)return!1;for(let r=0;r=n)throw new Error("Expected 0 < hex < P");if(!e&&s>=c)throw new Error("Expected 0 < hex < 2**256");const a=N(s*s),u=N(a-o),l=N(r*a+o);let{isValid:f,value:d}=F(u,l);if(!f)throw new Error("Point.fromHex: invalid y coordinate");const p=(d&o)===o;return 0!==(128&t[31])!==p&&(d=N(-d)),new k(d,s)}static async fromPrivateKey(t){return(await J(t)).point}toRawBytes(){const t=T(this.y);return t[31]|=this.x&o?128:0,t}toHex(){return C(this.toRawBytes())}toX25519(){const{y:t}=this;return T(N((o+t)*U(o-t)))}isTorsionFree(){return y.fromAffine(this).isTorsionFree()}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new k(N(-this.x),this.y)}add(t){return y.fromAffine(this).add(y.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return y.fromAffine(this).multiply(t,this).toAffine()}}e.Point=k,k.BASE=new k(h.Gx,h.Gy),k.ZERO=new k(i,o);class S{constructor(t,e){this.r=t,this.s=e,this.assertValidity()}static fromHex(t){const e=z(t,64),r=k.fromHex(e.slice(0,32),!1),n=R(e.slice(32,64));return new S(r,n)}assertValidity(){const{r:t,s:e}=this;if(!(t instanceof k))throw new Error("Expected Point instance");return H(e,h.l,!1),this}toRawBytes(){const t=new Uint8Array(64);return t.set(this.r.toRawBytes()),t.set(T(this.s),32),t}toHex(){return C(this.toRawBytes())}}function B(...t){if(!t.every((t=>t instanceof Uint8Array)))throw new Error("Expected Uint8Array list");if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);for(let n=0,i=0;ne.toString(16).padStart(2,"0")));function C(t){if(!(t instanceof Uint8Array))throw new Error("Uint8Array expected");let e="";for(let r=0;r=i?r:e+r}function U(t,e=h.P){if(t===i||e<=i)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=N(t,e),n=e,s=i,a=o,u=o,c=i;for(;r!==i;){const t=n/r,e=n%r,i=s-u*t,o=a-c*t;n=r,r=e,s=u,a=c,u=i,c=o}if(n!==o)throw new Error("invert: does not exist");return N(s,e)}function L(t,e){const{P:r}=h;let n=t;for(;e-- >i;)n*=n,n%=r;return n}function D(t){const{P:e}=h,r=BigInt(5),n=BigInt(10),i=BigInt(20),a=BigInt(40),u=BigInt(80),c=t*t%e*t%e,l=L(c,s)*c%e,f=L(l,o)*t%e,d=L(f,r)*f%e,p=L(d,n)*d%e,g=L(p,i)*p%e,y=L(g,a)*g%e,m=L(y,u)*y%e,v=L(m,u)*y%e,b=L(v,n)*d%e;return{pow_p_5_8:L(b,s)*t%e,b2:c}}function F(t,e){const r=N(e*e*e),n=N(r*r*e);let i=N(t*r*D(t*n).pow_p_5_8);const o=N(e*i*i),s=i,a=N(i*l),u=o===t,h=o===N(-t),c=o===N(-t*l);return u&&(i=s),(h||c)&&(i=a),O(i)&&(i=N(-i)),{isValid:u||h,value:i}}function j(t){return F(o,t)}function K(t){return N(R(t),h.l)}function z(t,e){const r=t instanceof Uint8Array?Uint8Array.from(t):I(t);if("number"===typeof e&&r.length!==e)throw new Error(`Expected ${e} bytes`);return r}function H(t,e,r=!0){if(!e)throw new TypeError("Specify max value");if("number"===typeof t&&Number.isSafeInteger(t)&&(t=BigInt(t)),"bigint"===typeof t&&t=i;h--){const t=s>>h&o;g^=t,c=$(g,l,d),l=c[0],d=c[1],c=$(g,f,p),f=c[0],p=c[1],g=t;const e=l+f,r=N(e*e),n=l-f,i=N(n*n),y=r-i,m=d+p,v=N((d-p)*e),b=N(m*n),w=v+b,E=v-b;d=N(w*w),p=N(u*N(E*E)),l=N(r*i),f=N(y*(r+N(a*y)))}c=$(g,l,d),l=c[0],d=c[1],c=$(g,f,p),f=c[0],p=c[1];const{pow_p_5_8:y,b2:m}=D(f),v=N(L(y,BigInt(3))*m);return N(l*v)}(function(t){const e=z(t,32);return e[31]&=127,R(e)}(e),function(t){return R(q(z(t,32)))}(t));if(r===i)throw new Error("Invalid private or public key received");return function(t){return T(N(t,h.P))}(r)},scalarMultBase:t=>e.curve25519.scalarMult(t,e.curve25519.BASE_POINT_U)};const tt={node:n,web:"object"===typeof self&&"crypto"in self?self.crypto:void 0};e.utils={bytesToHex:C,hexToBytes:I,concatBytes:B,getExtendedPublicKey:J,mod:N,invert:U,TORSION_SUBGROUP:["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"],hashToPrivateScalar:t=>{if((t=z(t)).length<40||t.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return N(R(t),h.l-o)+o},randomBytes:(t=32)=>{if(tt.web)return tt.web.getRandomValues(new Uint8Array(t));if(tt.node){const{randomBytes:e}=tt.node;return new Uint8Array(e(t).buffer)}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.randomBytes(32),sha512:async(...t)=>{const e=B(...t);if(tt.web){const t=await tt.web.subtle.digest("SHA-512",e.buffer);return new Uint8Array(t)}if(tt.node)return Uint8Array.from(tt.node.createHash("sha512").update(e).digest());throw new Error("The environment doesn't have sha512 function")},precompute(t=8,e=k.BASE){const r=e.equals(k.BASE)?e:new k(e.x,e.y);return r._setWindowSize(t),r.multiply(s),r},sha512Sync:void 0},Object.defineProperties(e.utils,{sha512Sync:{configurable:!1,get:()=>W,set(t){W||(W=t)}}})},79656:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const n=r(69159),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),u=BigInt(8),h=Object.freeze({a:i,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:o,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=h;const c=(t,e)=>(t+e/s)/e,l={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(t){const{n:e}=h,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-o*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),u=c(s*t,e),l=c(-n*t,e);let f=L(t-u*r-l*i,e),d=L(-u*n-l*s,e);const p=f>a,g=d>a;if(p&&(f=e-f),g&&(d=e-d),f>a||d>a)throw new Error("splitScalarEndo: Endomorphism failed, k="+t);return{k1neg:p,k1:f,k2neg:g,k2:d}}},f=32,d=32;function p(t){const{a:e,b:r}=h,n=L(t*t),i=L(n*t);return L(i+e*t+r)}const g=h.a===i;class y extends Error{constructor(t){super(t)}}function m(t){if(!(t instanceof v))throw new TypeError("JacobianPoint expected")}class v{constructor(t,e,r){this.x=t,this.y=e,this.z=r}static fromAffine(t){if(!(t instanceof E))throw new TypeError("JacobianPoint#fromAffine: expected Point");return t.equals(E.ZERO)?v.ZERO:new v(t.x,t.y,o)}static toAffineBatch(t){const e=function(t,e=h.P){const r=new Array(t.length),n=F(t.reduce(((t,n,o)=>n===i?t:(r[o]=t,L(t*n,e))),o),e);return t.reduceRight(((t,n,o)=>n===i?t:(r[o]=L(t*r[o],e),L(t*n,e))),n),r}(t.map((t=>t.z)));return t.map(((t,r)=>t.toAffine(e[r])))}static normalizeZ(t){return v.toAffineBatch(t).map(v.fromAffine)}equals(t){m(t);const{x:e,y:r,z:n}=this,{x:i,y:o,z:s}=t,a=L(n*n),u=L(s*s),h=L(e*u),c=L(i*a),l=L(L(r*s)*u),f=L(L(o*n)*a);return h===c&&l===f}negate(){return new v(this.x,L(-this.y),this.z)}double(){const{x:t,y:e,z:r}=this,n=L(t*t),i=L(e*e),o=L(i*i),h=t+i,c=L(s*(L(h*h)-n-o)),l=L(a*n),f=L(l*l),d=L(f-s*c),p=L(l*(c-d)-u*o),g=L(s*e*r);return new v(d,p,g)}add(t){m(t);const{x:e,y:r,z:n}=this,{x:o,y:a,z:u}=t;if(o===i||a===i)return this;if(e===i||r===i)return t;const h=L(n*n),c=L(u*u),l=L(e*c),f=L(o*h),d=L(L(r*u)*c),p=L(L(a*n)*h),g=L(f-l),y=L(p-d);if(g===i)return y===i?this.double():v.ZERO;const b=L(g*g),w=L(g*b),E=L(l*b),A=L(y*y-w-s*E),k=L(y*(E-A)-d*w),S=L(n*u*g);return new v(A,k,S)}subtract(t){return this.add(t.negate())}multiplyUnsafe(t){const e=v.ZERO;if("bigint"===typeof t&&t===i)return e;let r=U(t);if(r===o)return this;if(!g){let t=e,n=this;for(;r>i;)r&o&&(t=t.add(n)),n=n.double(),r>>=o;return t}let{k1neg:n,k1:s,k2neg:a,k2:u}=l.splitScalar(r),h=e,c=e,f=this;for(;s>i||u>i;)s&o&&(h=h.add(f)),u&o&&(c=c.add(f)),f=f.double(),s>>=o,u>>=o;return n&&(h=h.negate()),a&&(c=c.negate()),c=new v(L(c.x*l.beta),c.y,c.z),h.add(c)}precomputeWindow(t){const e=g?128/t+1:256/t+1,r=[];let n=this,i=n;for(let o=0;o>=l,r>u&&(r-=c,t+=o);const a=e,d=e+Math.abs(r)-1,p=f%2!==0,g=r<0;0===r?s=s.add(b(p,n[a])):i=i.add(b(g,n[d]))}return{p:i,f:s}}multiply(t,e){let r,n,i=U(t);if(g){const{k1neg:t,k1:o,k2neg:s,k2:a}=l.splitScalar(i);let{p:u,f:h}=this.wNAF(o,e),{p:c,f:f}=this.wNAF(a,e);u=b(t,u),c=b(s,c),c=new v(L(c.x*l.beta),c.y,c.z),r=u.add(c),n=h.add(f)}else{const{p:t,f:o}=this.wNAF(i,e);r=t,n=o}return v.normalizeZ([r,n])[0]}toAffine(t){const{x:e,y:r,z:n}=this,i=this.equals(v.ZERO);null==t&&(t=i?u:F(n));const s=t,a=L(s*s),h=L(a*s),c=L(e*a),l=L(r*h),f=L(n*s);if(i)return E.ZERO;if(f!==o)throw new Error("invZ was invalid");return new E(c,l)}}function b(t,e){const r=e.negate();return t?r:e}v.BASE=new v(h.Gx,h.Gy,o),v.ZERO=new v(i,o,i);const w=new WeakMap;class E{constructor(t,e){this.x=t,this.y=e}_setWindowSize(t){this._WINDOW_SIZE=t,w.delete(this)}hasEvenY(){return this.y%s===i}static fromCompressedHex(t){const e=32===t.length,r=P(e?t:t.subarray(1));if(!V(r))throw new Error("Point is not on curve");let n=function(t){const{P:e}=h,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),u=BigInt(44),c=BigInt(88),l=t*t*t%e,f=l*l*t%e,d=D(f,a)*f%e,p=D(d,a)*f%e,g=D(p,s)*l%e,y=D(g,n)*g%e,m=D(y,i)*y%e,v=D(m,u)*m%e,b=D(v,c)*v%e,w=D(b,u)*m%e,E=D(w,a)*f%e,A=D(E,o)*y%e,k=D(A,r)*l%e,S=D(k,s);if(S*S%e!==t)throw new Error("Cannot find square root");return S}(p(r));const i=(n&o)===o;if(e)i&&(n=L(-n));else{1===(1&t[0])!==i&&(n=L(-n))}const u=new E(r,n);return u.assertValidity(),u}static fromUncompressedHex(t){const e=P(t.subarray(1,33)),r=P(t.subarray(33,65)),n=new E(e,r);return n.assertValidity(),n}static fromHex(t){const e=N(t),r=e.length,n=e[0];if(r===f)return this.fromCompressedHex(e);if(33===r&&(2===n||3===n))return this.fromCompressedHex(e);if(65===r&&4===n)return this.fromUncompressedHex(e);throw new Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${r}`)}static fromPrivateKey(t){return E.BASE.multiply(W(t))}static fromSignature(t,e,r){const{r:n,s:i}=J(e);if(![0,1,2,3].includes(r))throw new Error("Cannot recover: invalid recovery bit");const o=j(N(t)),{n:s}=h,a=2===r||3===r?n+s:n,u=F(a,s),c=L(-o*u,s),l=L(i*u,s),f=1&r?"03":"02",d=E.fromHex(f+M(a)),p=E.BASE.multiplyAndAddUnsafe(d,c,l);if(!p)throw new Error("Cannot recover signature: point at infinify");return p.assertValidity(),p}toRawBytes(t=!1){return _(this.toHex(t))}toHex(t=!1){const e=M(this.x);if(t){return`${this.hasEvenY()?"02":"03"}${e}`}return`04${e}${M(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const t="Point is not on elliptic curve",{x:e,y:r}=this;if(!V(e)||!V(r))throw new Error(t);const n=L(r*r);if(L(n-p(e))!==i)throw new Error(t)}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new E(this.x,L(-this.y))}double(){return v.fromAffine(this).double().toAffine()}add(t){return v.fromAffine(this).add(v.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return v.fromAffine(this).multiply(t,this).toAffine()}multiplyAndAddUnsafe(t,e,r){const n=v.fromAffine(this),s=e===i||e===o||this!==E.BASE?n.multiplyUnsafe(e):n.multiply(e),a=v.fromAffine(t).multiplyUnsafe(r),u=s.add(a);return u.equals(v.ZERO)?void 0:u.toAffine()}}function A(t){return Number.parseInt(t[0],16)>=8?"00"+t:t}function k(t){if(t.length<2||2!==t[0])throw new Error(`Invalid signature integer tag: ${C(t)}`);const e=t[1],r=t.subarray(2,e+2);if(!e||r.length!==e)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:t.subarray(e+2)}}e.Point=E,E.BASE=new E(h.Gx,h.Gy),E.ZERO=new E(i,i);class S{constructor(t,e){this.r=t,this.s=e,this.assertValidity()}static fromCompact(t){const e=t instanceof Uint8Array,r="Signature.fromCompact";if("string"!==typeof t&&!e)throw new TypeError(`${r}: Expected string or Uint8Array`);const n=e?C(t):t;if(128!==n.length)throw new Error(`${r}: Expected 64-byte hex`);return new S(R(n.slice(0,64)),R(n.slice(64,128)))}static fromDER(t){const e=t instanceof Uint8Array;if("string"!==typeof t&&!e)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:r,s:n}=function(t){if(t.length<2||48!=t[0])throw new Error(`Invalid signature tag: ${C(t)}`);if(t[1]!==t.length-2)throw new Error("Invalid signature: incorrect length");const{data:e,left:r}=k(t.subarray(2)),{data:n,left:i}=k(r);if(i.length)throw new Error(`Invalid signature: left bytes after parsing: ${C(i)}`);return{r:e,s:n}}(e?t:_(t));return new S(r,n)}static fromHex(t){return this.fromDER(t)}assertValidity(){const{r:t,s:e}=this;if(!q(t))throw new Error("Invalid Signature: r must be 0 < r < n");if(!q(e))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const t=h.n>>o;return this.s>t}normalizeS(){return this.hasHighS()?new S(this.r,L(-this.s,h.n)):this}toDERRawBytes(){return _(this.toDERHex())}toDERHex(){const t=A(O(this.s)),e=A(O(this.r)),r=t.length/2,n=e.length/2,i=O(r),o=O(n);return`30${O(n+r+4)}02${o}${e}02${i}${t}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return _(this.toCompactHex())}toCompactHex(){return M(this.r)+M(this.s)}}function B(...t){if(!t.every((t=>t instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);for(let n=0,i=0;ne.toString(16).padStart(2,"0")));function C(t){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");let e="";for(let r=0;r0)return BigInt(t);if("bigint"===typeof t&&q(t))return t;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function L(t,e=h.P){const r=t%e;return r>=i?r:e+r}function D(t,e){const{P:r}=h;let n=t;for(;e-- >i;)n*=n,n%=r;return n}function F(t,e=h.P){if(t===i||e<=i)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=L(t,e),n=e,s=i,a=o,u=o,c=i;for(;r!==i;){const t=n/r,e=n%r,i=s-u*t,o=a-c*t;n=r,r=e,s=u,a=c,u=i,c=o}if(n!==o)throw new Error("invert: does not exist");return L(s,e)}function j(t,e=!1){const r=function(t){const e=8*t.length-256,r=P(t);return e>0?r>>BigInt(e):r}(t);if(e)return r;const{n:n}=h;return r>=n?r-n:r}let K,z;class H{constructor(t,e){if(this.hashLen=t,this.qByteLen=e,"number"!==typeof t||t<2)throw new Error("hashLen must be a number");if("number"!==typeof e||e<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(t).fill(1),this.k=new Uint8Array(t).fill(0),this.counter=0}hmac(...t){return e.utils.hmacSha256(this.k,...t)}hmacSync(...t){return z(this.k,...t)}checkSync(){if("function"!==typeof z)throw new y("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(t=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),t),this.v=await this.hmac(this.v),0!==t.length&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),t),this.v=await this.hmac(this.v))}reseedSync(t=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),t),this.v=this.hmacSync(this.v),0!==t.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),t),this.v=this.hmacSync(this.v))}async generate(){this.incr();let t=0;const e=[];for(;t0)e=BigInt(t);else if("string"===typeof t){if(64!==t.length)throw new Error("Expected 32 bytes of private key");e=R(t)}else{if(!(t instanceof Uint8Array))throw new TypeError("Expected valid private key");if(t.length!==d)throw new Error("Expected 32 bytes of private key");e=P(t)}if(!q(e))throw new Error("Expected private key: 0 < key < n");return e}function Z(t){return t instanceof E?(t.assertValidity(),t):E.fromHex(t)}function J(t){if(t instanceof S)return t.assertValidity(),t;try{return S.fromDER(t)}catch(e){return S.fromCompact(t)}}function Q(t){const e=t instanceof Uint8Array,r="string"===typeof t,n=(e||r)&&t.length;return e?33===n||65===n:r?66===n||130===n:t instanceof E}function X(t){return P(t.length>f?t.slice(0,f):t)}function Y(t){const e=X(t),r=L(e,h.n);return $(r{if((t=N(t)).length<40||t.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");return T(L(P(t),h.n-o)+o)},randomBytes:(t=32)=>{if(ct.web)return ct.web.getRandomValues(new Uint8Array(t));if(ct.node){const{randomBytes:e}=ct.node;return Uint8Array.from(e(t))}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(40)),precompute(t=8,e=E.BASE){const r=e===E.BASE?e:new E(e.x,e.y);return r._setWindowSize(t),r.multiply(a),r},sha256:async(...t)=>{if(ct.web){const e=await ct.web.subtle.digest("SHA-256",B(...t));return new Uint8Array(e)}if(ct.node){const{createHash:e}=ct.node,r=e("sha256");return t.forEach((t=>r.update(t))),Uint8Array.from(r.digest())}throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(t,...e)=>{if(ct.web){const r=await ct.web.subtle.importKey("raw",t,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=B(...e),i=await ct.web.subtle.sign("HMAC",r,n);return new Uint8Array(i)}if(ct.node){const{createHmac:r}=ct.node,n=r("sha256",t);return e.forEach((t=>n.update(t))),Uint8Array.from(n.digest())}throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(t,...r)=>{let n=ft[t];if(void 0===n){const r=await e.utils.sha256(Uint8Array.from(t,(t=>t.charCodeAt(0))));n=B(r,r),ft[t]=n}return e.utils.sha256(n,...r)},taggedHashSync:(t,...e)=>{if("function"!==typeof K)throw new y("sha256Sync is undefined, you need to set it");let r=ft[t];if(void 0===r){const e=K(Uint8Array.from(t,(t=>t.charCodeAt(0))));r=B(e,e),ft[t]=r}return K(r,...e)},_JacobianPoint:v},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get:()=>K,set(t){K||(K=t)}},hmacSha256Sync:{configurable:!1,get:()=>z,set(t){z||(z=t)}}})},34537:function(t){"use strict";t.exports=function(t,e){var r=new Array(arguments.length-1),n=0,i=2,o=!0;for(;i1&&"="===t.charAt(e);)++r;return Math.ceil(3*t.length)/4-r};for(var n=new Array(64),i=new Array(123),o=0;o<64;)i[n[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;r.encode=function(t,e,r){for(var i,o=null,s=[],a=0,u=0;e>2],i=(3&h)<<4,u=1;break;case 1:s[a++]=n[i|h>>4],i=(15&h)<<2,u=2;break;case 2:s[a++]=n[i|h>>6],s[a++]=n[63&h],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=n[i],s[a++]=61,1===u&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";r.decode=function(t,e,r){for(var n,o=r,a=0,u=0;u1)break;if(void 0===(h=i[h]))throw Error(s);switch(a){case 0:n=h,a=1;break;case 1:e[r++]=n<<2|(48&h)>>4,n=h,a=2;break;case 2:e[r++]=(15&n)<<4|(60&h)>>2,n=h,a=3;break;case 3:e[r++]=(3&n)<<6|h,a=0}}if(1===a)throw Error(s);return r-o},r.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},19211:function(t){"use strict";function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,r){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:r||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var r=this._listeners[t],n=0;n0?0:2147483648,r,n);else if(isNaN(e))t(2143289344,r,n);else if(e>34028234663852886e22)t((i<<31|2139095040)>>>0,r,n);else if(e<11754943508222875e-54)t((i<<31|Math.round(e/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(e)/Math.LN2);t((i<<31|o+127<<23|8388607&Math.round(e*Math.pow(2,-o)*8388608))>>>0,r,n)}}function s(t,e,r){var n=t(e,r),i=2*(n>>31)+1,o=n>>>23&255,s=8388607&n;return 255===o?s?NaN:i*(1/0):0===o?1401298464324817e-60*i*s:i*Math.pow(2,o-150)*(s+8388608)}t.writeFloatLE=e.bind(null,r),t.writeFloatBE=e.bind(null,n),t.readFloatLE=s.bind(null,i),t.readFloatBE=s.bind(null,o)}(),"undefined"!==typeof Float64Array?function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),n=128===r[7];function i(t,n,i){e[0]=t,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(t,n,i){e[0]=t,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function s(t,n){return r[0]=t[n],r[1]=t[n+1],r[2]=t[n+2],r[3]=t[n+3],r[4]=t[n+4],r[5]=t[n+5],r[6]=t[n+6],r[7]=t[n+7],e[0]}function a(t,n){return r[7]=t[n],r[6]=t[n+1],r[5]=t[n+2],r[4]=t[n+3],r[3]=t[n+4],r[2]=t[n+5],r[1]=t[n+6],r[0]=t[n+7],e[0]}t.writeDoubleLE=n?i:o,t.writeDoubleBE=n?o:i,t.readDoubleLE=n?s:a,t.readDoubleBE=n?a:s}():function(){function e(t,e,r,n,i,o){var s=n<0?1:0;if(s&&(n=-n),0===n)t(0,i,o+e),t(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))t(0,i,o+e),t(2146959360,i,o+r);else if(n>17976931348623157e292)t(0,i,o+e),t((s<<31|2146435072)>>>0,i,o+r);else{var a;if(n<22250738585072014e-324)t((a=n/5e-324)>>>0,i,o+e),t((s<<31|a/4294967296)>>>0,i,o+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),t(4503599627370496*(a=n*Math.pow(2,-u))>>>0,i,o+e),t((s<<31|u+1023<<20|1048576*a&1048575)>>>0,i,o+r)}}}function s(t,e,r,n,i){var o=t(n,i+e),s=t(n,i+r),a=2*(s>>31)+1,u=s>>>20&2047,h=4294967296*(1048575&s)+o;return 2047===u?h?NaN:a*(1/0):0===u?5e-324*a*h:a*Math.pow(2,u-1075)*(h+4503599627370496)}t.writeDoubleLE=e.bind(null,r,0,4),t.writeDoubleBE=e.bind(null,n,4,0),t.readDoubleLE=s.bind(null,i,0,4),t.readDoubleBE=s.bind(null,o,4,0)}(),t}function r(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function n(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=255&t}function i(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function o(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},67199:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},76662:function(t){"use strict";t.exports=function(t,e,r){var n=r||8192,i=n>>>1,o=null,s=n;return function(r){if(r<1||r>i)return t(r);s+r>n&&(o=t(n),s=0);var a=e.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}},94997:function(t,e){"use strict";var r=e;r.length=function(t){for(var e=0,r=0,n=0;n191&&n<224?o[s++]=(31&n)<<6|63&t[e++]:n>239&&n<365?(n=((7&n)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[s++]=55296+(n>>10),o[s++]=56320+(1023&n)):o[s++]=(15&n)<<12|(63&t[e++])<<6|63&t[e++],s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),s=0);return i?(s&&i.push(String.fromCharCode.apply(String,o.slice(0,s))),i.join("")):String.fromCharCode.apply(String,o.slice(0,s))},r.write=function(t,e,r){for(var n,i,o=r,s=0;s>6|192,e[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=t.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&i),++s,e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=63&n|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=63&n|128);return r-o}},78826:function(t){"use strict";!function(e){function r(t){return parseInt(t)===t}function n(t){if(!r(t.length))return!1;for(var e=0;e255)return!1;return!0}function i(t,e){if(t.buffer&&ArrayBuffer.isView(t)&&"Uint8Array"===t.name)return e&&(t=t.slice?t.slice():Array.prototype.slice.call(t)),t;if(Array.isArray(t)){if(!n(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(r(t.length)&&n(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function o(t){return new Uint8Array(t)}function s(t,e,r,n,i){null==n&&null==i||(t=t.slice?t.slice(n,i):Array.prototype.slice.call(t,n,i)),e.set(t,r)}var a={toBytes:function(t){var e=[],r=0;for(t=encodeURI(t);r191&&n<224?(e.push(String.fromCharCode((31&n)<<6|63&t[r+1])),r+=2):(e.push(String.fromCharCode((15&n)<<12|(63&t[r+1])<<6|63&t[r+2])),r+=3)}return e.join("")}},u=function(){var t="0123456789abcdef";return{toBytes:function(t){for(var e=[],r=0;r>4]+t[15&i])}return r.join("")}}}(),h={16:10,24:12,32:14},c=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],l=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],f=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],d=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],y=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],m=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],v=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],b=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],E=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],k=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],S=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function B(t){for(var e=[],r=0;r>2,this._Ke[r][e%4]=o[e],this._Kd[t-r][e%4]=o[e];for(var s,a=0,u=i;u>16&255]<<24^l[s>>8&255]<<16^l[255&s]<<8^l[s>>24&255]^c[a]<<24,a+=1,8!=i)for(e=1;e>8&255]<<8^l[s>>16&255]<<16^l[s>>24&255]<<24;for(e=i/2+1;e>2,d=u%4,this._Ke[f][d]=o[e],this._Kd[t-f][d]=o[e++],u++}for(var f=1;f>24&255]^A[s>>16&255]^k[s>>8&255]^S[255&s]},x.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,r=[0,0,0,0],n=B(t),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var s=1;s>24&255]^p[n[(i+1)%4]>>16&255]^g[n[(i+2)%4]>>8&255]^y[255&n[(i+3)%4]]^this._Ke[s][i];n=r.slice()}var a,u=o(16);for(i=0;i<4;i++)a=this._Ke[e][i],u[4*i]=255&(l[n[i]>>24&255]^a>>24),u[4*i+1]=255&(l[n[(i+1)%4]>>16&255]^a>>16),u[4*i+2]=255&(l[n[(i+2)%4]>>8&255]^a>>8),u[4*i+3]=255&(l[255&n[(i+3)%4]]^a);return u},x.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,r=[0,0,0,0],n=B(t),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var s=1;s>24&255]^v[n[(i+3)%4]>>16&255]^b[n[(i+2)%4]>>8&255]^w[255&n[(i+1)%4]]^this._Kd[s][i];n=r.slice()}var a,u=o(16);for(i=0;i<4;i++)a=this._Kd[e][i],u[4*i]=255&(f[n[i]>>24&255]^a>>24),u[4*i+1]=255&(f[n[(i+3)%4]>>16&255]^a>>16),u[4*i+2]=255&(f[n[(i+2)%4]>>8&255]^a>>8),u[4*i+3]=255&(f[255&n[(i+1)%4]]^a);return u};var C=function(t){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new x(t)};C.prototype.encrypt=function(t){if((t=i(t)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=o(t.length),r=o(16),n=0;n=0;--e)this._counter[e]=t%256,t>>=8},O.prototype.setBytes=function(t){if(16!=(t=i(t,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},O.prototype.increment=function(){for(var t=15;t>=0;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var R=function(t,e){if(!(this instanceof R))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",e instanceof O||(e=new O(e)),this._counter=e,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new x(t)};R.prototype.encrypt=function(t){for(var e=i(t,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=t.length-e,n=0;n=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),i.forEach(["post","put","patch"],(function(t){c.headers[t]=i.merge(u)})),t.exports=c},80794:function(t){"use strict";t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},31488:function(t){t.exports={version:"0.26.1"}},45912:function(t){"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([r]):s[e]?s[e]+", "+r:r}})),s):s}},64883:function(t){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},82467:function(t,e,r){"use strict";var n=r(31488).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));var o={};i.transitional=function(t,e,r){function i(t,e){return"[Axios v"+n+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,n,s){if(!1===t)throw new Error(i(n," has been removed"+(e?" in "+e:"")));return e&&!o[n]&&(o[n]=!0,console.warn(i(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,n,s)}},t.exports={assertOptions:function(t,e,r){if("object"!==typeof t)throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var o=n[i],s=e[o];if(s){var a=t[o],u=void 0===a||s(a,o,t);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:i}},82:function(t,e,r){"use strict";var n=r(45912),i=Object.prototype.toString;function o(t){return Array.isArray(t)}function s(t){return"undefined"===typeof t}function a(t){return"[object ArrayBuffer]"===i.call(t)}function u(t){return null!==t&&"object"===typeof t}function h(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),o(t))for(var r=0,n=t.length;r=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r>>0,c=new Uint8Array(s);t[r];){var l=e[t.charCodeAt(r)];if(255===l)return;for(var f=0,d=s-1;(0!==l||f>>0,c[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");o=f,r++}for(var p=s-o;p!==s&&0===c[p];)p++;var g=n.allocUnsafe(i+(s-p));g.fill(0,0,i);for(var y=i;p!==s;)g[y++]=c[p++];return g}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,i=0,o=0,s=e.length;o!==s&&0===e[o];)o++,r++;for(var h=(s-o)*c+1>>>0,l=new Uint8Array(h);o!==s;){for(var f=e[o],d=0,p=h-1;(0!==f||d>>0,l[p]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");i=d,o++}for(var g=h-i;g!==h&&0===l[g];)g++;for(var y=u.repeat(r);g>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function o(t){let e=1;for(let r=0;r126)return"Invalid prefix ("+t+")";e=i(e)^n>>5}e=i(e);for(let r=0;r=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<=e)return"Excess padding";if(i<r)return"Exceeds length limit";const s=t.toLowerCase(),a=t.toUpperCase();if(t!==s&&t!==a)return"Mixed-case string "+t;const u=(t=s).lastIndexOf("1");if(-1===u)return"No separator character for "+t;if(0===u)return"Missing prefix for "+t;const h=t.slice(0,u),c=t.slice(u+1);if(c.length<6)return"Data too short";let l=o(h);if("string"===typeof l)return l;const f=[];for(let e=0;e=c.length||f.push(r)}return l!==e?"Invalid checksum for "+t:{prefix:h,words:f}}return e="bech32"===t?1:734539939,{decodeUnsafe:function(t,e){const r=s(t,e);if("object"===typeof r)return r},decode:function(t,e){const r=s(t,e);if("object"===typeof r)return r;throw new Error(r)},encode:function(t,n,s){if(s=s||90,t.length+7+n.length>s)throw new TypeError("Exceeds length limit");let a=o(t=t.toLowerCase());if("string"===typeof a)throw new Error(a);let u=t+"1";for(let e=0;e>5!==0)throw new Error("Non 5-bit word");a=i(a)^t,u+=r.charAt(t)}for(let e=0;e<6;++e)a=i(a);a^=e;for(let e=0;e<6;++e){u+=r.charAt(a>>5*(5-e)&31)}return u},toWords:a,fromWordsUnsafe:u,fromWords:h}}e.gW=c("bech32"),e.iE=c("bech32m")},24736:function(t,e,r){var n;t=r.nmd(t);var i=function(t){"use strict";var e=1e7,r=9007199254740992,n=c(r),o=Math.log(r);function s(t,e){return"undefined"===typeof t?s[0]:"undefined"!==typeof e?10===+e?Z(t):z(t,e):Z(t)}function a(t,e){this.value=t,this.sign=e,this.isSmall=!1}function u(t){this.value=t,this.sign=t<0,this.isSmall=!0}function h(t){return-r0?Math.floor(t):Math.ceil(t)}function g(t,r){var n,i,o=t.length,s=r.length,a=new Array(o),u=0,h=e;for(i=0;i=h?1:0,a[i]=n-u*h;for(;i0&&a.push(u),a}function y(t,e){return t.length>=e.length?g(t,e):g(e,t)}function m(t,r){var n,i,o=t.length,s=new Array(o),a=e;for(i=0;i0;)s[i++]=r%a,r=Math.floor(r/a);return s}function v(t,r){var n,i,o=t.length,s=r.length,a=new Array(o),u=0,h=e;for(n=0;n0;)s[i++]=u%a,u=Math.floor(u/a);return s}function A(t,e){for(var r=[];e-- >0;)r.push(0);return r.concat(t)}function k(t,e){var r=Math.max(t.length,e.length);if(r<=30)return w(t,e);r=Math.ceil(r/2);var n=t.slice(r),i=t.slice(0,r),o=e.slice(r),s=e.slice(0,r),a=k(i,s),u=k(n,o),h=k(y(i,n),y(s,o)),c=y(y(a,A(v(v(h,a),u),r)),A(u,2*r));return f(c),c}function S(t,r,n){return new a(t=0;--r)i=(o=1e7*i+t[r])-(n=p(o/e))*e,a[r]=0|n;return[a,0|i]}function C(t,r){var n,i,o=Z(r),h=t.value,g=o.value;if(0===g)throw new Error("Cannot divide by zero");if(t.isSmall)return o.isSmall?[new u(p(h/g)),new u(h%g)]:[s[0],t];if(o.isSmall){if(1===g)return[t,s[0]];if(-1==g)return[t.negate(),s[0]];var y=Math.abs(g);if(y=0;i--){for(n=p-1,v[i+f]!==y&&(n=Math.floor((v[i+f]*p+v[i+f-1])/y)),o=0,s=0,u=b.length,a=0;ah&&(o=(o+1)*p),n=Math.ceil(o/s);do{if(I(a=E(r,n),d)<=0)break;n--}while(n);c.push(n),d=v(d,a)}return c.reverse(),[l(c),l(d)]}(h,g),i=n[0];var w=t.sign!==o.sign,A=n[1],k=t.sign;return"number"===typeof i?(w&&(i=-i),i=new u(i)):i=new a(i,w),"number"===typeof A?(k&&(A=-A),A=new u(A)):A=new a(A,k),[i,A]}function I(t,e){if(t.length!==e.length)return t.length>e.length?1:-1;for(var r=t.length-1;r>=0;r--)if(t[r]!==e[r])return t[r]>e[r]?1:-1;return 0}function M(t){var e=t.abs();return!e.isUnit()&&(!!(e.equals(2)||e.equals(3)||e.equals(5))||!(e.isEven()||e.isDivisibleBy(3)||e.isDivisibleBy(5))&&(!!e.lesser(49)||void 0))}function T(t,e){for(var r,n,o,a=t.prev(),u=a,h=0;u.isEven();)u=u.divide(2),h++;t:for(n=0;n=0?n=v(t,e):(n=v(e,t),r=!r),"number"===typeof(n=l(n))?(r&&(n=-n),new u(n)):new a(n,r)}(r,n,this.sign)},a.prototype.minus=a.prototype.subtract,u.prototype.subtract=function(t){var e=Z(t),r=this.value;if(r<0!==e.sign)return this.add(e.negate());var n=e.value;return e.isSmall?new u(r-n):b(n,Math.abs(r),r>=0)},u.prototype.minus=u.prototype.subtract,a.prototype.negate=function(){return new a(this.value,!this.sign)},u.prototype.negate=function(){var t=this.sign,e=new u(-this.value);return e.sign=!t,e},a.prototype.abs=function(){return new a(this.value,!1)},u.prototype.abs=function(){return new u(Math.abs(this.value))},a.prototype.multiply=function(t){var r,n,i,o=Z(t),u=this.value,h=o.value,l=this.sign!==o.sign;if(o.isSmall){if(0===h)return s[0];if(1===h)return this;if(-1===h)return this.negate();if((r=Math.abs(h))0?k(u,h):w(u,h),l)},a.prototype.times=a.prototype.multiply,u.prototype._multiplyBySmall=function(t){return h(t.value*this.value)?new u(t.value*this.value):S(Math.abs(t.value),c(Math.abs(this.value)),this.sign!==t.sign)},a.prototype._multiplyBySmall=function(t){return 0===t.value?s[0]:1===t.value?this:-1===t.value?this.negate():S(Math.abs(t.value),this.value,this.sign!==t.sign)},u.prototype.multiply=function(t){return Z(t)._multiplyBySmall(this)},u.prototype.times=u.prototype.multiply,a.prototype.square=function(){return new a(B(this.value),!1)},u.prototype.square=function(){var t=this.value*this.value;return h(t)?new u(t):new a(B(c(Math.abs(this.value))),!1)},a.prototype.divmod=function(t){var e=C(this,t);return{quotient:e[0],remainder:e[1]}},u.prototype.divmod=a.prototype.divmod,a.prototype.divide=function(t){return C(this,t)[0]},u.prototype.over=u.prototype.divide=a.prototype.over=a.prototype.divide,a.prototype.mod=function(t){return C(this,t)[1]},u.prototype.remainder=u.prototype.mod=a.prototype.remainder=a.prototype.mod,a.prototype.pow=function(t){var e,r,n,i=Z(t),o=this.value,a=i.value;if(0===a)return s[1];if(0===o)return s[0];if(1===o)return s[1];if(-1===o)return i.isEven()?s[1]:s[-1];if(i.sign)return s[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&h(e=Math.pow(o,a)))return new u(p(e));for(r=this,n=s[1];!0&a&&(n=n.times(r),--a),0!==a;)a/=2,r=r.square();return n},u.prototype.pow=a.prototype.pow,a.prototype.modPow=function(t,e){if(t=Z(t),(e=Z(e)).isZero())throw new Error("Cannot take modPow with modulus 0");for(var r=s[1],n=this.mod(e);t.isPositive();){if(n.isZero())return s[0];t.isOdd()&&(r=r.multiply(n).mod(e)),t=t.divide(2),n=n.square().mod(e)}return r},u.prototype.modPow=a.prototype.modPow,a.prototype.compareAbs=function(t){var e=Z(t),r=this.value,n=e.value;return e.isSmall?1:I(r,n)},u.prototype.compareAbs=function(t){var e=Z(t),r=Math.abs(this.value),n=e.value;return e.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},a.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=Z(t),r=this.value,n=e.value;return this.sign!==e.sign?e.sign?1:-1:e.isSmall?this.sign?-1:1:I(r,n)*(this.sign?-1:1)},a.prototype.compareTo=a.prototype.compare,u.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=Z(t),r=this.value,n=e.value;return e.isSmall?r==n?0:r>n?1:-1:r<0!==e.sign?r<0?-1:1:r<0?1:-1},u.prototype.compareTo=u.prototype.compare,a.prototype.equals=function(t){return 0===this.compare(t)},u.prototype.eq=u.prototype.equals=a.prototype.eq=a.prototype.equals,a.prototype.notEquals=function(t){return 0!==this.compare(t)},u.prototype.neq=u.prototype.notEquals=a.prototype.neq=a.prototype.notEquals,a.prototype.greater=function(t){return this.compare(t)>0},u.prototype.gt=u.prototype.greater=a.prototype.gt=a.prototype.greater,a.prototype.lesser=function(t){return this.compare(t)<0},u.prototype.lt=u.prototype.lesser=a.prototype.lt=a.prototype.lesser,a.prototype.greaterOrEquals=function(t){return this.compare(t)>=0},u.prototype.geq=u.prototype.greaterOrEquals=a.prototype.geq=a.prototype.greaterOrEquals,a.prototype.lesserOrEquals=function(t){return this.compare(t)<=0},u.prototype.leq=u.prototype.lesserOrEquals=a.prototype.leq=a.prototype.lesserOrEquals,a.prototype.isEven=function(){return 0===(1&this.value[0])},u.prototype.isEven=function(){return 0===(1&this.value)},a.prototype.isOdd=function(){return 1===(1&this.value[0])},u.prototype.isOdd=function(){return 1===(1&this.value)},a.prototype.isPositive=function(){return!this.sign},u.prototype.isPositive=function(){return this.value>0},a.prototype.isNegative=function(){return this.sign},u.prototype.isNegative=function(){return this.value<0},a.prototype.isUnit=function(){return!1},u.prototype.isUnit=function(){return 1===Math.abs(this.value)},a.prototype.isZero=function(){return!1},u.prototype.isZero=function(){return 0===this.value},a.prototype.isDivisibleBy=function(t){var e=Z(t),r=e.value;return 0!==r&&(1===r||(2===r?this.isEven():this.mod(e).equals(s[0])))},u.prototype.isDivisibleBy=a.prototype.isDivisibleBy,a.prototype.isPrime=function(e){var r=M(this);if(r!==t)return r;var n=this.abs(),o=n.bitLength();if(o<=64)return T(n,[2,325,9375,28178,450775,9780504,1795265022]);for(var s=Math.log(2)*o,a=Math.ceil(!0===e?2*Math.pow(s,2):s),u=[],h=0;h-r?new u(t-1):new a(n,!0)};for(var O=[1];2*O[O.length-1]<=e;)O.push(2*O[O.length-1]);var R=O.length,_=O[R-1];function P(t){return("number"===typeof t||"string"===typeof t)&&+Math.abs(t)<=e||t instanceof a&&t.value.length<=1}function N(t,e,r){e=Z(e);for(var n=t.isNegative(),o=e.isNegative(),s=n?t.not():t,a=o?e.not():e,u=0,h=0,c=null,l=null,f=[];!s.isZero()||!a.isZero();)u=(c=C(s,_))[1].toJSNumber(),n&&(u=_-1-u),h=(l=C(a,_))[1].toJSNumber(),o&&(h=_-1-h),s=c[0],a=l[0],f.push(r(u,h));for(var d=0!==r(n?1:0,o?1:0)?i(-1):i(0),p=f.length-1;p>=0;p-=1)d=d.multiply(_).add(i(f[p]));return d}a.prototype.shiftLeft=function(t){if(!P(t))throw new Error(String(t)+" is too large for shifting.");if((t=+t)<0)return this.shiftRight(-t);var e=this;if(e.isZero())return e;for(;t>=R;)e=e.multiply(_),t-=R-1;return e.multiply(O[t])},u.prototype.shiftLeft=a.prototype.shiftLeft,a.prototype.shiftRight=function(t){var e;if(!P(t))throw new Error(String(t)+" is too large for shifting.");if((t=+t)<0)return this.shiftLeft(-t);for(var r=this;t>=R;){if(r.isZero()||r.isNegative()&&r.isUnit())return r;r=(e=C(r,_))[1].isNegative()?e[0].prev():e[0],t-=R-1}return(e=C(r,O[t]))[1].isNegative()?e[0].prev():e[0]},u.prototype.shiftRight=a.prototype.shiftRight,a.prototype.not=function(){return this.negate().prev()},u.prototype.not=a.prototype.not,a.prototype.and=function(t){return N(this,t,(function(t,e){return t&e}))},u.prototype.and=a.prototype.and,a.prototype.or=function(t){return N(this,t,(function(t,e){return t|e}))},u.prototype.or=a.prototype.or,a.prototype.xor=function(t){return N(this,t,(function(t,e){return t^e}))},u.prototype.xor=a.prototype.xor;var U=1<<30;function L(t){var r=t.value,n="number"===typeof r?r|U:r[0]+r[1]*e|1073758208;return n&-n}function D(t,e){if(e.compareTo(t)<=0){var r=D(t,e.square(e)),n=r.p,o=r.e,s=n.multiply(e);return s.compareTo(t)<=0?{p:s,e:2*o+1}:{p:n,e:2*o}}return{p:i(1),e:0}}function F(t,e){return t=Z(t),e=Z(e),t.greater(e)?t:e}function j(t,e){return t=Z(t),e=Z(e),t.lesser(e)?t:e}function K(t,e){if(t=Z(t).abs(),e=Z(e).abs(),t.equals(e))return t;if(t.isZero())return e;if(e.isZero())return t;for(var r,n,i=s[1];t.isEven()&&e.isEven();)r=Math.min(L(t),L(e)),t=t.divide(r),e=e.divide(r),i=i.multiply(r);for(;t.isEven();)t=t.divide(L(t));do{for(;e.isEven();)e=e.divide(L(e));t.greater(e)&&(n=e,e=t,t=n),e=e.subtract(t)}while(!e.isZero());return i.isUnit()?t:t.multiply(i)}a.prototype.bitLength=function(){var t=this;return t.compareTo(i(0))<0&&(t=t.negate().subtract(i(1))),0===t.compareTo(i(0))?i(0):i(D(t,i(2)).e).add(i(1))},u.prototype.bitLength=a.prototype.bitLength;var z=function(t,e){for(var r=t.length,n=Math.abs(e),i=0;i=n){if("1"===c&&1===n)continue;throw new Error(c+" is not a valid digit in base "+e+".")}if(c.charCodeAt(0)-87>=n)throw new Error(c+" is not a valid digit in base "+e+".")}}if(2<=e&&e<=36&&r<=o/Math.log(e)){var s=parseInt(t,e);if(isNaN(s))throw new Error(c+" is not a valid digit in base "+e+".");return new u(parseInt(t,e))}e=Z(e);var a=[],h="-"===t[0];for(i=h?1:0;i"!==t[i]);a.push(Z(t.slice(f+1,i)))}}return H(a,e,h)};function H(t,e,r){var n,i=s[0],o=s[1];for(n=t.length-1;n>=0;n--)i=i.add(t[n].times(o)),o=o.times(e);return r?i.negate():i}function q(t){return t<=35?"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t):"<"+t+">"}function V(t,e){if((e=i(e)).isZero()){if(t.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(e.equals(-1)){if(t.isZero())return{value:[0],isNegative:!1};if(t.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-t)).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(+t-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(t.isNegative()&&e.isPositive()&&(n=!0,t=t.abs()),e.equals(1))return t.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(+t)).map(Number.prototype.valueOf,1),isNegative:n};for(var o,s=[],a=t;a.isNegative()||a.compareAbs(e)>=0;){o=a.divmod(e),a=o.quotient;var u=o.remainder;u.isNegative()&&(u=e.minus(u).abs(),a=a.next()),s.push(u.toJSNumber())}return s.push(a.toJSNumber()),{value:s.reverse(),isNegative:n}}function G(t,e){var r=V(t,e);return(r.isNegative?"-":"")+r.value.map(q).join("")}function W(t){if(h(+t)){var e=+t;if(e===p(e))return new u(e);throw new Error("Invalid integer: "+t)}var r="-"===t[0];r&&(t=t.slice(1));var n=t.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var i=n[1];if("+"===i[0]&&(i=i.slice(1)),(i=+i)!==p(i)||!h(i))throw new Error("Invalid integer: "+i+" is not a valid exponent.");var o=n[0],s=o.indexOf(".");if(s>=0&&(i-=o.length-s-1,o=o.slice(0,s)+o.slice(s+1)),i<0)throw new Error("Cannot include negative exponent part for integers");t=o+=new Array(i+1).join("0")}if(!/^([0-9][0-9]*)$/.test(t))throw new Error("Invalid integer: "+t);for(var c=[],l=t.length,d=l-7;l>0;)c.push(+t.slice(d,l)),(d-=7)<0&&(d=0),l-=7;return f(c),new a(c,r)}function Z(t){return"number"===typeof t?function(t){if(h(t)){if(t!==p(t))throw new Error(t+" is not an integer.");return new u(t)}return W(t.toString())}(t):"string"===typeof t?W(t):t}a.prototype.toArray=function(t){return V(this,t)},u.prototype.toArray=function(t){return V(this,t)},a.prototype.toString=function(e){if(e===t&&(e=10),10!==e)return G(this,e);for(var r,n=this.value,i=n.length,o=String(n[--i]);--i>=0;)r=String(n[i]),o+="0000000".slice(r.length)+r;return(this.sign?"-":"")+o},u.prototype.toString=function(e){return e===t&&(e=10),10!=e?G(this,e):String(this.value)},a.prototype.toJSON=u.prototype.toJSON=function(){return this.toString()},a.prototype.valueOf=function(){return parseInt(this.toString(),10)},a.prototype.toJSNumber=a.prototype.valueOf,u.prototype.valueOf=function(){return this.value},u.prototype.toJSNumber=u.prototype.valueOf;for(var J=0;J<1e3;J++)s[J]=new u(J),J>0&&(s[-J]=new u(-J));return s.one=s[1],s.zero=s[0],s.minusOne=s[-1],s.max=F,s.min=j,s.gcd=K,s.lcm=function(t,e){return t=Z(t).abs(),e=Z(e).abs(),t.divide(K(t,e)).multiply(e)},s.isInstance=function(t){return t instanceof a||t instanceof u},s.randBetween=function(t,r){var n=j(t=Z(t),r=Z(r)),i=F(t,r).subtract(n).add(1);if(i.isSmall)return n.add(Math.floor(Math.random()*i));for(var o=[],s=!0,h=i.value.length-1;h>=0;h--){var c=s?i.value[h]:e,f=p(Math.random()*c);o.unshift(f),f=4294967296&&i++,t[e]=n,t[e+1]=i}function o(t,e,r,n){let i=t[e]+r;r<0&&(i+=4294967296);let o=t[e+1]+n;i>=4294967296&&o++,t[e]=i,t[e+1]=o}function s(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function a(t,e,r,n,s,a){const u=l[s],h=l[s+1],f=l[a],d=l[a+1];i(c,t,e),o(c,t,u,h);let p=c[n]^c[t],g=c[n+1]^c[t+1];c[n]=g,c[n+1]=p,i(c,r,n),p=c[e]^c[r],g=c[e+1]^c[r+1],c[e]=p>>>24^g<<8,c[e+1]=g>>>24^p<<8,i(c,t,e),o(c,t,f,d),p=c[n]^c[t],g=c[n+1]^c[t+1],c[n]=p>>>16^g<<16,c[n+1]=g>>>16^p<<16,i(c,r,n),p=c[e]^c[r],g=c[e+1]^c[r+1],c[e]=g>>>31^p<<1,c[e+1]=p>>>31^g<<1}const u=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),h=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(t){return 2*t}))),c=new Uint32Array(32),l=new Uint32Array(32);function f(t,e){let r=0;for(r=0;r<16;r++)c[r]=t.h[r],c[r+16]=u[r];for(c[24]=c[24]^t.t,c[25]=c[25]^t.t/4294967296,e&&(c[28]=~c[28],c[29]=~c[29]),r=0;r<32;r++)l[r]=s(t.b,4*r);for(r=0;r<12;r++)a(0,8,16,24,h[16*r+0],h[16*r+1]),a(2,10,18,26,h[16*r+2],h[16*r+3]),a(4,12,20,28,h[16*r+4],h[16*r+5]),a(6,14,22,30,h[16*r+6],h[16*r+7]),a(0,10,20,30,h[16*r+8],h[16*r+9]),a(2,12,22,24,h[16*r+10],h[16*r+11]),a(4,14,16,26,h[16*r+12],h[16*r+13]),a(6,8,18,28,h[16*r+14],h[16*r+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^c[r]^c[r+16]}const d=new Uint8Array([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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function p(t,e,r,n){if(0===t||t>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(e&&e.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&16!==r.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(n&&16!==n.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:t};d.fill(0),d[0]=t,e&&(d[1]=e.length),d[2]=1,d[3]=1,r&&d.set(r,32),n&&d.set(n,48);for(let o=0;o<16;o++)i.h[o]=u[o]^s(d,4*o);return e&&(g(i,e),i.c=128),i}function g(t,e){for(let r=0;r>2]>>8*(3&r);return e}function m(t,e,r,i,o){r=r||64,t=n.normalizeInput(t),i&&(i=n.normalizeInput(i)),o&&(o=n.normalizeInput(o));const s=p(r,e,i,o);return g(s,t),y(s)}t.exports={blake2b:m,blake2bHex:function(t,e,r,i,o){const s=m(t,e,r,i,o);return n.toHex(s)},blake2bInit:p,blake2bUpdate:g,blake2bFinal:y}},45297:function(t,e,r){const n=r(99488);function i(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function o(t,e,r,n,i,o){h[t]=h[t]+h[e]+i,h[n]=s(h[n]^h[t],16),h[r]=h[r]+h[n],h[e]=s(h[e]^h[r],12),h[t]=h[t]+h[e]+o,h[n]=s(h[n]^h[t],8),h[r]=h[r]+h[n],h[e]=s(h[e]^h[r],7)}function s(t,e){return t>>>e^t<<32-e}const a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),h=new Uint32Array(16),c=new Uint32Array(16);function l(t,e){let r=0;for(r=0;r<8;r++)h[r]=t.h[r],h[r+8]=a[r];for(h[12]^=t.t,h[13]^=t.t/4294967296,e&&(h[14]=~h[14]),r=0;r<16;r++)c[r]=i(t.b,4*r);for(r=0;r<10;r++)o(0,4,8,12,c[u[16*r+0]],c[u[16*r+1]]),o(1,5,9,13,c[u[16*r+2]],c[u[16*r+3]]),o(2,6,10,14,c[u[16*r+4]],c[u[16*r+5]]),o(3,7,11,15,c[u[16*r+6]],c[u[16*r+7]]),o(0,5,10,15,c[u[16*r+8]],c[u[16*r+9]]),o(1,6,11,12,c[u[16*r+10]],c[u[16*r+11]]),o(2,7,8,13,c[u[16*r+12]],c[u[16*r+13]]),o(3,4,9,14,c[u[16*r+14]],c[u[16*r+15]]);for(r=0;r<8;r++)t.h[r]^=h[r]^h[r+8]}function f(t,e){if(!(t>0&&t<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=e?e.length:0;if(e&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const n={h:new Uint32Array(a),b:new Uint8Array(64),c:0,t:0,outlen:t};return n.h[0]^=16842752^r<<8^t,r>0&&(d(n,e),n.c=64),n}function d(t,e){for(let r=0;r>2]>>8*(3&r)&255;return e}function g(t,e,r){r=r||32,t=n.normalizeInput(t);const i=f(r,e);return d(i,t),p(i)}t.exports={blake2s:g,blake2sHex:function(t,e,r){const i=g(t,e,r);return n.toHex(i)},blake2sInit:f,blake2sUpdate:d,blake2sFinal:p}},1191:function(t,e,r){const n=r(8442),i=r(45297);t.exports={blake2b:n.blake2b,blake2bHex:n.blake2bHex,blake2bInit:n.blake2bInit,blake2bUpdate:n.blake2bUpdate,blake2bFinal:n.blake2bFinal,blake2s:i.blake2s,blake2sHex:i.blake2sHex,blake2sInit:i.blake2sInit,blake2sUpdate:i.blake2sUpdate,blake2sFinal:i.blake2sFinal}},99488:function(t){function e(t){return(4294967296+t).toString(16).substring(1)}t.exports={normalizeInput:function(t){let e;if(t instanceof Uint8Array)e=t;else{if("string"!==typeof t)throw new Error("Input must be an string, Buffer or Uint8Array");e=(new TextEncoder).encode(t)}return e},toHex:function(t){return Array.prototype.map.call(t,(function(t){return(t<16?"0":"")+t.toString(16)})).join("")},debugPrint:function(t,r,n){let i="\n"+t+" = ";for(let o=0;o=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function h(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c1&&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},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=f;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){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"),this.strip();var s,a,u="le"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,g=d>>>13,y=0|s[2],m=8191&y,v=y>>>13,b=0|s[3],w=8191&b,E=b>>>13,A=0|s[4],k=8191&A,S=A>>>13,B=0|s[5],x=8191&B,C=B>>>13,I=0|s[6],M=8191&I,T=I>>>13,O=0|s[7],R=8191&O,_=O>>>13,P=0|s[8],N=8191&P,U=P>>>13,L=0|s[9],D=8191&L,F=L>>>13,j=0|a[0],K=8191&j,z=j>>>13,H=0|a[1],q=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Z=G>>>13,J=0|a[3],Q=8191&J,X=J>>>13,Y=0|a[4],$=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,ft=ct>>>13,dt=0|a[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(h+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(f,K)|0))<<13)|0;h=((o=Math.imul(f,z))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,K),i=(i=Math.imul(p,z))+Math.imul(g,K)|0,o=Math.imul(g,z);var mt=(h+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,q)|0))<<13)|0;h=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,K),i=(i=Math.imul(m,z))+Math.imul(v,K)|0,o=Math.imul(v,z),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,V)|0;var vt=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(f,W)|0))<<13)|0;h=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,K),i=(i=Math.imul(w,z))+Math.imul(E,K)|0,o=Math.imul(E,z),n=n+Math.imul(m,q)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,Z)|0;var bt=(h+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,Q)|0))<<13)|0;h=((o=o+Math.imul(f,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(k,K),i=(i=Math.imul(k,z))+Math.imul(S,K)|0,o=Math.imul(S,z),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,X)|0;var wt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,z))+Math.imul(C,K)|0,o=Math.imul(C,z),n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,V)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var Et=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(M,K),i=(i=Math.imul(M,z))+Math.imul(T,K)|0,o=Math.imul(T,z),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var At=(h+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,ot)|0))<<13)|0;h=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(R,K),i=(i=Math.imul(R,z))+Math.imul(_,K)|0,o=Math.imul(_,z),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,X)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var kt=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((o=o+Math.imul(f,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,z))+Math.imul(U,K)|0,o=Math.imul(U,z),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,z))+Math.imul(F,K)|0,o=Math.imul(F,z),n=n+Math.imul(N,q)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(U,q)|0,o=o+Math.imul(U,V)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,ft)|0;var Bt=(h+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,pt)|0))<<13)|0;h=((o=o+Math.imul(f,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,V))+Math.imul(F,q)|0,o=Math.imul(F,V),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Z)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ft)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;h=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,Z))+Math.imul(F,W)|0,o=Math.imul(F,Z),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,X)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ht)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ft)|0;var Ct=(h+(n=n+Math.imul(m,pt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,X))+Math.imul(F,Q)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(U,$)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ft)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ft)|0;var It=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ft)|0;var Mt=(h+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(S,pt)|0))<<13)|0;h=((o=o+Math.imul(S,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(D,rt),i=(i=Math.imul(D,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,ot),i=(i=Math.imul(D,st))+Math.imul(F,ot)|0,o=Math.imul(F,st),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(U,ut)|0,o=o+Math.imul(U,ht)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ft)|0;var Ot=(h+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,ut),i=(i=Math.imul(D,ht))+Math.imul(F,ut)|0,o=Math.imul(F,ht),n=n+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(U,lt)|0,o=o+Math.imul(U,ft)|0;var Rt=(h+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,gt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,lt),i=(i=Math.imul(D,ft))+Math.imul(F,lt)|0,o=Math.imul(F,ft);var _t=(h+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(U,pt)|0))<<13)|0;h=((o=o+Math.imul(U,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863;var Pt=(h+(n=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,gt))+Math.imul(F,pt)|0))<<13)|0;return h=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=yt,u[1]=mt,u[2]=vt,u[3]=bt,u[4]=wt,u[5]=Et,u[6]=At,u[7]=kt,u[8]=St,u[9]=Bt,u[10]=xt,u[11]=Ct,u[12]=It,u[13]=Mt,u[14]=Tt,u[15]=Ot,u[16]=Rt,u[17]=_t,u[18]=Pt,0!==h&&(u[19]=h,r.length++),r};function g(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):g(this,t,e),r},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.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;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){k.call(this,t),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)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(b,v),b.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return m[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var g=d,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,k),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),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)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},77191:function(t,e,r){var n=r(58162);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},14288:function(t){"use strict";const e=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,"murmur3-128":34,"murmur3-32":35,"dbl-sha2-256":86,md4:212,md5:213,bmt:214,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,kangarootwelve:7425,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46e3,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082});t.exports={names:e}},21549:function(t,e,r){"use strict";const n=r(36957),i=r(89051),{names:o}=r(14288),{toString:s}=r(92263),{fromString:a}=r(52217),{concat:u}=r(20605),h={};for(const g in o){const t=g;h[o[t]]=t}function c(t){if(!(t instanceof Uint8Array))throw new Error("multihash must be a Uint8Array");if(t.length<2)throw new Error("multihash too short. must be > 2 bytes.");const e=i.decode(t);if(!d(e))throw new Error(`multihash unknown function code: 0x${e.toString(16)}`);t=t.slice(i.decode.bytes);const r=i.decode(t);if(r<0)throw new Error(`multihash invalid length: ${r}`);if((t=t.slice(i.decode.bytes)).length!==r)throw new Error(`multihash length inconsistent: 0x${s(t,"base16")}`);return{code:e,name:h[e],length:r,digest:t}}function l(t){let e=t;if("string"===typeof t){if(void 0===o[t])throw new Error(`Unrecognized hash function named: ${t}`);e=o[t]}if("number"!==typeof e)throw new Error(`Hash function code should be a number. Got: ${e}`);if(void 0===h[e]&&!f(e))throw new Error(`Unrecognized function code: ${e}`);return e}function f(t){return t>0&&t<16}function d(t){return!!f(t)||!!h[t]}function p(t){c(t)}Object.freeze(h),t.exports={names:o,codes:h,toHexString:function(t){if(!(t instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return s(t,"base16")},fromHexString:function(t){return a(t,"base16")},toB58String:function(t){if(!(t instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return s(n.encode("base58btc",t)).slice(1)},fromB58String:function(t){const e=t instanceof Uint8Array?s(t):t;return n.decode("z"+e)},decode:c,encode:function(t,e,r){if(!t||void 0===e)throw new Error("multihash encode requires at least two args: digest, code");const n=l(e);if(!(t instanceof Uint8Array))throw new Error("digest should be a Uint8Array");if(null==r&&(r=t.length),r&&t.length!==r)throw new Error("digest length should be equal to specified length.");const o=i.encode(n),s=i.encode(r);return u([o,s,t],o.length+s.length+t.length)},coerceCode:l,isAppCode:f,validate:p,prefix:function(t){return p(t),t.subarray(0,2)},isValidCode:d}},93919:function(t){t.exports=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<=128);return t.bytes=s-r,i}},33811:function(t){t.exports=function t(r,n,i){n=n||[];var o=i=i||0;for(;r>=e;)n[i++]=255&r|128,r/=128;for(;-128&r;)n[i++]=255&r|128,r>>>=7;return n[i]=0|r,t.bytes=i-o+1,n};var e=Math.pow(2,31)},89051:function(t,e,r){t.exports={encode:r(33811),decode:r(93919),encodingLength:r(94518)}},94518:function(t){var e=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),u=Math.pow(2,56),h=Math.pow(2,63);t.exports=function(t){return t(t[c[e]]=e,t)),{}),f=Symbol.for("@ipld/js-cid/CID");class d{constructor(t,e,r,s){if(this.version,this.codec,this.multihash,Object.defineProperty(this,f,{value:!0}),d.isCID(t)){const e=t;return this.version=e.version,this.codec=e.codec,this.multihash=e.multihash,void(this.multibaseName=e.multibaseName||(0===e.version?"base58btc":"base32"))}if("string"===typeof t){const e=i.isEncoded(t);if(e){const r=i.decode(t);this.version=parseInt(r[0].toString(),16),this.codec=o.getCodec(r.slice(1)),this.multihash=o.rmPrefix(r.slice(1)),this.multibaseName=e}else this.version=0,this.codec="dag-pb",this.multihash=n.fromB58String(t),this.multibaseName="base58btc";return d.validateCID(this),void Object.defineProperty(this,"string",{value:t})}if(t instanceof Uint8Array){const e=parseInt(t[0].toString(),16);if(1===e){const r=t;this.version=e,this.codec=o.getCodec(r.slice(1)),this.multihash=o.rmPrefix(r.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=t,this.multibaseName="base58btc";d.validateCID(this)}else this.version=t,"number"===typeof e&&(e=l[e]),this.codec=e,this.multihash=r,this.multibaseName=s||(0===t?"base58btc":"base32"),d.validateCID(this)}get bytes(){let t=this._bytes;if(!t){if(0===this.version)t=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");{const e=o.getCodeVarint(this.codec);t=a([[1],e,this.multihash],1+e.byteLength+this.multihash.byteLength)}}Object.defineProperty(this,"_bytes",{value:t})}return t}get prefix(){const t=o.getCodeVarint(this.codec),e=n.prefix(this.multihash);return a([[this.version],t,e],1+t.byteLength+e.byteLength)}get code(){return c[this.codec]}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:t,length:e}=n.decode(this.multihash);if("sha2-256"!==t)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==e)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new d(0,this.codec,this.multihash)}toV1(){return new d(1,this.codec,this.multihash,this.multibaseName)}toBaseEncodedString(t=this.multibaseName){if(this.string&&0!==this.string.length&&t===this.multibaseName)return this.string;let e;if(0===this.version){if("base58btc"!==t)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");e=n.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");e=u(i.encode(t,this.bytes))}return t===this.multibaseName&&Object.defineProperty(this,"string",{value:e}),e}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}toString(t){return this.toBaseEncodedString(t)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(t){return this.codec===t.codec&&this.version===t.version&&h(this.multihash,t.multihash)}static validateCID(t){const e=s.checkCIDComponents(t);if(e)throw new Error(e)}static isCID(t){return t instanceof d||Boolean(t&&t[f])}}d.codecs=c,t.exports=d},98514:function(t){"use strict";t.exports=function(t,{className:e,symbolName:r}){const n=Symbol.for(r),i={[e]:class extends t{constructor(...t){super(...t),Object.defineProperty(this,n,{value:!0})}get[Symbol.toStringTag](){return e}}}[e];return i[`is${e}`]=t=>!(!t||!t[n]),i},t.exports.proto=function(t,{className:e,symbolName:r,withoutNew:n}){const i=Symbol.for(r),o={[e]:function(...e){if(n&&!(this instanceof o))return new o(...e);const r=t.call(this,...e)||this;return r&&!r[i]&&Object.defineProperty(r,i,{value:!0}),r}}[e];return o.prototype=Object.create(t.prototype),o.prototype.constructor=o,Object.defineProperty(o.prototype,Symbol.toStringTag,{get:()=>e}),o[`is${e}`]=t=>!(!t||!t[i]),o}},21429:function(t){t.exports=function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var u=r[s]={exports:{}};e[s][0].call(u.exports,(function(t){var r=e[s][1][t];return i(r||t)}),u,u.exports,t,e,r,n)}return r[s].exports}for(var o=void 0,s=0;s>15;--o>=0;){var u=32767&this[t],h=this[t++]>>15,c=a*u+h*s;i=((u=s*u+((32767&c)<<15)+r[n]+(1073741823&i))>>>30)+(c>>>15)+a*h+(i>>>30),r[n++]=1073741823&u}return i}o.prototype.am=a,n=30,o.prototype.DB=n,o.prototype.DM=(1<=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function y(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0}function m(t){var e=s();return e.fromInt(t),e}function b(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var n=t.length,i=!1,s=0;--n>=0;){var a=8==r?255&t[n]:p(t,n);a<0?"-"==t.charAt(n)&&(i=!0):(i=!1,0==s?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t}function E(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else if(64==t)e=6;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=d(r));s>=0;)a>(a+=this.DB-e)):(r=this[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=d(r));return i?o:"0"}function A(){var t=s();return o.ZERO.subTo(this,t),t}function k(){return this.s<0?this.negate():this}function S(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0}function B(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function x(){return this.t<=0?0:this.DB*(this.t-1)+B(this[this.t-1]^this.s&this.DM)}function C(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s}function I(t,e){for(var r=t;r=0;--r)e[r+s+1]=this[r]>>i|a,a=(this[r]&o)<=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()}function T(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(e[this.t-r-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()}function R(t,e){var r=this.abs(),n=t.abs(),i=r.t;for(e.t=i+n.t;--i>=0;)e[i]=0;for(i=0;i=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()}function P(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(c,a),i.lShiftTo(c,r)):(n.copyTo(a),i.copyTo(r));var l=a.t,f=a[l-1];if(0!=f){var d=f*(1<1?a[l-2]>>this.F2:0),p=this.FV/d,g=(1<=0&&(r[r.t++]=1,r.subTo(b,r)),o.ONE.dlShiftTo(l,b),b.subTo(a,a);a.t=0;){var w=r[--m]==f?this.DM:Math.floor(r[m]*p+(r[m-1]+y)*g);if((r[m]+=a.am(0,w,r,v,0,l))0&&r.rShiftTo(c,r),u<0&&o.ZERO.subTo(r,r)}}}function N(t){var e=s();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(o.ZERO)>0&&t.subTo(e,e),e}function U(t){this.m=t}function L(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function D(t){return t}function F(t){t.divRemTo(this.m,null,t)}function j(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function K(t,e){t.squareTo(e),this.reduce(e)}function z(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e}function H(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e}function V(t){var e=s();return t.copyTo(e),this.reduce(e),e}function G(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function W(t,e){t.squareTo(e),this.reduce(e)}function Z(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function J(){return 0==(this.t>0?1&this[0]:this.s)}function Q(t,e){if(t>4294967295||t<1)return o.ONE;var r=s(),n=s(),i=e.convert(this),a=B(t)-1;for(i.copyTo(r);--a>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,i,r);else{var u=r;r=n,n=u}return e.revert(r)}function X(t,e){var r;return r=t<256||e.isEven()?new U(e):new H(e),this.exp(t,r)}function Y(){var t=s();return this.copyTo(t),t}function $(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>24}function et(){return 0==this.t?this.s:this[0]<<16>>16}function rt(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function nt(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function it(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=m(r),i=s(),o=s(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(t).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(t)+a}function ot(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),i=!1,s=0,a=0,u=0;u=r&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)}function st(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(o.ONE.shiftLeft(t-1),pt,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(o.ONE.shiftLeft(t-1),this);else{var n=new Array,i=7&t;n.length=1+(t>>3),e.nextBytes(n),i>0?n[0]&=(1<0)for(n>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<=0;)n<8?(r=(this[t]&(1<>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e}function ut(t){return 0==this.compareTo(t)}function ht(t){return this.compareTo(t)<0?this:t}function ct(t){return this.compareTo(t)>0?this:t}function lt(t,e,r){var n,i,o=Math.min(t.t,this.t);for(n=0;n>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function St(){for(var t=0;t=this.t?0!=this.s:0!=(this[e]&1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()}function _t(t){var e=s();return this.addTo(t,e),e}function Pt(t){var e=s();return this.subTo(t,e),e}function Nt(t){var e=s();return this.multiplyTo(t,e),e}function Ut(){var t=s();return this.squareTo(t),t}function Lt(t){var e=s();return this.divRemTo(t,e,null),e}function Dt(t){var e=s();return this.divRemTo(t,null,e),e}function Ft(t){var e=s(),r=s();return this.divRemTo(t,e,r),new Array(e,r)}function jt(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Kt(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function zt(){}function Ht(t){return t}function qt(t,e,r){t.multiplyTo(e,r)}function Vt(t,e){t.squareTo(e)}function Gt(t){return this.exp(t,new zt)}function Wt(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i=0;)r[n]=0;for(n=Math.max(e-this.t,0);n2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=s();return t.copyTo(e),this.reduce(e),e}function Xt(t){return t}function Yt(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)}function $t(t,e){t.squareTo(e),this.reduce(e)}function te(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function ee(t,e){var r,n,i=t.bitLength(),o=m(1);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new U(e):e.isEven()?new Jt(e):new H(e);var a=new Array,u=3,h=r-1,c=(1<1){var l=s();for(n.sqrTo(a[1],l);u<=c;)a[u]=s(),n.mulTo(l,a[u-2],a[u]),u+=2}var f,d,p=t.t-1,g=!0,y=s();for(i=B(t[p])-1;p>=0;){for(i>=h?f=t[p]>>i-h&c:(f=(t[p]&(1<0&&(f|=t[p-1]>>this.DB+i-h)),u=r;0==(1&f);)f>>=1,--u;if((i-=u)<0&&(i+=this.DB,--p),g)a[f].copyTo(o),g=!1;else{for(;u>1;)n.sqrTo(o,y),n.sqrTo(y,o),u-=2;u>0?n.sqrTo(o,y):(d=o,o=y,y=d),n.mulTo(y,a[f],o)}for(;p>=0&&0==(t[p]&1<0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r}function ne(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r}function ie(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return o.ZERO;for(var r=t.clone(),n=this.clone(),i=m(1),s=m(0),a=m(0),u=m(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(i.isEven()&&s.isEven()||(i.addTo(this,i),s.subTo(t,s)),i.rShiftTo(1,i)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;n.isEven();)n.rShiftTo(1,n),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(n)>=0?(r.subTo(n,r),e&&i.subTo(a,i),s.subTo(u,s)):(n.subTo(r,n),e&&a.subTo(i,a),u.subTo(s,u))}return 0!=n.compareTo(o.ONE)?o.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u}U.prototype.convert=L,U.prototype.revert=D,U.prototype.reduce=F,U.prototype.mulTo=j,U.prototype.sqrTo=K,H.prototype.convert=q,H.prototype.revert=V,H.prototype.reduce=G,H.prototype.mulTo=Z,H.prototype.sqrTo=W,o.prototype.copyTo=g,o.prototype.fromInt=y,o.prototype.fromString=b,o.prototype.clamp=w,o.prototype.dlShiftTo=C,o.prototype.drShiftTo=I,o.prototype.lShiftTo=M,o.prototype.rShiftTo=T,o.prototype.subTo=O,o.prototype.multiplyTo=R,o.prototype.squareTo=_,o.prototype.divRemTo=P,o.prototype.invDigit=z,o.prototype.isEven=J,o.prototype.exp=Q,o.prototype.toString=E,o.prototype.negate=A,o.prototype.abs=k,o.prototype.compareTo=S,o.prototype.bitLength=x,o.prototype.mod=N,o.prototype.modPowInt=X,o.ZERO=m(0),o.ONE=m(1),zt.prototype.convert=Ht,zt.prototype.revert=Ht,zt.prototype.mulTo=qt,zt.prototype.sqrTo=Vt,Jt.prototype.convert=Qt,Jt.prototype.revert=Xt,Jt.prototype.reduce=Yt,Jt.prototype.mulTo=te,Jt.prototype.sqrTo=$t;var oe=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],se=(1<<26)/oe[oe.length-1];function ae(t){var e,r=this.abs();if(1==r.t&&r[0]<=oe[oe.length-1]){for(e=0;e>1)>oe.length&&(t=oe.length);for(var i=s(),a=0;a=o;)t/=2,e/=2,a>>>=1;return(t+a)/e},c},s=e.pow(r,n),i=e.pow(2,i),o=2*i,h(e.random(),t)}([],Math,256,6,52),he.prototype.nextBytes=ce,le.prototype.init=fe,le.prototype.next=de;var ge,ye,me,ve=256;function be(t){ye[me++]^=255&t,ye[me++]^=t>>8&255,ye[me++]^=t>>16&255,ye[me++]^=t>>24&255,me>=ve&&(me-=ve)}function we(){be((new Date).getTime())}if(null==ye){var Ee;for(ye=new Array,me=0;me>>8,ye[me++]=255&Ee;me=0,we()}function Ae(){if(null==ge){for(we(),(ge=pe()).init(ye),me=0;me=0&&e>0;){var i=t.charCodeAt(n--);i<128?r[--e]=i:i>127&&i<2048?(r[--e]=63&i|128,r[--e]=i>>6|192):(r[--e]=63&i|128,r[--e]=i>>6&63|128,r[--e]=i>>12|224)}r[--e]=0;for(var s=new Se,a=new Array;e>2;){for(a[0]=0;0==a[0];)s.nextBytes(a);r[--e]=a[0]}return r[--e]=2,r[--e]=0,new o(r)}function _e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function Pe(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Oe(t,16),this.e=parseInt(e,16)):alert("Invalid RSA public key")}function Ne(t){return t.modPowInt(this.e,this.n)}function Ue(t){var e=Re(t,this.n.bitLength()+7>>3);if(null==e)return null;var r=this.doPublic(e);if(null==r)return null;var n=r.toString(16);return 0==(1&n.length)?n:"0"+n}function Le(){return{coeff:this.coeff.toString(16),d:this.d.toString(16),dmp1:this.dmp1.toString(16),dmq1:this.dmq1.toString(16),e:this.e.toString(16),n:this.n.toString(16),p:this.p.toString(16),q:this.q.toString(16)}}function De(t){var e=JSON.parse(t),r=new _e;return r.setPrivateEx(e.n,e.e,e.d,e.p,e.q,e.dmp1,e.dmq1,e.coeff),r}function Fe(t,e){for(var r=t.toByteArray(),n=0;n=r.length)return null;for(var i="";++n191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&r[n+1]),++n):(i+=String.fromCharCode((15&o)<<12|(63&r[n+1])<<6|63&r[n+2]),n+=2)}return i}function je(t,e,r){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Oe(t,16),this.e=parseInt(e,16),this.d=Oe(r,16)):alert("Invalid RSA private key")}function Ke(t,e,r,n,i,o,s,a){if(!(null!=t&&null!=e&&t.length>0&&e.length>0))throw new Error("Invalid RSA private key");this.n=Oe(t,16),this.e=parseInt(e,16),this.d=Oe(r,16),this.p=Oe(n,16),this.q=Oe(i,16),this.dmp1=Oe(o,16),this.dmq1=Oe(s,16),this.coeff=Oe(a,16)}function ze(t,e){var r=new he,n=t>>1;this.e=parseInt(e,16);for(var i=new o(e,16);;){for(;this.p=new o(t-n,1,r),0!=this.p.subtract(o.ONE).gcd(i).compareTo(o.ONE)||!this.p.isProbablePrime(10););for(;this.q=new o(n,1,r),0!=this.q.subtract(o.ONE).gcd(i).compareTo(o.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var a=this.p.subtract(o.ONE),u=this.q.subtract(o.ONE),h=a.multiply(u);if(0==h.gcd(i).compareTo(o.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(h),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(u),this.coeff=this.q.modInverse(this.p);break}}}function He(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),r=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(r)<0;)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)}function qe(t){var e=Oe(t,16),r=this.doPrivate(e);return null==r?null:Fe(r,this.n.bitLength()+7>>3)}_e.prototype.doPublic=Ne,_e.prototype.setPublic=Pe,_e.prototype.encrypt=Ue,_e.prototype.toJSON=Le,_e.parse=De,_e.prototype.doPrivate=He,_e.prototype.setPrivate=je,_e.prototype.setPrivateEx=Ke,_e.prototype.generate=ze,_e.prototype.decrypt=qe;var Ve=[];Ve.sha1="3021300906052b0e03021a05000414",Ve.sha256="3031300d060960864801650304020105000420";var Ge=[];function We(t,e,r){for(var n=e/4,i=(0,Ge[r])(t),o="0001",s="00"+Ve[r]+i,a="",u=n-o.length-s.length,h=0;h=256&&(i^=283)):n>24&&o%n==16&&(s=new Array(t.Sbox[s[0]],t.Sbox[s[1]],t.Sbox[s[2]],t.Sbox[s[3]]));for(var a=0;a<4;a++)e[o+a]=e[o+a-n]^s[a]}},t.Encrypt=function(e,r){var n=r.length;t.AddRoundKey(e,r.slice(0,16));for(var i=16;i=16;i-=16)t.AddRoundKey(e,r.slice(i,i+16)),t.MixColumns_Inv(e),t.ShiftRows(e,t.ShiftRowTab_Inv),t.SubBytes(e,t.Sbox_Inv);t.AddRoundKey(e,r.slice(0,16))},t.SubBytes=function(t,e){for(var r=0;r<16;r++)t[r]=e[t[r]]},t.AddRoundKey=function(t,e){for(var r=0;r<16;r++)t[r]^=e[r]},t.ShiftRows=function(t,e){for(var r=(new Array).concat(t),n=0;n<16;n++)t[n]=r[e[n]]},t.MixColumns=function(e){for(var r=0;r<16;r+=4){var n=e[r+0],i=e[r+1],o=e[r+2],s=e[r+3],a=n^i^o^s;e[r+0]^=a^t.xtime[n^i],e[r+1]^=a^t.xtime[i^o],e[r+2]^=a^t.xtime[o^s],e[r+3]^=a^t.xtime[s^n]}},t.MixColumns_Inv=function(e){for(var r=0;r<16;r+=4){var n=e[r+0],i=e[r+1],o=e[r+2],s=e[r+3],a=n^i^o^s,u=t.xtime[a],h=t.xtime[t.xtime[u^n^o]]^a,c=t.xtime[t.xtime[u^i^s]]^a;e[r+0]^=h^t.xtime[n^i],e[r+1]^=c^t.xtime[i^o],e[r+2]^=h^t.xtime[o^s],e[r+3]^=c^t.xtime[s^n]}},t}(),ir=function(){var t={};nr.Init();var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";return t.b256to64=function(t){var r,n,i,o="",s=0,a=t.length;for(i=0;i>2&63),r=(3&n)<<4):1==s?(o+=e.charAt(r|n>>4&15),r=(15&n)<<2):2==s&&(o+=e.charAt(r|n>>6&3),o+=e.charAt(63&n)),3==(s+=1)&&(s=0);return s>0&&(o+=e.charAt(r),o+="="),1==s&&(o+="="),o},t.b64to256=function(t){var r,n,i="",o=0,s=0,a=t.length;for(n=0;n=0&&(o&&(i+=String.fromCharCode(s|r>>6-o&255)),s=r<<(o=o+2&7)&255);return i},t.b16to64=function(t){var r,n,i="";for(t.length%2==1&&(t="0"+t),r=0;r+3<=t.length;r+=3)n=parseInt(t.substring(r,r+3),16),i+=e.charAt(n>>6)+e.charAt(63&n);for(r+1==t.length?(n=parseInt(t.substring(r,r+1),16),i+=e.charAt(n<<2)):r+2==t.length&&(n=parseInt(t.substring(r,r+2),16),i+=e.charAt(n>>2)+e.charAt((3&n)<<4));(3&i.length)>0;)i+="=";return i},t.b64to16=function(t){var r,n,i="",o=0;for(r=0;r>2),n=3&v,o=1):1==o?(i+=d(n<<2|v>>4),n=15&v,o=2):2==o?(i+=d(n),i+=d(v>>2),n=3&v,o=3):(i+=d(n<<2|v>>4),i+=d(15&v),o=0));return 1==o&&(i+=d(n<<2)),i},t.string2bytes=function(t){for(var e=new Array,r=0;ri&&(n=i):n=i;var s=e.length;G(s%2===0,"Invalid hex string"),n>s/2&&(n=s/2);for(var a=0;an)&&(r=n);for(var i="",o=e;o=o))return r?(i=t[e],e+1=o))return r?(e+2>>0)):(e+1>>0),i}function w(t,e,r,n){if(n||(G("boolean"===typeof r,"missing or invalid endian"),G(void 0!==e&&null!==e,"missing offset"),G(e+1=t.length)){var i=v(t,e,r,!0);return 32768&i?-1*(65535-i+1):i}}function E(t,e,r,n){if(n||(G("boolean"===typeof r,"missing or invalid endian"),G(void 0!==e&&null!==e,"missing offset"),G(e+3=t.length)){var i=b(t,e,r,!0);return 2147483648&i?-1*(4294967295-i+1):i}}function A(t,e,r,n){return n||(G("boolean"===typeof r,"missing or invalid endian"),G(e+3=o))for(var s=0,a=Math.min(o-r,2);s>>8*(n?s:1-s)}function B(t,e,r,n,i){i||(G(void 0!==e&&null!==e,"missing value"),G("boolean"===typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3=o))for(var s=0,a=Math.min(o-r,4);s>>8*(n?s:3-s)&255}function x(t,e,r,n,i){i||(G(void 0!==e&&null!==e,"missing value"),G("boolean"===typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+1=t.length||S(t,e>=0?e:65535+e+1,r,n,i)}function C(t,e,r,n,i){i||(G(void 0!==e&&null!==e,"missing value"),G("boolean"===typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3=t.length||B(t,e>=0?e:4294967295+e+1,r,n,i)}function I(t,e,r,n,o){o||(G(void 0!==e&&null!==e,"missing value"),G("boolean"===typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3=t.length||i.write(t,e,r,n,23,4)}function M(t,e,r,n,o){o||(G(void 0!==e&&null!==e,"missing value"),G("boolean"===typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+7=t.length||i.write(t,e,r,n,52,8)}function T(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}r.Buffer=o,r.SlowBuffer=o,r.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"===typeof e.subarray}catch(r){return!1}}(),o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.isBuffer=function(t){return!(null===t||void 0===t||!t._isBuffer)},o.byteLength=function(t,e){var r;switch(t+="",e||"utf8"){case"hex":r=t.length/2;break;case"utf8":case"utf-8":r=L(t).length;break;case"ascii":case"binary":case"raw":r=t.length;break;case"base64":r=j(t).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*t.length;break;default:throw new Error("Unknown encoding")}return r},o.concat=function(t,e){if(G(P(t),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===t.length)return new o(0);if(1===t.length)return t[0];var r;if("number"!==typeof e)for(e=0,r=0;rf&&(r=f):r=f,n=String(n||"utf8").toLowerCase()){case"hex":o=s(this,t,e,r);break;case"utf8":case"utf-8":o=a(this,t,e,r);break;case"ascii":o=u(this,t,e,r);break;case"binary":o=h(this,t,e,r);break;case"base64":o=c(this,t,e,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":o=l(this,t,e,r);break;default:throw new Error("Unknown encoding")}return o},o.prototype.toString=function(t,e,r){var n,i=this;if(t=String(t||"utf8").toLowerCase(),e=Number(e)||0,(r=void 0!==r?Number(r):r=i.length)===e)return"";switch(t){case"hex":n=y(i,e,r);break;case"utf8":case"utf-8":n=d(i,e,r);break;case"ascii":n=p(i,e,r);break;case"binary":n=g(i,e,r);break;case"base64":n=f(i,e,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=m(i,e,r);break;default:throw new Error("Unknown encoding")}return n},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(t,e,r,n){var i=this;if(r||(r=0),n||0===n||(n=this.length),e||(e=0),n!==r&&0!==t.length&&0!==i.length){G(n>=r,"sourceEnd < sourceStart"),G(e>=0&&e=0&&r=0&&n<=i.length,"sourceEnd out of bounds"),n>this.length&&(n=this.length),t.length-e=this.length))return this[t]},o.prototype.readUInt16LE=function(t,e){return v(this,t,!0,e)},o.prototype.readUInt16BE=function(t,e){return v(this,t,!1,e)},o.prototype.readUInt32LE=function(t,e){return b(this,t,!0,e)},o.prototype.readUInt32BE=function(t,e){return b(this,t,!1,e)},o.prototype.readInt8=function(t,e){if(e||(G(void 0!==t&&null!==t,"missing offset"),G(t=this.length))return 128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){return w(this,t,!0,e)},o.prototype.readInt16BE=function(t,e){return w(this,t,!1,e)},o.prototype.readInt32LE=function(t,e){return E(this,t,!0,e)},o.prototype.readInt32BE=function(t,e){return E(this,t,!1,e)},o.prototype.readFloatLE=function(t,e){return A(this,t,!0,e)},o.prototype.readFloatBE=function(t,e){return A(this,t,!1,e)},o.prototype.readDoubleLE=function(t,e){return k(this,t,!0,e)},o.prototype.readDoubleBE=function(t,e){return k(this,t,!1,e)},o.prototype.writeUInt8=function(t,e,r){r||(G(void 0!==t&&null!==t,"missing value"),G(void 0!==e&&null!==e,"missing offset"),G(e=this.length||(this[e]=t)},o.prototype.writeUInt16LE=function(t,e,r){S(this,t,e,!0,r)},o.prototype.writeUInt16BE=function(t,e,r){S(this,t,e,!1,r)},o.prototype.writeUInt32LE=function(t,e,r){B(this,t,e,!0,r)},o.prototype.writeUInt32BE=function(t,e,r){B(this,t,e,!1,r)},o.prototype.writeInt8=function(t,e,r){r||(G(void 0!==t&&null!==t,"missing value"),G(void 0!==e&&null!==e,"missing offset"),G(e=this.length||(t>=0?this.writeUInt8(t,e,r):this.writeUInt8(255+t+1,e,r))},o.prototype.writeInt16LE=function(t,e,r){x(this,t,e,!0,r)},o.prototype.writeInt16BE=function(t,e,r){x(this,t,e,!1,r)},o.prototype.writeInt32LE=function(t,e,r){C(this,t,e,!0,r)},o.prototype.writeInt32BE=function(t,e,r){C(this,t,e,!1,r)},o.prototype.writeFloatLE=function(t,e,r){I(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){I(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){M(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){M(this,t,e,!1,r)},o.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),"string"===typeof t&&(t=t.charCodeAt(0)),G("number"===typeof t&&!isNaN(t),"value is not a number"),G(r>=e,"end < start"),r!==e&&0!==this.length){G(e>=0&&e=0&&r<=this.length,"end out of bounds");for(var n=e;n"},o.prototype.toArrayBuffer=function(){if("undefined"!==typeof Uint8Array){if(o._useTypedArrays)return new o(this).buffer;for(var t=new Uint8Array(this.length),e=0,r=t.length;e=e?e:t>=0||(t+=e)>=0?t:0}function _(t){return(t=~~Math.ceil(+t))<0?0:t}function P(t){return(Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)})(t)}function N(t){return P(t)||o.isBuffer(t)||t&&"object"===typeof t&&"number"===typeof t.length}function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function L(t){for(var e=[],r=0;r=55296&&n<=57343&&r++;for(var o=encodeURIComponent(t.slice(i,r+1)).substr(1).split("%"),s=0;s>8,n=e%256,i.push(n),i.push(r);return i}function j(t){return n.toByteArray(t)}function K(t,e,r,n){for(var i=0;i=e.length||i>=t.length);i++)e[i+r]=t[i];return i}function z(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}function H(t,e){G("number"===typeof t,"cannot write a non-number as a number"),G(t>=0,"specified a negative value for writing an unsigned value"),G(t<=e,"value is larger than maximum value for type"),G(Math.floor(t)===t,"value has a fractional component")}function q(t,e,r){G("number"===typeof t,"cannot write a non-number as a number"),G(t<=e,"value larger than maximum allowed value"),G(t>=r,"value smaller than minimum allowed value"),G(Math.floor(t)===t,"value has a fractional component")}function V(t,e,r){G("number"===typeof t,"cannot write a non-number as a number"),G(t<=e,"value larger than maximum allowed value"),G(t>=r,"value smaller than minimum allowed value")}function G(t,e){if(!t)throw new Error(e||"Failed assertion")}o._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=O.get,t.set=O.set,t.write=O.write,t.toString=O.toString,t.toLocaleString=O.toString,t.toJSON=O.toJSON,t.copy=O.copy,t.slice=O.slice,t.readUInt8=O.readUInt8,t.readUInt16LE=O.readUInt16LE,t.readUInt16BE=O.readUInt16BE,t.readUInt32LE=O.readUInt32LE,t.readUInt32BE=O.readUInt32BE,t.readInt8=O.readInt8,t.readInt16LE=O.readInt16LE,t.readInt16BE=O.readInt16BE,t.readInt32LE=O.readInt32LE,t.readInt32BE=O.readInt32BE,t.readFloatLE=O.readFloatLE,t.readFloatBE=O.readFloatBE,t.readDoubleLE=O.readDoubleLE,t.readDoubleBE=O.readDoubleBE,t.writeUInt8=O.writeUInt8,t.writeUInt16LE=O.writeUInt16LE,t.writeUInt16BE=O.writeUInt16BE,t.writeUInt32LE=O.writeUInt32LE,t.writeUInt32BE=O.writeUInt32BE,t.writeInt8=O.writeInt8,t.writeInt16LE=O.writeInt16LE,t.writeInt16BE=O.writeInt16BE,t.writeInt32LE=O.writeInt32LE,t.writeInt32BE=O.writeInt32BE,t.writeFloatLE=O.writeFloatLE,t.writeFloatBE=O.writeFloatBE,t.writeDoubleLE=O.writeDoubleLE,t.writeDoubleBE=O.writeDoubleBE,t.fill=O.fill,t.inspect=O.inspect,t.toArrayBuffer=O.toArrayBuffer,t}},{"base64-js":3,ieee754:4}],3:[function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";var e="undefined"!==typeof Uint8Array?Uint8Array:Array,r="+".charCodeAt(0),i="/".charCodeAt(0),o="0".charCodeAt(0),s="a".charCodeAt(0),a="A".charCodeAt(0),u="-".charCodeAt(0),h="_".charCodeAt(0);function c(t){var e=t.charCodeAt(0);return e===r||e===u?62:e===i||e===h?63:e0)throw new Error("Invalid string. Length must be a multiple of 4");var u=t.length;s="="===t.charAt(u-2)?2:"="===t.charAt(u-1)?1:0,a=new e(3*t.length/4-s),i=s>0?t.length-4:t.length;var h=0;function l(t){a[h++]=t}for(r=0,n=0;r>16),l((65280&o)>>8),l(255&o);return 2===s?l(255&(o=c(t.charAt(r))<<2|c(t.charAt(r+1))>>4)):1===s&&(l((o=c(t.charAt(r))<<10|c(t.charAt(r+1))<<4|c(t.charAt(r+2))>>2)>>8&255),l(255&o)),a}function f(t){var e,r,i,o=t.length%3,s="";function a(t){return n.charAt(t)}function u(t){return a(t>>18&63)+a(t>>12&63)+a(t>>6&63)+a(63&t)}for(e=0,i=t.length-o;e>2),s+=a(r<<4&63),s+="==";break;case 2:s+=a((r=(t[t.length-2]<<8)+t[t.length-1])>>10),s+=a(r>>4&63),s+=a(r<<2&63),s+="="}return s}t.toByteArray=l,t.fromByteArray=f}("undefined"===typeof r?this.base64js={}:r)},{}],4:[function(t,e,r){r.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,c=-7,l=r?i-1:0,f=r?-1:1,d=t[e+l];for(l+=f,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+t[e+l],l+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+l],l+=f,c-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=h}return(d?-1:1)*s*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var s,a,u,h=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+l>=1?f/u:f*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=c?(a=0,s=c):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;t[r+d]=255&s,d+=p,s/=256,h-=8);t[r+d-p]|=128*g}},{}],5:[function(t,e,r){var n=t("buffer").Buffer,i=4,o=new n(i);o.fill(0);var s=8;function a(t,e){if(t.length%i!==0){var r=t.length+(i-t.length%i);t=n.concat([t,o],r)}for(var s=[],a=e?t.readInt32BE:t.readInt32LE,u=0;uu?e=t(e):e.length>5]|=128<>>9<<4)]=e;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,l=0;l>16)+(e>>16)+(r>>16)<<16|65535&r}function l(t,e){return t<>>32-e}e.exports=function(t){return n.hash(t,i,16)}},{"./helpers":5}],8:[function(t,e,r){!function(){var t,r;t=function(t){for(var e,r=new Array(t),n=0;n>>((3&n)<<3)&255;return r},this.crypto&&crypto.getRandomValues&&(r=function(t){var e=new Uint8Array(t);return crypto.getRandomValues(e),e}),e.exports=r||t}()},{}],9:[function(t,e,r){var n=t("./helpers");function i(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var r=Array(80),n=1732584193,i=-271733879,h=-1732584194,c=271733878,l=-1009589776,f=0;f>16)+(e>>16)+(r>>16)<<16|65535&r}function u(t,e){return t<>>32-e}e.exports=function(t){return n.hash(t,i,20,!0)}},{"./helpers":5}],10:[function(t,e,r){var n=t("./helpers"),i=function(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r},o=function(t,e){return t>>>e|t<<32-e},s=function(t,e){return t>>>e},a=function(t,e,r){return t&e^~t&r},u=function(t,e,r){return t&e^t&r^e&r},h=function(t){return o(t,2)^o(t,13)^o(t,22)},c=function(t){return o(t,6)^o(t,11)^o(t,25)},l=function(t){return o(t,7)^o(t,18)^s(t,3)},f=function(t){return o(t,17)^o(t,19)^s(t,10)},d=function(t,e){var r,n,o,s,d,p,g,y,m,v,b=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),w=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),E=new Array(64);t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var A=0;A=3&&(o=r),"[object Array]"===i.call(t)?s(t,e,o):"string"===typeof t?a(t,e,o):u(t,e,o)}},27296:function(t,e,r){"use strict";var n=r(40210)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(i){n=null}t.exports=n},96410:function(t,e,r){"use strict";var n=r(55419);t.exports=function(){return n()&&!!Symbol.toStringTag}},33715:function(t,e,r){var n=e;n.utils=r(26436),n.common=r(95772),n.sha=r(89041),n.ripemd=r(12949),n.hmac=r(52344),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},95772:function(t,e,r){"use strict";var n=r(26436),i=r(79746);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}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},26436:function(t,e,r){"use strict";var n=r(79746),i=r(35717);function o(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"===typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n>>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},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var u=0,h=e;return u+=(h=h+n>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,u,h){var c=0,l=e;return c+=(l=l+n>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,u,h){return e+n+o+a+h>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},8679:function(t,e,r){"use strict";var n=r(21296),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function u(t){return n.isMemo(t)?s:a[t.$$typeof]||i}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=s;var h=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;t.exports=function t(e,r,n){if("string"!==typeof r){if(p){var i=d(r);i&&i!==p&&t(e,i,n)}var s=c(r);l&&(s=s.concat(l(r)));for(var a=u(e),g=u(r),y=0;y=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=a?o:s},95320:function(t){"use strict";var e,r,n=Function.prototype.toString,i="object"===typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"===typeof i&&"function"===typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,e)}catch(d){d!==r&&(i=null)}else i=null;var o=/^\s*class\b/,s=function(t){try{var e=n.call(t);return o.test(e)}catch(r){return!1}},a=function(t){try{return!s(t)&&(n.call(t),!0)}catch(e){return!1}},u=Object.prototype.toString,h="function"===typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),l=function(){return!1};if("object"===typeof document){var f=document.all;u.call(f)===u.call(document.all)&&(l=function(t){if((c||!t)&&("undefined"===typeof t||"object"===typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(r){}return!1})}t.exports=i?function(t){if(l(t))return!0;if(!t)return!1;if("function"!==typeof t&&"object"!==typeof t)return!1;try{i(t,null,e)}catch(n){if(n!==r)return!1}return!s(t)&&a(t)}:function(t){if(l(t))return!0;if(!t)return!1;if("function"!==typeof t&&"object"!==typeof t)return!1;if(h)return a(t);if(s(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&a(t)}},48662:function(t,e,r){"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(96410)(),u=Object.getPrototypeOf;t.exports=function(t){if("function"!==typeof t)return!1;if(s.test(o.call(t)))return!0;if(!a)return"[object GeneratorFunction]"===i.call(t);if(!u)return!1;if("undefined"===typeof n){var e=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&u(e)}return u(t)===n}},85692:function(t,e,r){"use strict";var n=r(94029),i=r(63083),o=r(21924),s=o("Object.prototype.toString"),a=r(96410)(),u=r(27296),h="undefined"===typeof globalThis?r.g:globalThis,c=i(),l=o("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1}return!!u&&function(t){var e=!1;return n(d,(function(r,n){if(!e)try{e=r.call(t)===n}catch(i){}})),e}(t)}},1914:function(t){"use strict";const e=65536;t.exports=function(t){const r=new Uint8Array(t);let n=0;if(t>0)if(t>e)for(;nt?(crypto.getRandomValues(r.subarray(n,n+(t-n))),n+=t-n):(crypto.getRandomValues(r.subarray(n,n+e)),n+=e);else crypto.getRandomValues(r);return r}},12130:function(t,e,r){var n=r(48764).Buffer;"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof r.g&&r.g,t.exports=function(){"use strict";var t="3.7.5",e=t,r="function"===typeof atob,i="function"===typeof btoa,o="function"===typeof n,s="function"===typeof TextDecoder?new TextDecoder:void 0,a="function"===typeof TextEncoder?new TextEncoder:void 0,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h=Array.prototype.slice.call(u),c=function(t){var e={};return t.forEach((function(t,r){return e[t]=r})),e}(h),l=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,f=String.fromCharCode.bind(String),d="function"===typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t){return new Uint8Array(Array.prototype.slice.call(t,0))},p=function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))},g=function(t){return t.replace(/[^A-Za-z0-9\+\/]/g,"")},y=function(t){for(var e,r,n,i,o="",s=t.length%3,a=0;a255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");o+=h[(e=r<<16|n<<8|i)>>18&63]+h[e>>12&63]+h[e>>6&63]+h[63&e]}return s?o.slice(0,s-3)+"===".substring(s):o},m=i?function(t){return btoa(t)}:o?function(t){return n.from(t,"binary").toString("base64")}:y,v=o?function(t){return n.from(t).toString("base64")}:function(t){for(var e=4096,r=[],n=0,i=t.length;n>>6)+f(128|63&e):f(224|e>>>12&15)+f(128|e>>>6&63)+f(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return f(240|e>>>18&7)+f(128|e>>>12&63)+f(128|e>>>6&63)+f(128|63&e)},E=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,A=function(t){return t.replace(E,w)},k=o?function(t){return n.from(t,"utf8").toString("base64")}:a?function(t){return v(a.encode(t))}:function(t){return m(A(t))},S=function(t,e){return void 0===e&&(e=!1),e?p(k(t)):k(t)},B=function(t){return S(t,!0)},x=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,C=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return f(55296+(e>>>10))+f(56320+(1023&e));case 3:return f((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return f((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},I=function(t){return t.replace(x,C)},M=function(t){if(t=t.replace(/\s+/g,""),!l.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var e,r,n,i="",o=0;o>16&255):64===n?f(e>>16&255,e>>8&255):f(e>>16&255,e>>8&255,255&e);return i},T=r?function(t){return atob(g(t))}:o?function(t){return n.from(t,"base64").toString("binary")}:M,O=o?function(t){return d(n.from(t,"base64"))}:function(t){return d(T(t).split("").map((function(t){return t.charCodeAt(0)})))},R=function(t){return O(P(t))},_=o?function(t){return n.from(t,"base64").toString("utf8")}:s?function(t){return s.decode(O(t))}:function(t){return I(T(t))},P=function(t){return g(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})))},N=function(t){return _(P(t))},U=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}},L=function(){var t=function(t,e){return Object.defineProperty(String.prototype,t,U(e))};t("fromBase64",(function(){return N(this)})),t("toBase64",(function(t){return S(this,t)})),t("toBase64URI",(function(){return S(this,!0)})),t("toBase64URL",(function(){return S(this,!0)})),t("toUint8Array",(function(){return R(this)}))},D=function(){var t=function(t,e){return Object.defineProperty(Uint8Array.prototype,t,U(e))};t("toBase64",(function(t){return b(this,t)})),t("toBase64URI",(function(){return b(this,!0)})),t("toBase64URL",(function(){return b(this,!0)}))},F=function(){L(),D()},j={version:t,VERSION:e,atob:T,atobPolyfill:M,btoa:m,btoaPolyfill:y,fromBase64:N,toBase64:S,encode:S,encodeURI:B,encodeURL:B,utob:A,btou:I,decode:N,isValid:function(t){if("string"!==typeof t)return!1;var e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:b,toUint8Array:R,extendString:L,extendUint8Array:D,extendBuiltins:F,Base64:{}};return Object.keys(j).forEach((function(t){return j.Base64[t]=j[t]})),j}()},30728:function(t,e,r){var n,i=r(34155);!function(){"use strict";var e="object"===typeof window?window:{};!e.JS_CRC_NO_NODE_JS&&"object"===typeof i&&i.versions&&i.versions.node&&(e=r.g);var o,s,a,u,h=!e.JS_CRC_NO_COMMON_JS&&t.exports,c=r.amdO,l=!e.JS_CRC_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,f="0123456789abcdef".split(""),d=[{name:"crc32",polynom:3988292384,initValue:-1,bytes:4},{name:"crc16",polynom:40961,initValue:0,bytes:2}];for(o=0;o>>1:u>>>1;y.table[s]=u>>>0}}var p=function(t,e){var r="string"!==typeof t;r&&l&&t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n,i,o=e.initValue,s=t.length,a=e.table;if(r)for(i=0;i>>8;else for(i=0;i>>8:n<2048?a[255&((o=a[255&(o^(192|n>>6))]^o>>>8)^(128|63&n))]^o>>>8:n<55296||n>=57344?a[255&((o=a[255&((o=a[255&(o^(224|n>>12))]^o>>>8)^(128|n>>6&63))]^o>>>8)^(128|63&n))]^o>>>8:a[255&((o=a[255&((o=a[255&((o=a[255&(o^(240|(n=65536+((1023&n)<<10|1023&t.charCodeAt(++i)))>>18))]^o>>>8)^(128|n>>12&63))]^o>>>8)^(128|n>>6&63))]^o>>>8)^(128|63&n))]^o>>>8;o^=e.initValue;var u="";return e.bytes>2&&(u+=f[o>>28&15]+f[o>>24&15]+f[o>>20&15]+f[o>>16&15]),u+=f[o>>12&15]+f[o>>8&15]+f[o>>4&15]+f[15&o]},g={};for(o=0;o>6,s[u++]=128|63&o):o<55296||o>=57344?(s[u++]=224|o>>12,s[u++]=128|o>>6&63,s[u++]=128|63&o):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++n)),s[u++]=240|o>>18,s[u++]=128|o>>12&63,s[u++]=128|o>>6&63,s[u++]=128|63&o);t=s}else{if("object"!==i)throw new Error(ERROR);if(null===t)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(t)))throw new Error(ERROR)}t.length>64&&(t=new Sha256(e,!0).update(t).array());var h=[],c=[];for(n=0;n<64;++n){var l=t[n]||0;h[n]=92^l,c[n]=54^l}Sha256.call(this,e,r),this.update(c),this.oKeyPad=h,this.inner=!0,this.sharedMemory=r}Sha256.prototype.update=function(t){if(!this.finalized){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(ERROR);if(null===t)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(t)))throw new Error(ERROR);e=!0}for(var n,i,o=0,s=t.length,a=this.blocks;o>2]|=t[o]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(a[i>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=64?(this.block=a[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=EXTRA[3&e],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var t,e,r,n,i,o,s,a,u,h=this.h0,c=this.h1,l=this.h2,f=this.h3,d=this.h4,p=this.h5,g=this.h6,y=this.h7,m=this.blocks;for(t=16;t<64;++t)e=((i=m[t-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,r=((i=m[t-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,m[t]=m[t-16]+e+m[t-7]+r<<0;for(u=c&l,t=0;t<64;t+=4)this.first?(this.is224?(o=300032,y=(i=m[0]-1413257819)-150054599<<0,f=i+24177077<<0):(o=704751109,y=(i=m[0]-210244248)-1521486534<<0,f=i+143694565<<0),this.first=!1):(e=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),n=(o=h&c)^h&l^u,y=f+(i=y+(r=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&p^~d&g)+K[t]+m[t])<<0,f=i+(e+n)<<0),e=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),n=(s=f&h)^f&c^o,g=l+(i=g+(r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&d^~y&p)+K[t+1]+m[t+1])<<0,e=((l=i+(e+n)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),n=(a=l&f)^l&h^s,p=c+(i=p+(r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&y^~g&d)+K[t+2]+m[t+2])<<0,e=((c=i+(e+n)<<0)>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),n=(u=c&l)^c&f^a,d=h+(i=d+(r=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&g^~p&y)+K[t+3]+m[t+3])<<0,h=i+(e+n)<<0;this.h0=this.h0+h<<0,this.h1=this.h1+c<<0,this.h2=this.h2+l<<0,this.h3=this.h3+f<<0,this.h4=this.h4+d<<0,this.h5=this.h5+p<<0,this.h6=this.h6+g<<0,this.h7=this.h7+y<<0},Sha256.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s];return this.is224||(u+=HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]),u},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s];return this.is224||u.push(a>>24&255,a>>16&255,a>>8&255,255&a),u},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},91094:function(t,e,r){var n,i=r(34155);!function(){"use strict";var o="input is invalid type",s="object"===typeof window,a=s?window:{};a.JS_SHA3_NO_WINDOW&&(s=!1);var u=!s&&"object"===typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"===typeof i&&i.versions&&i.versions.node?a=r.g:u&&(a=self);var h=!a.JS_SHA3_NO_COMMON_JS&&t.exports,c=r.amdO,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,f="0123456789abcdef".split(""),d=[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],y=[224,256,384,512],m=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!l||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"===typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var w=function(t,e,r){return function(n){return new N(t,e,t).update(n)[r]()}},E=function(t,e,r){return function(n,i){return new N(t,e,i).update(n)[r]()}},A=function(t,e,r){return function(e,n,i,o){return C["cshake"+t].update(e,n,i,o)[r]()}},k=function(t,e,r){return function(e,n,i,o){return C["kmac"+t].update(e,n,i,o)[r]()}},S=function(t,e,r,n){for(var i=0;i>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 U(t,e,r){N.call(this,t,e,r)}N.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(o);if(null===t)throw new Error(o);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw new Error(o);e=!0}for(var n,i,s=this.blocks,a=this.byteCount,u=t.length,h=this.blockCount,c=0,f=this.s;c>2]|=t[c]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=a){for(this.start=n-a,this.block=s[h],n=0;n>=8);r>0;)i.unshift(r),r=255&(t>>=8),++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},N.prototype.encodeString=function(t){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(o);if(null===t)throw new Error(o);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw new Error(o);e=!0}var n=0,i=t.length;if(e)n=i;else for(var s=0;s=57344?n+=3:(a=65536+((1023&a)<<10|1023&t.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(t),n},N.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e>4&15]+f[15&t]+f[t>>12&15]+f[t>>8&15]+f[t>>20&15]+f[t>>16&15]+f[t>>28&15]+f[t>>24&15];s%e===0&&(L(r),o=0)}return i&&(t=r[o],a+=f[t>>4&15]+f[15&t],i>1&&(a+=f[t>>12&15]+f[t>>8&15]),i>2&&(a+=f[t>>20&15]+f[t>>16&15])),a},N.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;t=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(t);s>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;a%r===0&&L(n)}return o&&(t=a<<2,e=n[s],u[t]=255&e,o>1&&(u[t+1]=e>>8&255),o>2&&(u[t+2]=e>>16&255)),u},U.prototype=new N,U.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var L=function(t){var e,r,n,i,o,s,a,u,h,c,l,f,d,p,y,m,v,b,w,E,A,k,S,B,x,C,I,M,T,O,R,_,P,N,U,L,D,F,j,K,z,H,q,V,G,W,Z,J,Q,X,Y,$,tt,et,rt,nt,it,ot,st,at,ut,ht,ct;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],h=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],e=(f=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|a>>>31),r=(d=t[9]^t[19]^t[29]^t[39]^t[49])^(a<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(u<<1|h>>>31),r=o^(h<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(c<<1|l>>>31),r=a^(l<<1|c>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(f<<1|d>>>31),r=h^(d<<1|f>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=c^(i<<1|o>>>31),r=l^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,p=t[0],y=t[1],W=t[11]<<4|t[10]>>>28,Z=t[10]<<4|t[11]>>>28,M=t[20]<<3|t[21]>>>29,T=t[21]<<3|t[20]>>>29,at=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,q=t[41]<<18|t[40]>>>14,N=t[2]<<1|t[3]>>>31,U=t[3]<<1|t[2]>>>31,m=t[13]<<12|t[12]>>>20,v=t[12]<<12|t[13]>>>20,J=t[22]<<10|t[23]>>>22,Q=t[23]<<10|t[22]>>>22,O=t[33]<<13|t[32]>>>19,R=t[32]<<13|t[33]>>>19,ht=t[42]<<2|t[43]>>>30,ct=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,L=t[14]<<6|t[15]>>>26,D=t[15]<<6|t[14]>>>26,b=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,X=t[34]<<15|t[35]>>>17,Y=t[35]<<15|t[34]>>>17,_=t[45]<<29|t[44]>>>3,P=t[44]<<29|t[45]>>>3,B=t[6]<<28|t[7]>>>4,x=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,F=t[26]<<25|t[27]>>>7,j=t[27]<<25|t[26]>>>7,E=t[36]<<21|t[37]>>>11,A=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,V=t[8]<<27|t[9]>>>5,G=t[9]<<27|t[8]>>>5,C=t[18]<<20|t[19]>>>12,I=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,K=t[38]<<8|t[39]>>>24,z=t[39]<<8|t[38]>>>24,k=t[48]<<14|t[49]>>>18,S=t[49]<<14|t[48]>>>18,t[0]=p^~m&b,t[1]=y^~v&w,t[10]=B^~C&M,t[11]=x^~I&T,t[20]=N^~L&F,t[21]=U^~D&j,t[30]=V^~W&J,t[31]=G^~Z&Q,t[40]=et^~nt&ot,t[41]=rt^~it&st,t[2]=m^~b&E,t[3]=v^~w&A,t[12]=C^~M&O,t[13]=I^~T&R,t[22]=L^~F&K,t[23]=D^~j&z,t[32]=W^~J&X,t[33]=Z^~Q&Y,t[42]=nt^~ot&at,t[43]=it^~st&ut,t[4]=b^~E&k,t[5]=w^~A&S,t[14]=M^~O&_,t[15]=T^~R&P,t[24]=F^~K&H,t[25]=j^~z&q,t[34]=J^~X&$,t[35]=Q^~Y&tt,t[44]=ot^~at&ht,t[45]=st^~ut&ct,t[6]=E^~k&p,t[7]=A^~S&y,t[16]=O^~_&B,t[17]=R^~P&x,t[26]=K^~H&N,t[27]=z^~q&U,t[36]=X^~$&V,t[37]=Y^~tt&G,t[46]=at^~ht&et,t[47]=ut^~ct&rt,t[8]=k^~p&m,t[9]=S^~y&v,t[18]=_^~B&C,t[19]=P^~x&I,t[28]=H^~N&L,t[29]=q^~U&D,t[38]=$^~V&W,t[39]=tt^~G&Z,t[48]=ht^~et&nt,t[49]=ct^~rt&it,t[0]^=g[n],t[1]^=g[n+1]};if(h)t.exports=C;else{for(M=0;M>6,u[h++]=128|63&a):a<55296||a>=57344?(u[h++]=224|a>>12,u[h++]=128|a>>6&63,u[h++]=128|63&a):(a=65536+((1023&a)<<10|1023&t.charCodeAt(++l)),u[h++]=240|a>>18,u[h++]=128|a>>12&63,u[h++]=128|a>>6&63,u[h++]=128|63&a);t=u}t.length>128&&(t=new E(r,!0).update(t).array());var f=[],d=[];for(l=0;l<128;++l){var p=t[l]||0;f[l]=92^p,d[l]=54^p}E.call(this,r,n),this.update(d),this.oKeyPad=f,this.inner=!0,this.sharedMemory=n}E.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var r,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(e);if(null===t)throw new Error(e);if(c&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!c||!ArrayBuffer.isView(t)))throw new Error(e);r=!0}for(var i,o,s=0,a=t.length,u=this.blocks;s>2]|=t[s]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(u[o>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=128?(this.block=u[32],this.start=o-128,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},E.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[32]=this.block,t[e>>2]|=f[3&e],this.block=t[32],e>=112&&(this.hashed||this.hash(),t[0]=this.block,t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=t[16]=t[17]=t[18]=t[19]=t[20]=t[21]=t[22]=t[23]=t[24]=t[25]=t[26]=t[27]=t[28]=t[29]=t[30]=t[31]=t[32]=0),t[30]=this.hBytes<<3|this.bytes>>>29,t[31]=this.bytes<<3,this.hash()}},E.prototype.hash=function(){var t,e,r,n,i,o,s,a,u,h,c,l,f,d,g,y,m,v,b,w,E,A,k,S,B,x=this.h0h,C=this.h0l,I=this.h1h,M=this.h1l,T=this.h2h,O=this.h2l,R=this.h3h,_=this.h3l,P=this.h4h,N=this.h4l,U=this.h5h,L=this.h5l,D=this.h6h,F=this.h6l,j=this.h7h,K=this.h7l,z=this.blocks;for(t=32;t<160;t+=2)e=((w=z[t-30])>>>1|(E=z[t-29])<<31)^(w>>>8|E<<24)^w>>>7,r=(E>>>1|w<<31)^(E>>>8|w<<24)^(E>>>7|w<<25),n=((w=z[t-4])>>>19|(E=z[t-3])<<13)^(E>>>29|w<<3)^w>>>6,i=(E>>>19|w<<13)^(w>>>29|E<<3)^(E>>>6|w<<26),w=z[t-32],E=z[t-31],u=((A=z[t-14])>>>16)+(w>>>16)+(e>>>16)+(n>>>16)+((a=(65535&A)+(65535&w)+(65535&e)+(65535&n)+((s=((k=z[t-13])>>>16)+(E>>>16)+(r>>>16)+(i>>>16)+((o=(65535&k)+(65535&E)+(65535&r)+(65535&i))>>>16))>>>16))>>>16),z[t]=u<<16|65535&a,z[t+1]=s<<16|65535&o;var H=x,q=C,V=I,G=M,W=T,Z=O,J=R,Q=_,X=P,Y=N,$=U,tt=L,et=D,rt=F,nt=j,it=K;for(y=V&W,m=G&Z,t=0;t<160;t+=8)e=(H>>>28|q<<4)^(q>>>2|H<<30)^(q>>>7|H<<25),r=(q>>>28|H<<4)^(H>>>2|q<<30)^(H>>>7|q<<25),n=(X>>>14|Y<<18)^(X>>>18|Y<<14)^(Y>>>9|X<<23),i=(Y>>>14|X<<18)^(Y>>>18|X<<14)^(X>>>9|Y<<23),v=(h=H&V)^H&W^y,b=(c=q&G)^q&Z^m,S=X&$^~X&et,B=Y&tt^~Y&rt,w=z[t],E=z[t+1],w=(u=((A=p[t])>>>16)+(w>>>16)+(S>>>16)+(n>>>16)+(nt>>>16)+((a=(65535&A)+(65535&w)+(65535&S)+(65535&n)+(65535&nt)+((s=((k=p[t+1])>>>16)+(E>>>16)+(B>>>16)+(i>>>16)+(it>>>16)+((o=(65535&k)+(65535&E)+(65535&B)+(65535&i)+(65535&it))>>>16))>>>16))>>>16))<<16|65535&a,E=s<<16|65535&o,A=(u=(v>>>16)+(e>>>16)+((a=(65535&v)+(65535&e)+((s=(b>>>16)+(r>>>16)+((o=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,k=s<<16|65535&o,nt=(u=(J>>>16)+(w>>>16)+((a=(65535&J)+(65535&w)+((s=(Q>>>16)+(E>>>16)+((o=(65535&Q)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a,it=s<<16|65535&o,e=((J=(u=(A>>>16)+(w>>>16)+((a=(65535&A)+(65535&w)+((s=(k>>>16)+(E>>>16)+((o=(65535&k)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(Q=s<<16|65535&o)<<4)^(Q>>>2|J<<30)^(Q>>>7|J<<25),r=(Q>>>28|J<<4)^(J>>>2|Q<<30)^(J>>>7|Q<<25),n=(nt>>>14|it<<18)^(nt>>>18|it<<14)^(it>>>9|nt<<23),i=(it>>>14|nt<<18)^(it>>>18|nt<<14)^(nt>>>9|it<<23),v=(l=J&H)^J&V^h,b=(f=Q&q)^Q&G^c,S=nt&X^~nt&$,B=it&Y^~it&tt,w=z[t+2],E=z[t+3],w=(u=((A=p[t+2])>>>16)+(w>>>16)+(S>>>16)+(n>>>16)+(et>>>16)+((a=(65535&A)+(65535&w)+(65535&S)+(65535&n)+(65535&et)+((s=((k=p[t+3])>>>16)+(E>>>16)+(B>>>16)+(i>>>16)+(rt>>>16)+((o=(65535&k)+(65535&E)+(65535&B)+(65535&i)+(65535&rt))>>>16))>>>16))>>>16))<<16|65535&a,E=s<<16|65535&o,A=(u=(v>>>16)+(e>>>16)+((a=(65535&v)+(65535&e)+((s=(b>>>16)+(r>>>16)+((o=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,k=s<<16|65535&o,et=(u=(W>>>16)+(w>>>16)+((a=(65535&W)+(65535&w)+((s=(Z>>>16)+(E>>>16)+((o=(65535&Z)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a,rt=s<<16|65535&o,e=((W=(u=(A>>>16)+(w>>>16)+((a=(65535&A)+(65535&w)+((s=(k>>>16)+(E>>>16)+((o=(65535&k)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(Z=s<<16|65535&o)<<4)^(Z>>>2|W<<30)^(Z>>>7|W<<25),r=(Z>>>28|W<<4)^(W>>>2|Z<<30)^(W>>>7|Z<<25),n=(et>>>14|rt<<18)^(et>>>18|rt<<14)^(rt>>>9|et<<23),i=(rt>>>14|et<<18)^(rt>>>18|et<<14)^(et>>>9|rt<<23),v=(d=W&J)^W&H^l,b=(g=Z&Q)^Z&q^f,S=et&nt^~et&X,B=rt&it^~rt&Y,w=z[t+4],E=z[t+5],w=(u=((A=p[t+4])>>>16)+(w>>>16)+(S>>>16)+(n>>>16)+($>>>16)+((a=(65535&A)+(65535&w)+(65535&S)+(65535&n)+(65535&$)+((s=((k=p[t+5])>>>16)+(E>>>16)+(B>>>16)+(i>>>16)+(tt>>>16)+((o=(65535&k)+(65535&E)+(65535&B)+(65535&i)+(65535&tt))>>>16))>>>16))>>>16))<<16|65535&a,E=s<<16|65535&o,A=(u=(v>>>16)+(e>>>16)+((a=(65535&v)+(65535&e)+((s=(b>>>16)+(r>>>16)+((o=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,k=s<<16|65535&o,$=(u=(V>>>16)+(w>>>16)+((a=(65535&V)+(65535&w)+((s=(G>>>16)+(E>>>16)+((o=(65535&G)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a,tt=s<<16|65535&o,e=((V=(u=(A>>>16)+(w>>>16)+((a=(65535&A)+(65535&w)+((s=(k>>>16)+(E>>>16)+((o=(65535&k)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(G=s<<16|65535&o)<<4)^(G>>>2|V<<30)^(G>>>7|V<<25),r=(G>>>28|V<<4)^(V>>>2|G<<30)^(V>>>7|G<<25),n=($>>>14|tt<<18)^($>>>18|tt<<14)^(tt>>>9|$<<23),i=(tt>>>14|$<<18)^(tt>>>18|$<<14)^($>>>9|tt<<23),v=(y=V&W)^V&J^d,b=(m=G&Z)^G&Q^g,S=$&et^~$&nt,B=tt&rt^~tt&it,w=z[t+6],E=z[t+7],w=(u=((A=p[t+6])>>>16)+(w>>>16)+(S>>>16)+(n>>>16)+(X>>>16)+((a=(65535&A)+(65535&w)+(65535&S)+(65535&n)+(65535&X)+((s=((k=p[t+7])>>>16)+(E>>>16)+(B>>>16)+(i>>>16)+(Y>>>16)+((o=(65535&k)+(65535&E)+(65535&B)+(65535&i)+(65535&Y))>>>16))>>>16))>>>16))<<16|65535&a,E=s<<16|65535&o,A=(u=(v>>>16)+(e>>>16)+((a=(65535&v)+(65535&e)+((s=(b>>>16)+(r>>>16)+((o=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,k=s<<16|65535&o,X=(u=(H>>>16)+(w>>>16)+((a=(65535&H)+(65535&w)+((s=(q>>>16)+(E>>>16)+((o=(65535&q)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a,Y=s<<16|65535&o,H=(u=(A>>>16)+(w>>>16)+((a=(65535&A)+(65535&w)+((s=(k>>>16)+(E>>>16)+((o=(65535&k)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a,q=s<<16|65535&o;u=(x>>>16)+(H>>>16)+((a=(65535&x)+(65535&H)+((s=(C>>>16)+(q>>>16)+((o=(65535&C)+(65535&q))>>>16))>>>16))>>>16),this.h0h=u<<16|65535&a,this.h0l=s<<16|65535&o,u=(I>>>16)+(V>>>16)+((a=(65535&I)+(65535&V)+((s=(M>>>16)+(G>>>16)+((o=(65535&M)+(65535&G))>>>16))>>>16))>>>16),this.h1h=u<<16|65535&a,this.h1l=s<<16|65535&o,u=(T>>>16)+(W>>>16)+((a=(65535&T)+(65535&W)+((s=(O>>>16)+(Z>>>16)+((o=(65535&O)+(65535&Z))>>>16))>>>16))>>>16),this.h2h=u<<16|65535&a,this.h2l=s<<16|65535&o,u=(R>>>16)+(J>>>16)+((a=(65535&R)+(65535&J)+((s=(_>>>16)+(Q>>>16)+((o=(65535&_)+(65535&Q))>>>16))>>>16))>>>16),this.h3h=u<<16|65535&a,this.h3l=s<<16|65535&o,u=(P>>>16)+(X>>>16)+((a=(65535&P)+(65535&X)+((s=(N>>>16)+(Y>>>16)+((o=(65535&N)+(65535&Y))>>>16))>>>16))>>>16),this.h4h=u<<16|65535&a,this.h4l=s<<16|65535&o,u=(U>>>16)+($>>>16)+((a=(65535&U)+(65535&$)+((s=(L>>>16)+(tt>>>16)+((o=(65535&L)+(65535&tt))>>>16))>>>16))>>>16),this.h5h=u<<16|65535&a,this.h5l=s<<16|65535&o,u=(D>>>16)+(et>>>16)+((a=(65535&D)+(65535&et)+((s=(F>>>16)+(rt>>>16)+((o=(65535&F)+(65535&rt))>>>16))>>>16))>>>16),this.h6h=u<<16|65535&a,this.h6l=s<<16|65535&o,u=(j>>>16)+(nt>>>16)+((a=(65535&j)+(65535&nt)+((s=(K>>>16)+(it>>>16)+((o=(65535&K)+(65535&it))>>>16))>>>16))>>>16),this.h7h=u<<16|65535&a,this.h7l=s<<16|65535&o},E.prototype.hex=function(){this.finalize();var t=this.h0h,e=this.h0l,r=this.h1h,n=this.h1l,i=this.h2h,o=this.h2l,s=this.h3h,a=this.h3l,u=this.h4h,h=this.h4l,c=this.h5h,f=this.h5l,d=this.h6h,p=this.h6l,g=this.h7h,y=this.h7l,m=this.bits,v=l[t>>28&15]+l[t>>24&15]+l[t>>20&15]+l[t>>16&15]+l[t>>12&15]+l[t>>8&15]+l[t>>4&15]+l[15&t]+l[e>>28&15]+l[e>>24&15]+l[e>>20&15]+l[e>>16&15]+l[e>>12&15]+l[e>>8&15]+l[e>>4&15]+l[15&e]+l[r>>28&15]+l[r>>24&15]+l[r>>20&15]+l[r>>16&15]+l[r>>12&15]+l[r>>8&15]+l[r>>4&15]+l[15&r]+l[n>>28&15]+l[n>>24&15]+l[n>>20&15]+l[n>>16&15]+l[n>>12&15]+l[n>>8&15]+l[n>>4&15]+l[15&n]+l[i>>28&15]+l[i>>24&15]+l[i>>20&15]+l[i>>16&15]+l[i>>12&15]+l[i>>8&15]+l[i>>4&15]+l[15&i]+l[o>>28&15]+l[o>>24&15]+l[o>>20&15]+l[o>>16&15]+l[o>>12&15]+l[o>>8&15]+l[o>>4&15]+l[15&o]+l[s>>28&15]+l[s>>24&15]+l[s>>20&15]+l[s>>16&15]+l[s>>12&15]+l[s>>8&15]+l[s>>4&15]+l[15&s];return m>=256&&(v+=l[a>>28&15]+l[a>>24&15]+l[a>>20&15]+l[a>>16&15]+l[a>>12&15]+l[a>>8&15]+l[a>>4&15]+l[15&a]),m>=384&&(v+=l[u>>28&15]+l[u>>24&15]+l[u>>20&15]+l[u>>16&15]+l[u>>12&15]+l[u>>8&15]+l[u>>4&15]+l[15&u]+l[h>>28&15]+l[h>>24&15]+l[h>>20&15]+l[h>>16&15]+l[h>>12&15]+l[h>>8&15]+l[h>>4&15]+l[15&h]+l[c>>28&15]+l[c>>24&15]+l[c>>20&15]+l[c>>16&15]+l[c>>12&15]+l[c>>8&15]+l[c>>4&15]+l[15&c]+l[f>>28&15]+l[f>>24&15]+l[f>>20&15]+l[f>>16&15]+l[f>>12&15]+l[f>>8&15]+l[f>>4&15]+l[15&f]),512==m&&(v+=l[d>>28&15]+l[d>>24&15]+l[d>>20&15]+l[d>>16&15]+l[d>>12&15]+l[d>>8&15]+l[d>>4&15]+l[15&d]+l[p>>28&15]+l[p>>24&15]+l[p>>20&15]+l[p>>16&15]+l[p>>12&15]+l[p>>8&15]+l[p>>4&15]+l[15&p]+l[g>>28&15]+l[g>>24&15]+l[g>>20&15]+l[g>>16&15]+l[g>>12&15]+l[g>>8&15]+l[g>>4&15]+l[15&g]+l[y>>28&15]+l[y>>24&15]+l[y>>20&15]+l[y>>16&15]+l[y>>12&15]+l[y>>8&15]+l[y>>4&15]+l[15&y]),v},E.prototype.toString=E.prototype.hex,E.prototype.digest=function(){this.finalize();var t=this.h0h,e=this.h0l,r=this.h1h,n=this.h1l,i=this.h2h,o=this.h2l,s=this.h3h,a=this.h3l,u=this.h4h,h=this.h4l,c=this.h5h,l=this.h5l,f=this.h6h,d=this.h6l,p=this.h7h,g=this.h7l,y=this.bits,m=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s];return y>=256&&m.push(a>>24&255,a>>16&255,a>>8&255,255&a),y>=384&&m.push(u>>24&255,u>>16&255,u>>8&255,255&u,h>>24&255,h>>16&255,h>>8&255,255&h,c>>24&255,c>>16&255,c>>8&255,255&c,l>>24&255,l>>16&255,l>>8&255,255&l),512==y&&m.push(f>>24&255,f>>16&255,f>>8&255,255&f,d>>24&255,d>>16&255,d>>8&255,255&d,p>>24&255,p>>16&255,p>>8&255,255&p,g>>24&255,g>>16&255,g>>8&255,255&g),m},E.prototype.array=E.prototype.digest,E.prototype.arrayBuffer=function(){this.finalize();var t=this.bits,e=new ArrayBuffer(t/8),r=new DataView(e);return r.setUint32(0,this.h0h),r.setUint32(4,this.h0l),r.setUint32(8,this.h1h),r.setUint32(12,this.h1l),r.setUint32(16,this.h2h),r.setUint32(20,this.h2l),r.setUint32(24,this.h3h),t>=256&&r.setUint32(28,this.h3l),t>=384&&(r.setUint32(32,this.h4h),r.setUint32(36,this.h4l),r.setUint32(40,this.h5h),r.setUint32(44,this.h5l)),512==t&&(r.setUint32(48,this.h6h),r.setUint32(52,this.h6l),r.setUint32(56,this.h7h),r.setUint32(60,this.h7l)),e},E.prototype.clone=function(){var t=new E(this.bits,!1);return this.copyTo(t),t},E.prototype.copyTo=function(t){var e=0,r=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(e=0;e`${t} (${e})`)).join(" / ");throw n(new Error(`Invalid key length ${t.length} bytes. Must be ${e}`),"ERR_INVALID_KEY_LENGTH")}return e}},98380:function(t,e,r){"use strict";r(8925);const n=r(3832),{toString:i}=r(92263),{fromString:o}=r(52217);t.exports={createCipheriv:(t,e,r)=>{const s=n.cipher.createCipher("AES-CTR",i(e,"ascii"));return s.start({iv:i(r,"ascii")}),{update:t=>(s.update(n.util.createBuffer(i(t,"ascii"))),o(s.output.getBytes(),"ascii"))}},createDecipheriv:(t,e,r)=>{const s=n.cipher.createDecipher("AES-CTR",i(e,"ascii"));return s.start({iv:i(r,"ascii")}),{update:t=>(s.update(n.util.createBuffer(i(t,"ascii"))),o(s.output.getBytes(),"ascii"))}}}},88411:function(t,e,r){"use strict";const n=r(98380),i=r(73226);e.create=async function(t,e){const r=i(t),o=n.createCipheriv(r,t,e),s=n.createDecipheriv(r,t,e);return{encrypt:async t=>o.update(t),decrypt:async t=>s.update(t)}}},27552:function(t,e,r){"use strict";const{concat:n}=r(20605),{fromString:i}=r(52217),o=r(63649);t.exports={create:function({algorithm:t="AES-GCM",nonceLength:e=12,keyLength:r=16,digest:s="SHA-256",saltLength:a=16,iterations:u=32767}={}){const h=o.get();return r*=8,{encrypt:async function(o,c){const l=h.getRandomValues(new Uint8Array(a)),f=h.getRandomValues(new Uint8Array(e)),d={name:t,iv:f},p={name:"PBKDF2",salt:l,iterations:u,hash:{name:s}},g=await h.subtle.importKey("raw",i(c),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]),y=await h.subtle.deriveKey(p,g,{name:t,length:r},!0,["encrypt"]),m=await h.subtle.encrypt(d,y,o);return n([l,d.iv,new Uint8Array(m)])},decrypt:async function(n,o){const c=n.slice(0,a),l=n.slice(a,a+e),f=n.slice(a+e),d={name:t,iv:l},p={name:"PBKDF2",salt:c,iterations:u,hash:{name:s}},g=await h.subtle.importKey("raw",i(o),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]),y=await h.subtle.deriveKey(p,g,{name:t,length:r},!0,["decrypt"]),m=await h.subtle.decrypt(d,y,f);return new Uint8Array(m)}}}}},31088:function(t,e,r){"use strict";const n=r(63649),i=r(38872),o={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};e.create=async function(t,e){const r=o[t],s=await n.get().subtle.importKey("raw",e,{name:"HMAC",hash:{name:r}},!1,["sign"]);return{digest:async t=>(async(t,e)=>{const r=await n.get().subtle.sign({name:"HMAC"},t,e);return new Uint8Array(r,r.byteOffset,r.byteLength)})(s,t),length:i[t]}}},38872:function(t){"use strict";t.exports={SHA1:20,SHA256:32,SHA512:64}},82204:function(t,e,r){"use strict";const n=r(31088),i=r(88411),o=r(14437);e.XP=o,r(87503),r(93221)},78590:function(t,e,r){"use strict";const n=r(32114),i=r(63649),{base64urlToBuffer:o}=r(56441),s=r(45753),{toString:a}=r(92263),{concat:u}=r(20605),{equals:h}=r(19588),c={"P-256":256,"P-384":384,"P-521":521};e.generateEphmeralKeyPair=async function(t){s(Object.keys(c),t);const e=await i.get().subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]);return{key:f(await i.get().subtle.exportKey("jwk",e.publicKey)),genSharedKey:async(r,n)=>{let o;o=n?await i.get().subtle.importKey("jwk",p(t,n),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):e.privateKey;const s=[await i.get().subtle.importKey("jwk",d(t,r),{name:"ECDH",namedCurve:t},!1,[]),o],a=await i.get().subtle.deriveBits({name:"ECDH",namedCurve:t,public:s[0]},s[1],c[t]);return new Uint8Array(a,a.byteOffset,a.byteLength)}}};const l={"P-256":32,"P-384":48,"P-521":66};function f(t){const e=l[t.crv];return u([Uint8Array.from([4]),o(t.x,e),o(t.y,e)],1+2*e)}function d(t,e){const r=l[t];if(h(!e.slice(0,1),Uint8Array.from([4])))throw n(new Error("Cannot unmarshal public key - invalid key format"),"ERR_INVALID_KEY_FORMAT");return{kty:"EC",crv:t,x:a(e.slice(1,r+1),"base64url"),y:a(e.slice(1+r),"base64url"),ext:!0}}const p=(t,e)=>({...d(t,e.public),d:a(e.private,"base64url")})},96535:function(t,e,r){"use strict";const n=r(32114),{equals:i}=r(19588),{sha256:o}=r(41256),{base58btc:s}=r(45522),{identity:a}=r(27871),u=r(71127),h=r(17241),c=r(69716);class l{constructor(t){this._key=d(t,u.publicKeyLength)}async verify(t,e){return u.hashAndVerify(this._key,e,t)}marshal(){return this._key}get bytes(){return h.PublicKey.encode({Type:h.KeyType.Ed25519,Data:this.marshal()}).finish()}equals(t){return i(this.bytes,t.bytes)}async hash(){const{bytes:t}=await o.digest(this.bytes);return t}}class f{constructor(t,e){this._key=d(t,u.privateKeyLength),this._publicKey=d(e,u.publicKeyLength)}async sign(t){return u.hashAndSign(this._key,t)}get public(){return new l(this._publicKey)}marshal(){return this._key}get bytes(){return h.PrivateKey.encode({Type:h.KeyType.Ed25519,Data:this.marshal()}).finish()}equals(t){return i(this.bytes,t.bytes)}async hash(){const{bytes:t}=await o.digest(this.bytes);return t}async id(){const t=await a.digest(this.public.bytes);return s.encode(t.bytes).substring(1)}async export(t,e="libp2p-key"){if("libp2p-key"===e)return c.export(this.bytes,t);throw n(new Error(`export format '${e}' is not supported`),"ERR_INVALID_EXPORT_FORMAT")}}function d(t,e){if((t=Uint8Array.from(t||[])).length!==e)throw n(new Error(`Key must be a Uint8Array of length ${e}, got ${t.length}`),"ERR_INVALID_KEY_TYPE");return t}t.exports={Ed25519PublicKey:l,Ed25519PrivateKey:f,unmarshalEd25519PrivateKey:function(t){if(t.length>u.privateKeyLength){const e=(t=d(t,u.privateKeyLength+u.publicKeyLength)).slice(0,u.privateKeyLength),r=t.slice(u.privateKeyLength,t.length);return new f(e,r)}const e=(t=d(t,u.privateKeyLength)).slice(0,u.privateKeyLength),r=t.slice(u.publicKeyLength);return new f(e,r)},unmarshalEd25519PublicKey:function(t){return t=d(t,u.publicKeyLength),new l(t)},generateKeyPair:async function(){const{privateKey:t,publicKey:e}=await u.generateKey();return new f(t,e)},generateKeyPairFromSeed:async function(t){const{privateKey:e,publicKey:r}=await u.generateKeyFromSeed(t);return new f(e,r)}}},71127:function(t,e,r){"use strict";const n=r(50222);function i(t,r){const n=new Uint8Array(e.privateKeyLength);for(let e=0;e<32;e++)n[e]=t[e],n[32+e]=r[e];return n}e.publicKeyLength=32,e.privateKeyLength=64,e.generateKey=async function(){const t=n.utils.randomPrivateKey(),e=await n.getPublicKey(t);return{privateKey:i(t,e),publicKey:e}},e.generateKeyFromSeed=async function(t){if(32!==t.length)throw new TypeError('"seed" must be 32 bytes in length.');if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, or Uint8Array.');const e=t,r=await n.getPublicKey(e);return{privateKey:i(e,r),publicKey:r}},e.hashAndSign=function(t,e){const r=t.slice(0,32);return n.sign(e,r)},e.hashAndVerify=function(t,e,r){return n.verify(e,r,t)}},55563:function(t,e,r){"use strict";const n=r(78590);t.exports=async t=>n.generateEphmeralKeyPair(t)},69716:function(t,e,r){"use strict";const{base64:n}=r(23456),i=r(27552);t.exports={export:async function(t,e){const r=i.create(),o=await r.encrypt(t,e);return n.encode(o)}}},24709:function(t,e,r){"use strict";const{base64:n}=r(23456),i=r(27552);t.exports={import:async function(t,e){const r=n.decode(t),o=i.create();return await o.decrypt(r,e)}}},14437:function(t,e,r){"use strict";const n=r(17241);r(3068),r(97450);const i=r(3832),o=r(32114),{fromString:s}=r(52217),a=r(24709),u={rsa:r(19950),ed25519:r(96535),secp256k1:r(49434)(n,r(87503))},h="secp256k1 support requires libp2p-crypto-secp256k1 package",c="ERR_MISSING_PACKAGE";function l(t){const e=u[t.toLowerCase()];if(!e){const e=Object.keys(u).join(" / ");throw o(new Error(`invalid or unsupported key type ${t}. Must be ${e}`),"ERR_UNSUPPORTED_KEY_TYPE")}return e}const f=async t=>{const e=n.PrivateKey.decode(t),r=e.Data;switch(e.Type){case n.KeyType.RSA:return u.rsa.unmarshalRsaPrivateKey(r);case n.KeyType.Ed25519:return u.ed25519.unmarshalEd25519PrivateKey(r);case n.KeyType.Secp256k1:if(u.secp256k1)return u.secp256k1.unmarshalSecp256k1PrivateKey(r);throw o(new Error(h),c);default:l(e.Type)}};t.exports={supportedKeys:u,keysPBM:n,keyStretcher:r(73494),generateEphemeralKeyPair:r(55563),generateKeyPair:async(t,e)=>l(t).generateKeyPair(e),generateKeyPairFromSeed:async(t,e,r)=>{const n=l(t);if("ed25519"!==t.toLowerCase())throw o(new Error("Seed key derivation is unimplemented for RSA or secp256k1"),"ERR_UNSUPPORTED_KEY_DERIVATION_TYPE");return n.generateKeyPairFromSeed(e,r)},unmarshalPublicKey:t=>{const e=n.PublicKey.decode(t),r=e.Data;switch(e.Type){case n.KeyType.RSA:return u.rsa.unmarshalRsaPublicKey(r);case n.KeyType.Ed25519:return u.ed25519.unmarshalEd25519PublicKey(r);case n.KeyType.Secp256k1:if(u.secp256k1)return u.secp256k1.unmarshalSecp256k1PublicKey(r);throw o(new Error(h),c);default:l(e.Type)}},marshalPublicKey:(t,e)=>(l(e=(e||"rsa").toLowerCase()),t.bytes),unmarshalPrivateKey:f,marshalPrivateKey:(t,e)=>(l(e=(e||"rsa").toLowerCase()),t.bytes),import:async(t,e)=>{try{const r=await a.import(t,e);return f(r)}catch(h){}const r=i.pki.decryptRsaPrivateKey(t,e);if(null===r)throw o(new Error("Cannot read the key, most likely the password is wrong or not a RSA key"),"ERR_CANNOT_DECRYPT_PEM");let n=i.asn1.toDer(i.pki.privateKeyToAsn1(r));return n=s(n.getBytes(),"ascii"),u.rsa.unmarshalRsaPrivateKey(n)}}},925:function(t,e,r){"use strict";r(28095);const n=r(3832),{base64urlToBigInteger:i}=r(56441);function o(t,e){return e.map((e=>i(t[e])))}t.exports={jwk2pub:function(t){return n.pki.setRsaPublicKey(...o(t,["n","e"]))},jwk2priv:function(t){return n.pki.setRsaPrivateKey(...o(t,["n","e","d","p","q","dp","dq","qi"]))}}},73494:function(t,e,r){"use strict";const n=r(32114),{concat:i}=r(20605),{fromString:o}=r(52217),s=r(31088),a={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};t.exports=async(t,e,r)=>{const u=a[t];if(!u){const e=Object.keys(a).join(" / ");throw n(new Error(`unknown cipher type '${t}'. Must be ${e}`),"ERR_INVALID_CIPHER_TYPE")}if(!e)throw n(new Error("missing hash type"),"ERR_MISSING_HASH_TYPE");const h=u.keySize,c=u.ivSize,l=o("key expansion"),f=2*(c+h+20),d=await s.create(e,r);let p=await d.digest(l);const g=[];let y=0;for(;yf&&(e=f-y),g.push(t),y+=e,p=await d.digest(p)}const m=f/2,v=i(g),b=v.slice(0,m),w=v.slice(m,f),E=t=>({iv:t.slice(0,c),cipherKey:t.slice(c,c+h),macKey:t.slice(c+h)});return{k1:E(b),k2:E(w)}}},17241:function(t,e,r){"use strict";var n=r(62100),i=n.Reader,o=n.Writer,s=n.util,a=n.roots["libp2p-crypto-keys"]||(n.roots["libp2p-crypto-keys"]={});a.KeyType=function(){var t={},e=Object.create(t);return e[t[0]="RSA"]=0,e[t[1]="Ed25519"]=1,e[t[2]="Secp256k1"]=2,e}(),a.PublicKey=function(){function t(t){if(t)for(var e=Object.keys(t),r=0;r>>3){case 1:n.Type=t.int32();break;case 2:n.Data=t.bytes();break;default:t.skipType(7&o)}}if(!n.hasOwnProperty("Type"))throw s.ProtocolError("missing required 'Type'",{instance:n});if(!n.hasOwnProperty("Data"))throw s.ProtocolError("missing required 'Data'",{instance:n});return n},t.fromObject=function(t){if(t instanceof a.PublicKey)return t;var e=new a.PublicKey;switch(t.Type){case"RSA":case 0:e.Type=0;break;case"Ed25519":case 1:e.Type=1;break;case"Secp256k1":case 2:e.Type=2}return null!=t.Data&&("string"===typeof t.Data?s.base64.decode(t.Data,e.Data=s.newBuffer(s.base64.length(t.Data)),0):t.Data.length&&(e.Data=t.Data)),e},t.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.Type=e.enums===String?"RSA":0,e.bytes===String?r.Data="":(r.Data=[],e.bytes!==Array&&(r.Data=s.newBuffer(r.Data)))),null!=t.Type&&t.hasOwnProperty("Type")&&(r.Type=e.enums===String?a.KeyType[t.Type]:t.Type),null!=t.Data&&t.hasOwnProperty("Data")&&(r.Data=e.bytes===String?s.base64.encode(t.Data,0,t.Data.length):e.bytes===Array?Array.prototype.slice.call(t.Data):t.Data),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},t}(),a.PrivateKey=function(){function t(t){if(t)for(var e=Object.keys(t),r=0;r>>3){case 1:n.Type=t.int32();break;case 2:n.Data=t.bytes();break;default:t.skipType(7&o)}}if(!n.hasOwnProperty("Type"))throw s.ProtocolError("missing required 'Type'",{instance:n});if(!n.hasOwnProperty("Data"))throw s.ProtocolError("missing required 'Data'",{instance:n});return n},t.fromObject=function(t){if(t instanceof a.PrivateKey)return t;var e=new a.PrivateKey;switch(t.Type){case"RSA":case 0:e.Type=0;break;case"Ed25519":case 1:e.Type=1;break;case"Secp256k1":case 2:e.Type=2}return null!=t.Data&&("string"===typeof t.Data?s.base64.decode(t.Data,e.Data=s.newBuffer(s.base64.length(t.Data)),0):t.Data.length&&(e.Data=t.Data)),e},t.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.Type=e.enums===String?"RSA":0,e.bytes===String?r.Data="":(r.Data=[],e.bytes!==Array&&(r.Data=s.newBuffer(r.Data)))),null!=t.Type&&t.hasOwnProperty("Type")&&(r.Type=e.enums===String?a.KeyType[t.Type]:t.Type),null!=t.Data&&t.hasOwnProperty("Data")&&(r.Data=e.bytes===String?s.base64.encode(t.Data,0,t.Data.length):e.bytes===Array?Array.prototype.slice.call(t.Data):t.Data),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},t}(),t.exports=a},96741:function(t,e,r){"use strict";const n=r(63649),i=r(87503),{toString:o}=r(92263),{fromString:s}=r(52217);function a(t){return Promise.all([n.get().subtle.exportKey("jwk",t.privateKey),n.get().subtle.exportKey("jwk",t.publicKey)])}e.utils=r(94604),e.generateKey=async function(t){const e=await n.get().subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]),r=await a(e);return{privateKey:r[0],publicKey:r[1]}},e.unmarshalPrivateKey=async function(t){const e=[await n.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]),await(r=t,n.get().subtle.importKey("jwk",{kty:r.kty,n:r.n,e:r.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))];var r;const i=await a({privateKey:e[0],publicKey:e[1]});return{privateKey:i[0],publicKey:i[1]}},e.getRandomValues=i,e.hashAndSign=async function(t,e){const r=await n.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]),i=await n.get().subtle.sign({name:"RSASSA-PKCS1-v1_5"},r,Uint8Array.from(e));return new Uint8Array(i,i.byteOffset,i.byteLength)},e.hashAndVerify=async function(t,e,r){const i=await n.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]);return n.get().subtle.verify({name:"RSASSA-PKCS1-v1_5"},i,e,r)};const{jwk2pub:u,jwk2priv:h}=r(925);function c(t,e,r,n){const i=e?u(t):h(t),a=n(o(Uint8Array.from(r),"ascii"),i);return s(a,"ascii")}e.encrypt=function(t,e){return c(t,!0,e,((t,e)=>e.encrypt(t)))},e.decrypt=function(t,e){return c(t,!1,e,((t,e)=>e.decrypt(t)))}},19950:function(t,e,r){"use strict";const{sha256:n}=r(41256),i=r(32114),{equals:o}=r(19588),{toString:s}=r(92263);r(63219);const a=r(3832),u=r(96741),h=r(17241),c=r(69716);class l{constructor(t){this._key=t}async verify(t,e){return u.hashAndVerify(this._key,e,t)}marshal(){return u.utils.jwkToPkix(this._key)}get bytes(){return h.PublicKey.encode({Type:h.KeyType.RSA,Data:this.marshal()}).finish()}encrypt(t){return u.encrypt(this._key,t)}equals(t){return o(this.bytes,t.bytes)}async hash(){const{bytes:t}=await n.digest(this.bytes);return t}}class f{constructor(t,e){this._key=t,this._publicKey=e}genSecret(){return u.getRandomValues(16)}async sign(t){return u.hashAndSign(this._key,t)}get public(){if(!this._publicKey)throw i(new Error("public key not provided"),"ERR_PUBKEY_NOT_PROVIDED");return new l(this._publicKey)}decrypt(t){return u.decrypt(this._key,t)}marshal(){return u.utils.jwkToPkcs1(this._key)}get bytes(){return h.PrivateKey.encode({Type:h.KeyType.RSA,Data:this.marshal()}).finish()}equals(t){return o(this.bytes,t.bytes)}async hash(){const{bytes:t}=await n.digest(this.bytes);return t}async id(){const t=await this.public.hash();return s(t,"base58btc")}async export(t,e="pkcs-8"){if("pkcs-8"===e){const e=new a.util.ByteBuffer(this.marshal()),r=a.asn1.fromDer(e),n=a.pki.privateKeyFromAsn1(r),i={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};return a.pki.encryptRsaPrivateKey(n,t,i)}if("libp2p-key"===e)return c.export(this.bytes,t);throw i(new Error(`export format '${e}' is not supported`),"ERR_INVALID_EXPORT_FORMAT")}}t.exports={RsaPublicKey:l,RsaPrivateKey:f,unmarshalRsaPublicKey:function(t){const e=u.utils.pkixToJwk(t);return new l(e)},unmarshalRsaPrivateKey:async function(t){const e=u.utils.pkcs1ToJwk(t),r=await u.unmarshalPrivateKey(e);return new f(r.privateKey,r.publicKey)},generateKeyPair:async function(t){const e=await u.generateKey(t);return new f(e.privateKey,e.publicKey)},fromJwk:async function(t){const e=await u.unmarshalPrivateKey(t);return new f(e.privateKey,e.publicKey)}}},94604:function(t,e,r){"use strict";r(3068),r(28095);const n=r(3832),{bigIntegerToUintBase64url:i,base64urlToBigInteger:o}=r(56441),{fromString:s}=r(52217),{toString:a}=r(92263);e.pkcs1ToJwk=function(t){const e=n.asn1.fromDer(a(t,"ascii")),r=n.pki.privateKeyFromAsn1(e);return{kty:"RSA",n:i(r.n),e:i(r.e),d:i(r.d),p:i(r.p),q:i(r.q),dp:i(r.dP),dq:i(r.dQ),qi:i(r.qInv),alg:"RS256",kid:"2011-04-29"}},e.jwkToPkcs1=function(t){const e=n.pki.privateKeyToAsn1({n:o(t.n),e:o(t.e),d:o(t.d),p:o(t.p),q:o(t.q),dP:o(t.dp),dQ:o(t.dq),qInv:o(t.qi)});return s(n.asn1.toDer(e).getBytes(),"ascii")},e.pkixToJwk=function(t){const e=n.asn1.fromDer(a(t,"ascii")),r=n.pki.publicKeyFromAsn1(e);return{kty:"RSA",n:i(r.n),e:i(r.e),alg:"RS256",kid:"2011-04-29"}},e.jwkToPkix=function(t){const e=n.pki.publicKeyToAsn1({n:o(t.n),e:o(t.e)});return s(n.asn1.toDer(e).getBytes(),"ascii")}},49434:function(t,e,r){"use strict";const{sha256:n}=r(41256),i=r(32114),{equals:o}=r(19588),{toString:s}=r(92263),a=r(69716);t.exports=(t,e,u)=>{u=u||r(54056)();class h{constructor(t){u.validatePublicKey(t),this._key=t}verify(t,e){return u.hashAndVerify(this._key,e,t)}marshal(){return u.compressPublicKey(this._key)}get bytes(){return t.PublicKey.encode({Type:t.KeyType.Secp256k1,Data:this.marshal()}).finish()}equals(t){return o(this.bytes,t.bytes)}async hash(){const{bytes:t}=await n.digest(this.bytes);return t}}class c{constructor(t,e){this._key=t,this._publicKey=e||u.computePublicKey(t),u.validatePrivateKey(this._key),u.validatePublicKey(this._publicKey)}sign(t){return u.hashAndSign(this._key,t)}get public(){return new h(this._publicKey)}marshal(){return this._key}get bytes(){return t.PrivateKey.encode({Type:t.KeyType.Secp256k1,Data:this.marshal()}).finish()}equals(t){return o(this.bytes,t.bytes)}async hash(){const{bytes:t}=await n.digest(this.bytes);return t}async id(){const t=await this.public.hash();return s(t,"base58btc")}async export(t,e="libp2p-key"){if("libp2p-key"===e)return a.export(this.bytes,t);throw i(new Error(`export format '${e}' is not supported`),"ERR_INVALID_EXPORT_FORMAT")}}return{Secp256k1PublicKey:h,Secp256k1PrivateKey:c,unmarshalSecp256k1PrivateKey:function(t){return new c(t)},unmarshalSecp256k1PublicKey:function(t){return new h(t)},generateKeyPair:async function(){const t=await u.generateKey();return new c(t)}}}},54056:function(t,e,r){"use strict";const n=r(32114),i=r(79656),{sha256:o}=r(41256);t.exports=()=>({generateKey:function(){return i.utils.randomPrivateKey()},privateKeyLength:32,hashAndSign:async function(t,e){const{digest:r}=await o.digest(e);try{return await i.sign(r,t)}catch(s){throw n(s,"ERR_INVALID_INPUT")}},hashAndVerify:async function(t,e,r){try{const{digest:n}=await o.digest(r);return i.verify(e,n,t)}catch(s){throw n(s,"ERR_INVALID_INPUT")}},compressPublicKey:function(t){return i.Point.fromHex(t).toRawBytes(!0)},decompressPublicKey:function(t){return i.Point.fromHex(t).toRawBytes(!1)},validatePrivateKey:function(t){try{i.getPublicKey(t,!0)}catch(e){throw n(e,"ERR_INVALID_PRIVATE_KEY")}},validatePublicKey:function(t){try{i.Point.fromHex(t)}catch(e){throw n(e,"ERR_INVALID_PUBLIC_KEY")}},computePublicKey:function(t){try{return i.getPublicKey(t,!0)}catch(e){throw n(e,"ERR_INVALID_PRIVATE_KEY")}}})},45753:function(t,e,r){"use strict";const n=r(32114);t.exports=function(t,e){if(!t.includes(e)){const r=t.join(" / ");throw n(new Error(`Unknown curve: ${e}. Must be ${r}`),"ERR_INVALID_CURVE")}}},93221:function(t,e,r){"use strict";const n=r(98960),i=r(97116),o=r(32114),s={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};t.exports=function(t,e,r,a,u){const h=s[u];if(!h){const t=Object.keys(s).join(" / ");throw o(new Error(`Hash '${u}' is unknown or not supported. Must be ${t}`),"ERR_UNSUPPORTED_HASH_TYPE")}const c=n(t,e,r,a,h);return i.encode64(c)}},87503:function(t,e,r){"use strict";const n=r(1914),i=r(32114);t.exports=function(t){if(isNaN(t)||t<=0)throw i(new Error("random bytes length must be a Number bigger than 0"),"ERR_INVALID_LENGTH");return n(t)}},56441:function(t,e,r){"use strict";r(97116),r(15764);const n=r(3832),{fromString:i}=r(52217),{toString:o}=r(92263),{concat:s}=r(20605);e.bigIntegerToUintBase64url=(t,e)=>{let r=Uint8Array.from(t.abs().toByteArray());if(r=0===r[0]?r.slice(1):r,null!=e){if(r.length>e)throw new Error("byte array longer than desired length");r=s([new Uint8Array(e-r.length),r])}return o(r,"base64url")},e.base64urlToBigInteger=t=>{const r=e.base64urlToBuffer(t);return new n.jsbn.BigInteger(o(r,"base16"),16)},e.base64urlToBuffer=(t,e)=>{let r=i(t,"base64urlpad");if(null!=e){if(r.length>e)throw new Error("byte array longer than desired length");r=s([new Uint8Array(e-r.length),r])}return r}},63649:function(t,e){"use strict";e.get=(t=globalThis)=>{const e=t.crypto;if(!e||!e.subtle)throw Object.assign(new Error("Missing Web Crypto API. The most likely cause of this error is that this page is being accessed from an insecure context (i.e. not HTTPS). For more information and possible resolutions see https://github.com/libp2p/js-libp2p-crypto/blob/master/README.md#web-crypto-api"),{code:"ERR_MISSING_WEB_CRYPTO"});return e}},43720:function(t){t.exports=r;var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(B){}function r(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function n(t){return!0===(t&&t.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var i={},o={};function s(t,e){var r,n,s;return e?(s=0<=(t>>>=0)&&t<256)&&(n=o[t])?n:(r=u(t,(0|t)<0?-1:0,!0),s&&(o[t]=r),r):(s=-128<=(t|=0)&&t<128)&&(n=i[t])?n:(r=u(t,t<0?-1:0,!1),s&&(i[t]=r),r)}function a(t,e){if(isNaN(t))return e?m:y;if(e){if(t<0)return m;if(t>=d)return A}else{if(t<=-p)return k;if(t+1>=p)return E}return t<0?a(-t,e).neg():u(t%f|0,t/f|0,e)}function u(t,e,n){return new r(t,e,n)}r.fromInt=s,r.fromNumber=a,r.fromBits=u;var h=Math.pow;function c(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return y;if("number"===typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return c(t.substring(1),e,r).neg();for(var i=a(h(r,8)),o=y,s=0;s>>0:this.low},S.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},S.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((o=u).isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}},S.getHighBits=function(){return this.high},S.getHighBitsUnsigned=function(){return this.high>>>0},S.getLowBits=function(){return this.low},S.getLowBitsUnsigned=function(){return this.low>>>0},S.getNumBitsAbs=function(){if(this.isNegative())return this.eq(k)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<=0},S.isOdd=function(){return 1===(1&this.low)},S.isEven=function(){return 0===(1&this.low)},S.equals=function(t){return n(t)||(t=l(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},S.eq=S.equals,S.notEquals=function(t){return!this.eq(t)},S.neq=S.notEquals,S.ne=S.notEquals,S.lessThan=function(t){return this.comp(t)<0},S.lt=S.lessThan,S.lessThanOrEqual=function(t){return this.comp(t)<=0},S.lte=S.lessThanOrEqual,S.le=S.lessThanOrEqual,S.greaterThan=function(t){return this.comp(t)>0},S.gt=S.greaterThan,S.greaterThanOrEqual=function(t){return this.comp(t)>=0},S.gte=S.greaterThanOrEqual,S.ge=S.greaterThanOrEqual,S.compare=function(t){if(n(t)||(t=l(t)),this.eq(t))return 0;var e=this.isNegative(),r=t.isNegative();return e&&!r?-1:!e&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},S.comp=S.compare,S.negate=function(){return!this.unsigned&&this.eq(k)?k:this.not().add(v)},S.neg=S.negate,S.add=function(t){n(t)||(t=l(t));var e=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,h=t.low>>>16,c=0,f=0,d=0,p=0;return d+=(p+=o+(65535&t.low))>>>16,f+=(d+=i+h)>>>16,c+=(f+=r+a)>>>16,c+=e+s,u((d&=65535)<<16|(p&=65535),(c&=65535)<<16|(f&=65535),this.unsigned)},S.subtract=function(t){return n(t)||(t=l(t)),this.add(t.neg())},S.sub=S.subtract,S.multiply=function(t){if(this.isZero())return y;if(n(t)||(t=l(t)),e)return u(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return y;if(this.eq(k))return t.isOdd()?k:y;if(t.eq(k))return this.isOdd()?k:y;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(g)&&t.lt(g))return a(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,h=t.high>>>16,c=65535&t.high,f=t.low>>>16,d=65535&t.low,p=0,m=0,v=0,b=0;return v+=(b+=s*d)>>>16,m+=(v+=o*d)>>>16,v&=65535,m+=(v+=s*f)>>>16,p+=(m+=i*d)>>>16,m&=65535,p+=(m+=o*f)>>>16,m&=65535,p+=(m+=s*c)>>>16,p+=r*d+i*f+o*c+s*h,u((v&=65535)<<16|(b&=65535),(p&=65535)<<16|(m&=65535),this.unsigned)},S.mul=S.multiply,S.divide=function(t){if(n(t)||(t=l(t)),t.isZero())throw Error("division by zero");var r,i,o;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?u((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?m:y;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return m;if(t.gt(this.shru(1)))return b;o=m}else{if(this.eq(k))return t.eq(v)||t.eq(w)?k:t.eq(k)?v:(r=this.shr(1).div(t).shl(1)).eq(y)?t.isNegative()?v:w:(i=this.sub(t.mul(r)),o=r.add(i.div(t)));if(t.eq(k))return this.unsigned?m:y;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=y}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),c=s<=48?1:h(2,s-48),f=a(r),d=f.mul(t);d.isNegative()||d.gt(i);)d=(f=a(r-=c,this.unsigned)).mul(t);f.isZero()&&(f=v),o=o.add(f),i=i.sub(d)}return o},S.div=S.divide,S.modulo=function(t){return n(t)||(t=l(t)),e?u((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},S.mod=S.modulo,S.rem=S.modulo,S.not=function(){return u(~this.low,~this.high,this.unsigned)},S.and=function(t){return n(t)||(t=l(t)),u(this.low&t.low,this.high&t.high,this.unsigned)},S.or=function(t){return n(t)||(t=l(t)),u(this.low|t.low,this.high|t.high,this.unsigned)},S.xor=function(t){return n(t)||(t=l(t)),u(this.low^t.low,this.high^t.high,this.unsigned)},S.shiftLeft=function(t){return n(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?u(this.low<>>32-t,this.unsigned):u(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):u(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},S.shr=S.shiftRight,S.shiftRightUnsigned=function(t){if(n(t)&&(t=t.toInt()),0===(t&=63))return this;var e=this.high;return t<32?u(this.low>>>t|e<<32-t,e>>>t,this.unsigned):u(32===t?e:e>>>t-32,0,this.unsigned)},S.shru=S.shiftRightUnsigned,S.shr_u=S.shiftRightUnsigned,S.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},S.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},S.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},S.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},S.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},r.fromBytes=function(t,e,n){return n?r.fromBytesLE(t,e):r.fromBytesBE(t,e)},r.fromBytesLE=function(t,e){return new r(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},r.fromBytesBE=function(t,e){return new r(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}},79746:function(t){function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},80556:function(t,e,r){"use strict";const{encodeText:n}=r(82413);t.exports=class{constructor(t,e,r,i){this.name=t,this.code=e,this.codeBuf=n(this.code),this.alphabet=i,this.codec=r(i)}encode(t){return this.codec.encode(t)}decode(t){for(const e of t)if(this.alphabet&&this.alphabet.indexOf(e)<0)throw new Error(`invalid character '${e}' in '${t}'`);return this.codec.decode(t)}}},25077:function(t,e,r){"use strict";const n=r(28820),i=r(80556),{rfc4648:o}=r(36727),{decodeText:s,encodeText:a}=r(82413),u=[["identity","\0",()=>({encode:s,decode:a}),""],["base2","0",o(1),"01"],["base8","7",o(3),"01234567"],["base10","9",n,"0123456789"],["base16","f",o(4),"0123456789abcdef"],["base16upper","F",o(4),"0123456789ABCDEF"],["base32hex","v",o(5),"0123456789abcdefghijklmnopqrstuv"],["base32hexupper","V",o(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV"],["base32hexpad","t",o(5),"0123456789abcdefghijklmnopqrstuv="],["base32hexpadupper","T",o(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV="],["base32","b",o(5),"abcdefghijklmnopqrstuvwxyz234567"],["base32upper","B",o(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"],["base32pad","c",o(5),"abcdefghijklmnopqrstuvwxyz234567="],["base32padupper","C",o(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567="],["base32z","h",o(5),"ybndrfg8ejkmcpqxot1uwisza345h769"],["base36","k",n,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",n,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",n,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",n,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base64","m",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],h=u.reduce(((t,e)=>(t[e[0]]=new i(e[0],e[1],e[2],e[3]),t)),{}),c=u.reduce(((t,e)=>(t[e[1]]=h[e[0]],t)),{});t.exports={names:h,codes:c}},36957:function(t,e,r){"use strict";const n=r(25077),{encodeText:i,decodeText:o,concat:s}=r(82413);function a(t){if(Object.prototype.hasOwnProperty.call(n.names,t))return n.names[t];if(Object.prototype.hasOwnProperty.call(n.codes,t))return n.codes[t];throw new Error(`Unsupported encoding: ${t}`)}(e=t.exports=function(t,e){if(!e)throw new Error("requires an encoded Uint8Array");const{name:r,codeBuf:n}=a(t);return function(t,e){a(t).decode(o(e))}(r,e),s([n,e],n.length+e.length)}).encode=function(t,e){const r=a(t),n=i(r.encode(e));return s([r.codeBuf,n],r.codeBuf.length+n.length)},e.decode=function(t){t instanceof Uint8Array&&(t=o(t));const e=t[0];return["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(e)&&(t=t.toLowerCase()),a(t[0]).decode(t.substring(1))},e.isEncoded=function(t){if(t instanceof Uint8Array&&(t=o(t)),"[object String]"!==Object.prototype.toString.call(t))return!1;try{return a(t[0]).name}catch(e){return!1}},e.encoding=a,e.encodingFromData=function(t){return t instanceof Uint8Array&&(t=o(t)),a(t[0])};const u=Object.freeze(n.names),h=Object.freeze(n.codes);e.names=u,e.codes=h},36727:function(t){"use strict";t.exports={rfc4648:t=>e=>({encode:r=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<((t,e,r)=>{const n={};for(let h=0;h=8&&(s-=8,o[u++]=255&a>>s)}if(s>=r||255&a<<8-s)throw new SyntaxError("Unexpected end of data");return o})(r,e,t)})}},82413:function(t){"use strict";const e=new TextDecoder,r=new TextEncoder;t.exports={decodeText:t=>e.decode(t),encodeText:t=>r.encode(t),concat:function(t,e){const r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}}},58636:function(t){"use strict";const e=Object.freeze({identity:0,cidv1:1,cidv2:2,cidv3:3,ip4:4,tcp:6,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,dccp:33,"murmur3-128":34,"murmur3-32":35,ip6:41,ip6zone:42,path:47,multicodec:48,multihash:49,multiaddr:50,multibase:51,dns:53,dns4:54,dns6:55,dnsaddr:56,protobuf:80,cbor:81,raw:85,"dbl-sha2-256":86,rlp:96,bencode:99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,sctp:132,"dag-jose":133,"dag-cose":134,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"eth-receipt-log-trie":153,"eth-reciept-log":154,"bitcoin-block":176,"bitcoin-tx":177,"bitcoin-witness-commitment":178,"zcash-block":192,"zcash-tx":193,"caip-50":202,streamid:206,"stellar-block":208,"stellar-tx":209,md4:212,md5:213,bmt:214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,zeronet:230,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"x25519-pub":236,"ed25519-pub":237,"bls12_381-g1g2-pub":238,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,udp:273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,udt:301,utp:302,unix:400,thread:406,p2p:421,ipfs:421,https:443,onion:444,onion3:445,garlic64:446,garlic32:447,tls:448,noise:454,quic:460,ws:477,wss:478,"p2p-websocket-star":479,http:480,"swhid-1-snp":496,json:512,messagepack:513,"libp2p-peer-record":769,"libp2p-relay-rsvp":770,"car-index-sorted":1024,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,"p256-pub":4608,"p384-pub":4609,"p521-pub":4610,"ed448-pub":4611,"x448-pub":4612,"ed25519-priv":4864,"secp256k1-priv":4865,"x25519-priv":4866,kangarootwelve:7425,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46e3,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082,"zeroxcert-imprint-256":52753,"fil-commitment-unsealed":61697,"fil-commitment-sealed":61698,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332,"skynet-ns":11639056,"arweave-ns":11704592});t.exports={baseTable:e}},76883:function(t,e,r){"use strict";const n=r(94676),{concat:i}=r(20605),o=r(55945),{nameToVarint:s,constantToCode:a,nameToCode:u,codeToName:h}=r(21843);function c(t){const e=n.decode(t),r=h[e];if(void 0===r)throw new Error(`Code "${e}" not found`);return r}function l(t){return h[t]}function f(t){const e=u[t];if(void 0===e)throw new Error(`Codec "${t}" not found`);return e}function d(t){return n.decode(t)}function p(t){const e=s[t];if(void 0===e)throw new Error(`Codec "${t}" not found`);return e}function g(t){return o.varintEncode(t)}t.exports={addPrefix:function(t,e){let r;if(t instanceof Uint8Array)r=o.varintUint8ArrayEncode(t);else{if(!s[t])throw new Error("multicodec not recognized");r=s[t]}return i([r,e],r.length+e.length)},rmPrefix:function(t){return n.decode(t),t.slice(n.decode.bytes)},getNameFromData:c,getNameFromCode:l,getCodeFromName:f,getCodeFromData:d,getVarintFromName:p,getVarintFromCode:g,getCodec:function(t){return c(t)},getName:function(t){return l(t)},getNumber:function(t){return f(t)},getCode:function(t){return d(t)},getCodeVarint:function(t){return p(t)},getVarint:function(t){return Array.from(g(t))},...a,nameToVarint:s,nameToCode:u,codeToName:h}},21843:function(t,e,r){"use strict";const{baseTable:n}=r(58636),i=r(55945).varintEncode,o={},s={},a={};for(const h in n){const t=h,e=n[t];o[t]=i(e);s[t.toUpperCase().replace(/-/g,"_")]=e,a[e]||(a[e]=t)}Object.freeze(o),Object.freeze(s),Object.freeze(a);const u=Object.freeze(n);t.exports={nameToVarint:o,constantToCode:s,nameToCode:u,codeToName:a}},55945:function(t,e,r){"use strict";const n=r(94676),{toString:i}=r(92263),{fromString:o}=r(52217);function s(t){return parseInt(i(t,"base16"),16)}t.exports={numberToUint8Array:function(t){let e=t.toString(16);e.length%2===1&&(e="0"+e);return o(e,"base16")},uint8ArrayToNumber:s,varintUint8ArrayEncode:function(t){return Uint8Array.from(n.encode(s(t)))},varintEncode:function(t){return Uint8Array.from(n.encode(t))}}},94268:function(t,e,r){"use strict";const{Buffer:n}=r(48764);t.exports=class{constructor(t,e,r,i){this.name=t,this.code=e,this.codeBuf=n.from(this.code),this.alphabet=i,this.engine=r(i)}encode(t){return this.engine.encode(t)}decode(t){for(const e of t)if(this.alphabet&&this.alphabet.indexOf(e)<0)throw new Error(`invalid character '${e}' in '${t}'`);return this.engine.decode(t)}}},37302:function(t,e,r){"use strict";const n=r(58162),i=r(94268),o=r(92154),{decodeText:s,encodeText:a}=r(2708),u=[["identity","\0",()=>({encode:s,decode:a}),""],["base2","0",o(1),"01"],["base8","7",o(3),"01234567"],["base10","9",n,"0123456789"],["base16","f",o(4),"0123456789abcdef"],["base16upper","F",o(4),"0123456789ABCDEF"],["base32hex","v",o(5),"0123456789abcdefghijklmnopqrstuv"],["base32hexupper","V",o(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV"],["base32hexpad","t",o(5),"0123456789abcdefghijklmnopqrstuv="],["base32hexpadupper","T",o(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV="],["base32","b",o(5),"abcdefghijklmnopqrstuvwxyz234567"],["base32upper","B",o(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"],["base32pad","c",o(5),"abcdefghijklmnopqrstuvwxyz234567="],["base32padupper","C",o(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567="],["base32z","h",o(5),"ybndrfg8ejkmcpqxot1uwisza345h769"],["base36","k",n,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",n,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",n,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",n,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base64","m",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],h=u.reduce(((t,e)=>(t[e[0]]=new i(e[0],e[1],e[2],e[3]),t)),{}),c=u.reduce(((t,e)=>(t[e[1]]=h[e[0]],t)),{});t.exports={names:h,codes:c}},77102:function(t,e,r){"use strict";const{Buffer:n}=r(48764),i=r(37302),{decodeText:o,asBuffer:s}=r(2708);function a(t){if(i.names[t])return i.names[t];if(i.codes[t])return i.codes[t];throw new Error(`Unsupported encoding: ${t}`)}(e=t.exports=function(t,e){if(!e)throw new Error("requires an encoded buffer");const{name:r,codeBuf:i}=a(t);!function(t,e){a(t).decode(o(e))}(r,e);const s=n.alloc(i.length+e.length);return s.set(i,0),s.set(e,i.length),s}).encode=function(t,e){const r=a(t);return n.concat([r.codeBuf,n.from(r.encode(e))])},e.decode=function(t){ArrayBuffer.isView(t)&&(t=o(t));const e=t[0];["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(e)&&(t=t.toLowerCase());const r=a(t[0]);return s(r.decode(t.substring(1)))},e.isEncoded=function(t){if(t instanceof Uint8Array&&(t=o(t)),"[object String]"!==Object.prototype.toString.call(t))return!1;try{return a(t[0]).name}catch(e){return!1}},e.encoding=a,e.encodingFromData=function(t){return t instanceof Uint8Array&&(t=o(t)),a(t[0])},e.names=Object.freeze(i.names),e.codes=Object.freeze(i.codes)},92154:function(t){"use strict";t.exports=t=>e=>({encode:r=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<((t,e,r)=>{const n={};for(let h=0;h=8&&(s-=8,o[u++]=255&a>>s)}if(s>=r||255&a<<8-s)throw new SyntaxError("Unexpected end of data");return o})(r,e,t)})},2708:function(t,e,r){"use strict";const{Buffer:n}=r(48764),{TextEncoder:i,TextDecoder:o}=r(47259),s=new o,a=new i;t.exports={decodeText:t=>s.decode(t),encodeText:t=>a.encode(t),asBuffer:({buffer:t,byteLength:e,byteOffset:r})=>n.from(t,r,e)}},2623:function(t){t.exports=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<=128);return t.bytes=s-r,i}},13657:function(t){t.exports=function t(r,n,i){n=n||[];var o=i=i||0;for(;r>=e;)n[i++]=255&r|128,r/=128;for(;-128&r;)n[i++]=255&r|128,r>>>=7;return n[i]=0|r,t.bytes=i-o+1,n};var e=Math.pow(2,31)},88414:function(t,e,r){t.exports={encode:r(13657),decode:r(2623),encodingLength:r(58078)}},58078:function(t){var e=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),u=Math.pow(2,56),h=Math.pow(2,63);t.exports=function(t){return t 2 bytes.");const i=o.decode(r);if(!e.isValidCode(i))throw new Error(`multihash unknown function code: 0x${i.toString(16)}`);r=r.slice(o.decode.bytes);const s=o.decode(r);if(s<0)throw new Error(`multihash invalid length: ${s}`);if(r=r.slice(o.decode.bytes),r.length!==s)throw new Error(`multihash length inconsistent: 0x${r.toString("hex")}`);return{code:i,name:h[i],length:s,digest:r}},e.encode=function(t,r,i){if(!t||void 0===r)throw new Error("multihash encode requires at least two args: digest, code");const s=e.coerceCode(r);if(!(t instanceof Uint8Array))throw new Error("digest should be a Uint8Array");if(null==i&&(i=t.length),i&&t.length!==i)throw new Error("digest length should be equal to specified length.");const a=o.encode(s),u=o.encode(i),h=n.alloc(a.length+u.length+t.length);return h.set(a,0),h.set(u,a.length),h.set(t,a.length+u.length),h},e.coerceCode=function(t){let r=t;if("string"===typeof t){if(void 0===s[t])throw new Error(`Unrecognized hash function named: ${t}`);r=s[t]}if("number"!==typeof r)throw new Error(`Hash function code should be a number. Got: ${r}`);if(void 0===h[r]&&!e.isAppCode(r))throw new Error(`Unrecognized function code: ${r}`);return r},e.isAppCode=function(t){return t>0&&t<16},e.isValidCode=function(t){return!!e.isAppCode(t)||!!h[t]},e.validate=c,e.prefix=function(t){return c(t),n.from(t.buffer,t.byteOffset,2)}},83854:function(t){const e="13456789abcdefghijkmnopqrstuwxyz";function r(t){var r=e.indexOf(t);if(-1===r)throw new Error("Invalid character found: "+t);return r}t.exports={encode:function(t){if(t.constructor!==Uint8Array)throw new Error("View must be a Uint8Array!");const r=t.length,n=8*r%5,i=0===n?0:5-n;let o=0,s="",a=0;for(var u=0;u=5;)s+=e[o>>>a+i-5&31],a-=5;return a>0&&(s+=e[o<<5-(a+i)&31]),s},decode:function(t){if("string"!==typeof t)throw new Error("Input must be a string!");var e=t.length;const n=5*e%8,i=0===n?0:8-n;for(var o=0,s=0,a=0,u=new Uint8Array(Math.ceil(5*e/8)),h=0;h=8&&(u[a++]=s>>>o+i-8&255,o-=8);return o>0&&(u[a++]=s<0&&void 0!==arguments[0]?arguments[0]:{},e=t.ampFirst,r=void 0!==e&&e,n=t.hybrid,i=void 0!==n&&n,o=t.hasQuery,s=void 0!==o&&o;return r||i&&s}("function"===typeof e.default||"object"===typeof e.default&&null!==e.default)&&(Object.assign(e.default,e),t.exports=e.default)},16505:function(t,e,r){"use strict";var n=r(930);function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}Object.defineProperty(e,"__esModule",{value:!0}),e.defaultHead=l,e.default=void 0;var o,s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}return e.default=t,e}(r(67294)),a=(o=r(70148))&&o.__esModule?o:{default:o},u=r(17285),h=r(60523),c=r(49546);r(67206);function l(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=[s.default.createElement("meta",{charSet:"utf-8"})];return t||e.push(s.default.createElement("meta",{name:"viewport",content:"width=device-width"})),e}function f(t,e){return"string"===typeof e||"number"===typeof e?t:e.type===s.default.Fragment?t.concat(s.default.Children.toArray(e.props.children).reduce((function(t,e){return"string"===typeof e||"number"===typeof e?t:t.concat(e)}),[])):t.concat(e)}var d=["name","httpEquiv","charSet","itemProp"];function p(t,e){return t.reduce((function(t,e){var r=s.default.Children.toArray(e.props.children);return t.concat(r)}),[]).reduce(f,[]).reverse().concat(l(e.inAmpMode)).filter(function(){var t=new Set,e=new Set,r=new Set,n={};return function(i){var o=!0,s=!1;if(i.key&&"number"!==typeof i.key&&i.key.indexOf("$")>0){s=!0;var a=i.key.slice(i.key.indexOf("$")+1);t.has(a)?o=!1:t.add(a)}switch(i.type){case"title":case"base":e.has(i.type)?o=!1:e.add(i.type);break;case"meta":for(var u=0,h=d.length;u>>=2;for(i=0;i>8^255&l^99,o[g]=l,s[l]=g,d=(f=t[l])<<24^l<<16^l<<8^l^f,p=((r=t[g])^(n=t[r])^(i=t[n]))<<24^(g^i)<<16^(g^n^i)<<8^g^r^i;for(var m=0;m<4;++m)u[m][g]=d,h[m][l]=p,d=d<<24|d>>>8,p=p<<24|p>>>8;0===g?g=y=1:(g=r^t[t[t[r^i]]],y^=t[t[y]])}}function f(t,e){for(var r,n=t.slice(0),i=1,s=n.length,u=4*(s+6+1),c=s;c>>16&255]<<24^o[r>>>8&255]<<16^o[255&r]<<8^o[r>>>24]^a[i]<<24,i++):s>6&&c%s===4&&(r=o[r>>>24]<<24^o[r>>>16&255]<<16^o[r>>>8&255]<<8^o[255&r]),n[c]=n[c-s]^r;if(e){for(var l,f=h[0],d=h[1],p=h[2],g=h[3],y=n.slice(0),m=(c=0,(u=n.length)-4);c>>24]]^d[o[l>>>16&255]]^p[o[l>>>8&255]]^g[o[255&l]];n=y}return n}function d(t,e,r,n){var i,a,c,l,f,d,p,g,y,m,v,b,w=t.length/4-1;n?(i=h[0],a=h[1],c=h[2],l=h[3],f=s):(i=u[0],a=u[1],c=u[2],l=u[3],f=o),d=e[0]^t[0],p=e[n?3:1]^t[1],g=e[2]^t[2],y=e[n?1:3]^t[3];for(var E=3,A=1;A>>24]^a[p>>>16&255]^c[g>>>8&255]^l[255&y]^t[++E],v=i[p>>>24]^a[g>>>16&255]^c[y>>>8&255]^l[255&d]^t[++E],b=i[g>>>24]^a[y>>>16&255]^c[d>>>8&255]^l[255&p]^t[++E],y=i[y>>>24]^a[d>>>16&255]^c[p>>>8&255]^l[255&g]^t[++E],d=m,p=v,g=b;r[0]=f[d>>>24]<<24^f[p>>>16&255]<<16^f[g>>>8&255]<<8^f[255&y]^t[++E],r[n?3:1]=f[p>>>24]<<24^f[g>>>16&255]<<16^f[y>>>8&255]<<8^f[255&d]^t[++E],r[2]=f[g>>>24]<<24^f[y>>>16&255]<<16^f[d>>>8&255]<<8^f[255&p]^t[++E],r[n?1:3]=f[y>>>24]<<24^f[d>>>16&255]<<16^f[p>>>8&255]<<8^f[255&g]^t[++E]}function p(t){var e,r="AES-"+((t=t||{}).mode||"CBC").toUpperCase(),i=(e=t.decrypt?n.cipher.createDecipher(r,t.key):n.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=t,i.call(e,r)},e}},3068:function(t,e,r){var n=r(3832);r(97116),r(66270);var i=t.exports=n.asn1=n.asn1||{};function o(t,e,r){if(r>e){var n=new Error("Too few bytes to parse DER.");throw n.available=t.length(),n.remaining=e,n.requested=r,n}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(t,e,r,o,s){if(n.util.isArray(o)){for(var a=[],u=0;ue){if(n.strict){var p=new Error("Too few bytes to read ASN.1 value.");throw p.available=t.length(),p.remaining=e,p.requested=d,p}d=e}var g=32===(32&u);if(g)if(l=[],void 0===d)for(;;){if(o(t,e,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),e-=2;break}a=t.length(),l.push(s(t,e,r+1,n)),e-=a-t.length()}else for(;d>0;)a=t.length(),l.push(s(t,d,r+1,n)),e-=a-t.length(),d-=a-t.length();if(void 0===l&&h===i.Class.UNIVERSAL&&c===i.Type.BITSTRING&&(f=t.bytes(d)),void 0===l&&n.decodeBitStrings&&h===i.Class.UNIVERSAL&&c===i.Type.BITSTRING&&d>1){var y=t.read,m=e,v=0;if(c===i.Type.BITSTRING&&(o(t,e,1),v=t.getByte(),e--),0===v)try{a=t.length();var b=s(t,e,r+1,{strict:!0,decodeBitStrings:!0}),w=a-t.length();e-=w,c==i.Type.BITSTRING&&w++;var E=b.tagClass;w!==d||E!==i.Class.UNIVERSAL&&E!==i.Class.CONTEXT_SPECIFIC||(l=[b])}catch(k){}void 0===l&&(t.read=y,e=m)}if(void 0===l){if(void 0===d){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");d=e}if(c===i.Type.BMPSTRING)for(l="";d>0;d-=2)o(t,e,2),l+=String.fromCharCode(t.getInt16()),e-=2;else l=t.getBytes(d),e-=d}var A=void 0===f?null:{bitStringContents:f};return i.create(h,c,g,l,A)}i.fromDer=function(t,e){void 0===e&&(e={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),"boolean"===typeof e&&(e={strict:e,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"parseAllBytes"in e||(e.parseAllBytes=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),"string"===typeof t&&(t=n.util.createBuffer(t));var r=t.length(),i=s(t,t.length(),0,e);if(e.parseAllBytes&&0!==t.length()){var o=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw o.byteCount=r,o.remaining=t.length(),o}return i},i.toDer=function(t){var e=n.util.createBuffer(),r=t.tagClass|t.type,o=n.util.createBuffer(),s=!1;if("bitStringContents"in t&&(s=!0,t.original&&(s=i.equals(t,t.original))),s)o.putBytes(t.bitStringContents);else if(t.composed){t.constructed?r|=32:o.putByte(0);for(var a=0;a1&&(0===t.value.charCodeAt(0)&&0===(128&t.value.charCodeAt(1))||255===t.value.charCodeAt(0)&&128===(128&t.value.charCodeAt(1)))?o.putBytes(t.value.substr(1)):o.putBytes(t.value);if(e.putByte(r),o.length()<=127)e.putByte(127&o.length());else{var u=o.length(),h="";do{h+=String.fromCharCode(255&u),u>>>=8}while(u>0);e.putByte(128|h.length);for(a=h.length-1;a>=0;--a)e.putByte(h.charCodeAt(a))}return e.putBuffer(o),e},i.oidToDer=function(t){var e,r,i,o,s=t.split("."),a=n.util.createBuffer();a.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var u=2;u>>=7,e||(o|=128),r.push(o),e=!1}while(i>0);for(var h=r.length-1;h>=0;--h)a.putByte(r[h])}return a},i.derToOid=function(t){var e;"string"===typeof t&&(t=n.util.createBuffer(t));var r=t.getByte();e=Math.floor(r/40)+"."+r%40;for(var i=0;t.length()>0;)i<<=7,128&(r=t.getByte())?i+=127&r:(e+="."+(i+r),i=0);return e},i.utcTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(t.substr(2,2),10)-1,i=parseInt(t.substr(4,2),10),o=parseInt(t.substr(6,2),10),s=parseInt(t.substr(8,2),10),a=0;if(t.length>11){var u=t.charAt(10),h=10;"+"!==u&&"-"!==u&&(a=parseInt(t.substr(10,2),10),h+=2)}if(e.setUTCFullYear(r,n,i),e.setUTCHours(o,s,a,0),h&&("+"===(u=t.charAt(h))||"-"===u)){var c=60*parseInt(t.substr(h+1,2),10)+parseInt(t.substr(h+4,2),10);c*=6e4,"+"===u?e.setTime(+e-c):e.setTime(+e+c)}return e},i.generalizedTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,4),10),n=parseInt(t.substr(4,2),10)-1,i=parseInt(t.substr(6,2),10),o=parseInt(t.substr(8,2),10),s=parseInt(t.substr(10,2),10),a=parseInt(t.substr(12,2),10),u=0,h=0,c=!1;"Z"===t.charAt(t.length-1)&&(c=!0);var l=t.length-5,f=t.charAt(l);"+"!==f&&"-"!==f||(h=60*parseInt(t.substr(l+1,2),10)+parseInt(t.substr(l+4,2),10),h*=6e4,"+"===f&&(h*=-1),c=!0);return"."===t.charAt(14)&&(u=1e3*parseFloat(t.substr(14),10)),c?(e.setUTCFullYear(r,n,i),e.setUTCHours(o,s,a,u),e.setTime(+e+h)):(e.setFullYear(r,n,i),e.setHours(o,s,a,u)),e},i.dateToUtcTime=function(t){if("string"===typeof t)return t;var e="",r=[];r.push((""+t.getUTCFullYear()).substr(2)),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var n=0;n=-128&&t<128)return e.putSignedInt(t,8);if(t>=-32768&&t<32768)return e.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return e.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return e.putSignedInt(t,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=t,r},i.derToInteger=function(t){"string"===typeof t&&(t=n.util.createBuffer(t));var e=8*t.length();if(e>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(e)},i.validate=function(t,e,r,o){var s=!1;if(t.tagClass!==e.tagClass&&"undefined"!==typeof e.tagClass||t.type!==e.type&&"undefined"!==typeof e.type)o&&(t.tagClass!==e.tagClass&&o.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+t.tagClass+'"'),t.type!==e.type&&o.push("["+e.name+'] Expected type "'+e.type+'", got "'+t.type+'"'));else if(t.constructed===e.constructed||"undefined"===typeof e.constructed){if(s=!0,e.value&&n.util.isArray(e.value))for(var a=0,u=0;s&&u0&&(o+="\n");for(var s="",u=0;u1?o+="0x"+n.util.bytesToHex(t.value.slice(1)):o+="(none)",t.value.length>0){var f=t.value.charCodeAt(0);1==f?o+=" (1 unused bit shown)":f>1&&(o+=" ("+f+" unused bits shown)")}}else if(t.type===i.Type.OCTETSTRING)a.test(t.value)||(o+="("+t.value+") "),o+="0x"+n.util.bytesToHex(t.value);else if(t.type===i.Type.UTF8)try{o+=n.util.decodeUtf8(t.value)}catch(p){if("URI malformed"!==p.message)throw p;o+="0x"+n.util.bytesToHex(t.value)+" (malformed UTF8)"}else t.type===i.Type.PRINTABLESTRING||t.type===i.Type.IA5String?o+=t.value:a.test(t.value)?o+="0x"+n.util.bytesToHex(t.value):0===t.value.length?o+="[null]":o+=t.value}return o}},78807:function(t,e,r){var n=r(62678).Buffer,i={};t.exports=i;var o={};i.encode=function(t,e,r){if("string"!==typeof e)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!==typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(t instanceof Uint8Array){var i=0,o=e.length,s=e.charAt(0),a=[0];for(i=0;i0;)a.push(h%o),h=h/o|0}for(i=0;0===t[i]&&i=0;--i)n+=e[a[i]]}else n=function(t,e){var r=0,n=e.length,i=e.charAt(0),o=[0];for(r=0;r0;)o.push(a%n),a=a/n|0}var u="";for(r=0;0===t.at(r)&&r=0;--r)u+=e[o[r]];return u}(t,e);if(r){var c=new RegExp(".{1,"+r+"}","g");n=n.match(c).join("\r\n")}return n},i.decode=function(t,e){if("string"!==typeof t)throw new TypeError('"input" must be a string.');if("string"!==typeof e)throw new TypeError('"alphabet" must be a string.');var r=o[e];if(!r){r=o[e]=[];for(var i=0;i>=8;for(;l>0;)u.push(255&l),l>>=8}for(var f=0;t[f]===a&&f4){var r=t;t=n.util.createBuffer();for(var i=0;i0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return!(n>this.blockSize<<2)&&(t.truncate(n),!0)},i.cbc=function(t){t=t||{},this.name="CBC",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(t){if(null===t.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv,this.blockSize),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(t,e,r){if(t.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return!(n>this.blockSize<<2)&&(t.truncate(n),!0)},i.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(t,e,r){var n=t.length();if(0===t.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var e,r=n.util.createBuffer(t.iv);if(this._cipherLength=0,e="additionalData"in t?n.util.createBuffer(t.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in t?t.tagLength:128,this._tag=null,t.decrypt&&(this._tag=n.util.createBuffer(t.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(a(8*i)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,e=n.util.createBuffer(e),this._aDataLength=a(8*e.length());var o=e.length()%this.blockSize;for(o&&e.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];e.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()])},i.gcm.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},i.gcm.prototype.decrypt=function(t,e,r){var n=t.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=t.getInt32(),this._hashBlock[1]=t.getInt32(),this._hashBlock[2]=t.getInt32(),this._hashBlock[3]=t.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i0;--n)e[n]=t[n]>>>1|(1&t[n-1])<<31;e[0]=t[0]>>>1,r&&(e[0]^=this._R)},i.gcm.prototype.tableMultiply=function(t){for(var e=[0,0,0,0],r=0;r<32;++r){var n=t[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];e[0]^=i[0],e[1]^=i[1],e[2]^=i[2],e[3]^=i[3]}return e},i.gcm.prototype.ghash=function(t,e,r){return e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3],this.tableMultiply(e)},i.gcm.prototype.generateHashTable=function(t,e){for(var r=8/e,n=4*r,i=16*r,o=new Array(i),s=0;s>>1,i=new Array(r);i[n]=t.slice(0);for(var o=n>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1;for(o=2;o8?3:1,m=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],b=0,w=0;w>>4^A))<<4,E^=e=65535&((A^=e)>>>-16^E),E^=(e=858993459&(E>>>2^(A^=e<<-16)))<<2,E^=e=65535&((A^=e)>>>-16^E),E^=(e=1431655765&(E>>>1^(A^=e<<-16)))<<1,E^=e=16711935&((A^=e)>>>8^E),e=(E^=(e=1431655765&(E>>>1^(A^=e<<8)))<<1)<<8|(A^=e)>>>20&240,E=A<<24|A<<8&16711680|A>>>8&65280|A>>>24&240,A=e;for(var k=0;k>>26,A=A<<2|A>>>26):(E=E<<1|E>>>27,A=A<<1|A>>>27),A&=-15;var S=r[(E&=-15)>>>28]|n[E>>>24&15]|i[E>>>20&15]|o[E>>>16&15]|s[E>>>12&15]|a[E>>>8&15]|u[E>>>4&15],B=h[A>>>28]|c[A>>>24&15]|l[A>>>20&15]|f[A>>>16&15]|d[A>>>12&15]|p[A>>>8&15]|g[A>>>4&15];e=65535&(B>>>16^S),m[b++]=S^e,m[b++]=B^e<<16}}return m}(e),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],a=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],c=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],l=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],f=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function d(t,e,r,n){var i,d,p=32===t.length?3:9;i=3===p?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=e[0],y=e[1];g^=(d=252645135&(g>>>4^y))<<4,g^=(d=65535&(g>>>16^(y^=d)))<<16,g^=d=858993459&((y^=d)>>>2^g),g^=d=16711935&((y^=d<<2)>>>8^g),g=(g^=(d=1431655765&(g>>>1^(y^=d<<8)))<<1)<<1|g>>>31,y=(y^=d)<<1|y>>>31;for(var m=0;m>>4|y<<28)^t[w+1];d=g,g=y,y=d^(s[E>>>24&63]|u[E>>>16&63]|c[E>>>8&63]|f[63&E]|o[A>>>24&63]|a[A>>>16&63]|h[A>>>8&63]|l[63&A])}d=g,g=y,y=d}y=y>>>1|y<<31,y^=d=1431655765&((g=g>>>1|g<<31)>>>1^y),y^=(d=16711935&(y>>>8^(g^=d<<1)))<<8,y^=(d=858993459&(y>>>2^(g^=d)))<<2,y^=d=65535&((g^=d)>>>16^y),y^=d=252645135&((g^=d<<16)>>>4^y),g^=d<<4,r[0]=g,r[1]=y}function p(t){var e,r="DES-"+((t=t||{}).mode||"CBC").toUpperCase(),i=(e=t.decrypt?n.cipher.createDecipher(r,t.key):n.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=t,i.call(e,r)},e}},3832:function(t){t.exports={options:{usePureJavaScript:!1}}},36607:function(t,e,r){var n=r(3832);r(28991),r(97116),(t.exports=n.hmac=n.hmac||{}).create=function(){var t=null,e=null,r=null,i=null,o={start:function(o,s){if(null!==o)if("string"===typeof o){if(!((o=o.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+o+'"');e=n.md.algorithms[o].create()}else e=o;if(null===s)s=t;else{if("string"===typeof s)s=n.util.createBuffer(s);else if(n.util.isArray(s)){var a=s;s=n.util.createBuffer();for(var u=0;ue.blockLength&&(e.start(),e.update(s.bytes()),s=e.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),h=s.length();for(u=0;u>14;--o>=0;){var u=16383&this.data[t],h=this.data[t++]>>14,c=a*u+h*s;i=((u=s*u+((16383&c)<<14)+r.data[n]+i)>>28)+(c>>14)+a*h,r.data[n++]=268435455&u}return i}i.jsbn.BigInteger=o,"undefined"===typeof navigator?(o.prototype.am=a,n=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(t,e,r,n,i,o){for(var s=32767&e,a=e>>15;--o>=0;){var u=32767&this.data[t],h=this.data[t++]>>15,c=a*u+h*s;i=((u=s*u+((32767&c)<<15)+r.data[n]+(1073741823&i))>>>30)+(c>>>15)+a*h+(i>>>30),r.data[n++]=1073741823&u}return i},n=30):"Netscape"!=navigator.appName?(o.prototype.am=function(t,e,r,n,i,o){for(;--o>=0;){var s=e*this.data[t++]+r.data[n]+i;i=Math.floor(s/67108864),r.data[n++]=67108863&s}return i},n=26):(o.prototype.am=a,n=28),o.prototype.DB=n,o.prototype.DM=(1<>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function g(t){this.m=t}function y(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function A(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function k(){}function S(t){return t}function B(t){this.r2=s(),this.q3=s(),o.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}g.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},g.prototype.revert=function(t){return t},g.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},g.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},g.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},y.prototype.convert=function(t){var e=s();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(o.ZERO)>0&&this.m.subTo(e,e),e},y.prototype.revert=function(t){var e=s();return t.copyTo(e),this.reduce(e),e},y.prototype.reduce=function(t){for(;t.t<=this.mt2;)t.data[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t.data[r]+=this.m.am(0,n,t,e,0,this.m.t);t.data[r]>=t.DV;)t.data[r]-=t.DV,t.data[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},y.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},y.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},o.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t.data[e]=this.data[e];t.t=this.t,t.s=this.s},o.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this.data[0]=t:t<-1?this.data[0]=t+this.DV:this.t=0},o.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var n=t.length,i=!1,s=0;--n>=0;){var a=8==r?255&t[n]:f(t,n);a<0?"-"==t.charAt(n)&&(i=!0):(i=!1,0==s?this.data[this.t++]=a:s+r>this.DB?(this.data[this.t-1]|=(a&(1<>this.DB-s):this.data[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==t;)--this.t},o.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e.data[r+t]=this.data[r];for(r=t-1;r>=0;--r)e.data[r]=0;e.t=this.t+t,e.s=this.s},o.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e.data[r+s+1]=this.data[r]>>i|a,a=(this.data[r]&o)<=0;--r)e.data[r]=0;e.data[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},o.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(e.data[this.t-r-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e.data[r++]=this.DV+n:n>0&&(e.data[r++]=n),e.t=r,e.clamp()},o.prototype.multiplyTo=function(t,e){var r=this.abs(),n=t.abs(),i=r.t;for(e.t=i+n.t;--i>=0;)e.data[i]=0;for(i=0;i=0;)t.data[r]=0;for(r=0;r=e.DV&&(t.data[r+e.t]-=e.DV,t.data[r+e.t+1]=1)}t.t>0&&(t.data[t.t-1]+=e.am(r,e.data[r],t,2*r,0,1)),t.s=0,t.clamp()},o.prototype.divRemTo=function(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(c,a),i.lShiftTo(c,r)):(n.copyTo(a),i.copyTo(r));var l=a.t,f=a.data[l-1];if(0!=f){var d=f*(1<1?a.data[l-2]>>this.F2:0),g=this.FV/d,y=(1<=0&&(r.data[r.t++]=1,r.subTo(w,r)),o.ONE.dlShiftTo(l,w),w.subTo(a,a);a.t=0;){var E=r.data[--v]==f?this.DM:Math.floor(r.data[v]*g+(r.data[v-1]+m)*y);if((r.data[v]+=a.am(0,E,r,b,0,l))0&&r.rShiftTo(c,r),u<0&&o.ZERO.subTo(r,r)}}},o.prototype.invDigit=function(){if(this.t<1)return 0;var t=this.data[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(t,e){if(t>4294967295||t<1)return o.ONE;var r=s(),n=s(),i=e.convert(this),a=p(t)-1;for(i.copyTo(r);--a>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,i,r);else{var u=r;r=n,n=u}return e.revert(r)},o.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=l(r));s>=0;)a>(a+=this.DB-e)):(r=this.data[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=l(r));return i?o:"0"},o.prototype.negate=function(){var t=s();return o.ZERO.subTo(this,t),t},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this.data[r]-t.data[r]))return e;return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this.data[this.t-1]^this.s&this.DM)},o.prototype.mod=function(t){var e=s();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(o.ZERO)>0&&t.subTo(e,e),e},o.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new g(e):new y(e),this.exp(t,r)},o.ZERO=d(0),o.ONE=d(1),k.prototype.convert=S,k.prototype.revert=S,k.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},k.prototype.sqrTo=function(t,e){t.squareTo(e)},B.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=s();return t.copyTo(e),this.reduce(e),e},B.prototype.revert=function(t){return t},B.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},B.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},B.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var x=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],C=(1<<26)/x[x.length-1];o.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},o.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=d(r),i=s(),o=s(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(t).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(t)+a},o.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),i=!1,s=0,a=0,u=0;u=r&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(o.ONE.shiftLeft(t-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(o.ONE.shiftLeft(t-1),this);else{var n=new Array,i=7&t;n.length=1+(t>>3),e.nextBytes(n),i>0?n[0]&=(1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e.data[r++]=n:n<-1&&(e.data[r++]=this.DV+n),e.t=r,e.clamp()},o.prototype.dMultiply=function(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=t;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}},o.prototype.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i=0;)r.data[n]=0;for(n=Math.max(e-this.t,0);n0)if(0==e)r=this.data[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this.data[n])%t;return r},o.prototype.millerRabin=function(t){var e=this.subtract(o.ONE),r=e.getLowestSetBit();if(r<=0)return!1;for(var n,i=e.shiftRight(r),s={nextBytes:function(t){for(var e=0;e=0);var u=n.modPow(i,this);if(0!=u.compareTo(o.ONE)&&0!=u.compareTo(e)){for(var h=1;h++>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<=0;)n<8?(r=(this.data[t]&(1<>(n+=this.DB-8)):(r=this.data[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},o.prototype.equals=function(t){return 0==this.compareTo(t)},o.prototype.min=function(t){return this.compareTo(t)<0?this:t},o.prototype.max=function(t){return this.compareTo(t)>0?this:t},o.prototype.and=function(t){var e=s();return this.bitwiseTo(t,m,e),e},o.prototype.or=function(t){var e=s();return this.bitwiseTo(t,v,e),e},o.prototype.xor=function(t){var e=s();return this.bitwiseTo(t,b,e),e},o.prototype.andNot=function(t){var e=s();return this.bitwiseTo(t,w,e),e},o.prototype.not=function(){for(var t=s(),e=0;e=this.t?0!=this.s:0!=(this.data[e]&1<1){var l=s();for(n.sqrTo(a[1],l);u<=c;)a[u]=s(),n.mulTo(l,a[u-2],a[u]),u+=2}var f,m,v=t.t-1,b=!0,w=s();for(i=p(t.data[v])-1;v>=0;){for(i>=h?f=t.data[v]>>i-h&c:(f=(t.data[v]&(1<0&&(f|=t.data[v-1]>>this.DB+i-h)),u=r;0==(1&f);)f>>=1,--u;if((i-=u)<0&&(i+=this.DB,--v),b)a[f].copyTo(o),b=!1;else{for(;u>1;)n.sqrTo(o,w),n.sqrTo(w,o),u-=2;u>0?n.sqrTo(o,w):(m=o,o=w,w=m),n.mulTo(w,a[f],o)}for(;v>=0&&0==(t.data[v]&1<=0?(r.subTo(n,r),e&&i.subTo(a,i),s.subTo(u,s)):(n.subTo(r,n),e&&a.subTo(i,a),u.subTo(s,u))}return 0!=n.compareTo(o.ONE)?o.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},o.prototype.pow=function(t){return this.exp(t,new k)},o.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},o.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r.data[0]<=x[x.length-1]){for(e=0;e=0;u--)M>>=8,M+=B.at(u)+I.at(u),I.setAt(u,255&M);C.putBuffer(I)}w=C,l.putBuffer(k)}return l.truncate(l.length()-o),l},s.pbe.getCipher=function(t,e,r){switch(t){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(t,e,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(t,e,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=t,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},s.pbe.getCipherForPBES2=function(t,e,r){var i,a={},u=[];if(!o.validate(e,h,a,u))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,i;if((t=o.derToOid(a.kdfOid))!==s.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=t,i.supportedOids=["pkcs5PBKDF2"],i;if((t=o.derToOid(a.encOid))!==s.oids["aes128-CBC"]&&t!==s.oids["aes192-CBC"]&&t!==s.oids["aes256-CBC"]&&t!==s.oids["des-EDE3-CBC"]&&t!==s.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=t,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var c,l,d=a.kdfSalt,p=n.util.createBuffer(a.kdfIterationCount);switch(p=p.getInt(p.length()<<3),s.oids[t]){case"aes128-CBC":c=16,l=n.aes.createDecryptionCipher;break;case"aes192-CBC":c=24,l=n.aes.createDecryptionCipher;break;case"aes256-CBC":c=32,l=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":c=24,l=n.des.createDecryptionCipher;break;case"desCBC":c=8,l=n.des.createDecryptionCipher}var g=f(a.prfOid),y=n.pkcs5.pbkdf2(r,d,p,c,g),m=a.encIv,v=l(y);return v.start(m),v},s.pbe.getCipherForPKCS12PBE=function(t,e,r){var i={},a=[];if(!o.validate(e,c,i,a))throw(g=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=a,g;var u,h,l,d=n.util.createBuffer(i.salt),p=n.util.createBuffer(i.iterations);switch(p=p.getInt(p.length()<<3),t){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,h=8,l=n.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,h=8,l=function(t,e){var r=n.rc2.createDecryptionCipher(t,40);return r.start(e,null),r};break;default:var g;throw(g=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=t,g}var y=f(i.prfOid),m=s.pbe.generatePkcs12Key(r,d,1,p,u,y);return y.start(),l(m,s.pbe.generatePkcs12Key(r,d,2,p,h,y))},s.pbe.opensslDeriveBytes=function(t,e,r,i){if("undefined"===typeof i||null===i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===e&&(e="");for(var o=[l(i,t+e)],s=16,a=1;s4||!a||"sha1"===a))return"string"!==typeof a&&(a="sha1"),t=n.from(t,"binary"),e=n.from(e,"binary"),u?4===o.pbkdf2Sync.length?o.pbkdf2(t,e,r,s,(function(t,e){if(t)return u(t);u(null,e.toString("binary"))})):o.pbkdf2(t,e,r,s,a,(function(t,e){if(t)return u(t);u(null,e.toString("binary"))})):4===o.pbkdf2Sync.length?o.pbkdf2Sync(t,e,r,s).toString("binary"):o.pbkdf2Sync(t,e,r,s,a).toString("binary");if("undefined"!==typeof a&&null!==a||(a="sha1"),"string"===typeof a){if(!(a in i.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=i.md[a].create()}var h=a.digestLength;if(s>4294967295*h){var c=new Error("Derived key is too long.");if(u)return u(c);throw c}var l=Math.ceil(s/h),f=s-(l-1)*h,d=i.hmac.create();d.start(a,t);var p,g,y,m="";if(!u){for(var v=1;v<=l;++v){d.start(null,null),d.update(e),d.update(i.util.int32ToBytes(v)),p=y=d.digest().getBytes();for(var b=2;b<=r;++b)d.start(null,null),d.update(y),g=d.digest().getBytes(),p=i.util.xorBytes(p,g,h),y=g;m+=vl)return u(null,m);d.start(null,null),d.update(e),d.update(i.util.int32ToBytes(v)),p=y=d.digest().getBytes(),b=2,E()}function E(){if(b<=r)return d.start(null,null),d.update(y),g=d.digest().getBytes(),p=i.util.xorBytes(p,g,h),y=g,++b,i.util.setImmediate(E);m+=v65&&-1!==s){var a=e[s];","===a?(++s,e=e.substr(0,s)+"\r\n "+e.substr(s)):e=e.substr(0,s)+"\r\n"+a+e.substr(s+1),o=i-s-1,s=-1,++i}else" "!==e[i]&&"\t"!==e[i]&&","!==e[i]||(s=i);return e}function s(t){return t.replace(/^\s+/,"")}i.encode=function(t,e){e=e||{};var r,i="-----BEGIN "+t.type+"-----\r\n";if(t.procType&&(i+=o(r={name:"Proc-Type",values:[String(t.procType.version),t.procType.type]})),t.contentDomain&&(i+=o(r={name:"Content-Domain",values:[t.contentDomain]})),t.dekInfo&&(r={name:"DEK-Info",values:[t.dekInfo.algorithm]},t.dekInfo.parameters&&r.values.push(t.dekInfo.parameters),i+=o(r)),t.headers)for(var s=0;s>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(t+a),i+=r.digest().getBytes()}return i.substring(0,e)}i.encode_rsa_oaep=function(t,e,r){var i,s,a,u;"string"===typeof r?(i=r,s=arguments[3]||void 0,a=arguments[4]||void 0):r&&(i=r.label||void 0,s=r.seed||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),a?a.start():a=n.md.sha1.create(),u||(u=a);var h=Math.ceil(t.n.bitLength()/8),c=h-2*a.digestLength-2;if(e.length>c)throw(y=new Error("RSAES-OAEP input message length is too long.")).length=e.length,y.maxLength=c,y;i||(i=""),a.update(i,"raw");for(var l=a.digest(),f="",d=c-e.length,p=0;pt&&(s=h(t,e));var d=s.toString(16);i.target.postMessage({hex:d,workLoad:c}),s.dAddOffset(l,0)}}}d()}(t,e,i,o);return a(t,e,i,o)}(t,u,o.options,i);throw new Error("Invalid prime generation algorithm: "+o.name)}}function a(t,e,r,n){var i=h(t,e),o=function(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}(i.bitLength());"millerRabinTests"in r&&(o=r.millerRabinTests);var s=10;"maxBlockTime"in r&&(s=r.maxBlockTime),u(i,t,e,0,o,s,n)}function u(t,e,r,o,s,a,c){var l=+new Date;do{if(t.bitLength()>e&&(t=h(e,r)),t.isProbablePrime(s))return c(null,t);t.dAddOffset(i[o++%8],0)}while(a<0||+new Date-l=32)return u();var t=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(t)),u()}function u(){e.reseeds=4294967295===e.reseeds?0:e.reseeds+1;var t=e.plugin.md.create();t.update(e.keyBytes);for(var r=1,n=0;n<32;++n)e.reseeds%r===0&&(t.update(e.pools[n].digest().getBytes()),e.pools[n].start()),r<<=1;e.keyBytes=t.digest().getBytes(),t.start(),t.update(e.keyBytes);var i=t.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(i),e.generated=0}function h(t){var e=null,r=i.util.globalScope,n=r.crypto||r.msCrypto;n&&n.getRandomValues&&(e=function(t){return n.getRandomValues(t)});var o=i.util.createBuffer();if(e)for(;o.length()>16)))<<16,f=4294967295&(c=(2147483647&(c+=h>>15))+(c>>31));for(u=0;u<3;++u)l=f>>>(u<<3),l^=Math.floor(256*Math.random()),o.putByte(255&l)}return o.getBytes(t)}return e.pools=n,e.pool=0,e.generate=function(t,r){if(!r)return e.generateSync(t);var n=e.plugin.cipher,o=e.plugin.increment,s=e.plugin.formatKey,a=e.plugin.formatSeed,h=i.util.createBuffer();e.key=null,function c(l){if(l)return r(l);if(h.length()>=t)return r(null,h.getBytes(t));e.generated>1048575&&(e.key=null);if(null===e.key)return i.util.nextTick((function(){!function(t){if(e.pools[0].messageLength>=32)return u(),t();var r=32-e.pools[0].messageLength<<5;e.seedFile(r,(function(r,n){if(r)return t(r);e.collect(n),u(),t()}))}(c)}));var f=n(e.key,e.seed);e.generated+=f.length,h.putBytes(f),e.key=s(n(e.key,o(e.seed))),e.seed=a(n(e.key,e.seed)),i.util.setImmediate(c)}()},e.generateSync=function(t){var r=e.plugin.cipher,n=e.plugin.increment,o=e.plugin.formatKey,s=e.plugin.formatSeed;e.key=null;for(var u=i.util.createBuffer();u.length()1048575&&(e.key=null),null===e.key&&a();var h=r(e.key,e.seed);e.generated+=h.length,u.putBytes(h),e.key=o(r(e.key,n(e.seed))),e.seed=s(r(e.key,e.seed))}return u.getBytes(t)},o?(e.seedFile=function(t,e){o.randomBytes(t,(function(t,r){if(t)return e(t);e(null,r.toString())}))},e.seedFileSync=function(t){return o.randomBytes(t).toString()}):(e.seedFile=function(t,e){try{e(null,h(t))}catch(r){e(r)}},e.seedFileSync=h),e.collect=function(t){for(var r=t.length,n=0;n>i&255);e.collect(n)},e.registerWorker=function(t){if(t===self)e.seedFile=function(t,e){self.addEventListener("message",(function t(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",t),e(n.forge.prng.err,n.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:t}}})};else{t.addEventListener("message",(function(r){var n=r.data;n.forge&&n.forge.prng&&e.seedFile(n.forge.prng.needed,(function(e,r){t.postMessage({forge:{prng:{err:e,bytes:r}}})}))}))}},e}},49563:function(t,e,r){var n=r(3832);r(8925),r(41668),r(74933),r(97116),n.random&&n.random.getBytes?t.exports=n.random:function(e){var r={},i=new Array(4),o=n.util.createBuffer();function s(){var t=n.prng.create(r);return t.getBytes=function(e,r){return t.generate(e,r)},t.getBytesSync=function(e){return t.generate(e)},t}r.formatKey=function(t){var e=n.util.createBuffer(t);return(t=new Array(4))[0]=e.getInt32(),t[1]=e.getInt32(),t[2]=e.getInt32(),t[3]=e.getInt32(),n.aes._expandKey(t,!1)},r.formatSeed=function(t){var e=n.util.createBuffer(t);return(t=new Array(4))[0]=e.getInt32(),t[1]=e.getInt32(),t[2]=e.getInt32(),t[3]=e.getInt32(),t},r.cipher=function(t,e){return n.aes._updateBlock(t,e,i,!1),o.putInt32(i[0]),o.putInt32(i[1]),o.putInt32(i[2]),o.putInt32(i[3]),o.getBytes()},r.increment=function(t){return++t[3],t},r.md=n.md.sha256;var a=s(),u=null,h=n.util.globalScope,c=h.crypto||h.msCrypto;if(c&&c.getRandomValues&&(u=function(t){return c.getRandomValues(t)}),n.options.usePureJavaScript||!n.util.isNodejs&&!u){if("undefined"===typeof window||window.document,a.collectInt(+new Date,32),"undefined"!==typeof navigator){var l="";for(var f in navigator)try{"string"==typeof navigator[f]&&(l+=navigator[f])}catch(d){}a.collect(l),l=null}e&&(e().mousemove((function(t){a.collectInt(t.clientX,16),a.collectInt(t.clientY,16)})),e().keypress((function(t){a.collectInt(t.charCode,8)})))}if(n.random)for(var f in a)n.random[f]=a[f];else n.random=a;n.random.createInstance=s,t.exports=n.random}("undefined"!==typeof jQuery?jQuery:null)},69372:function(t,e,r){var n=r(3832);r(97116);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],o=[1,2,3,5],s=function(t,e){return t<>16-e},a=function(t,e){return(65535&t)>>e|t<<16-e&65535};t.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(t,e){"string"===typeof t&&(t=n.util.createBuffer(t)),e=e||128;var r,o=t,s=t.length(),a=e,u=Math.ceil(a/8),h=255>>(7&a);for(r=s;r<128;r++)o.putByte(i[o.at(r-1)+o.at(r-s)&255]);for(o.setAt(128-u,i[o.at(128-u)&h]),r=127-u;r>=0;r--)o.setAt(r,i[o.at(r+1)^o.at(r+u)]);return o};var u=function(t,e,r){var i,u,h,c,l=!1,f=null,d=null,p=null,g=[];for(t=n.rc2.expandKey(t,e),h=0;h<64;h++)g.push(t.getInt16Le());r?(i=function(t){for(h=0;h<4;h++)t[h]+=g[c]+(t[(h+3)%4]&t[(h+2)%4])+(~t[(h+3)%4]&t[(h+1)%4]),t[h]=s(t[h],o[h]),c++},u=function(t){for(h=0;h<4;h++)t[h]+=g[63&t[(h+3)%4]]}):(i=function(t){for(h=3;h>=0;h--)t[h]=a(t[h],o[h]),t[h]-=g[c]+(t[(h+3)%4]&t[(h+2)%4])+(~t[(h+3)%4]&t[(h+1)%4]),c--},u=function(t){for(h=3;h>=0;h--)t[h]-=g[63&t[(h+3)%4]]});var y=function(t){var e=[];for(h=0;h<4;h++){var n=f.getInt16Le();null!==p&&(r?n^=p.getInt16Le():p.putInt16Le(n)),e.push(65535&n)}c=r?0:63;for(var i=0;i=8;)y([[5,i],[1,u],[6,i],[1,u],[5,i]])},finish:function(t){var e=!0;if(r)if(t)e=t(8,f,!r);else{var n=8===f.length()?8:8-f.length();f.fillWithByte(n,n)}if(e&&(l=!0,m.update()),!r&&(e=0===f.length()))if(t)e=t(8,d,!r);else{var i=d.length(),o=d.at(i-1);o>i?e=!1:d.truncate(o)}return e}}};n.rc2.startEncrypting=function(t,e,r){var i=n.rc2.createEncryptionCipher(t,128);return i.start(e,r),i},n.rc2.createEncryptionCipher=function(t,e){return u(t,e,!0)},n.rc2.startDecrypting=function(t,e,r){var i=n.rc2.createDecryptionCipher(t,128);return i.start(e,r),i},n.rc2.createDecryptionCipher=function(t,e){return u(t,e,!1)}},28095:function(t,e,r){var n=r(3832);if(r(3068),r(15764),r(66270),r(18936),r(29654),r(49563),r(97116),"undefined"===typeof i)var i=n.jsbn.BigInteger;var o=n.util.isNodejs?r(25819):null,s=n.asn1,a=n.util;n.pki=n.pki||{},t.exports=n.pki.rsa=n.rsa=n.rsa||{};var u=n.pki,h=[6,4,2,4,2,4,6,2],c={name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},l={name:"RSAPrivateKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},f={name:"RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},d=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},p={name:"DigestInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:s.Class.UNIVERSAL,type:s.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},g=function(t){var e;if(!(t.algorithm in u.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=t.algorithm,r}e=u.oids[t.algorithm];var n=s.oidToDer(e).getBytes(),i=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]),o=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]);o.value.push(s.create(s.Class.UNIVERSAL,s.Type.OID,!1,n)),o.value.push(s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,""));var a=s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,t.digest().getBytes());return i.value.push(o),i.value.push(a),s.toDer(i).getBytes()},y=function(t,e,r){if(r)return t.modPow(e.e,e.n);if(!e.p||!e.q)return t.modPow(e.d,e.n);var o;e.dP||(e.dP=e.d.mod(e.p.subtract(i.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(i.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));do{o=new i(n.util.bytesToHex(n.random.getBytes(e.n.bitLength()/8)),16)}while(o.compareTo(e.n)>=0||!o.gcd(e.n).equals(i.ONE));for(var s=(t=t.multiply(o.modPow(e.e,e.n)).mod(e.n)).mod(e.p).modPow(e.dP,e.p),a=t.mod(e.q).modPow(e.dQ,e.q);s.compareTo(a)<0;)s=s.add(e.p);var u=s.subtract(a).multiply(e.qInv).mod(e.p).multiply(e.q).add(a);return u=u.multiply(o.modInverse(e.n)).mod(e.n)};function m(t,e,r){var i=n.util.createBuffer(),o=Math.ceil(e.n.bitLength()/8);if(t.length>o-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=t.length,s.max=o-11,s}i.putByte(0),i.putByte(r);var a,u=o-3-t.length;if(0===r||1===r){a=0===r?0:255;for(var h=0;h0;){var c=0,l=n.random.getBytes(u);for(h=0;h1;){if(255!==s.getByte()){--s.read;break}++h}else if(2===u)for(h=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++h}if(0!==s.getByte()||h!==o-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function b(t,e,r){"function"===typeof e&&(r=e,e={});var o={algorithm:{name:(e=e||{}).algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};function s(){a(t.pBits,(function(e,n){return e?r(e):(t.p=n,null!==t.q?h(e,t.q):void a(t.qBits,h))}))}function a(t,e){n.prime.generateProbablePrime(t,o,e)}function h(e,n){if(e)return r(e);if(t.q=n,t.p.compareTo(t.q)<0){var o=t.p;t.p=t.q,t.q=o}if(0!==t.p.subtract(i.ONE).gcd(t.e).compareTo(i.ONE))return t.p=null,void s();if(0!==t.q.subtract(i.ONE).gcd(t.e).compareTo(i.ONE))return t.q=null,void a(t.qBits,h);if(t.p1=t.p.subtract(i.ONE),t.q1=t.q.subtract(i.ONE),t.phi=t.p1.multiply(t.q1),0!==t.phi.gcd(t.e).compareTo(i.ONE))return t.p=t.q=null,void s();if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits)return t.q=null,void a(t.qBits,h);var c=t.e.modInverse(t.phi);t.keys={privateKey:u.rsa.setPrivateKey(t.n,t.e,c,t.p,t.q,c.mod(t.p1),c.mod(t.q1),t.q.modInverse(t.p)),publicKey:u.rsa.setPublicKey(t.n,t.e)},r(null,t.keys)}"prng"in e&&(o.prng=e.prng),s()}function w(t){var e=t.toString(16);e[0]>="8"&&(e="00"+e);var r=n.util.hexToBytes(e);return r.length>1&&(0===r.charCodeAt(0)&&0===(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128===(128&r.charCodeAt(1)))?r.substr(1):r}function E(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}function A(t){return n.util.isNodejs&&"function"===typeof o[t]}function k(t){return"undefined"!==typeof a.globalScope&&"object"===typeof a.globalScope.crypto&&"object"===typeof a.globalScope.crypto.subtle&&"function"===typeof a.globalScope.crypto.subtle[t]}function S(t){return"undefined"!==typeof a.globalScope&&"object"===typeof a.globalScope.msCrypto&&"object"===typeof a.globalScope.msCrypto.subtle&&"function"===typeof a.globalScope.msCrypto.subtle[t]}function B(t){for(var e=n.util.hexToBytes(t.toString(16)),r=new Uint8Array(e.length),i=0;i0;)c.putByte(0),--l;return c.putBytes(n.util.hexToBytes(h)),c.getBytes()},u.rsa.decrypt=function(t,e,r,o){var s=Math.ceil(e.n.bitLength()/8);if(t.length!==s){var a=new Error("Encrypted message length is invalid.");throw a.length=t.length,a.expected=s,a}var u=new i(n.util.createBuffer(t).toHex(),16);if(u.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var h=y(u,e,r).toString(16),c=n.util.createBuffer(),l=s-Math.ceil(h.length/2);l>0;)c.putByte(0),--l;return c.putBytes(n.util.hexToBytes(h)),!1!==o?v(c.getBytes(),e,r):c.getBytes()},u.rsa.createKeyPairGenerationState=function(t,e,r){"string"===typeof t&&(t=parseInt(t,10)),t=t||2048;var o,s=(r=r||{}).prng||n.random,a={nextBytes:function(t){for(var e=s.getBytesSync(t.length),r=0;r>1,pBits:t-(t>>1),pqState:0,num:null,keys:null}).e.fromInt(o.eInt),o},u.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,o=0,s=function(t,e){return t|e},a=+new Date,c=0;null===t.keys&&(e<=0||cl?t.pqState=0:t.num.isProbablePrime(E(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(h[o++%8],0):2===t.pqState?t.pqState=0===t.num.subtract(i.ONE).gcd(t.e).compareTo(i.ONE)?3:0:3===t.pqState&&(t.pqState=0,null===t.p?t.p=t.num:t.q=t.num,null!==t.p&&null!==t.q&&++t.state,t.num=null)}else if(1===t.state)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(2===t.state)t.p1=t.p.subtract(i.ONE),t.q1=t.q.subtract(i.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(3===t.state)0===t.phi.gcd(t.e).compareTo(i.ONE)?++t.state:(t.p=null,t.q=null,t.state=0);else if(4===t.state)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(5===t.state){var d=t.e.modInverse(t.phi);t.keys={privateKey:u.rsa.setPrivateKey(t.n,t.e,d,t.p,t.q,d.mod(t.p1),d.mod(t.q1),t.q.modInverse(t.p)),publicKey:u.rsa.setPublicKey(t.n,t.e)}}c+=(n=+new Date)-a,a=n}return null!==t.keys},u.rsa.generateKeyPair=function(t,e,r,i){if(1===arguments.length?"object"===typeof t?(r=t,t=void 0):"function"===typeof t&&(i=t,t=void 0):2===arguments.length?"number"===typeof t?"function"===typeof e?(i=e,e=void 0):"number"!==typeof e&&(r=e,e=void 0):(r=t,i=e,t=void 0,e=void 0):3===arguments.length&&("number"===typeof e?"function"===typeof r&&(i=r,r=void 0):(i=r,r=e,e=void 0)),r=r||{},void 0===t&&(t=r.bits||2048),void 0===e&&(e=r.e||65537),!n.options.usePureJavaScript&&!r.prng&&t>=256&&t<=16384&&(65537===e||3===e))if(i){if(A("generateKeyPair"))return o.generateKeyPair("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(t,e,r){if(t)return i(t);i(null,{privateKey:u.privateKeyFromPem(r),publicKey:u.publicKeyFromPem(e)})}));if(k("generateKey")&&k("exportKey"))return a.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:B(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(t){return a.globalScope.crypto.subtle.exportKey("pkcs8",t.privateKey)})).then(void 0,(function(t){i(t)})).then((function(t){if(t){var e=u.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(t)));i(null,{privateKey:e,publicKey:u.setRsaPublicKey(e.n,e.e)})}}));if(S("generateKey")&&S("exportKey")){var h=a.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:B(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);return h.oncomplete=function(t){var e=t.target.result,r=a.globalScope.msCrypto.subtle.exportKey("pkcs8",e.privateKey);r.oncomplete=function(t){var e=t.target.result,r=u.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(e)));i(null,{privateKey:r,publicKey:u.setRsaPublicKey(r.n,r.e)})},r.onerror=function(t){i(t)}},void(h.onerror=function(t){i(t)})}}else if(A("generateKeyPairSync")){var c=o.generateKeyPairSync("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:u.privateKeyFromPem(c.privateKey),publicKey:u.publicKeyFromPem(c.publicKey)}}var l=u.rsa.createKeyPairGenerationState(t,e,r);if(!i)return u.rsa.stepKeyPairGenerationState(l,0),l.keys;b(l,r,i)},u.setRsaPublicKey=u.rsa.setPublicKey=function(t,e){var r={n:t,e:e,encrypt:function(t,e,i){if("string"===typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===e)e={encode:function(t,e,r){return m(t,e,2).getBytes()}};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={encode:function(t,e){return n.pkcs1.encode_rsa_oaep(e,t,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(e))e={encode:function(t){return t}};else if("string"===typeof e)throw new Error('Unsupported encryption scheme: "'+e+'".');var o=e.encode(t,r,!0);return u.rsa.encrypt(o,r,!0)},verify:function(t,e,i,o){"string"===typeof i?i=i.toUpperCase():void 0===i&&(i="RSASSA-PKCS1-V1_5"),void 0===o&&(o={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in o||(o._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===i?i={verify:function(t,e){e=v(e,r,!0);var i=s.fromDer(e,{parseAllBytes:o._parseAllDigestBytes}),a={},u=[];if(!s.validate(i,p,a,u))throw(h=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=u,h;var h,c=s.derToOid(a.algorithmIdentifier);if(c!==n.oids.md2&&c!==n.oids.md5&&c!==n.oids.sha1&&c!==n.oids.sha224&&c!==n.oids.sha256&&c!==n.oids.sha384&&c!==n.oids.sha512&&c!==n.oids["sha512-224"]&&c!==n.oids["sha512-256"])throw(h=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=c,h;if((c===n.oids.md2||c===n.oids.md5)&&!("parameters"in a))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return t===a.digest}}:"NONE"!==i&&"NULL"!==i&&null!==i||(i={verify:function(t,e){return t===(e=v(e,r,!0))}});var a=u.rsa.decrypt(e,r,!0,!1);return i.verify(t,a,r.n.bitLength())}};return r},u.setRsaPrivateKey=u.rsa.setPrivateKey=function(t,e,r,i,o,s,a,h){var c={n:t,e:e,d:r,p:i,q:o,dP:s,dQ:a,qInv:h,decrypt:function(t,e,r){"string"===typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5");var i=u.rsa.decrypt(t,c,!1,!1);if("RSAES-PKCS1-V1_5"===e)e={decode:v};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={decode:function(t,e){return n.pkcs1.decode_rsa_oaep(e,t,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(e))throw new Error('Unsupported encryption scheme: "'+e+'".');e={decode:function(t){return t}}}return e.decode(i,c,!1)},sign:function(t,e){var r=!1;"string"===typeof e&&(e=e.toUpperCase()),void 0===e||"RSASSA-PKCS1-V1_5"===e?(e={encode:g},r=1):"NONE"!==e&&"NULL"!==e&&null!==e||(e={encode:function(){return t}},r=1);var n=e.encode(t,c.n.bitLength());return u.rsa.encrypt(n,c,r)}};return c},u.wrapRsaPrivateKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(u.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,s.toDer(t).getBytes())])},u.privateKeyFromAsn1=function(t){var e,r,o,a,h,f,d,p,g={},y=[];if(s.validate(t,c,g,y)&&(t=s.fromDer(n.util.createBuffer(g.privateKey))),g={},y=[],!s.validate(t,l,g,y)){var m=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw m.errors=y,m}return e=n.util.createBuffer(g.privateKeyModulus).toHex(),r=n.util.createBuffer(g.privateKeyPublicExponent).toHex(),o=n.util.createBuffer(g.privateKeyPrivateExponent).toHex(),a=n.util.createBuffer(g.privateKeyPrime1).toHex(),h=n.util.createBuffer(g.privateKeyPrime2).toHex(),f=n.util.createBuffer(g.privateKeyExponent1).toHex(),d=n.util.createBuffer(g.privateKeyExponent2).toHex(),p=n.util.createBuffer(g.privateKeyCoefficient).toHex(),u.setRsaPrivateKey(new i(e,16),new i(r,16),new i(o,16),new i(a,16),new i(h,16),new i(f,16),new i(d,16),new i(p,16))},u.privateKeyToAsn1=u.privateKeyToRSAPrivateKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.e)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.d)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.p)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.q)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.dP)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.dQ)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.qInv))])},u.publicKeyFromAsn1=function(t){var e={},r=[];if(s.validate(t,d,e,r)){var o,a=s.derToOid(e.publicKeyOid);if(a!==u.oids.rsaEncryption)throw(o=new Error("Cannot read public key. Unknown OID.")).oid=a,o;t=e.rsaPublicKey}if(r=[],!s.validate(t,f,e,r))throw(o=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,o;var h=n.util.createBuffer(e.publicKeyModulus).toHex(),c=n.util.createBuffer(e.publicKeyExponent).toHex();return u.setRsaPublicKey(new i(h,16),new i(c,16))},u.publicKeyToAsn1=u.publicKeyToSubjectPublicKeyInfo=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(u.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.BITSTRING,!1,[u.publicKeyToRSAPublicKey(t)])])},u.publicKeyToRSAPublicKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.e))])}},137:function(t,e,r){var n=r(3832);r(28991),r(97116);var i=t.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),s=!0);var t=null,e=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,u>>>0];for(var h=i.fullMessageLength.length-1;h>=0;--h)i.fullMessageLength[h]+=u[1],u[1]=u[0]+(i.fullMessageLength[h]/4294967296>>>0),i.fullMessageLength[h]=i.fullMessageLength[h]>>>0,u[0]=u[1]/4294967296>>>0;return e.putBytes(o),a(t,r,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(e.bytes());var u,h=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-h));for(var c=8*i.fullMessageLength[0],l=0;l>>0,s.putInt32(c>>>0),c=u>>>0;s.putInt32(c);var f={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};a(f,r,s);var d=n.util.createBuffer();return d.putInt32(f.h0),d.putInt32(f.h1),d.putInt32(f.h2),d.putInt32(f.h3),d.putInt32(f.h4),d},i};var o=null,s=!1;function a(t,e,r){for(var n,i,o,s,a,u,h,c=r.length();c>=64;){for(i=t.h0,o=t.h1,s=t.h2,a=t.h3,u=t.h4,h=0;h<16;++h)n=r.getInt32(),e[h]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+u+1518500249+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;h<20;++h)n=(n=e[h-3]^e[h-8]^e[h-14]^e[h-16])<<1|n>>>31,e[h]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+u+1518500249+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;h<32;++h)n=(n=e[h-3]^e[h-8]^e[h-14]^e[h-16])<<1|n>>>31,e[h]=n,n=(i<<5|i>>>27)+(o^s^a)+u+1859775393+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;h<40;++h)n=(n=e[h-6]^e[h-16]^e[h-28]^e[h-32])<<2|n>>>30,e[h]=n,n=(i<<5|i>>>27)+(o^s^a)+u+1859775393+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;h<60;++h)n=(n=e[h-6]^e[h-16]^e[h-28]^e[h-32])<<2|n>>>30,e[h]=n,n=(i<<5|i>>>27)+(o&s|a&(o^s))+u+2400959708+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;h<80;++h)n=(n=e[h-6]^e[h-16]^e[h-28]^e[h-32])<<2|n>>>30,e[h]=n,n=(i<<5|i>>>27)+(o^s^a)+u+3395469782+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;t.h0=t.h0+i|0,t.h1=t.h1+o|0,t.h2=t.h2+s|0,t.h3=t.h3+a|0,t.h4=t.h4+u|0,c-=64}}},41668:function(t,e,r){var n=r(3832);r(28991),r(97116);var i=t.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=i,i.create=function(){s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),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=!0);var t=null,e=n.util.createBuffer(),r=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,a>>>0];for(var h=i.fullMessageLength.length-1;h>=0;--h)i.fullMessageLength[h]+=a[1],a[1]=a[0]+(i.fullMessageLength[h]/4294967296>>>0),i.fullMessageLength[h]=i.fullMessageLength[h]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(o),u(t,r,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(e.bytes());var a,h=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-h));for(var c=8*i.fullMessageLength[0],l=0;l>>0,s.putInt32(c>>>0),c=a>>>0;s.putInt32(c);var f={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};u(f,r,s);var d=n.util.createBuffer();return d.putInt32(f.h0),d.putInt32(f.h1),d.putInt32(f.h2),d.putInt32(f.h3),d.putInt32(f.h4),d.putInt32(f.h5),d.putInt32(f.h6),d.putInt32(f.h7),d},i};var o=null,s=!1,a=null;function u(t,e,r){for(var n,i,o,s,u,h,c,l,f,d,p,g,y,m=r.length();m>=64;){for(u=0;u<16;++u)e[u]=r.getInt32();for(;u<64;++u)n=((n=e[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=e[u-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,e[u]=n+e[u-7]+i+e[u-16]|0;for(h=t.h0,c=t.h1,l=t.h2,f=t.h3,d=t.h4,p=t.h5,g=t.h6,y=t.h7,u=0;u<64;++u)o=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),s=h&c|l&(h^c),n=y+((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(g^d&(p^g))+a[u]+e[u],y=g,g=p,p=d,d=f+n>>>0,f=l,l=c,c=h,h=n+(i=o+s)>>>0;t.h0=t.h0+h|0,t.h1=t.h1+c|0,t.h2=t.h2+l|0,t.h3=t.h3+f|0,t.h4=t.h4+d|0,t.h5=t.h5+p|0,t.h6=t.h6+g|0,t.h7=t.h7+y|0,m-=64}}},63219:function(t,e,r){var n=r(3832);r(28991),r(97116);var i=t.exports=n.sha512=n.sha512||{};n.md.sha512=n.md.algorithms.sha512=i;var o=n.sha384=n.sha512.sha384=n.sha512.sha384||{};o.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=o,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(t){if(a||(s=String.fromCharCode(128),s+=n.util.fillString(String.fromCharCode(0),128),u=[[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]],(h={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],h["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],h["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],h["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],a=!0),"undefined"===typeof t&&(t="SHA-512"),!(t in h))throw new Error("Invalid SHA-512 algorithm: "+t);for(var e=h[t],r=null,i=n.util.createBuffer(),o=new Array(80),l=0;l<80;++l)o[l]=new Array(2);var f=64;switch(t){case"SHA-384":f=48;break;case"SHA-512/256":f=32;break;case"SHA-512/224":f=28}var d={algorithm:t.replace("-","").toLowerCase(),blockLength:128,digestLength:f,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){d.messageLength=0,d.fullMessageLength=d.messageLength128=[];for(var t=d.messageLengthSize/4,o=0;o>>0,s>>>0];for(var a=d.fullMessageLength.length-1;a>=0;--a)d.fullMessageLength[a]+=s[1],s[1]=s[0]+(d.fullMessageLength[a]/4294967296>>>0),d.fullMessageLength[a]=d.fullMessageLength[a]>>>0,s[0]=s[1]/4294967296>>>0;return i.putBytes(t),c(r,o,i),(i.read>2048||0===i.length())&&i.compact(),d},d.digest=function(){var e=n.util.createBuffer();e.putBytes(i.bytes());var a,u=d.fullMessageLength[d.fullMessageLength.length-1]+d.messageLengthSize&d.blockLength-1;e.putBytes(s.substr(0,d.blockLength-u));for(var h=8*d.fullMessageLength[0],l=0;l>>0,e.putInt32(h>>>0),h=a>>>0;e.putInt32(h);var f=new Array(r.length);for(l=0;l=128;){for(T=0;T<16;++T)e[T][0]=r.getInt32()>>>0,e[T][1]=r.getInt32()>>>0;for(;T<80;++T)n=(((O=(_=e[T-2])[0])>>>19|(R=_[1])<<13)^(R>>>29|O<<3)^O>>>6)>>>0,i=((O<<13|R>>>19)^(R<<3|O>>>29)^(O<<26|R>>>6))>>>0,o=(((O=(N=e[T-15])[0])>>>1|(R=N[1])<<31)^(O>>>8|R<<24)^O>>>7)>>>0,s=((O<<31|R>>>1)^(O<<24|R>>>8)^(O<<25|R>>>7))>>>0,P=e[T-7],U=e[T-16],R=i+P[1]+s+U[1],e[T][0]=n+P[0]+o+U[0]+(R/4294967296>>>0)>>>0,e[T][1]=R>>>0;for(p=t[0][0],g=t[0][1],y=t[1][0],m=t[1][1],v=t[2][0],b=t[2][1],w=t[3][0],E=t[3][1],A=t[4][0],k=t[4][1],S=t[5][0],B=t[5][1],x=t[6][0],C=t[6][1],I=t[7][0],M=t[7][1],T=0;T<80;++T)c=((A>>>14|k<<18)^(A>>>18|k<<14)^(k>>>9|A<<23))>>>0,l=(x^A&(S^x))>>>0,a=((p>>>28|g<<4)^(g>>>2|p<<30)^(g>>>7|p<<25))>>>0,h=((p<<4|g>>>28)^(g<<30|p>>>2)^(g<<25|p>>>7))>>>0,f=(p&y|v&(p^y))>>>0,d=(g&m|b&(g^m))>>>0,R=M+(((A<<18|k>>>14)^(A<<14|k>>>18)^(k<<23|A>>>9))>>>0)+((C^k&(B^C))>>>0)+u[T][1]+e[T][1],n=I+c+l+u[T][0]+e[T][0]+(R/4294967296>>>0)>>>0,i=R>>>0,o=a+f+((R=h+d)/4294967296>>>0)>>>0,s=R>>>0,I=x,M=C,x=S,C=B,S=A,B=k,A=w+n+((R=E+i)/4294967296>>>0)>>>0,k=R>>>0,w=v,E=b,v=y,b=m,y=p,m=g,p=n+o+((R=i+s)/4294967296>>>0)>>>0,g=R>>>0;R=t[0][1]+g,t[0][0]=t[0][0]+p+(R/4294967296>>>0)>>>0,t[0][1]=R>>>0,R=t[1][1]+m,t[1][0]=t[1][0]+y+(R/4294967296>>>0)>>>0,t[1][1]=R>>>0,R=t[2][1]+b,t[2][0]=t[2][0]+v+(R/4294967296>>>0)>>>0,t[2][1]=R>>>0,R=t[3][1]+E,t[3][0]=t[3][0]+w+(R/4294967296>>>0)>>>0,t[3][1]=R>>>0,R=t[4][1]+k,t[4][0]=t[4][0]+A+(R/4294967296>>>0)>>>0,t[4][1]=R>>>0,R=t[5][1]+B,t[5][0]=t[5][0]+S+(R/4294967296>>>0)>>>0,t[5][1]=R>>>0,R=t[6][1]+C,t[6][0]=t[6][0]+x+(R/4294967296>>>0)>>>0,t[6][1]=R>>>0,R=t[7][1]+M,t[7][0]=t[7][0]+I+(R/4294967296>>>0)>>>0,t[7][1]=R>>>0,L-=128}}},97116:function(t,e,r){var n=r(24112),i=r(62678).Buffer,o=r(3832),s=r(78807),a=t.exports=o.util=o.util||{};function u(t){if(8!==t&&16!==t&&24!==t&&32!==t)throw new Error("Only 8, 16, 24, or 32 bits supported: "+t)}function h(t){if(this.data="",this.read=0,"string"===typeof t)this.data=t;else if(a.isArrayBuffer(t)||a.isArrayBufferView(t))if("undefined"!==typeof i&&t instanceof i)this.data=t.toString("binary");else{var e=new Uint8Array(t);try{this.data=String.fromCharCode.apply(null,e)}catch(n){for(var r=0;r15?(r=Date.now(),s(t)):(e.push(t),1===e.length&&o.setAttribute("a",i=!i))}}a.nextTick=a.setImmediate}(),a.isNodejs="undefined"!==typeof n&&n.versions&&n.versions.node,a.globalScope=a.isNodejs?r.g:"undefined"===typeof self?window:self,a.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},a.isArrayBuffer=function(t){return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer},a.isArrayBufferView=function(t){return t&&a.isArrayBuffer(t.buffer)&&void 0!==t.byteLength},a.ByteBuffer=h,a.ByteStringBuffer=h;a.ByteStringBuffer.prototype._optimizeConstructedString=function(t){this._constructedStringLength+=t,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},a.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},a.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},a.ByteStringBuffer.prototype.putByte=function(t){return this.putBytes(String.fromCharCode(t))},a.ByteStringBuffer.prototype.fillWithByte=function(t,e){t=String.fromCharCode(t);for(var r=this.data;e>0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return this.data=r,this._optimizeConstructedString(e),this},a.ByteStringBuffer.prototype.putBytes=function(t){return this.data+=t,this._optimizeConstructedString(t.length),this},a.ByteStringBuffer.prototype.putString=function(t){return this.putBytes(a.encodeUtf8(t))},a.ByteStringBuffer.prototype.putInt16=function(t){return this.putBytes(String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},a.ByteStringBuffer.prototype.putInt24=function(t){return this.putBytes(String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},a.ByteStringBuffer.prototype.putInt32=function(t){return this.putBytes(String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},a.ByteStringBuffer.prototype.putInt16Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255))},a.ByteStringBuffer.prototype.putInt24Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255))},a.ByteStringBuffer.prototype.putInt32Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>24&255))},a.ByteStringBuffer.prototype.putInt=function(t,e){u(e);var r="";do{e-=8,r+=String.fromCharCode(t>>e&255)}while(e>0);return this.putBytes(r)},a.ByteStringBuffer.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<0);return e},a.ByteStringBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e},a.ByteStringBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},a.ByteStringBuffer.prototype.bytes=function(t){return"undefined"===typeof t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},a.ByteStringBuffer.prototype.at=function(t){return this.data.charCodeAt(this.read+t)},a.ByteStringBuffer.prototype.setAt=function(t,e){return this.data=this.data.substr(0,this.read+t)+String.fromCharCode(e)+this.data.substr(this.read+t+1),this},a.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},a.ByteStringBuffer.prototype.copy=function(){var t=a.createBuffer(this.data);return t.read=this.read,t},a.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},a.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},a.ByteStringBuffer.prototype.truncate=function(t){var e=Math.max(0,this.length()-t);return this.data=this.data.substr(this.read,e),this.read=0,this},a.ByteStringBuffer.prototype.toHex=function(){for(var t="",e=this.read;e=t)return this;e=Math.max(e||this.growSize,t);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+e);return n.set(r),this.data=new DataView(n.buffer),this},a.DataBuffer.prototype.putByte=function(t){return this.accommodate(1),this.data.setUint8(this.write++,t),this},a.DataBuffer.prototype.fillWithByte=function(t,e){this.accommodate(e);for(var r=0;r>8&65535),this.data.setInt8(this.write,t>>16&255),this.write+=3,this},a.DataBuffer.prototype.putInt32=function(t){return this.accommodate(4),this.data.setInt32(this.write,t),this.write+=4,this},a.DataBuffer.prototype.putInt16Le=function(t){return this.accommodate(2),this.data.setInt16(this.write,t,!0),this.write+=2,this},a.DataBuffer.prototype.putInt24Le=function(t){return this.accommodate(3),this.data.setInt8(this.write,t>>16&255),this.data.setInt16(this.write,t>>8&65535,!0),this.write+=3,this},a.DataBuffer.prototype.putInt32Le=function(t){return this.accommodate(4),this.data.setInt32(this.write,t,!0),this.write+=4,this},a.DataBuffer.prototype.putInt=function(t,e){u(e),this.accommodate(e/8);do{e-=8,this.data.setInt8(this.write++,t>>e&255)}while(e>0);return this},a.DataBuffer.prototype.putSignedInt=function(t,e){return u(e),this.accommodate(e/8),t<0&&(t+=2<0);return e},a.DataBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e},a.DataBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},a.DataBuffer.prototype.bytes=function(t){return"undefined"===typeof t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},a.DataBuffer.prototype.at=function(t){return this.data.getUint8(this.read+t)},a.DataBuffer.prototype.setAt=function(t,e){return this.data.setUint8(t,e),this},a.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},a.DataBuffer.prototype.copy=function(){return new a.DataBuffer(this)},a.DataBuffer.prototype.compact=function(){if(this.read>0){var t=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(t.byteLength);e.set(t),this.data=new DataView(e),this.write-=this.read,this.read=0}return this},a.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},a.DataBuffer.prototype.truncate=function(t){return this.write=Math.max(0,this.length()-t),this.read=Math.min(this.read,this.write),this},a.DataBuffer.prototype.toHex=function(){for(var t="",e=this.read;e0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return r},a.xorBytes=function(t,e,r){for(var n="",i="",o="",s=0,a=0;r>0;--r,++s)i=t.charCodeAt(s)^e.charCodeAt(s),a>=10&&(n+=o,o="",a=0),o+=String.fromCharCode(i),++a;return n+=o},a.hexToBytes=function(t){var e="",r=0;for(!0&t.length&&(r=1,e+=String.fromCharCode(parseInt(t[0],16)));r>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t)};var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],f="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";a.encode64=function(t,e){for(var r,n,i,o="",s="",a=0;a>2),o+=c.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=c.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":c.charAt(63&i)),e&&o.length>e&&(s+=o.substr(0,e)+"\r\n",o=o.substr(e));return s+=o},a.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e,r,n,i,o="",s=0;s>4),64!==n&&(o+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(o+=String.fromCharCode((3&n)<<6|i)));return o},a.encodeUtf8=function(t){return unescape(encodeURIComponent(t))},a.decodeUtf8=function(t){return decodeURIComponent(escape(t))},a.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:s.encode,decode:s.decode}},a.binary.raw.encode=function(t){return String.fromCharCode.apply(null,t)},a.binary.raw.decode=function(t,e,r){var n=e;n||(n=new Uint8Array(t.length));for(var i=r=r||0,o=0;o>2),o+=c.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=c.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":c.charAt(63&i)),e&&o.length>e&&(s+=o.substr(0,e)+"\r\n",o=o.substr(e));return s+=o},a.binary.base64.decode=function(t,e,r){var n,i,o,s,a=e;a||(a=new Uint8Array(3*Math.ceil(t.length/4))),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var u=0,h=r=r||0;u>4,64!==o&&(a[h++]=(15&i)<<4|o>>2,64!==s&&(a[h++]=(3&o)<<6|s));return e?h-r:a.subarray(0,h)},a.binary.base58.encode=function(t,e){return a.binary.baseN.encode(t,f,e)},a.binary.base58.decode=function(t,e){return a.binary.baseN.decode(t,f,e)},a.text={utf8:{},utf16:{}},a.text.utf8.encode=function(t,e,r){t=a.encodeUtf8(t);var n=e;n||(n=new Uint8Array(t.length));for(var i=r=r||0,o=0;o0&&o.push(r),s=n.lastIndex;var a=e[0][1];switch(a){case"s":case"o":i");break;case"%":o.push("%");break;default:o.push("<%"+a+"?>")}}return o.push(t.substring(s)),o.join("")},a.formatNumber=function(t,e,r,n){var i=t,o=isNaN(e=Math.abs(e))?2:e,s=void 0===r?",":r,a=void 0===n?".":n,u=i<0?"-":"",h=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",c=h.length>3?h.length%3:0;return u+(c?h.substr(0,c)+a:"")+h.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+a)+(o?s+Math.abs(i-h).toFixed(o).slice(2):"")},a.formatSize=function(t){return t=t>=1073741824?a.formatNumber(t/1073741824,2,".","")+" GiB":t>=1048576?a.formatNumber(t/1048576,2,".","")+" MiB":t>=1024?a.formatNumber(t/1024,0)+" KiB":a.formatNumber(t,0)+" bytes"},a.bytesFromIP=function(t){return-1!==t.indexOf(".")?a.bytesFromIPv4(t):-1!==t.indexOf(":")?a.bytesFromIPv6(t):null},a.bytesFromIPv4=function(t){if(4!==(t=t.split(".")).length)return null;for(var e=a.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1)):r.push({start:u,end:u})}e.push(o)}if(r.length>0){var h=r[n];h.end-h.start>0&&(e.splice(h.start,h.end-h.start+1,""),0===h.start&&e.unshift(""),7===h.end&&e.push(""))}return e.join(":")},a.estimateCores=function(t,e){if("function"===typeof t&&(e=t,t={}),t=t||{},"cores"in a&&!t.update)return e(null,a.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return a.cores=navigator.hardwareConcurrency,e(null,a.cores);if("undefined"===typeof Worker)return a.cores=1,e(null,a.cores);if("undefined"===typeof Blob)return a.cores=2,e(null,a.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(t){for(var e=Date.now(),r=e+4;Date.now()a.st&&i.sti.st&&a.stt.or(b[e])),h.decoder);const E=d(class{constructor(t,e,r){if(!(t instanceof Uint8Array))throw new Error("invalid id provided");if(e&&r&&!g(e.public.bytes,r.bytes))throw new Error("inconsistent arguments");this._id=t,this._idB58String=u.encode(this.id).substring(1),this._privKey=e,this._pubKey=r}get id(){return this._id}set id(t){throw new Error("Id is immutable")}get privKey(){return this._privKey}set privKey(t){this._privKey=t}get pubKey(){if(this._pubKey)return this._pubKey;if(this._privKey)return this._privKey.public;try{const t=l.decode(this.id);t.code===v.code&&(this._pubKey=f.unmarshalPublicKey(t.digest))}catch(t){}return this._pubKey}set pubKey(t){this._pubKey=t}marshalPubKey(){if(this.pubKey)return f.marshalPublicKey(this.pubKey)}marshalPrivKey(){if(this.privKey)return f.marshalPrivateKey(this.privKey)}marshal(t){return p.encode({id:this.toBytes(),pubKey:this.marshalPubKey(),privKey:t?null:this.marshalPrivKey()}).finish()}toPrint(){let t=this.toB58String();t.startsWith("Qm")&&(t=t.slice(2));let e=6;return t.length"}toJSON(){return{id:this.toB58String(),privKey:B(this.marshalPrivKey()),pubKey:B(this.marshalPubKey())}}toHexString(){return c.encode(this.id).substring(1)}toBytes(){return this.id}toB58String(){return this._idB58String}toString(){if(!this._idCIDString){const t=n.createV1(114,l.decode(this.id));Object.defineProperty(this,"_idCIDString",{value:t.toString(),enumerable:!1})}return this._idCIDString}equals(t){if(t instanceof Uint8Array)return g(this.id,t);if(t.id)return g(this.id,t.id);throw new Error("not valid Id")}isEqual(t){return this.equals(t)}isValid(){return Boolean(this.privKey&&this.privKey.public&&this.privKey.public.bytes&&this.pubKey.bytes instanceof Uint8Array&&g(this.privKey.public.bytes,this.pubKey.bytes))}hasInlinePublicKey(){try{if(l.decode(this.id).code===v.code)return!0}catch(t){}return!1}},{className:"PeerId",symbolName:"@libp2p/js-peer-id/PeerId"});e=t.exports=E;const A=t=>t.bytes.length<=42?l.create(v.code,t.bytes).bytes:t.hash(),k=async(t,e)=>{const r=await A(e);return new E(r,t,e)};e.create=async t=>{(t=t||{}).bits=t.bits||2048,t.keyType=t.keyType||"RSA";const e=await f.generateKeyPair(t.keyType,t.bits);return k(e,e.public)},e.createFromHexString=t=>new E(c.decode("f"+t)),e.createFromBytes=t=>{try{const r=n.decode(t);if(!S(r))throw new Error("Supplied PeerID CID is invalid");return e.createFromCID(r)}catch{if(l.decode(t).code!==v.code)throw new Error("Supplied PeerID CID is invalid");return new E(t)}},e.createFromB58String=t=>e.createFromBytes(u.decode("z"+t));const S=t=>114===t.code||112===t.code;function B(t){if(t)return m(t,"base64pad")}e.createFromCID=t=>{if(!(t=n.asCID(t))||!S(t))throw new Error("Supplied PeerID CID is invalid");return new E(t.multihash.bytes)},e.createFromPubKey=async t=>{let e=t;if("string"===typeof e&&(e=y(t,"base64pad")),!(e instanceof Uint8Array))throw new Error("Supplied key is neither a base64 string nor a Uint8Array");const r=await f.unmarshalPublicKey(e);return k(void 0,r)},e.createFromPrivKey=async t=>{if("string"===typeof t&&(t=y(t,"base64pad")),!(t instanceof Uint8Array))throw new Error("Supplied key is neither a base64 string nor a Uint8Array");const e=await f.unmarshalPrivateKey(t);return k(e,e.public)},e.createFromJSON=async t=>{const e=u.decode("z"+t.id),r=t.privKey&&y(t.privKey,"base64pad"),n=t.pubKey&&y(t.pubKey,"base64pad"),i=n&&await f.unmarshalPublicKey(n);if(!r)return new E(e,void 0,i);const o=await f.unmarshalPrivateKey(r),s=await A(o.public);let a;if(i&&(a=await A(i)),i&&!g(s,a))throw new Error("Public and private key do not match");if(e&&!g(s,e))throw new Error("Id and private key do not match");return new E(e,o,i)},e.createFromProtobuf=async t=>{"string"===typeof t&&(t=y(t,"base16"));let e,r,{id:n,privKey:i,pubKey:o}=p.decode(t);if(i=!!i&&await f.unmarshalPrivateKey(i),o=!!o&&await f.unmarshalPublicKey(o),i&&(r=await A(i.public)),o&&(e=await A(o)),i){if(o&&!g(r,e))throw new Error("Public and private key do not match");return new E(r,i,i.public)}if(o)return new E(e,void 0,o);if(n)return new E(n);throw new Error("Protobuf did not contain any usable key material")},e.parse=t=>("1"!==t.charAt(0)&&"Q"!==t.charAt(0)||(t=`z${t}`),e.createFromBytes(w.decode(t))),e.isPeerId=t=>Boolean("object"===typeof t&&t._id&&t._idB58String)},28780:function(t,e,r){"use strict";var n=r(62100),i=n.Reader,o=n.Writer,s=n.util,a=n.roots["libp2p-peer-id"]||(n.roots["libp2p-peer-id"]={});a.PeerIdProto=function(){function t(t){if(t)for(var e=Object.keys(t),r=0;r>>3){case 1:n.id=t.bytes();break;case 2:n.pubKey=t.bytes();break;case 3:n.privKey=t.bytes();break;default:t.skipType(7&o)}}if(!n.hasOwnProperty("id"))throw s.ProtocolError("missing required 'id'",{instance:n});return n},t.fromObject=function(t){if(t instanceof a.PeerIdProto)return t;var e=new a.PeerIdProto;return null!=t.id&&("string"===typeof t.id?s.base64.decode(t.id,e.id=s.newBuffer(s.base64.length(t.id)),0):t.id.length&&(e.id=t.id)),null!=t.pubKey&&("string"===typeof t.pubKey?s.base64.decode(t.pubKey,e.pubKey=s.newBuffer(s.base64.length(t.pubKey)),0):t.pubKey.length&&(e.pubKey=t.pubKey)),null!=t.privKey&&("string"===typeof t.privKey?s.base64.decode(t.privKey,e.privKey=s.newBuffer(s.base64.length(t.privKey)),0):t.privKey.length&&(e.privKey=t.privKey)),e},t.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(e.bytes===String?r.id="":(r.id=[],e.bytes!==Array&&(r.id=s.newBuffer(r.id))),e.bytes===String?r.pubKey="":(r.pubKey=[],e.bytes!==Array&&(r.pubKey=s.newBuffer(r.pubKey))),e.bytes===String?r.privKey="":(r.privKey=[],e.bytes!==Array&&(r.privKey=s.newBuffer(r.privKey)))),null!=t.id&&t.hasOwnProperty("id")&&(r.id=e.bytes===String?s.base64.encode(t.id,0,t.id.length):e.bytes===Array?Array.prototype.slice.call(t.id):t.id),null!=t.pubKey&&t.hasOwnProperty("pubKey")&&(r.pubKey=e.bytes===String?s.base64.encode(t.pubKey,0,t.pubKey.length):e.bytes===Array?Array.prototype.slice.call(t.pubKey):t.pubKey),null!=t.privKey&&t.hasOwnProperty("privKey")&&(r.privKey=e.bytes===String?s.base64.encode(t.privKey,0,t.privKey.length):e.bytes===Array?Array.prototype.slice.call(t.privKey):t.privKey),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},t}(),t.exports=a},62100:function(t,e,r){"use strict";t.exports=r(89482)},89482:function(t,e,r){"use strict";var n=e;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(41173),n.BufferWriter=r(43155),n.Reader=r(51408),n.BufferReader=r(50593),n.util=r(99693),n.rpc=r(35994),n.roots=r(85054),n.configure=i,i()},51408:function(t,e,r){"use strict";t.exports=u;var n,i=r(99693),o=i.LongBits,s=i.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function u(t){this.buf=t,this.pos=0,this.len=t.length}var h="undefined"!==typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new u(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new u(t);throw Error("illegal buffer")},c=function(){return i.Buffer?function(t){return(u.create=function(t){return i.Buffer.isBuffer(t)?new n(t):h(t)})(t)}:h};function l(){var t=new o(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function f(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw a(this,8);return new o(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}u.create=c(),u.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,u.prototype.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return t}}(),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},u.prototype.bool=function(){return 0!==this.uint32()},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},u.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},u.prototype.bytes=function(){var t=this.uint32(),e=this.pos,r=this.pos+t;if(r>this.len)throw a(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,r):e===r?new this.buf.constructor(0):this._slice.call(this.buf,e,r)},u.prototype.string=function(){var t=this.bytes();return s.read(t,0,t.length)},u.prototype.skip=function(t){if("number"===typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},u.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},u._configure=function(t){n=t,u.create=c(),n._configure();var e=i.Long?"toLong":"toNumber";i.merge(u.prototype,{int64:function(){return l.call(this)[e](!1)},uint64:function(){return l.call(this)[e](!0)},sint64:function(){return l.call(this).zzDecode()[e](!1)},fixed64:function(){return d.call(this)[e](!0)},sfixed64:function(){return d.call(this)[e](!1)}})}},50593:function(t,e,r){"use strict";t.exports=o;var n=r(51408);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(99693);function o(t){n.call(this,t)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},o._configure()},85054:function(t){"use strict";t.exports={}},35994:function(t,e,r){"use strict";e.Service=r(77948)},77948:function(t,e,r){"use strict";t.exports=i;var n=r(99693);function i(t,e,r){if("function"!==typeof t)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(r)}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function t(e,r,i,o,s){if(!o)throw TypeError("request must be specified");var a=this;if(!s)return n.asPromise(t,a,e,r,i,o);if(a.rpcImpl)try{return a.rpcImpl(e,r[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(t,r){if(t)return a.emit("error",t,e),s(t);if(null!==r){if(!(r instanceof i))try{r=i[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(t){return a.emit("error",t,e),s(t)}return a.emit("data",r,e),s(null,r)}a.end(!0)}))}catch(u){return a.emit("error",u,e),void setTimeout((function(){s(u)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},i.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},1945:function(t,e,r){"use strict";t.exports=i;var n=r(99693);function i(t,e){this.lo=t>>>0,this.hi=e>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var r=t>>>0,n=(t-r)/4294967296>>>0;return e&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(t){if("number"===typeof t)return i.fromNumber(t);if(n.isString(t)){if(!n.Long)return i.fromNumber(parseInt(t,10));t=n.Long.fromString(t)}return t.low||t.high?new i(t.low>>>0,t.high>>>0):o},i.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,r=~this.hi>>>0;return e||(r=r+1>>>0),-(e+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(t){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;i.fromHash=function(t){return t===s?o:new i((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},i.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},i.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}},99693:function(t,e,r){"use strict";var n=e;function i(t,e,r){for(var n=Object.keys(e),i=0;i0)},n.Buffer=function(){try{var t=n.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(t){return"number"===typeof t?n.Buffer?n._Buffer_allocUnsafe(t):new n.Array(t):n.Buffer?n._Buffer_from(t):"undefined"===typeof Uint8Array?t:new Uint8Array(t)},n.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(t){return t?n.LongBits.from(t).toHash():n.LongBits.zeroHash},n.longFromHash=function(t,e){var r=n.LongBits.fromHash(t);return n.Long?n.Long.fromBits(r.lo,r.hi,e):r.toNumber(Boolean(e))},n.merge=i,n.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(t){for(var e={},r=0;r-1;--r)if(1===e[t[r]]&&void 0!==this[t[r]]&&null!==this[t[r]])return t[r]}},n.oneOfSetter=function(t){return function(e){for(var r=0;r>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=127&t.lo|128,t.lo=t.lo>>>7;e[r++]=t.lo}function y(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}l.create=f(),l.alloc=function(t){return new i.Array(t)},i.Array!==Array&&(l.alloc=i.pool(l.alloc,i.Array.prototype.subarray)),l.prototype._push=function(t,e,r){return this.tail=this.tail.next=new u(t,e,r),this.len+=e,this},p.prototype=Object.create(u.prototype),p.prototype.fn=function(t,e,r){for(;t>127;)e[r++]=127&t|128,t>>>=7;e[r]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new p((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this._push(g,10,o.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var e=o.from(t);return this._push(g,e.length(),e)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var e=o.from(t).zzEncode();return this._push(g,e.length(),e)},l.prototype.bool=function(t){return this._push(d,1,t?1:0)},l.prototype.fixed32=function(t){return this._push(y,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var e=o.from(t);return this._push(y,4,e.lo)._push(y,4,e.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this._push(i.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this._push(i.float.writeDoubleLE,8,t)};var m=i.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var n=0;n>>0;if(!e)return this._push(d,1,0);if(i.isString(t)){var r=l.alloc(e=s.length(t));s.decode(t,r,0),t=r}return this.uint32(e)._push(m,e,t)},l.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(d,1,0)},l.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new u(h,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(h,0,0),this.len=0),this},l.prototype.ldelim=function(){var t=this.head,e=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=e,this.len+=r),this},l.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,e,r),r+=t.len,t=t.next;return e},l._configure=function(t){n=t,l.create=f(),n._configure()}},43155:function(t,e,r){"use strict";t.exports=o;var n=r(41173);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(99693);function o(){n.call(this)}function s(t,e,r){t.length<40?i.utf8.write(t,e,r):e.utf8Write?e.utf8Write(t,r):e.write(t,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){if(t.copy)t.copy(e,r,0,t.length);else for(var n=0;n>>0;return this.uint32(e),e&&this._push(o.writeBytesBuffer,e,t),this},o.prototype.string=function(t){var e=i.Buffer.byteLength(t);return this.uint32(e),e&&this._push(s,e,t),this},o._configure()},69921:function(t,e){"use strict";var r,n=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),h=Symbol.for("react.context"),c=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen");function m(t){if("object"===typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case o:case a:case s:case f:case d:return t;default:switch(t=t&&t.$$typeof){case c:case h:case l:case g:case p:case u:return t;default:return e}}case i:return e}}}r=Symbol.for("react.module.reference"),e.isValidElementType=function(t){return"string"===typeof t||"function"===typeof t||t===o||t===a||t===s||t===f||t===d||t===y||"object"===typeof t&&null!==t&&(t.$$typeof===g||t.$$typeof===p||t.$$typeof===u||t.$$typeof===h||t.$$typeof===l||t.$$typeof===r||void 0!==t.getModuleId)},e.typeOf=m},59864:function(t,e,r){"use strict";t.exports=r(69921)},75533:function(t,e,r){"use strict";r.d(e,{ZP:function(){return y}});var n=r(67294),i=function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=64;){let d,p,g,y,m,v=r,b=n,w=i,E=o,A=s,k=a,S=u,B=h;for(p=0;p<16;p++)g=l+4*p,c[p]=(255&t[g])<<24|(255&t[g+1])<<16|(255&t[g+2])<<8|255&t[g+3];for(p=16;p<64;p++)d=c[p-2],y=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,d=c[p-15],m=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,c[p]=(y+c[p-7]|0)+(m+c[p-16]|0)|0;for(p=0;p<64;p++)y=(((A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7))+(A&k^~A&S)|0)+(B+(e[p]+c[p]|0)|0)|0,m=((v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+(v&b^v&w^b&w)|0,B=S,S=k,k=A,A=E+y|0,E=w,w=b,b=v,v=y+m|0;r=r+v|0,n=n+b|0,i=i+w|0,o=o+E|0,s=s+A|0,a=a+k|0,u=u+S|0,h=h+B|0,l+=64,f-=64}}l(t);let f,d=t.length%64,p=t.length/536870912|0,g=t.length<<3,y=d<56?56:120,m=t.slice(t.length-d,t.length);for(m.push(128),f=d+1;f>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),m.push(g>>>24&255),m.push(g>>>16&255),m.push(g>>>8&255),m.push(g>>>0&255),l(m),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,h>>>24&255,h>>>16&255,h>>>8&255,h>>>0&255]}function i(t,e,r){t=t.length<=64?t:n(t);const i=64+e.length+4,o=new Array(i),s=new Array(64);let a,u=[];for(a=0;a<64;a++)o[a]=54;for(a=0;a=i-4;t--){if(o[t]++,o[t]<=255)return;o[t]=0}}for(;r>=32;)h(),u=u.concat(n(s.concat(n(o)))),r-=32;return r>0&&(h(),u=u.concat(n(s.concat(n(o))).slice(0,r))),u}function o(t,e,r,n,i){let o;for(h(t,16*(2*r-1),i,0,16),o=0;o<2*r;o++)u(t,16*o,i,16),a(i,n),h(i,0,t,e+16*o,16);for(o=0;o>>32-e}function a(t,e){h(t,0,e,0,16);for(let r=8;r>0;r-=2)e[4]^=s(e[0]+e[12],7),e[8]^=s(e[4]+e[0],9),e[12]^=s(e[8]+e[4],13),e[0]^=s(e[12]+e[8],18),e[9]^=s(e[5]+e[1],7),e[13]^=s(e[9]+e[5],9),e[1]^=s(e[13]+e[9],13),e[5]^=s(e[1]+e[13],18),e[14]^=s(e[10]+e[6],7),e[2]^=s(e[14]+e[10],9),e[6]^=s(e[2]+e[14],13),e[10]^=s(e[6]+e[2],18),e[3]^=s(e[15]+e[11],7),e[7]^=s(e[3]+e[15],9),e[11]^=s(e[7]+e[3],13),e[15]^=s(e[11]+e[7],18),e[1]^=s(e[0]+e[3],7),e[2]^=s(e[1]+e[0],9),e[3]^=s(e[2]+e[1],13),e[0]^=s(e[3]+e[2],18),e[6]^=s(e[5]+e[4],7),e[7]^=s(e[6]+e[5],9),e[4]^=s(e[7]+e[6],13),e[5]^=s(e[4]+e[7],18),e[11]^=s(e[10]+e[9],7),e[8]^=s(e[11]+e[10],9),e[9]^=s(e[8]+e[11],13),e[10]^=s(e[9]+e[8],18),e[12]^=s(e[15]+e[14],7),e[13]^=s(e[12]+e[15],9),e[14]^=s(e[13]+e[12],13),e[15]^=s(e[14]+e[13],18);for(let r=0;r<16;++r)t[r]+=e[r]}function u(t,e,r,n){for(let i=0;i=256)return!1}return!0}function l(t,e){if("number"!==typeof t||t%1)throw new Error("invalid "+e);return t}function f(t,e,n,s,a,f,d){if(n=l(n,"N"),s=l(s,"r"),a=l(a,"p"),f=l(f,"dkLen"),0===n||0!==(n&n-1))throw new Error("N must be power of 2");if(n>r/128/s)throw new Error("N too large");if(s>r/128/a)throw new Error("r too large");if(!c(t))throw new Error("password must be an array or buffer");if(t=Array.prototype.slice.call(t),!c(e))throw new Error("salt must be an array or buffer");e=Array.prototype.slice.call(e);let p=i(t,e,128*a*s);const g=new Uint32Array(32*a*s);for(let r=0;rM&&(e=M);for(let t=0;tM&&(e=M);for(let t=0;t>0&255),p.push(g[t]>>8&255),p.push(g[t]>>16&255),p.push(g[t]>>24&255);const r=i(t,p,f);return d&&d(null,1,r),r}d&&T(O)};if(!d)for(;;){const t=O();if(void 0!=t)return t}O()}const d={scrypt:function(t,e,r,n,i,o,s){return new Promise((function(a,u){let h=0;s&&s(0),f(t,e,r,n,i,o,(function(t,e,r){if(t)u(t);else if(r)s&&1!==h&&s(1),a(new Uint8Array(r));else if(s&&e!==h)return h=e,s(e)}))}))},syncScrypt:function(t,e,r,n,i,o){return new Uint8Array(f(t,e,r,n,i,o))}};t.exports=d}()},35682:function(t,e,r){"use strict";e.Aj=e.C4=void 0;var n,i=r(55926),o=(n=r(29274))&&n.__esModule?n:{default:n};var s=function(t){var e=t.allowedSizes,r=t.defaultSize,n=t.padding;return function t(){var s=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;if(!this||this.constructor!==t)return new t(a);if(e&&!e.includes(a))throw new Error("Unsupported hash length");var u=new o.default({capacity:a});return this.update=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";if(i.Buffer.isBuffer(t))return u.absorb(t),s;if("string"===typeof t)return s.update(i.Buffer.from(t,e));throw new TypeError("Not a string or buffer")},this.digest=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"binary",e="string"===typeof t?{format:t}:t,r=u.squeeze({buffer:e.buffer,padding:e.padding||n});return e.format&&"binary"!==e.format?r.toString(e.format):r},this.reset=function(){return u.reset(),s},this}},a=s({allowedSizes:[224,256,384,512],defaultSize:512,padding:1});e.C4=a;var u=s({allowedSizes:[224,256,384,512],defaultSize:512,padding:6});e.Aj=u,s({allowedSizes:[128,256],defaultSize:256,padding:31});var h=a;u.SHA3Hash=h},55926:function(t,e,r){"use strict";const n=r(79742),i=r(80645),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"===typeof t){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return h(t,e,r)}function h(t,e,r){if("string"===typeof t)return function(t,e){"string"===typeof e&&""!==e||(e="utf8");if(!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let n=a(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(J(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(J(t,ArrayBuffer)||t&&J(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!==typeof SharedArrayBuffer&&(J(t,SharedArrayBuffer)||t&&J(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const i=function(t){if(u.isBuffer(t)){const e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!==typeof t.length||Q(t.length)?a(0):f(t);if("Buffer"===t.type&&Array.isArray(t.data))return f(t.data)}(t);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!==typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return c(t),a(t<0?0:0|p(t))}function f(t){const e=t.length<0?0:0|p(t.length),r=a(e);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||J(t,ArrayBuffer))return t.byteLength;if("string"!==typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(t).length;default:if(i)return n?-1:G(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return M(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Q(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){let o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128===(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128===(192&r)&&128===(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128===(192&r)&&128===(192&n)&&128===(192&a)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(J(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),h=this.slice(n,i),c=t.slice(e,r);for(let u=0;u>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>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,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":case"latin1":case"binary":return A(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function I(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let o=e;or)throw new RangeError("Trying to access beyond buffer length")}function _(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function P(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function N(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function U(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,n,o){return e=+e,r>>>=0,o||U(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,o){return e=+e,r>>>=0,o||U(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=Y((function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=Y((function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||R(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){_(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,!n){_(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=Y((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Y((function(t,e=0){return N(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);_(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);_(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=Y((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Y((function(t,e=0){return N(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function z(t,e,r,n,i,o){if(t>r||t3?0===e||e===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}`:`>= ${e}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){H(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||q(e,t.length-(r+1))}(n,i,o)}function H(t,e){if("number"!==typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function q(t,e,r){if(Math.floor(t)!==t)throw H(t,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=K(String(r)):"bigint"===typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=K(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function G(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=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((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function Z(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Q(t){return t!==t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Y(t){return"undefined"===typeof BigInt?$:t}function $(){throw new Error("BigInt not supported")}},29274:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=r(55926),o=(n=r(99618))&&n.__esModule?n:{default:n};var s=function(t,e){for(var r=0;r>>8,e[r+2]=t[n+1]>>>16,e[r+3]=t[n+1]>>>24,e[r+4]=t[n],e[r+5]=t[n]>>>8,e[r+6]=t[n]>>>16,e[r+7]=t[n]>>>24}return e},u=function(t){var e=this,r=t.capacity,n=t.padding,u=(0,o.default)(),h=r/8,c=200-r/4,l=0,f=new Uint32Array(50),d=i.Buffer.allocUnsafe(c);return this.absorb=function(t){for(var r=0;r=c&&(s(d,f),u(f),l=0);return e},this.squeeze=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={buffer:t.buffer||i.Buffer.allocUnsafe(h),padding:t.padding||n,queue:i.Buffer.allocUnsafe(d.length),state:new Uint32Array(f.length)};d.copy(e.queue);for(var r=0;r>>c,s[(h+1)%2]=u<>>c,(0,o.default)(s,0)(e,f),(0,o.default)(r,0)(s,0)}};e.default=a},76325:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=[10,7,11,17,18,3,5,16,8,21,24,4,15,23,19,13,12,2,20,14,22,9,6,1];e.default=r},23010:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=[1,3,6,10,15,21,28,36,45,55,2,14,27,41,56,8,25,43,62,18,39,61,20,44];e.default=r},57959:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(76605))&&n.__esModule?n:{default:n};var o=function(t){for(var e=t.A,r=t.C,n=t.D,o=t.W,s=0,a=0,u=0;u<5;u++){var h=2*u,c=2*(u+5),l=2*(u+10),f=2*(u+15),d=2*(u+20);r[h]=e[h]^e[c]^e[l]^e[f]^e[d],r[h+1]=e[h+1]^e[c+1]^e[l+1]^e[f+1]^e[d+1]}for(var p=0;p<5;p++){(0,i.default)(r,(p+1)%5)(o,0),s=o[0],a=o[1],o[0]=s<<1|a>>>31,o[1]=a<<1|s>>>31,n[2*p]=r[(p+4)%5*2]^o[0],n[2*p+1]=r[(p+4)%5*2+1]^o[1];for(var g=0;g<25;g+=5)e[2*(g+p)]^=n[2*p],e[2*(g+p)+1]^=n[2*p+1]}};e.default=o},96774:function(t){t.exports=function(t,e,r,n){var i=r?r.call(n,t,e):void 0;if(void 0!==i)return!!i;if(t===e)return!0;if("object"!==typeof t||!t||"object"!==typeof e||!e)return!1;var o=Object.keys(t),s=Object.keys(e);if(o.length!==s.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(e),u=0;ud)&&(F=(z=z.replace(" ",":")).length),0<_&&void 0!==(w=a(1,z,n,t,I,C,H.length,h,f,h))&&0===(F=(z=w.trim()).length)&&(z="\0\0"),d=z.charCodeAt(0),p=z.charCodeAt(1),d){case 0:break;case 64:if(105===p||99===p){V+=z+u.charAt(U);break}default:58!==z.charCodeAt(F-1)&&(H+=i(z,d,p,z.charCodeAt(2)))}D=L=P=d=0,z="",p=u.charCodeAt(++U)}}switch(p){case 13:case 10:47===k?k=0:0===1+d&&107!==h&&0n&&(n=(e=e.trim()).charCodeAt(0)),n){case 38:return e.replace(y,"$1"+t.trim());case 58:return t.trim()+e.replace(y,"$1"+t.trim());default:if(0<1*r&&0u.charCodeAt(8))break;case 115:s=s.replace(u,"-webkit-"+u)+";"+s;break;case 207:case 102:s=s.replace(u,"-webkit-"+(102n.charCodeAt(0)&&(n=n.trim()),n=[n],0<_){var i=a(-1,r,n,n,I,C,0,0,0,0);void 0!==i&&"string"===typeof i&&(r=i)}var o=e(O,n,r,0,0);return 0<_&&(void 0!==(i=a(-2,o,n,n,I,C,o.length,0,0,0))&&(o=i)),"",M=0,C=I=1,o}var c=/^\0+/g,l=/[\0\r\f]/g,f=/: */g,d=/zoo|gra/,p=/([,: ])(transform)/g,g=/,\r+?/g,y=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,b=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,E=/\(\s*(.*)\s*\)/g,A=/([\s\S]*?);/g,k=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,B=/stretch|:\s*\w+\-(?:conte|avail)/,x=/([^-])(image-set\()/,C=1,I=1,M=0,T=1,O=[],R=[],_=0,P=null,N=0;return h.use=function t(e){switch(e){case void 0:case null:_=R.length=0;break;default:if("function"===typeof e)R[_++]=e;else if("object"===typeof e)for(var r=0,n=e.length;r1?e-1:0),n=1;n0?" Args: "+r.join(", "):""))}var C=function(){function t(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}var e=t.prototype;return e.indexOfGroup=function(t){for(var e=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;t>=i;)(i<<=1)<0&&x(16,""+t);this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=n;o=this.length||0===this.groupSizes[t])return e;for(var r=this.groupSizes[t],n=this.indexOfGroup(t),i=n+r,o=n;o=T&&(T=e+1),I.set(t,e),M.set(e,t)},P="style["+k+'][data-styled-version="5.3.11"]',N=new RegExp("^"+k+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),U=function(t,e,r){for(var n,i=r.split(","),o=0,s=i.length;o=0;r--){var n=e[r];if(n&&1===n.nodeType&&n.hasAttribute(k))return n}}(r),o=void 0!==i?i.nextSibling:null;n.setAttribute(k,"active"),n.setAttribute("data-styled-version","5.3.11");var s=D();return s&&n.setAttribute("nonce",s),r.insertBefore(n,o),n},j=function(){function t(t){var e=this.element=F(t);e.appendChild(document.createTextNode("")),this.sheet=function(t){if(t.sheet)return t.sheet;for(var e=document.styleSheets,r=0,n=e.length;r=0){var r=document.createTextNode(e),n=this.nodes[t];return this.element.insertBefore(r,n||null),this.length++,!0}return!1},e.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.getRule=function(t){return t0&&(h+=t+",")})),n+=""+a+u+'{content:"'+h+'"}/*!sc*/\n'}}}return n}(this)},t}(),G=/(a)(d)/gi,W=function(t){return String.fromCharCode(t+(t>25?39:97))};function Z(t){var e,r="";for(e=Math.abs(t);e>52;e=e/52|0)r=W(e%52)+r;return(W(e%52)+r).replace(G,"$1-$2")}var J=function(t,e){for(var r=e.length;r;)t=33*t^e.charCodeAt(--r);return t},Q=function(t){return J(5381,t)};function X(t){for(var e=0;e>>0);if(!e.hasNameForId(n,s)){var a=r(o,"."+s,void 0,n);e.insertRules(n,s,a)}i.push(s),this.staticRulesId=s}else{for(var u=this.rules.length,h=J(this.baseHash,r.hash),c="",l=0;l>>0);if(!e.hasNameForId(n,g)){var y=r(c,"."+g,void 0,n);e.insertRules(n,g,y)}i.push(g)}}return i.join(" ")},t}(),tt=/^\s*\/\/.*$/gm,et=[":","[",".","#"];function rt(t){var e,r,n,i,o=void 0===t?b:t,s=o.options,u=void 0===s?b:s,h=o.plugins,c=void 0===h?v:h,l=new a(u),f=[],d=function(t){function e(e){if(e)try{t(e+"}")}catch(t){}}return function(r,n,i,o,s,a,u,h,c,l){switch(r){case 1:if(0===c&&64===n.charCodeAt(0))return t(n+";"),"";break;case 2:if(0===h)return n+"/*|*/";break;case 3:switch(h){case 102:case 112:return t(i[0]+n),"";default:return n+(0===l?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(e)}}}((function(t){f.push(t)})),p=function(t,n,o){return 0===n&&-1!==et.indexOf(o[r.length])||o.match(i)?t:"."+e};function g(t,o,s,a){void 0===a&&(a="&");var u=t.replace(tt,""),h=o&&s?s+" "+o+" { "+u+" }":u;return e=a,r=o,n=new RegExp("\\"+r+"\\b","g"),i=new RegExp("(\\"+r+"\\b){2,}"),l(s||!o?"":o,h)}return l.use([].concat(c,[function(t,e,i){2===t&&i.length&&i[0].lastIndexOf(r)>0&&(i[0]=i[0].replace(n,p))},d,function(t){if(-2===t){var e=f;return f=[],e}}])),g.hash=c.length?c.reduce((function(t,e){return e.name||x(15),J(t,e.name)}),5381).toString():"",g}var nt=i.createContext(),it=(nt.Consumer,i.createContext()),ot=(it.Consumer,new V),st=rt();function at(){return(0,i.useContext)(nt)||ot}function ut(){return(0,i.useContext)(it)||st}function ht(t){var e=(0,i.useState)(t.stylisPlugins),r=e[0],n=e[1],o=at(),a=(0,i.useMemo)((function(){var e=o;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target]),u=(0,i.useMemo)((function(){return rt({options:{prefix:!t.disableVendorPrefixes},plugins:r})}),[t.disableVendorPrefixes,r]);return(0,i.useEffect)((function(){s()(r,t.stylisPlugins)||n(t.stylisPlugins)}),[t.stylisPlugins]),i.createElement(nt.Provider,{value:a},i.createElement(it.Provider,{value:u},t.children))}var ct=function(){function t(t,e){var r=this;this.inject=function(t,e){void 0===e&&(e=st);var n=r.name+e.hash;t.hasNameForId(r.id,n)||t.insertRules(r.id,n,e(r.rules,n,"@keyframes"))},this.toString=function(){return x(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=e}return t.prototype.getName=function(t){return void 0===t&&(t=st),this.name+t.hash},t}(),lt=/([A-Z])/,ft=/([A-Z])/g,dt=/^ms-/,pt=function(t){return"-"+t.toLowerCase()};function gt(t){return lt.test(t)?t.replace(ft,pt).replace(dt,"-ms-"):t}var yt=function(t){return null==t||!1===t||""===t};function mt(t,e,r,n){if(Array.isArray(t)){for(var i,o=[],s=0,a=t.length;s1?e-1:0),n=1;n?@[\\\]^`{|}~-]+/g,At=/(^-|-$)/g;function kt(t){return t.replace(Et,"-").replace(At,"")}var St=function(t){return Z(Q(t)>>>0)};function Bt(t){return"string"==typeof t&&!0}var xt=function(t){return"function"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)},Ct=function(t){return"__proto__"!==t&&"constructor"!==t&&"prototype"!==t};function It(t,e,r){var n=t[r];xt(e)&&xt(n)?Mt(n,e):t[r]=e}function Mt(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n=0||(i[r]=t[r]);return i}(e,["componentId"]),o=n&&n+"-"+(Bt(t)?t:kt(E(t)));return Rt(t,g({},i,{attrs:y,componentId:o}),r)},Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=n?Mt({},t.defaultProps,e):e}}),Object.defineProperty(k,"toString",{value:function(){return"."+k.styledComponentId}}),o&&d()(k,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),k}var _t=function(t){return function t(e,r,i){if(void 0===i&&(i=b),!(0,n.isValidElementType)(r))return x(1,String(r));var o=function(){return e(r,i,bt.apply(void 0,arguments))};return o.withConfig=function(n){return t(e,r,g({},i,{},n))},o.attrs=function(n){return t(e,r,g({},i,{attrs:Array.prototype.concat(i.attrs,n).filter(Boolean)}))},o}(Rt,t)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(t){_t[t]=_t(t)}));!function(){function t(t,e){this.rules=t,this.componentId=e,this.isStatic=X(t),V.registerId(this.componentId+1)}var e=t.prototype;e.createStyles=function(t,e,r,n){var i=n(mt(this.rules,e,r,n).join(""),""),o=this.componentId+t;r.insertRules(o,o,i)},e.removeStyles=function(t,e){e.clearRules(this.componentId+t)},e.renderStyles=function(t,e,r,n){t>2&&V.registerId(this.componentId+t),this.removeStyles(t,r),this.createStyles(t,e,r,n)}}();!function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString();if(!e)return"";var r=D();return""},this.getStyleTags=function(){return t.sealed?x(2):t._emitSheetCSS()},this.getStyleElement=function(){var e;if(t.sealed)return x(2);var r=((e={})[k]="",e["data-styled-version"]="5.3.11",e.dangerouslySetInnerHTML={__html:t.instance.toString()},e),n=D();return n&&(r.nonce=n),[i.createElement("style",g({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new V({isServer:!0}),this.sealed=!1}var e=t.prototype;e.collectStyles=function(t){return this.sealed?x(2):i.createElement(ht,{sheet:this.instance},t)},e.interleaveWithNodeStream=function(t){return x(3)}}();var Pt=_t},28230:function(t,e){"use strict";function r(t,e,r){void 0===r&&(r=!1),r&&(e/=t,t=1);var n,i=[],o=0,s=0,a=function(){var r=o+e,u=Date.now();if(ue&&(o=l,s=0),s++=i)return t;switch(t){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 t}})),a=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&e._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=c),f(n,t,n.depth)}function c(t,e){var r=h.styles[e];return r?"\x1b["+h.colors[r][0]+"m"+t+"\x1b["+h.colors[r][1]+"m":t}function l(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&B(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=f(t,i,n)),i}var o=function(t,e){if(w(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(v(e))return t.stylize(""+e,"number");if(y(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),S(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return d(r);if(0===s.length){if(B(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(E(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(S(r))return d(r)}var h,c="",l=!1,A=["{","}"];(g(r)&&(l=!0,A=["[","]"]),B(r))&&(c=" [Function"+(r.name?": "+r.name:"")+"]");return E(r)&&(c=" "+RegExp.prototype.toString.call(r)),k(r)&&(c=" "+Date.prototype.toUTCString.call(r)),S(r)&&(c=" "+d(r)),0!==s.length||l&&0!=r.length?n<0?E(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),h=l?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(h,c,A)):A[0]+c+A[1]}function d(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),T(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=m(r)?f(t,u.value,null):f(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function g(t){return Array.isArray(t)}function y(t){return"boolean"===typeof t}function m(t){return null===t}function v(t){return"number"===typeof t}function b(t){return"string"===typeof t}function w(t){return void 0===t}function E(t){return A(t)&&"[object RegExp]"===x(t)}function A(t){return"object"===typeof t&&null!==t}function k(t){return A(t)&&"[object Date]"===x(t)}function S(t){return A(t)&&("[object Error]"===x(t)||t instanceof Error)}function B(t){return"function"===typeof t}function x(t){return Object.prototype.toString.call(t)}function C(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!s[t])if(a.test(t)){var r=n.pid;s[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else s[t]=function(){};return s[t]},e.inspect=h,h.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},h.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(55955),e.isArray=g,e.isBoolean=y,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=v,e.isString=b,e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=w,e.isRegExp=E,e.types.isRegExp=E,e.isObject=A,e.isDate=k,e.types.isDate=k,e.isError=S,e.types.isNativeError=S,e.isFunction=B,e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=r(20384);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(){var t=new Date,e=[C(t.getHours()),C(t.getMinutes()),C(t.getSeconds())].join(":");return[t.getDate(),I[t.getMonth()],e].join(" ")}function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",M(),e.format.apply(e,arguments))},e.inherits=r(35717),e._extend=function(t,e){if(!e||!A(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var O="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');if(O&&t[O]){var e;if("function"!==typeof(e=t[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o=a||o>49)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<=128);return t.bytes=s-r,i}},1312:function(t){t.exports=function t(r,n,i){if(Number.MAX_SAFE_INTEGER&&r>Number.MAX_SAFE_INTEGER)throw t.bytes=0,new RangeError("Could not encode varint");n=n||[];var o=i=i||0;for(;r>=e;)n[i++]=255&r|128,r/=128;for(;-128&r;)n[i++]=255&r|128,r>>>=7;return n[i]=0|r,t.bytes=i-o+1,n};var e=Math.pow(2,31)},94676:function(t,e,r){t.exports={encode:r(1312),decode:r(26988),encodingLength:r(10082)}},10082:function(t){var e=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),u=Math.pow(2,56),h=Math.pow(2,63);t.exports=function(t){return t-1?e:"Object"===e&&function(t){var e=!1;return n(g,(function(r,n){if(!e)try{r(t),e=f(n,1)}catch(i){}})),e}(t)}return a?function(t){var e=!1;return n(g,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=f(n,1))}catch(i){}})),e}(t):null}},63083:function(t,e,r){"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"===typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e>24&255,e[r+i]=n>>16&255,e[r+o]=n>>8&255,e[r+s]=255&n}}function E(t,e,r,n,i,o){return function(t,e){A(t,e|=0);var r=s(t,e+i);return b(s(t,e+o),r)};function s(i,o){return 16777216*i[o+t]+(i[o+e]<<16|i[o+r]<<8|i[o+n])}}function A(t,e){if(null==(t=t&&t.length))throw new TypeError("Invalid Buffer");if(t0&&!e.includes(t.length))throw new TypeError(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}const o={number:n,bool:function(t){if("boolean"!==typeof t)throw new Error(`Expected boolean, not ${t}`)},bytes:i,hash:function(t){if("function"!==typeof t||"function"!==typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(t.outputLen),n(t.blockLen)},exists:function(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")},output:function(t,e){i(t);const r=e.outputLen;if(t.lengtho?t.create().update(r).digest():r);for(let n=0;nnew o(t,e).update(r).digest();s.create=(t,e)=>new o(t,e);const a=new Uint8Array([0]),u=new Uint8Array;const h=(t,e,r,o,h)=>function(t,e,r,i=32){if(n.ZP.hash(t),n.ZP.number(i),i>255*t.outputLen)throw new Error("Length should be <= 255*HashLen");const o=Math.ceil(i/t.outputLen);void 0===r&&(r=u);const h=new Uint8Array(o*t.outputLen),c=s.create(t,e),l=c._cloneInto(),f=new Uint8Array(c.outputLen);for(let n=0;no-a&&(this.process(r,0),a=0);for(let n=a;n>i&o),a=Number(r&o),u=n?4:0,h=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+h,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const u=(0,i.GL)(t),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=h/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let n=0;nt&e^~t&r,a=(t,e,r)=>t&e^t&r^e&r,u=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),h=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class l extends o{constructor(){super(64,32,8,!1),this.A=0|h[0],this.B=0|h[1],this.C=0|h[2],this.D=0|h[3],this.E=0|h[4],this.F=0|h[5],this.G=0|h[6],this.H=0|h[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let i=0;i<16;i++,e+=4)c[i]=t.getUint32(e,!1);for(let s=16;s<64;s++){const t=c[s-15],e=c[s-2],r=(0,i.np)(t,7)^(0,i.np)(t,18)^t>>>3,n=(0,i.np)(e,17)^(0,i.np)(e,19)^e>>>10;c[s]=n+c[s-7]+r+c[s-16]|0}let{A:r,B:n,C:o,D:h,E:l,F:f,G:d,H:p}=this;for(let g=0;g<64;g++){const t=p+((0,i.np)(l,6)^(0,i.np)(l,11)^(0,i.np)(l,25))+s(l,f,d)+u[g]+c[g]|0,e=((0,i.np)(r,2)^(0,i.np)(r,13)^(0,i.np)(r,22))+a(r,n,o)|0;p=d,d=f,f=l,l=h+t|0,h=o,o=n,n=r,r=t+e|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,h=h+this.D|0,l=l+this.E|0,f=f+this.F|0,d=d+this.G|0,p=p+this.H|0,this.set(r,n,o,h,l,f,d,p)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class f extends l{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const d=(0,i.hE)((()=>new l));(0,i.hE)((()=>new f))},93811:function(t,e,r){"use strict";r.d(e,{kb:function(){return s},GL:function(){return n},np:function(){return i},O0:function(){return o},hE:function(){return a}});"object"===typeof self&&"crypto"in self&&self.crypto;const n=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),i=(t,e)=>t<<32-e|t>>>e;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function o(t){if("string"===typeof t&&(t=function(t){if("string"!==typeof t)throw new TypeError("utf8ToBytes expected string, got "+typeof t);return(new TextEncoder).encode(t)}(t)),!(t instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof t})`);return t}class s{clone(){return this._cloneInto()}}function a(t){const e=e=>t().update(o(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}},27760:function(t,e,r){"use strict";var n;r.d(e,{$3:function(){return Z},P6:function(){return X}});var i=r(95856);const o=BigInt(0),s=BigInt(1),a=BigInt(2),u=BigInt(3),h=BigInt(8),c=Object.freeze({a:o,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:s,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")}),l=(t,e)=>(t+e/a)/e,f={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(t){const{n:e}=c,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-s*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,a=BigInt("0x100000000000000000000000000000000"),u=l(o*t,e),h=l(-n*t,e);let f=D(t-u*r-h*i,e),d=D(-u*n-h*o,e);const p=f>a,g=d>a;if(p&&(f=e-f),g&&(d=e-d),f>a||d>a)throw new Error("splitScalarEndo: Endomorphism failed, k="+t);return{k1neg:p,k1:f,k2neg:g,k2:d}}},d=32,p=32;function g(t){const{a:e,b:r}=c,n=D(t*t),i=D(n*t);return D(i+e*t+r)}const y=c.a===o;class m extends Error{constructor(t){super(t)}}function v(t){if(!(t instanceof b))throw new TypeError("JacobianPoint expected")}class b{constructor(t,e,r){this.x=t,this.y=e,this.z=r}static fromAffine(t){if(!(t instanceof A))throw new TypeError("JacobianPoint#fromAffine: expected Point");return t.equals(A.ZERO)?b.ZERO:new b(t.x,t.y,s)}static toAffineBatch(t){const e=function(t,e=c.P){const r=new Array(t.length),n=j(t.reduce(((t,n,i)=>n===o?t:(r[i]=t,D(t*n,e))),s),e);return t.reduceRight(((t,n,i)=>n===o?t:(r[i]=D(t*r[i],e),D(t*n,e))),n),r}(t.map((t=>t.z)));return t.map(((t,r)=>t.toAffine(e[r])))}static normalizeZ(t){return b.toAffineBatch(t).map(b.fromAffine)}equals(t){v(t);const{x:e,y:r,z:n}=this,{x:i,y:o,z:s}=t,a=D(n*n),u=D(s*s),h=D(e*u),c=D(i*a),l=D(D(r*s)*u),f=D(D(o*n)*a);return h===c&&l===f}negate(){return new b(this.x,D(-this.y),this.z)}double(){const{x:t,y:e,z:r}=this,n=D(t*t),i=D(e*e),o=D(i*i),s=t+i,c=D(a*(D(s*s)-n-o)),l=D(u*n),f=D(l*l),d=D(f-a*c),p=D(l*(c-d)-h*o),g=D(a*e*r);return new b(d,p,g)}add(t){v(t);const{x:e,y:r,z:n}=this,{x:i,y:s,z:u}=t;if(i===o||s===o)return this;if(e===o||r===o)return t;const h=D(n*n),c=D(u*u),l=D(e*c),f=D(i*h),d=D(D(r*u)*c),p=D(D(s*n)*h),g=D(f-l),y=D(p-d);if(g===o)return y===o?this.double():b.ZERO;const m=D(g*g),w=D(g*m),E=D(l*m),A=D(y*y-w-a*E),k=D(y*(E-A)-d*w),S=D(n*u*g);return new b(A,k,S)}subtract(t){return this.add(t.negate())}multiplyUnsafe(t){const e=b.ZERO;if("bigint"===typeof t&&t===o)return e;let r=L(t);if(r===s)return this;if(!y){let t=e,n=this;for(;r>o;)r&s&&(t=t.add(n)),n=n.double(),r>>=s;return t}let{k1neg:n,k1:i,k2neg:a,k2:u}=f.splitScalar(r),h=e,c=e,l=this;for(;i>o||u>o;)i&s&&(h=h.add(l)),u&s&&(c=c.add(l)),l=l.double(),i>>=s,u>>=s;return n&&(h=h.negate()),a&&(c=c.negate()),c=new b(D(c.x*f.beta),c.y,c.z),h.add(c)}precomputeWindow(t){const e=y?128/t+1:256/t+1,r=[];let n=this,i=n;for(let o=0;o>=l,r>u&&(r-=c,t+=s);const a=e,d=e+Math.abs(r)-1,p=f%2!==0,g=r<0;0===r?o=o.add(w(p,n[a])):i=i.add(w(g,n[d]))}return{p:i,f:o}}multiply(t,e){let r,n,i=L(t);if(y){const{k1neg:t,k1:o,k2neg:s,k2:a}=f.splitScalar(i);let{p:u,f:h}=this.wNAF(o,e),{p:c,f:l}=this.wNAF(a,e);u=w(t,u),c=w(s,c),c=new b(D(c.x*f.beta),c.y,c.z),r=u.add(c),n=h.add(l)}else{const{p:t,f:o}=this.wNAF(i,e);r=t,n=o}return b.normalizeZ([r,n])[0]}toAffine(t){const{x:e,y:r,z:n}=this,i=this.equals(b.ZERO);null==t&&(t=i?h:j(n));const o=t,a=D(o*o),u=D(a*o),c=D(e*a),l=D(r*u),f=D(n*o);if(i)return A.ZERO;if(f!==s)throw new Error("invZ was invalid");return new A(c,l)}}function w(t,e){const r=e.negate();return t?r:e}b.BASE=new b(c.Gx,c.Gy,s),b.ZERO=new b(o,s,o);const E=new WeakMap;class A{constructor(t,e){this.x=t,this.y=e}_setWindowSize(t){this._WINDOW_SIZE=t,E.delete(this)}hasEvenY(){return this.y%a===o}static fromCompressedHex(t){const e=32===t.length,r=N(e?t:t.subarray(1));if(!V(r))throw new Error("Point is not on curve");let n=function(t){const{P:e}=c,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),s=BigInt(44),h=BigInt(88),l=t*t*t%e,f=l*l*t%e,d=F(f,u)*f%e,p=F(d,u)*f%e,g=F(p,a)*l%e,y=F(g,n)*g%e,m=F(y,i)*y%e,v=F(m,s)*m%e,b=F(v,h)*v%e,w=F(b,s)*m%e,E=F(w,u)*f%e,A=F(E,o)*y%e,k=F(A,r)*l%e,S=F(k,a);if(S*S%e!==t)throw new Error("Cannot find square root");return S}(g(r));const i=(n&s)===s;if(e)i&&(n=D(-n));else{1===(1&t[0])!==i&&(n=D(-n))}const o=new A(r,n);return o.assertValidity(),o}static fromUncompressedHex(t){const e=N(t.subarray(1,33)),r=N(t.subarray(33,65)),n=new A(e,r);return n.assertValidity(),n}static fromHex(t){const e=U(t),r=e.length,n=e[0];if(r===d)return this.fromCompressedHex(e);if(33===r&&(2===n||3===n))return this.fromCompressedHex(e);if(65===r&&4===n)return this.fromUncompressedHex(e);throw new Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${r}`)}static fromPrivateKey(t){return A.BASE.multiply(G(t))}static fromSignature(t,e,r){const{r:n,s:i}=W(e);if(![0,1,2,3].includes(r))throw new Error("Cannot recover: invalid recovery bit");const o=K(U(t)),{n:s}=c,a=2===r||3===r?n+s:n,u=j(a,s),h=D(-o*u,s),l=D(i*u,s),f=1&r?"03":"02",d=A.fromHex(f+T(a)),p=A.BASE.multiplyAndAddUnsafe(d,h,l);if(!p)throw new Error("Cannot recover signature: point at infinify");return p.assertValidity(),p}toRawBytes(t=!1){return P(this.toHex(t))}toHex(t=!1){const e=T(this.x);if(t){return`${this.hasEvenY()?"02":"03"}${e}`}return`04${e}${T(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const t="Point is not on elliptic curve",{x:e,y:r}=this;if(!V(e)||!V(r))throw new Error(t);const n=D(r*r);if(D(n-g(e))!==o)throw new Error(t)}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new A(this.x,D(-this.y))}double(){return b.fromAffine(this).double().toAffine()}add(t){return b.fromAffine(this).add(b.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return b.fromAffine(this).multiply(t,this).toAffine()}multiplyAndAddUnsafe(t,e,r){const n=b.fromAffine(this),i=e===o||e===s||this!==A.BASE?n.multiplyUnsafe(e):n.multiply(e),a=b.fromAffine(t).multiplyUnsafe(r),u=i.add(a);return u.equals(b.ZERO)?void 0:u.toAffine()}}function k(t){return Number.parseInt(t[0],16)>=8?"00"+t:t}function S(t){if(t.length<2||2!==t[0])throw new Error(`Invalid signature integer tag: ${I(t)}`);const e=t[1],r=t.subarray(2,e+2);if(!e||r.length!==e)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:N(r),left:t.subarray(e+2)}}A.BASE=new A(c.Gx,c.Gy),A.ZERO=new A(o,o);class B{constructor(t,e){this.r=t,this.s=e,this.assertValidity()}static fromCompact(t){const e=t instanceof Uint8Array,r="Signature.fromCompact";if("string"!==typeof t&&!e)throw new TypeError(`${r}: Expected string or Uint8Array`);const n=e?I(t):t;if(128!==n.length)throw new Error(`${r}: Expected 64-byte hex`);return new B(_(n.slice(0,64)),_(n.slice(64,128)))}static fromDER(t){const e=t instanceof Uint8Array;if("string"!==typeof t&&!e)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:r,s:n}=function(t){if(t.length<2||48!=t[0])throw new Error(`Invalid signature tag: ${I(t)}`);if(t[1]!==t.length-2)throw new Error("Invalid signature: incorrect length");const{data:e,left:r}=S(t.subarray(2)),{data:n,left:i}=S(r);if(i.length)throw new Error(`Invalid signature: left bytes after parsing: ${I(i)}`);return{r:e,s:n}}(e?t:P(t));return new B(r,n)}static fromHex(t){return this.fromDER(t)}assertValidity(){const{r:t,s:e}=this;if(!q(t))throw new Error("Invalid Signature: r must be 0 < r < n");if(!q(e))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const t=c.n>>s;return this.s>t}normalizeS(){return this.hasHighS()?new B(this.r,D(-this.s,c.n)):this}toDERRawBytes(){return P(this.toDERHex())}toDERHex(){const t=k(R(this.s)),e=k(R(this.r)),r=t.length/2,n=e.length/2,i=R(r),o=R(n);return`30${R(n+r+4)}02${o}${e}02${i}${t}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return P(this.toCompactHex())}toCompactHex(){return T(this.r)+T(this.s)}}function x(...t){if(!t.every((t=>t instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);for(let n=0,i=0;ne.toString(16).padStart(2,"0")));function I(t){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");let e="";for(let r=0;r0)return BigInt(t);if("bigint"===typeof t&&q(t))return t;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function D(t,e=c.P){const r=t%e;return r>=o?r:e+r}function F(t,e){const{P:r}=c;let n=t;for(;e-- >o;)n*=n,n%=r;return n}function j(t,e=c.P){if(t===o||e<=o)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=D(t,e),n=e,i=o,a=s,u=s,h=o;for(;r!==o;){const t=n/r,e=n%r,o=i-u*t,s=a-h*t;n=r,r=e,i=u,a=h,u=o,h=s}if(n!==s)throw new Error("invert: does not exist");return D(i,e)}function K(t,e=!1){const r=function(t){const e=8*t.length-256,r=N(t);return e>0?r>>BigInt(e):r}(t);if(e)return r;const{n:n}=c;return r>=n?r-n:r}let z,H;function q(t){return o0)e=BigInt(t);else if("string"===typeof t){if(64!==t.length)throw new Error("Expected 32 bytes of private key");e=_(t)}else{if(!(t instanceof Uint8Array))throw new TypeError("Expected valid private key");if(t.length!==p)throw new Error("Expected 32 bytes of private key");e=N(t)}if(!q(e))throw new Error("Expected private key: 0 < key < n");return e}function W(t){if(t instanceof B)return t.assertValidity(),t;try{return B.fromDER(t)}catch(e){return B.fromCompact(t)}}function Z(t,e=!1){return A.fromPrivateKey(t).toRawBytes(e)}A.BASE._setWindowSize(8);const J={node:n||(n=r.t(i,2)),web:"object"===typeof self&&"crypto"in self?self.crypto:void 0},Q={},X={bytesToHex:I,hexToBytes:P,concatBytes:x,mod:D,invert:j,isValidPrivateKey(t){try{return G(t),!0}catch(e){return!1}},_bigintTo32Bytes:O,_normalizePrivateKey:G,hashToPrivateKey:t=>{if((t=U(t)).length<40||t.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");return O(D(N(t),c.n-s)+s)},randomBytes:(t=32)=>{if(J.web)return J.web.getRandomValues(new Uint8Array(t));if(J.node){const{randomBytes:e}=J.node;return Uint8Array.from(e(t))}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>X.hashToPrivateKey(X.randomBytes(40)),precompute(t=8,e=A.BASE){const r=e===A.BASE?e:new A(e.x,e.y);return r._setWindowSize(t),r.multiply(u),r},sha256:async(...t)=>{if(J.web){const e=await J.web.subtle.digest("SHA-256",x(...t));return new Uint8Array(e)}if(J.node){const{createHash:e}=J.node,r=e("sha256");return t.forEach((t=>r.update(t))),Uint8Array.from(r.digest())}throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(t,...e)=>{if(J.web){const r=await J.web.subtle.importKey("raw",t,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=x(...e),i=await J.web.subtle.sign("HMAC",r,n);return new Uint8Array(i)}if(J.node){const{createHmac:r}=J.node,n=r("sha256",t);return e.forEach((t=>n.update(t))),Uint8Array.from(n.digest())}throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(t,...e)=>{let r=Q[t];if(void 0===r){const e=await X.sha256(Uint8Array.from(t,(t=>t.charCodeAt(0))));r=x(e,e),Q[t]=r}return X.sha256(r,...e)},taggedHashSync:(t,...e)=>{if("function"!==typeof z)throw new m("sha256Sync is undefined, you need to set it");let r=Q[t];if(void 0===r){const e=z(Uint8Array.from(t,(t=>t.charCodeAt(0))));r=x(e,e),Q[t]=r}return z(r,...e)},_JacobianPoint:b};Object.defineProperties(X,{sha256Sync:{configurable:!1,get:()=>z,set(t){z||(z=t)}},hmacSha256Sync:{configurable:!1,get:()=>H,set(t){H||(H=t)}}})},35689:function(t,e,r){"use strict";var n;r.d(e,{$3:function(){return J},P6:function(){return X}});var i=r(33397);const o=BigInt(0),s=BigInt(1),a=BigInt(2),u=BigInt(8),h=BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),c=Object.freeze({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),l:h,n:h,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")}),l=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),f=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),d=(BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742"),BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235")),p=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),g=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),y=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952");class m{constructor(t,e,r,n){this.x=t,this.y=e,this.z=r,this.t=n}static fromAffine(t){if(!(t instanceof S))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return t.equals(S.ZERO)?m.ZERO:new m(t.x,t.y,s,N(t.x*t.y))}static toAffineBatch(t){const e=function(t,e=c.P){const r=new Array(t.length),n=U(t.reduce(((t,n,i)=>n===o?t:(r[i]=t,N(t*n,e))),s),e);return t.reduceRight(((t,n,i)=>n===o?t:(r[i]=N(t*r[i],e),N(t*n,e))),n),r}(t.map((t=>t.z)));return t.map(((t,r)=>t.toAffine(e[r])))}static normalizeZ(t){return this.toAffineBatch(t).map(this.fromAffine)}equals(t){b(t);const{x:e,y:r,z:n}=this,{x:i,y:o,z:s}=t,a=N(e*s),u=N(i*n),h=N(r*s),c=N(o*n);return a===u&&h===c}negate(){return new m(N(-this.x),this.y,this.z,N(-this.t))}double(){const{x:t,y:e,z:r}=this,{a:n}=c,i=N(t*t),o=N(e*e),s=N(a*N(r*r)),u=N(n*i),h=t+e,l=N(N(h*h)-i-o),f=u+o,d=f-s,p=u-o,g=N(l*d),y=N(f*p),v=N(l*p),b=N(d*f);return new m(g,y,b,v)}add(t){b(t);const{x:e,y:r,z:n,t:i}=this,{x:s,y:u,z:h,t:c}=t,l=N((r-e)*(u+s)),f=N((r+e)*(u-s)),d=N(f-l);if(d===o)return this.double();const p=N(n*a*c),g=N(i*a*h),y=g+p,v=f+l,w=g-p,E=N(y*d),A=N(v*w),k=N(y*w),S=N(d*v);return new m(E,A,S,k)}subtract(t){return this.add(t.negate())}precomputeWindow(t){const e=1+256/t,r=[];let n=this,i=n;for(let o=0;o>=l,r>u&&(r-=c,t+=s);const a=e,d=e+Math.abs(r)-1,p=f%2!==0,g=r<0;0===r?o=o.add(v(p,n[a])):i=i.add(v(g,n[d]))}return m.normalizeZ([i,o])[0]}multiply(t,e){return this.wNAF(H(t,c.l),e)}multiplyUnsafe(t){let e=H(t,c.l,!1);const r=m.BASE,n=m.ZERO;if(e===o)return n;if(this.equals(n)||e===s)return this;if(this.equals(r))return this.wNAF(e);let i=n,a=this;for(;e>o;)e&s&&(i=i.add(a)),a=a.double(),e>>=s;return i}isSmallOrder(){return this.multiplyUnsafe(c.h).equals(m.ZERO)}isTorsionFree(){let t=this.multiplyUnsafe(c.l/a).double();return c.l%a&&(t=t.add(this)),t.equals(m.ZERO)}toAffine(t){const{x:e,y:r,z:n}=this,i=this.equals(m.ZERO);null==t&&(t=i?u:U(n));const o=N(e*t),a=N(r*t),h=N(n*t);if(i)return S.ZERO;if(h!==s)throw new Error("invZ was invalid");return new S(o,a)}fromRistrettoBytes(){E()}toRistrettoBytes(){E()}fromRistrettoHash(){E()}}function v(t,e){const r=e.negate();return t?r:e}function b(t){if(!(t instanceof m))throw new TypeError("ExtendedPoint expected")}function w(t){if(!(t instanceof A))throw new TypeError("RistrettoPoint expected")}function E(){throw new Error("Legacy method: switch to RistrettoPoint")}m.BASE=new m(c.Gx,c.Gy,s,N(c.Gx*c.Gy)),m.ZERO=new m(o,s,s,o);class A{constructor(t){this.ep=t}static calcElligatorRistrettoMap(t){const{d:e}=c,r=N(f*t*t),n=N((r+s)*g);let i=BigInt(-1);const o=N((i-e*r)*N(r+e));let{isValid:a,value:u}=F(n,o),h=N(u*t);O(h)||(h=N(-h)),a||(u=h),a||(i=r);const l=N(i*(r-s)*y-o),p=u*u,v=N((u+u)*o),b=N(l*d),w=N(s-p),E=N(s+p);return new m(N(v*E),N(w*b),N(b*E),N(v*w))}static hashToCurve(t){const e=P((t=z(t,64)).slice(0,32)),r=this.calcElligatorRistrettoMap(e),n=P(t.slice(32,64)),i=this.calcElligatorRistrettoMap(n);return new A(r.add(i))}static fromHex(t){t=z(t,32);const{a:e,d:r}=c,n="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",i=P(t);if(!function(t,e){if(t.length!==e.length)return!1;for(let r=0;r=n)throw new Error("Expected 0 < hex < P");if(!e&&o>=l)throw new Error("Expected 0 < hex < 2**256");const a=N(o*o),u=N(a-s),h=N(r*a+s);let{isValid:f,value:d}=F(u,h);if(!f)throw new Error("Point.fromHex: invalid y coordinate");const p=(d&s)===s;return 0!==(128&t[31])!==p&&(d=N(-d)),new S(d,o)}static async fromPrivateKey(t){return(await Z(t)).point}toRawBytes(){const t=T(this.y);return t[31]|=this.x&s?128:0,t}toHex(){return C(this.toRawBytes())}toX25519(){const{y:t}=this;return T(N((s+t)*U(s-t)))}isTorsionFree(){return m.fromAffine(this).isTorsionFree()}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new S(N(-this.x),this.y)}add(t){return m.fromAffine(this).add(m.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return m.fromAffine(this).multiply(t,this).toAffine()}}S.BASE=new S(c.Gx,c.Gy),S.ZERO=new S(o,s);function B(...t){if(!t.every((t=>t instanceof Uint8Array)))throw new Error("Expected Uint8Array list");if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);for(let n=0,i=0;ne.toString(16).padStart(2,"0")));function C(t){if(!(t instanceof Uint8Array))throw new Error("Uint8Array expected");let e="";for(let r=0;r=o?r:e+r}function U(t,e=c.P){if(t===o||e<=o)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=N(t,e),n=e,i=o,a=s,u=s,h=o;for(;r!==o;){const t=n/r,e=n%r,o=i-u*t,s=a-h*t;n=r,r=e,i=u,a=h,u=o,h=s}if(n!==s)throw new Error("invert: does not exist");return N(i,e)}function L(t,e){const{P:r}=c;let n=t;for(;e-- >o;)n*=n,n%=r;return n}function D(t){const{P:e}=c,r=BigInt(5),n=BigInt(10),i=BigInt(20),o=BigInt(40),u=BigInt(80),h=t*t%e*t%e,l=L(h,a)*h%e,f=L(l,s)*t%e,d=L(f,r)*f%e,p=L(d,n)*d%e,g=L(p,i)*p%e,y=L(g,o)*g%e,m=L(y,u)*y%e,v=L(m,u)*y%e,b=L(v,n)*d%e;return{pow_p_5_8:L(b,a)*t%e,b2:h}}function F(t,e){const r=N(e*e*e),n=N(r*r*e);let i=N(t*r*D(t*n).pow_p_5_8);const o=N(e*i*i),s=i,a=N(i*f),u=o===t,h=o===N(-t),c=o===N(-t*f);return u&&(i=s),(h||c)&&(i=a),O(i)&&(i=N(-i)),{isValid:u||h,value:i}}function j(t){return F(s,t)}function K(t){return N(R(t),c.l)}function z(t,e){const r=t instanceof Uint8Array?Uint8Array.from(t):I(t);if("number"===typeof e&&r.length!==e)throw new Error(`Expected ${e} bytes`);return r}function H(t,e,r=!0){if(!e)throw new TypeError("Specify max value");if("number"===typeof t&&Number.isSafeInteger(t)&&(t=BigInt(t)),"bigint"===typeof t&&t{if((t=z(t)).length<40||t.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return N(R(t),c.l-s)+s},randomBytes:(t=32)=>{if(Q.web)return Q.web.getRandomValues(new Uint8Array(t));if(Q.node){const{randomBytes:e}=Q.node;return new Uint8Array(e(t).buffer)}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>X.randomBytes(32),sha512:async(...t)=>{const e=B(...t);if(Q.web){const t=await Q.web.subtle.digest("SHA-512",e.buffer);return new Uint8Array(t)}if(Q.node)return Uint8Array.from(Q.node.createHash("sha512").update(e).digest());throw new Error("The environment doesn't have sha512 function")},precompute(t=8,e=S.BASE){const r=e.equals(S.BASE)?e:new S(e.x,e.y);return r._setWindowSize(t),r.multiply(a),r},sha512Sync:void 0};Object.defineProperties(X,{sha512Sync:{configurable:!1,get:()=>W,set(t){W||(W=t)}}})},24978:function(t,e,r){"use strict";r.d(e,{UG:function(){return O}});const n=2n**255n-19n,i=2n**252n+27742317777372353535851937790883648493n,o=0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51an,s=0x6666666666666666666666666666666666666666666666666666666666666658n,a={a:-1n,d:37095705934669439343138083508754565189542113879843219016388785533085940283555n,p:n,n:i,h:8,Gx:o,Gy:s},u=(t="")=>{throw new Error(t)},h=t=>"string"===typeof t,c=(t,e)=>!(t instanceof Uint8Array)||"number"===typeof e&&e>0&&t.length!==e?u("Uint8Array expected"):t,l=t=>new Uint8Array(t),f=(t,e)=>c(h(t)?E(t):l(t),e),d=(t,e=n)=>{let r=t%e;return r>=0n?r:e+r},p=t=>t instanceof y?t:u("Point expected");let g;class y{constructor(t,e,r,n){this.ex=t,this.ey=e,this.ez=r,this.et=n}static fromAffine(t){return new y(t.x,t.y,1n,d(t.x*t.y))}static fromHex(t,e=!0){const{d:r}=a,i=(t=f(t,32)).slice();i[31]=-129&t[31];const o=k(i);0n===o||(!e||0n0n;i=i.double(),t>>=1n)1n&t?r=r.add(i):e&&(n=n.add(i));return r}multiply(t){return this.mul(t)}clearCofactor(){return this.mul(BigInt(a.h),!1)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){let t=this.mul(i/2n,!1).double();return i%2n&&(t=t.add(this)),t.is0()}toAffine(){const{ex:t,ey:e,ez:r}=this;if(this.is0())return{x:0n,y:0n};const n=B(r);return 1n!==d(r*n)&&u("invalid inverse"),{x:d(t*n),y:d(e*n)}}toRawBytes(){const{x:t,y:e}=this.toAffine(),r=A(e);return r[31]|=1n&t?128:0,r}toHex(){return w(this.toRawBytes())}}y.BASE=new y(o,s,1n,d(o*s)),y.ZERO=new y(0n,1n,1n,0n);const{BASE:m,ZERO:v}=y,b=(t,e)=>t.toString(16).padStart(e,"0"),w=t=>Array.from(t).map((t=>b(t,2))).join(""),E=t=>{const e=t.length;(!h(t)||e%2)&&u("hex invalid 1");const r=l(e/2);for(let n=0;nE(b(t,64)).reverse(),k=t=>BigInt("0x"+w(l(c(t)).reverse())),S=(...t)=>{const e=l(t.reduce(((t,e)=>t+c(e).length),0));let r=0;return t.forEach((t=>{e.set(t,r),r+=t.length})),e},B=(t,e=n)=>{(0n===t||e<=0n)&&u("no inverse n="+t+" mod="+e);let r=d(t,e),i=e,o=0n,s=1n,a=1n,h=0n;for(;0n!==r;){const t=i/r,e=i%r,n=o-a*t,u=s-h*t;i=r,r=e,o=a,s=h,a=n,h=u}return 1n===i?d(o,e):u("no inverse")},x=(t,e)=>{let r=t;for(;e-- >0n;)r*=r,r%=n;return r},C=19681161376707505956807079304988542015446066515923890162744021073123829784752n,I=(t,e)=>{const r=d(e*e*e),i=(t=>{const e=t*t%n*t%n,r=x(e,2n)*e%n,i=x(r,1n)*t%n,o=x(i,5n)*i%n,s=x(o,10n)*o%n,a=x(s,20n)*s%n,u=x(a,40n)*a%n,h=x(u,80n)*u%n,c=x(h,80n)*u%n,l=x(c,10n)*o%n;return{pow_p_5_8:x(l,2n)*t%n,b2:e}})(t*d(r*r*e)).pow_p_5_8;let o=d(t*r*i);const s=d(e*o*o),a=o,u=d(o*C),h=s===t,c=s===d(-t),l=s===d(-t*C);return h&&(o=a),(c||l)&&(o=u),1n===(1n&d(o))&&(o=d(-o)),{isValid:h||c,value:o}};let M;const T=()=>"object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,O={bytesToHex:w,hexToBytes:E,concatBytes:S,mod:d,invert:B,randomBytes:t=>{const e=T();return e||u("crypto.getRandomValues must be defined"),e.getRandomValues(l(t))},sha512Async:async(...t)=>{const e=T();e||u("crypto.subtle or etc.sha512Async must be defined");const r=S(...t);return l(await e.subtle.digest("SHA-512",r.buffer))},sha512Sync:void 0};Object.defineProperties(O,{sha512Sync:{configurable:!1,get:()=>M,set(t){M||(M=t)}}});const R=t=>{const e=g||(g=(()=>{const t=[];let e=m,r=e;for(let n=0;n<33;n++){r=e,t.push(r);for(let n=1;n<128;n++)r=r.add(e),t.push(r);e=r.double()}return t})()),r=(t,e)=>{let r=e.negate();return t?r:e};let n=v,i=m;const o=BigInt(255),s=BigInt(8);for(let a=0;a<33;a++){const u=128*a;let h=Number(t&o);t>>=s,h>128&&(h-=256,t+=1n);const c=u,l=u+Math.abs(h)-1,f=a%2!==0,d=h<0;0===h?i=i.add(r(f,e[c])):n=n.add(r(d,e[l]))}return{p:n,f:i}}},97540:function(t,e,r){"use strict";r.d(e,{kU:function(){return l},ET:function(){return f}});var n=function(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,s=new Uint8Array(o);t[e];){var c=r[t.charCodeAt(e)];if(255===c)return;for(var l=0,f=o-1;(0!==c||l>>0,s[f]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");i=l,e++}if(" "!==t[e]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(n+(o-d)),g=n;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var s=(o-i)*c+1>>>0,h=new Uint8Array(s);i!==o;){for(var l=e[i],f=0,d=s-1;(0!==l||f>>0,h[d]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");n=f,i++}for(var p=s-n;p!==s&&0===h[p];)p++;for(var g=u.repeat(r);pnew a({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class h{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new o(t,e,r),this.decoder=new s(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const c=({name:t,prefix:e,encode:r,decode:n})=>new h(t,e,r,n),l=({prefix:t,name:e,alphabet:r})=>{const{encode:o,decode:s}=n(r,e);return c({prefix:t,name:e,encode:o,decode:t=>(0,i.oQ)(s(t))})},f=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>c({prefix:e,name:t,encode:t=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<((t,e,r,n)=>{const i={};for(let c=0;c=8&&(a-=8,s[h++]=255&u>>a)}if(a>=r||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,n,r,t)})},45522:function(t,e,r){"use strict";r.r(e),r.d(e,{base58btc:function(){return i},base58flickr:function(){return o}});var n=r(97540);const i=(0,n.kU)({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),o=(0,n.kU)({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})},23456:function(t,e,r){"use strict";r.r(e),r.d(e,{base64:function(){return i},base64pad:function(){return o},base64url:function(){return s},base64urlpad:function(){return a}});var n=r(97540);const i=(0,n.ET)({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),o=(0,n.ET)({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),s=(0,n.ET)({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),a=(0,n.ET)({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})},37594:function(t,e,r){"use strict";r.d(e,{oQ:function(){return n}});new Uint8Array(0);const n=t=>{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")}},80449:function(t,e,r){"use strict";r.d(e,{Ue:function(){return v}});r(37594);var n=function t(e,r,n){r=r||[];var o=n=n||0;for(;e>=i;)r[n++]=255&e|128,e/=128;for(;-128&e;)r[n++]=255&e|128,e>>>=7;return r[n]=0|e,t.bytes=n-o+1,r},i=Math.pow(2,31);var o=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<=128);return t.bytes=s-r,i};var s=Math.pow(2,7),a=Math.pow(2,14),u=Math.pow(2,21),h=Math.pow(2,28),c=Math.pow(2,35),l=Math.pow(2,42),f=Math.pow(2,49),d=Math.pow(2,56),p=Math.pow(2,63),g={encode:n,decode:o,encodingLength:function(t){return t(g.encode(t,e,r),e),m=t=>g.encodingLength(t),v=(t,e)=>{const r=e.byteLength,n=m(t),i=n+m(r),o=new Uint8Array(i+r);return y(t,o,0),y(r,o,n),o.set(e,i),new b(t,r,e,o)};class b{constructor(t,e,r,n){this.code=t,this.size=e,this.digest=r,this.bytes=n}}},27871:function(t,e,r){"use strict";r.r(e),r.d(e,{identity:function(){return s}});var n=r(37594),i=r(80449);const o=n.oQ,s={code:0,name:"identity",encode:o,digest:t=>i.Ue(0,o(t))}},41256:function(t,e,r){"use strict";r.r(e),r.d(e,{sha256:function(){return a},sha512:function(){return u}});var n=r(80449);const i=({name:t,code:e,encode:r})=>new o(t,e,r);class o{constructor(t,e,r){this.name=t,this.code=e,this.encode=r}digest(t){if(t instanceof Uint8Array){const e=this.encode(t);return e instanceof Uint8Array?n.Ue(this.code,e):e.then((t=>n.Ue(this.code,t)))}throw Error("Unknown type, must be binary type")}}const s=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),a=i({name:"sha2-256",code:18,encode:s("SHA-256")}),u=i({name:"sha2-512",code:19,encode:s("SHA-512")})},52587:function(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,s=new Uint8Array(o);t[e];){var c=r[t.charCodeAt(e)];if(255===c)return;for(var l=0,f=o-1;(0!==c||l>>0,s[f]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");i=l,e++}if(" "!==t[e]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(n+(o-d)),g=n;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var s=(o-i)*c+1>>>0,h=new Uint8Array(s);i!==o;){for(var l=e[i],f=0,d=s-1;(0!==l||f>>0,h[d]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");n=f,i++}for(var p=s-n;p!==s&&0===h[p];)p++;for(var g=u.repeat(r);pnew a({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class h{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new o(t,e,r),this.decoder=new s(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const c=({name:t,prefix:e,encode:r,decode:n})=>new h(t,e,r,n),l=({prefix:t,name:e,alphabet:r})=>{const{encode:o,decode:s}=n(r,e);return c({prefix:t,name:e,encode:o,decode:t=>(0,i.oQ)(s(t))})},f=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>c({prefix:e,name:t,encode:t=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<((t,e,r,n)=>{const i={};for(let c=0;c=8&&(a-=8,s[h++]=255&u>>a)}if(a>=r||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,n,r,t)})},12084:function(t,e,r){"use strict";r.r(e),r.d(e,{base16:function(){return i},base16upper:function(){return o}});var n=r(86677);const i=(0,n.ET)({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),o=(0,n.ET)({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})},72208:function(t,e,r){"use strict";r.r(e),r.d(e,{base32:function(){return i},base32hex:function(){return u},base32hexpad:function(){return c},base32hexpadupper:function(){return l},base32hexupper:function(){return h},base32pad:function(){return s},base32padupper:function(){return a},base32upper:function(){return o},base32z:function(){return f}});var n=r(86677);const i=(0,n.ET)({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),o=(0,n.ET)({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),s=(0,n.ET)({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),a=(0,n.ET)({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),u=(0,n.ET)({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),h=(0,n.ET)({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),c=(0,n.ET)({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),l=(0,n.ET)({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),f=(0,n.ET)({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})},51044:function(t,e,r){"use strict";r.r(e),r.d(e,{base36:function(){return i},base36upper:function(){return o}});var n=r(86677);const i=(0,n.kU)({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),o=(0,n.kU)({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})},86862:function(t,e,r){"use strict";r.r(e),r.d(e,{base58btc:function(){return i},base58flickr:function(){return o}});var n=r(86677);const i=(0,n.kU)({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),o=(0,n.kU)({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})},81412:function(t,e,r){"use strict";r.r(e),r.d(e,{base64:function(){return i},base64pad:function(){return o},base64url:function(){return s},base64urlpad:function(){return a}});var n=r(86677);const i=(0,n.ET)({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),o=(0,n.ET)({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),s=(0,n.ET)({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),a=(0,n.ET)({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})},33966:function(t,e,r){"use strict";r.d(e,{fS:function(){return n},oQ:function(){return i}});new Uint8Array(0);const n=(t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")}},59353:function(t,e,r){"use strict";r.r(e),r.d(e,{CID:function(){return u}});var n=r(64335),i=r(82006),o=r(86862),s=r(72208),a=r(33966);class u{constructor(t,e,r,n){this.code=e,this.version=t,this.multihash=r,this.bytes=n,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:m,byteLength:m,code:y,version:y,multihash:y,bytes:y,_baseCache:m,asCID:m})}toV0(){if(0===this.version)return this;{const{code:t,multihash:e}=this;if(t!==f)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==d)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return u.createV0(e)}}toV1(){switch(this.version){case 0:{const{code:t,digest:e}=this.multihash,r=i.create(t,e);return u.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(t){return t&&this.code===t.code&&this.version===t.version&&i.equals(this.multihash,t.multihash)}toString(t){const{bytes:e,version:r,_baseCache:n}=this;return 0===r?c(e,n,t||o.base58btc.encoder):l(e,n,t||s.base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(t){return v(/^0\.0/,b),!(!t||!t[g]&&t.asCID!==t)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(t){if(t instanceof u)return t;if(null!=t&&t.asCID===t){const{version:e,code:r,multihash:n,bytes:i}=t;return new u(e,r,n,i||p(e,r,n.bytes))}if(null!=t&&!0===t[g]){const{version:e,multihash:r,code:n}=t,o=i.decode(r);return u.create(e,n,o)}return null}static create(t,e,r){if("number"!==typeof e)throw new Error("String codecs are no longer supported");switch(t){case 0:if(e!==f)throw new Error(`Version 0 CID must use dag-pb (code: ${f}) block encoding`);return new u(t,e,r,r.bytes);case 1:{const n=p(t,e,r.bytes);return new u(t,e,r,n)}default:throw new Error("Invalid version")}}static createV0(t){return u.create(0,f,t)}static createV1(t,e){return u.create(1,t,e)}static decode(t){const[e,r]=u.decodeFirst(t);if(r.length)throw new Error("Incorrect length");return e}static decodeFirst(t){const e=u.inspectBytes(t),r=e.size-e.multihashSize,n=(0,a.oQ)(t.subarray(r,r+e.multihashSize));if(n.byteLength!==e.multihashSize)throw new Error("Incorrect length");const o=n.subarray(e.multihashSize-e.digestSize),s=new i.Digest(e.multihashCode,e.digestSize,o,n);return[0===e.version?u.createV0(s):u.createV1(e.codec,s),t.subarray(e.size)]}static inspectBytes(t){let e=0;const r=()=>{const[r,i]=n.Jx(t.subarray(e));return e+=i,r};let i=r(),o=f;if(18===i?(i=0,e=0):1===i&&(o=r()),0!==i&&1!==i)throw new RangeError(`Invalid CID version ${i}`);const s=e,a=r(),u=r(),h=e+u;return{version:i,codec:o,multihashCode:a,digestSize:u,multihashSize:h-s,size:h}}static parse(t,e){const[r,n]=h(t,e),i=u.decode(n);return i._baseCache.set(r,t),i}}const h=(t,e)=>{switch(t[0]){case"Q":{const r=e||o.base58btc;return[o.base58btc.prefix,r.decode(`${o.base58btc.prefix}${t}`)]}case o.base58btc.prefix:{const r=e||o.base58btc;return[o.base58btc.prefix,r.decode(t)]}case s.base32.prefix:{const r=e||s.base32;return[s.base32.prefix,r.decode(t)]}default:if(null==e)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}},c=(t,e,r)=>{const{prefix:n}=r;if(n!==o.base58btc.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const i=e.get(n);if(null==i){const i=r.encode(t).slice(1);return e.set(n,i),i}return i},l=(t,e,r)=>{const{prefix:n}=r,i=e.get(n);if(null==i){const i=r.encode(t);return e.set(n,i),i}return i},f=112,d=18,p=(t,e,r)=>{const i=n.P$(t),o=i+n.P$(e),s=new Uint8Array(o+r.byteLength);return n.mL(t,s,0),n.mL(e,s,i),s.set(r,o),s},g=Symbol.for("@ipld/js-cid/CID"),y={writable:!1,configurable:!1,enumerable:!0},m={writable:!1,enumerable:!1,configurable:!1},v=(t,e)=>{if(!t.test("0.0.0-dev"))throw new Error(e);console.warn(e)},b="CID.isCID(v) is deprecated and will be removed in the next major release.\nFollowing code pattern:\n\nif (CID.isCID(value)) {\n doSomethingWithCID(value)\n}\n\nIs replaced with:\n\nconst cid = CID.asCID(value)\nif (cid) {\n // Make sure to use cid instead of value\n doSomethingWithCID(cid)\n}\n"},82006:function(t,e,r){"use strict";r.r(e),r.d(e,{Digest:function(){return u},create:function(){return o},decode:function(){return s},equals:function(){return a}});var n=r(33966),i=r(64335);const o=(t,e)=>{const r=e.byteLength,n=i.P$(t),o=n+i.P$(r),s=new Uint8Array(o+r);return i.mL(t,s,0),i.mL(r,s,n),s.set(e,o),new u(t,r,e,s)},s=t=>{const e=(0,n.oQ)(t),[r,o]=i.Jx(e),[s,a]=i.Jx(e.subarray(o)),h=e.subarray(o+a);if(h.byteLength!==s)throw new Error("Incorrect length");return new u(r,s,h,e)},a=(t,e)=>t===e||t.code===e.code&&t.size===e.size&&(0,n.fS)(t.bytes,e.bytes);class u{constructor(t,e,r,n){this.code=t,this.size=e,this.digest=r,this.bytes=n}}},92792:function(t,e,r){"use strict";r.r(e),r.d(e,{identity:function(){return s}});var n=r(33966),i=r(82006);const o=n.oQ,s={code:0,name:"identity",encode:o,digest:t=>i.create(0,o(t))}},64335:function(t,e,r){"use strict";r.d(e,{Jx:function(){return y},mL:function(){return m},P$:function(){return v}});var n=function t(e,r,n){r=r||[];var o=n=n||0;for(;e>=i;)r[n++]=255&e|128,e/=128;for(;-128&e;)r[n++]=255&e|128,e>>>=7;return r[n]=0|e,t.bytes=n-o+1,r},i=Math.pow(2,31);var o=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<=128);return t.bytes=s-r,i};var s=Math.pow(2,7),a=Math.pow(2,14),u=Math.pow(2,21),h=Math.pow(2,28),c=Math.pow(2,35),l=Math.pow(2,42),f=Math.pow(2,49),d=Math.pow(2,56),p=Math.pow(2,63),g={encode:n,decode:o,encodingLength:function(t){return t[g.decode(t,e),g.decode.bytes],m=(t,e,r=0)=>(g.encode(t,e,r),e),v=t=>g.encodingLength(t)},19588:function(t,e,r){"use strict";function n(t,e){if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")};var a=function t(e,r,n){r=r||[];var i=n=n||0;for(;e>=u;)r[n++]=255&e|128,e/=128;for(;-128&e;)r[n++]=255&e|128,e>>>=7;return r[n]=0|e,t.bytes=n-i+1,r},u=Math.pow(2,31);var h=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<=128);return t.bytes=s-r,i};var c=Math.pow(2,7),l=Math.pow(2,14),f=Math.pow(2,21),d=Math.pow(2,28),p=Math.pow(2,35),g=Math.pow(2,42),y=Math.pow(2,49),m=Math.pow(2,56),v=Math.pow(2,63),b={encode:a,decode:h,encodingLength:function(t){return t[b.decode(t,e),b.decode.bytes],E=(t,e,r=0)=>(b.encode(t,e,r),e),A=t=>b.encodingLength(t),k=(t,e)=>{const r=e.byteLength,n=A(t),i=n+A(r),o=new Uint8Array(i+r);return E(t,o,0),E(r,o,n),o.set(e,i),new B(t,r,e,o)},S=t=>{const e=s(t),[r,n]=w(e),[i,o]=w(e.subarray(n)),a=e.subarray(n+o);if(a.byteLength!==i)throw new Error("Incorrect length");return new B(r,i,a,e)};class B{constructor(t,e,r,n){this.code=t,this.size=e,this.digest=r,this.bytes=n}}const x=0;var C=function(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,s=new Uint8Array(o);t[e];){var c=r[t.charCodeAt(e)];if(255===c)return;for(var l=0,f=o-1;(0!==c||l>>0,s[f]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");i=l,e++}if(" "!==t[e]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(n+(o-d)),g=n;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var s=(o-i)*c+1>>>0,h=new Uint8Array(s);i!==o;){for(var l=e[i],f=0,d=s-1;(0!==l||f>>0,h[d]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");n=f,i++}for(var p=s-n;p!==s&&0===h[p];)p++;for(var g=u.repeat(r);pnew O({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class _{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new M(t,e,r),this.decoder=new T(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const P=({name:t,prefix:e,encode:r,decode:n})=>new _(t,e,r,n),N=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=I(r,e);return P({prefix:t,name:e,encode:n,decode:t=>s(i(t))})},U=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>P({prefix:e,name:t,encode:t=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<((t,e,r,n)=>{const i={};for(let c=0;c=8&&(a-=8,s[h++]=255&u>>a)}if(a>=r||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,n,r,t)}),L=N({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),D=(N({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),N({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"})),F=(N({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),U({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5})),j=(U({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),U({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),U({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),U({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),U({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),U({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),U({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),U({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),(t,e)=>{const{bytes:r,version:n}=t;return 0===n?V(r,z(t),e||D.encoder):G(r,z(t),e||F.encoder)}),K=new WeakMap,z=t=>{const e=K.get(t);if(null==e){const e=new Map;return K.set(t,e),e}return e};class H{constructor(t,e,r,n){this.code=e,this.version=t,this.multihash=r,this.bytes=n,this["/"]=n}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:t,multihash:e}=this;if(t!==W)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==Z)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return H.createV0(e)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:t,digest:e}=this.multihash,r=k(t,e);return H.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(t){return H.equals(this,t)}static equals(t,e){const r=e;return r&&t.code===r.code&&t.version===r.version&&((t,e)=>{if(t===e)return!0;{const r=e;return t.code===r.code&&t.size===r.size&&r.bytes instanceof Uint8Array&&((t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r{const[r,n]=w(t.subarray(e));return e+=n,r};let n=r(),i=W;if(18===n?(n=0,e=0):i=r(),0!==n&&1!==n)throw new RangeError(`Invalid CID version ${n}`);const o=e,s=r(),a=r(),u=e+a;return{version:n,codec:i,multihashCode:s,digestSize:a,multihashSize:u-o,size:u}}static parse(t,e){const[r,n]=q(t,e),i=H.decode(n);if(0===i.version&&"Q"!==t[0])throw Error("Version 0 CID string must not include multibase prefix");return z(i).set(r,t),i}}const q=(t,e)=>{switch(t[0]){case"Q":{const r=e||D;return[D.prefix,r.decode(`${D.prefix}${t}`)]}case D.prefix:{const r=e||D;return[D.prefix,r.decode(t)]}case F.prefix:{const r=e||F;return[F.prefix,r.decode(t)]}default:if(null==e)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}},V=(t,e,r)=>{const{prefix:n}=r;if(n!==D.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const i=e.get(n);if(null==i){const i=r.encode(t).slice(1);return e.set(n,i),i}return i},G=(t,e,r)=>{const{prefix:n}=r,i=e.get(n);if(null==i){const i=r.encode(t);return e.set(n,i),i}return i},W=112,Z=18,J=(t,e,r)=>{const n=A(t),i=n+A(e),o=new Uint8Array(i+r.byteLength);return E(t,o,0),E(e,o,n),o.set(r,i),o},Q=Symbol.for("@ipld/js-cid/CID");var X=r(79297);const Y="/",$=(new TextEncoder).encode(Y);$[0];Symbol.toStringTag;r(88785);new Uint8Array(0);Math.pow(2,31);Math.pow(2,7),Math.pow(2,14),Math.pow(2,21),Math.pow(2,28),Math.pow(2,35),Math.pow(2,42),Math.pow(2,49),Math.pow(2,56),Math.pow(2,63);var tt=r(32114);class et{constructor(t,e,r){this.name=t,this.prefix=e,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class rt{constructor(t,e,r){if(this.name=t,this.prefix=e,void 0===e.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=e.codePointAt(0),this.baseDecode=r}decode(t){if("string"===typeof t){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(t){return it(this,t)}}class nt{constructor(t){this.decoders=t}or(t){return it(this,t)}decode(t){const e=t[0],r=this.decoders[e];if(r)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const it=(t,e)=>new nt({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class ot{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new et(t,e,r),this.decoder=new rt(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const st=({name:t,prefix:e,encode:r,decode:n})=>new ot(t,e,r,n),at=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>st({prefix:e,name:t,encode:t=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<((t,e,r,n)=>{const i={};for(let c=0;c=8&&(a-=8,s[h++]=255&u>>a)}if(a>=r||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,n,r,t)});at({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),at({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),at({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),at({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),at({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),at({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),at({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),at({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),at({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var ut=r(20605);r(19588);const ht=["string","number","bigint","symbol"],ct=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function lt(t){if(null===t)return"null";if(void 0===t)return"undefined";if(!0===t||!1===t)return"boolean";const e=typeof t;if(ht.includes(e))return e;if("function"===e)return"Function";if(Array.isArray(t))return"Array";if(function(t){return t&&t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer.call(null,t)}(t))return"Buffer";const r=function(t){const e=Object.prototype.toString.call(t).slice(8,-1);if(ct.includes(e))return e;return}(t);return r||"Object"}class ft{constructor(t,e,r){this.major=t,this.majorEncoded=t<<5,this.name=e,this.terminal=r}toString(){return`Type[${this.major}].${this.name}`}compare(t){return this.majort.major?1:0}}ft.uint=new ft(0,"uint",!0),ft.negint=new ft(1,"negint",!0),ft.bytes=new ft(2,"bytes",!0),ft.string=new ft(3,"string",!0),ft.array=new ft(4,"array",!1),ft.map=new ft(5,"map",!1),ft.tag=new ft(6,"tag",!1),ft.float=new ft(7,"float",!0),ft.false=new ft(7,"false",!0),ft.true=new ft(7,"true",!0),ft.null=new ft(7,"null",!0),ft.undefined=new ft(7,"undefined",!0),ft.break=new ft(7,"break",!0);class dt{constructor(t,e,r){this.type=t,this.value=e,this.encodedLength=r,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}}const pt=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&"function"===typeof globalThis.Buffer.isBuffer,gt=new TextDecoder,yt=new TextEncoder;function mt(t){return pt&&globalThis.Buffer.isBuffer(t)}function vt(t){return t instanceof Uint8Array?mt(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t:Uint8Array.from(t)}const bt=pt?(t,e,r)=>r-e>64?globalThis.Buffer.from(t.subarray(e,r)).toString("utf8"):xt(t,e,r):(t,e,r)=>r-e>64?gt.decode(t.subarray(e,r)):xt(t,e,r),wt=pt?t=>t.length>64?globalThis.Buffer.from(t):Bt(t):t=>t.length>64?yt.encode(t):Bt(t),Et=t=>Uint8Array.from(t),At=pt?(t,e,r)=>mt(t)?new Uint8Array(t.subarray(e,r)):t.slice(e,r):(t,e,r)=>t.slice(e,r),kt=pt?(t,e)=>(t=t.map((t=>t instanceof Uint8Array?t:globalThis.Buffer.from(t))),vt(globalThis.Buffer.concat(t,e))):(t,e)=>{const r=new Uint8Array(e);let n=0;for(let i of t)n+i.length>r.length&&(i=i.subarray(0,r.length-n)),r.set(i,n),n+=i.length;return r},St=pt?t=>globalThis.Buffer.allocUnsafe(t):t=>new Uint8Array(t);function Bt(t,e=1/0){let r;const n=t.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=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((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function xt(t,e,r){const n=[];for(;e239?4:i>223?3:i>191?2:1;if(e+s<=r){let r,n,a,u;switch(s){case 1:i<128&&(o=i);break;case 2:r=t[e+1],128===(192&r)&&(u=(31&i)<<6|63&r,u>127&&(o=u));break;case 3:r=t[e+1],n=t[e+2],128===(192&r)&&128===(192&n)&&(u=(15&i)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[e+1],n=t[e+2],a=t[e+3],128===(192&r)&&128===(192&n)&&128===(192&a)&&(u=(15&i)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),e+=s}return function(t){const e=t.length;if(e<=Ct)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nr.length/2?(e=this.cursor===r.length?r:r.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):e=At(r,0,this.cursor)}else e=kt(this.chunks,this.cursor);return t&&this.reset(),e}}const Mt=[];function Tt(t,e,r){if(t.length-e>>8,255&n])}else if(r>>24&255,n>>>16&255,n>>>8&255,255&n])}else{const n=BigInt(r);if(!(n>BigInt(32)&BigInt(4294967295));r[8]=255&i,i>>=8,r[7]=255&i,i>>=8,r[6]=255&i,i>>=8,r[5]=255&i,r[4]=255&o,o>>=8,r[3]=255&o,o>>=8,r[2]=255&o,o>>=8,r[1]=255&o,t.push(r)}}}Ut.encodedSize=function(t){return Lt.encodedSize(t.value)},Lt.encodedSize=function(t){return te.value?1:0};const Dt=BigInt(-1),Ft=BigInt(1);function jt(t,e){const r=e.value,n="bigint"===typeof r?r*Dt-Ft:-1*r-1;Lt(t,e.type.majorEncoded,n)}function Kt(t,e,r,n){Tt(t,e,r+n);const i=At(t,e+r,e+r+n);return new dt(ft.bytes,i,r+n)}function zt(t,e,r,n){return Kt(t,e,1,r)}function Ht(t){return void 0===t.encodedBytes&&(t.encodedBytes=t.type===ft.string?wt(t.value):t.value),t.encodedBytes}function qt(t,e){const r=Ht(e);Lt(t,e.type.majorEncoded,r.length),t.push(r)}function Vt(t,e,r,n,i){const o=r+n;Tt(t,e,o);const s=new dt(ft.string,bt(t,e+r,e+o),o);return!0===i.retainStringBytes&&(s.byteValue=At(t,e+r,e+o)),s}function Gt(t,e,r,n){return Vt(t,e,1,r,n)}jt.encodedSize=function(t){const e=t.value,r="bigint"===typeof e?e*Dt-Ft:-1*e-1;return re.value?-1:0},qt.encodedSize=function(t){const e=Ht(t);return Lt.encodedSize(e.length)+e.length},qt.compareTokens=function(t,e){return r=Ht(t),n=Ht(e),r.lengthn.length?1:function(t,e){if(mt(t)&&mt(e))return t.compare(e);for(let r=0;r>23,n=8388607&e;if(255===r)oe.setUint16(0,31744,!1);else if(0===r)oe.setUint16(0,(2147483648&t)>>16|n>>13,!1);else{const t=r-127;t<-24?oe.setUint16(0,0):t<-14?oe.setUint16(0,(2147483648&e)>>16|1<<24+t,!1):oe.setUint16(0,(2147483648&e)>>16|t+15<<10|n>>13,!1)}}}function ue(t,e){if(t.length-e<2)throw new Error("CBOR decode error: not enough data for float16");const r=(t[e]<<8)+t[e+1];if(31744===r)return 1/0;if(64512===r)return-1/0;if(32256===r)return NaN;const n=r>>10&31,i=1023&r;let o;return o=0===n?i*2**-24:31!==n?(i+1024)*2**(n-25):0===i?1/0:NaN,32768&r?-o:o}function he(t){oe.setFloat32(0,t,!1)}function ce(t,e){if(t.length-e<4)throw new Error("CBOR decode error: not enough data for float32");const r=(t.byteOffset||0)+e;return new DataView(t.buffer,r,4).getFloat32(0,!1)}function le(t,e){if(t.length-e<8)throw new Error("CBOR decode error: not enough data for float64");const r=(t.byteOffset||0)+e;return new DataView(t.buffer,r,8).getFloat64(0,!1)}function fe(t,e,r){throw new Error(`CBOR decode error: encountered invalid minor (${r}) for major ${t[e]>>>5}`)}function de(t){return()=>{throw new Error(`CBOR decode error: ${t}`)}}ne.compareTokens=Ut.compareTokens;const pe=[];for(let kn=0;kn<=23;kn++)pe[kn]=fe;pe[24]=function(t,e,r,n){return new dt(ft.uint,Rt(t,e+1,n),2)},pe[25]=function(t,e,r,n){return new dt(ft.uint,_t(t,e+1,n),3)},pe[26]=function(t,e,r,n){return new dt(ft.uint,Pt(t,e+1,n),5)},pe[27]=function(t,e,r,n){return new dt(ft.uint,Nt(t,e+1,n),9)},pe[28]=fe,pe[29]=fe,pe[30]=fe,pe[31]=fe;for(let kn=32;kn<=55;kn++)pe[kn]=fe;pe[56]=function(t,e,r,n){return new dt(ft.negint,-1-Rt(t,e+1,n),2)},pe[57]=function(t,e,r,n){return new dt(ft.negint,-1-_t(t,e+1,n),3)},pe[58]=function(t,e,r,n){return new dt(ft.negint,-1-Pt(t,e+1,n),5)},pe[59]=function(t,e,r,n){const i=Nt(t,e+1,n);if("bigint"!==typeof i){const t=-1-i;if(t>=Number.MIN_SAFE_INTEGER)return new dt(ft.negint,t,9)}if(!0!==n.allowBigInt)throw new Error("CBOR decode error: integers outside of the safe integer range are not supported");return new dt(ft.negint,Dt-BigInt(i),9)},pe[60]=fe,pe[61]=fe,pe[62]=fe,pe[63]=fe;for(let kn=64;kn<=87;kn++)pe[kn]=zt;pe[88]=function(t,e,r,n){return Kt(t,e,2,Rt(t,e+1,n))},pe[89]=function(t,e,r,n){return Kt(t,e,3,_t(t,e+1,n))},pe[90]=function(t,e,r,n){return Kt(t,e,5,Pt(t,e+1,n))},pe[91]=function(t,e,r,n){const i=Nt(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer bytes lengths not supported");return Kt(t,e,9,i)},pe[92]=fe,pe[93]=fe,pe[94]=fe,pe[95]=de("indefinite length bytes/strings are not supported");for(let kn=96;kn<=119;kn++)pe[kn]=Gt;pe[120]=function(t,e,r,n){return Vt(t,e,2,Rt(t,e+1,n),n)},pe[121]=function(t,e,r,n){return Vt(t,e,3,_t(t,e+1,n),n)},pe[122]=function(t,e,r,n){return Vt(t,e,5,Pt(t,e+1,n),n)},pe[123]=function(t,e,r,n){const i=Nt(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer string lengths not supported");return Vt(t,e,9,i,n)},pe[124]=fe,pe[125]=fe,pe[126]=fe,pe[127]=de("indefinite length bytes/strings are not supported");for(let kn=128;kn<=151;kn++)pe[kn]=Jt;pe[152]=function(t,e,r,n){return Zt(0,0,2,Rt(t,e+1,n))},pe[153]=function(t,e,r,n){return Zt(0,0,3,_t(t,e+1,n))},pe[154]=function(t,e,r,n){return Zt(0,0,5,Pt(t,e+1,n))},pe[155]=function(t,e,r,n){const i=Nt(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer array lengths not supported");return Zt(0,0,9,i)},pe[156]=fe,pe[157]=fe,pe[158]=fe,pe[159]=function(t,e,r,n){if(!1===n.allowIndefinite)throw new Error("CBOR decode error: indefinite length items not allowed");return Zt(0,0,1,1/0)};for(let kn=160;kn<=183;kn++)pe[kn]=Yt;pe[184]=function(t,e,r,n){return Xt(0,0,2,Rt(t,e+1,n))},pe[185]=function(t,e,r,n){return Xt(0,0,3,_t(t,e+1,n))},pe[186]=function(t,e,r,n){return Xt(0,0,5,Pt(t,e+1,n))},pe[187]=function(t,e,r,n){const i=Nt(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer map lengths not supported");return Xt(0,0,9,i)},pe[188]=fe,pe[189]=fe,pe[190]=fe,pe[191]=function(t,e,r,n){if(!1===n.allowIndefinite)throw new Error("CBOR decode error: indefinite length items not allowed");return Xt(0,0,1,1/0)};for(let kn=192;kn<=215;kn++)pe[kn]=te;pe[216]=function(t,e,r,n){return new dt(ft.tag,Rt(t,e+1,n),2)},pe[217]=function(t,e,r,n){return new dt(ft.tag,_t(t,e+1,n),3)},pe[218]=function(t,e,r,n){return new dt(ft.tag,Pt(t,e+1,n),5)},pe[219]=function(t,e,r,n){return new dt(ft.tag,Nt(t,e+1,n),9)},pe[220]=fe,pe[221]=fe,pe[222]=fe,pe[223]=fe;for(let kn=224;kn<=243;kn++)pe[kn]=de("simple values are not supported");pe[244]=fe,pe[245]=fe,pe[246]=fe,pe[247]=function(t,e,r,n){if(!1===n.allowUndefined)throw new Error("CBOR decode error: undefined values are not supported");return!0===n.coerceUndefinedToNull?new dt(ft.null,null,1):new dt(ft.undefined,void 0,1)},pe[248]=de("simple values are not supported"),pe[249]=function(t,e,r,n){return re(ue(t,e+1),3,n)},pe[250]=function(t,e,r,n){return re(ce(t,e+1),5,n)},pe[251]=function(t,e,r,n){return re(le(t,e+1),9,n)},pe[252]=fe,pe[253]=fe,pe[254]=fe,pe[255]=function(t,e,r,n){if(!1===n.allowIndefinite)throw new Error("CBOR decode error: indefinite length items not allowed");return new dt(ft.break,void 0,1)};const ge=[];for(let kn=0;kn<24;kn++)ge[kn]=new dt(ft.uint,kn,1);for(let kn=-1;kn>=-24;kn--)ge[31-kn]=new dt(ft.negint,kn,1);ge[64]=new dt(ft.bytes,new Uint8Array(0),1),ge[96]=new dt(ft.string,"",1),ge[128]=new dt(ft.array,0,1),ge[160]=new dt(ft.map,0,1),ge[244]=new dt(ft.false,!1,1),ge[245]=new dt(ft.true,!0,1),ge[246]=new dt(ft.null,null,1);const ye={float64:!1,mapSorter:function(t,e){const r=Array.isArray(t[0])?t[0][0]:t[0],n=Array.isArray(e[0])?e[0][0]:e[0];if(r.type!==n.type)return r.type.compare(n.type);const i=r.type.major,o=me[i].compareTokens(r,n);0===o&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone");return o},quickEncodeToken:function(t){switch(t.type){case ft.false:return Et([244]);case ft.true:return Et([245]);case ft.null:return Et([246]);case ft.bytes:return t.value.length?void 0:Et([64]);case ft.string:return""===t.value?Et([96]):void 0;case ft.array:return 0===t.value?Et([128]):void 0;case ft.map:return 0===t.value?Et([160]):void 0;case ft.uint:return t.value<24?Et([Number(t.value)]):void 0;case ft.negint:if(t.value>=-24)return Et([31-Number(t.value)])}}};const me=function(){const t=[];return t[ft.uint.major]=Ut,t[ft.negint.major]=jt,t[ft.bytes.major]=qt,t[ft.string.major]=Wt,t[ft.array.major]=Qt,t[ft.map.major]=$t,t[ft.tag.major]=ee,t[ft.float.major]=ne,t}(),ve=new It;class be{constructor(t,e){this.obj=t,this.parent=e}includes(t){let e=this;do{if(e.obj===t)return!0}while(e=e.parent);return!1}static createCheck(t,e){if(t&&t.includes(e))throw new Error("CBOR encode error: object contains circular references");return new be(e,t)}}const we={null:new dt(ft.null,null),undefined:new dt(ft.undefined,void 0),true:new dt(ft.true,!0),false:new dt(ft.false,!1),emptyArray:new dt(ft.array,0),emptyMap:new dt(ft.map,0)},Ee={number:(t,e,r,n)=>Number.isInteger(t)&&Number.isSafeInteger(t)?new dt(t>=0?ft.uint:ft.negint,t):new dt(ft.float,t),bigint:(t,e,r,n)=>t>=BigInt(0)?new dt(ft.uint,t):new dt(ft.negint,t),Uint8Array:(t,e,r,n)=>new dt(ft.bytes,t),string:(t,e,r,n)=>new dt(ft.string,t),boolean:(t,e,r,n)=>t?we.true:we.false,null:(t,e,r,n)=>we.null,undefined:(t,e,r,n)=>we.undefined,ArrayBuffer:(t,e,r,n)=>new dt(ft.bytes,new Uint8Array(t)),DataView:(t,e,r,n)=>new dt(ft.bytes,new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),Array(t,e,r,n){if(!t.length)return!0===r.addBreakTokens?[we.emptyArray,new dt(ft.break)]:we.emptyArray;n=be.createCheck(n,t);const i=[];let o=0;for(const s of t)i[o++]=Ae(s,r,n);return r.addBreakTokens?[new dt(ft.array,t.length),i,new dt(ft.break)]:[new dt(ft.array,t.length),i]},Object(t,e,r,n){const i="Object"!==e,o=i?t.keys():Object.keys(t),s=i?t.size:o.length;if(!s)return!0===r.addBreakTokens?[we.emptyMap,new dt(ft.break)]:we.emptyMap;n=be.createCheck(n,t);const a=[];let u=0;for(const h of o)a[u++]=[Ae(h,r,n),Ae(i?t.get(h):t[h],r,n)];return function(t,e){e.mapSorter&&t.sort(e.mapSorter)}(a,r),r.addBreakTokens?[new dt(ft.map,s),a,new dt(ft.break)]:[new dt(ft.map,s),a]}};Ee.Map=Ee.Object,Ee.Buffer=Ee.Uint8Array;for(const kn of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))Ee[`${kn}Array`]=Ee.DataView;function Ae(t,e={},r){const n=lt(t),i=e&&e.typeEncoders&&e.typeEncoders[n]||Ee[n];if("function"===typeof i){const o=i(t,n,e,r);if(null!=o)return o}const o=Ee[n];if(!o)throw new Error(`CBOR encode error: unsupported type: ${n}`);return o(t,n,e,r)}function ke(t,e,r,n){if(Array.isArray(e))for(const i of e)ke(t,i,r,n);else r[e.type.major](t,e,n)}function Se(t,e,r){const n=Ae(t,r);if(!Array.isArray(n)&&r.quickEncodeToken){const t=r.quickEncodeToken(n);if(t)return t;const i=e[n.type.major];if(i.encodedSize){const t=i.encodedSize(n,r),e=new It(t);if(i(e,n,r),1!==e.chunks.length)throw new Error(`Unexpected error: pre-calculated length for ${n} was wrong`);return vt(e.chunks[0])}}return ve.reset(),ke(ve,n,e,r),ve.toBytes(!0)}Symbol.for("DONE"),Symbol.for("BREAK");var Be=r(43720),xe=r(11227),Ce=r(62100);const Ie=Ce.Reader,Me=Ce.Writer,Te=Ce.util,Oe=Ce.roots["ipfs-ipns"]||(Ce.roots["ipfs-ipns"]={}),Re=Oe.IpnsEntry=(()=>{function t(t){if(t)for(var e=Object.keys(t),r=0;r>>3){case 1:n.value=t.bytes();break;case 2:n.signature=t.bytes();break;case 3:n.validityType=t.int32();break;case 4:n.validity=t.bytes();break;case 5:n.sequence=t.uint64();break;case 6:n.ttl=t.uint64();break;case 7:n.pubKey=t.bytes();break;case 8:n.signatureV2=t.bytes();break;case 9:n.data=t.bytes();break;default:t.skipType(7&i)}}return n},t.fromObject=function(t){if(t instanceof Oe.IpnsEntry)return t;var e=new Oe.IpnsEntry;switch(null!=t.value&&("string"===typeof t.value?Te.base64.decode(t.value,e.value=Te.newBuffer(Te.base64.length(t.value)),0):t.value.length&&(e.value=t.value)),null!=t.signature&&("string"===typeof t.signature?Te.base64.decode(t.signature,e.signature=Te.newBuffer(Te.base64.length(t.signature)),0):t.signature.length&&(e.signature=t.signature)),t.validityType){case"EOL":case 0:e.validityType=0}return null!=t.validity&&("string"===typeof t.validity?Te.base64.decode(t.validity,e.validity=Te.newBuffer(Te.base64.length(t.validity)),0):t.validity.length&&(e.validity=t.validity)),null!=t.sequence&&(Te.Long?(e.sequence=Te.Long.fromValue(t.sequence)).unsigned=!0:"string"===typeof t.sequence?e.sequence=parseInt(t.sequence,10):"number"===typeof t.sequence?e.sequence=t.sequence:"object"===typeof t.sequence&&(e.sequence=new Te.LongBits(t.sequence.low>>>0,t.sequence.high>>>0).toNumber(!0))),null!=t.ttl&&(Te.Long?(e.ttl=Te.Long.fromValue(t.ttl)).unsigned=!0:"string"===typeof t.ttl?e.ttl=parseInt(t.ttl,10):"number"===typeof t.ttl?e.ttl=t.ttl:"object"===typeof t.ttl&&(e.ttl=new Te.LongBits(t.ttl.low>>>0,t.ttl.high>>>0).toNumber(!0))),null!=t.pubKey&&("string"===typeof t.pubKey?Te.base64.decode(t.pubKey,e.pubKey=Te.newBuffer(Te.base64.length(t.pubKey)),0):t.pubKey.length&&(e.pubKey=t.pubKey)),null!=t.signatureV2&&("string"===typeof t.signatureV2?Te.base64.decode(t.signatureV2,e.signatureV2=Te.newBuffer(Te.base64.length(t.signatureV2)),0):t.signatureV2.length&&(e.signatureV2=t.signatureV2)),null!=t.data&&("string"===typeof t.data?Te.base64.decode(t.data,e.data=Te.newBuffer(Te.base64.length(t.data)),0):t.data.length&&(e.data=t.data)),e},t.toObject=function(t,e){e||(e={});var r={};if(e.defaults){if(e.bytes===String?r.value="":(r.value=[],e.bytes!==Array&&(r.value=Te.newBuffer(r.value))),e.bytes===String?r.signature="":(r.signature=[],e.bytes!==Array&&(r.signature=Te.newBuffer(r.signature))),r.validityType=e.enums===String?"EOL":0,e.bytes===String?r.validity="":(r.validity=[],e.bytes!==Array&&(r.validity=Te.newBuffer(r.validity))),Te.Long){var n=new Te.Long(0,0,!0);r.sequence=e.longs===String?n.toString():e.longs===Number?n.toNumber():n}else r.sequence=e.longs===String?"0":0;if(Te.Long){n=new Te.Long(0,0,!0);r.ttl=e.longs===String?n.toString():e.longs===Number?n.toNumber():n}else r.ttl=e.longs===String?"0":0;e.bytes===String?r.pubKey="":(r.pubKey=[],e.bytes!==Array&&(r.pubKey=Te.newBuffer(r.pubKey))),e.bytes===String?r.signatureV2="":(r.signatureV2=[],e.bytes!==Array&&(r.signatureV2=Te.newBuffer(r.signatureV2))),e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=Te.newBuffer(r.data)))}return null!=t.value&&t.hasOwnProperty("value")&&(r.value=e.bytes===String?Te.base64.encode(t.value,0,t.value.length):e.bytes===Array?Array.prototype.slice.call(t.value):t.value),null!=t.signature&&t.hasOwnProperty("signature")&&(r.signature=e.bytes===String?Te.base64.encode(t.signature,0,t.signature.length):e.bytes===Array?Array.prototype.slice.call(t.signature):t.signature),null!=t.validityType&&t.hasOwnProperty("validityType")&&(r.validityType=e.enums===String?Oe.IpnsEntry.ValidityType[t.validityType]:t.validityType),null!=t.validity&&t.hasOwnProperty("validity")&&(r.validity=e.bytes===String?Te.base64.encode(t.validity,0,t.validity.length):e.bytes===Array?Array.prototype.slice.call(t.validity):t.validity),null!=t.sequence&&t.hasOwnProperty("sequence")&&("number"===typeof t.sequence?r.sequence=e.longs===String?String(t.sequence):t.sequence:r.sequence=e.longs===String?Te.Long.prototype.toString.call(t.sequence):e.longs===Number?new Te.LongBits(t.sequence.low>>>0,t.sequence.high>>>0).toNumber(!0):t.sequence),null!=t.ttl&&t.hasOwnProperty("ttl")&&("number"===typeof t.ttl?r.ttl=e.longs===String?String(t.ttl):t.ttl:r.ttl=e.longs===String?Te.Long.prototype.toString.call(t.ttl):e.longs===Number?new Te.LongBits(t.ttl.low>>>0,t.ttl.high>>>0).toNumber(!0):t.ttl),null!=t.pubKey&&t.hasOwnProperty("pubKey")&&(r.pubKey=e.bytes===String?Te.base64.encode(t.pubKey,0,t.pubKey.length):e.bytes===Array?Array.prototype.slice.call(t.pubKey):t.pubKey),null!=t.signatureV2&&t.hasOwnProperty("signatureV2")&&(r.signatureV2=e.bytes===String?Te.base64.encode(t.signatureV2,0,t.signatureV2.length):e.bytes===Array?Array.prototype.slice.call(t.signatureV2):t.signatureV2),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?Te.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,Ce.util.toJSONOptions)},t.ValidityType=function(){const t={},e=Object.create(t);return e[t[0]="EOL"]=0,e}(),t})();const _e="ERR_UNRECOGNIZED_VALIDITY",Pe=Object.assign(xe("jsipns"),{error:xe("jsipns:error")}),Ne=((0,n.fromString)("/ipns/"),async(t,e,r,i,o,s)=>{r=BigInt(r);const a=(0,n.fromString)(o.toString()),u=await Le(t,e,i,a),h=Ue(e,a,i,r,s),c=Fe(h),l={value:e,signature:u,validityType:i,validity:a,sequence:r,ttl:s,signatureV2:await t.sign(c),data:h};return Pe(`ipns entry for ${e} created`),l}),Ue=(t,e,r,n,i)=>function(t,e){return e=Object.assign({},ye,e),Se(t,me,e)}({Value:t,Validity:e,ValidityType:r,Sequence:n,TTL:i}),Le=(t,e,r,n)=>{try{const i=De(e,r,n);return t.sign(i)}catch(i){throw Pe.error("record signature creation failed"),tt(new Error("record signature creation failed: "+i.message),"ERR_SIGNATURE_CREATION")}},De=(t,e,r)=>{const i=(0,n.fromString)((t=>{if("0"===t.toString())return"EOL";const e=new Error(`unrecognized validity type ${t.toString()}`);throw Pe.error(e),tt(e,_e)})(e));return(0,ut.concat)([t,r,i])},Fe=t=>{const e=(0,n.fromString)("ipns-signature:");return(0,ut.concat)([e,t])},je=["string","number","bigint","symbol"],Ke=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function ze(t){if(null===t)return"null";if(void 0===t)return"undefined";if(!0===t||!1===t)return"boolean";const e=typeof t;if(je.includes(e))return e;if("function"===e)return"Function";if(Array.isArray(t))return"Array";if(function(t){return t&&t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer.call(null,t)}(t))return"Buffer";const r=function(t){const e=Object.prototype.toString.call(t).slice(8,-1);if(Ke.includes(e))return e;return}(t);return r||"Object"}class He{constructor(t,e,r){this.major=t,this.majorEncoded=t<<5,this.name=e,this.terminal=r}toString(){return`Type[${this.major}].${this.name}`}compare(t){return this.majort.major?1:0}}He.uint=new He(0,"uint",!0),He.negint=new He(1,"negint",!0),He.bytes=new He(2,"bytes",!0),He.string=new He(3,"string",!0),He.array=new He(4,"array",!1),He.map=new He(5,"map",!1),He.tag=new He(6,"tag",!1),He.float=new He(7,"float",!0),He.false=new He(7,"false",!0),He.true=new He(7,"true",!0),He.null=new He(7,"null",!0),He.undefined=new He(7,"undefined",!0),He.break=new He(7,"break",!0);class qe{constructor(t,e,r){this.type=t,this.value=e,this.encodedLength=r,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}}const Ve=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&"function"===typeof globalThis.Buffer.isBuffer,Ge=new TextDecoder,We=new TextEncoder;function Ze(t){return Ve&&globalThis.Buffer.isBuffer(t)}function Je(t){return t instanceof Uint8Array?Ze(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t:Uint8Array.from(t)}const Qe=Ve?(t,e,r)=>r-e>64?globalThis.Buffer.from(t.subarray(e,r)).toString("utf8"):nr(t,e,r):(t,e,r)=>r-e>64?Ge.decode(t.subarray(e,r)):nr(t,e,r),Xe=Ve?t=>t.length>64?globalThis.Buffer.from(t):rr(t):t=>t.length>64?We.encode(t):rr(t),Ye=t=>Uint8Array.from(t),$e=Ve?(t,e,r)=>Ze(t)?new Uint8Array(t.subarray(e,r)):t.slice(e,r):(t,e,r)=>t.slice(e,r),tr=Ve?(t,e)=>(t=t.map((t=>t instanceof Uint8Array?t:globalThis.Buffer.from(t))),Je(globalThis.Buffer.concat(t,e))):(t,e)=>{const r=new Uint8Array(e);let n=0;for(let i of t)n+i.length>r.length&&(i=i.subarray(0,r.length-n)),r.set(i,n),n+=i.length;return r},er=Ve?t=>globalThis.Buffer.allocUnsafe(t):t=>new Uint8Array(t);function rr(t,e=1/0){let r;const n=t.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=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((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function nr(t,e,r){const n=[];for(;e239?4:i>223?3:i>191?2:1;if(e+s<=r){let r,n,a,u;switch(s){case 1:i<128&&(o=i);break;case 2:r=t[e+1],128===(192&r)&&(u=(31&i)<<6|63&r,u>127&&(o=u));break;case 3:r=t[e+1],n=t[e+2],128===(192&r)&&128===(192&n)&&(u=(15&i)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[e+1],n=t[e+2],a=t[e+3],128===(192&r)&&128===(192&n)&&128===(192&a)&&(u=(15&i)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),e+=s}return function(t){const e=t.length;if(e<=ir)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nr.length/2?(e=this.cursor===r.length?r:r.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):e=$e(r,0,this.cursor)}else e=tr(this.chunks,this.cursor);return t&&this.reset(),e}}const sr=[];function ar(t,e,r){if(t.length-e>>8,255&n])}else if(r>>24&255,n>>>16&255,n>>>8&255,255&n])}else{const n=BigInt(r);if(!(n>BigInt(32)&BigInt(4294967295));r[8]=255&i,i>>=8,r[7]=255&i,i>>=8,r[6]=255&i,i>>=8,r[5]=255&i,r[4]=255&o,o>>=8,r[3]=255&o,o>>=8,r[2]=255&o,o>>=8,r[1]=255&o,t.push(r)}}}dr.encodedSize=function(t){return pr.encodedSize(t.value)},pr.encodedSize=function(t){return te.value?1:0};const gr=BigInt(-1),yr=BigInt(1);function mr(t,e){const r=e.value,n="bigint"===typeof r?r*gr-yr:-1*r-1;pr(t,e.type.majorEncoded,n)}function vr(t,e,r,n){ar(t,e,r+n);const i=$e(t,e+r,e+r+n);return new qe(He.bytes,i,r+n)}function br(t,e,r,n){return vr(t,e,1,r)}function wr(t){return void 0===t.encodedBytes&&(t.encodedBytes=t.type===He.string?Xe(t.value):t.value),t.encodedBytes}function Er(t,e){const r=wr(e);pr(t,e.type.majorEncoded,r.length),t.push(r)}function Ar(t,e,r,n,i){const o=r+n;ar(t,e,o);const s=new qe(He.string,Qe(t,e+r,e+o),o);return!0===i.retainStringBytes&&(s.byteValue=$e(t,e+r,e+o)),s}function kr(t,e,r,n){return Ar(t,e,1,r,n)}mr.encodedSize=function(t){const e=t.value,r="bigint"===typeof e?e*gr-yr:-1*e-1;return re.value?-1:0},Er.encodedSize=function(t){const e=wr(t);return pr.encodedSize(e.length)+e.length},Er.compareTokens=function(t,e){return r=wr(t),n=wr(e),r.lengthn.length?1:function(t,e){if(Ze(t)&&Ze(e))return t.compare(e);for(let r=0;r>23,n=8388607&e;if(255===r)Ur.setUint16(0,31744,!1);else if(0===r)Ur.setUint16(0,(2147483648&t)>>16|n>>13,!1);else{const t=r-127;t<-24?Ur.setUint16(0,0):t<-14?Ur.setUint16(0,(2147483648&e)>>16|1<<24+t,!1):Ur.setUint16(0,(2147483648&e)>>16|t+15<<10|n>>13,!1)}}}function Fr(t,e){if(t.length-e<2)throw new Error("CBOR decode error: not enough data for float16");const r=(t[e]<<8)+t[e+1];if(31744===r)return 1/0;if(64512===r)return-1/0;if(32256===r)return NaN;const n=r>>10&31,i=1023&r;let o;return o=0===n?i*2**-24:31!==n?(i+1024)*2**(n-25):0===i?1/0:NaN,32768&r?-o:o}function jr(t){Ur.setFloat32(0,t,!1)}function Kr(t,e){if(t.length-e<4)throw new Error("CBOR decode error: not enough data for float32");const r=(t.byteOffset||0)+e;return new DataView(t.buffer,r,4).getFloat32(0,!1)}function zr(t,e){if(t.length-e<8)throw new Error("CBOR decode error: not enough data for float64");const r=(t.byteOffset||0)+e;return new DataView(t.buffer,r,8).getFloat64(0,!1)}function Hr(t,e,r){throw new Error(`CBOR decode error: encountered invalid minor (${r}) for major ${t[e]>>>5}`)}function qr(t){return()=>{throw new Error(`CBOR decode error: ${t}`)}}Pr.compareTokens=dr.compareTokens;const Vr=[];for(let kn=0;kn<=23;kn++)Vr[kn]=Hr;Vr[24]=function(t,e,r,n){return new qe(He.uint,hr(t,e+1,n),2)},Vr[25]=function(t,e,r,n){return new qe(He.uint,cr(t,e+1,n),3)},Vr[26]=function(t,e,r,n){return new qe(He.uint,lr(t,e+1,n),5)},Vr[27]=function(t,e,r,n){return new qe(He.uint,fr(t,e+1,n),9)},Vr[28]=Hr,Vr[29]=Hr,Vr[30]=Hr,Vr[31]=Hr;for(let kn=32;kn<=55;kn++)Vr[kn]=Hr;Vr[56]=function(t,e,r,n){return new qe(He.negint,-1-hr(t,e+1,n),2)},Vr[57]=function(t,e,r,n){return new qe(He.negint,-1-cr(t,e+1,n),3)},Vr[58]=function(t,e,r,n){return new qe(He.negint,-1-lr(t,e+1,n),5)},Vr[59]=function(t,e,r,n){const i=fr(t,e+1,n);if("bigint"!==typeof i){const t=-1-i;if(t>=Number.MIN_SAFE_INTEGER)return new qe(He.negint,t,9)}if(!0!==n.allowBigInt)throw new Error("CBOR decode error: integers outside of the safe integer range are not supported");return new qe(He.negint,gr-BigInt(i),9)},Vr[60]=Hr,Vr[61]=Hr,Vr[62]=Hr,Vr[63]=Hr;for(let kn=64;kn<=87;kn++)Vr[kn]=br;Vr[88]=function(t,e,r,n){return vr(t,e,2,hr(t,e+1,n))},Vr[89]=function(t,e,r,n){return vr(t,e,3,cr(t,e+1,n))},Vr[90]=function(t,e,r,n){return vr(t,e,5,lr(t,e+1,n))},Vr[91]=function(t,e,r,n){const i=fr(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer bytes lengths not supported");return vr(t,e,9,i)},Vr[92]=Hr,Vr[93]=Hr,Vr[94]=Hr,Vr[95]=qr("indefinite length bytes/strings are not supported");for(let kn=96;kn<=119;kn++)Vr[kn]=kr;Vr[120]=function(t,e,r,n){return Ar(t,e,2,hr(t,e+1,n),n)},Vr[121]=function(t,e,r,n){return Ar(t,e,3,cr(t,e+1,n),n)},Vr[122]=function(t,e,r,n){return Ar(t,e,5,lr(t,e+1,n),n)},Vr[123]=function(t,e,r,n){const i=fr(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer string lengths not supported");return Ar(t,e,9,i,n)},Vr[124]=Hr,Vr[125]=Hr,Vr[126]=Hr,Vr[127]=qr("indefinite length bytes/strings are not supported");for(let kn=128;kn<=151;kn++)Vr[kn]=xr;Vr[152]=function(t,e,r,n){return Br(0,0,2,hr(t,e+1,n))},Vr[153]=function(t,e,r,n){return Br(0,0,3,cr(t,e+1,n))},Vr[154]=function(t,e,r,n){return Br(0,0,5,lr(t,e+1,n))},Vr[155]=function(t,e,r,n){const i=fr(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer array lengths not supported");return Br(0,0,9,i)},Vr[156]=Hr,Vr[157]=Hr,Vr[158]=Hr,Vr[159]=function(t,e,r,n){if(!1===n.allowIndefinite)throw new Error("CBOR decode error: indefinite length items not allowed");return Br(0,0,1,1/0)};for(let kn=160;kn<=183;kn++)Vr[kn]=Mr;Vr[184]=function(t,e,r,n){return Ir(0,0,2,hr(t,e+1,n))},Vr[185]=function(t,e,r,n){return Ir(0,0,3,cr(t,e+1,n))},Vr[186]=function(t,e,r,n){return Ir(0,0,5,lr(t,e+1,n))},Vr[187]=function(t,e,r,n){const i=fr(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer map lengths not supported");return Ir(0,0,9,i)},Vr[188]=Hr,Vr[189]=Hr,Vr[190]=Hr,Vr[191]=function(t,e,r,n){if(!1===n.allowIndefinite)throw new Error("CBOR decode error: indefinite length items not allowed");return Ir(0,0,1,1/0)};for(let kn=192;kn<=215;kn++)Vr[kn]=Or;Vr[216]=function(t,e,r,n){return new qe(He.tag,hr(t,e+1,n),2)},Vr[217]=function(t,e,r,n){return new qe(He.tag,cr(t,e+1,n),3)},Vr[218]=function(t,e,r,n){return new qe(He.tag,lr(t,e+1,n),5)},Vr[219]=function(t,e,r,n){return new qe(He.tag,fr(t,e+1,n),9)},Vr[220]=Hr,Vr[221]=Hr,Vr[222]=Hr,Vr[223]=Hr;for(let kn=224;kn<=243;kn++)Vr[kn]=qr("simple values are not supported");Vr[244]=Hr,Vr[245]=Hr,Vr[246]=Hr,Vr[247]=function(t,e,r,n){if(!1===n.allowUndefined)throw new Error("CBOR decode error: undefined values are not supported");return!0===n.coerceUndefinedToNull?new qe(He.null,null,1):new qe(He.undefined,void 0,1)},Vr[248]=qr("simple values are not supported"),Vr[249]=function(t,e,r,n){return _r(Fr(t,e+1),3,n)},Vr[250]=function(t,e,r,n){return _r(Kr(t,e+1),5,n)},Vr[251]=function(t,e,r,n){return _r(zr(t,e+1),9,n)},Vr[252]=Hr,Vr[253]=Hr,Vr[254]=Hr,Vr[255]=function(t,e,r,n){if(!1===n.allowIndefinite)throw new Error("CBOR decode error: indefinite length items not allowed");return new qe(He.break,void 0,1)};const Gr=[];for(let kn=0;kn<24;kn++)Gr[kn]=new qe(He.uint,kn,1);for(let kn=-1;kn>=-24;kn--)Gr[31-kn]=new qe(He.negint,kn,1);Gr[64]=new qe(He.bytes,new Uint8Array(0),1),Gr[96]=new qe(He.string,"",1),Gr[128]=new qe(He.array,0,1),Gr[160]=new qe(He.map,0,1),Gr[244]=new qe(He.false,!1,1),Gr[245]=new qe(He.true,!0,1),Gr[246]=new qe(He.null,null,1);const Wr={float64:!1,mapSorter:function(t,e){const r=Array.isArray(t[0])?t[0][0]:t[0],n=Array.isArray(e[0])?e[0][0]:e[0];if(r.type!==n.type)return r.type.compare(n.type);const i=r.type.major,o=Zr[i].compareTokens(r,n);0===o&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone");return o},quickEncodeToken:function(t){switch(t.type){case He.false:return Ye([244]);case He.true:return Ye([245]);case He.null:return Ye([246]);case He.bytes:return t.value.length?void 0:Ye([64]);case He.string:return""===t.value?Ye([96]):void 0;case He.array:return 0===t.value?Ye([128]):void 0;case He.map:return 0===t.value?Ye([160]):void 0;case He.uint:return t.value<24?Ye([Number(t.value)]):void 0;case He.negint:if(t.value>=-24)return Ye([31-Number(t.value)])}}};const Zr=function(){const t=[];return t[He.uint.major]=dr,t[He.negint.major]=mr,t[He.bytes.major]=Er,t[He.string.major]=Sr,t[He.array.major]=Cr,t[He.map.major]=Tr,t[He.tag.major]=Rr,t[He.float.major]=Pr,t}(),Jr=new or;class Qr{constructor(t,e){this.obj=t,this.parent=e}includes(t){let e=this;do{if(e.obj===t)return!0}while(e=e.parent);return!1}static createCheck(t,e){if(t&&t.includes(e))throw new Error("CBOR encode error: object contains circular references");return new Qr(e,t)}}const Xr={null:new qe(He.null,null),undefined:new qe(He.undefined,void 0),true:new qe(He.true,!0),false:new qe(He.false,!1),emptyArray:new qe(He.array,0),emptyMap:new qe(He.map,0)},Yr={number:(t,e,r,n)=>Number.isInteger(t)&&Number.isSafeInteger(t)?new qe(t>=0?He.uint:He.negint,t):new qe(He.float,t),bigint:(t,e,r,n)=>t>=BigInt(0)?new qe(He.uint,t):new qe(He.negint,t),Uint8Array:(t,e,r,n)=>new qe(He.bytes,t),string:(t,e,r,n)=>new qe(He.string,t),boolean:(t,e,r,n)=>t?Xr.true:Xr.false,null:(t,e,r,n)=>Xr.null,undefined:(t,e,r,n)=>Xr.undefined,ArrayBuffer:(t,e,r,n)=>new qe(He.bytes,new Uint8Array(t)),DataView:(t,e,r,n)=>new qe(He.bytes,new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),Array(t,e,r,n){if(!t.length)return!0===r.addBreakTokens?[Xr.emptyArray,new qe(He.break)]:Xr.emptyArray;n=Qr.createCheck(n,t);const i=[];let o=0;for(const s of t)i[o++]=$r(s,r,n);return r.addBreakTokens?[new qe(He.array,t.length),i,new qe(He.break)]:[new qe(He.array,t.length),i]},Object(t,e,r,n){const i="Object"!==e,o=i?t.keys():Object.keys(t),s=i?t.size:o.length;if(!s)return!0===r.addBreakTokens?[Xr.emptyMap,new qe(He.break)]:Xr.emptyMap;n=Qr.createCheck(n,t);const a=[];let u=0;for(const h of o)a[u++]=[$r(h,r,n),$r(i?t.get(h):t[h],r,n)];return function(t,e){e.mapSorter&&t.sort(e.mapSorter)}(a,r),r.addBreakTokens?[new qe(He.map,s),a,new qe(He.break)]:[new qe(He.map,s),a]}};Yr.Map=Yr.Object,Yr.Buffer=Yr.Uint8Array;for(const kn of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))Yr[`${kn}Array`]=Yr.DataView;function $r(t,e={},r){const n=ze(t),i=e&&e.typeEncoders&&e.typeEncoders[n]||Yr[n];if("function"===typeof i){const o=i(t,n,e,r);if(null!=o)return o}const o=Yr[n];if(!o)throw new Error(`CBOR encode error: unsupported type: ${n}`);return o(t,n,e,r)}function tn(t,e,r,n){if(Array.isArray(e))for(const i of e)tn(t,i,r,n);else r[e.type.major](t,e,n)}function en(t,e,r){const n=$r(t,r);if(!Array.isArray(n)&&r.quickEncodeToken){const t=r.quickEncodeToken(n);if(t)return t;const i=e[n.type.major];if(i.encodedSize){const t=i.encodedSize(n,r),e=new or(t);if(i(e,n,r),1!==e.chunks.length)throw new Error(`Unexpected error: pre-calculated length for ${n} was wrong`);return Je(e.chunks[0])}}return Jr.reset(),tn(Jr,n,e,r),Jr.toBytes(!0)}const rn={strict:!1,allowIndefinite:!0,allowUndefined:!0,allowBigInt:!0};class nn{constructor(t,e={}){this.pos=0,this.data=t,this.options=e}done(){return this.pos>=this.data.length}next(){const t=this.data[this.pos];let e=Gr[t];if(void 0===e){const r=Vr[t];if(!r)throw new Error(`CBOR decode error: no decoder for major type ${t>>>5} (byte 0x${t.toString(16).padStart(2,"0")})`);const n=31&t;e=r(this.data,this.pos,n,this.options)}return this.pos+=e.encodedLength,e}}const on=Symbol.for("DONE"),sn=Symbol.for("BREAK");function an(t,e){if(t.done())return on;const r=t.next();if(r.type===He.break)return sn;if(r.type.terminal)return r.value;if(r.type===He.array)return function(t,e,r){const n=[];for(let i=0;inew Date(Date.now()+31536e6).toISOString(),pn=new class{constructor(t=new URL("https://name.web3.storage/"),e=function(){const t=un(30,1e4);return async()=>await t((()=>{}))}()){this.endpoint=t,this.waitForRateLimit=e}};class gn{constructor(t){this._pubKey=t}get bytes(){const t=k(x,this._pubKey.bytes);return H.createV1(114,t).bytes}toString(){const t=k(x,this._pubKey.bytes);return H.createV1(114,t).toString(L)}}class yn extends gn{constructor(t){super(t.public),this._privKey=t}get key(){return this._privKey}}async function mn(t){const e=await o.XP.unmarshalPrivateKey(t);return new yn(e)}async function vn(t,e){return new wn(t,e,0n,dn())}async function bn(t,e){const r=t.sequence+1n;return new wn(t.name,e,r,dn())}class wn{constructor(t,e,r,n){if(this._name=t,"string"!=typeof e)throw new Error("invalid value");if(this._value=e,"bigint"!=typeof r)throw new Error("invalid sequence number");if(this._sequence=r,"string"!=typeof n)throw new Error("invalid validity");this._validity=n}get name(){return this._name}get value(){return this._value}get sequence(){return this._sequence}get validity(){return this._validity}static encode(t){return e={name:t._name.toString(),value:t._value,sequence:t._sequence,validity:t._validity},r=Object.assign({},Wr,r),en(e,Zr,r);var e,r}static decode(t){const e=function(t,e){if(!(t instanceof Uint8Array))throw new Error("CBOR decode error: data to decode must be a Uint8Array");const r=(e=Object.assign({},rn,e)).tokenizer||new nn(t,e),n=an(r,e);if(n===on)throw new Error("CBOR decode error: did not find any content to decode");if(n===sn)throw new Error("CBOR decode error: got unexpected break");if(!r.done())throw new Error("CBOR decode error: too many terminals, data makes no sense");return n}(t),r=function(t){const e=H.parse(t,L);if(114!==e.code)throw new Error(`Invalid key, expected 114 codec code but got ${e.code}`);const r=o.XP.unmarshalPublicKey(S(e.multihash.bytes).bytes);return new gn(r)}(e.name);return new wn(r,e.value,BigInt(e.sequence),e.validity)}}async function En(t,e,r=pn){const o=new URL(`name/${t.name.toString()}`,r.endpoint),s=await((t,e,r,n)=>{const i=new X(Date.now()+Number(n)),o=Re.ValidityType.EOL,[s,a]=n.toString().split("."),u=BigInt(s)*BigInt(1e5)+BigInt(a||0);return Ne(t,e,r,o,i,u)})(e,(0,n.fromString)(t.value),t.sequence,new Date(t.validity).getTime()-Date.now());var a;await r.waitForRateLimit(),await An(fn(o.toString(),{method:"POST",body:(0,i.toString)((a=s,Re.encode({...a,sequence:Be.fromString(a.sequence.toString()),ttl:null==a.ttl?void 0:Be.fromString(a.ttl.toString())}).finish()),"base64pad")}))}async function An(t){const e=await t;if(e.ok)return e;let r;try{const t=await e.json();r=new Error(t.message)}catch(t){r=new Error(`unexpected response from API, cannot parse error response. Received status: ${e.status}`)}throw r}}}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5246],{59654:function(t,e,r){"use strict";r.d(e,{Z_:function(){return en}});var n=r(27715),i=r(1191),o=r(77191),s=r.n(o),a=r(35682),u=r(58162),h=r.n(u),c=r(89509),l=r(24736),f=r.n(l);const d=new Array(16),p=I([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=I([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]),y=I([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),m=I([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]),v=M([0,1518500249,1859775393,2400959708,2840853838]),b=M([1352829926,1548603684,1836072691,2053994217,0]);function w(t,e){return t<>>32-e}function E(t,e,r,n,i,o,s,a){return w(t+(e^r^n)+o+s|0,a)+i|0}function A(t,e,r,n,i,o,s,a){return w(t+(e&r|~e&n)+o+s|0,a)+i|0}function k(t,e,r,n,i,o,s,a){return w(t+((e|~r)^n)+o+s|0,a)+i|0}function S(t,e,r,n,i,o,s,a){return w(t+(e&n|r&~n)+o+s|0,a)+i|0}function B(t,e,r,n,i,o,s,a){return w(t+(e^(r|~n))+o+s|0,a)+i|0}function x(t,e,r){return e=+e,t[(r>>>=0)+3]=e>>>24,t[r+2]=e>>>16,t[r+1]=e>>>8,t[r]=255&e,r+4}function C(t,e,r){return e=+e,t[r>>>=0]=255&e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,r+4}function M(t){return"undefined"!==typeof Uint32Array?new Uint32Array(t):t}function I(t){return"undefined"!==typeof Uint8Array?new Uint8Array(t):t}function T(t){return"undefined"!==typeof Uint8Array?new Uint8Array(t):new Array(t)}class O{constructor(){this._block=T(64),this._blockSize=64,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1,this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}update(t){if(this._finalized)throw new Error("Digest already called");const e=this._block;let r=0;for(;this._blockOffset+t.length-r>=this._blockSize;){for(let n=this._blockOffset;n0;++n)this._length[n]+=i,i=this._length[n]/4294967296|0,i>0&&(this._length[n]-=4294967296*i);return this}_update(){const t=d;for(let d=0;d<16;++d)t[d]=(e=this._block,r=4*d,e[r>>>=0]|e[r+1]<<8|e[r+2]<<16|e[r+3]<<24);var e,r;let n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,u=0|this._a,h=0|this._b,c=0|this._c,l=0|this._d,f=0|this._e;for(let d=0;d<80;d+=1){let e,r;d<16?(e=E(n,i,o,s,a,t[p[d]],v[0],y[d]),r=B(u,h,c,l,f,t[g[d]],b[0],m[d])):d<32?(e=A(n,i,o,s,a,t[p[d]],v[1],y[d]),r=S(u,h,c,l,f,t[g[d]],b[1],m[d])):d<48?(e=k(n,i,o,s,a,t[p[d]],v[2],y[d]),r=k(u,h,c,l,f,t[g[d]],b[2],m[d])):d<64?(e=S(n,i,o,s,a,t[p[d]],v[3],y[d]),r=A(u,h,c,l,f,t[g[d]],b[3],m[d])):(e=B(n,i,o,s,a,t[p[d]],v[4],y[d]),r=E(u,h,c,l,f,t[g[d]],b[4],m[d])),n=a,a=s,s=w(o,10),o=i,i=e,u=f,f=l,l=w(c,10),c=h,h=r}const x=this._b+o+l|0;this._b=this._c+s+f|0,this._c=this._d+a+u|0,this._d=this._e+n+h|0,this._e=this._a+i+c|0,this._a=x}digest(){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,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),x(this._block,this._length[0],56),x(this._block,this._length[1],60),this._update();const t=T(20);C(t,this._a,0),C(t,this._b,4),C(t,this._c,8),C(t,this._d,12),C(t,this._e,16),this._block.fill(0),this._blockOffset=0;for(let e=0;e<4;++e)this._length[e]=0;return t}}var R=r(8442),_=r(48764).Buffer,P="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",N=function(t){for(var e=t.toString(),r="",n=0;n>2,r[5*n+1]=(3&i[1])<<6|i[2]<<1|i[3]>>4,r[5*n+2]=(15&i[3])<<4|i[4]>>1,r[5*n+3]=(1&i[4])<<7|i[5]<<2|i[6]>>3,r[5*n+4]=(7&i[6])<<5|i[7]}return r},L=function(t){var e=[],r=Math.floor(t.length/5),n=t.length%5;if(0!=n){for(var i=0;i<5-n;i++)t+="\0";r+=1}for(var o=0;o>3)),e.push(P.charAt((7&t.charCodeAt(5*o))<<2|t.charCodeAt(5*o+1)>>6)),e.push(P.charAt((63&t.charCodeAt(5*o+1))>>1)),e.push(P.charAt((1&t.charCodeAt(5*o+1))<<4|t.charCodeAt(5*o+2)>>4)),e.push(P.charAt((15&t.charCodeAt(5*o+2))<<1|t.charCodeAt(5*o+3)>>7)),e.push(P.charAt((127&t.charCodeAt(5*o+3))>>2)),e.push(P.charAt((3&t.charCodeAt(5*o+3))<<3|t.charCodeAt(5*o+4)>>5)),e.push(P.charAt(31&t.charCodeAt(5*o+4)));var s=0;1==n?s=6:2==n?s=4:3==n?s=3:4==n&&(s=1);for(var a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0;this._block.writeUInt32BE((r-n)/4294967296,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return t?i.toString(t):i},j.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var K,z,H=[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],q=new Array(64);function V(){this.init(),this._w=q,j.call(this,64,56)}function G(t,e,r){return r^t&(e^r)}function W(t,e,r){return t&e|r&(t|e)}function Z(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function J(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function Q(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function X(t){return void 0!==t.length}K=V,(z=j)&&(K.super_=z,K.prototype=Object.create(z.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}})),V.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},V.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,u=0|this._f,h=0|this._g,c=0|this._h,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<64;++l)r[l]=0|(((e=r[l-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[l-7]+Q(r[l-15])+r[l-16];for(var f=0;f<64;++f){var d=c+J(a)+G(a,u,h)+H[f]+r[f]|0,p=Z(n)+W(n,i,o)|0;c=h,h=u,u=a,a=s+d|0,s=o,o=i,i=n,n=d+p|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=a+this._e|0,this._f=u+this._f|0,this._g=h+this._g|0,this._h=c+this._h|0},V.prototype._hash=function(){var t=c.Buffer.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var Y=new(function(){function t(t){this.sha256=t.sha256,this.alphabet=t.alphabet,this.codec=h()(this.alphabet),this.base=this.alphabet.length}var e=t.prototype;return e.encodeChecked=function(t){var e=this.sha256(this.sha256(t)).slice(0,4);return this.encodeRaw(_.from(function(){var t=[];return[].slice.call(arguments).forEach((function(e){if(X(e))for(var r=0;r= 5");if(!this.verifyCheckSum(e))throw new Error("checksum_invalid");return e.slice(0,-4)},e.decodeRaw=function(t){return this.codec.decode(t)},e.verifyCheckSum=function(t){return function(t,e){if(t.length!==e.length)return!1;for(var r=0;r=8?n[s].toUpperCase():n[s];return o};var et=function(t,e){if(!t)throw e},rt=function(t,e){if(!_.isBuffer(t))throw e},nt=f().one,it=f().zero,ot=f()(3);function st(t,e){return t.and(nt.shiftLeft(e)).notEquals(it)}function at(t){return f().fromArray(Array.prototype.slice.call(t,0),256)}function ut(t,e){var r=t.toArray(256).value,n=e?Math.max(e-r.length,0):0;return _.from([].concat(Array(n).fill(0),r))}function ht(t,e,r,n){et(void 0!==n,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=r,this.z=n,this._zInv=null,this.compressed=!0}Object.defineProperty(ht.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInv(this.curve.p)),this._zInv}}),Object.defineProperty(ht.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(ht.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),ht.fromAffine=function(t,e,r){return new ht(t,e,r,nt)},ht.prototype.equals=function(t){return t===this||(this.curve.isInfinity(this)?this.curve.isInfinity(t):this.curve.isInfinity(t)?this.curve.isInfinity(this):0===t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p).compare(it)&&0===t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p).compare(it))},ht.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new ht(this.curve,this.x,t,this.z)},ht.prototype.add=function(t){if(this.curve.isInfinity(this))return t;if(this.curve.isInfinity(t))return this;var e=this.x,r=this.y,n=t.x,i=t.y.multiply(this.z).subtract(r.multiply(t.z)).mod(this.curve.p),o=n.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===o.compare(it))return 0===i.compare(it)?this.twice():this.curve.infinity;var s=o.square(),a=s.multiply(o),u=e.multiply(s),h=i.square().multiply(this.z),c=h.subtract(u.shiftLeft(1)).multiply(t.z).subtract(a).multiply(o).mod(this.curve.p),l=u.multiply(ot).multiply(i).subtract(r.multiply(a)).subtract(h.multiply(i)).multiply(t.z).add(i.multiply(a)).mod(this.curve.p),f=a.multiply(this.z).multiply(t.z).mod(this.curve.p);return new ht(this.curve,c,l,f)},ht.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(0===this.y.compare(it))return this.curve.infinity;var t=this.x,e=this.y,r=e.multiply(this.z).mod(this.curve.p),n=r.multiply(e).mod(this.curve.p),i=this.curve.a,o=t.square().multiply(ot);0!==i.compare(it)&&(o=o.add(this.z.square().multiply(i)));var s=(o=o.mod(this.curve.p)).square().subtract(t.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.p),a=o.multiply(ot).multiply(t).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(o.pow(3)).mod(this.curve.p),u=r.pow(3).shiftLeft(3).mod(this.curve.p);return new ht(this.curve,s,a,u)},ht.prototype.multiply=function(t){if(this.curve.isInfinity(this))return this;if(0===t.compare(it))return this.curve.infinity;for(var e=t,r=e.multiply(ot),n=this.negate(),i=this,o=r.bitLength()-2;o>0;--o){var s=st(r,o),a=st(e,o);i=i.twice(),s!==a&&(i=i.add(s?this:n))}return i},ht.prototype.multiplyTwo=function(t,e,r){for(var n=Math.max(t.bitLength(),r.bitLength())-1,i=this.curve.infinity,o=this.add(e);n>=0;){var s=st(t,n),a=st(r,n);i=i.twice(),s?i=i.add(a?o:this):a&&(i=i.add(e)),--n}return i},ht.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return new _("00","hex");var e,r=this.affineX,n=this.affineY,i=this.curve.pLength;return t?(e=new _(1+i)).writeUInt8(n.isEven()?2:3,0):((e=new _(1+i+i)).writeUInt8(4,0),ut(n,i).copy(e,1+i)),ut(r,i).copy(e,1),e},ht.decodeFrom=function(t,e){var r,n=e.readUInt8(0),i=4!==n,o=Math.floor((t.p.bitLength()+7)/8),s=at(e.slice(1,1+o));if(i)et(e.length===o+1,"Invalid sequence length"),et(2===n||3===n,"Invalid sequence tag"),r=t.pointFromX(3===n,s);else{et(e.length===1+o+o,"Invalid sequence length");var a=at(e.slice(1+o));r=ht.fromAffine(t,s,a)}return r.compressed=i,r},ht.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"};var ct=f().zero,lt=f().one;function ft(t,e,r,n,i,o,s){this.p=t,this.a=e,this.b=r,this.G=ht.fromAffine(this,n,i),this.n=o,this.h=s,this.infinity=new ht(this,null,null,ct),this.pOverFour=t.add(lt).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}ft.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p).modPow(this.pOverFour,this.p),n=r;return r.isEven()^!t&&(n=this.p.subtract(n)),ht.fromAffine(this,e,n)},ft.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.compare(ct)&&0!==t.y.compare(ct)},ft.prototype.isOnCurve=function(t){if(this.isInfinity(t))return!0;var e=t.affineX,r=t.affineY,n=this.a,i=this.b,o=this.p;if(e.compare(ct)<0||e.compareTo(o)>=0)return!1;if(r.compare(ct)<0||r.compareTo(o)>=0)return!1;var s=r.square().mod(o),a=e.pow(3).add(n.multiply(e)).add(i).mod(o);return s.equals(a)},ft.prototype.validate=function(t){et(!this.isInfinity(t),"Point is at infinity"),et(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return et(this.isInfinity(e),"Point is not a scalar multiple of G"),!0};var dt={p:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",a:"00",b:"07",n:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",h:"01",Gx:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",Gy:"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"};function pt(t,e){return new a.Aj(256).update(t).digest(e)}function gt(t){return _.from((new O).update(t).digest())}function yt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(rt(t,"expecting keyBuffer"),"sha256x2"===e){var r=pt(pt(t)).slice(0,4);return s().encode(_.concat([t,r]))}var n=[t];e&&n.push(_.from(e));var i=gt(_.concat(n)).slice(0,4);return s().encode(_.concat([t,i]))}function mt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;et(t,"private key expected");var r,n=new _(s().decode(t)),i=n.slice(-4),o=n.slice(0,-4);if("sha256x2"===e)r=pt(pt(o)).slice(0,4);else{var a=[o];e&&a.push(_.from(e)),r=gt(_.concat(a)).slice(0,4)}if(i.toString("hex")!==r.toString("hex"))throw new Error("Invalid checksum, "+"".concat(i.toString("hex")," != ").concat(r.toString("hex")));return o}var vt=function(t){var e=dt;if(!e)return null;var r=f()(e.p,16),n=f()(e.a,16),i=f()(e.b,16),o=f()(e.n,16),s=f()(e.h,16);return new ft(r,n,i,f()(e.Gx,16),f()(e.Gy,16),o,s)}();function bt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EOS";if("string"==typeof t)return bt.fromString(t,e);if(_.isBuffer(t))return bt.fromBuffer(t);if("object"==typeof t&&t.Q)return bt(t.Q);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.compressed;return t.getEncoded(e)}function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"EOS";return t+yt(r())}function i(){return r().toString("hex")}return{Q:t,toString:n,toBuffer:r,toHex:i}}bt.isValid=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EOS";try{return bt(t,e),!0}catch(t){return!1}},bt.fromBuffer=function(t){return bt(ht.decodeFrom(vt,t))},bt.fromString=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EOS";try{return bt.fromStringOrThrow(t,e)}catch(t){return null}},bt.fromStringOrThrow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EOS",r=t.match(/^PUB_([A-Za-z0-9]+)_([A-Za-z0-9]+)$/);if(null===r){var n=new RegExp("^"+e);return n.test(t)&&(t=t.substring(e.length)),bt.fromBuffer(mt(t))}var i=r[1],o=r[2];return bt.fromBuffer(mt(o,i))},bt.fromHex=function(t){return bt.fromBuffer(new _(t,"hex"))},bt.fromStringHex=function(t){return bt.fromString(new _(t,"hex"))};var wt=h()("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Et=wt.encode,At=wt.decode,kt=function(t){return void 0===t},St={ed25519PublicKey:48,ed25519SecretSeed:144,preAuthTx:152,sha256Hash:184},Bt=function(t){var e=_.alloc(2);return e.writeUInt16LE(function(t,e){_.isBuffer(t)||(t=new _);for(var r=0,n=0;n>>8&255;i^=255&t[n],r=r<<8&65535,r^=i^=i>>>4,r^=i=i<<5&65535,r^=i=i<<7&65535}return r}(t),0),e},xt=function(t,e){if(t.length!==e.length)return!1;if(0===t.length)return!0;for(var r=0;r>>=t,e|=this.hi<<32-t):e=this.hi>>>t-32),e},t}(),jt=_.allocUnsafe(105),Kt="qpzry9x8gf2tvdw0s3jn54khce6mua7l",zt=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,15,-1,10,17,21,20,26,30,7,5,-1,-1,-1,-1,-1,-1,-1,29,-1,24,13,25,9,8,23,-1,18,22,31,27,19,-1,1,0,3,16,11,28,12,14,6,4,2,-1,-1,-1,-1,-1,-1,29,-1,24,13,25,9,8,23,-1,18,22,31,27,19,-1,1,0,3,16,11,28,12,14,6,4,2,-1,-1,-1,-1,-1],Ht=new Ft(7,4294967295),qt=[new Ft(152,4072443489),new Ft(121,3077413346),new Ft(243,1046459332),new Ft(174,783016616),new Ft(30,1329849456)];function Vt(t,e){var r=t,n=r.hi>>>3;r.hi&=Ht.hi,r.lo&=Ht.lo,r.hi<<=5,r.hi|=r.lo>>>27,r.lo<<=5;for(var i=0;i>>i&1&&(r.hi^=qt[i].hi,r.lo^=qt[i].lo);return r.lo^=e,r}function Gt(t,e,r,n,i,o,s){Dt(_.isBuffer(t)),Dt(e>>>0===e),Dt(_.isBuffer(r)),Dt(n>>>0===n),Dt((255&i)===i),Dt((255&o)===o),Dt("boolean"==typeof s);for(var a=(1<>>i!=0)throw new Error("Invalid bits.");for(u=u<=o;)r[n++]=u>>>(h-=o)&a}if(s)h&&(r[n++]=u<=i||u<83)throw new Error("Invalid cashaddr prefix.");var n=function(t){switch(Dt(t>>>0===t),t){case 20:return 0;case 24:return 1;case 28:return 2;case 32:return 3;case 40:return 4;case 48:return 5;case 56:return 6;case 64:return 7;default:throw new Error("Non standard length.")}}(r.length),i=_.allocUnsafe(r.length+1);return i[0]=e<<3|n,r.copy(i,1),function(t,e){Dt("string"==typeof t),Dt(_.isBuffer(e));for(var r=new Ft(0,1),n="",i=!1,o=!1,s=0;s>>5==0)throw new Error("Invalid cashaddr character.");if(a>=97&&a<=122)o=!0;else if(a>=65&&a<=90)i=!0,a=a-65+97;else if(a>=48&&a<=57)throw new Error("Invalid cashaddr prefix.");Vt(r,31&a),n+=String.fromCharCode(a)}if(o&&i)throw new Error("Invalid cashaddr prefix.");Vt(r,0),n+=":";for(var u=0;u>>5!=0)throw new Error("Invalid cashaddr value.");Vt(r,h),n+=Kt[h]}for(var c=0;c<8;c++)Vt(r,0);r.lo^=1;for(var l=0;l<8;l++){var f=31&r.ushrn32(5*(7-l));n+=Kt[f]}return n}(t,Gt(i,0,jt,0,8,5,!0))}var Zt=function(t){function e(e){var r=e.slice(0,-4),n=e.slice(-4),i=t(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{bs58Encode:function(e){var r=t(e);return s().encode(_.concat([e,r],e.length+4))},bs58Decode:function(t){var r=e(s().decode(t));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(t){var r=s().decodeUnsafe(t);if(r)return e(r)}}}((function(t){var e=(new V).update(t).digest();return(new V).update(e).digest()})),Jt=Zt.bs58Decode,Qt=Zt.bs58Encode,Xt=r(30728),Yt=r(93434),$t=r(83854),te=r(72023),ee=r(48764).Buffer;function re(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var ie,oe=(function(t){var e=function(t){var r=1e7,n=9007199254740992,i=c(n),o=Math.log(n);function s(t,e){return void 0===t?s[0]:void 0!==e?10==+e?V(t):F(t,e):V(t)}function a(t,e){this.value=t,this.sign=e,this.isSmall=!1}function u(t){this.value=t,this.sign=t<0,this.isSmall=!0}function h(t){return-n0?Math.floor(t):Math.ceil(t)}function g(t,e){var n,i,o=t.length,s=e.length,a=new Array(o),u=0,h=r;for(i=0;i=h?1:0)*h;for(;i0&&a.push(u),a}function y(t,e){return t.length>=e.length?g(t,e):g(e,t)}function m(t,e){var n,i,o=t.length,s=new Array(o),a=r;for(i=0;i0;)s[i++]=e%a,e=Math.floor(e/a);return s}function v(t,e){var r,n,i=t.length,o=e.length,s=new Array(i),a=0;for(r=0;r0;)s[i++]=u%a,u=Math.floor(u/a);return s}function A(t,e){for(var r=[];e-- >0;)r.push(0);return r.concat(t)}function k(t,e,n){return new a(t=0;--r)i=(o=1e7*i+t[r])-(n=p(o/e))*e,a[r]=0|n;return[a,0|i]}function x(t,e){var n,i,o=V(e),h=t.value,g=o.value;if(0===g)throw new Error("Cannot divide by zero");if(t.isSmall)return o.isSmall?[new u(p(h/g)),new u(h%g)]:[s[0],t];if(o.isSmall){if(1===g)return[t,s[0]];if(-1==g)return[t.negate(),s[0]];var y=Math.abs(g);if(y=0;i--){for(n=p-1,v[i+f]!==y&&(n=Math.floor((v[i+f]*p+v[i+f-1])/y)),o=0,s=0,u=b.length,a=0;aa&&(i=1e7*(i+1)),r=Math.ceil(i/(1e7*e[a-1]+e[a-2]));do{if(C(o=E(e,r),h)<=0)break;r--}while(r);u.push(r),h=v(h,o)}return u.reverse(),[l(u),l(h)]}(h,g);var w=t.sign!==o.sign,A=n[1],k=t.sign;return"number"==typeof(i=n[0])?(w&&(i=-i),i=new u(i)):i=new a(i,w),"number"==typeof A?(k&&(A=-A),A=new u(A)):A=new a(A,k),[i,A]}function C(t,e){if(t.length!==e.length)return t.length>e.length?1:-1;for(var r=t.length-1;r>=0;r--)if(t[r]!==e[r])return t[r]>e[r]?1:-1;return 0}function M(t){var e=t.abs();return!e.isUnit()&&(!!(e.equals(2)||e.equals(3)||e.equals(5))||!(e.isEven()||e.isDivisibleBy(3)||e.isDivisibleBy(5))&&(!!e.lesser(49)||void 0))}function I(t,r){for(var n,i,o,a=t.prev(),u=a,h=0;u.isEven();)u=u.divide(2),h++;t:for(i=0;i=0?n=v(t,e):(n=v(e,t),r=!r),"number"==typeof(n=l(n))?(r&&(n=-n),new u(n)):new a(n,r)}(r,n,this.sign)},a.prototype.minus=a.prototype.subtract,u.prototype.subtract=function(t){var e=V(t),r=this.value;if(r<0!==e.sign)return this.add(e.negate());var n=e.value;return e.isSmall?new u(r-n):b(n,Math.abs(r),r>=0)},u.prototype.minus=u.prototype.subtract,a.prototype.negate=function(){return new a(this.value,!this.sign)},u.prototype.negate=function(){var t=this.sign,e=new u(-this.value);return e.sign=!t,e},a.prototype.abs=function(){return new a(this.value,!1)},u.prototype.abs=function(){return new u(Math.abs(this.value))},a.prototype.multiply=function(t){var e,n,i,o=V(t),u=this.value,h=o.value,l=this.sign!==o.sign;if(o.isSmall){if(0===h)return s[0];if(1===h)return this;if(-1===h)return this.negate();if((e=Math.abs(h))0?new a(function t(e,r){var n=Math.max(e.length,r.length);if(n<=30)return w(e,r);n=Math.ceil(n/2);var i=e.slice(n),o=e.slice(0,n),s=r.slice(n),a=r.slice(0,n),u=t(o,a),h=t(i,s),c=t(y(o,i),y(a,s)),l=y(y(u,A(v(v(c,u),h),n)),A(h,2*n));return f(l),l}(u,h),l):new a(w(u,h),l)},a.prototype.times=a.prototype.multiply,u.prototype._multiplyBySmall=function(t){return h(t.value*this.value)?new u(t.value*this.value):k(Math.abs(t.value),c(Math.abs(this.value)),this.sign!==t.sign)},a.prototype._multiplyBySmall=function(t){return 0===t.value?s[0]:1===t.value?this:-1===t.value?this.negate():k(Math.abs(t.value),this.value,this.sign!==t.sign)},u.prototype.times=u.prototype.multiply=function(t){return V(t)._multiplyBySmall(this)},a.prototype.square=function(){return new a(S(this.value),!1)},u.prototype.square=function(){var t=this.value*this.value;return h(t)?new u(t):new a(S(c(Math.abs(this.value))),!1)},u.prototype.divmod=a.prototype.divmod=function(t){var e=x(this,t);return{quotient:e[0],remainder:e[1]}},u.prototype.over=u.prototype.divide=a.prototype.over=a.prototype.divide=function(t){return x(this,t)[0]},u.prototype.remainder=u.prototype.mod=a.prototype.remainder=a.prototype.mod=function(t){return x(this,t)[1]},a.prototype.pow=function(t){var e,r,n,i=V(t),o=this.value,a=i.value;if(0===a)return s[1];if(0===o)return s[0];if(1===o)return s[1];if(-1===o)return i.isEven()?s[1]:s[-1];if(i.sign)return s[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&h(e=Math.pow(o,a)))return new u(p(e));for(r=this,n=s[1];!0&a&&(n=n.times(r),--a),0!==a;)a/=2,r=r.square();return n},u.prototype.pow=a.prototype.pow,u.prototype.modPow=a.prototype.modPow=function(t,e){if(t=V(t),(e=V(e)).isZero())throw new Error("Cannot take modPow with modulus 0");for(var r=s[1],n=this.mod(e);t.isPositive();){if(n.isZero())return s[0];t.isOdd()&&(r=r.multiply(n).mod(e)),t=t.divide(2),n=n.square().mod(e)}return r},a.prototype.compareAbs=function(t){var e=V(t);return e.isSmall?1:C(this.value,e.value)},u.prototype.compareAbs=function(t){var e=V(t),r=Math.abs(this.value),n=e.value;return e.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},a.prototype.compareTo=a.prototype.compare=function(t){if(1/0===t)return-1;if(-1/0===t)return 1;var e=V(t);return this.sign!==e.sign?e.sign?1:-1:e.isSmall?this.sign?-1:1:C(this.value,e.value)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare=function(t){if(1/0===t)return-1;if(-1/0===t)return 1;var e=V(t),r=this.value,n=e.value;return e.isSmall?r==n?0:r>n?1:-1:r<0!==e.sign?r<0?-1:1:r<0?1:-1},u.prototype.eq=u.prototype.equals=a.prototype.eq=a.prototype.equals=function(t){return 0===this.compare(t)},u.prototype.neq=u.prototype.notEquals=a.prototype.neq=a.prototype.notEquals=function(t){return 0!==this.compare(t)},u.prototype.gt=u.prototype.greater=a.prototype.gt=a.prototype.greater=function(t){return this.compare(t)>0},u.prototype.lt=u.prototype.lesser=a.prototype.lt=a.prototype.lesser=function(t){return this.compare(t)<0},u.prototype.geq=u.prototype.greaterOrEquals=a.prototype.geq=a.prototype.greaterOrEquals=function(t){return this.compare(t)>=0},u.prototype.leq=u.prototype.lesserOrEquals=a.prototype.leq=a.prototype.lesserOrEquals=function(t){return this.compare(t)<=0},a.prototype.isEven=function(){return 0==(1&this.value[0])},u.prototype.isEven=function(){return 0==(1&this.value)},a.prototype.isOdd=function(){return 1==(1&this.value[0])},u.prototype.isOdd=function(){return 1==(1&this.value)},a.prototype.isPositive=function(){return!this.sign},u.prototype.isPositive=function(){return this.value>0},a.prototype.isNegative=function(){return this.sign},u.prototype.isNegative=function(){return this.value<0},a.prototype.isUnit=function(){return!1},u.prototype.isUnit=function(){return 1===Math.abs(this.value)},a.prototype.isZero=function(){return!1},u.prototype.isZero=function(){return 0===this.value},u.prototype.isDivisibleBy=a.prototype.isDivisibleBy=function(t){var e=V(t),r=e.value;return 0!==r&&(1===r||(2===r?this.isEven():this.mod(e).equals(s[0])))},u.prototype.isPrime=a.prototype.isPrime=function(t){var r=M(this);if(void 0!==r)return r;var n=this.abs(),i=n.bitLength();if(i<=64)return I(n,[2,325,9375,28178,450775,9780504,1795265022]);for(var o=Math.log(2)*i,s=Math.ceil(!0===t?2*Math.pow(o,2):o),a=[],u=0;u-n?new u(t-1):new a(i,!0)};for(var T=[1];2*T[T.length-1]<=r;)T.push(2*T[T.length-1]);var O=T.length,R=T[O-1];function _(t){return("number"==typeof t||"string"==typeof t)&&+Math.abs(t)<=r||t instanceof a&&t.value.length<=1}function P(t,r,n){r=V(r);for(var i=t.isNegative(),o=r.isNegative(),s=i?t.not():t,a=o?r.not():r,u=0,h=0,c=null,l=null,f=[];!s.isZero()||!a.isZero();)u=(c=x(s,R))[1].toJSNumber(),i&&(u=R-1-u),h=(l=x(a,R))[1].toJSNumber(),o&&(h=R-1-h),s=c[0],a=l[0],f.push(n(u,h));for(var d=0!==n(i?1:0,o?1:0)?e(-1):e(0),p=f.length-1;p>=0;p-=1)d=d.multiply(R).add(e(f[p]));return d}function N(t){var e=t.value,n="number"==typeof e?e|1<<30:e[0]+e[1]*r|1073758208;return n&-n}function U(t,e){return t=V(t),e=V(e),t.greater(e)?t:e}function L(t,e){return t=V(t),e=V(e),t.lesser(e)?t:e}function D(t,e){if(t=V(t).abs(),e=V(e).abs(),t.equals(e))return t;if(t.isZero())return e;if(e.isZero())return t;for(var r,n,i=s[1];t.isEven()&&e.isEven();)r=Math.min(N(t),N(e)),t=t.divide(r),e=e.divide(r),i=i.multiply(r);for(;t.isEven();)t=t.divide(N(t));do{for(;e.isEven();)e=e.divide(N(e));t.greater(e)&&(n=e,e=t,t=n),e=e.subtract(t)}while(!e.isZero());return i.isUnit()?t:t.multiply(i)}u.prototype.shiftLeft=a.prototype.shiftLeft=function(t){if(!_(t))throw new Error(String(t)+" is too large for shifting.");if((t=+t)<0)return this.shiftRight(-t);var e=this;if(e.isZero())return e;for(;t>=O;)e=e.multiply(R),t-=O-1;return e.multiply(T[t])},u.prototype.shiftRight=a.prototype.shiftRight=function(t){var e;if(!_(t))throw new Error(String(t)+" is too large for shifting.");if((t=+t)<0)return this.shiftLeft(-t);for(var r=this;t>=O;){if(r.isZero()||r.isNegative()&&r.isUnit())return r;r=(e=x(r,R))[1].isNegative()?e[0].prev():e[0],t-=O-1}return(e=x(r,T[t]))[1].isNegative()?e[0].prev():e[0]},u.prototype.not=a.prototype.not=function(){return this.negate().prev()},u.prototype.and=a.prototype.and=function(t){return P(this,t,(function(t,e){return t&e}))},u.prototype.or=a.prototype.or=function(t){return P(this,t,(function(t,e){return t|e}))},u.prototype.xor=a.prototype.xor=function(t){return P(this,t,(function(t,e){return t^e}))},u.prototype.bitLength=a.prototype.bitLength=function(){var t=this;return t.compareTo(e(0))<0&&(t=t.negate().subtract(e(1))),0===t.compareTo(e(0))?e(0):e(function t(r,n){if(n.compareTo(r)<=0){var i=t(r,n.square(n)),o=i.p,s=i.e,a=o.multiply(n);return a.compareTo(r)<=0?{p:a,e:2*s+1}:{p:o,e:2*s}}return{p:e(1),e:0}}(t,e(2)).e).add(e(1))};var F=function(t,e){for(var r=t.length,n=Math.abs(e),i=0;i=n){if("1"===c&&1===n)continue;throw new Error(c+" is not a valid digit in base "+e+".")}if(c.charCodeAt(0)-87>=n)throw new Error(c+" is not a valid digit in base "+e+".")}if(2<=e&&e<=36&&r<=o/Math.log(e)){var s=parseInt(t,e);if(isNaN(s))throw new Error(c+" is not a valid digit in base "+e+".");return new u(parseInt(t,e))}e=V(e);var a=[],h="-"===t[0];for(i=h?1:0;i"!==t[i]);a.push(V(t.slice(f+1,i)))}}return j(a,e,h)};function j(t,e,r){var n,i=s[0],o=s[1];for(n=t.length-1;n>=0;n--)i=i.add(t[n].times(o)),o=o.times(e);return r?i.negate():i}function K(t){return t<=35?"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t):"<"+t+">"}function z(t,r){if((r=e(r)).isZero()){if(t.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(r.equals(-1)){if(t.isZero())return{value:[0],isNegative:!1};if(t.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-t)).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var n=Array.apply(null,Array(+t-1)).map(Array.prototype.valueOf,[0,1]);return n.unshift([1]),{value:[].concat.apply([],n),isNegative:!1}}var i=!1;if(t.isNegative()&&r.isPositive()&&(i=!0,t=t.abs()),r.equals(1))return t.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(+t)).map(Number.prototype.valueOf,1),isNegative:i};for(var o,s=[],a=t;a.isNegative()||a.compareAbs(r)>=0;){o=a.divmod(r),a=o.quotient;var u=o.remainder;u.isNegative()&&(u=r.minus(u).abs(),a=a.next()),s.push(u.toJSNumber())}return s.push(a.toJSNumber()),{value:s.reverse(),isNegative:i}}function H(t,e){var r=z(t,e);return(r.isNegative?"-":"")+r.value.map(K).join("")}function q(t){if(h(+t)){var e=+t;if(e===p(e))return new u(e);throw new Error("Invalid integer: "+t)}var r="-"===t[0];r&&(t=t.slice(1));var n=t.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var i=n[1];if("+"===i[0]&&(i=i.slice(1)),(i=+i)!==p(i)||!h(i))throw new Error("Invalid integer: "+i+" is not a valid exponent.");var o=n[0],s=o.indexOf(".");if(s>=0&&(i-=o.length-s-1,o=o.slice(0,s)+o.slice(s+1)),i<0)throw new Error("Cannot include negative exponent part for integers");t=o+=new Array(i+1).join("0")}if(!/^([0-9][0-9]*)$/.test(t))throw new Error("Invalid integer: "+t);for(var c=[],l=t.length,d=l-7;l>0;)c.push(+t.slice(d,l)),(d-=7)<0&&(d=0),l-=7;return f(c),new a(c,r)}function V(t){return"number"==typeof t?function(t){if(h(t)){if(t!==p(t))throw new Error(t+" is not an integer.");return new u(t)}return q(t.toString())}(t):"string"==typeof t?q(t):t}a.prototype.toArray=function(t){return z(this,t)},u.prototype.toArray=function(t){return z(this,t)},a.prototype.toString=function(t){if(void 0===t&&(t=10),10!==t)return H(this,t);for(var e,r=this.value,n=r.length,i=String(r[--n]);--n>=0;)e=String(r[n]),i+="0000000".slice(e.length)+e;return(this.sign?"-":"")+i},u.prototype.toString=function(t){return void 0===t&&(t=10),10!=t?H(this,t):String(this.value)},a.prototype.toJSON=u.prototype.toJSON=function(){return this.toString()},a.prototype.toJSNumber=a.prototype.valueOf=function(){return parseInt(this.toString(),10)},u.prototype.toJSNumber=u.prototype.valueOf=function(){return this.value};for(var G=0;G<1e3;G++)s[G]=new u(G),G>0&&(s[-G]=new u(-G));return s.one=s[1],s.zero=s[0],s.minusOne=s[-1],s.max=U,s.min=L,s.gcd=D,s.lcm=function(t,e){return t=V(t).abs(),e=V(e).abs(),t.divide(D(t,e)).multiply(e)},s.isInstance=function(t){return t instanceof a||t instanceof u},s.randBetween=function(t,e){var n=L(t=V(t),e=V(e)),i=U(t,e).subtract(n).add(1);if(i.isSmall)return n.add(Math.floor(Math.random()*i));for(var o=[],s=!0,h=i.value.length-1;h>=0;h--){var c=s?i.value[h]:r,f=p(Math.random()*c);o.unshift(f),f=0;n--)if(r<4){var i=ae.indexOf(t[n])>>r,o=0;0!==n&&(o=ae.indexOf(t[n-1]));var s=1+r;r=s,e.unshift(se[i+(o%(1<>7!=0;)n+=7;return r}(new ge(n)).toString();r=t+String(i)+o}else{var s=ee.from([i]),a=me(ee.concat([s,n])),u=ee.concat([n,ee.from(a)]),h=N(u.toString("hex")),c=L(h).replace(/=/g,"").toLowerCase();r=String(t)+String(i)+c}return r}function be(t,e){var r=ee.from([t]),n=ee.concat([r,e]);return new ye(n)}var we=[BigInt(1),BigInt(2),BigInt(4),BigInt(8),BigInt(16),BigInt(32),BigInt(64),BigInt(128),BigInt(256),BigInt(512),BigInt(1024),BigInt(2048),BigInt(4096),BigInt(8192),BigInt(16384),BigInt(32768),BigInt(65536),BigInt(131072),BigInt(262144),BigInt(471693),BigInt(419994),BigInt(397615),BigInt(395339),BigInt(275453),BigInt(273067),BigInt(268625),BigInt(144334),BigInt(141953),BigInt(137544),BigInt(126816),BigInt(122570),BigInt(116281),BigInt(114136),BigInt(107829),BigInt(103596),BigInt(101446),BigInt(90923),BigInt(86683),BigInt(84547),BigInt(78212),BigInt(76098),BigInt(71873),BigInt(63506),BigInt(57383),BigInt(53262),BigInt(51260),BigInt(45085),BigInt(43057),BigInt(38955),BigInt(28724),BigInt(26666),BigInt(22553),BigInt(14343),BigInt(2002),BigInt(1831),BigInt(1678),BigInt(1660),BigInt(1437),BigInt(1259),BigInt(948),BigInt(874),BigInt(729),BigInt(455),BigInt(63)],Ee=function(t){this.codeword=t};function Ae(t,e){this.hi=t>>>0,this.lo=e>>>0}function ke(t,e){return new Ae(t,e)}function Se(){var t=arguments,e=t[0].hi,r=t[0].lo,n=t.length-1;do{e^=t[n].hi,r^=t[n].lo,n--}while(n>0);return new this.u64(e,r)}function Be(t,e,r,n,i){i|=0;for(var o=0;o>>3):0,r=new Array(e),n=0;n>>24,e[4*n+1]=(16711680&t[n])>>>16,e[4*n+2]=(65280&t[n])>>>8,e[4*n+3]=255&t[n],n++;return e}Ee.mainnet=new Ee(BigInt(0)),Ee.testnet=new Ee(BigInt(0x6834ba37b3980400)),Ee.emulator=new Ee(BigInt(0x1cb159857af02000)),Ae.prototype.set=function(t){this.lo=t.lo,this.hi=t.hi},Ae.prototype.add=function(t){var e,r,n,i;return i=(this.hi>>>16)+(t.hi>>>16)+((n=(65535&this.hi)+(65535&t.hi)+((r=(this.lo>>>16)+(t.lo>>>16)+((e=(65535&this.lo)+(65535&t.lo))>>>16))>>>16))>>>16),this.lo=r<<16|65535&e,this.hi=i<<16|65535&n,this},Ae.prototype.addOne=function(){-1===this.lo||4294967295===this.lo?(this.lo=0,this.hi++):this.lo++},Ae.prototype.plus=function(t){var e,r,n,i,o=new Ae(0,0);return i=(this.hi>>>16)+(t.hi>>>16)+((n=(65535&this.hi)+(65535&t.hi)+((r=(this.lo>>>16)+(t.lo>>>16)+((e=(65535&this.lo)+(65535&t.lo))>>>16))>>>16))>>>16),o.lo=r<<16|65535&e,o.hi=i<<16|65535&n,o},Ae.prototype.not=function(){return new Ae(~this.hi,~this.lo)},Ae.prototype.one=function(){return new Ae(0,1)},Ae.prototype.zero=function(){return new Ae(0,0)},Ae.prototype.neg=function(){return this.not().plus(this.one())},Ae.prototype.minus=function(t){return this.plus(t.neg())},Ae.prototype.isZero=function(){return 0===this.lo&&0===this.hi},Ae.prototype.multiply=function(t){if(this.isZero())return this.zero();var e;if(!0!==((e=t)&&e.__isLong__)&&(t=function(t){return isNaN(t)||!isFinite(t)?this.zero():new Ae(t%1|0,t/1|0)}(t)),t.isZero())return this.zero();var r=65535&this.hi,n=this.lo>>>16,i=65535&this.lo,o=65535&t.hi,s=t.lo>>>16,a=65535&t.lo,u=0,h=0,c=0,l=0;return c+=(l+=i*a)>>>16,h+=(c+=n*a)>>>16,c&=65535,h+=(c+=i*s)>>>16,u+=(h+=r*a)>>>16,h&=65535,u+=(h+=n*s)>>>16,h&=65535,u+=(h+=i*o)>>>16,u+=(this.hi>>>16)*a+r*s+n*o+i*(t.hi>>>16),new Ae((u&=65535)<<16|(h&=65535),(c&=65535)<<16|(l&=65535))},Ae.prototype.shiftLeft=function(t){t%=64;var e=new Ae(0,0);if(0===t)return this.clone();if(t>31)e.lo=0,e.hi=this.lo<>>32-t;e.lo=this.lo<63&&(t%=64),t>31)this.hi=this.lo<>>32-t;this.lo<<=t,this.hi=this.hi<=32)e.hi=0,e.lo=this.hi>>>t-32;else{var r=32-t,n=this.hi<>>r;e.hi=this.hi>>>t,e.lo=this.lo>>>t|n<32)return this.rotateRight(64-t);var e=new Ae(0,0);return 0===t?(e.lo=this.lo>>>0,e.hi=this.hi>>>0):32===t?(e.lo=this.hi,e.hi=this.lo):(e.lo=this.lo<>>32-t,e.hi=this.hi<>>32-t),e},Ae.prototype.setRotateLeft=function(t){return t>32?this.setRotateRight(64-t):(0===t||(32===t?(e=this.lo,this.lo=this.hi,this.hi=e):(e=this.hi<>>32-t,this.lo=this.lo<>>32-t,this.hi=e)),this);var e},Ae.prototype.rotateRight=function(t){if(t>32)return this.rotateLeft(64-t);var e=new Ae(0,0);return 0===t?(e.lo=this.lo>>>0,e.hi=this.hi>>>0):32===t?(e.lo=this.hi,e.hi=this.lo):(e.lo=this.hi<<32-t|this.lo>>>t,e.hi=this.lo<<32-t|this.hi>>>t),e},Ae.prototype.setFlip=function(){var t;return t=this.lo,this.lo=this.hi,this.hi=t,this},Ae.prototype.setRotateRight=function(t){return t>32?this.setRotateLeft(64-t):(0===t||(32===t?(e=this.lo,this.lo=this.hi,this.hi=e):(newHigh=this.lo<<32-t|this.hi>>>t,this.lo=this.hi<<32-t|this.lo>>>t,this.hi=newHigh)),this);var e},Ae.prototype.xor=function(t){var e=new Ae(0,0);return e.hi=this.hi^t.hi,e.lo=this.lo^t.lo,e},Ae.prototype.setxorOne=function(t){return this.hi^=t.hi,this.lo^=t.lo,this},Ae.prototype.and=function(t){var e=new Ae(0,0);return e.hi=this.hi&t.hi,e.lo=this.lo&t.lo,e},Ae.prototype.clone=function(){return new Ae(this.hi,this.lo)},Ae.prototype.setxor64=function(){for(var t=arguments,e=t.length;e--;)this.hi^=t[e].hi,this.lo^=t[e].lo;return this};var Me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Ie(t){var e,r,n,i,o,s,a=[],u=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");u>2,r=(3&o)<<6|(s=Me.indexOf(t.charAt(u++))),a.push(n<<2|i>>4),64!==o&&a.push(e),64!==s&&a.push(r);return a}var Te=xe(Ie("xjL0pfSXpcb4b5eEl+uE+O5esJmwx5nu9nqMjYz3jfb/6BcNF+UN/9YK3L3ct73W3hbIscinsd6RbfxU/DlUkWCQ8FDwwFBgAgcFAwUEAwLOLuCp4IepzlbRh32HrH1W58wrGSvVGee1E6ZipnFitU18MeYxmuZN7Fm1mrXDmuyPQM9FzwVFjx+jvJ28Pp0fiUnAQMAJQIn6aJKHku+H+u/QPxU/xRXvspQm6yZ/67KOzkDJQAfJjvvmHQsd7Qv7QW4v7C+C7EGzGqlnqX1ns19DHP0cvv1fRWAl6iWK6kUj+dq/2ka/I1NRAvcCpvdT5EWhlqHTluSbdu1b7S1bm3UoXcJd6sJ14cUkHCTZHOE91Omu6XquPUzyvmq+mGpMbILuWu7YWmx+vcNBw/xBfvXzBgIG8QL1g1LRT9EdT4NojORc5NBcaFFWB/QHovRR0Y1cNFy5NNH54RgIGOkI+eJMrpOu35Piqz6Vc5VNc6til/VT9cRTYiprQT9BVD8qCBwUDBQQDAiVY/ZS9jFSlUbpr2WvjGVGnX/iXuIhXp0wSHgoeGAoMDfP+KH4bqE3ChsRDxEUDwov68S1xF61Lw4VGwkbHAkOJH5aNlpINiQbrbabtjabG9+YRz1HpT3fzadqJmqBJs1O9btpu5xpTn8zTM1M/s1/6lC6n7rPn+oSPy0bLSQbEh2kuZ65Op4dWMScdJywdFg0RnIucmguNDZBdy13bC023BHNss2jsty0nSnuKXPutFtNFvsWtvtbpKUB9gFT9qR2oddN1+xNdrcUo2GjdWG3fTRJzkn6zn1S3417jaR7Ut2fQj5CoT7dXs2TcZO8cV4TsaKXoiaXE6aiBPUEV/WmuQG4aLhpaLkAAAAAAAAAAMG1dCx0mSzBQOCgYKCAYEDjwiEfId0f43k6Q8hD8sh5tpos7Sx37bbUDdm+2bO+1I1HykbKAUaNZxdw2XDO2Wdyr91L3eRLcpTted55M96UmP9n1Gcr1JiwkyPoI3vosIVb3kreEUqFuwa9a71ta7vFu34qfpEqxU97NOU0nuVP7dc6FjrBFu2G0lTFVBfFhpr4YtdiL9eaZpn/Vf/MVWYRtqeUpyKUEYrASs9KD8+K6dkwEDDJEOkEDgoGCggGBP5mmIGY54H+oKsL8Atb8KB4tMxEzPBEeCXw1brVSrolS3U+4z6W40uirA7zDl/zol1EGf4Zuv5dgNtbwFsbwIAFgIWKhQqKBT/T7K3sfq0/If7fvN9CvCFwqNhI2OBIcPH9DAQM+QTxYxl633rG32N3L1jBWO7Bd68wn3WfRXWvQuelY6WEY0IgcFAwUEAwIOXLLhou0Rrl/e8SDhLhDv2/CLdtt2Vtv4FV1EzUGUyBGCQ8FDwwFBgmeV81X0w1JsOycS9xnS/DvoY44Thn4b41yP2i/WqiNYjHT8xPC8yILmVLOUtcOS6TavlX+T1Xk1VYDfINqvJV/GGdgp3jgvx6s8lHyfRHesgn76zvi6zIuogy5zJv57oyT30rfWQrMuZCpJWk15XmwDv7oPuboMAZqrOYszKYGZ72aNFoJ9GeoyKBf4Fdf6NE7qpmqohmRFTWgn6CqH5UO93mq+Z2qzsLlZ6DnhaDC4zJRcpFA8qMx7x7KXuVKcdrBW7TbtbTayhsRDxEUDwopyyLeYtVeae8gT3iPWPivBYxJx0nLB0WrTeadppBdq3blk07Ta0722Se+lb6yFZkdKbSTtLoTnQUNiIeIigeFJLkdtt2P9uSDBIeCh4YCgxI/LRstJBsSLiPN+Q3a+S4n3jnXeclXZ+9D7JusmFuvUNpKu8qhu9DxDXxpvGTpsQ52uOo43KoOTHG96T3YqQx04pZN1m9N9PydIaLhv+L8tWDVjJWsTLVi07FQ8UNQ4tuhetZ69xZbtoYwrfCr7faAY6PjI8CjAGxHaxkrHlksZzxbdJtI9KcSXI74DuS4EnYH8e0x6u02Ky5FfoVQ/qs8/oJBwn9B/PPoG8lb4Ulz8og6q/qj6/K9H2JjonzjvRHZyDpII7pRxA4KBgoIBgQbwtk1WTe1W/wc4OIg/uI8Er7sW+xlG9KXMqWcpa4clw4VGwkbHAkOFdfCPEIrvFXcyFSx1Lmx3OXZPNR8zVRl8uuZSNljSPLoSWEfIRZfKHoV7+cv8uc6D5dYyFjfCE+lup83Xw33ZZhHn/cf8LcYQ2ckYaRGoYND5uUhZQehQ/gS6uQq9uQ4Hy6xkLG+EJ8cSZXxFfixHHMKeWq5YOqzJDjc9hzO9iQBgkPBQ8MBQb39AMBA/UB9xwqNhI2OBIcwjz+o/6fo8Jqi+Ff4dRfaq6+EPkQR/muaQJr0GvS0GkXv6iRqC6RF5lx6FjoKViZOlNpJ2l0Jzon99C50E65J9mRSDhIqTjZ6941EzXNE+sr5c6zzlazKyJ3VTNVRDMi0gTWu9a/u9KpOZBwkElwqQeHgImADokHM8Hyp/JmpzMt7MG2wVq2LTxaZiJmeCI8Fbitkq0qkhXJqWAgYIkgyYdc20nbFUmHqrAa/xpP/6pQ2Ih4iKB4UKUrjnqOUXqlA4mKj4oGjwNZShP4E7L4WQmSm4CbEoAJGiM5Fzk0FxplEHXadcraZdeEUzFTtTHXhNVRxlETxoTQA9O407u40ILcXsNeH8OCKeLLsMtSsClaw5l3mbR3Wh4tMxEzPBEeez1Gy0b2y3uotx/8H0v8qG0MYdZh2tZtLGJOOk5YOiw=")),Oe=xe(Ie("xsYy9KX0l6X4+G+XhJfrhO7uXrCZsMeZ9vZ6jI2M943//+gXDRflDdbWCty93Le93t4WyLHIp7GRkW38VPw5VGBgkPBQ8MBQAgIHBQMFBAPOzi7gqeCHqVZW0Yd9h6x95+fMKxkr1Rm1tROmYqZxYk1NfDHmMZrm7OxZtZq1w5qPj0DPRc8FRR8fo7ydvD6diYlJwEDACUD6+miSh5Lvh+/v0D8VP8UVsrKUJusmf+uOjs5AyUAHyfv75h0LHe0LQUFuL+wvguyzsxqpZ6l9Z19fQxz9HL79RUVgJeoliuojI/nav9pGv1NTUQL3Aqb35ORFoZah05abm3btW+0tW3V1KF3CXerC4eHFJBwk2Rw9PdTprul6rkxM8r5qvphqbGyC7lru2Fp+fr3DQcP8QfX18wYCBvECg4NS0U/RHU9oaIzkXOTQXFFRVgf0B6L00dGNXDRcuTT5+eEYCBjpCOLiTK6Trt+Tq6s+lXOVTXNiYpf1U/XEUyoqa0E/QVQ/CAgcFAwUEAyVlWP2UvYxUkZG6a9lr4xlnZ1/4l7iIV4wMEh4KHhgKDc3z/ih+G6hCgobEQ8RFA8vL+vEtcRetQ4OFRsJGxwJJCR+WjZaSDYbG622m7Y2m9/fmEc9R6U9zc2naiZqgSZOTvW7abucaX9/M0zNTP7N6upQup+6z58SEj8tGy0kGx0dpLmeuTqeWFjEnHScsHQ0NEZyLnJoLjY2QXctd2wt3NwRzbLNo7K0tJ0p7ilz7ltbTRb7Frb7pKSlAfYBU/Z2dqHXTdfsTbe3FKNho3VhfX00Sc5J+s5SUt+Ne42ke93dn0I+QqE+Xl7Nk3GTvHETE7Gil6Iml6amogT1BFf1ubkBuGi4aWgAAAAAAAAAAMHBtXQsdJksQEDgoGCggGDj48IhHyHdH3l5OkPIQ/LItraaLO0sd+3U1A3Zvtmzvo2NR8pGygFGZ2cXcNlwztlycq/dS93kS5SU7XneeTPemJj/Z9RnK9SwsJMj6CN76IWFW95K3hFKu7sGvWu9bWvFxbt+Kn6RKk9PezTlNJ7l7e3XOhY6wRaGhtJUxVQXxZqa+GLXYi/XZmaZ/1X/zFUREbanlKcilIqKwErPSg/P6enZMBAwyRAEBA4KBgoIBv7+ZpiBmOeBoKCrC/ALW/B4eLTMRMzwRCUl8NW61Uq6S0t1PuM+luOioqwO8w5f811dRBn+Gbr+gIDbW8BbG8AFBYCFioUKij8/0+yt7H6tISH+37zfQrxwcKjYSNjgSPHx/QwEDPkEY2MZet96xt93dy9YwVjuwa+vMJ91n0V1QkLnpWOlhGMgIHBQMFBAMOXlyy4aLtEa/f3vEg4S4Q6/vwi3bbdlbYGBVdRM1BlMGBgkPBQ8MBQmJnlfNV9MNcPDsnEvcZ0vvr6GOOE4Z+E1Ncj9ov1qooiIx0/MTwvMLi5lSzlLXDmTk2r5V/k9V1VVWA3yDary/PxhnYKd44J6erPJR8n0R8jIJ++s74usurqIMucyb+cyMk99K31kK+bmQqSVpNeVwMA7+6D7m6AZGaqzmLMymJ6e9mjRaCfRo6MigX+BXX9ERO6qZqqIZlRU1oJ+gqh+Ozvd5qvmdqsLC5Weg54Wg4yMyUXKRQPKx8e8eyl7lSlrawVu027W0ygobEQ8RFA8p6csi3mLVXm8vIE94j1j4hYWMScdJywdra03mnaaQXbb25ZNO02tO2RknvpW+shWdHSm0k7S6E4UFDYiHiIoHpKS5Hbbdj/bDAwSHgoeGApISPy0bLSQbLi4jzfkN2vkn594513nJV29vQ+ybrJhbkNDaSrvKobvxMQ18abxk6Y5OdrjqONyqDExxvek92Kk09OKWTdZvTfy8nSGi4b/i9XVg1YyVrEyi4tOxUPFDUNuboXrWevcWdraGMK3wq+3AQGOj4yPAoyxsR2sZKx5ZJyc8W3SbSPSSUlyO+A7kuDY2B/HtMertKysuRX6FUP68/P6CQcJ/QfPz6BvJW+FJcrKIOqv6o+v9PR9iY6J845HR2cg6SCO6RAQOCgYKCAYb28LZNVk3tXw8HODiIP7iEpK+7FvsZRvXFzKlnKWuHI4OFRsJGxwJFdXXwjxCK7xc3MhUsdS5seXl2TzUfM1UcvLrmUjZY0joaElhHyEWXzo6Fe/nL/LnD4+XWMhY3whlpbqfN18N91hYR5/3H/C3A0NnJGGkRqGDw+blIWUHoXg4EurkKvbkHx8usZCxvhCcXEmV8RX4sTMzCnlquWDqpCQ43PYczvYBgYJDwUPDAX39/QDAQP1ARwcKjYSNjgSwsI8/qP+n6NqaovhX+HUX66uvhD5EEf5aWkCa9Br0tAXF7+okagukZmZcehY6ClYOjpTaSdpdCcnJ/fQudBOudnZkUg4SKk46+veNRM1zRMrK+XOs85WsyIid1UzVUQz0tIE1rvWv7upqTmQcJBJcAcHh4CJgA6JMzPB8qfyZqctLezBtsFatjw8WmYiZngiFRW4rZKtKpLJyalgIGCJIIeHXNtJ2xVJqqqwGv8aT/9QUNiIeIigeKWlK456jlF6AwOJio+KBo9ZWUoT+BOy+AkJkpuAmxKAGhojORc5NBdlZRB12nXK2tfXhFMxU7UxhITVUcZRE8bQ0APTuNO7uIKC3F7DXh/DKSniy7DLUrBaWsOZd5m0dx4eLTMRMzwRe3s9RstG9suoqLcf/B9L/G1tDGHWYdrWLCxiTjpOWDo=")),Re=xe(Ie("pcbGMvSl9JeE+Phvl4SX65nu7l6wmbDHjfb2eoyNjPcN///oFw0X5b3W1grcvdy3sd7eFsixyKdUkZFt/FT8OVBgYJDwUPDAAwICBwUDBQSpzs4u4Kngh31WVtGHfYesGefnzCsZK9VitbUTpmKmceZNTXwx5jGamuzsWbWatcNFj49Az0XPBZ0fH6O8nbw+QImJScBAwAmH+vpokoeS7xXv79A/FT/F67KylCbrJn/Jjo7OQMlABwv7++YdCx3t7EFBbi/sL4Jns7MaqWepff1fX0Mc/Ry+6kVFYCXqJYq/IyP52r/aRvdTU1EC9wKmluTkRaGWodNbm5t27VvtLcJ1dShdwl3qHOHhxSQcJNmuPT3U6a7pempMTPK+ar6YWmxsgu5a7thBfn69w0HD/AL19fMGAgbxT4ODUtFP0R1caGiM5Fzk0PRRUVYH9AeiNNHRjVw0XLkI+fnhGAgY6ZPi4kyuk67fc6urPpVzlU1TYmKX9VP1xD8qKmtBP0FUDAgIHBQMFBBSlZVj9lL2MWVGRumvZa+MXp2df+Je4iEoMDBIeCh4YKE3N8/4ofhuDwoKGxEPERS1Ly/rxLXEXgkODhUbCRscNiQkflo2WkibGxuttpu2Nj3f35hHPUelJs3Np2omaoFpTk71u2m7nM1/fzNMzUz+n+rqULqfus8bEhI/LRstJJ4dHaS5nrk6dFhYxJx0nLAuNDRGci5yaC02NkF3LXdsstzcEc2yzaPutLSdKe4pc/tbW00W+xa29qSkpQH2AVNNdnah103X7GG3txSjYaN1zn19NEnOSfp7UlLfjXuNpD7d3Z9CPkKhcV5ezZNxk7yXExOxopeiJvWmpqIE9QRXaLm5AbhouGkAAAAAAAAAACzBwbV0LHSZYEBA4KBgoIAf4+PCIR8h3ch5eTpDyEPy7ba2miztLHe+1NQN2b7Zs0aNjUfKRsoB2WdnF3DZcM5LcnKv3Uvd5N6UlO153nkz1JiY/2fUZyvosLCTI+gje0qFhVveSt4Ra7u7Br1rvW0qxcW7fip+keVPT3s05TSeFu3t1zoWOsHFhobSVMVUF9eamvhi12IvVWZmmf9V/8yUERG2p5SnIs+KisBKz0oPEOnp2TAQMMkGBAQOCgYKCIH+/maYgZjn8KCgqwvwC1tEeHi0zETM8LolJfDVutVK40tLdT7jPpbzoqKsDvMOX/5dXUQZ/hm6wICA21vAWxuKBQWAhYqFCq0/P9Psrex+vCEh/t+830JIcHCo2EjY4ATx8f0MBAz532NjGXrfesbBd3cvWMFY7nWvrzCfdZ9FY0JC56VjpYQwICBwUDBQQBrl5csuGi7RDv397xIOEuFtv78It223ZUyBgVXUTNQZFBgYJDwUPDA1JiZ5XzVfTC/Dw7JxL3Gd4b6+hjjhOGeiNTXI/aL9asyIiMdPzE8LOS4uZUs5S1xXk5Nq+Vf5PfJVVVgN8g2qgvz8YZ2CneNHenqzyUfJ9KzIyCfvrO+L57q6iDLnMm8rMjJPfSt9ZJXm5kKklaTXoMDAO/ug+5uYGRmqs5izMtGenvZo0Wgnf6OjIoF/gV1mRETuqmaqiH5UVNaCfoKoqzs73ear5naDCwuVnoOeFsqMjMlFykUDKcfHvHspe5XTa2sFbtNu1jwoKGxEPERQeaenLIt5i1XivLyBPeI9Yx0WFjEnHScsdq2tN5p2mkE729uWTTtNrVZkZJ76VvrITnR0ptJO0ugeFBQ2Ih4iKNuSkuR223Y/CgwMEh4KHhhsSEj8tGy0kOS4uI835DdrXZ+feOdd5yVuvb0Psm6yYe9DQ2kq7yqGpsTENfGm8ZOoOTna46jjcqQxMcb3pPdiN9PTilk3Wb2L8vJ0houG/zLV1YNWMlaxQ4uLTsVDxQ1Zbm6F61nr3Lfa2hjCt8KvjAEBjo+MjwJksbEdrGSsedKcnPFt0m0j4ElJcjvgO5K02Ngfx7THq/qsrLkV+hVDB/Pz+gkHCf0lz8+gbyVvha/KyiDqr+qPjvT0fYmOifPpR0dnIOkgjhgQEDgoGCgg1W9vC2TVZN6I8PBzg4iD+29KSvuxb7GUclxcypZylrgkODhUbCRscPFXV18I8Qiux3NzIVLHUuZRl5dk81HzNSPLy65lI2WNfKGhJYR8hFmc6OhXv5y/yyE+Pl1jIWN83ZaW6nzdfDfcYWEef9x/woYNDZyRhpEahQ8Pm5SFlB6Q4OBLq5Cr20J8fLrGQsb4xHFxJlfEV+KqzMwp5arlg9iQkONz2HM7BQYGCQ8FDwwB9/f0AwED9RIcHCo2EjY4o8LCPP6j/p9famqL4V/h1Pmurr4Q+RBH0GlpAmvQa9KRFxe/qJGoLliZmXHoWOgpJzo6U2knaXS5Jyf30LnQTjjZ2ZFIOEipE+vr3jUTNc2zKyvlzrPOVjMiIndVM1VEu9LSBNa71r9wqak5kHCQSYkHB4eAiYAOpzMzwfKn8ma2LS3swbbBWiI8PFpmImZ4khUVuK2SrSogycmpYCBgiUmHh1zbSdsV/6qqsBr/Gk94UFDYiHiIoHqlpSuOeo5RjwMDiYqPigb4WVlKE/gTsoAJCZKbgJsSFxoaIzkXOTTaZWUQddp1yjHX14RTMVO1xoSE1VHGURO40NAD07jTu8OCgtxew14fsCkp4suwy1J3WlrDmXeZtBEeHi0zETM8y3t7PUbLRvb8qKi3H/wfS9ZtbQxh1mHaOiwsYk46Tlg=")),_e=xe(Ie("l6XGxjL0pfTrhPj4b5eEl8eZ7u5esJmw94329nqMjYzlDf//6BcNF7e91tYK3L3cp7He3hbIscg5VJGRbfxU/MBQYGCQ8FDwBAMCAgcFAwWHqc7OLuCp4Kx9VlbRh32H1Rnn58wrGStxYrW1E6ZipprmTU18MeYxw5rs7Fm1mrUFRY+PQM9Fzz6dHx+jvJ28CUCJiUnAQMDvh/r6aJKHksUV7+/QPxU/f+uyspQm6yYHyY6OzkDJQO0L+/vmHQsdguxBQW4v7C99Z7OzGqlnqb79X19DHP0ciupFRWAl6iVGvyMj+dq/2qb3U1NRAvcC05bk5EWhlqEtW5ubdu1b7erCdXUoXcJd2Rzh4cUkHCR6rj091Omu6ZhqTEzyvmq+2FpsbILuWu78QX5+vcNBw/EC9fXzBgIGHU+Dg1LRT9HQXGhojORc5KL0UVFWB/QHuTTR0Y1cNFzpCPn54RgIGN+T4uJMrpOuTXOrqz6Vc5XEU2Jil/VT9VQ/KiprQT9BEAwICBwUDBQxUpWVY/ZS9oxlRkbpr2WvIV6dnX/iXuJgKDAwSHgoeG6hNzfP+KH4FA8KChsRDxFetS8v68S1xBwJDg4VGwkbSDYkJH5aNlo2mxsbrbabtqU939+YRz1HgSbNzadqJmqcaU5O9btpu/7Nf38zTM1Mz5/q6lC6n7okGxISPy0bLTqeHR2kuZ65sHRYWMScdJxoLjQ0RnIucmwtNjZBdy13o7Lc3BHNss1z7rS0nSnuKbb7W1tNFvsWU/akpKUB9gHsTXZ2oddN13Vht7cUo2Gj+s59fTRJzkmke1JS3417jaE+3d2fQj5CvHFeXs2TcZMmlxMTsaKXolf1pqaiBPUEaWi5uQG4aLgAAAAAAAAAAJkswcG1dCx0gGBAQOCgYKDdH+PjwiEfIfLIeXk6Q8hDd+22tpos7SyzvtTUDdm+2QFGjY1HykbKztlnZxdw2XDkS3Jyr91L3TPelJTted55K9SYmP9n1Gd76LCwkyPoIxFKhYVb3krebWu7uwa9a72RKsXFu34qfp7lT097NOU0wRbt7dc6FjoXxYaG0lTFVC/Xmpr4YtdizFVmZpn/Vf8ilBERtqeUpw/PiorASs9KyRDp6dkwEDAIBgQEDgoGCueB/v5mmIGYW/CgoKsL8AvwRHh4tMxEzEq6JSXw1brVluNLS3U+4z5f86KirA7zDrr+XV1EGf4ZG8CAgNtbwFsKigUFgIWKhX6tPz/T7K3sQrwhIf7fvN/gSHBwqNhI2PkE8fH9DAQMxt9jYxl633ruwXd3L1jBWEV1r68wn3WfhGNCQuelY6VAMCAgcFAwUNEa5eXLLhou4Q79/e8SDhJlbb+/CLdttxlMgYFV1EzUMBQYGCQ8FDxMNSYmeV81X50vw8OycS9xZ+G+voY44ThqojU1yP2i/QvMiIjHT8xPXDkuLmVLOUs9V5OTavlX+aryVVVYDfIN44L8/GGdgp30R3p6s8lHyYusyMgn76zvb+e6uogy5zJkKzIyT30rfdeV5uZCpJWkm6DAwDv7oPsymBkZqrOYsyfRnp72aNFoXX+joyKBf4GIZkRE7qpmqqh+VFTWgn6Cdqs7O93mq+YWgwsLlZ6DngPKjIzJRcpFlSnHx7x7KXvW02trBW7TblA8KChsRDxEVXmnpyyLeYtj4ry8gT3iPSwdFhYxJx0nQXatrTeadpqtO9vblk07TchWZGSe+lb66E50dKbSTtIoHhQUNiIeIj/bkpLkdtt2GAoMDBIeCh6QbEhI/LRstGvkuLiPN+Q3JV2fn3jnXedhbr29D7JusobvQ0NpKu8qk6bExDXxpvFyqDk52uOo42KkMTHG96T3vTfT04pZN1n/i/LydIaLhrEy1dWDVjJWDUOLi07FQ8XcWW5uhetZ66+32toYwrfCAowBAY6PjI95ZLGxHaxkrCPSnJzxbdJtkuBJSXI74DurtNjYH8e0x0P6rKy5FfoV/Qfz8/oJBwmFJc/PoG8lb4+vysog6q/q84709H2JjomO6UdHZyDpICAYEBA4KBgo3tVvbwtk1WT7iPDwc4OIg5RvSkr7sW+xuHJcXMqWcpZwJDg4VGwkbK7xV1dfCPEI5sdzcyFSx1I1UZeXZPNR840jy8uuZSNlWXyhoSWEfITLnOjoV7+cv3whPj5dYyFjN92Wlup83XzC3GFhHn/cfxqGDQ2ckYaRHoUPD5uUhZTbkODgS6uQq/hCfHy6xkLG4sRxcSZXxFeDqszMKeWq5TvYkJDjc9hzDAUGBgkPBQ/1Aff39AMBAzgSHBwqNhI2n6PCwjz+o/7UX2pqi+Ff4Uf5rq6+EPkQ0tBpaQJr0GsukRcXv6iRqClYmZlx6FjodCc6OlNpJ2lOuScn99C50Kk42dmRSDhIzRPr6941EzVWsysr5c6zzkQzIiJ3VTNVv7vS0gTWu9ZJcKmpOZBwkA6JBweHgImAZqczM8Hyp/Jati0t7MG2wXgiPDxaZiJmKpIVFbitkq2JIMnJqWAgYBVJh4dc20nbT/+qqrAa/xqgeFBQ2Ih4iFF6paUrjnqOBo8DA4mKj4qy+FlZShP4ExKACQmSm4CbNBcaGiM5FznK2mVlEHXadbUx19eEUzFTE8aEhNVRxlG7uNDQA9O40x/DgoLcXsNeUrApKeLLsMu0d1paw5l3mTwRHh4tMxEz9st7ez1Gy0ZL/Kiotx/8H9rWbW0MYdZhWDosLGJOOk4=")),Pe=xe(Ie("9JelxsYy9KWX64T4+G+XhLDHme7uXrCZjPeN9vZ6jI0X5Q3//+gXDdy3vdbWCty9yKex3t4WyLH8OVSRkW38VPDAUGBgkPBQBQQDAgIHBQPgh6nOzi7gqYesfVZW0Yd9K9UZ5+fMKxmmcWK1tROmYjGa5k1NfDHmtcOa7OxZtZrPBUWPj0DPRbw+nR8fo7ydwAlAiYlJwECS74f6+miShz/FFe/v0D8VJn/rsrKUJutAB8mOjs5AyR3tC/v75h0LL4LsQUFuL+ypfWezsxqpZxy+/V9fQxz9JYrqRUVgJeraRr8jI/navwKm91NTUQL3odOW5ORFoZbtLVubm3btW13qwnV1KF3CJNkc4eHFJBzpeq49PdTprr6YakxM8r5q7thabGyC7lrD/EF+fr3DQQbxAvX18wYC0R1Pg4NS0U/k0FxoaIzkXAei9FFRVgf0XLk00dGNXDQY6Qj5+eEYCK7fk+LiTK6TlU1zq6s+lXP1xFNiYpf1U0FUPyoqa0E/FBAMCAgcFAz2MVKVlWP2Uq+MZUZG6a9l4iFenZ1/4l54YCgwMEh4KPhuoTc3z/ihERQPCgobEQ/EXrUvL+vEtRscCQ4OFRsJWkg2JCR+Wja2NpsbG622m0elPd/fmEc9aoEmzc2naia7nGlOTvW7aUz+zX9/M0zNus+f6upQup8tJBsSEj8tG7k6nh0dpLmenLB0WFjEnHRyaC40NEZyLndsLTY2QXctzaOy3NwRzbIpc+60tJ0p7ha2+1tbTRb7AVP2pKSlAfbX7E12dqHXTaN1Ybe3FKNhSfrOfX00Sc6NpHtSUt+Ne0KhPt3dn0I+k7xxXl7Nk3GiJpcTE7GilwRX9aamogT1uGloubkBuGgAAAAAAAAAAHSZLMHBtXQsoIBgQEDgoGAh3R/j48IhH0PyyHl5OkPILHfttraaLO3Zs77U1A3ZvsoBRo2NR8pGcM7ZZ2cXcNnd5Etycq/dS3kz3pSU7XneZyvUmJj/Z9Qje+iwsJMj6N4RSoWFW95KvW1ru7sGvWt+kSrFxbt+KjSe5U9PezTlOsEW7e3XOhZUF8WGhtJUxWIv15qa+GLX/8xVZmaZ/1WnIpQREbanlEoPz4qKwErPMMkQ6enZMBAKCAYEBA4KBpjngf7+ZpiBC1vwoKCrC/DM8ER4eLTMRNVKuiUl8NW6PpbjS0t1PuMOX/OioqwO8xm6/l1dRBn+WxvAgIDbW8CFCooFBYCFiux+rT8/0+yt30K8ISH+37zY4EhwcKjYSAz5BPHx/QwEesbfY2MZet9Y7sF3dy9YwZ9Fda+vMJ91pYRjQkLnpWNQQDAgIHBQMC7RGuXlyy4aEuEO/f3vEg63ZW2/vwi3bdQZTIGBVdRMPDAUGBgkPBRfTDUmJnlfNXGdL8PDsnEvOGfhvr6GOOH9aqI1Ncj9ok8LzIiIx0/MS1w5Li5lSzn5PVeTk2r5Vw2q8lVVWA3yneOC/PxhnYLJ9Ed6erPJR++LrMjIJ++sMm/nurqIMud9ZCsyMk99K6TXlebmQqSV+5ugwMA7+6CzMpgZGaqzmGgn0Z6e9mjRgV1/o6MigX+qiGZERO6qZoKoflRU1oJ+5narOzvd5queFoMLC5Weg0UDyoyMyUXKe5Upx8e8eylu1tNrawVu00RQPCgobEQ8i1V5p6csi3k9Y+K8vIE94icsHRYWMScdmkF2ra03mnZNrTvb25ZNO/rIVmRknvpW0uhOdHSm0k4iKB4UFDYiHnY/25KS5HbbHhgKDAwSHgq0kGxISPy0bDdr5Li4jzfk5yVdn594512yYW69vQ+ybiqG70NDaSrv8ZOmxMQ18abjcqg5OdrjqPdipDExxvekWb0309OKWTeG/4vy8nSGi1axMtXVg1YyxQ1Di4tOxUPr3FluboXrWcKvt9raGMK3jwKMAQGOj4yseWSxsR2sZG0j0pyc8W3SO5LgSUlyO+DHq7TY2B/HtBVD+qysuRX6Cf0H8/P6CQdvhSXPz6BvJeqPr8rKIOqvifOO9PR9iY4gjulHR2cg6SggGBAQOCgYZN7Vb28LZNWD+4jw8HODiLGUb0pK+7FvlrhyXFzKlnJscCQ4OFRsJAiu8VdXXwjxUubHc3MhUsfzNVGXl2TzUWWNI8vLrmUjhFl8oaElhHy/y5zo6Fe/nGN8IT4+XWMhfDfdlpbqfN1/wtxhYR5/3JEahg0NnJGGlB6FDw+blIWr25Dg4EurkMb4Qnx8usZCV+LEcXEmV8Tlg6rMzCnlqnM72JCQ43PYDwwFBgYJDwUD9QH39/QDATY4EhwcKjYS/p+jwsI8/qPh1F9qaovhXxBH+a6uvhD5a9LQaWkCa9CoLpEXF7+okegpWJmZcehYaXQnOjpTaSfQTrknJ/fQuUipONnZkUg4Nc0T6+veNRPOVrMrK+XOs1VEMyIid1Uz1r+70tIE1ruQSXCpqTmQcIAOiQcHh4CJ8manMzPB8qfBWrYtLezBtmZ4Ijw8WmYirSqSFRW4rZJgiSDJyalgINsVSYeHXNtJGk//qqqwGv+IoHhQUNiIeI5ReqWlK456igaPAwOJio8TsvhZWUoT+JsSgAkJkpuAOTQXGhojORd1ytplZRB12lO1MdfXhFMxURPGhITVUcbTu7jQ0APTuF4fw4KC3F7Dy1KwKSniy7CZtHdaWsOZdzM8ER4eLTMRRvbLe3s9RssfS/yoqLcf/GHa1m1tDGHWTlg6LCxiTjo=")),Ne=xe(Ie("pfSXpcbGMvSEl+uE+Phvl5mwx5nu7l6wjYz3jfb2eowNF+UN///oF73ct73W1grcscinsd7eFshU/DlUkZFt/FDwwFBgYJDwAwUEAwICBwWp4Iepzs4u4H2HrH1WVtGHGSvVGefnzCtipnFitbUTpuYxmuZNTXwxmrXDmuzsWbVFzwVFj49Az528Pp0fH6O8QMAJQImJScCHku+H+vpokhU/xRXv79A/6yZ/67KylCbJQAfJjo7OQAsd7Qv7++Yd7C+C7EFBbi9nqX1ns7Maqf0cvv1fX0Mc6iWK6kVFYCW/2ka/IyP52vcCpvdTU1EClqHTluTkRaFb7S1bm5t27cJd6sJ1dShdHCTZHOHhxSSu6XquPT3U6Wq+mGpMTPK+Wu7YWmxsgu5Bw/xBfn69wwIG8QL19fMGT9EdT4ODUtFc5NBcaGiM5PQHovRRUVYHNFy5NNHRjVwIGOkI+fnhGJOu35Pi4kyuc5VNc6urPpVT9cRTYmKX9T9BVD8qKmtBDBQQDAgIHBRS9jFSlZVj9mWvjGVGRumvXuIhXp2df+IoeGAoMDBIeKH4bqE3N8/4DxEUDwoKGxG1xF61Ly/rxAkbHAkODhUbNlpINiQkflqbtjabGxuttj1HpT3f35hHJmqBJs3Np2ppu5xpTk71u81M/s1/fzNMn7rPn+rqULobLSQbEhI/LZ65Op4dHaS5dJywdFhYxJwucmguNDRGci13bC02NkF3ss2jstzcEc3uKXPutLSdKfsWtvtbW00W9gFT9qSkpQFN1+xNdnah12GjdWG3txSjzkn6zn19NEl7jaR7UlLfjT5CoT7d3Z9CcZO8cV5ezZOXoiaXExOxovUEV/WmpqIEaLhpaLm5AbgAAAAAAAAAACx0mSzBwbV0YKCAYEBA4KAfId0f4+PCIchD8sh5eTpD7Sx37ba2miy+2bO+1NQN2UbKAUaNjUfK2XDO2WdnF3BL3eRLcnKv3d55M96UlO151Gcr1JiY/2foI3vosLCTI0reEUqFhVvea71ta7u7Br0qfpEqxcW7fuU0nuVPT3s0FjrBFu3t1zrFVBfFhobSVNdiL9eamvhiVf/MVWZmmf+UpyKUERG2p89KD8+KisBKEDDJEOnp2TAGCggGBAQOCoGY54H+/maY8Atb8KCgqwtEzPBEeHi0zLrVSrolJfDV4z6W40tLdT7zDl/zoqKsDv4Zuv5dXUQZwFsbwICA21uKhQqKBQWAha3sfq0/P9PsvN9CvCEh/t9I2OBIcHCo2AQM+QTx8f0M33rG32NjGXrBWO7Bd3cvWHWfRXWvrzCfY6WEY0JC56UwUEAwICBwUBou0Rrl5csuDhLhDv397xJtt2Vtv78It0zUGUyBgVXUFDwwFBgYJDw1X0w1JiZ5Xy9xnS/Dw7Jx4Thn4b6+hjii/WqiNTXI/cxPC8yIiMdPOUtcOS4uZUtX+T1Xk5Nq+fINqvJVVVgNgp3jgvz8YZ1HyfRHenqzyazvi6zIyCfv5zJv57q6iDIrfWQrMjJPfZWk15Xm5kKkoPuboMDAO/uYszKYGRmqs9FoJ9GenvZof4Fdf6OjIoFmqohmRETuqn6CqH5UVNaCq+Z2qzs73eaDnhaDCwuVnspFA8qMjMlFKXuVKcfHvHvTbtbTa2sFbjxEUDwoKGxEeYtVeaenLIviPWPivLyBPR0nLB0WFjEndppBdq2tN5o7Ta0729uWTVb6yFZkZJ76TtLoTnR0ptIeIigeFBQ2Itt2P9uSkuR2Ch4YCgwMEh5stJBsSEj8tOQ3a+S4uI83XeclXZ+feOdusmFuvb0Psu8qhu9DQ2kqpvGTpsTENfGo43KoOTna46T3YqQxMcb3N1m9N9PTilmLhv+L8vJ0hjJWsTLV1YNWQ8UNQ4uLTsVZ69xZbm6F67fCr7fa2hjCjI8CjAEBjo9krHlksbEdrNJtI9KcnPFt4DuS4ElJcju0x6u02Ngfx/oVQ/qsrLkVBwn9B/Pz+gklb4Ulz8+gb6/qj6/KyiDqjonzjvT0fYnpII7pR0dnIBgoIBgQEDgo1WTe1W9vC2SIg/uI8PBzg2+xlG9KSvuxcpa4clxcypYkbHAkODhUbPEIrvFXV18Ix1Lmx3NzIVJR8zVRl5dk8yNljSPLy65lfIRZfKGhJYScv8uc6OhXvyFjfCE+Pl1j3Xw33ZaW6nzcf8LcYWEef4aRGoYNDZyRhZQehQ8Pm5SQq9uQ4OBLq0LG+EJ8fLrGxFfixHFxJleq5YOqzMwp5dhzO9iQkONzBQ8MBQYGCQ8BA/UB9/f0AxI2OBIcHCo2o/6fo8LCPP5f4dRfamqL4fkQR/murr4Q0GvS0GlpAmuRqC6RFxe/qFjoKViZmXHoJ2l0Jzo6U2m50E65Jyf30DhIqTjZ2ZFIEzXNE+vr3jWzzlazKyvlzjNVRDMiIndVu9a/u9LSBNZwkElwqak5kImADokHB4eAp/JmpzMzwfK2wVq2LS3swSJmeCI8PFpmkq0qkhUVuK0gYIkgycmpYEnbFUmHh1zb/xpP/6qqsBp4iKB4UFDYiHqOUXqlpSuOj4oGjwMDiYr4E7L4WVlKE4CbEoAJCZKbFzk0FxoaIznadcraZWUQdTFTtTHX14RTxlETxoSE1VG407u40NAD08NeH8OCgtxesMtSsCkp4st3mbR3WlrDmREzPBEeHi0zy0b2y3t7PUb8H0v8qKi3H9Zh2tZtbQxhOk5YOiwsYk4=")),Ue=xe(Ie("9KX0l6XGxjKXhJfrhPj4b7CZsMeZ7u5ejI2M94329noXDRflDf//6Ny93Le91tYKyLHIp7He3hb8VPw5VJGRbfBQ8MBQYGCQBQMFBAMCAgfgqeCHqc7OLod9h6x9VlbRKxkr1Rnn58ymYqZxYrW1EzHmMZrmTU18tZq1w5rs7FnPRc8FRY+PQLydvD6dHx+jwEDACUCJiUmSh5Lvh/r6aD8VP8UV7+/QJusmf+uyspRAyUAHyY6Ozh0LHe0L+/vmL+wvguxBQW6pZ6l9Z7OzGhz9HL79X19DJeoliupFRWDav9pGvyMj+QL3Aqb3U1NRoZah05bk5EXtW+0tW5ubdl3CXerCdXUoJBwk2Rzh4cXprul6rj091L5qvphqTEzy7lru2FpsbILDQcP8QX5+vQYCBvEC9fXz0U/RHU+Dg1LkXOTQXGhojAf0B6L0UVFWXDRcuTTR0Y0YCBjpCPn54a6Trt+T4uJMlXOVTXOrqz71U/XEU2Jil0E/QVQ/KiprFAwUEAwICBz2UvYxUpWVY69lr4xlRkbp4l7iIV6dnX94KHhgKDAwSPih+G6hNzfPEQ8RFA8KChvEtcRetS8v6xsJGxwJDg4VWjZaSDYkJH62m7Y2mxsbrUc9R6U939+YaiZqgSbNzae7abucaU5O9UzNTP7Nf38zup+6z5/q6lAtGy0kGxISP7meuTqeHR2knHScsHRYWMRyLnJoLjQ0Rnctd2wtNjZBzbLNo7Lc3BEp7ilz7rS0nRb7Frb7W1tNAfYBU/akpKXXTdfsTXZ2oaNho3Vht7cUSc5J+s59fTSNe42ke1JS30I+QqE+3d2fk3GTvHFeXs2il6ImlxMTsQT1BFf1pqaiuGi4aWi5uQEAAAAAAAAAAHQsdJkswcG1oGCggGBAQOAhHyHdH+PjwkPIQ/LIeXk6LO0sd+22tprZvtmzvtTUDcpGygFGjY1HcNlwztlnZxfdS93kS3Jyr3neeTPelJTtZ9RnK9SYmP8j6CN76LCwk95K3hFKhYVbvWu9bWu7uwZ+Kn6RKsXFuzTlNJ7lT097OhY6wRbt7ddUxVQXxYaG0mLXYi/Xmpr4/1X/zFVmZpmnlKcilBERtkrPSg/PiorAMBAwyRDp6dkKBgoIBgQEDpiBmOeB/v5mC/ALW/CgoKvMRMzwRHh4tNW61Uq6JSXwPuM+luNLS3UO8w5f86KirBn+Gbr+XV1EW8BbG8CAgNuFioUKigUFgOyt7H6tPz/T37zfQrwhIf7YSNjgSHBwqAwEDPkE8fH9et96xt9jYxlYwVjuwXd3L591n0V1r68wpWOlhGNCQudQMFBAMCAgcC4aLtEa5eXLEg4S4Q79/e+3bbdlbb+/CNRM1BlMgYFVPBQ8MBQYGCRfNV9MNSYmeXEvcZ0vw8OyOOE4Z+G+vob9ov1qojU1yE/MTwvMiIjHSzlLXDkuLmX5V/k9V5OTag3yDaryVVVYnYKd44L8/GHJR8n0R3p6s++s74usyMgnMucyb+e6uoh9K31kKzIyT6SVpNeV5uZC+6D7m6DAwDuzmLMymBkZqmjRaCfRnp72gX+BXX+joyKqZqqIZkRE7oJ+gqh+VFTW5qvmdqs7O92eg54WgwsLlUXKRQPKjIzJeyl7lSnHx7xu027W02trBUQ8RFA8KChsi3mLVXmnpyw94j1j4ry8gScdJywdFhYxmnaaQXatrTdNO02tO9vblvpW+shWZGSe0k7S6E50dKYiHiIoHhQUNnbbdj/bkpLkHgoeGAoMDBK0bLSQbEhI/DfkN2vkuLiP513nJV2fn3iybrJhbr29DyrvKobvQ0Np8abxk6bExDXjqONyqDk52vek92KkMTHGWTdZvTfT04qGi4b/i/LydFYyVrEy1dWDxUPFDUOLi07rWevcWW5uhcK3wq+32toYj4yPAowBAY6sZKx5ZLGxHW3SbSPSnJzxO+A7kuBJSXLHtMertNjYHxX6FUP6rKy5CQcJ/Qfz8/pvJW+FJc/PoOqv6o+vysogiY6J84709H0g6SCO6UdHZygYKCAYEBA4ZNVk3tVvbwuDiIP7iPDwc7FvsZRvSkr7lnKWuHJcXMpsJGxwJDg4VAjxCK7xV1dfUsdS5sdzcyHzUfM1UZeXZGUjZY0jy8uuhHyEWXyhoSW/nL/LnOjoV2MhY3whPj5dfN18N92Wlup/3H/C3GFhHpGGkRqGDQ2clIWUHoUPD5urkKvbkODgS8ZCxvhCfHy6V8RX4sRxcSblquWDqszMKXPYczvYkJDjDwUPDAUGBgkDAQP1Aff39DYSNjgSHBwq/qP+n6PCwjzhX+HUX2pqixD5EEf5rq6+a9Br0tBpaQKokagukRcXv+hY6ClYmZlxaSdpdCc6OlPQudBOuScn90g4SKk42dmRNRM1zRPr697Os85Wsysr5VUzVUQzIiJ31rvWv7vS0gSQcJBJcKmpOYCJgA6JBweH8qfyZqczM8HBtsFati0t7GYiZngiPDxarZKtKpIVFbhgIGCJIMnJqdtJ2xVJh4dcGv8aT/+qqrCIeIigeFBQ2I56jlF6paUrio+KBo8DA4kT+BOy+FlZSpuAmxKACQmSORc5NBcaGiN12nXK2mVlEFMxU7Ux19eEUcZRE8aEhNXTuNO7uNDQA17DXh/DgoLcy7DLUrApKeKZd5m0d1pawzMRMzwRHh4tRstG9st7ez0f/B9L/Kiot2HWYdrWbW0MTjpOWDosLGI=")),Le=xe(Ie("MvSl9JelxsZvl4SX64T4+F6wmbDHme7ueoyNjPeN9vboFw0X5Q3//wrcvdy3vdbWFsixyKex3t5t/FT8OVSRkZDwUPDAUGBgBwUDBQQDAgIu4Kngh6nOztGHfYesfVZWzCsZK9UZ5+cTpmKmcWK1tXwx5jGa5k1NWbWatcOa7OxAz0XPBUWPj6O8nbw+nR8fScBAwAlAiYlokoeS74f6+tA/FT/FFe/vlCbrJn/rsrLOQMlAB8mOjuYdCx3tC/v7bi/sL4LsQUEaqWepfWezs0Mc/Ry+/V9fYCXqJYrqRUX52r/aRr8jI1EC9wKm91NTRaGWodOW5OR27VvtLVubmyhdwl3qwnV1xSQcJNkc4eHU6a7peq49PfK+ar6YakxMgu5a7thabGy9w0HD/EF+fvMGAgbxAvX1UtFP0R1Pg4OM5Fzk0FxoaFYH9Aei9FFRjVw0XLk00dHhGAgY6Qj5+Uyuk67fk+LiPpVzlU1zq6uX9VP1xFNiYmtBP0FUPyoqHBQMFBAMCAhj9lL2MVKVlemvZa+MZUZGf+Je4iFenZ1IeCh4YCgwMM/4ofhuoTc3GxEPERQPCgrrxLXEXrUvLxUbCRscCQ4Oflo2Wkg2JCSttpu2NpsbG5hHPUelPd/fp2omaoEmzc31u2m7nGlOTjNMzUz+zX9/ULqfus+f6uo/LRstJBsSEqS5nrk6nh0dxJx0nLB0WFhGci5yaC40NEF3LXdsLTY2Ec2yzaOy3NydKe4pc+60tE0W+xa2+1tbpQH2AVP2pKSh103X7E12dhSjYaN1Ybe3NEnOSfrOfX3fjXuNpHtSUp9CPkKhPt3dzZNxk7xxXl6xopeiJpcTE6IE9QRX9aamAbhouGloubkAAAAAAAAAALV0LHSZLMHB4KBgoIBgQEDCIR8h3R/j4zpDyEPyyHl5miztLHfttrYN2b7Zs77U1EfKRsoBRo2NF3DZcM7ZZ2ev3Uvd5Etycu153nkz3pSU/2fUZyvUmJiTI+gje+iwsFveSt4RSoWFBr1rvW1ru7u7fip+kSrFxXs05TSe5U9P1zoWOsEW7e3SVMVUF8WGhvhi12Iv15qamf9V/8xVZma2p5SnIpQREcBKz0oPz4qK2TAQMMkQ6ekOCgYKCAYEBGaYgZjngf7+qwvwC1vwoKC0zETM8ER4ePDVutVKuiUldT7jPpbjS0usDvMOX/OiokQZ/hm6/l1d21vAWxvAgICAhYqFCooFBdPsrex+rT8//t+830K8ISGo2EjY4EhwcP0MBAz5BPHxGXrfesbfY2MvWMFY7sF3dzCfdZ9Fda+v56VjpYRjQkJwUDBQQDAgIMsuGi7RGuXl7xIOEuEO/f0It223ZW2/v1XUTNQZTIGBJDwUPDAUGBh5XzVfTDUmJrJxL3GdL8PDhjjhOGfhvr7I/aL9aqI1NcdPzE8LzIiIZUs5S1w5Li5q+Vf5PVeTk1gN8g2q8lVVYZ2CneOC/PyzyUfJ9Ed6eifvrO+LrMjIiDLnMm/nurpPfSt9ZCsyMkKklaTXlebmO/ug+5ugwMCqs5izMpgZGfZo0Wgn0Z6eIoF/gV1/o6PuqmaqiGZERNaCfoKoflRU3ear5narOzuVnoOeFoMLC8lFykUDyoyMvHspe5Upx8cFbtNu1tNra2xEPERQPCgoLIt5i1V5p6eBPeI9Y+K8vDEnHScsHRYWN5p2mkF2ra2WTTtNrTvb2576VvrIVmRkptJO0uhOdHQ2Ih4iKB4UFOR223Y/25KSEh4KHhgKDAz8tGy0kGxISI835Ddr5Li4eOdd5yVdn58Psm6yYW69vWkq7yqG70NDNfGm8ZOmxMTa46jjcqg5Ocb3pPdipDExilk3Wb0309N0houG/4vy8oNWMlaxMtXVTsVDxQ1Di4uF61nr3FlubhjCt8Kvt9rajo+MjwKMAQEdrGSseWSxsfFt0m0j0pyccjvgO5LgSUkfx7THq7TY2LkV+hVD+qys+gkHCf0H8/OgbyVvhSXPzyDqr+qPr8rKfYmOifOO9PRnIOkgjulHRzgoGCggGBAQC2TVZN7Vb29zg4iD+4jw8Puxb7GUb0pKypZylrhyXFxUbCRscCQ4OF8I8Qiu8VdXIVLHUubHc3Nk81HzNVGXl65lI2WNI8vLJYR8hFl8oaFXv5y/y5zo6F1jIWN8IT4+6nzdfDfdlpYef9x/wtxhYZyRhpEahg0Nm5SFlB6FDw9Lq5Cr25Dg4LrGQsb4Qnx8JlfEV+LEcXEp5arlg6rMzONz2HM72JCQCQ8FDwwFBgb0AwED9QH39yo2EjY4EhwcPP6j/p+jwsKL4V/h1F9qar4Q+RBH+a6uAmvQa9LQaWm/qJGoLpEXF3HoWOgpWJmZU2knaXQnOjr30LnQTrknJ5FIOEipONnZ3jUTNc0T6+vlzrPOVrMrK3dVM1VEMyIiBNa71r+70tI5kHCQSXCpqYeAiYAOiQcHwfKn8manMzPswbbBWrYtLVpmImZ4Ijw8uK2SrSqSFRWpYCBgiSDJyVzbSdsVSYeHsBr/Gk//qqrYiHiIoHhQUCuOeo5ReqWliYqPigaPAwNKE/gTsvhZWZKbgJsSgAkJIzkXOTQXGhoQddp1ytplZYRTMVO1MdfX1VHGURPGhIQD07jTu7jQ0Nxew14fw4KC4suwy1KwKSnDmXeZtHdaWi0zETM8ER4ePUbLRvbLe3u3H/wfS/yoqAxh1mHa1m1tYk46Tlg6LCw=")),De=function(t,e){if(7===t)return 255&e.lo;var r=8*(7-t);if(r>=32)return e.hi>>>r-32&255;var n=32-r;return 255&(e.lo>>>r|e.hi<>>n<0;){var s=t.buffer.length-i;if(s>r&&(s=r),Be(n,i,e,s),i+=s,e=e.slice(s),r-=s,i===t.buffer.length){var a=xe(n);ze(a,o),t.count.addOne(),i=0}}t.state=o,t.ptr=i};function qe(t,e,r){var n;n=1===e?t:2===e?Ce(t):function(t){for(var e=t.length,r=new Array(e),n=0;n>>24,n[i+1]=o.hi>>>16&255,n[i+2]=o.hi>>>8&255,n[i+3]=255&o.hi,n[i+4]=o.lo>>>24,n[i+5]=o.lo>>>16&255,n[i+6]=o.lo>>>8&255,n[i+7]=255&o.lo,He(t,a,e),function(t){var e=new Array(16);!function(t,e,r,n){for(var i=0;i<16;)t[i+0]=r[i].clone(),i++}(e,0,t);for(var r=new Array(16),n=0;n<14;n++){for(var i=0;i<16;i++)e[i].setxor64(Fe[i].plus(Ke[n]).setShiftLeft(56));for(var o=0;o<16;o++)r[o]=Se(Te[De(0,e[o])],Oe[De(1,e[o+1&15])],Re[De(2,e[o+2&15])],_e[De(3,e[o+3&15])],Pe[De(4,e[o+4&15])],Ne[De(5,e[o+5&15])],Ue[De(6,e[o+6&15])],Le[De(7,e[o+11&15])]);var s=e;e=r,r=s}for(var a=0;a<16;a++)t[a].setxor64(e[a])}(t.state);for(var u=new Array(16),h=0,c=8;h<8;h++,c++)u[2*h]=t.state[c].hi,u[2*h+1]=t.state[c].lo;return u}(i);return 2===r?s:1===r?Ce(s):function(t){for(var e="",r=t.length,n=0;n0&&(s=Ve.encodeBlock(e.subarray(8*n,8*n+i),s,11*n)),function(t){for(var e=[],r=0,n=Object.keys(t);r0&&(o=Ve.decodeBlock(e.subarray(11*r,11*r+n),o,8*r)),ee.from(function(t){for(var e=[],r=0,n=Object.keys(t);r=48&&e<=57?t:(e-55).toString()})).join(""),r="",n=0;n11)throw Error("Invalid block length: "+t.length);for(var n=function(t){if(t.length<1||t.length>8)throw Error("Invalid input length");var e=oe.zero,r=oe(2).pow(8),n=0;switch(9-t.length){case 1:e=e.add(t[n++]);case 2:e=e.multiply(r).add(t[n++]);case 3:e=e.multiply(r).add(t[n++]);case 4:e=e.multiply(r).add(t[n++]);case 5:e=e.multiply(r).add(t[n++]);case 6:e=e.multiply(r).add(t[n++]);case 7:e=e.multiply(r).add(t[n++]);case 8:e=e.multiply(r).add(t[n++]);break;default:throw Error("Impossible condition")}return e}(t),i=Je[t.length]-1;1===n.compare(0);){var o=n.divmod(Qe);n=o.quotient,e[r+i]=We[parseInt(o.remainder.toString(),10)],i--}return e},Ve.decodeBlock=function(t,e,r){if(t.length<1||t.length>11)throw Error("Invalid block length: "+t.length);var n=Je.indexOf(t.length);if(n<=0)throw Error("Invalid block size");for(var i=oe(0),o=oe(1),s=t.length-1;s>=0;s--){var a=We.indexOf(t[s]);if(a<0)throw Error("Invalid symbol");var u=o.multiply(a).add(i);if(1===u.compare(oe(2).pow(64)))throw Error("Overflow");i=u,o=o.multiply(Qe)}if(n<8&&oe(2).pow(8*n).compare(i)<=0)throw Error("Overflow 2");return e.set(function(t,e){var r=new Uint8Array(e);if(e<1||e>8)throw Error("Invalid input length");for(var n=oe(2).pow(8),i=e-1;i>=0;i--)r[i]=parseInt(t.remainder(n).toString(),10),t=t.divide(n);return r}(i,n),r),e};var rr=r(13550);function nr(t,e){return"string"==typeof t&&(t=t.toLowerCase()),"string"==typeof t&&function(t){return/^0x[0-9a-f]*$/i.test(t)}(t)&&!e?new rr(tr(t),"hex"):new rr(t,e)}function ir(t){return er(t.toString("hex"))}var or=nr(0),sr=nr(2).pow(nr(251));function ar(t){return"number"==typeof t&&t==t&&t%1==0}function ur(t){var e,r,n=tr(function(t){!function(t,e,r,n){void 0===n&&(n="");var i=""===n?"invalid length":"invalid "+n+" length",o=nr(t);!function(t,e){if(!t)throw new Error(e||"Assertion failed")}(o.gte(nr(e))&&o.lt(nr(r)),"Message not signable, "+i+".")}(t,or,sr,"Starknet Address");var e=function(t){return er(tr(ir(nr(t))).padStart(64,"0"))}(t);if(!e.match(/^(0x)?[0-9a-fA-F]{64}$/))throw new Error("Invalid Address Format");return e}(t)).toLowerCase().split(""),i=function(t,e){if(e||(e={}),"number"==typeof t){!function(t,e){if("number"==typeof t){if(null==e&&(e="value not safe"),t<0||t>=9007199254740991)throw e;if(t%1)throw e}}(t,"invalid arrayify value");for(var r=[];t;)r.unshift(255&t),t=parseInt(String(t/256),10);return 0===r.length&&r.push(0),new Uint8Array(r)}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),function(t){return!!t.toHexString}(t)&&(t=t.toHexString()),function(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))}(t)){var n=t.substring(2);if(n.length%2)if("left"===e.hexPad)n="0"+n;else{if("right"!==e.hexPad)throw Error("hex data is odd-lengthvalue"+t);n+="0"}for(var i=[],o=0;o=256)return!1}return!0}(t))return new Uint8Array(t)}((r=(e=tr(ir(nr(t)))).length%2==0?e:"0"+e,er(new a.C4(256).update(ee.from(function(t){if("string"!=typeof t)throw new TypeError("hexToBytes: expected string, got "+typeof t);if(t.length%2)throw new Error("hexToBytes: received invalid unpadded hex");for(var e=new Uint8Array(t.length/2),r=0;r>1]>>4>=8&&(n[o]=n[o].toUpperCase()),(15&i[o>>1])>=8&&(n[o+1]=n[o+1].toUpperCase());return er(n.join(""))}nr(2).pow(nr(128)).add(nr(1));var hr=n.gW.decode,cr=n.gW.encode,lr=n.gW.fromWords,fr=n.gW.toWords;function dr(t,e){return function(r){var n;switch(r.readUInt8(0)){case 118:if(169!==r.readUInt8(1)||136!==r.readUInt8(r.length-2)||172!==r.readUInt8(r.length-1))throw Error("Unrecognised address format");return n=ee.concat([ee.from(t),r.slice(3,3+r.readUInt8(2))]),Qt(n);case 169:if(135!==r.readUInt8(r.length-1))throw Error("Unrecognised address format");return n=ee.concat([ee.from(e),r.slice(2,2+r.readUInt8(1))]),Qt(n);default:throw Error("Unrecognised address format")}}}function pr(t,e){return function(r){var n=Jt(r),i=function(t){return t.every((function(t,e){return e=81&&r<=96)r-=80;else if(0!==r)throw Error("Unrecognised address format");var n=[r].concat(fr(e.slice(2,e.readUInt8(1)+2)));return cr(t,n)}}function mr(t){return function(e){var r=hr(e),n=r.words;if(r.prefix!==t)throw Error("Unexpected human-readable part in bech32 encoded address");var i=lr(n.slice(1)),o=n[0];return o>0&&(o+=80),ee.concat([ee.from([o,i.length]),ee.from(i)])}}function vr(t,e,r){var n=yr(t),i=dr(e,r);return function(t){try{return i(t)}catch(e){return n(t)}}}function br(t,e,r){var n=mr(t),i=pr(e,r);return function(e){return e.toLowerCase().startsWith(t+"1")?n(e):i(e)}}var wr=function(t,e,r,n,i){return{coinType:e,decoder:br(r,n,i),encoder:vr(r,n[0],i[0]),name:t}};function Er(t,e,r){var n=Or(t),i=dr(e,r);return function(t){try{return i(t)}catch(e){return n(t)}}}function Ar(t,e,r){var n=pr(e,r),i=Rr(t);return function(e){return e.toLowerCase().startsWith(t)?i(e):n(e)}}var kr=function(t,e,r,n,i){return{coinType:e,decoder:Ar(r,n,i),encoder:Er(r,n[0],i[0]),name:t}};function Sr(t){var e,r=(e=qe(t,1,2),Ce(e=(e=qe(e,2,2)).slice(0,8)));return ee.from(r)}function Br(t){var e=Sr(t);return(0,o.encode)(ee.concat([t,e],t.length+4))}function xr(t){return function(e){return tt(e.toString("hex"),t||null)}}function Cr(t){return function(e){var r=$(e);if(!function(t,e){return function(t){return/^0x[0-9a-fA-F]{40}$/.test(t)}(t)&&tt(t,e)===t}(e,t||null)&&r!==r.toLowerCase()&&r!==r.toUpperCase())throw Error("Invalid address checksum");return ee.from($(e),"hex")}}var Mr=function(t,e,r){return{coinType:e,decoder:Cr(r),encoder:xr(r),name:t}},Ir=function(t){if(t>=2147483648)throw Error("chainId "+t+" must be less than 2147483648");return(2147483648|t)>>>0},Tr=function(t,e){return{coinType:Ir(e),decoder:Cr(),encoder:xr(),name:t}};function Or(t,e){return function(r){return cr(t,fr(r),e)}}function Rr(t,e){return function(r){var n=hr(r,e),i=n.words;if(n.prefix!==t)throw Error("Unrecognised address format");return ee.from(lr(i))}}var _r=function(t,e,r,n){return{coinType:e,decoder:Rr(r,n),encoder:Or(r,n),name:t}};function Pr(t){return function(e){if(!bt.isValid(e))throw Error("Unrecognised address format");return bt.fromHex(e).toString().replace(/^.{3}/g,t)}}function Nr(t){return function(e){if(!bt.isValid(e))throw Error("Unrecognised address format");var r=new RegExp("^.{"+t.length+"}","g");return bt(e.replace(r,"EOS")).toBuffer()}}var Ur=function(t,e,r){return{coinType:e,decoder:Nr(r),encoder:Pr(r),name:t}};function Lr(t){return ee.from(function(t,e){var r;void 0===e&&(e=0);try{r=s().decode(t)}catch(t){return null}if(-1===Rt.indexOf(r[0]))return null;if(r.length<3)return null;var n,i=r.length<=3?1:r.length<=5?2:r.length<=9?4:r.length<=17?8:32,o=r.length-1-i,a=r.slice(1,1+i);r.slice(1+r.length),32===i&&(n=a);var u=i<32?new Pt(function(t){var e=0,r=1;return t.forEach((function(t){e+=t*r,r*=256})),e}(a)):new _.from(a);if(r[0]%1&&!n&&!e)return null;for(var h=(0,R.blake2b)(Nt(_t,r[0]%1?n||e(u):r.slice(0,1+i))),c=0;c>=4:e&=15,i+=r[s]>"9"&&e<=7?r[s].toUpperCase():r[s];return i}function Fr(t){if(5!==t.readInt8(0)||t.readInt8(1)!=="M".charCodeAt(0)||26!==t.length)return!1;var e,r=t.slice(-4),n=(e=t.slice(0,-4),new a.C4(256).update(ee.from((0,i.blake2b)(Uint8Array.from(e),null,32))).digest().slice(0,4));return r.equals(n)}var jr=[0,0,1,18,2,5,19,11,3,29,6,27,20,8,12,23,4,10,30,17,7,22,28,26,21,25,9,16,13,14,24,15],Kr=[1,2,4,8,16,5,10,20,13,26,17,7,14,28,29,31,27,19,3,6,12,24,21,15,30,25,23,11,22,9,18,1],zr="23456789ABCDEFGHJKLMNPQRSTUVWXYZ",Hr=[3,2,1,0,7,6,5,4,13,14,15,16,12,8,9,10,11];function qr(t){return Yt.sha512_256.update(t).hex().substr(-8)}var Vr,Gr,Wr,Zr,Jr,Qr,Xr,Yr,$r=function(t,e,r,n){return{coinType:e,decoder:n,encoder:r,name:t}},tn=[wr("BTC",0,"bc",[[0]],[[5]]),wr("LTC",2,"ltc",[[48]],[[50],[5]]),gr("DOGE",3,[[30]],[[22]]),gr("RDD",4,[[61]],[[5]]),gr("DASH",5,[[76]],[[16]]),gr("PPC",6,[[55]],[[117]]),$r("NMC",7,Qt,Jt),gr("VIA",14,[[71]],[[33]]),(Vr=[[36]],Gr=[[5]],{coinType:17,decoder:function(t,e,r){var n=mr("grs"),i=function(t,e){return function(r){var n=function(t){var e=function(t){var e=t.slice(0,-4),r=t.slice(-4),n=Sr(e);return r[0]^n[0]|r[1]^n[1]|r[2]^n[2]|r[3]^n[3]?ee.from([]):e}((0,o.decode)(t));if(0===e.length)throw new Error("Invalid checksum");return e}(r),i=function(t){return t.every((function(t,e){return e22)throw new Error("Address length does not match requirements. Expected between 2 and 22 characters.");if("L"!==t[t.length-1])throw new Error('Address format does not match requirements. Expected "L" at the end.');if(t.includes("."))throw new Error("Address format does not match requirements. Address includes invalid character: `.`.")}(t),ee.from(oe(t.slice(0,-1)).toString(16),"hex")})),Ur("STEEM",135,"STM"),gr("FIRO",136,[[82]],[[7]]),Mr("RSK",137,30),gr("KMD",141,[[60]],[[85]]),$r("XRP",144,(function(t){return Y.encodeChecked(t)}),(function(t){return Y.decodeChecked(t)})),$r("BCH",145,(function(t){switch(t.readUInt8(0)){case 118:if(169!==t.readUInt8(1)||136!==t.readUInt8(t.length-2)||172!==t.readUInt8(t.length-1))throw Error("Unrecognised address format");return Wt("bitcoincash",0,t.slice(3,3+t.readUInt8(2)));case 169:if(135!==t.readUInt8(t.length-1))throw Error("Unrecognised address format");return Wt("bitcoincash",1,t.slice(2,2+t.readUInt8(1)));default:throw Error("Unrecognised address format")}}),(function(t){var e=pr([[0]],[[5]]);try{return e(t)}catch(e){return function(t){var e=function(t,e){void 0===e&&(e="bitcoincash"),Dt("string"==typeof t),Dt("string"==typeof e);var r=function(t,e){if(Dt("string"==typeof t),t.length<8||t.length>196)throw new Error("Invalid cashaddr data length.");for(var r=!1,n=!1,i=!1,o=0,s=0;s=97&&a<=122)r=!0;else if(a>=65&&a<=90)n=!0;else if(a>=48&&a<=57)i=!0;else{if(58!==a)throw new Error("Invalid cashaddr character.");if(i||0===s||s>83)throw new Error("Invalid cashaddr prefix.");if(0!==o)throw new Error("Invalid cashaddr separators.");o=s}}if(n&&r)throw new Error("Invalid cashaddr casing.");var u,h=new Ft(0,1);0===o?u=e.toLowerCase():(u=t.substring(0,o).toLowerCase(),o+=1);for(var c=0;c112)throw new Error("Invalid cashaddr data length.");for(var f=_.allocUnsafe(l),d=o;d=5)throw new Error("Invalid padding in data.");if(i[i.length-1]&(1<>>3&31,u=s.slice(1),h=20+4*(3&s[0]);if(4&s[0]&&(h*=2),h!==u.length)throw new Error("Invalid cashaddr data length.");return{prefix:n,type:a,hash:u}}(t),r=e.type,n=e.hash;if(0===r)return ee.concat([ee.from([118,169,20]),ee.from(n),ee.from([136,172])]);if(1===r)return ee.concat([ee.from([169,20]),ee.from(n),ee.from([135])]);throw Error("Unrecognised address format")}(t)}})),$r("XLM",148,(function(t){return function(t,e){if(null===e||kt(e))throw new Error("cannot encode null data");var r=St[t];if(kt(r))throw new Error(t+' is not a valid version byte name. expected one of "ed25519PublicKey", "ed25519SecretSeed", "preAuthTx", "sha256Hash"');e=_.from(e);var n=_.from([r]),i=_.concat([n,e]),o=Bt(i),s=_.concat([i,o]);return Et(s)}("ed25519PublicKey",t)}),(function(t){return function(t,e){if("string"!=typeof e)throw new TypeError("encoded argument must be of type String");var r=At(e),n=r[0],i=r.slice(0,-2),o=i.slice(1),s=r.slice(-2);if(e!==Et(r))throw new Error("invalid encoded string");var a=St[t];if(kt(a))throw new Error(t+' is not a valid version byte name. expected one of "accountId" or "seed"');if(n!==a)throw new Error("invalid version byte. expected "+a+", got "+n);var u=Bt(i);if(!xt(u,s))throw new Error("invalid checksum");return _.from(o)}("ed25519PublicKey",t)})),$r("BTM",153,yr("bm"),mr("bm")),wr("BTG",156,"btg",[[38]],[[23]]),$r("NANO",165,(function(t){var e=(0,$t.encode)(Uint8Array.from(t)),r=(0,i.blake2b)(Uint8Array.from(t),null,5).reverse();return"nano_"+e+(0,$t.encode)(r)}),(function(t){var e=(0,$t.decode)(t.slice(5));return ee.from(e).slice(0,-5)})),gr("RVN",175,[[60]],[[122]]),Mr("POA_LEGACY",178),wr("LCC",192,"lcc",[[28]],[[50],[5]]),Ur("EOS",194,"EOS"),$r("TRX",195,Qt,Jt),$r("BCN",204,(function(t){var e=new a.C4(256).update(t).digest().slice(0,4);return Xe(ee.concat([t,e]))}),(function(t){var e=Ye(t),r=e.slice(0,-68).toString("hex");if(e.length<68||"06"!==r&&"cef622"!==r)throw Error("Unrecognised address format");var n=e.slice(-4);if(!new a.C4(256).update(e.slice(0,-4)).digest().slice(0,4).equals(n))throw Error("Invalid checksum");return e.slice(0,-4)})),Ur("FIO",235,"FIO"),$r("BSV",236,(function(t){var e=ee.concat([ee.from([0]),t]);return Qt(e)}),(function(t){var e=Jt(t);if(21!==e.length)throw Error("Unrecognised address format");if(0!==e[0])throw Error("Invalid version byte");return e.slice(1)})),$r("NEO",239,Qt,Jt),$r("NIM",242,(function(t){var e=function(t,e){void 0===e&&(e="0123456789ABCDEFGHJKLMNPQRSTUVXY");var r,n,i=3,o=0,s="";for(n=0;n>i)],i>5&&(s+=e[31&r>>(i-=5)]),o=r<<(i=5-i),i=8-i;for(3!==i&&(s+=e[31&o]);s.length%8!=0&&33===e.length;)s+=e[32];return s}(t);return("NQ"+$e(e,"NQ")+e).replace(/.{4}/g,"$& ").trim()}),(function(t){if(!t.startsWith("NQ"))throw Error("Unrecognised address format");var e=t.replace(/ /g,""),r=e.slice(2,4),n=e.slice(4);if(r!==$e(n,"NQ"))throw Error("Unrecognised address format");return function(t,e){void 0===e&&(e="0123456789ABCDEFGHJKLMNPQRSTUVXY");var r,n={};e.toUpperCase().split("").forEach((function(t,e){t in n||(n[t]=e)}));var i=8,o=0,s=[];return t.toUpperCase().split("").forEach((function(t){33===e.length&&t===e[32]||(r=255&n[t],(i-=5)>0?o|=r<>-i),o=r<<(i+=8)&255):(s.push(o|r),i=8,o=0))})),8!==i&&0!==o&&s.push(o),ee.from(s)}(n)})),Mr("EWT_LEGACY",246),$r("ALGO",283,(function(t){var e=qr(t);return L(N(t.toString("hex").concat(e))).replace(/=/g,"")}),(function(t){var e=U(t);if(36!==e.length)throw Error("Unrecognised address format");var r=e.slice(0,-4),n=e.slice(-4),i=qr(r);if(n.toString("hex")!==i)throw Error("Unrecognised address format");return r})),$r("IOST",291,o.encode,o.decode),gr("DIVI",301,[[30]],[[13]]),_r("IOTX",304,"io"),Ur("BTS",308,"BTS"),_r("CKB",309,"ckb"),$r("MRX",326,Qt,Jt),_r("LUNA",330,"terra"),$r("DOT",354,(function(t){return Ut(Uint8Array.from(t),0)}),Lr),$r("VSYS",360,(function(t){if(!Fr(t))throw new Error("VSYS: Invalid checksum");return(0,o.encode)(t)}),(function(t){var e=t;if(t.startsWith("address:")&&(e=t.substr(t.length)),e.length>36)throw new Error("VSYS: Address length should not be more than 36");var r=(0,o.decode)(e);if(!Fr(r))throw new Error("VSYS: Invalid checksum");return r})),Ur("ABBC",367,"ABBC"),$r("NEAR",397,(function(t){var e=t.toString();if(e.length>64||e.length<2)throw Error("Invalid address format");return e}),(function(t){if(/(^(([a-z\d]+[\-_])*[a-z\d]+\.)*([a-z\d]+[\-_])*[a-z\d]+$)/g.test(t)){if(t.length>64||t.length<2)throw Error("Invalid address format");return ee.from(t)}throw Error("Invalid address string")})),$r("ETN",415,(function(t){var e=ee.concat([ee.from([18]),t]),r=new a.C4(256).update(e).digest().slice(0,4);return Xe(ee.concat([e,r]))}),(function(t){var e=Ye(t);if(18!==e[0])throw Error("Unrecognised address format");var r=e.slice(65,69);if(!new a.C4(256).update(e.slice(0,65)).digest().slice(0,4).equals(r))throw Error("Invalid checksum");return e.slice(1,65)})),$r("AION",425,(function(t){return"0x".concat(t.toString("hex"))}),(function(t){var e=t;if(null==e||0===e.length||e.length<64)throw Error("Unrecognised address format");if(e.startsWith("0x")&&(e=e.slice(2)),e.startsWith("a0")&&(64!==e.length||!e.substring(2).match("^[0-9A-Fa-f]+$")))throw Error("Unrecognised address format");return ee.from(e,"hex")})),$r("KSM",434,(function(t){return Ut(Uint8Array.from(t),2)}),Lr),$r("AE",457,(function(t){return"ak_"+Qt(t.slice(2))}),(function(t){return ee.concat([ee.from("0x"),Jt(t.split("_")[1])])})),_r("KAVA",459,"kava"),$r("FIL",461,(function(t){return ve("f",be(t[0],t.slice(1))).toString()}),(function(t){return function(t){!function(t){if(!t)throw Error("No bytes to validate.");if(t.length<3)throw Error("Address is too short to validate.");if("f"!==t[0]&&"t"!==t[0])throw Error("Unknown address network.");switch(t[1]){case"0":if(t.length>22)throw Error("Invalid ID address length.");break;case"1":if(41!==t.length)throw Error("Invalid secp256k1 address length.");break;case"2":if(41!==t.length)throw Error("Invalid Actor address length.");break;case"3":if(86!==t.length)throw Error("Invalid BLS address length.");break;default:throw new Error("Invalid address protocol.")}}(t);var e,r=t[0],n=parseInt(t[1],10),i=ee.from([n]),o=t.slice(2);if(0===n)return be(n,ee.from((function(t,e){for(var r=new pe(t);;){var n=r.maskn(7).toNumber();if(r.ishrn(7),r.isZero()){e.write([n]);break}e.write([128|n])}}(o,e=new ge),e.buffer)));var s,a,u=ee.from(U(o.toUpperCase())),h=u.length,c=u.slice(0,h-4);if(s=u.slice(h-4,h),a=me(ee.concat([i,c])),ee.compare(ee.from(a),s))throw Error("Checksums don't match");var l=be(n,c);if(ve(r,l)!==t)throw Error("Did not encode this address properly: "+t);return l}(t).str})),$r("AR",472,(function(t){return t.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}),(function(t){return t=(t=t.replace(/\-/g,"+").replace(/\_/g,"/")).concat("=".repeat(t.length%4==0?0:4-t.length%4)),ee.from(t,"base64")})),gr("CCA",489,[[11]],[[5]]),Mr("THETA_LEGACY",500),$r("SOL",501,o.encode,o.decode),$r("XHV",535,Xe,Ye),$r("FLOW",539,(function(t){var e=ee.alloc(8,0);return t.length>8&&(e=t.slice(-8)),t.copy(e,8-t.length),"0x"+e.toString("hex").toLowerCase()}),(function(t){if(!function(t,e){var r=t;if((r=BigInt(r)^BigInt(e.codeword))===BigInt(0))return!1;for(var n=BigInt(0),i=0;i<64;i++)(BigInt(r)&BigInt(1))===BigInt(1)&&(n=BigInt(n)^BigInt(we[i])),r=BigInt(r)>>BigInt(1);return n===BigInt(0)&&r===BigInt(0)}(BigInt(t),Ee.mainnet))throw Error("Unrecognised address format");return ee.from($(t).replace(/^0+/,""),"hex")})),_r("IRIS",566,"iaa"),gr("LRG",568,[[30]],[[13]]),$r("SERO",569,(function(t){return(0,o.encode)(t)}),(function(t){var e=(0,o.decode)(t);if(96===e.length)return e;throw Error("Unrecognised address format")})),$r("BDX",570,Xe,Ye),wr("CCXX",571,"ccx",[[137]],[[75],[5]]),$r("SRM",573,o.encode,o.decode),$r("VLX",574,o.encode,o.decode),gr("BPS",576,[[0]],[[5]]),Mr("TFUEL",589),_r("GRIN",592,"grin"),Mr("GNO_LEGACY",700),Mr("VET",703),_r("BNB",714,"bnb"),Mr("CLO_LEGACY",820),Ur("HIVE",825,"STM"),Mr("TOMO_LEGACY",889),$r("HNT",904,(function(t){var e=ee.concat([ee.from([0]),t]);return Qt(e)}),(function(t){var e=Jt(t);if(0!==e[0])throw Error("Invalid version byte");return e.slice(1)})),_r("RUNE",931,"thor"),wr("BCD",999,"bcd",[[0]],[[5]]),Mr("TT_LEGACY",1001),Mr("FTM_LEGACY",1007),_r("ONE",1023,"one"),$r("ONT",1024,(function(t){return Qt(ee.concat([ee.from([23]),t]))}),(function(t){var e=Jt(t);if(23===e.readUInt8(0))return e.slice(1);throw Error("Unrecognised address format")})),_r("NOSTR",1237,"npub"),{coinType:1729,decoder:function(t){var e=Jt(t).slice(3);switch(t.substring(0,3)){case"tz1":return ee.concat([ee.from([0,0]),e]);case"tz2":return ee.concat([ee.from([0,1]),e]);case"tz3":return ee.concat([ee.from([0,2]),e]);case"KT1":return ee.concat([ee.from([1]),e,ee.from([0])]);default:throw Error("Unrecognised address format")}},encoder:function(t){if(22!==t.length&&21!==t.length)throw Error("Unrecognised address format");var e;switch(t.readUInt8(0)){case 0:if(0===t.readUInt8(1))e=ee.from([6,161,159]);else if(1===t.readUInt8(1))e=ee.from([6,161,161]);else{if(2!==t.readUInt8(1))throw Error("Unrecognised address format");e=ee.from([6,161,164])}return Qt(ee.concat([e,t.slice(2)]));case 1:return e=ee.from([2,90,121]),Qt(ee.concat([e,t.slice(1,21)]));default:throw Error("Unrecognised address format")}},name:"XTZ"},{coinType:1815,decoder:function(t){var e=Rr("addr",104);return function(t){return t.toLowerCase().startsWith("addr")?e(t):function(t){var e=(0,o.decode)(t),r=function(t,e,r){var n=new DataView(t),i=new Uint8Array(t),o=0;function s(t,e){return o+=t,e}function a(e){return s(e,new Uint8Array(t,o,e))}function u(){return s(1,i[o])}function h(){return s(2,n.getUint16(o))}function c(){return s(4,n.getUint32(o))}function l(){return 255===i[o]&&(o+=1,!0)}function f(t){if(t<24)return t;if(24===t)return u();if(25===t)return h();if(26===t)return c();if(27===t)return 4294967296*c()+c();if(31===t)return-1;throw new Error("Invalid length encoding")}function d(t){var e=u();if(255===e)return-1;var r=f(31&e);if(r<0||e>>5!==t)throw new Error("Invalid indefinite length element");return r}function p(t,e){for(var r=0;r>10),t.push(56320|1023&n))}}var g=function t(){var e,r,i,c=u(),g=c>>5,y=31&c;if(7===g)switch(y){case 25:return function(){var t=new ArrayBuffer(4),e=new DataView(t),r=h(),n=32768&r,i=31744&r,o=1023&r;if(31744===i)i=261120;else if(0!==i)i+=114688;else if(0!==o)return(n?-1:1)*o*5.960464477539063e-8;return e.setUint32(0,n<<16|i<<13|o<<13),e.getFloat32(0)}();case 26:return s(4,n.getFloat32(o));case 27:return s(8,n.getFloat64(o))}if((r=f(y))<0&&(g<2||6=0;)v+=r,m.push(a(r));var b=new Uint8Array(v),w=0;for(e=0;e=0;)p(E,r);else p(E,r);var A="";for(e=0;e>2,c=0;c>6),i.push(128|63&p)):(p=(1023&p)<<10,p|=1023&e.charCodeAt(++r),i.push(240|(p+=65536)>>18),i.push(128|p>>12&63),i.push(128|p>>6&63),i.push(128|63&p))}return d(3,i.length),h(i);default:var g,y;if(Array.isArray(e))for(d(4,g=e.length),r=0;r=0;s--){4===o&&(n.unshift(ae[i]),o=0,i=0);var a=(se.indexOf(t[s])<>4)>1<<(o+=1))throw new Error("Panic error in decoding.");n.unshift(u)}n.unshift(ae[i]),n.length%2==1&&n.unshift("0");for(var h=0,c=0;c127?n-256:n,i^=n;r[t.length]=i;var a="";if(1===e)a="NULS";else if(2===e)a="tNULS";else{var u=ee.concat([ee.from([255&e>>0]),ee.from([255&e>>8])]);a=(0,o.encode)(u).toUpperCase()}return a+["a","b","c","d","e"][a.length-1]+(0,o.encode)(r)}),(function(t){if(t.startsWith("NULS"))t=t.substring(5);else if(t.startsWith("tNULS"))t=t.substring(6);else for(var e=0;e=97){t=t.substring(e+1);break}for(var r=(0,o.decode)(t),n=0,i=0,s=0;s127?n-256:n,i^=n;if(i<0&&(i=256+i),i!==r[r.length-1])throw Error("Unrecognised address format");return r.slice(0,-1)})),$r("AVAX",9e3,Or("avax"),(Wr=Rr("avax"),function(t){var e=t.split("-");return Wr(e[1]||e[0])})),$r("STRK",9004,(function(t){return ur("0x"+t.toString("hex"))}),(function(t){if(ur(e=t)!==e)throw Error("Invalid checksum");var e;return ee.from($(t),"hex")})),Mr("NRG_LEGACY",9797),$r("ARDR",16754,(function(t){for(var e=t.toString("hex"),r=[],n=0,i=0;n=zr.length||17!==r.length)throw Error("Unrecognised address format");o+=zr[r[a]],(a<12&&(a+1)%4==0||16===a)&&(s.push(o),o="")}return"ARDOR-"+s.join("-")}),(function(t){var e=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];if("ARDOR"!==(t=t.replace(/(^\s+)|(\s+$)/g,"").toUpperCase()).slice(0,5)||5!==t.split("-").length)throw Error("Unrecognised address format");for(var r,n=[],i=0,o=ne(t=t.substr(t.indexOf("-")));!(r=o()).done;){var s=zr.indexOf(r.value);if(s>=0&&(n[i++]=s,i>17))throw Error("Unrecognised address format")}for(var a=0,u=0;a12&&s<27)){var a=s;s>26&&(a-=14),o^=(r=Kr[i*s%31],0===(e=t[a])||0===r?0:Kr[(jr[e]+jr[r])%31])}n|=o}return 0===n}(e))throw Error("Unrecognised address format");return ee.from(e)})),kr("ZEL",19167,"za",[[28,184]],[[28,189]]),Mr("CELO_LEGACY",52752),gr("WICC",99999,[[73]],[[51]]),$r("WAN",5718350,(function(t){return Dr("0x"+t.toString("hex"))}),(function(t){if(/^0x[0-9a-fA-F]{40}$/.test(e=t)&&Dr(e)===e)return ee.from($(t),"hex");throw Error("Invalid address checksum");var e})),$r("WAVES",5741564,o.encode,(function(t){var e=(0,o.decode)(t);if(1!==e[0])throw Error("Bad program version");if(87!==e[1]||26!==e.length)throw Error("Unrecognised address format");var r=e.slice(0,22),n=e.slice(22,26);if(!new a.C4(256).update(ee.from((0,i.blake2b)(Uint8Array.from(r),null,32))).digest().slice(0,4).equals(n))throw Error("Invalid checksum");return e})),Tr("OP",10),Tr("CRO",25),Tr("BSC",56),Tr("GO",60),Tr("ETC",61),Tr("TOMO",88),Tr("POA",99),Tr("GNO",100),Tr("TT",108),Tr("MATIC",137),Tr("EWT",246),Tr("FTM",250),Tr("THETA",361),Tr("CLO",820),Tr("NRG",39797),Tr("ARB1",42161),Tr("CELO",42220),Tr("AVAXC",43114)],en=Object.assign.apply(Object,[{}].concat(tn.map((function(t){var e;return(e={})[t.name]=t,e})))),rn=Object.assign.apply(Object,[{}].concat(tn.map((function(t){var e;return(e={})[t.coinType]=t,e}))));new Proxy(rn,{get:function(t,e){var r=parseInt(e,10);if(t[e])return t[e];if(0!=(2147483648&r)){var n=t[60];return{coinType:r,decoder:n.decoder,encoder:n.encoder,name:""}}}})},53102:function(t,e,r){const n=r(98878);e.cidForWeb=t=>{let e=new n(t);0===e.version&&(e=e.toV1());let r=e.toString("base32");if(r.length>63){const t=e.toString("base36");if(t.length<=63)return t;throw new TypeError("CID is longer than DNS limit of 63 characters and is not compatible with public gateways")}return r};e.cidV0ToV1Base32=t=>{let e=new n(t);return 0===e.version&&(e=e.toV1()),e.toString("base32")}},34116:function(t,e,r){const n=r(76883),i=r(18370),{hexStringToBuffer:o,profiles:s}=r(56790),{cidForWeb:a,cidV0ToV1Base32:u}=r(53102);t.exports={helpers:{cidForWeb:a,cidV0ToV1Base32:u},decode:function(t){const e=o(t),r=n.getCodec(e),i=n.rmPrefix(e);let a=s[r];return a||(a=s.default),a.decode(i)},fromIpfs:function(t){return this.encode("ipfs-ns",t)},fromSkylink:function(t){return this.encode("skynet-ns",t)},fromSwarm:function(t){return this.encode("swarm-ns",t)},fromArweave:function(t){return this.encode("arweave-ns",t)},encode:function(t,e){let r=s[t];r||(r=s.default);const o=r.encode(e);return i.toHexString(n.addPrefix(t,o))},getCodec:function(t){let e=o(t);return n.getCodec(e)}}},56790:function(t,e,r){var n=r(48764).Buffer;const i=r(98878),o=r(18370),s=r(12130),a=t=>{let e=t.slice(0,2),r=t.slice(2),n="";return n="0x"===e?r:t,o.fromHexString(n)},u=t=>{try{const{multihash:e}=t;if(e.length<38){const t=o.decode(e);if("identity"===t.name&&t.length<36)return!1}return!0}catch(e){return!1}},h={skynet:t=>s.toUint8Array(t),swarm:t=>{const e=o.encode(a(t),"keccak-256");return new i(1,"swarm-manifest",e).bytes},ipfs:t=>new i(t).toV1().bytes,ipns:t=>{const e=new i(t);if(!u(e))throw Error("ipns-ns allows only valid cryptographic libp2p-key identifiers, try using ED25519 pubkey instead");return new i(1,"libp2p-key",e.multihash).bytes},utf8:t=>n.from(t,"utf8"),arweave:t=>s.toUint8Array(t)},c={hexMultiHash:t=>{const e=new i(t);return o.decode(e.multihash).digest.toString("hex")},ipfs:t=>{const e=new i(t).toV1();return e.toString("libp2p-key"===e.codec?"base36":"base32")},ipns:t=>{const e=new i(t).toV1();return u(e)?e.toString("base36"):(console.warn("[ensdomains/content-hash] use of non-cryptographic identifiers in ipns-ns is deprecated and will be removed, migrate to ED25519 libp2p-key"),String(o.decode(new i(t).multihash).digest))},utf8:t=>t.toString("utf8"),base64:t=>s.fromUint8Array(t,!0)},l={"skynet-ns":{encode:h.skynet,decode:c.base64},"swarm-ns":{encode:h.swarm,decode:c.hexMultiHash},"ipfs-ns":{encode:h.ipfs,decode:c.ipfs},"ipns-ns":{encode:h.ipns,decode:c.ipns},"arweave-ns":{encode:h.arweave,decode:c.base64},default:{encode:h.utf8,decode:c.utf8}};e.hexStringToBuffer=a,e.profiles=l},95851:function(t,e,r){"use strict";r.d(e,{i:function(){return n}});const n="abi/5.7.0"},84243:function(t,e,r){"use strict";r.d(e,{R:function(){return T},$:function(){return O}});var n=r(16441),i=r(6881),o=r(1581),s=r(95851),a=r(61184),u=r(19485);class h extends a.XI{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){try{e=(0,u.getAddress)(e)}catch(r){this._throwError(r.message,e)}return t.writeValue(e)}decode(t){return(0,u.getAddress)((0,n.hexZeroPad)(t.readValue().toHexString(),20))}}class c extends a.XI{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}const l=new o.Logger(s.i);function f(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){let t={};n=e.map((e=>{const n=e.localName;return n||l.throwError("cannot encode object for signature with missing names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]&&l.throwError("cannot encode object for signature with duplicate names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]=!0,r[n]}))}else l.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&l.throwArgumentError("types/value length mismatch","tuple",r);let i=new a.QV(t.wordSize),s=new a.QV(t.wordSize),u=[];e.forEach(((t,e)=>{let r=n[e];if(t.dynamic){let e=s.length;t.encode(s,r);let n=i.writeUpdatableValue();u.push((t=>{n(t+e)}))}else t.encode(i,r)})),u.forEach((t=>{t(i.length)}));let h=t.appendWriter(i);return h+=t.appendWriter(s),h}function d(t,e){let r=[],n=t.subReader(0);e.forEach((e=>{let i=null;if(e.dynamic){let r=t.readValue(),a=n.subReader(r.toNumber());try{i=e.decode(a)}catch(s){if(s.code===o.Logger.errors.BUFFER_OVERRUN)throw s;i=s,i.baseType=e.name,i.name=e.localName,i.type=e.type}}else try{i=e.decode(t)}catch(s){if(s.code===o.Logger.errors.BUFFER_OVERRUN)throw s;i=s,i.baseType=e.name,i.name=e.localName,i.type=e.type}void 0!=i&&r.push(i)}));const i=e.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach(((t,e)=>{let n=t.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[e];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let o=0;o{throw t}})}return Object.freeze(r)}class p extends a.XI{constructor(t,e,r){super("array",t.type+"["+(e>=0?e:"")+"]",r,-1===e||t.dynamic),this.coder=t,this.length=e}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;rt._data.length&&l.throwError("insufficient data length",o.Logger.errors.BUFFER_OVERRUN,{length:t._data.length,count:e}));let r=[];for(let n=0;n{t.dynamic&&(r=!0),n.push(t.type)}));super("tuple","tuple("+n.join(",")+")",e,r),this.coders=t}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===e[i]&&("length"===i&&(i="_length"),null==t[i]&&(t[i]=t[n]))})),Object.freeze(t)}encode(t,e){return f(t,this.coders,e)}decode(t){return t.coerce(this.name,d(t,this.coders))}}var x=r(11388);const C=new o.Logger(s.i),M=new RegExp(/^bytes([0-9]*)$/),I=new RegExp(/^(u?int)([0-9]*)$/);class T{constructor(t){(0,i.defineReadOnly)(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new h(t.name);case"bool":return new g(t.name);case"string":return new S(t.name);case"bytes":return new m(t.name);case"array":return new p(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new B((t.components||[]).map((t=>this._getCoder(t))),t.name);case"":return new b(t.name)}let e=t.type.match(I);if(e){let r=parseInt(e[2]||"256");return(0===r||r>256||r%8!==0)&&C.throwArgumentError("invalid "+e[1]+" bit length","param",t),new A(r/8,"int"===e[1],t.name)}if(e=t.type.match(M),e){let r=parseInt(e[1]);return(0===r||r>32)&&C.throwArgumentError("invalid bytes length","param",t),new v(r,t.name)}return C.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new a.Ej(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new a.QV(this._getWordSize())}getDefaultValue(t){const e=t.map((t=>this._getCoder(x._R.from(t))));return new B(e,"_").defaultValue()}encode(t,e){t.length!==e.length&&C.throwError("types/values length mismatch",o.Logger.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});const r=t.map((t=>this._getCoder(x._R.from(t)))),n=new B(r,"_"),i=this._getWriter();return n.encode(i,e),i.data}decode(t,e,r){const i=t.map((t=>this._getCoder(x._R.from(t))));return new B(i,"_").decode(this._getReader((0,n.arrayify)(e),r))}}const O=new T},61184:function(t,e,r){"use strict";r.d(e,{BR:function(){return h},Ej:function(){return f},QV:function(){return l},XI:function(){return c}});var n=r(16441),i=r(2593),o=r(6881),s=r(1581),a=r(95851);const u=new s.Logger(a.i);function h(t){const e=[],r=function(t,n){if(Array.isArray(n))for(let o in n){const s=t.slice();s.push(o);try{r(s,n[o])}catch(i){e.push({path:s,error:i})}}};return r([],t),e}class c{constructor(t,e,r,n){this.name=t,this.type=e,this.localName=r,this.dynamic=n}_throwError(t,e){u.throwArgumentError(t,this.localName,e)}}class l{constructor(t){(0,o.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return(0,n.hexConcat)(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData((0,n.concat)(t._data))}writeBytes(t){let e=(0,n.arrayify)(t);const r=e.length%this.wordSize;return r&&(e=(0,n.concat)([e,this._padding.slice(r)])),this._writeData(e)}_getValue(t){let e=(0,n.arrayify)(i.O$.from(t));return e.length>this.wordSize&&u.throwError("value out-of-bounds",s.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=(0,n.concat)([this._padding.slice(e.length%this.wordSize),e])),e}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class f{constructor(t,e,r,i){(0,o.defineReadOnly)(this,"_data",(0,n.arrayify)(t)),(0,o.defineReadOnly)(this,"wordSize",e||32),(0,o.defineReadOnly)(this,"_coerceFunc",r),(0,o.defineReadOnly)(this,"allowLoose",i),this._offset=0}get data(){return(0,n.hexlify)(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):f.coerce(t,e)}_peekBytes(t,e,r){let n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:u.throwError("data out-of-bounds",s.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(t){return new f(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return i.O$.from(this.readBytes(this.wordSize))}}},11388:function(t,e,r){"use strict";r.d(e,{HY:function(){return m},IC:function(){return B},QV:function(){return v},Xg:function(){return A},YW:function(){return k},_R:function(){return g},pc:function(){return d}});var n=r(2593),i=r(6881),o=r(1581),s=r(95851);const a=new o.Logger(s.i),u={};let h={calldata:!0,memory:!0,storage:!0},c={calldata:!0,memory:!0};function l(t,e){if("bytes"===t||"string"===t){if(h[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&c[e])return!0;return(h[e]||"payable"===e)&&a.throwArgumentError("invalid modifier","name",e),!1}function f(t,e){for(let r in e)(0,i.defineReadOnly)(t,r,e[r])}const d=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),p=new RegExp(/^(.*)\[([0-9]*)\]$/);class g{constructor(t,e){t!==u&&a.throwError("use fromString",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),f(this,e);let r=this.type.match(p);f(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:g.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=d.sighash),d[t]||a.throwArgumentError("invalid format type","format",t),t===d.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==d.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===d.full?", ":",")+")"):e+=this.type,t!==d.sighash&&(!0===this.indexed&&(e+=" indexed"),t===d.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"===typeof t?g.fromString(t,e):g.fromObject(t)}static fromObject(t){return g.isParamType(t)?t:new g(u,{name:t.name||null,type:x(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(g.fromObject):null})}static fromString(t,e){return r=function(t,e){let r=t;function n(e){a.throwArgumentError(`unexpected character at position ${e}`,"param",t)}function i(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},s=o;for(let a=0;ag.fromString(t,e)))}class m{constructor(t,e){t!==u&&a.throwError("use a static from method",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),f(this,e),this._isFragment=!0,Object.freeze(this)}static from(t){return m.isFragment(t)?t:"string"===typeof t?m.fromString(t):m.fromObject(t)}static fromObject(t){if(m.isFragment(t))return t;switch(t.type){case"function":return k.fromObject(t);case"event":return v.fromObject(t);case"constructor":return A.fromObject(t);case"error":return B.fromObject(t);case"fallback":case"receive":return null}return a.throwArgumentError("invalid fragment object","value",t)}static fromString(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?v.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?k.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?A.fromString(t.trim()):"error"===t.split(" ")[0]?B.fromString(t.substring(5).trim()):a.throwArgumentError("unsupported fragment","value",t)}static isFragment(t){return!(!t||!t._isFragment)}}class v extends m{format(t){if(t||(t=d.sighash),d[t]||a.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",t!==d.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}static from(t){return"string"===typeof t?v.fromString(t):v.fromObject(t)}static fromObject(t){if(v.isEventFragment(t))return t;"event"!==t.type&&a.throwArgumentError("invalid event object","value",t);const e={name:M(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(g.fromObject):[],type:"event"};return new v(u,e)}static fromString(t){let e=t.match(I);e||a.throwArgumentError("invalid event string","value",t);let r=!1;return e[3].split(" ").forEach((t=>{switch(t.trim()){case"anonymous":r=!0;break;case"":break;default:a.warn("unknown modifier: "+t)}})),v.fromObject({name:e[1].trim(),anonymous:r,inputs:y(e[2],!0),type:"event"})}static isEventFragment(t){return t&&t._isFragment&&"event"===t.type}}function b(t,e){e.gas=null;let r=t.split("@");return 1!==r.length?(r.length>2&&a.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||a.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=n.O$.from(r[1]),r[0]):t}function w(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function E(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&a.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&a.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||a.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&a.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&a.throwArgumentError("unable to determine stateMutability","value",t),e}class A extends m{format(t){if(t||(t=d.sighash),d[t]||a.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});t===d.sighash&&a.throwError("cannot format a constructor for sighash",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let e="constructor("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}static from(t){return"string"===typeof t?A.fromString(t):A.fromObject(t)}static fromObject(t){if(A.isConstructorFragment(t))return t;"constructor"!==t.type&&a.throwArgumentError("invalid constructor object","value",t);let e=E(t);e.constant&&a.throwArgumentError("constructor cannot be constant","value",t);const r={name:null,type:t.type,inputs:t.inputs?t.inputs.map(g.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?n.O$.from(t.gas):null};return new A(u,r)}static fromString(t){let e={type:"constructor"},r=(t=b(t,e)).match(I);return r&&"constructor"===r[1].trim()||a.throwArgumentError("invalid constructor string","value",t),e.inputs=y(r[2].trim(),!1),w(r[3].trim(),e),A.fromObject(e)}static isConstructorFragment(t){return t&&t._isFragment&&"constructor"===t.type}}class k extends A{format(t){if(t||(t=d.sighash),d[t]||a.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",t!==d.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((e=>e.format(t))).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}static from(t){return"string"===typeof t?k.fromString(t):k.fromObject(t)}static fromObject(t){if(k.isFunctionFragment(t))return t;"function"!==t.type&&a.throwArgumentError("invalid function object","value",t);let e=E(t);const r={type:t.type,name:M(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(g.fromObject):[],outputs:t.outputs?t.outputs.map(g.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?n.O$.from(t.gas):null};return new k(u,r)}static fromString(t){let e={type:"function"},r=(t=b(t,e)).split(" returns ");r.length>2&&a.throwArgumentError("invalid function string","value",t);let n=r[0].match(I);if(n||a.throwArgumentError("invalid function signature","value",t),e.name=n[1].trim(),e.name&&M(e.name),e.inputs=y(n[2],!1),w(n[3].trim(),e),r.length>1){let n=r[1].match(I);""==n[1].trim()&&""==n[3].trim()||a.throwArgumentError("unexpected tokens","value",t),e.outputs=y(n[2],!1)}else e.outputs=[];return k.fromObject(e)}static isFunctionFragment(t){return t&&t._isFragment&&"function"===t.type}}function S(t){const e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||a.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class B extends m{format(t){if(t||(t=d.sighash),d[t]||a.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="error "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",e.trim()}static from(t){return"string"===typeof t?B.fromString(t):B.fromObject(t)}static fromObject(t){if(B.isErrorFragment(t))return t;"error"!==t.type&&a.throwArgumentError("invalid error object","value",t);const e={type:t.type,name:M(t.name),inputs:t.inputs?t.inputs.map(g.fromObject):[]};return S(new B(u,e))}static fromString(t){let e={type:"error"},r=t.match(I);return r||a.throwArgumentError("invalid error signature","value",t),e.name=r[1].trim(),e.name&&M(e.name),e.inputs=y(r[2],!1),S(B.fromObject(e))}static isErrorFragment(t){return t&&t._isFragment&&"error"===t.type}}function x(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const C=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function M(t){return t&&t.match(C)||a.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const I=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},83893:function(t,e,r){"use strict";r.r(e),r.d(e,{AbiCoder:function(){return i.R},ConstructorFragment:function(){return n.Xg},ErrorFragment:function(){return n.IC},EventFragment:function(){return n.QV},FormatTypes:function(){return n.pc},Fragment:function(){return n.HY},FunctionFragment:function(){return n.YW},Indexed:function(){return o.Hk},Interface:function(){return o.vU},LogDescription:function(){return o.CC},ParamType:function(){return n._R},TransactionDescription:function(){return o.vk},checkResultErrors:function(){return s.BR},defaultAbiCoder:function(){return i.$}});var n=r(11388),i=r(84243),o=r(8198),s=r(61184)},8198:function(t,e,r){"use strict";r.d(e,{CC:function(){return p},Hk:function(){return m},vU:function(){return w},vk:function(){return g}});var n=r(19485),i=r(2593),o=r(16441),s=r(32046),a=r(38197),u=r(6881),h=r(84243),c=r(11388),l=r(1581),f=r(95851);const d=new l.Logger(f.i);class p extends u.Description{}class g extends u.Description{}class y extends u.Description{}class m extends u.Description{static isIndexed(t){return!(!t||!t._isIndexed)}}const v={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function b(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class w{constructor(t){let e=[];e="string"===typeof t?JSON.parse(t):t,(0,u.defineReadOnly)(this,"fragments",e.map((t=>c.HY.from(t))).filter((t=>null!=t))),(0,u.defineReadOnly)(this,"_abiCoder",(0,u.getStatic)(new.target,"getAbiCoder")()),(0,u.defineReadOnly)(this,"functions",{}),(0,u.defineReadOnly)(this,"errors",{}),(0,u.defineReadOnly)(this,"events",{}),(0,u.defineReadOnly)(this,"structs",{}),this.fragments.forEach((t=>{let e=null;switch(t.type){case"constructor":return this.deploy?void d.warn("duplicate definition - constructor"):void(0,u.defineReadOnly)(this,"deploy",t);case"function":e=this.functions;break;case"event":e=this.events;break;case"error":e=this.errors;break;default:return}let r=t.format();e[r]?d.warn("duplicate definition - "+r):e[r]=t})),this.deploy||(0,u.defineReadOnly)(this,"deploy",c.Xg.from({payable:!1,type:"constructor"})),(0,u.defineReadOnly)(this,"_isInterface",!0)}format(t){t||(t=c.pc.full),t===c.pc.sighash&&d.throwArgumentError("interface does not support formatting sighash","format",t);const e=this.fragments.map((e=>e.format(t)));return t===c.pc.json?JSON.stringify(e.map((t=>JSON.parse(t)))):e}static getAbiCoder(){return h.$}static getAddress(t){return(0,n.getAddress)(t)}static getSighash(t){return(0,o.hexDataSlice)((0,s.id)(t.format()),0,4)}static getEventTopic(t){return(0,s.id)(t.format())}getFunction(t){if((0,o.isHexString)(t)){for(const e in this.functions)if(t===this.getSighash(e))return this.functions[e];d.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.functions).filter((t=>t.split("(")[0]===e));return 0===r.length?d.throwArgumentError("no matching function","name",e):r.length>1&&d.throwArgumentError("multiple matching functions","name",e),this.functions[r[0]]}const e=this.functions[c.YW.fromString(t).format()];return e||d.throwArgumentError("no matching function","signature",t),e}getEvent(t){if((0,o.isHexString)(t)){const e=t.toLowerCase();for(const t in this.events)if(e===this.getEventTopic(t))return this.events[t];d.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.events).filter((t=>t.split("(")[0]===e));return 0===r.length?d.throwArgumentError("no matching event","name",e):r.length>1&&d.throwArgumentError("multiple matching events","name",e),this.events[r[0]]}const e=this.events[c.QV.fromString(t).format()];return e||d.throwArgumentError("no matching event","signature",t),e}getError(t){if((0,o.isHexString)(t)){const e=(0,u.getStatic)(this.constructor,"getSighash");for(const r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}d.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.errors).filter((t=>t.split("(")[0]===e));return 0===r.length?d.throwArgumentError("no matching error","name",e):r.length>1&&d.throwArgumentError("multiple matching errors","name",e),this.errors[r[0]]}const e=this.errors[c.YW.fromString(t).format()];return e||d.throwArgumentError("no matching error","signature",t),e}getSighash(t){if("string"===typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(r){throw e}}return(0,u.getStatic)(this.constructor,"getSighash")(t)}getEventTopic(t){return"string"===typeof t&&(t=this.getEvent(t)),(0,u.getStatic)(this.constructor,"getEventTopic")(t)}_decodeParams(t,e){return this._abiCoder.decode(t,e)}_encodeParams(t,e){return this._abiCoder.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){"string"===typeof t&&(t=this.getError(t));const r=(0,o.arrayify)(e);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(t)&&d.throwArgumentError(`data signature does not match error ${t.name}.`,"data",(0,o.hexlify)(r)),this._decodeParams(t.inputs,r.slice(4))}encodeErrorResult(t,e){return"string"===typeof t&&(t=this.getError(t)),(0,o.hexlify)((0,o.concat)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionData(t,e){"string"===typeof t&&(t=this.getFunction(t));const r=(0,o.arrayify)(e);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(t)&&d.throwArgumentError(`data signature does not match function ${t.name}.`,"data",(0,o.hexlify)(r)),this._decodeParams(t.inputs,r.slice(4))}encodeFunctionData(t,e){return"string"===typeof t&&(t=this.getFunction(t)),(0,o.hexlify)((0,o.concat)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionResult(t,e){"string"===typeof t&&(t=this.getFunction(t));let r=(0,o.arrayify)(e),n=null,i="",s=null,a=null,u=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,r)}catch(h){}break;case 4:{const t=(0,o.hexlify)(r.slice(0,4)),e=v[t];if(e)s=this._abiCoder.decode(e.inputs,r.slice(4)),a=e.name,u=e.signature,e.reason&&(n=s[0]),"Error"===a?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:"Panic"===a&&(i=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{const e=this.getError(t);s=this._abiCoder.decode(e.inputs,r.slice(4)),a=e.name,u=e.format()}catch(h){}break}}return d.throwError("call revert exception"+i,l.Logger.errors.CALL_EXCEPTION,{method:t.format(),data:(0,o.hexlify)(e),errorArgs:s,errorName:a,errorSignature:u,reason:n})}encodeFunctionResult(t,e){return"string"===typeof t&&(t=this.getFunction(t)),(0,o.hexlify)(this._abiCoder.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){"string"===typeof t&&(t=this.getEvent(t)),e.length>t.inputs.length&&d.throwError("too many arguments for "+t.format(),l.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e});let r=[];t.anonymous||r.push(this.getEventTopic(t));const n=(t,e)=>"string"===t.type?(0,s.id)(e):"bytes"===t.type?(0,a.keccak256)((0,o.hexlify)(e)):("bool"===t.type&&"boolean"===typeof e&&(e=e?"0x01":"0x00"),t.type.match(/^u?int/)&&(e=i.O$.from(e).toHexString()),"address"===t.type&&this._abiCoder.encode(["address"],[e]),(0,o.hexZeroPad)((0,o.hexlify)(e),32));for(e.forEach(((e,i)=>{let o=t.inputs[i];o.indexed?null==e?r.push(null):"array"===o.baseType||"tuple"===o.baseType?d.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,e):Array.isArray(e)?r.push(e.map((t=>n(o,t)))):r.push(n(o,e)):null!=e&&d.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,e)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(t,e){"string"===typeof t&&(t=this.getEvent(t));const r=[],n=[],i=[];return t.anonymous||r.push(this.getEventTopic(t)),e.length!==t.inputs.length&&d.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach(((t,o)=>{const u=e[o];if(t.indexed)if("string"===t.type)r.push((0,s.id)(u));else if("bytes"===t.type)r.push((0,a.keccak256)(u));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([t.type],[u]))}else n.push(t),i.push(u)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(t,e,r){if("string"===typeof t&&(t=this.getEvent(t)),null!=r&&!t.anonymous){let e=this.getEventTopic(t);(0,o.isHexString)(r[0],32)&&r[0].toLowerCase()===e||d.throwError("fragment/topic mismatch",l.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:e,value:r[0]}),r=r.slice(1)}let n=[],i=[],s=[];t.inputs.forEach(((t,e)=>{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(n.push(c._R.fromObject({type:"bytes32",name:t.name})),s.push(!0)):(n.push(t),s.push(!1)):(i.push(t),s.push(!1))}));let a=null!=r?this._abiCoder.decode(n,(0,o.concat)(r)):null,u=this._abiCoder.decode(i,e,!0),h=[],f=0,p=0;t.inputs.forEach(((t,e)=>{if(t.indexed)if(null==a)h[e]=new m({_isIndexed:!0,hash:null});else if(s[e])h[e]=new m({_isIndexed:!0,hash:a[p++]});else try{h[e]=a[p++]}catch(r){h[e]=r}else try{h[e]=u[f++]}catch(r){h[e]=r}if(t.name&&null==h[t.name]){const r=h[e];r instanceof Error?Object.defineProperty(h,t.name,{enumerable:!0,get:()=>{throw b(`property ${JSON.stringify(t.name)}`,r)}}):h[t.name]=r}}));for(let o=0;o{throw b(`index ${o}`,t)}})}return Object.freeze(h)}parseTransaction(t){let e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new g({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:i.O$.from(t.value||"0")}):null}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new p({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}parseError(t){const e=(0,o.hexlify)(t);let r=this.getError(e.substring(0,10).toLowerCase());return r?new y({args:this._abiCoder.decode(r.inputs,"0x"+e.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(t){return!(!t||!t._isInterface)}}},81556:function(t,e,r){"use strict";r.d(e,{Sg:function(){return u},zt:function(){return h}});var n=r(2593),i=r(6881),o=r(1581);var s=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const a=new o.Logger("abstract-provider/5.7.0");class u extends i.Description{static isForkEvent(t){return!(!t||!t._isForkEvent)}}class h{constructor(){a.checkAbstract(new.target,h),(0,i.defineReadOnly)(this,"_isProvider",!0)}getFeeData(){return s(this,void 0,void 0,(function*(){const{block:t,gasPrice:e}=yield(0,i.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((t=>null))});let r=null,o=null,s=null;return t&&t.baseFeePerGas&&(r=t.baseFeePerGas,s=n.O$.from("1500000000"),o=t.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:r,maxFeePerGas:o,maxPriorityFeePerGas:s,gasPrice:e}}))}addListener(t,e){return this.on(t,e)}removeListener(t,e){return this.off(t,e)}static isProvider(t){return!(!t||!t._isProvider)}}},48088:function(t,e,r){"use strict";r.d(e,{E:function(){return h},b:function(){return c}});var n=r(6881),i=r(1581);var o=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const s=new i.Logger("abstract-signer/5.7.0"),a=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],u=[i.Logger.errors.INSUFFICIENT_FUNDS,i.Logger.errors.NONCE_EXPIRED,i.Logger.errors.REPLACEMENT_UNDERPRICED];class h{constructor(){s.checkAbstract(new.target,h),(0,n.defineReadOnly)(this,"_isSigner",!0)}getBalance(t){return o(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),t)}))}getTransactionCount(t){return o(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),t)}))}estimateGas(t){return o(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const e=yield(0,n.resolveProperties)(this.checkTransaction(t));return yield this.provider.estimateGas(e)}))}call(t,e){return o(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield(0,n.resolveProperties)(this.checkTransaction(t));return yield this.provider.call(r,e)}))}sendTransaction(t){return o(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const e=yield this.populateTransaction(t),r=yield this.signTransaction(e);return yield this.provider.sendTransaction(r)}))}getChainId(){return o(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(t){return o(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(t)}))}checkTransaction(t){for(const r in t)-1===a.indexOf(r)&&s.throwArgumentError("invalid transaction key: "+r,"transaction",t);const e=(0,n.shallowCopy)(t);return null==e.from?e.from=this.getAddress():e.from=Promise.all([Promise.resolve(e.from),this.getAddress()]).then((e=>(e[0].toLowerCase()!==e[1].toLowerCase()&&s.throwArgumentError("from address mismatch","transaction",t),e[0]))),e}populateTransaction(t){return o(this,void 0,void 0,(function*(){const e=yield(0,n.resolveProperties)(this.checkTransaction(t));null!=e.to&&(e.to=Promise.resolve(e.to).then((t=>o(this,void 0,void 0,(function*(){if(null==t)return null;const e=yield this.resolveName(t);return null==e&&s.throwArgumentError("provided ENS name resolves to null","tx.to",t),e})))),e.to.catch((t=>{})));const r=null!=e.maxFeePerGas||null!=e.maxPriorityFeePerGas;if(null==e.gasPrice||2!==e.type&&!r?0!==e.type&&1!==e.type||!r||s.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",t):s.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",t),2!==e.type&&null!=e.type||null==e.maxFeePerGas||null==e.maxPriorityFeePerGas)if(0===e.type||1===e.type)null==e.gasPrice&&(e.gasPrice=this.getGasPrice());else{const t=yield this.getFeeData();if(null==e.type)if(null!=t.maxFeePerGas&&null!=t.maxPriorityFeePerGas)if(e.type=2,null!=e.gasPrice){const t=e.gasPrice;delete e.gasPrice,e.maxFeePerGas=t,e.maxPriorityFeePerGas=t}else null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas);else null!=t.gasPrice?(r&&s.throwError("network does not support EIP-1559",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==e.gasPrice&&(e.gasPrice=t.gasPrice),e.type=0):s.throwError("failed to get consistent fee data",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===e.type&&(null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas))}else e.type=2;return null==e.nonce&&(e.nonce=this.getTransactionCount("pending")),null==e.gasLimit&&(e.gasLimit=this.estimateGas(e).catch((t=>{if(u.indexOf(t.code)>=0)throw t;return s.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,tx:e})}))),null==e.chainId?e.chainId=this.getChainId():e.chainId=Promise.all([Promise.resolve(e.chainId),this.getChainId()]).then((e=>(0!==e[1]&&e[0]!==e[1]&&s.throwArgumentError("chainId address mismatch","transaction",t),e[0]))),yield(0,n.resolveProperties)(e)}))}_checkProvider(t){this.provider||s.throwError("missing provider",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:t||"_checkProvider"})}static isSigner(t){return!(!t||!t._isSigner)}}class c extends h{constructor(t,e){super(),(0,n.defineReadOnly)(this,"address",t),(0,n.defineReadOnly)(this,"provider",e||null)}getAddress(){return Promise.resolve(this.address)}_fail(t,e){return Promise.resolve().then((()=>{s.throwError(t,i.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})}))}signMessage(t){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(t){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(t,e,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(t){return new c(this.address,t)}}},19485:function(t,e,r){"use strict";r.r(e),r.d(e,{getAddress:function(){return d},getContractAddress:function(){return y},getCreate2Address:function(){return m},getIcapAddress:function(){return g},isAddress:function(){return p}});var n=r(16441),i=r(2593),o=r(38197),s=r(59052);const a=new(r(1581).Logger)("address/5.7.0");function u(t){(0,n.isHexString)(t,20)||a.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let n=0;n<40;n++)r[n]=e[n].charCodeAt(0);const i=(0,n.arrayify)((0,o.keccak256)(r));for(let n=0;n<40;n+=2)i[n>>1]>>4>=8&&(e[n]=e[n].toUpperCase()),(15&i[n>>1])>=8&&(e[n+1]=e[n+1].toUpperCase());return"0x"+e.join("")}const h={};for(let v=0;v<10;v++)h[String(v)]=String(v);for(let v=0;v<26;v++)h[String.fromCharCode(65+v)]=String(10+v);const c=Math.floor((l=9007199254740991,Math.log10?Math.log10(l):Math.log(l)/Math.LN10));var l;function f(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>h[t])).join("");for(;e.length>=c;){let t=e.substring(0,c);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function d(t){let e=null;if("string"!==typeof t&&a.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=u(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&a.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==f(t)&&a.throwArgumentError("bad icap checksum","address",t),e=(0,i.g$)(t.substring(4));e.length<40;)e="0"+e;e=u("0x"+e)}else a.throwArgumentError("invalid address","address",t);return e}function p(t){try{return d(t),!0}catch(e){}return!1}function g(t){let e=(0,i.t2)(d(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+f("XE00"+e)+e}function y(t){let e=null;try{e=d(t.from)}catch(u){a.throwArgumentError("missing from address","transaction",t)}const r=(0,n.stripZeros)((0,n.arrayify)(i.O$.from(t.nonce).toHexString()));return d((0,n.hexDataSlice)((0,o.keccak256)((0,s.encode)([e,r])),12))}function m(t,e,r){return 32!==(0,n.hexDataLength)(e)&&a.throwArgumentError("salt must be 32 bytes","salt",e),32!==(0,n.hexDataLength)(r)&&a.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),d((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",d(t),e,r])),12))}},59567:function(t,e,r){"use strict";r.d(e,{J:function(){return i},c:function(){return o}});var n=r(16441);function i(t){t=atob(t);const e=[];for(let r=0;r0;)r.push(t%this.base),t=t/this.base|0}let i="";for(let n=0;0===e[n]&&n=0;--n)i+=this.alphabet[r[n]];return i}decode(t){if("string"!==typeof t)throw new TypeError("Expected String");let e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(let r=0;r>=8;for(;i>0;)e.push(255&i),i>>=8}for(let r=0;t[r]===this._leader&&r0&&(10===arguments[0]?d||(d=!0,h.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?h.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",s.Logger.errors.UNEXPECTED_ARGUMENT,{}):h.throwError("BigNumber.toString does not accept parameters",s.Logger.errors.UNEXPECTED_ARGUMENT,{})),m(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof p)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new p(c,g(t)):t.match(/^-?[0-9]+$/)?new p(c,g(new u(t))):h.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&v("underflow","BigNumber.from",t),(t>=l||t<=-l)&&v("overflow","BigNumber.from",t),p.from(String(t));const e=t;if("bigint"===typeof e)return p.from(e.toString());if((0,o.isBytes)(e))return p.from((0,o.hexlify)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return p.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&((0,o.isHexString)(t)||"-"===t[0]&&(0,o.isHexString)(t.substring(1))))return p.from(t)}return h.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function g(t){if("string"!==typeof t)return g(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&h.throwArgumentError("invalid hex","value",t),"0x00"===(t=g(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function y(t){return p.from(g(t))}function m(t){const e=p.from(t).toHexString();return"-"===e[0]?new u("-"+e.substring(3),16):new u(e.substring(2),16)}function v(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),h.throwError(t,s.Logger.errors.NUMERIC_FAULT,n)}function b(t){return new u(t,36).toString(16)}function w(t){return new u(t,16).toString(36)}},83877:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(88677).Buffer}catch(M){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function h(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u=49?h-49+10:h>=17?h-17+10:h,n(h>=0&&s0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c1&&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")]=l}catch(M){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?""}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],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];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?f[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=d[t],c=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var g=l.modrn(c).toString(t);r=(l=l.idivn(c)).isZero()?g+r:f[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=f;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,g=d>>>13,y=0|s[2],m=8191&y,v=y>>>13,b=0|s[3],w=8191&b,E=b>>>13,A=0|s[4],k=8191&A,S=A>>>13,B=0|s[5],x=8191&B,C=B>>>13,M=0|s[6],I=8191&M,T=M>>>13,O=0|s[7],R=8191&O,_=O>>>13,P=0|s[8],N=8191&P,U=P>>>13,L=0|s[9],D=8191&L,F=L>>>13,j=0|a[0],K=8191&j,z=j>>>13,H=0|a[1],q=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Z=G>>>13,J=0|a[3],Q=8191&J,X=J>>>13,Y=0|a[4],$=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,ft=ct>>>13,dt=0|a[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(h+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(f,K)|0))<<13)|0;h=((o=Math.imul(f,z))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,K),i=(i=Math.imul(p,z))+Math.imul(g,K)|0,o=Math.imul(g,z);var mt=(h+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,q)|0))<<13)|0;h=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,K),i=(i=Math.imul(m,z))+Math.imul(v,K)|0,o=Math.imul(v,z),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,V)|0;var vt=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(f,W)|0))<<13)|0;h=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,K),i=(i=Math.imul(w,z))+Math.imul(E,K)|0,o=Math.imul(E,z),n=n+Math.imul(m,q)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,Z)|0;var bt=(h+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,Q)|0))<<13)|0;h=((o=o+Math.imul(f,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(k,K),i=(i=Math.imul(k,z))+Math.imul(S,K)|0,o=Math.imul(S,z),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,X)|0;var wt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,z))+Math.imul(C,K)|0,o=Math.imul(C,z),n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,V)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var Et=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(I,K),i=(i=Math.imul(I,z))+Math.imul(T,K)|0,o=Math.imul(T,z),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var At=(h+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,ot)|0))<<13)|0;h=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(R,K),i=(i=Math.imul(R,z))+Math.imul(_,K)|0,o=Math.imul(_,z),n=n+Math.imul(I,q)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,X)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var kt=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((o=o+Math.imul(f,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,z))+Math.imul(U,K)|0,o=Math.imul(U,z),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,z))+Math.imul(F,K)|0,o=Math.imul(F,z),n=n+Math.imul(N,q)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(U,q)|0,o=o+Math.imul(U,V)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,ft)|0;var Bt=(h+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,pt)|0))<<13)|0;h=((o=o+Math.imul(f,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,V))+Math.imul(F,q)|0,o=Math.imul(F,V),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Z)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ft)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;h=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,Z))+Math.imul(F,W)|0,o=Math.imul(F,Z),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,X)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ht)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ft)|0;var Ct=(h+(n=n+Math.imul(m,pt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,X))+Math.imul(F,Q)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(U,$)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ft)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ft)|0;var Mt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ft)|0;var It=(h+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(S,pt)|0))<<13)|0;h=((o=o+Math.imul(S,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(D,rt),i=(i=Math.imul(D,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,n=n+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,ot),i=(i=Math.imul(D,st))+Math.imul(F,ot)|0,o=Math.imul(F,st),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(U,ut)|0,o=o+Math.imul(U,ht)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ft)|0;var Ot=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,ut),i=(i=Math.imul(D,ht))+Math.imul(F,ut)|0,o=Math.imul(F,ht),n=n+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(U,lt)|0,o=o+Math.imul(U,ft)|0;var Rt=(h+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,gt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,lt),i=(i=Math.imul(D,ft))+Math.imul(F,lt)|0,o=Math.imul(F,ft);var _t=(h+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(U,pt)|0))<<13)|0;h=((o=o+Math.imul(U,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863;var Pt=(h+(n=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,gt))+Math.imul(F,pt)|0))<<13)|0;return h=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=yt,u[1]=mt,u[2]=vt,u[3]=bt,u[4]=wt,u[5]=Et,u[6]=At,u[7]=kt,u[8]=St,u[9]=Bt,u[10]=xt,u[11]=Ct,u[12]=Mt,u[13]=It,u[14]=Tt,u[15]=Ot,u[16]=Rt,u[17]=_t,u[18]=Pt,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(t,e,r){return m(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(y=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):r<63?g(this,t,e):r<1024?m(this,t,e):v(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=f)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.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;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function E(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function B(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){x.call(this,t),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)}E.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},E.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},E.prototype.split=function(t,e){t.iushrn(this.n,0,e)},E.prototype.imulK=function(t){return t.imul(this.k)},i(A,E),A.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},A.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new A;else if("p224"===t)e=new k;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new B}return w[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(c(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var g=d,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,x),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),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(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},16441:function(t,e,r){"use strict";r.r(e),r.d(e,{arrayify:function(){return h},concat:function(){return c},hexConcat:function(){return v},hexDataLength:function(){return y},hexDataSlice:function(){return m},hexStripZeros:function(){return w},hexValue:function(){return b},hexZeroPad:function(){return E},hexlify:function(){return g},isBytes:function(){return u},isBytesLike:function(){return s},isHexString:function(){return d},joinSignature:function(){return k},splitSignature:function(){return A},stripZeros:function(){return l},zeroPad:function(){return f}});const n=new(r(1581).Logger)("bytes/5.7.0");function i(t){return!!t.toHexString}function o(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function s(t){return d(t)&&!(t.length%2)||u(t)}function a(t){return"number"===typeof t&&t==t&&t%1===0}function u(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"===typeof t)return!1;if(!a(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function h(t,e){if(e||(e={}),"number"===typeof t){n.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),o(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t)&&(t=t.toHexString()),d(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",t));const i=[];for(let t=0;th(t))),r=e.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(r);return e.reduce(((t,e)=>(n.set(e,t),t+e.length)),0),o(n)}function l(t){let e=h(t);if(0===e.length)return e;let r=0;for(;re&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),o(r)}function d(t,e){return!("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}const p="0123456789abcdef";function g(t,e){if(e||(e={}),"number"===typeof t){n.checkSafeUint53(t,"invalid hexlify value");let e="";for(;t;)e=p[15&t]+e,t=Math.floor(t/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if("bigint"===typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t))return t.toHexString();if(d(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":n.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(u(t)){let e="0x";for(let r=0;r>4]+p[15&n]}return e}return n.throwArgumentError("invalid hexlify value","value",t)}function y(t){if("string"!==typeof t)t=g(t);else if(!d(t)||t.length%2)return null;return(t.length-2)/2}function m(t,e,r){return"string"!==typeof t?t=g(t):(!d(t)||t.length%2)&&n.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function v(t){let e="0x";return t.forEach((t=>{e+=g(t).substring(2)})),e}function b(t){const e=w(g(t,{hexPad:"left"}));return"0x"===e?"0x0":e}function w(t){"string"!==typeof t&&(t=g(t)),d(t)||n.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&n.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function A(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(s(t)){let r=h(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=g(r.slice(0,32)),e.s=g(r.slice(32,64))):65===r.length?(e.r=g(r.slice(0,32)),e.s=g(r.slice(32,64)),e.v=r[64]):n.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:n.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=g(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const r=f(h(e._vs),32);e._vs=g(r);const i=r[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=i:e.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;const o=g(r);null==e.s?e.s=o:e.s!==o&&n.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?n.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const r=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&d(e.r)?e.r=E(e.r,32):n.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&d(e.s)?e.s=E(e.s,32):n.throwArgumentError("signature missing or invalid s","signature",t);const r=h(e.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const i=g(r);e._vs&&(d(e._vs)||n.throwArgumentError("signature invalid _vs","signature",t),e._vs=E(e._vs,32)),null==e._vs?e._vs=i:e._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function k(t){return g(c([(t=A(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},9279:function(t,e,r){"use strict";r.d(e,{d:function(){return n}});const n="0x0000000000000000000000000000000000000000"},21046:function(t,e,r){"use strict";r.d(e,{Bz:function(){return a},_Y:function(){return o},fh:function(){return s},tL:function(){return i}});var n=r(2593);const i=n.O$.from(-1),o=n.O$.from(0),s=n.O$.from(1),a=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},57218:function(t,e,r){"use strict";r.d(e,{R:function(){return n}});const n="0x0000000000000000000000000000000000000000000000000000000000000000"},64146:function(t,e,r){"use strict";r.d(e,{CH:function(){return x}});var n=r(61184),i=r(8198),o=r(81556),s=r(48088),a=r(19485),u=r(2593),h=r(16441),c=r(6881),l=r(83875),f=r(1581);var d=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const p=new f.Logger("contracts/5.7.0");function g(t,e){return d(this,void 0,void 0,(function*(){const r=yield e;"string"!==typeof r&&p.throwArgumentError("invalid address or ENS name","name",r);try{return(0,a.getAddress)(r)}catch(i){}t||p.throwError("a provider or signer is needed to resolve ENS names",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return null==n&&p.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function y(t,e,r){return d(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>y(t,Array.isArray(e)?e[n]:e[r.name],r)))):"address"===r.type?yield g(t,e):"tuple"===r.type?yield y(t,e,r.components):"array"===r.baseType?Array.isArray(e)?yield Promise.all(e.map((e=>y(t,e,r.arrayChildren)))):Promise.reject(p.makeError("invalid value for array",f.Logger.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e}))}function m(t,e,r){return d(this,void 0,void 0,(function*(){let n={};r.length===e.inputs.length+1&&"object"===typeof r[r.length-1]&&(n=(0,c.shallowCopy)(r.pop())),p.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=(0,c.resolveProperties)({override:g(t.signer,n.from),signer:t.signer.getAddress()}).then((t=>d(this,void 0,void 0,(function*(){return(0,a.getAddress)(t.signer)!==t.override&&p.throwError("Contract with a Signer cannot override from",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.override})))):n.from=t.signer.getAddress():n.from&&(n.from=g(t.provider,n.from));const i=yield(0,c.resolveProperties)({args:y(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:(0,c.resolveProperties)(n)||{}}),o=t.interface.encodeFunctionData(e,i.args),s={data:o,to:i.address},m=i.overrides;if(null!=m.nonce&&(s.nonce=u.O$.from(m.nonce).toNumber()),null!=m.gasLimit&&(s.gasLimit=u.O$.from(m.gasLimit)),null!=m.gasPrice&&(s.gasPrice=u.O$.from(m.gasPrice)),null!=m.maxFeePerGas&&(s.maxFeePerGas=u.O$.from(m.maxFeePerGas)),null!=m.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=u.O$.from(m.maxPriorityFeePerGas)),null!=m.from&&(s.from=m.from),null!=m.type&&(s.type=m.type),null!=m.accessList&&(s.accessList=(0,l.accessListify)(m.accessList)),null==s.gasLimit&&null!=e.gas){let t=21e3;const r=(0,h.arrayify)(o);for(let e=0;enull!=n[t]));return v.length&&p.throwError(`cannot override ${v.map((t=>JSON.stringify(t))).join(",")}`,f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:v}),s}))}function v(t,e){const r=e.wait.bind(e);e.wait=e=>r(e).then((e=>(e.events=e.logs.map((r=>{let n=(0,c.deepCopy)(r),i=null;try{i=t.interface.parseLog(r)}catch(o){}return i&&(n.args=i.args,n.decode=(e,r)=>t.interface.decodeEventLog(i.eventFragment,e,r),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>t.provider,n.getBlock=()=>t.provider.getBlock(e.blockHash),n.getTransaction=()=>t.provider.getTransaction(e.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(e),n})),e)))}function b(t,e,r){const n=t.signer||t.provider;return function(...i){return d(this,void 0,void 0,(function*(){let o;if(i.length===e.inputs.length+1&&"object"===typeof i[i.length-1]){const t=(0,c.shallowCopy)(i.pop());null!=t.blockTag&&(o=yield t.blockTag),delete t.blockTag,i.push(t)}null!=t.deployTransaction&&(yield t._deployed(o));const s=yield m(t,e,i),a=yield n.call(s,o);try{let n=t.interface.decodeFunctionResult(e,a);return r&&1===e.outputs.length&&(n=n[0]),n}catch(u){throw u.code===f.Logger.errors.CALL_EXCEPTION&&(u.address=t.address,u.args=i,u.transaction=s),u}}))}}function w(t,e,r){return e.constant?b(t,e,r):function(t,e){return function(...r){return d(this,void 0,void 0,(function*(){t.signer||p.throwError("sending a transaction requires a signer",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=t.deployTransaction&&(yield t._deployed());const n=yield m(t,e,r),i=yield t.signer.sendTransaction(n);return v(t,i),i}))}}(t,e)}function E(t){return!t.address||null!=t.topics&&0!==t.topics.length?(t.address||"*")+"@"+(t.topics?t.topics.map((t=>Array.isArray(t)?t.join("|"):t)).join(":"):""):"*"}class A{constructor(t,e){(0,c.defineReadOnly)(this,"tag",t),(0,c.defineReadOnly)(this,"filter",e),this._listeners=[]}addListener(t,e){this._listeners.push({listener:t,once:e})}removeListener(t){let e=!1;this._listeners=this._listeners.filter((r=>!(!e&&r.listener===t)||(e=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((t=>t.listener))}listenerCount(){return this._listeners.length}run(t){const e=this.listenerCount();return this._listeners=this._listeners.filter((e=>{const r=t.slice();return setTimeout((()=>{e.listener.apply(this,r)}),0),!e.once})),e}prepareEvent(t){}getEmit(t){return[t]}}class k extends A{constructor(){super("error",null)}}class S extends A{constructor(t,e,r,n){const i={address:t};let o=e.getEventTopic(r);n?(o!==n[0]&&p.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(E(i),i),(0,c.defineReadOnly)(this,"address",t),(0,c.defineReadOnly)(this,"interface",e),(0,c.defineReadOnly)(this,"fragment",r)}prepareEvent(t){super.prepareEvent(t),t.event=this.fragment.name,t.eventSignature=this.fragment.format(),t.decode=(t,e)=>this.interface.decodeEventLog(this.fragment,t,e);try{t.args=this.interface.decodeEventLog(this.fragment,t.data,t.topics)}catch(e){t.args=null,t.decodeError=e}}getEmit(t){const e=(0,n.BR)(t.args);if(e.length)throw e[0].error;const r=(t.args||[]).slice();return r.push(t),r}}class B extends A{constructor(t,e){super("*",{address:t}),(0,c.defineReadOnly)(this,"address",t),(0,c.defineReadOnly)(this,"interface",e)}prepareEvent(t){super.prepareEvent(t);try{const e=this.interface.parseLog(t);t.event=e.name,t.eventSignature=e.signature,t.decode=(t,r)=>this.interface.decodeEventLog(e.eventFragment,t,r),t.args=e.args}catch(e){}}}class x extends class{constructor(t,e,r){(0,c.defineReadOnly)(this,"interface",(0,c.getStatic)(new.target,"getInterface")(e)),null==r?((0,c.defineReadOnly)(this,"provider",null),(0,c.defineReadOnly)(this,"signer",null)):s.E.isSigner(r)?((0,c.defineReadOnly)(this,"provider",r.provider||null),(0,c.defineReadOnly)(this,"signer",r)):o.zt.isProvider(r)?((0,c.defineReadOnly)(this,"provider",r),(0,c.defineReadOnly)(this,"signer",null)):p.throwArgumentError("invalid signer or provider","signerOrProvider",r),(0,c.defineReadOnly)(this,"callStatic",{}),(0,c.defineReadOnly)(this,"estimateGas",{}),(0,c.defineReadOnly)(this,"functions",{}),(0,c.defineReadOnly)(this,"populateTransaction",{}),(0,c.defineReadOnly)(this,"filters",{});{const t={};Object.keys(this.interface.events).forEach((e=>{const r=this.interface.events[e];(0,c.defineReadOnly)(this.filters,e,((...t)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,t)}))),t[r.name]||(t[r.name]=[]),t[r.name].push(e)})),Object.keys(t).forEach((e=>{const r=t[e];1===r.length?(0,c.defineReadOnly)(this.filters,e,this.filters[r[0]]):p.warn(`Duplicate definition of ${e} (${r.join(", ")})`)}))}if((0,c.defineReadOnly)(this,"_runningEvents",{}),(0,c.defineReadOnly)(this,"_wrappedEmits",{}),null==t&&p.throwArgumentError("invalid contract address or ENS name","addressOrName",t),(0,c.defineReadOnly)(this,"address",t),this.provider)(0,c.defineReadOnly)(this,"resolvedAddress",g(this.provider,t));else try{(0,c.defineReadOnly)(this,"resolvedAddress",Promise.resolve((0,a.getAddress)(t)))}catch(u){p.throwError("provider is required to use ENS name as contract address",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((t=>{}));const n={},i={};Object.keys(this.interface.functions).forEach((t=>{const e=this.interface.functions[t];if(i[t])p.warn(`Duplicate ABI entry for ${JSON.stringify(t)}`);else{i[t]=!0;{const r=e.name;n[`%${r}`]||(n[`%${r}`]=[]),n[`%${r}`].push(t)}null==this[t]&&(0,c.defineReadOnly)(this,t,w(this,e,!0)),null==this.functions[t]&&(0,c.defineReadOnly)(this.functions,t,w(this,e,!1)),null==this.callStatic[t]&&(0,c.defineReadOnly)(this.callStatic,t,b(this,e,!0)),null==this.populateTransaction[t]&&(0,c.defineReadOnly)(this.populateTransaction,t,function(t,e){return function(...r){return m(t,e,r)}}(this,e)),null==this.estimateGas[t]&&(0,c.defineReadOnly)(this.estimateGas,t,function(t,e){const r=t.signer||t.provider;return function(...n){return d(this,void 0,void 0,(function*(){r||p.throwError("estimate require a provider or signer",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield m(t,e,n);return yield r.estimateGas(i)}))}}(this,e))}})),Object.keys(n).forEach((t=>{const e=n[t];if(e.length>1)return;t=t.substring(1);const r=e[0];try{null==this[t]&&(0,c.defineReadOnly)(this,t,this[r])}catch(i){}null==this.functions[t]&&(0,c.defineReadOnly)(this.functions,t,this.functions[r]),null==this.callStatic[t]&&(0,c.defineReadOnly)(this.callStatic,t,this.callStatic[r]),null==this.populateTransaction[t]&&(0,c.defineReadOnly)(this.populateTransaction,t,this.populateTransaction[r]),null==this.estimateGas[t]&&(0,c.defineReadOnly)(this.estimateGas,t,this.estimateGas[r])}))}static getContractAddress(t){return(0,a.getContractAddress)(t)}static getInterface(t){return i.vU.isInterface(t)?t:new i.vU(t)}deployed(){return this._deployed()}_deployed(t){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,t).then((t=>("0x"===t&&p.throwError("contract not deployed",f.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(t){this.signer||p.throwError("sending a transactions require a signer",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const e=(0,c.shallowCopy)(t||{});return["from","to"].forEach((function(t){null!=e[t]&&p.throwError("cannot override "+t,f.Logger.errors.UNSUPPORTED_OPERATION,{operation:t})})),e.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(e)))}connect(t){"string"===typeof t&&(t=new s.b(t,this.provider));const e=new this.constructor(this.address,this.interface,t);return this.deployTransaction&&(0,c.defineReadOnly)(e,"deployTransaction",this.deployTransaction),e}attach(t){return new this.constructor(t,this.interface,this.signer||this.provider)}static isIndexed(t){return i.Hk.isIndexed(t)}_normalizeRunningEvent(t){return this._runningEvents[t.tag]?this._runningEvents[t.tag]:t}_getRunningEvent(t){if("string"===typeof t){if("error"===t)return this._normalizeRunningEvent(new k);if("event"===t)return this._normalizeRunningEvent(new A("event",null));if("*"===t)return this._normalizeRunningEvent(new B(this.address,this.interface));const e=this.interface.getEvent(t);return this._normalizeRunningEvent(new S(this.address,this.interface,e))}if(t.topics&&t.topics.length>0){try{const e=t.topics[0];if("string"!==typeof e)throw new Error("invalid topic");const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new S(this.address,this.interface,r,t.topics))}catch(e){}const r={address:this.address,topics:t.topics};return this._normalizeRunningEvent(new A(E(r),r))}return this._normalizeRunningEvent(new B(this.address,this.interface))}_checkRunningEvents(t){if(0===t.listenerCount()){delete this._runningEvents[t.tag];const e=this._wrappedEmits[t.tag];e&&t.filter&&(this.provider.off(t.filter,e),delete this._wrappedEmits[t.tag])}}_wrapEvent(t,e,r){const n=(0,c.deepCopy)(e);return n.removeListener=()=>{r&&(t.removeListener(r),this._checkRunningEvents(t))},n.getBlock=()=>this.provider.getBlock(e.blockHash),n.getTransaction=()=>this.provider.getTransaction(e.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(e.transactionHash),t.prepareEvent(n),n}_addEventListener(t,e,r){if(this.provider||p.throwError("events require a provider or a signer with a provider",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),t.addListener(e,r),this._runningEvents[t.tag]=t,!this._wrappedEmits[t.tag]){const r=r=>{let n=this._wrapEvent(t,r,e);if(null==n.decodeError)try{const e=t.getEmit(n);this.emit(t.filter,...e)}catch(i){n.decodeError=i.error}null!=t.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[t.tag]=r,null!=t.filter&&this.provider.on(t.filter,r)}}queryFilter(t,e,r){const n=this._getRunningEvent(t),i=(0,c.shallowCopy)(n.filter);return"string"===typeof e&&(0,h.isHexString)(e,32)?(null!=r&&p.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=e):(i.fromBlock=null!=e?e:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((t=>t.map((t=>this._wrapEvent(n,t,null)))))}on(t,e){return this._addEventListener(this._getRunningEvent(t),e,!1),this}once(t,e){return this._addEventListener(this._getRunningEvent(t),e,!0),this}emit(t,...e){if(!this.provider)return!1;const r=this._getRunningEvent(t),n=r.run(e)>0;return this._checkRunningEvents(r),n}listenerCount(t){return this.provider?null==t?Object.keys(this._runningEvents).reduce(((t,e)=>t+this._runningEvents[e].listenerCount()),0):this._getRunningEvent(t).listenerCount():0}listeners(t){if(!this.provider)return[];if(null==t){const t=[];for(let e in this._runningEvents)this._runningEvents[e].listeners().forEach((e=>{t.push(e)}));return t}return this._getRunningEvent(t).listeners()}removeAllListeners(t){if(!this.provider)return this;if(null==t){for(const t in this._runningEvents){const e=this._runningEvents[t];e.removeAllListeners(),this._checkRunningEvents(e)}return this}const e=this._getRunningEvent(t);return e.removeAllListeners(),this._checkRunningEvents(e),this}off(t,e){if(!this.provider)return this;const r=this._getRunningEvent(t);return r.removeListener(e),this._checkRunningEvents(r),this}removeListener(t,e){return this.off(t,e)}}{}},35644:function(t,e,r){"use strict";r.d(e,{i:function(){return n}});const n="hash/5.7.0"},32046:function(t,e,r){"use strict";r.d(e,{id:function(){return o}});var n=r(38197),i=r(84917);function o(t){return(0,n.keccak256)((0,i.Y0)(t))}},75931:function(t,e,r){"use strict";r.r(e),r.d(e,{_TypedDataEncoder:function(){return s.E},dnsEncode:function(){return i.Kn},ensNormalize:function(){return i.w3},hashMessage:function(){return o.r},id:function(){return n.id},isValidName:function(){return i.r1},messagePrefix:function(){return o.B},namehash:function(){return i.VM}});var n=r(32046),i=r(27586),o=r(93684),s=r(67827)},93684:function(t,e,r){"use strict";r.d(e,{B:function(){return s},r:function(){return a}});var n=r(16441),i=r(38197),o=r(84917);const s="\x19Ethereum Signed Message:\n";function a(t){return"string"===typeof t&&(t=(0,o.Y0)(t)),(0,i.keccak256)((0,n.concat)([(0,o.Y0)(s),(0,o.Y0)(String(t.length)),t]))}},27586:function(t,e,r){"use strict";r.d(e,{Kn:function(){return P},w3:function(){return O},r1:function(){return R},VM:function(){return _}});var n=r(16441),i=r(84917),o=r(38197),s=r(1581),a=r(35644);function u(t,e){null==e&&(e=1);const r=[],n=r.forEach,i=function(t,e){n.call(t,(function(t){e>0&&Array.isArray(t)?i(t,e-1):r.push(t)}))};return i(t,e),r}function h(t){return function(t){let e=0;return()=>t[e++]}(function(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,o=[0,1];for(let w=1;w>--u&1}const l=Math.pow(2,31),f=l>>>1,d=f>>1,p=l-1;let g=0;for(let w=0;w<31;w++)g=g<<1|c();let y=[],m=0,v=l;for(;;){let t=Math.floor(((g-m+1)*i-1)/v),e=0,r=n;for(;r-e>1;){let n=e+r>>>1;t>>1|c(),s=s<<1^f,a=(a^f)<<1|f|1;m=s,v=1+a-s}let b=n-4;return y.map((e=>{switch(e-b){case 3:return b+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return b+256+(t[a++]<<8|t[a++]);case 1:return b+t[a++];default:return e-1}}))}(t))}function c(t){return 1&t?~t>>1:t>>1}function l(t,e){let r=Array(t);for(let n=0,i=-1;ne[t])):r}function p(t,e,r){let n=Array(t).fill(void 0).map((()=>[]));for(let i=0;in[e].push(t)));return n}function g(t,e){let r=1+e(),n=e(),i=function(t){let e=[];for(;;){let r=t();if(0==r)break;e.push(r)}return e}(e);return u(p(i.length,1+t,e).map(((t,e)=>{const o=t[0],s=t.slice(1);return Array(i[e]).fill(void 0).map(((t,e)=>{let i=e*n;return[o+e*r,s.map((t=>t+i))]}))})))}function y(t,e){return p(1+e(),1+t,e).map((t=>[t[0],t.slice(1)]))}const m=h((0,r(59567).J)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),v=new Set(d(m)),b=new Set(d(m)),w=function(t){let e=[];for(;;){let r=t();if(0==r)break;e.push(g(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(y(r,t))}return function(t){const e={};for(let r=0;rt-e));return function r(){let n=[];for(;;){let i=d(t,e);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((t,e)=>e.set.size-t.set.size));let i=t(),o=i%3;i=i/3|0;let s=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:s,save:1==i,check:2==i}}()}(m);function A(t){return(0,i.XL)(t)}function k(t){return t.filter((t=>65039!=t))}function S(t){for(let r of t.split(".")){let t=A(r);try{for(let e=t.lastIndexOf(95)-1;e>=0;e--)if(95!==t[e])throw new Error("underscore only allowed at start");if(t.length>=4&&t.every((t=>t<128))&&45===t[2]&&45===t[3])throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${r}": ${e.message}`)}}return t}function B(t){return S(function(t,e){let r=A(t).reverse(),n=[];for(;r.length;){let t=x(r);if(t){n.push(...e(t));continue}let i=r.pop();if(v.has(i)){n.push(i);continue}if(b.has(i))continue;let o=w[i];if(!o)throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`);n.push(...o)}return S(function(t){return t.normalize("NFC")}(String.fromCodePoint(...n)))}(t,k))}function x(t,e){var r;let n,i,o=E,s=[],a=t.length;for(e&&(e.length=0);a;){let u=t[--a];if(o=null===(r=o.branches.find((t=>t.set.has(u))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=u;else if(o.check&&u===i)break;s.push(u),o.fe0f&&(s.push(65039),a>0&&65039==t[a-1]&&a--),o.valid&&(n=s.slice(),2==o.valid&&n.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return n}const C=new s.Logger(a.i),M=new Uint8Array(32);function I(t){if(0===t.length)throw new Error("invalid ENS name; empty component");return t}function T(t){const e=(0,i.Y0)(B(t)),r=[];if(0===t.length)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(I(e.slice(n))),r}function O(t){return T(t).map((t=>(0,i.ZN)(t))).join(".")}function R(t){try{return 0!==T(t).length}catch(e){}return!1}function _(t){"string"!==typeof t&&C.throwArgumentError("invalid ENS name; not a string","name",t);let e=M;const r=T(t);for(;r.length;)e=(0,o.keccak256)((0,n.concat)([e,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(e)}function P(t){return(0,n.hexlify)((0,n.concat)(T(t).map((t=>{if(t.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const e=new Uint8Array(t.length+1);return e.set(t,1),e[0]=e.length-1,e}))))+"00"}M.fill(0)},67827:function(t,e,r){"use strict";r.d(e,{E:function(){return x}});var n=r(19485),i=r(2593),o=r(16441),s=r(38197),a=r(6881),u=r(1581),h=r(35644),c=r(32046),l=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const f=new u.Logger(h.i),d=new Uint8Array(32);d.fill(0);const p=i.O$.from(-1),g=i.O$.from(0),y=i.O$.from(1),m=i.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const v=(0,o.hexZeroPad)(y.toHexString(),32),b=(0,o.hexZeroPad)(g.toHexString(),32),w={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},E=["name","version","chainId","verifyingContract","salt"];function A(t){return function(e){return"string"!==typeof e&&f.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const k={name:A("name"),version:A("version"),chainId:function(t){try{return i.O$.from(t).toString()}catch(e){}return f.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return(0,n.getAddress)(t).toLowerCase()}catch(e){}return f.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=(0,o.arrayify)(t);if(32!==e.length)throw new Error("bad length");return(0,o.hexlify)(e)}catch(e){}return f.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function S(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=""===e[1],n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&f.throwArgumentError("invalid numeric width","type",t);const s=m.mask(r?n-1:n),a=r?s.add(y).mul(p):g;return function(e){const r=i.O$.from(e);return(r.lt(a)||r.gt(s))&&f.throwArgumentError(`value out-of-bounds for ${t}`,"value",e),(0,o.hexZeroPad)(r.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(0===r||r>32||e[1]!==String(r))&&f.throwArgumentError("invalid bytes width","type",t),function(e){return(0,o.arrayify)(e).length!==r&&f.throwArgumentError(`invalid length for ${t}`,"value",e),function(t){const e=(0,o.arrayify)(t),r=e.length%32;return r?(0,o.hexConcat)([e,d.slice(r)]):(0,o.hexlify)(e)}(e)}}}switch(t){case"address":return function(t){return(0,o.hexZeroPad)((0,n.getAddress)(t),32)};case"bool":return function(t){return t?v:b};case"bytes":return function(t){return(0,s.keccak256)(t)};case"string":return function(t){return(0,c.id)(t)}}return null}function B(t,e){return`${t}(${e.map((({name:t,type:e})=>e+" "+t)).join(",")})`}class x{constructor(t){(0,a.defineReadOnly)(this,"types",Object.freeze((0,a.deepCopy)(t))),(0,a.defineReadOnly)(this,"_encoderCache",{}),(0,a.defineReadOnly)(this,"_types",{});const e={},r={},n={};Object.keys(t).forEach((t=>{e[t]={},r[t]=[],n[t]={}}));for(const o in t){const n={};t[o].forEach((i=>{n[i.name]&&f.throwArgumentError(`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(o)}`,"types",t),n[i.name]=!0;const s=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===o&&f.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",t);S(s)||(r[s]||f.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",t),r[s].push(o),e[o][s]=!0)}))}const i=Object.keys(r).filter((t=>0===r[t].length));0===i.length?f.throwArgumentError("missing primary type","types",t):i.length>1&&f.throwArgumentError(`ambiguous primary types or unused types: ${i.map((t=>JSON.stringify(t))).join(", ")}`,"types",t),(0,a.defineReadOnly)(this,"primaryType",i[0]),function i(o,s){s[o]&&f.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",t),s[o]=!0,Object.keys(e[o]).forEach((t=>{r[t]&&(i(t,s),Object.keys(s).forEach((e=>{n[e][t]=!0})))})),delete s[o]}(this.primaryType,{});for(const o in n){const e=Object.keys(n[o]);e.sort(),this._types[o]=B(o,t[o])+e.map((e=>B(e,t[e]))).join("")}}getEncoder(t){let e=this._encoderCache[t];return e||(e=this._encoderCache[t]=this._getEncoder(t)),e}_getEncoder(t){{const e=S(t);if(e)return e}const e=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(e){const t=e[1],r=this.getEncoder(t),n=parseInt(e[3]);return e=>{n>=0&&e.length!==n&&f.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);let i=e.map(r);return this._types[t]&&(i=i.map(s.keccak256)),(0,s.keccak256)((0,o.hexConcat)(i))}}const r=this.types[t];if(r){const e=(0,c.id)(this._types[t]);return t=>{const n=r.map((({name:e,type:r})=>{const n=this.getEncoder(r)(t[e]);return this._types[r]?(0,s.keccak256)(n):n}));return n.unshift(e),(0,o.hexConcat)(n)}}return f.throwArgumentError(`unknown type: ${t}`,"type",t)}encodeType(t){const e=this._types[t];return e||f.throwArgumentError(`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return(0,s.keccak256)(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,r){if(S(t))return r(t,e);const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const t=n[1],i=parseInt(n[3]);return i>=0&&e.length!==i&&f.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e),e.map((e=>this._visit(t,e,r)))}const i=this.types[t];return i?i.reduce(((t,{name:n,type:i})=>(t[n]=this._visit(i,e[n],r),t)),{}):f.throwArgumentError(`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new x(t)}static getPrimaryType(t){return x.from(t).primaryType}static hashStruct(t,e,r){return x.from(e).hashStruct(t,r)}static hashDomain(t){const e=[];for(const r in t){const n=w[r];n||f.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",t),e.push({name:r,type:n})}return e.sort(((t,e)=>E.indexOf(t.name)-E.indexOf(e.name))),x.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,r){return(0,o.hexConcat)(["0x1901",x.hashDomain(t),x.from(e).hash(r)])}static hash(t,e,r){return(0,s.keccak256)(x.encode(t,e,r))}static resolveNames(t,e,r,n){return l(this,void 0,void 0,(function*(){t=(0,a.shallowCopy)(t);const i={};t.verifyingContract&&!(0,o.isHexString)(t.verifyingContract,20)&&(i[t.verifyingContract]="0x");const s=x.from(e);s.visit(r,((t,e)=>("address"!==t||(0,o.isHexString)(e,20)||(i[e]="0x"),e)));for(const t in i)i[t]=yield n(t);return t.verifyingContract&&i[t.verifyingContract]&&(t.verifyingContract=i[t.verifyingContract]),r=s.visit(r,((t,e)=>"address"===t&&i[e]?i[e]:e)),{domain:t,value:r}}))}static getPayload(t,e,r){x.hashDomain(t);const n={},s=[];E.forEach((e=>{const r=t[e];null!=r&&(n[e]=k[e](r),s.push({name:e,type:w[e]}))}));const u=x.from(e),h=(0,a.shallowCopy)(e);return h.EIP712Domain?f.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",e):h.EIP712Domain=s,u.encode(r),{types:h,domain:n,primaryType:u.primaryType,message:u.visit(r,((t,e)=>{if(t.match(/^bytes(\d*)/))return(0,o.hexlify)((0,o.arrayify)(e));if(t.match(/^u?int/))return i.O$.from(e).toString();switch(t){case"address":return e.toLowerCase();case"bool":return!!e;case"string":return"string"!==typeof e&&f.throwArgumentError("invalid string","value",e),e}return f.throwArgumentError("unsupported type","type",t)}))}}}},86507:function(t,e,r){"use strict";r.r(e),r.d(e,{HDNode:function(){return O},defaultPath:function(){return T},entropyToMnemonic:function(){return P},getAccountPath:function(){return U},isValidMnemonic:function(){return N},mnemonicToEntropy:function(){return _},mnemonicToSeed:function(){return R}});var n=r(57727),i=r(16441),o=r(2593),s=r(84917),a=r(85306),u=r(6881),h=r(67669),c=r(2006),l=r(21261),f=r(83875),d=r(32046),p=r(1581);const g=new p.Logger("wordlists/5.7.0");class y{constructor(t){g.checkAbstract(new.target,y),(0,u.defineReadOnly)(this,"locale",t)}split(t){return t.toLowerCase().split(/ +/g)}join(t){return t.join(" ")}static check(t){const e=[];for(let r=0;r<2048;r++){const n=t.getWord(r);if(r!==t.getWordIndex(n))return"0x";e.push(n)}return(0,d.id)(e.join("\n")+"\n")}static register(t,e){e||(e=t.locale)}}let m=null;function v(t){if(null==m&&(m="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==y.check(t)))throw m=null,new Error("BIP39 Wordlist for en (English) FAILED")}const b=new class extends y{constructor(){super("en")}getWord(t){return v(this),m[t]}getWordIndex(t){return v(this),m.indexOf(t)}};y.register(b);const w={en:b},E=new p.Logger("hdnode/5.7.0"),A=o.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),k=(0,s.Y0)("Bitcoin seed"),S=2147483648;function B(t){return(1<=256)throw new Error("Depth too large!");return C((0,i.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,i.hexlify)(this.depth),this.parentFingerprint,(0,i.hexZeroPad)((0,i.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,i.concat)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new O(I,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(t){if(t>4294967295)throw new Error("invalid index - "+String(t));let e=this.path;e&&(e+="/"+(2147483647&t));const r=new Uint8Array(37);if(t&S){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set((0,i.arrayify)(this.privateKey),1),e&&(e+="'")}else r.set((0,i.arrayify)(this.publicKey));for(let i=24;i>=0;i-=8)r[33+(i>>3)]=t>>24-i&255;const n=(0,i.arrayify)((0,c.Gy)(l.p.sha512,this.chainCode,r)),s=n.slice(0,32),a=n.slice(32);let u=null,f=null;if(this.privateKey)u=x(o.O$.from(s).add(this.privateKey).mod(A));else{f=new h.SigningKey((0,i.hexlify)(s))._addPoint(this.publicKey)}let d=e;const p=this.mnemonic;return p&&(d=Object.freeze({phrase:p.phrase,path:e,locale:p.locale||"en"})),new O(I,u,f,this.fingerprint,x(a),t,this.depth+1,d)}derivePath(t){const e=t.split("/");if(0===e.length||"m"===e[0]&&0!==this.depth)throw new Error("invalid path - "+t);"m"===e[0]&&e.shift();let r=this;for(let n=0;n=S)throw new Error("invalid path index - "+t);r=r._derive(S+e)}else{if(!t.match(/^[0-9]+$/))throw new Error("invalid path component - "+t);{const e=parseInt(t);if(e>=S)throw new Error("invalid path index - "+t);r=r._derive(e)}}}return r}static _fromSeed(t,e){const r=(0,i.arrayify)(t);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=(0,i.arrayify)((0,c.Gy)(l.p.sha512,k,r));return new O(I,x(n.slice(0,32)),null,"0x00000000",x(n.slice(32)),0,0,e)}static fromMnemonic(t,e,r){return t=P(_(t,r=M(r)),r),O._fromSeed(R(t,e),{phrase:t,path:"m",locale:r.locale})}static fromSeed(t){return O._fromSeed(t,null)}static fromExtendedKey(t){const e=n.Base58.decode(t);82===e.length&&C(e.slice(0,78))===t||E.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=e[4],o=(0,i.hexlify)(e.slice(5,9)),s=parseInt((0,i.hexlify)(e.slice(9,13)).substring(2),16),a=(0,i.hexlify)(e.slice(13,45)),u=e.slice(45,78);switch((0,i.hexlify)(e.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new O(I,null,(0,i.hexlify)(u),o,a,s,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==u[0])break;return new O(I,(0,i.hexlify)(u.slice(1)),null,o,a,s,r,null)}return E.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function R(t,e){e||(e="");const r=(0,s.Y0)("mnemonic"+e,s.Uj.NFKD);return(0,a.n)((0,s.Y0)(t,s.Uj.NFKD),r,2048,64,"sha512")}function _(t,e){e=M(e),E.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=(0,i.arrayify)(new Uint8Array(Math.ceil(11*r.length/8)));let o=0;for(let i=0;i>3]|=1<<7-o%8),o++}const s=32*r.length/3,a=B(r.length/3);if(((0,i.arrayify)((0,c.JQ)(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return(0,i.hexlify)(n.slice(0,s/8))}function P(t,e){if(e=M(e),(t=(0,i.arrayify)(t)).length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let i=0;i8?(r[r.length-1]<<=8,r[r.length-1]|=t[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[i]>>8-n,r.push(t[i]&(1<<8-n)-1),n+=3);const o=t.length/4,s=(0,i.arrayify)((0,c.JQ)(t))[0]&B(o);return r[r.length-1]<<=o,r[r.length-1]|=s>>8-o,e.join(r.map((t=>e.getWord(t))))}function N(t,e){try{return _(t,e),!0}catch(r){}return!1}function U(t){return("number"!==typeof t||t<0||t>=S||t%1)&&E.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}},29816:function(t,e,r){"use strict";r.d(e,{i:function(){return n}});const n="json-wallets/5.7.0"},45659:function(t,e,r){"use strict";r.r(e),r.d(e,{decryptCrowdsale:function(){return y},decryptJsonWallet:function(){return E},decryptJsonWalletSync:function(){return A},decryptKeystore:function(){return w.pe},decryptKeystoreSync:function(){return w.hb},encryptKeystore:function(){return w.HI},getJsonWalletAddress:function(){return b},isCrowdsaleWallet:function(){return m},isKeystoreWallet:function(){return v}});var n=r(78826),i=r.n(n),o=r(19485),s=r(16441),a=r(38197),u=r(85306),h=r(84917),c=r(6881),l=r(1581),f=r(29816),d=r(97013);const p=new l.Logger(f.i);class g extends c.Description{isCrowdsaleAccount(t){return!(!t||!t._isCrowdsaleAccount)}}function y(t,e){const r=JSON.parse(t);e=(0,d.Ij)(e);const n=(0,o.getAddress)((0,d.gx)(r,"ethaddr")),c=(0,d.p3)((0,d.gx)(r,"encseed"));c&&c.length%16===0||p.throwArgumentError("invalid encseed","json",t);const l=(0,s.arrayify)((0,u.n)(e,e,2e3,32,"sha256")).slice(0,16),f=c.slice(0,16),y=c.slice(16),m=new(i().ModeOfOperation.cbc)(l,f),v=i().padding.pkcs7.strip((0,s.arrayify)(m.decrypt(y)));let b="";for(let i=0;i{const r=(e=(0,u.arrayify)(e)).slice(0,16),n=e.slice(16,32),s=e.slice(32,64),a=new(i().Counter)(E),h=new(i().ModeOfOperation.ctr)(r,a),l=(0,u.arrayify)(h.encrypt(o)),p=(0,c.keccak256)((0,u.concat)([n,l])),w={address:t.address.substring(2).toLowerCase(),id:(0,g.EH)(A),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,u.hexlify)(E).substring(2)},ciphertext:(0,u.hexlify)(l).substring(2),kdf:"scrypt",kdfparams:{salt:(0,u.hexlify)(b).substring(2),n:k,dklen:32,p:B,r:S},mac:p.substring(2)}};if(d){const t=(0,f.O)(16),e=new(i().Counter)(t),r=new(i().ModeOfOperation.ctr)(s,e),n=(0,u.arrayify)(r.encrypt(d)),o=new Date,a=o.getUTCFullYear()+"-"+(0,g.VP)(o.getUTCMonth()+1,2)+"-"+(0,g.VP)(o.getUTCDate(),2)+"T"+(0,g.VP)(o.getUTCHours(),2)+"-"+(0,g.VP)(o.getUTCMinutes(),2)+"-"+(0,g.VP)(o.getUTCSeconds(),2)+".0Z";w["x-ethers"]={client:v,gethFilename:"UTC--"+a+"--"+w.address,mnemonicCounter:(0,u.hexlify)(t).substring(2),mnemonicCiphertext:(0,u.hexlify)(n).substring(2),path:y,locale:m,version:"0.1"}}return JSON.stringify(w)}))}},97013:function(t,e,r){"use strict";r.d(e,{EH:function(){return h},Ij:function(){return a},VP:function(){return s},gx:function(){return u},p3:function(){return o}});var n=r(16441),i=r(84917);function o(t){return"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),(0,n.arrayify)(t)}function s(t,e){for(t=String(t);t.length{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var h,c;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(h||(h={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(c||(c={}));const l="0123456789abcdef";class f{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",t),s>o[r]||console.log.apply(console,e)}debug(...t){this._log(f.levels.DEBUG,t)}info(...t){this._log(f.levels.INFO,t)}warn(...t){this._log(f.levels.WARNING,t)}makeError(t,e,r){if(i)return this.makeError("censored error",e,{});e||(e=f.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((t=>{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t>4],r+=l[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(a){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push(`code=${e}`),n.push(`version=${this.version}`);const o=t;let s="";switch(e){case c.NUMERIC_FAULT:{s="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":s+="-"+e;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.UNPREDICTABLE_GAS_LIMIT:s=e}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const a=new Error(t);return a.reason=o,a.code=e,Object.keys(r).forEach((function(t){a[t]=r[t]})),a}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,f.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",f.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",te&&this.throwError("too many arguments"+r,f.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",f.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",f.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",f.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return a||(a=new f("logger/5.7.0")),a}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!t)return;this.globalLogger().throwError("error censorship permanent",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!t,n=!!e}static setLogLevel(t){const e=o[t.toLowerCase()];null!=e?s=e:f.globalLogger().warn("invalid log level - "+t)}static from(t){return new f(t)}}f.errors=c,f.levels=h},45710:function(t,e,r){"use strict";r.d(e,{H:function(){return c}});const n=new(r(1581).Logger)("networks/5.7.1");function i(t){const e=function(e,r){null==r&&(r={});const n=[];if(e.InfuraProvider&&"-"!==r.infura)try{n.push(new e.InfuraProvider(t,r.infura))}catch(i){}if(e.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new e.EtherscanProvider(t,r.etherscan))}catch(i){}if(e.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new e.AlchemyProvider(t,r.alchemy))}catch(i){}if(e.PocketProvider&&"-"!==r.pocket){const o=["goerli","ropsten","rinkeby","sepolia"];try{const i=new e.PocketProvider(t,r.pocket);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(i){}}if(e.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new e.CloudflareProvider(t))}catch(i){}if(e.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new e.AnkrProvider(t,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(i){}if(0===n.length)return null;if(e.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===t&&(i=2),new e.FallbackProvider(n,i)}return n[0]};return e.renetwork=function(t){return i(t)},e}function o(t,e){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(t,e):null};return r.renetwork=function(e){return o(t,e)},r}const s={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:i("homestead")},a={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:i("ropsten")},u={chainId:63,name:"classicMordor",_defaultProvider:o("https://www.ethercluster.com/mordor","classicMordor")},h={unspecified:{chainId:0,name:"unspecified"},homestead:s,mainnet:s,morden:{chainId:2,name:"morden"},ropsten:a,testnet:a,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:i("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:i("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:i("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:i("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:o("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:u,classicTestnet:u,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:o("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:i("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:i("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function c(t){if(null==t)return null;if("number"===typeof t){for(const e in h){const r=h[e];if(r.chainId===t)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"===typeof t){const e=h[t];return null==e?null:{name:e.name,chainId:e.chainId,ensAddress:e.ensAddress,_defaultProvider:e._defaultProvider||null}}const e=h[t.name];if(!e)return"number"!==typeof t.chainId&&n.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==e.chainId&&n.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;var i;return null==r&&e._defaultProvider&&(r=(i=e._defaultProvider)&&"function"===typeof i.renetwork?e._defaultProvider.renetwork(t):e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}},85306:function(t,e,r){"use strict";r.d(e,{n:function(){return o}});var n=r(16441),i=r(2006);function o(t,e,r,o,s){let a;t=(0,n.arrayify)(t),e=(0,n.arrayify)(e);let u=1;const h=new Uint8Array(o),c=new Uint8Array(e.length+4);let l,f;c.set(e);for(let d=1;d<=u;d++){c[e.length]=d>>24&255,c[e.length+1]=d>>16&255,c[e.length+2]=d>>8&255,c[e.length+3]=255&d;let p=(0,n.arrayify)((0,i.Gy)(s,t,c));a||(a=p.length,f=new Uint8Array(a),u=Math.ceil(o/a),l=o-(u-1)*a),f.set(p);for(let e=1;e{const r=t[e];return Promise.resolve(r).then((t=>({key:e,value:t})))}));return(yield Promise.all(e)).reduce(((t,e)=>(t[e.key]=e.value,t)),{})}))}function h(t,e){t&&"object"===typeof t||o.throwArgumentError("invalid object","object",t),Object.keys(t).forEach((r=>{e[r]||o.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)}))}function c(t){const e={};for(const r in t)e[r]=t[r];return e}const l={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function f(t){if(void 0===t||null===t||l[typeof t])return!0;if(Array.isArray(t)||"object"===typeof t){if(!Object.isFrozen(t))return!1;const r=Object.keys(t);for(let n=0;np(t))));if("object"===typeof t){const e={};for(const r in t){const n=t[r];void 0!==n&&s(e,r,p(n))}return e}return o.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function p(t){return d(t)}class g{constructor(t){for(const e in t)this[e]=p(t[e])}}},34216:function(t,e,r){"use strict";r.d(e,{i:function(){return n}});const n="providers/5.7.2"},57734:function(t,e,r){"use strict";r.d(e,{D:function(){return y}});var n=r(6881),i=r(30032),o=r(88089),s=r(1581),a=r(34216),u=r(34674),h=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const c=new s.Logger(a.i);class l extends u.r{detectNetwork(){const t=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return h(this,void 0,void 0,(function*(){let e=this.network;return null==e&&(e=yield t.detectNetwork.call(this),e||c.throwError("no network detected",s.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,n.defineReadOnly)(this,"_network",e),this.emit("network",e,null))),e}))}}class f extends l{constructor(t,e){c.checkAbstract(new.target,f),t=(0,n.getStatic)(new.target,"getNetwork")(t),e=(0,n.getStatic)(new.target,"getApiKey")(e);super((0,n.getStatic)(new.target,"getUrl")(t,e),t),"string"===typeof e?(0,n.defineReadOnly)(this,"apiKey",e):null!=e&&Object.keys(e).forEach((t=>{(0,n.defineReadOnly)(this,t,e[t])}))}_startPending(){c.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(t){return c.throwError("API provider does not support signing",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(t){return t}static getUrl(t,e){return c.throwError("not implemented; sub-classes must override getUrl",s.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const d=new s.Logger(a.i),p="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class g extends o.q{constructor(t,e){const r=new y(t,e);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),(0,n.defineReadOnly)(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===p}}class y extends f{static getWebSocketProvider(t,e){return new g(t,e)}static getApiKey(t){return null==t?p:(t&&"string"!==typeof t&&d.throwArgumentError("invalid apiKey","apiKey",t),t)}static getUrl(t,e){let r=null;switch(t.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:d.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+e,throttleCallback:(t,r)=>(e===p&&(0,i.vh)(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===p}}},30032:function(t,e,r){"use strict";r.d(e,{Mb:function(){return f},vh:function(){return p}});var n=r(19485),i=r(2593),o=r(16441),s=r(9279),a=r(6881),u=r(83875),h=r(1581),c=r(34216);const l=new h.Logger(c.i);class f{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const t={},e=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),s=this.hex.bind(this),u=this.number.bind(this),h=this.type.bind(this);return t.transaction={hash:o,type:h,accessList:f.allowNull(this.accessList.bind(this),null),blockHash:f.allowNull(o,null),blockNumber:f.allowNull(u,null),transactionIndex:f.allowNull(u,null),confirmations:f.allowNull(u,null),from:e,gasPrice:f.allowNull(r),maxPriorityFeePerGas:f.allowNull(r),maxFeePerGas:f.allowNull(r),gasLimit:r,to:f.allowNull(e,null),value:r,nonce:u,data:i,r:f.allowNull(this.uint256),s:f.allowNull(this.uint256),v:f.allowNull(u),creates:f.allowNull(e,null),raw:f.allowNull(i)},t.transactionRequest={from:f.allowNull(e),nonce:f.allowNull(u),gasLimit:f.allowNull(r),gasPrice:f.allowNull(r),maxPriorityFeePerGas:f.allowNull(r),maxFeePerGas:f.allowNull(r),to:f.allowNull(e),value:f.allowNull(r),data:f.allowNull((t=>this.data(t,!0))),type:f.allowNull(u),accessList:f.allowNull(this.accessList.bind(this),null)},t.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:o,address:e,topics:f.arrayOf(o),data:i,logIndex:u,blockHash:o},t.receipt={to:f.allowNull(this.address,null),from:f.allowNull(this.address,null),contractAddress:f.allowNull(e,null),transactionIndex:u,root:f.allowNull(s),gasUsed:r,logsBloom:f.allowNull(i),blockHash:o,transactionHash:o,logs:f.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:f.allowNull(u,null),cumulativeGasUsed:r,effectiveGasPrice:f.allowNull(r),status:f.allowNull(u),type:h},t.block={hash:f.allowNull(o),parentHash:o,number:u,timestamp:u,nonce:f.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:f.allowNull(e),extraData:i,transactions:f.allowNull(f.arrayOf(o)),baseFeePerGas:f.allowNull(r)},t.blockWithTransactions=(0,a.shallowCopy)(t.block),t.blockWithTransactions.transactions=f.allowNull(f.arrayOf(this.transactionResponse.bind(this))),t.filter={fromBlock:f.allowNull(n,void 0),toBlock:f.allowNull(n,void 0),blockHash:f.allowNull(o,void 0),address:f.allowNull(e,void 0),topics:f.allowNull(this.topics.bind(this),void 0)},t.filterLog={blockNumber:f.allowNull(u),blockHash:f.allowNull(o),transactionIndex:u,removed:f.allowNull(this.boolean.bind(this)),address:e,data:f.allowFalsish(i,"0x"),topics:f.arrayOf(o),transactionHash:o,logIndex:u},t}accessList(t){return(0,u.accessListify)(t||[])}number(t){return"0x"===t?0:i.O$.from(t).toNumber()}type(t){return"0x"===t||null==t?0:i.O$.from(t).toNumber()}bigNumber(t){return i.O$.from(t)}boolean(t){if("boolean"===typeof t)return t;if("string"===typeof t){if("true"===(t=t.toLowerCase()))return!0;if("false"===t)return!1}throw new Error("invalid boolean - "+t)}hex(t,e){return"string"===typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),(0,o.isHexString)(t))?t.toLowerCase():l.throwArgumentError("invalid hash","value",t)}data(t,e){const r=this.hex(t,e);if(r.length%2!==0)throw new Error("invalid data; odd-length - "+t);return r}address(t){return(0,n.getAddress)(t)}callAddress(t){if(!(0,o.isHexString)(t,32))return null;const e=(0,n.getAddress)((0,o.hexDataSlice)(t,12));return e===s.d?null:e}contractAddress(t){return(0,n.getContractAddress)(t)}blockTag(t){if(null==t)return"latest";if("earliest"===t)return"0x0";switch(t){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return t}if("number"===typeof t||(0,o.isHexString)(t))return(0,o.hexValue)(t);throw new Error("invalid blockTag")}hash(t,e){const r=this.hex(t,e);return 32!==(0,o.hexDataLength)(r)?l.throwArgumentError("invalid hash","value",t):r}difficulty(t){if(null==t)return null;const e=i.O$.from(t);try{return e.toNumber()}catch(r){}return null}uint256(t){if(!(0,o.isHexString)(t))throw new Error("invalid uint256");return(0,o.hexZeroPad)(t,32)}_block(t,e){null!=t.author&&null==t.miner&&(t.miner=t.author);const r=null!=t._difficulty?t._difficulty:t.difficulty,n=f.check(e,t);return n._difficulty=null==r?null:i.O$.from(r),n}block(t){return this._block(t,this.formats.block)}blockWithTransactions(t){return this._block(t,this.formats.blockWithTransactions)}transactionRequest(t){return f.check(this.formats.transactionRequest,t)}transactionResponse(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&i.O$.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),1!==t.type&&2!==t.type||null!=t.accessList||(t.accessList=[]);const e=f.check(this.formats.transaction,t);if(null!=t.chainId){let r=t.chainId;(0,o.isHexString)(r)&&(r=i.O$.from(r).toNumber()),e.chainId=r}else{let r=t.networkId;null==r&&null==e.v&&(r=t.chainId),(0,o.isHexString)(r)&&(r=i.O$.from(r).toNumber()),"number"!==typeof r&&null!=e.v&&(r=(e.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!==typeof r&&(r=0),e.chainId=r}return e.blockHash&&"x"===e.blockHash.replace(/0/g,"")&&(e.blockHash=null),e}transaction(t){return(0,u.parse)(t)}receiptLog(t){return f.check(this.formats.receiptLog,t)}receipt(t){const e=f.check(this.formats.receipt,t);if(null!=e.root)if(e.root.length<=4){const t=i.O$.from(e.root).toNumber();0===t||1===t?(null!=e.status&&e.status!==t&&l.throwArgumentError("alt-root-status/status mismatch","value",{root:e.root,status:e.status}),e.status=t,delete e.root):l.throwArgumentError("invalid alt-root-status","value.root",e.root)}else 66!==e.root.length&&l.throwArgumentError("invalid root hash","value.root",e.root);return null!=e.status&&(e.byzantium=!0),e}topics(t){return Array.isArray(t)?t.map((t=>this.topics(t))):null!=t?this.hash(t,!0):null}filter(t){return f.check(this.formats.filter,t)}filterLog(t){return f.check(this.formats.filterLog,t)}static check(t,e){const r={};for(const i in t)try{const n=t[i](e[i]);void 0!==n&&(r[i]=n)}catch(n){throw n.checkKey=i,n.checkValue=e[i],n}return r}static allowNull(t,e){return function(r){return null==r?e:t(r)}}static allowFalsish(t,e){return function(r){return r?t(r):e}}static arrayOf(t){return function(e){if(!Array.isArray(e))throw new Error("not an array");const r=[];return e.forEach((function(e){r.push(t(e))})),r}}}let d=!1;function p(){d||(d=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}},34674:function(t,e,r){"use strict";r.d(e,{r:function(){return ot}});var n=r(48088),i=r(2593),o=r(16441),s=r(67827),a=r(6881),u=r(84917),h=r(83875),c=r(37707),l=r(1581),f=r(34216),d=r(81556),p=r(59567),g=r(57727),y=r(57218),m=r(27586),v=r(45710),b=r(2006),w=r(85751),E=r.n(w),A=r(30032),k=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const S=new l.Logger(f.i);function B(t){return null==t?"null":(32!==(0,o.hexDataLength)(t)&&S.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function x(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map((t=>{if(Array.isArray(t)){const e={};t.forEach((t=>{e[B(t)]=!0}));const r=Object.keys(e);return r.sort(),r.join("|")}return B(t)})).join("&")}function C(t){if("string"===typeof t){if(t=t.toLowerCase(),32===(0,o.hexDataLength)(t))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+x(t);if(d.Sg.isForkEvent(t))throw S.warn("not implemented"),new Error("not implemented");if(t&&"object"===typeof t)return"filter:"+(t.address||"*")+":"+x(t.topics||[])}throw new Error("invalid event - "+t)}function M(){return(new Date).getTime()}function I(t){return new Promise((e=>{setTimeout(e,t)}))}const T=["block","network","pending","poll"];class O{constructor(t,e,r){(0,a.defineReadOnly)(this,"tag",t),(0,a.defineReadOnly)(this,"listener",e),(0,a.defineReadOnly)(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const t=this.tag.split(":");return"tx"!==t[0]?null:t[1]}get filter(){const t=this.tag.split(":");if("filter"!==t[0])return null;const e=t[1],r=""===(n=t[2])?[]:n.split(/&/g).map((t=>{if(""===t)return[];const e=t.split("|").map((t=>"null"===t?null:t));return 1===e.length?e[0]:e}));var n;const i={};return r.length>0&&(i.topics=r),e&&"*"!==e&&(i.address=e),i}pollable(){return this.tag.indexOf(":")>=0||T.indexOf(this.tag)>=0}}const R={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function _(t){return(0,o.hexZeroPad)(i.O$.from(t).toHexString(),32)}function P(t){return g.Base58.encode((0,o.concat)([t,(0,o.hexDataSlice)((0,b.JQ)((0,b.JQ)(t)),0,4)]))}const N=new RegExp("^(ipfs)://(.*)$","i"),U=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),N,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function L(t,e){try{return(0,u.ZN)(D(t,e))}catch(r){}return null}function D(t,e){if("0x"===t)return null;const r=i.O$.from((0,o.hexDataSlice)(t,e,e+32)).toNumber(),n=i.O$.from((0,o.hexDataSlice)(t,r,r+32)).toNumber();return(0,o.hexDataSlice)(t,r+32,r+32+n)}function F(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):S.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function j(t){const e=(0,o.arrayify)(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function K(t){if(t.length%32===0)return t;const e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}function z(t){const e=[];let r=0;for(let n=0;ni.O$.from(t).eq(1))).catch((t=>{if(t.code===l.Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,t}))),this._supportsEip2544}_fetch(t,e){return k(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:(0,o.hexConcat)([t,(0,m.VM)(this.name),e||"0x"])};let n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=(0,o.hexConcat)(["0x9061b923",z([(0,m.Kn)(this.name),r.data])]));try{let t=yield this.provider.call(r);return(0,o.arrayify)(t).length%32===4&&S.throwError("resolver threw error",l.Logger.errors.CALL_EXCEPTION,{transaction:r,data:t}),n&&(t=D(t,0)),t}catch(i){if(i.code===l.Logger.errors.CALL_EXCEPTION)return null;throw i}}))}_fetchBytes(t,e){return k(this,void 0,void 0,(function*(){const r=yield this._fetch(t,e);return null!=r?D(r,0):null}))}_getAddress(t,e){const r=R[String(t)];if(null==r&&S.throwError(`unsupported coin type: ${t}`,l.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${t})`}),"eth"===r.ilk)return this.provider.formatter.address(e);const n=(0,o.arrayify)(e);if(null!=r.p2pkh){const t=e.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(t){const e=parseInt(t[1],16);if(t[2].length===2*e&&e>=1&&e<=75)return P((0,o.concat)([[r.p2pkh],"0x"+t[2]]))}}if(null!=r.p2sh){const t=e.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(t){const e=parseInt(t[1],16);if(t[2].length===2*e&&e>=1&&e<=75)return P((0,o.concat)([[r.p2sh],"0x"+t[2]]))}}if(null!=r.prefix){const t=n[1];let e=n[0];if(0===e?20!==t&&32!==t&&(e=-1):e=-1,e>=0&&n.length===2+t&&t>=1&&t<=75){const t=E().toWords(n.slice(2));return t.unshift(e),E().encode(r.prefix,t)}}return null}getAddress(t){return k(this,void 0,void 0,(function*(){if(null==t&&(t=60),60===t)try{const t=yield this._fetch("0x3b3b57de");return"0x"===t||t===y.R?null:this.provider.formatter.callAddress(t)}catch(n){if(n.code===l.Logger.errors.CALL_EXCEPTION)return null;throw n}const e=yield this._fetchBytes("0xf1cb7e06",_(t));if(null==e||"0x"===e)return null;const r=this._getAddress(t,e);return null==r&&S.throwError("invalid or unsupported coin data",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${t})`,coinType:t,data:e}),r}))}getAvatar(){return k(this,void 0,void 0,(function*(){const t=[{type:"name",content:this.name}];try{const e=yield this.getText("avatar");if(null==e)return null;for(let r=0;rt[e]))}return S.throwError("invalid or unsupported content hash data",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t})}))}getText(t){return k(this,void 0,void 0,(function*(){let e=(0,u.Y0)(t);e=(0,o.concat)([_(64),_(e.length),e]),e.length%32!==0&&(e=(0,o.concat)([e,(0,o.hexZeroPad)("0x",32-t.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",(0,o.hexlify)(e));return null==r||"0x"===r?null:(0,u.ZN)(r)}))}}let q=null,V=1;class G extends d.zt{constructor(t){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,a.defineReadOnly)(this,"anyNetwork","any"===t),this.anyNetwork&&(t=this.detectNetwork()),t instanceof Promise)this._networkPromise=t,t.catch((t=>{})),this._ready().catch((t=>{}));else{const e=(0,a.getStatic)(new.target,"getNetwork")(t);e?((0,a.defineReadOnly)(this,"_network",e),this.emit("network",e,null)):S.throwArgumentError("invalid network","network",t)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return k(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(t){}null==e&&(e=yield this.detectNetwork()),e||S.throwError("no network detected",l.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:(0,a.defineReadOnly)(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return(0,c.poll)((()=>this._ready().then((t=>t),(t=>{if(t.code!==l.Logger.errors.NETWORK_ERROR||"noNetwork"!==t.event)throw t}))))}static getFormatter(){return null==q&&(q=new A.Mb),q}static getNetwork(t){return(0,v.H)(null==t?"homestead":t)}ccipReadFetch(t,e,r){return k(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=t.to.toLowerCase(),i=e.toLowerCase(),o=[];for(let t=0;t=0?null:JSON.stringify({data:i,sender:n}),u=yield(0,c.fetchJson)({url:s,errorPassThrough:!0},a,((t,e)=>(t.status=e.statusCode,t)));if(u.data)return u.data;const h=u.message||"unknown error";if(u.status>=400&&u.status<500)return S.throwError(`response not found during CCIP fetch: ${h}`,l.Logger.errors.SERVER_ERROR,{url:e,errorMessage:h});o.push(h)}return S.throwError(`error encountered during CCIP fetch: ${o.map((t=>JSON.stringify(t))).join(", ")}`,l.Logger.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(t){return k(this,void 0,void 0,(function*(){if(yield this._ready(),t>0)for(;this._internalBlockNumber;){const e=this._internalBlockNumber;try{const r=yield e;if(M()-r.respTime<=t)return r.blockNumber;break}catch(n){if(this._internalBlockNumber===e)break}}const e=M(),r=(0,a.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((t=>null),(t=>t))}).then((({blockNumber:t,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const o=M();return(t=i.O$.from(t).toNumber()){this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return k(this,void 0,void 0,(function*(){const t=V++,e=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(n){return void this.emit("error",n)}if(this._setFastBlockNumber(r),this.emit("poll",t,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)S.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",S.makeError("network block skew detected",l.Logger.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let t=this._emitted.block+1;t<=r;t++)this.emit("block",t);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((t=>{if("block"===t)return;const e=this._emitted[t];"pending"!==e&&r-e>12&&delete this._emitted[t]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((t=>{switch(t.type){case"tx":{const r=t.hash;let n=this.getTransactionReceipt(r).then((t=>t&&null!=t.blockNumber?(this._emitted["t:"+r]=t.blockNumber,this.emit(r,t),null):null)).catch((t=>{this.emit("error",t)}));e.push(n);break}case"filter":if(!t._inflight){t._inflight=!0,-2===t._lastBlockNumber&&(t._lastBlockNumber=r-1);const n=t.filter;n.fromBlock=t._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((e=>{t._inflight=!1,0!==e.length&&e.forEach((e=>{e.blockNumber>t._lastBlockNumber&&(t._lastBlockNumber=e.blockNumber),this._emitted["b:"+e.blockHash]=e.blockNumber,this._emitted["t:"+e.transactionHash]=e.blockNumber,this.emit(n,e)}))})).catch((e=>{this.emit("error",e),t._inflight=!1}));e.push(o)}}})),this._lastBlockNumber=r,Promise.all(e).then((()=>{this.emit("didPoll",t)})).catch((t=>{this.emit("error",t)}))}else this.emit("didPoll",t)}))}resetEventsBlock(t){this._lastBlockNumber=t-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return k(this,void 0,void 0,(function*(){return S.throwError("provider does not support network detection",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return k(this,void 0,void 0,(function*(){const t=yield this._ready(),e=yield this.detectNetwork();if(t.chainId!==e.chainId){if(this.anyNetwork)return this._network=e,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",e,t),yield I(0),this._network;const r=S.makeError("underlying network changed",l.Logger.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:e});throw this.emit("error",r),r}return t}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((t=>{this._setFastBlockNumber(t)}),(t=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(t){t&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!t&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(t){if("number"!==typeof t||t<=0||parseInt(String(t))!=t)throw new Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const t=M();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((t=>((null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(t){null!=this._fastBlockNumber&&tthis._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))}waitForTransaction(t,e,r){return k(this,void 0,void 0,(function*(){return this._waitForTransaction(t,null==e?1:e,r||0,null)}))}_waitForTransaction(t,e,r,n){return k(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(t);return(i?i.confirmations:0)>=e?i:new Promise(((i,o)=>{const s=[];let a=!1;const u=function(){return!!a||(a=!0,s.forEach((t=>{t()})),!1)},h=t=>{t.confirmations{this.removeListener(t,h)})),n){let r=n.startBlock,i=null;const h=s=>k(this,void 0,void 0,(function*(){a||(yield I(1e3),this.getTransactionCount(n.from).then((c=>k(this,void 0,void 0,(function*(){if(!a){if(c<=n.nonce)r=s;else{{const e=yield this.getTransaction(t);if(e&&null!=e.blockNumber)return}for(null==i&&(i=r-3,i{a||this.once("block",h)})))}));if(a)return;this.once("block",h),s.push((()=>{this.removeListener("block",h)}))}if("number"===typeof r&&r>0){const t=setTimeout((()=>{u()||o(S.makeError("timeout exceeded",l.Logger.errors.TIMEOUT,{timeout:r}))}),r);t.unref&&t.unref(),s.push((()=>{clearTimeout(t)}))}}))}))}getBlockNumber(){return k(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield this.perform("getGasPrice",{});try{return i.O$.from(t)}catch(e){return S.throwError("bad result from backend",l.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e})}}))}getBalance(t,e){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,a.resolveProperties)({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getBalance",r);try{return i.O$.from(n)}catch(o){return S.throwError("bad result from backend",l.Logger.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:o})}}))}getTransactionCount(t,e){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,a.resolveProperties)({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getTransactionCount",r);try{return i.O$.from(n).toNumber()}catch(o){return S.throwError("bad result from backend",l.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:o})}}))}getCode(t,e){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,a.resolveProperties)({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getCode",r);try{return(0,o.hexlify)(n)}catch(i){return S.throwError("bad result from backend",l.Logger.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:i})}}))}getStorageAt(t,e,r){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield(0,a.resolveProperties)({address:this._getAddress(t),blockTag:this._getBlockTag(r),position:Promise.resolve(e).then((t=>(0,o.hexValue)(t)))}),i=yield this.perform("getStorageAt",n);try{return(0,o.hexlify)(i)}catch(s){return S.throwError("bad result from backend",l.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:s})}}))}_wrapTransaction(t,e,r){if(null!=e&&32!==(0,o.hexDataLength)(e))throw new Error("invalid response - sendTransaction");const n=t;return null!=e&&t.hash!==e&&S.throwError("Transaction hash mismatch from Provider.sendTransaction.",l.Logger.errors.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:e}),n.wait=(e,n)=>k(this,void 0,void 0,(function*(){let i;null==e&&(e=1),null==n&&(n=0),0!==e&&null!=r&&(i={data:t.data,from:t.from,nonce:t.nonce,to:t.to,value:t.value,startBlock:r});const o=yield this._waitForTransaction(t.hash,e,n,i);return null==o&&0===e?null:(this._emitted["t:"+t.hash]=o.blockNumber,0===o.status&&S.throwError("transaction failed",l.Logger.errors.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t,receipt:o}),o)})),n}sendTransaction(t){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield Promise.resolve(t).then((t=>(0,o.hexlify)(t))),r=this.formatter.transaction(t);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const t=yield this.perform("sendTransaction",{signedTransaction:e});return this._wrapTransaction(r,t,n)}catch(i){throw i.transaction=r,i.transactionHash=r.hash,i}}))}_getTransactionRequest(t){return k(this,void 0,void 0,(function*(){const e=yield t,r={};return["from","to"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>t?this._getAddress(t):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>t?i.O$.from(t):null)))})),["type"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>null!=t?t:null)))})),e.accessList&&(r.accessList=this.formatter.accessList(e.accessList)),["data"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>t?(0,o.hexlify)(t):null)))})),this.formatter.transactionRequest(yield(0,a.resolveProperties)(r))}))}_getFilter(t){return k(this,void 0,void 0,(function*(){t=yield t;const e={};return null!=t.address&&(e.address=this._getAddress(t.address)),["blockHash","topics"].forEach((r=>{null!=t[r]&&(e[r]=t[r])})),["fromBlock","toBlock"].forEach((r=>{null!=t[r]&&(e[r]=this._getBlockTag(t[r]))})),this.formatter.filter(yield(0,a.resolveProperties)(e))}))}_call(t,e,r){return k(this,void 0,void 0,(function*(){r>=10&&S.throwError("CCIP read exceeded maximum redirections",l.Logger.errors.SERVER_ERROR,{redirects:r,transaction:t});const n=t.to,s=yield this.perform("call",{transaction:t,blockTag:e});if(r>=0&&"latest"===e&&null!=n&&"0x556f1830"===s.substring(0,10)&&(0,o.hexDataLength)(s)%32===4)try{const a=(0,o.hexDataSlice)(s,4),u=(0,o.hexDataSlice)(a,0,32);i.O$.from(u).eq(n)||S.throwError("CCIP Read sender did not match",l.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:s});const h=[],c=i.O$.from((0,o.hexDataSlice)(a,32,64)).toNumber(),f=i.O$.from((0,o.hexDataSlice)(a,c,c+32)).toNumber(),d=(0,o.hexDataSlice)(a,c+32);for(let e=0;ek(this,void 0,void 0,(function*(){const t=yield this.perform("getBlock",n);if(null==t)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(e){let e=null;for(let n=0;nthis._wrapTransaction(t))),r}return this.formatter.block(t)}))),{oncePoll:this})}))}getBlock(t){return this._getBlock(t,!1)}getBlockWithTransactions(t){return this._getBlock(t,!0)}getTransaction(t){return k(this,void 0,void 0,(function*(){yield this.getNetwork(),t=yield t;const e={transactionHash:this.formatter.hash(t,!0)};return(0,c.poll)((()=>k(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",e);if(null==r)return null==this._emitted["t:"+t]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let t=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;t<=0&&(t=1),n.confirmations=t}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(t){return k(this,void 0,void 0,(function*(){yield this.getNetwork(),t=yield t;const e={transactionHash:this.formatter.hash(t,!0)};return(0,c.poll)((()=>k(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",e);if(null==r)return null==this._emitted["t:"+t]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let t=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;t<=0&&(t=1),n.confirmations=t}return n}))),{oncePoll:this})}))}getLogs(t){return k(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield(0,a.resolveProperties)({filter:this._getFilter(t)}),r=yield this.perform("getLogs",e);return r.forEach((t=>{null==t.removed&&(t.removed=!1)})),A.Mb.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return k(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(t){return k(this,void 0,void 0,(function*(){if("number"===typeof(t=yield t)&&t<0){t%1&&S.throwArgumentError("invalid BlockTag","blockTag",t);let e=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return e+=t,e<0&&(e=0),this.formatter.blockTag(e)}return this.formatter.blockTag(t)}))}getResolver(t){return k(this,void 0,void 0,(function*(){let e=t;for(;;){if(""===e||"."===e)return null;if("eth"!==t&&"eth"===e)return null;const r=yield this._getResolver(e,"getResolver");if(null!=r){const n=new H(this,r,t);return e===t||(yield n.supportsWildcard())?n:null}e=e.split(".").slice(1).join(".")}}))}_getResolver(t,e){return k(this,void 0,void 0,(function*(){null==e&&(e="ENS");const r=yield this.getNetwork();r.ensAddress||S.throwError("network does not support ENS",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:e,network:r.name});try{const e=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+(0,m.VM)(t).substring(2)});return this.formatter.callAddress(e)}catch(n){}return null}))}resolveName(t){return k(this,void 0,void 0,(function*(){t=yield t;try{return Promise.resolve(this.formatter.address(t))}catch(r){if((0,o.isHexString)(t))throw r}"string"!==typeof t&&S.throwArgumentError("invalid ENS name","name",t);const e=yield this.getResolver(t);return e?yield e.getAddress():null}))}lookupAddress(t){return k(this,void 0,void 0,(function*(){t=yield t;const e=(t=this.formatter.address(t)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(e,"lookupAddress");if(null==r)return null;const n=L(yield this.call({to:r,data:"0x691f3431"+(0,m.VM)(e).substring(2)}),0);return(yield this.resolveName(n))!=t?null:n}))}getAvatar(t){return k(this,void 0,void 0,(function*(){let e=null;if((0,o.isHexString)(t)){const r=this.formatter.address(t).substring(2).toLowerCase()+".addr.reverse",i=yield this._getResolver(r,"getAvatar");if(!i)return null;e=new H(this,i,r);try{const t=yield e.getAvatar();if(t)return t.url}catch(n){if(n.code!==l.Logger.errors.CALL_EXCEPTION)throw n}try{const t=L(yield this.call({to:i,data:"0x691f3431"+(0,m.VM)(r).substring(2)}),0);e=yield this.getResolver(t)}catch(n){if(n.code!==l.Logger.errors.CALL_EXCEPTION)throw n;return null}}else if(e=yield this.getResolver(t),!e)return null;const r=yield e.getAvatar();return null==r?null:r.url}))}perform(t,e){return S.throwError(t+" not implemented",l.Logger.errors.NOT_IMPLEMENTED,{operation:t})}_startEvent(t){this.polling=this._events.filter((t=>t.pollable())).length>0}_stopEvent(t){this.polling=this._events.filter((t=>t.pollable())).length>0}_addEventListener(t,e,r){const n=new O(C(t),e,r);return this._events.push(n),this._startEvent(n),this}on(t,e){return this._addEventListener(t,e,!1)}once(t,e){return this._addEventListener(t,e,!0)}emit(t,...e){let r=!1,n=[],i=C(t);return this._events=this._events.filter((t=>t.tag!==i||(setTimeout((()=>{t.listener.apply(this,e)}),0),r=!0,!t.once||(n.push(t),!1)))),n.forEach((t=>{this._stopEvent(t)})),r}listenerCount(t){if(!t)return this._events.length;let e=C(t);return this._events.filter((t=>t.tag===e)).length}listeners(t){if(null==t)return this._events.map((t=>t.listener));let e=C(t);return this._events.filter((t=>t.tag===e)).map((t=>t.listener))}off(t,e){if(null==e)return this.removeAllListeners(t);const r=[];let n=!1,i=C(t);return this._events=this._events.filter((t=>t.tag!==i||t.listener!=e||(!!n||(n=!0,r.push(t),!1)))),r.forEach((t=>{this._stopEvent(t)})),this}removeAllListeners(t){let e=[];if(null==t)e=this._events,this._events=[];else{const r=C(t);this._events=this._events.filter((t=>t.tag!==r||(e.push(t),!1)))}return e.forEach((t=>{this._stopEvent(t)})),this}}var W=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const Z=new l.Logger(f.i),J=["call","estimateGas"];function Q(t,e){if(null==t)return null;if("string"===typeof t.message&&t.message.match("reverted")){const r=(0,o.isHexString)(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if("object"===typeof t){for(const r in t){const n=Q(t[r],e);if(n)return n}return null}if("string"===typeof t)try{return Q(JSON.parse(t),e)}catch(r){}return null}function X(t,e,r){const n=r.transaction||r.signedTransaction;if("call"===t){const t=Q(e,!0);if(t)return t.data;Z.throwError("missing revert data in call exception; Transaction reverted without a reason string",l.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if("estimateGas"===t){let r=Q(e.body,!1);null==r&&(r=Q(e,!1)),r&&Z.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===l.Logger.errors.SERVER_ERROR&&e.error&&"string"===typeof e.error.message?i=e.error.message:"string"===typeof e.body?i=e.body:"string"===typeof e.responseText&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Z.throwError("insufficient funds for intrinsic transaction cost",l.Logger.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Z.throwError("nonce has already been used",l.Logger.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Z.throwError("replacement fee too low",l.Logger.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Z.throwError("legacy pre-eip-155 transactions not supported",l.Logger.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),J.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Z.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function Y(t){return new Promise((function(e){setTimeout(e,t)}))}function $(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function tt(t){return t?t.toLowerCase():t}const et={};class rt extends n.E{constructor(t,e,r){if(super(),t!==et)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,a.defineReadOnly)(this,"provider",e),null==r&&(r=0),"string"===typeof r?((0,a.defineReadOnly)(this,"_address",this.provider.formatter.address(r)),(0,a.defineReadOnly)(this,"_index",null)):"number"===typeof r?((0,a.defineReadOnly)(this,"_index",r),(0,a.defineReadOnly)(this,"_address",null)):Z.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(t){return Z.throwError("cannot alter JSON-RPC Signer connection",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new nt(et,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((t=>(t.length<=this._index&&Z.throwError("unknown account #"+this._index,l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(t[this._index]))))}sendUncheckedTransaction(t){t=(0,a.shallowCopy)(t);const e=this.getAddress().then((t=>(t&&(t=t.toLowerCase()),t)));if(null==t.gasLimit){const r=(0,a.shallowCopy)(t);r.from=e,t.gasLimit=this.provider.estimateGas(r)}return null!=t.to&&(t.to=Promise.resolve(t.to).then((t=>W(this,void 0,void 0,(function*(){if(null==t)return null;const e=yield this.provider.resolveName(t);return null==e&&Z.throwArgumentError("provided ENS name resolves to null","tx.to",t),e}))))),(0,a.resolveProperties)({tx:(0,a.resolveProperties)(t),sender:e}).then((({tx:e,sender:r})=>{null!=e.from?e.from.toLowerCase()!==r&&Z.throwArgumentError("from address mismatch","transaction",t):e.from=r;const n=this.provider.constructor.hexlifyTransaction(e,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((t=>t),(t=>("string"===typeof t.message&&t.message.match(/user denied/i)&&Z.throwError("user rejected transaction",l.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:e}),X("sendTransaction",t,n))))}))}signTransaction(t){return Z.throwError("signing transactions is unsupported",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(t){return W(this,void 0,void 0,(function*(){const e=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(t);try{return yield(0,c.poll)((()=>W(this,void 0,void 0,(function*(){const t=yield this.provider.getTransaction(r);if(null!==t)return this.provider._wrapTransaction(t,r,e)}))),{oncePoll:this.provider})}catch(n){throw n.transactionHash=r,n}}))}signMessage(t){return W(this,void 0,void 0,(function*(){const e="string"===typeof t?(0,u.Y0)(t):t,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,o.hexlify)(e),r.toLowerCase()])}catch(n){throw"string"===typeof n.message&&n.message.match(/user denied/i)&&Z.throwError("user rejected signing",l.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:t}),n}}))}_legacySignMessage(t){return W(this,void 0,void 0,(function*(){const e="string"===typeof t?(0,u.Y0)(t):t,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,o.hexlify)(e)])}catch(n){throw"string"===typeof n.message&&n.message.match(/user denied/i)&&Z.throwError("user rejected signing",l.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:t}),n}}))}_signTypedData(t,e,r){return W(this,void 0,void 0,(function*(){const n=yield s.E.resolveNames(t,e,r,(t=>this.provider.resolveName(t))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(s.E.getPayload(n.domain,e,n.value))])}catch(o){throw"string"===typeof o.message&&o.message.match(/user denied/i)&&Z.throwError("user rejected signing",l.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:e,value:n.value}}),o}}))}unlock(t){return W(this,void 0,void 0,(function*(){const e=this.provider,r=yield this.getAddress();return e.send("personal_unlockAccount",[r.toLowerCase(),t,null])}))}}class nt extends rt{sendTransaction(t){return this.sendUncheckedTransaction(t).then((t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:e=>this.provider.waitForTransaction(t,e)})))}}const it={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class ot extends G{constructor(t,e){let r=e;null==r&&(r=new Promise(((t,e)=>{setTimeout((()=>{this.detectNetwork().then((e=>{t(e)}),(t=>{e(t)}))}),0)}))),super(r),t||(t=(0,a.getStatic)(this.constructor,"defaultUrl")()),"string"===typeof t?(0,a.defineReadOnly)(this,"connection",Object.freeze({url:t})):(0,a.defineReadOnly)(this,"connection",Object.freeze((0,a.shallowCopy)(t))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return W(this,void 0,void 0,(function*(){yield Y(0);let t=null;try{t=yield this.send("eth_chainId",[])}catch(e){try{t=yield this.send("net_version",[])}catch(e){}}if(null!=t){const r=(0,a.getStatic)(this.constructor,"getNetwork");try{return r(i.O$.from(t).toNumber())}catch(e){return Z.throwError("could not detect network",l.Logger.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e})}}return Z.throwError("could not detect network",l.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(t){return new rt(et,this,t)}getUncheckedSigner(t){return this.getSigner(t).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((t=>t.map((t=>this.formatter.address(t)))))}send(t,e){const r={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,a.deepCopy)(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(t)>=0;if(n&&this._cache[t])return this._cache[t];const i=(0,c.fetchJson)(this.connection,JSON.stringify(r),$).then((t=>(this.emit("debug",{action:"response",request:r,response:t,provider:this}),t)),(t=>{throw this.emit("debug",{action:"response",error:t,request:r,provider:this}),t}));return n&&(this._cache[t]=i,setTimeout((()=>{this._cache[t]=null}),0)),i}prepareRequest(t,e){switch(t){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[tt(e.address),e.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[tt(e.address),e.blockTag]];case"getCode":return["eth_getCode",[tt(e.address),e.blockTag]];case"getStorageAt":return["eth_getStorageAt",[tt(e.address),(0,o.hexZeroPad)(e.position,32),e.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[e.signedTransaction]];case"getBlock":return e.blockTag?["eth_getBlockByNumber",[e.blockTag,!!e.includeTransactions]]:e.blockHash?["eth_getBlockByHash",[e.blockHash,!!e.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[e.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[e.transactionHash]];case"call":return["eth_call",[(0,a.getStatic)(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0}),e.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,a.getStatic)(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0})]];case"getLogs":return e.filter&&null!=e.filter.address&&(e.filter.address=tt(e.filter.address)),["eth_getLogs",[e.filter]]}return null}perform(t,e){return W(this,void 0,void 0,(function*(){if("call"===t||"estimateGas"===t){const t=e.transaction;if(t&&null!=t.type&&i.O$.from(t.type).isZero()&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((e=(0,a.shallowCopy)(e)).transaction=(0,a.shallowCopy)(t),delete e.transaction.type)}}const r=this.prepareRequest(t,e);null==r&&Z.throwError(t+" not implemented",l.Logger.errors.NOT_IMPLEMENTED,{operation:t});try{return yield this.send(r[0],r[1])}catch(n){return X(t,n,e)}}))}_startEvent(t){"pending"===t.tag&&this._startPending(),super._startEvent(t)}_startPending(){if(null!=this._pendingFilter)return;const t=this,e=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=e,e.then((function(r){return function n(){t.send("eth_getFilterChanges",[r]).then((function(r){if(t._pendingFilter!=e)return null;let n=Promise.resolve();return r.forEach((function(e){t._emitted["t:"+e.toLowerCase()]="pending",n=n.then((function(){return t.getTransaction(e).then((function(e){return t.emit("pending",e),null}))}))})),n.then((function(){return Y(1e3)}))})).then((function(){if(t._pendingFilter==e)return setTimeout((function(){n()}),0),null;t.send("eth_uninstallFilter",[r])})).catch((t=>{}))}(),r})).catch((t=>{}))}_stopEvent(t){"pending"===t.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(t)}static hexlifyTransaction(t,e){const r=(0,a.shallowCopy)(it);if(e)for(const i in e)e[i]&&(r[i]=!0);(0,a.checkProperties)(t,r);const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(e){if(null==t[e])return;const r=(0,o.hexValue)(i.O$.from(t[e]));"gasLimit"===e&&(e="gas"),n[e]=r})),["from","to","data"].forEach((function(e){null!=t[e]&&(n[e]=(0,o.hexlify)(t[e]))})),t.accessList&&(n.accessList=(0,h.accessListify)(t.accessList)),n}}},88089:function(t,e,r){"use strict";r.d(e,{q:function(){return f}});var n=r(2593),i=r(6881),o=r(34674),s=r(1581),a=r(34216);let u=null;try{if(u=WebSocket,null==u)throw new Error("inject please")}catch(d){const t=new s.Logger(a.i);u=function(){t.throwError("WebSockets not supported in this environment",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var h=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const c=new s.Logger(a.i);let l=1;class f extends o.r{constructor(t,e){"any"===e&&c.throwError("WebSocketProvider does not support 'any' network yet",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"===typeof t?t:"_websocket",e),this._pollingInterval=-1,this._wsReady=!1,"string"===typeof t?(0,i.defineReadOnly)(this,"_websocket",new u(this.connection.url)):(0,i.defineReadOnly)(this,"_websocket",t),(0,i.defineReadOnly)(this,"_requests",{}),(0,i.defineReadOnly)(this,"_subs",{}),(0,i.defineReadOnly)(this,"_subIds",{}),(0,i.defineReadOnly)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((t=>{this.websocket.send(this._requests[t].payload)}))},this.websocket.onmessage=t=>{const e=t.data,r=JSON.parse(e);if(null!=r.id){const t=String(r.id),n=this._requests[t];if(delete this._requests[t],void 0!==r.result)n.callback(null,r.result),this.emit("debug",{action:"response",request:JSON.parse(n.payload),response:r.result,provider:this});else{let t=null;r.error?(t=new Error(r.error.message||"unknown error"),(0,i.defineReadOnly)(t,"code",r.error.code||null),(0,i.defineReadOnly)(t,"response",e)):t=new Error("unknown error"),n.callback(t,void 0),this.emit("debug",{action:"response",error:t,request:JSON.parse(n.payload),provider:this})}}else if("eth_subscription"===r.method){const t=this._subs[r.params.subscription];t&&t.processFunc(r.params.result)}else console.warn("this should not happen")};const r=setInterval((()=>{this.emit("poll")}),1e3);r.unref&&r.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(t){c.throwError("cannot reset events block on WebSocketProvider",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(t){c.throwError("cannot set polling interval on WebSocketProvider",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return h(this,void 0,void 0,(function*(){return null}))}set polling(t){t&&c.throwError("cannot set polling on WebSocketProvider",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(t,e){const r=l++;return new Promise(((n,i)=>{const o=JSON.stringify({method:t,params:e,id:r,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(r)]={callback:function(t,e){return t?i(t):n(e)},payload:o},this._wsReady&&this.websocket.send(o)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(t,e,r){return h(this,void 0,void 0,(function*(){let n=this._subIds[t];null==n&&(n=Promise.all(e).then((t=>this.send("eth_subscribe",t))),this._subIds[t]=n);const i=yield n;this._subs[i]={tag:t,processFunc:r}}))}_startEvent(t){switch(t.type){case"block":this._subscribe("block",["newHeads"],(t=>{const e=n.O$.from(t.number).toNumber();this._emitted.block=e,this.emit("block",e)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(t=>{this.emit("pending",t)}));break;case"filter":this._subscribe(t.tag,["logs",this._getFilter(t.filter)],(e=>{null==e.removed&&(e.removed=!1),this.emit(t.filter,this.formatter.filterLog(e))}));break;case"tx":{const e=t=>{const e=t.hash;this.getTransactionReceipt(e).then((t=>{t&&this.emit(e,t)}))};e(t),this._subscribe("tx",["newHeads"],(t=>{this._events.filter((t=>"tx"===t.type)).forEach(e)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",t)}}_stopEvent(t){let e=t.tag;if("tx"===t.type){if(this._events.filter((t=>"tx"===t.type)).length)return;e="tx"}else if(this.listenerCount(t.event))return;const r=this._subIds[e];r&&(delete this._subIds[e],r.then((t=>{this._subs[t]&&(delete this._subs[t],this.send("eth_unsubscribe",[t]))})))}destroy(){return h(this,void 0,void 0,(function*(){this.websocket.readyState===u.CONNECTING&&(yield new Promise((t=>{this.websocket.onopen=function(){t(!0)},this.websocket.onerror=function(){t(!1)}}))),this.websocket.close(1e3)}))}}},85751:function(t){"use strict";for(var e="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function s(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=o(e)^n>>5}for(e=o(e),r=0;re)return"Exceeds length limit";var n=t.toLowerCase(),i=t.toUpperCase();if(t!==n&&t!==i)return"Mixed-case string "+t;var a=(t=n).lastIndexOf("1");if(-1===a)return"No separator character for "+t;if(0===a)return"Missing prefix for "+t;var u=t.slice(0,a),h=t.slice(a+1);if(h.length<6)return"Data too short";var c=s(u);if("string"===typeof c)return c;for(var l=[],f=0;f=h.length||l.push(p)}return 1!==c?"Invalid checksum for "+t:{prefix:u,words:l}}function u(t,e,r,n){for(var i=0,o=0,s=(1<=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<=e)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=s(t=t.toLowerCase());if("string"===typeof i)throw new Error(i);for(var a=t+"1",u=0;u>5!==0)throw new Error("Non 5-bit word");i=o(i)^h,a+=e.charAt(h)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u){a+=e.charAt(i>>5*(5-u)&31)}return a},toWordsUnsafe:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e},toWords:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e;throw new Error(e)},fromWordsUnsafe:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e},fromWords:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}}},36049:function(t,e,r){"use strict";r.r(e),r.d(e,{randomBytes:function(){return n.O},shuffled:function(){return i}});var n=r(5634);function i(t){for(let e=(t=t.slice()).length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}},5634:function(t,e,r){"use strict";r.d(e,{O:function(){return u}});var n=r(16441),i=r(1581);const o=new i.Logger("random/5.7.0");const s=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof r.g)return r.g;throw new Error("unable to locate global object")}();let a=s.crypto||s.msCrypto;function u(t){(t<=0||t>1024||t%1||t!=t)&&o.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return a.getRandomValues(e),(0,n.arrayify)(e)}a&&a.getRandomValues||(o.warn("WARNING: Missing strong random number source"),a={getRandomValues:function(t){return o.throwError("no secure random source avaialble",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},59052:function(t,e,r){"use strict";r.r(e),r.d(e,{decode:function(){return f},encode:function(){return h}});var n=r(16441),i=r(1581);const o=new i.Logger("rlp/5.7.0");function s(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function a(t,e,r){let n=0;for(let i=0;ie+1+n&&o.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function l(t,e){if(0===t.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&o.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});const n=a(t,e+1,r);return e+1+r+n>t.length&&o.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),c(t,e,e+1+r,r+n)}if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),c(t,e,e+1,r)}if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});const s=a(t,e+1,r);e+1+r+s>t.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r+s,result:(0,n.hexlify)(t.slice(e+1+r,e+1+r+s))}}if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:(0,n.hexlify)(t.slice(e+1,e+1+r))}}return{consumed:1,result:(0,n.hexlify)(t[e])}}function f(t){const e=(0,n.arrayify)(t),r=l(e,0);return r.consumed!==e.length&&o.throwArgumentError("invalid rlp data","data",t),r.result}},91278:function(t,e,r){"use strict";r.r(e),r.d(e,{SupportedAlgorithm:function(){return i.p},computeHmac:function(){return n.Gy},ripemd160:function(){return n.bP},sha256:function(){return n.JQ},sha512:function(){return n.o}});var n=r(2006),i=r(21261)},2006:function(t,e,r){"use strict";r.d(e,{Gy:function(){return f},bP:function(){return h},JQ:function(){return c},o:function(){return l}});var n=r(33715),i=r.n(n),o=r(16441),s=r(21261),a=r(1581);const u=new a.Logger("sha2/5.7.0");function h(t){return"0x"+i().ripemd160().update((0,o.arrayify)(t)).digest("hex")}function c(t){return"0x"+i().sha256().update((0,o.arrayify)(t)).digest("hex")}function l(t){return"0x"+i().sha512().update((0,o.arrayify)(t)).digest("hex")}function f(t,e,r){return s.p[t]||u.throwError("unsupported algorithm "+t,a.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:t}),"0x"+i().hmac(i()[t],(0,o.arrayify)(e)).update((0,o.arrayify)(r)).digest("hex")}},21261:function(t,e,r){"use strict";var n;r.d(e,{p:function(){return n}}),function(t){t.sha256="sha256",t.sha512="sha512"}(n||(n={}))},67669:function(t,e,r){"use strict";r.r(e),r.d(e,{SigningKey:function(){return Z},computePublicKey:function(){return Q},recoverPublicKey:function(){return J}});var n=r(42500),i=r.n(n),o=r(33715),s=r.n(o);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:"undefined"!==typeof self&&self;function a(t,e,r){return r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===e||null===e)&&r.path)}},t(r,r.exports),r.exports}var u=h;function h(t,e){if(!t)throw new Error(e||"Assertion failed")}h.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)};var c=a((function(t,e){var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}})),l=a((function(t,e){var r=e;r.assert=u,r.toArray=c.toArray,r.zero2=c.zero2,r.toHex=c.toHex,r.encode=c.encode,r.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},r.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,u=t.andln(3)+i&3,h=e.andln(3)+o&3;3===u&&(u=-1),3===h&&(h=-1),s=0===(1&u)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==h?u:-u,r[0].push(s),a=0===(1&h)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==u?h:-h,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},r.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(t){return"string"===typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new(i())(t,"hex","le")}})),f=l.getNAF,d=l.getJSF,p=l.assert;function g(t,e){this.type=t,this.p=new(i())(e.p,16),this.red=e.prime?i().red(e.prime):i().mont(this.p),this.zero=new(i())(0).toRed(this.red),this.one=new(i())(1).toRed(this.red),this.two=new(i())(2).toRed(this.red),this.n=e.n&&new(i())(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.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))}var y=g;function m(t,e){this.curve=t,this.type=e,this.precomputed=null}g.prototype.point=function(){throw new Error("Not implemented")},g.prototype.validate=function(){throw new Error("Not implemented")},g.prototype._fixedNafMul=function(t,e){p(t.precomputed);var r=t._getDoubles(),n=f(e,1,this._bitLength),i=(1<=o;u--)s=(s<<1)+n[u];a.push(s)}for(var h=this.jpoint(null,null,null),c=this.jpoint(null,null,null),l=i;l>0;l--){for(o=0;o=0;a--){for(var u=0;a>=0&&0===o[a];a--)u++;if(a>=0&&u++,s=s.dblp(u),a<0)break;var h=o[a];p(0!==h),s="affine"===t.type?h>0?s.mixedAdd(i[h-1>>1]):s.mixedAdd(i[-h-1>>1].neg()):h>0?s.add(i[h-1>>1]):s.add(i[-h-1>>1].neg())}return"affine"===t.type?s.toP():s},g.prototype._wnafMulAdd=function(t,e,r,n,i){var o,s,a,u=this._wnafT1,h=this._wnafT2,c=this._wnafT3,l=0;for(o=0;o=1;o-=2){var g=o-1,y=o;if(1===u[g]&&1===u[y]){var m=[e[g],null,null,e[y]];0===e[g].y.cmp(e[y].y)?(m[1]=e[g].add(e[y]),m[2]=e[g].toJ().mixedAdd(e[y].neg())):0===e[g].y.cmp(e[y].y.redNeg())?(m[1]=e[g].toJ().mixedAdd(e[y]),m[2]=e[g].add(e[y].neg())):(m[1]=e[g].toJ().mixedAdd(e[y]),m[2]=e[g].toJ().mixedAdd(e[y].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=d(r[g],r[y]);for(l=Math.max(b[0].length,l),c[g]=new Array(l),c[y]=new Array(l),s=0;s=0;o--){for(var S=0;o>=0;){var B=!0;for(s=0;s=0&&S++,A=A.dblp(S),o<0)break;for(s=0;s0?a=h[s][x-1>>1]:x<0&&(a=h[s][-x-1>>1].neg()),A="affine"===a.type?A.mixedAdd(a):A.add(a))}}for(o=0;o=Math.ceil((t.bitLength()+1)/e.step)},m.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(s=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},w.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),h=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:u.add(h).neg()}},w.prototype.pointFromX=function(t,e){(t=new(i())(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.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(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},w.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},A.prototype.isInfinity=function(){return this.inf},A.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},A.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},A.prototype.getX=function(){return this.x.fromRed()},A.prototype.getY=function(){return this.y.fromRed()},A.prototype.mul=function(t){return t=new(i())(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},A.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},A.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},A.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},A.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.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 e},A.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},v(k,y.BasePoint),w.prototype.jpoint=function(t,e,r){return new k(this,t,e,r)},k.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},k.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},k.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=a.redSqr(),c=h.redMul(a),l=n.redMul(h),f=u.redSqr().redIAdd(c).redISub(l).redISub(l),d=u.redMul(l.redISub(f)).redISub(o.redMul(c)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(f,d,p)},k.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),h=u.redMul(s),c=r.redMul(u),l=a.redSqr().redIAdd(h).redISub(c).redISub(c),f=a.redMul(c.redISub(l)).redISub(i.redMul(h)),d=this.z.redMul(s);return this.curve.jpoint(l,f,d)},k.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},k.prototype.inspect=function(){return this.isInfinity()?"":""},k.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var S=a((function(t,e){var r=e;r.base=y,r.short=E,r.mont=null,r.edwards=null})),B=a((function(t,e){var r,n=e,i=l.assert;function o(t){"short"===t.type?this.curve=new S.short(t):"edwards"===t.type?this.curve=new S.edwards(t):this.curve=new S.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new o(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,a("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:s().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:s().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:s().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:s().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"]}),a("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:s().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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s().sha256,gRed:!1,g:["9"]}),a("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:s().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(u){r=void 0}a("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:s().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function x(t){if(!(this instanceof x))return new x(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=c.toArray(t.entropy,t.entropyEnc||"hex"),r=c.toArray(t.nonce,t.nonceEnc||"hex"),n=c.toArray(t.pers,t.persEnc||"hex");u(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var C=x;x.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},x.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof e&&(n=r,r=e,e=null),r&&(r=c.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var O=l.assert;function R(t,e){if(t instanceof R)return t;this._importDER(t,e)||(O(t.r&&t.s,"Signature without r or s"),this.r=new(i())(t.r,16),this.s=new(i())(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var _=R;function P(){this.place=0}function N(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return!(i<=127)&&(e.place=s,i)}function U(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}R.prototype._importDER=function(t,e){t=l.toArray(t,e);var r=new P;if(48!==t[r.place++])return!1;var n=N(t,r);if(!1===n)return!1;if(n+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var o=N(t,r);if(!1===o)return!1;var s=t.slice(r.place,o+r.place);if(r.place+=o,2!==t[r.place++])return!1;var a=N(t,r);if(!1===a)return!1;if(t.length!==a+r.place)return!1;var u=t.slice(r.place,a+r.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new(i())(s),this.s=new(i())(u),this.recoveryParam=null,!0},R.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=U(e),r=U(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];L(n,e.length),(n=n.concat(e)).push(2),L(n,r.length);var i=n.concat(r),o=[48];return L(o,i.length),o=o.concat(i),l.encode(o,t)};var D=function(){throw new Error("unsupported")},F=l.assert;function j(t){if(!(this instanceof j))return new j(t);"string"===typeof t&&(F(Object.prototype.hasOwnProperty.call(B,t),"Unknown curve "+t),t=B[t]),t instanceof B.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var K=j;j.prototype.keyPair=function(t){return new T(this,t)},j.prototype.keyFromPrivate=function(t,e){return T.fromPrivate(this,t,e)},j.prototype.keyFromPublic=function(t,e){return T.fromPublic(this,t,e)},j.prototype.genKeyPair=function(t){t||(t={});for(var e=new C({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||D(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(i())(2));;){var o=new(i())(e.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},j.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},j.prototype.sign=function(t,e,r,n){"object"===typeof r&&(n=r,r=null),n||(n={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new(i())(t,16));for(var o=this.n.byteLength(),s=e.getPrivate().toArray("be",o),a=t.toArray("be",o),u=new C({hash:this.hash,entropy:s,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),h=this.n.sub(new(i())(1)),c=0;;c++){var l=n.k?n.k(c):new(i())(u.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(h)>=0)){var f=this.g.mul(l);if(!f.isInfinity()){var d=f.getX(),p=d.umod(this.n);if(0!==p.cmpn(0)){var g=l.invm(this.n).mul(p.mul(e.getPrivate()).iadd(t));if(0!==(g=g.umod(this.n)).cmpn(0)){var y=(f.getY().isOdd()?1:0)|(0!==d.cmp(p)?2:0);return n.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),y^=1),new _({r:p,s:g,recoveryParam:y})}}}}}},j.prototype.verify=function(t,e,r,n){t=this._truncateToN(new(i())(t,16)),r=this.keyFromPublic(r,n);var o=(e=new _(e,"hex")).r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),h=u.mul(t).umod(this.n),c=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(h,r.getPublic(),c)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(h,r.getPublic(),c)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},j.prototype.recoverPubKey=function(t,e,r,n){F((3&r)===r,"The recovery param is more than two bits"),e=new _(e,n);var o=this.n,s=new(i())(t),a=e.r,u=e.s,h=1&r,c=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");a=c?this.curve.pointFromX(a.add(this.curve.n),h):this.curve.pointFromX(a,h);var l=e.r.invm(o),f=o.sub(s).mul(l).umod(o),d=u.mul(l).umod(o);return this.g.mulAdd(f,a,d)},j.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new _(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var z=a((function(t,e){var r=e;r.version="6.5.4",r.utils=l,r.rand=function(){throw new Error("unsupported")},r.curve=S,r.curves=B,r.ec=K,r.eddsa=null})).ec,H=r(16441),q=r(6881);const V=new(r(1581).Logger)("signing-key/5.7.0");let G=null;function W(){return G||(G=new z("secp256k1")),G}class Z{constructor(t){(0,q.defineReadOnly)(this,"curve","secp256k1"),(0,q.defineReadOnly)(this,"privateKey",(0,H.hexlify)(t)),32!==(0,H.hexDataLength)(this.privateKey)&&V.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const e=W().keyFromPrivate((0,H.arrayify)(this.privateKey));(0,q.defineReadOnly)(this,"publicKey","0x"+e.getPublic(!1,"hex")),(0,q.defineReadOnly)(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),(0,q.defineReadOnly)(this,"_isSigningKey",!0)}_addPoint(t){const e=W().keyFromPublic((0,H.arrayify)(this.publicKey)),r=W().keyFromPublic((0,H.arrayify)(t));return"0x"+e.pub.add(r.pub).encodeCompressed("hex")}signDigest(t){const e=W().keyFromPrivate((0,H.arrayify)(this.privateKey)),r=(0,H.arrayify)(t);32!==r.length&&V.throwArgumentError("bad digest length","digest",t);const n=e.sign(r,{canonical:!0});return(0,H.splitSignature)({recoveryParam:n.recoveryParam,r:(0,H.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,H.hexZeroPad)("0x"+n.s.toString(16),32)})}computeSharedSecret(t){const e=W().keyFromPrivate((0,H.arrayify)(this.privateKey)),r=W().keyFromPublic((0,H.arrayify)(Q(t)));return(0,H.hexZeroPad)("0x"+e.derive(r.getPublic()).toString(16),32)}static isSigningKey(t){return!(!t||!t._isSigningKey)}}function J(t,e){const r=(0,H.splitSignature)(e),n={r:(0,H.arrayify)(r.r),s:(0,H.arrayify)(r.s)};return"0x"+W().recoverPubKey((0,H.arrayify)(t),n,r.recoveryParam).encode("hex",!1)}function Q(t,e){const r=(0,H.arrayify)(t);if(32===r.length){const t=new Z(r);return e?"0x"+W().keyFromPrivate(r).getPublic(!0,"hex"):t.publicKey}return 33===r.length?e?(0,H.hexlify)(r):"0x"+W().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?e?"0x"+W().keyFromPublic(r).getPublic(!0,"hex"):(0,H.hexlify)(r):V.throwArgumentError("invalid public or private key","key","[REDACTED]")}},42500:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(62808).Buffer}catch(M){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function h(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u=49?h-49+10:h>=17?h-17+10:h,n(h>=0&&s0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c1&&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")]=l}catch(M){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?""}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],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];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?f[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=d[t],c=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var g=l.modrn(c).toString(t);r=(l=l.idivn(c)).isZero()?g+r:f[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=f;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,g=d>>>13,y=0|s[2],m=8191&y,v=y>>>13,b=0|s[3],w=8191&b,E=b>>>13,A=0|s[4],k=8191&A,S=A>>>13,B=0|s[5],x=8191&B,C=B>>>13,M=0|s[6],I=8191&M,T=M>>>13,O=0|s[7],R=8191&O,_=O>>>13,P=0|s[8],N=8191&P,U=P>>>13,L=0|s[9],D=8191&L,F=L>>>13,j=0|a[0],K=8191&j,z=j>>>13,H=0|a[1],q=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Z=G>>>13,J=0|a[3],Q=8191&J,X=J>>>13,Y=0|a[4],$=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,ft=ct>>>13,dt=0|a[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(h+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(f,K)|0))<<13)|0;h=((o=Math.imul(f,z))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,K),i=(i=Math.imul(p,z))+Math.imul(g,K)|0,o=Math.imul(g,z);var mt=(h+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,q)|0))<<13)|0;h=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,K),i=(i=Math.imul(m,z))+Math.imul(v,K)|0,o=Math.imul(v,z),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,V)|0;var vt=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(f,W)|0))<<13)|0;h=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,K),i=(i=Math.imul(w,z))+Math.imul(E,K)|0,o=Math.imul(E,z),n=n+Math.imul(m,q)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,Z)|0;var bt=(h+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,Q)|0))<<13)|0;h=((o=o+Math.imul(f,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(k,K),i=(i=Math.imul(k,z))+Math.imul(S,K)|0,o=Math.imul(S,z),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,X)|0;var wt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,z))+Math.imul(C,K)|0,o=Math.imul(C,z),n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,V)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var Et=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(I,K),i=(i=Math.imul(I,z))+Math.imul(T,K)|0,o=Math.imul(T,z),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var At=(h+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,ot)|0))<<13)|0;h=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(R,K),i=(i=Math.imul(R,z))+Math.imul(_,K)|0,o=Math.imul(_,z),n=n+Math.imul(I,q)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,X)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var kt=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((o=o+Math.imul(f,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,z))+Math.imul(U,K)|0,o=Math.imul(U,z),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,z))+Math.imul(F,K)|0,o=Math.imul(F,z),n=n+Math.imul(N,q)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(U,q)|0,o=o+Math.imul(U,V)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,ft)|0;var Bt=(h+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,pt)|0))<<13)|0;h=((o=o+Math.imul(f,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,V))+Math.imul(F,q)|0,o=Math.imul(F,V),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Z)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ft)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;h=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,Z))+Math.imul(F,W)|0,o=Math.imul(F,Z),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,X)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ht)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ft)|0;var Ct=(h+(n=n+Math.imul(m,pt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,X))+Math.imul(F,Q)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(U,$)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ft)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ft)|0;var Mt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ft)|0;var It=(h+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(S,pt)|0))<<13)|0;h=((o=o+Math.imul(S,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(D,rt),i=(i=Math.imul(D,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,n=n+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,ot),i=(i=Math.imul(D,st))+Math.imul(F,ot)|0,o=Math.imul(F,st),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(U,ut)|0,o=o+Math.imul(U,ht)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ft)|0;var Ot=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,ut),i=(i=Math.imul(D,ht))+Math.imul(F,ut)|0,o=Math.imul(F,ht),n=n+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(U,lt)|0,o=o+Math.imul(U,ft)|0;var Rt=(h+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,gt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,lt),i=(i=Math.imul(D,ft))+Math.imul(F,lt)|0,o=Math.imul(F,ft);var _t=(h+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(U,pt)|0))<<13)|0;h=((o=o+Math.imul(U,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863;var Pt=(h+(n=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,gt))+Math.imul(F,pt)|0))<<13)|0;return h=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=yt,u[1]=mt,u[2]=vt,u[3]=bt,u[4]=wt,u[5]=Et,u[6]=At,u[7]=kt,u[8]=St,u[9]=Bt,u[10]=xt,u[11]=Ct,u[12]=Mt,u[13]=It,u[14]=Tt,u[15]=Ot,u[16]=Rt,u[17]=_t,u[18]=Pt,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(t,e,r){return m(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(y=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):r<63?g(this,t,e):r<1024?m(this,t,e):v(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=f)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.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;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function E(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function B(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){x.call(this,t),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)}E.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},E.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},E.prototype.split=function(t,e){t.iushrn(this.n,0,e)},E.prototype.imulK=function(t){return t.imul(this.k)},i(A,E),A.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},A.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new A;else if("p224"===t)e=new k;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new B}return w[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(c(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var g=d,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,x),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),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(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},31886:function(t,e,r){"use strict";r.r(e),r.d(e,{keccak256:function(){return g},pack:function(){return p},sha256:function(){return y}});var n=r(2593),i=r(16441),o=r(38197),s=r(2006),a=r(84917),u=r(1581);const h=new RegExp("^bytes([0-9]+)$"),c=new RegExp("^(u?int)([0-9]*)$"),l=new RegExp("^(.*)\\[([0-9]*)\\]$"),f=new u.Logger("solidity/5.7.0");function d(t,e,r){switch(t){case"address":return r?(0,i.zeroPad)(e,32):(0,i.arrayify)(e);case"string":return(0,a.Y0)(e);case"bytes":return(0,i.arrayify)(e);case"bool":return e=e?"0x01":"0x00",r?(0,i.zeroPad)(e,32):(0,i.arrayify)(e)}let o=t.match(c);if(o){let s=parseInt(o[2]||"256");return(o[2]&&String(s)!==o[2]||s%8!==0||0===s||s>256)&&f.throwArgumentError("invalid number type","type",t),r&&(s=256),e=n.O$.from(e).toTwos(s),(0,i.zeroPad)(e,s/8)}if(o=t.match(h),o){const n=parseInt(o[1]);return(String(n)!==o[1]||0===n||n>32)&&f.throwArgumentError("invalid bytes type","type",t),(0,i.arrayify)(e).byteLength!==n&&f.throwArgumentError(`invalid value for ${t}`,"value",e),r?(0,i.arrayify)((e+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):e}if(o=t.match(l),o&&Array.isArray(e)){const r=o[1];parseInt(o[2]||String(e.length))!=e.length&&f.throwArgumentError(`invalid array length for ${t}`,"value",e);const n=[];return e.forEach((function(t){n.push(d(r,t,!0))})),(0,i.concat)(n)}return f.throwArgumentError("invalid type","type",t)}function p(t,e){t.length!=e.length&&f.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach((function(t,n){r.push(d(t,e[n]))})),(0,i.hexlify)((0,i.concat)(r))}function g(t,e){return(0,o.keccak256)(p(t,e))}function y(t,e){return(0,s.JQ)(p(t,e))}},22384:function(t,e,r){"use strict";r.r(e),r.d(e,{UnicodeNormalizationForm:function(){return o.Uj},Utf8ErrorFuncs:function(){return o.te},Utf8ErrorReason:function(){return o.Uw},_toEscapedUtf8String:function(){return o.U$},formatBytes32String:function(){return s},nameprep:function(){return v},parseBytes32String:function(){return a},toUtf8Bytes:function(){return o.Y0},toUtf8CodePoints:function(){return o.XL},toUtf8String:function(){return o.ZN}});var n=r(57218),i=r(16441),o=r(84917);function s(t){const e=(0,o.Y0)(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([e,n.R]).slice(0,32))}function a(t){const e=(0,i.arrayify)(t);if(32!==e.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==e[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===e[r-1];)r--;return(0,o.ZN)(e.slice(0,r))}function u(t,e){e||(e=function(t){return[parseInt(t,16)]});let r=0,n={};return t.split(",").forEach((t=>{let i=t.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])})),n}function h(t){let e=0;return t.split(",").map((t=>{let r=t.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=e+parseInt(r[0],16);return e=parseInt(r[1],16),{l:n,h:e}}))}function c(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&-1!==i.e.indexOf(t-r))continue;return i}}return null}const l=h("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),f="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((t=>parseInt(t,16))),d=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],p=u("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),g=u("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),y=u("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{if(f.indexOf(t)>=0)return[];if(t>=65024&&t<=65039)return[];let e=function(t){let e=c(t,d);if(e)return[t+e.s];let r=p[t];if(r)return r;let n=g[t];return n?[t+n[0]]:y[t]||null}(t);return e||[t]})),e=r.reduce(((t,e)=>(e.forEach((e=>{t.push(e)})),t)),[]),e=(0,o.XL)((0,o.uu)(e),o.Uj.NFKC),e.forEach((t=>{if(c(t,m))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),e.forEach((t=>{if(c(t,l))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let n=(0,o.uu)(e);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n}},84917:function(t,e,r){"use strict";r.d(e,{Uj:function(){return o},te:function(){return u},Uw:function(){return s},U$:function(){return f},uu:function(){return d},Y0:function(){return c},XL:function(){return g},ZN:function(){return p}});var n=r(16441);const i=new(r(1581).Logger)("strings/5.7.0");var o,s;function a(t,e,r,n,i){if(t===s.BAD_PREFIX||t===s.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6===2;n++)t++;return t}return t===s.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(o||(o={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(s||(s={}));const u=Object.freeze({error:function(t,e,r,n,o){return i.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)},ignore:a,replace:function(t,e,r,n,i){return t===s.OVERLONG?(n.push(i),0):(n.push(65533),a(t,e,r))}});function h(t,e){null==e&&(e=u.error),t=(0,n.arrayify)(t);const r=[];let i=0;for(;i>7===0){r.push(n);continue}let o=null,a=null;if(192===(224&n))o=1,a=127;else if(224===(240&n))o=2,a=2047;else{if(240!==(248&n)){i+=e(128===(192&n)?s.UNEXPECTED_CONTINUE:s.BAD_PREFIX,i-1,t,r);continue}o=3,a=65535}if(i-1+o>=t.length){i+=e(s.OVERRUN,i-1,t,r);continue}let u=n&(1<<8-o-1)-1;for(let h=0;h1114111?i+=e(s.OUT_OF_RANGE,i-1-o,t,r,u):u>=55296&&u<=57343?i+=e(s.UTF16_SURROGATE,i-1-o,t,r,u):u<=a?i+=e(s.OVERLONG,i-1-o,t,r,u):r.push(u))}return r}function c(t,e=o.current){e!=o.current&&(i.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return(0,n.arrayify)(r)}function l(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function f(t,e){return'"'+h(t,e).map((t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?l(t):l(55296+((t-=65536)>>10&1023))+l(56320+(1023&t))})).join("")+'"'}function d(t){return t.map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}function p(t,e){return d(h(t,e))}function g(t,e=o.current){return h(c(t,e))}},83875:function(t,e,r){"use strict";r.r(e),r.d(e,{TransactionTypes:function(){return d},accessListify:function(){return A},computeAddress:function(){return v},parse:function(){return M},recoverAddress:function(){return b},serialize:function(){return x}});var n=r(19485),i=r(2593),o=r(16441),s=r(21046),a=r(38197),u=r(6881),h=r(59052),c=r(67669),l=r(1581);const f=new l.Logger("transactions/5.7.0");var d;function p(t){return"0x"===t?null:(0,n.getAddress)(t)}function g(t){return"0x"===t?s._Y:i.O$.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(d||(d={}));const y=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],m={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function v(t){const e=(0,c.computePublicKey)(t);return(0,n.getAddress)((0,o.hexDataSlice)((0,a.keccak256)((0,o.hexDataSlice)(e,1)),12))}function b(t,e){return v((0,c.recoverPublicKey)((0,o.arrayify)(t),e))}function w(t,e){const r=(0,o.stripZeros)(i.O$.from(t).toHexString());return r.length>32&&f.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function E(t,e){return{address:(0,n.getAddress)(t),storageKeys:(e||[]).map(((e,r)=>(32!==(0,o.hexDataLength)(e)&&f.throwArgumentError("invalid access list storageKey",`accessList[${t}:${r}]`,e),e.toLowerCase())))}}function A(t){if(Array.isArray(t))return t.map(((t,e)=>Array.isArray(t)?(t.length>2&&f.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${e}]`,t),E(t[0],t[1])):E(t.address,t.storageKeys)));const e=Object.keys(t).map((e=>{const r=t[e].reduce(((t,e)=>(t[e]=!0,t)),{});return E(e,Object.keys(r).sort())}));return e.sort(((t,e)=>t.address.localeCompare(e.address))),e}function k(t){return A(t).map((t=>[t.address,t.storageKeys]))}function S(t,e){if(null!=t.gasPrice){const e=i.O$.from(t.gasPrice),r=i.O$.from(t.maxFeePerGas||0);e.eq(r)||f.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:e,maxFeePerGas:r})}const r=[w(t.chainId||0,"chainId"),w(t.nonce||0,"nonce"),w(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(t.maxFeePerGas||0,"maxFeePerGas"),w(t.gasLimit||0,"gasLimit"),null!=t.to?(0,n.getAddress)(t.to):"0x",w(t.value||0,"value"),t.data||"0x",k(t.accessList||[])];if(e){const t=(0,o.splitSignature)(e);r.push(w(t.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(t.r)),r.push((0,o.stripZeros)(t.s))}return(0,o.hexConcat)(["0x02",h.encode(r)])}function B(t,e){const r=[w(t.chainId||0,"chainId"),w(t.nonce||0,"nonce"),w(t.gasPrice||0,"gasPrice"),w(t.gasLimit||0,"gasLimit"),null!=t.to?(0,n.getAddress)(t.to):"0x",w(t.value||0,"value"),t.data||"0x",k(t.accessList||[])];if(e){const t=(0,o.splitSignature)(e);r.push(w(t.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(t.r)),r.push((0,o.stripZeros)(t.s))}return(0,o.hexConcat)(["0x01",h.encode(r)])}function x(t,e){if(null==t.type||0===t.type)return null!=t.accessList&&f.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),function(t,e){(0,u.checkProperties)(t,m);const r=[];y.forEach((function(e){let n=t[e.name]||[];const i={};e.numeric&&(i.hexPad="left"),n=(0,o.arrayify)((0,o.hexlify)(n,i)),e.length&&n.length!==e.length&&n.length>0&&f.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),e.maxLength&&(n=(0,o.stripZeros)(n),n.length>e.maxLength&&f.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n)),r.push((0,o.hexlify)(n))}));let n=0;if(null!=t.chainId?(n=t.chainId,"number"!==typeof n&&f.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!(0,o.isBytesLike)(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),0!==n&&(r.push((0,o.hexlify)(n)),r.push("0x"),r.push("0x")),!e)return h.encode(r);const i=(0,o.splitSignature)(e);let s=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),s+=2*n+8,i.v>28&&i.v!==s&&f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push((0,o.hexlify)(s)),r.push((0,o.stripZeros)((0,o.arrayify)(i.r))),r.push((0,o.stripZeros)((0,o.arrayify)(i.s))),h.encode(r)}(t,e);switch(t.type){case 1:return B(t,e);case 2:return S(t,e)}return f.throwError(`unsupported transaction type: ${t.type}`,l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function C(t,e,r){try{const r=g(e[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");t.v=r}catch(n){f.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=(0,o.hexZeroPad)(e[1],32),t.s=(0,o.hexZeroPad)(e[2],32);try{const e=(0,a.keccak256)(r(t));t.from=b(e,{r:t.r,s:t.s,recoveryParam:t.v})}catch(n){}}function M(t){const e=(0,o.arrayify)(t);if(e[0]>127)return function(t){const e=h.decode(t);9!==e.length&&6!==e.length&&f.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:g(e[0]).toNumber(),gasPrice:g(e[1]),gasLimit:g(e[2]),to:p(e[3]),value:g(e[4]),data:e[5],chainId:0};if(6===e.length)return r;try{r.v=i.O$.from(e[6]).toNumber()}catch(n){return r}if(r.r=(0,o.hexZeroPad)(e[7],32),r.s=(0,o.hexZeroPad)(e[8],32),i.O$.from(r.r).isZero()&&i.O$.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let i=r.v-27;const s=e.slice(0,6);0!==r.chainId&&(s.push((0,o.hexlify)(r.chainId)),s.push("0x"),s.push("0x"),i-=2*r.chainId+8);const u=(0,a.keccak256)(h.encode(s));try{r.from=b(u,{r:(0,o.hexlify)(r.r),s:(0,o.hexlify)(r.s),recoveryParam:i})}catch(n){}r.hash=(0,a.keccak256)(t)}return r.type=null,r}(e);switch(e[0]){case 1:return function(t){const e=h.decode(t.slice(1));8!==e.length&&11!==e.length&&f.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.hexlify)(t));const r={type:1,chainId:g(e[0]).toNumber(),nonce:g(e[1]).toNumber(),gasPrice:g(e[2]),gasLimit:g(e[3]),to:p(e[4]),value:g(e[5]),data:e[6],accessList:A(e[7])};return 8===e.length||(r.hash=(0,a.keccak256)(t),C(r,e.slice(8),B)),r}(e);case 2:return function(t){const e=h.decode(t.slice(1));9!==e.length&&12!==e.length&&f.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.hexlify)(t));const r=g(e[2]),n=g(e[3]),i={type:2,chainId:g(e[0]).toNumber(),nonce:g(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:g(e[4]),to:p(e[5]),value:g(e[6]),data:e[7],accessList:A(e[8])};return 9===e.length||(i.hash=(0,a.keccak256)(t),C(i,e.slice(9),S)),i}(e)}return f.throwError(`unsupported transaction type: ${e[0]}`,l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}},35553:function(t,e,r){"use strict";r.r(e),r.d(e,{commify:function(){return A},formatEther:function(){return B},formatUnits:function(){return k},parseEther:function(){return x},parseUnits:function(){return S}});var n=r(16441),i=r(1581),o=r(48794),s=r(2593);const a=new i.Logger(o.i),u={},h=s.O$.from(0),c=s.O$.from(-1);function l(t,e,r,n){const o={fault:e,operation:r};return void 0!==n&&(o.value=n),a.throwError(t,i.Logger.errors.NUMERIC_FAULT,o)}let f="0";for(;f.length<256;)f+=f;function d(t){if("number"!==typeof t)try{t=s.O$.from(t).toNumber()}catch(e){}return"number"===typeof t&&t>=0&&t<=256&&!(t%1)?"1"+f.substring(0,t):a.throwArgumentError("invalid decimal size","decimals",t)}function p(t,e){null==e&&(e=0);const r=d(e),n=(t=s.O$.from(t)).lt(h);n&&(t=t.mul(c));let i=t.mod(r).toString();for(;i.length2&&a.throwArgumentError("too many decimal points","value",t);let o=i[0],u=i[1];for(o||(o="0"),u||(u="0");"0"===u[u.length-1];)u=u.substring(0,u.length-1);for(u.length>r.length-1&&l("fractional component exceeds decimals","underflow","parseFixed"),""===u&&(u="0");u.lengthnull==t[e]?n:(typeof t[e]!==r&&a.throwArgumentError("invalid fixed format ("+e+" not "+r+")","format."+e,t[e]),t[e]);e=i("signed","boolean",e),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&a.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&a.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new y(u,e,r,n)}}class m{constructor(t,e,r,n){t!==u&&a.throwError("cannot use FixedNumber constructor; use FixedNumber.from",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=e,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(t){this.format.name!==t.format.name&&a.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",t)}addUnsafe(t){this._checkFormat(t);const e=g(this._value,this.format.decimals),r=g(t._value,t.format.decimals);return m.fromValue(e.add(r),this.format.decimals,this.format)}subUnsafe(t){this._checkFormat(t);const e=g(this._value,this.format.decimals),r=g(t._value,t.format.decimals);return m.fromValue(e.sub(r),this.format.decimals,this.format)}mulUnsafe(t){this._checkFormat(t);const e=g(this._value,this.format.decimals),r=g(t._value,t.format.decimals);return m.fromValue(e.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(t){this._checkFormat(t);const e=g(this._value,this.format.decimals),r=g(t._value,t.format.decimals);return m.fromValue(e.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const t=this.toString().split(".");1===t.length&&t.push("0");let e=m.from(t[0],this.format);const r=!t[1].match(/^(0*)$/);return this.isNegative()&&r&&(e=e.subUnsafe(v.toFormat(e.format))),e}ceiling(){const t=this.toString().split(".");1===t.length&&t.push("0");let e=m.from(t[0],this.format);const r=!t[1].match(/^(0*)$/);return!this.isNegative()&&r&&(e=e.addUnsafe(v.toFormat(e.format))),e}round(t){null==t&&(t=0);const e=this.toString().split(".");if(1===e.length&&e.push("0"),(t<0||t>80||t%1)&&a.throwArgumentError("invalid decimal count","decimals",t),e[1].length<=t)return this;const r=m.from("1"+f.substring(0,t),this.format),n=b.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(t){if(null==t)return this._hex;t%8&&a.throwArgumentError("invalid byte width","width",t);const e=s.O$.from(this._hex).fromTwos(this.format.width).toTwos(t).toHexString();return(0,n.hexZeroPad)(e,t/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(t){return m.fromString(this._value,t)}static fromValue(t,e,r){return null!=r||null==e||(0,s.Zm)(e)||(r=e,e=null),null==e&&(e=0),null==r&&(r="fixed"),m.fromString(p(t,e),y.from(r))}static fromString(t,e){null==e&&(e="fixed");const r=y.from(e),i=g(t,r.decimals);!r.signed&&i.lt(h)&&l("unsigned value cannot be negative","overflow","value",t);let o=null;r.signed?o=i.toTwos(r.width).toHexString():(o=i.toHexString(),o=(0,n.hexZeroPad)(o,r.width/8));const s=p(i,r.decimals);return new m(u,o,s,r)}static fromBytes(t,e){null==e&&(e="fixed");const r=y.from(e);if((0,n.arrayify)(t).length>r.width/8)throw new Error("overflow");let i=s.O$.from(t);r.signed&&(i=i.fromTwos(r.width));const o=i.toTwos((r.signed?0:1)+r.width).toHexString(),a=p(i,r.decimals);return new m(u,o,a,r)}static from(t,e){if("string"===typeof t)return m.fromString(t,e);if((0,n.isBytes)(t))return m.fromBytes(t,e);try{return m.fromValue(t,0,e)}catch(r){if(r.code!==i.Logger.errors.INVALID_ARGUMENT)throw r}return a.throwArgumentError("invalid FixedNumber value","value",t)}static isFixedNumber(t){return!(!t||!t._isFixedNumber)}}const v=m.from(1),b=m.from("0.5"),w=new i.Logger("units/5.7.0"),E=["wei","kwei","mwei","gwei","szabo","finney","ether"];function A(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||"."===t||"-."===t)&&w.throwArgumentError("invalid value","value",t);let r=e[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let i="";for(2===e.length&&(i="."+(e[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);const o=[];for(;r.length;){if(r.length<=3){o.unshift(r);break}{const t=r.length-3;o.unshift(r.substring(t)),r=r.substring(0,t)}}return n+o.join(",")+i}function k(t,e){if("string"===typeof e){const t=E.indexOf(e);-1!==t&&(e=3*t)}return p(t,null!=e?e:18)}function S(t,e){if("string"!==typeof t&&w.throwArgumentError("value must be a string","value",t),"string"===typeof e){const t=E.indexOf(e);-1!==t&&(e=3*t)}return g(t,null!=e?e:18)}function B(t){return k(t,18)}function x(t){return S(t,18)}},79911:function(t,e,r){"use strict";r.r(e),r.d(e,{Wallet:function(){return w},verifyMessage:function(){return E},verifyTypedData:function(){return A}});var n=r(19485),i=r(81556),o=r(48088),s=r(16441),a=r(93684),u=r(67827),h=r(86507),c=r(38197),l=r(6881),f=r(5634),d=r(67669),p=r(45659),g=r(81964),y=r(83875),m=r(1581);var v=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const b=new m.Logger("wallet/5.7.0");class w extends o.E{constructor(t,e){if(super(),null!=(r=t)&&(0,s.isHexString)(r.privateKey,32)&&null!=r.address){const e=new d.SigningKey(t.privateKey);if((0,l.defineReadOnly)(this,"_signingKey",(()=>e)),(0,l.defineReadOnly)(this,"address",(0,y.computeAddress)(this.publicKey)),this.address!==(0,n.getAddress)(t.address)&&b.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(t){const e=t.mnemonic;return e&&e.phrase}(t)){const e=t.mnemonic;(0,l.defineReadOnly)(this,"_mnemonic",(()=>({phrase:e.phrase,path:e.path||h.defaultPath,locale:e.locale||"en"})));const r=this.mnemonic,n=h.HDNode.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);(0,y.computeAddress)(n.privateKey)!==this.address&&b.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,l.defineReadOnly)(this,"_mnemonic",(()=>null))}else{if(d.SigningKey.isSigningKey(t))"secp256k1"!==t.curve&&b.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,l.defineReadOnly)(this,"_signingKey",(()=>t));else{"string"===typeof t&&t.match(/^[0-9a-f]*$/i)&&64===t.length&&(t="0x"+t);const e=new d.SigningKey(t);(0,l.defineReadOnly)(this,"_signingKey",(()=>e))}(0,l.defineReadOnly)(this,"_mnemonic",(()=>null)),(0,l.defineReadOnly)(this,"address",(0,y.computeAddress)(this.publicKey))}var r;e&&!i.zt.isProvider(e)&&b.throwArgumentError("invalid provider","provider",e),(0,l.defineReadOnly)(this,"provider",e||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(t){return new w(this,t)}signTransaction(t){return(0,l.resolveProperties)(t).then((e=>{null!=e.from&&((0,n.getAddress)(e.from)!==this.address&&b.throwArgumentError("transaction from address mismatch","transaction.from",t.from),delete e.from);const r=this._signingKey().signDigest((0,c.keccak256)((0,y.serialize)(e)));return(0,y.serialize)(e,r)}))}signMessage(t){return v(this,void 0,void 0,(function*(){return(0,s.joinSignature)(this._signingKey().signDigest((0,a.r)(t)))}))}_signTypedData(t,e,r){return v(this,void 0,void 0,(function*(){const n=yield u.E.resolveNames(t,e,r,(t=>(null==this.provider&&b.throwError("cannot resolve ENS names without a provider",m.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:t}),this.provider.resolveName(t))));return(0,s.joinSignature)(this._signingKey().signDigest(u.E.hash(n.domain,e,n.value)))}))}encrypt(t,e,r){if("function"!==typeof e||r||(r=e,e={}),r&&"function"!==typeof r)throw new Error("invalid callback");return e||(e={}),(0,g.HI)(this,t,e,r)}static createRandom(t){let e=(0,f.O)(16);t||(t={}),t.extraEntropy&&(e=(0,s.arrayify)((0,s.hexDataSlice)((0,c.keccak256)((0,s.concat)([e,t.extraEntropy])),0,16)));const r=(0,h.entropyToMnemonic)(e,t.locale);return w.fromMnemonic(r,t.path,t.locale)}static fromEncryptedJson(t,e,r){return(0,p.decryptJsonWallet)(t,e,r).then((t=>new w(t)))}static fromEncryptedJsonSync(t,e){return new w((0,p.decryptJsonWalletSync)(t,e))}static fromMnemonic(t,e,r){return e||(e=h.defaultPath),new w(h.HDNode.fromMnemonic(t,null,r).derivePath(e))}}function E(t,e){return(0,y.recoverAddress)((0,a.r)(t),e)}function A(t,e,r,n){return(0,y.recoverAddress)(u.E.hash(t,e,r),n)}},37707:function(t,e,r){"use strict";r.r(e),r.d(e,{_fetchData:function(){return p},fetchJson:function(){return g},poll:function(){return y}});var n=r(59567),i=r(16441),o=r(6881),s=r(84917),a=r(1581);var u=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};function h(t,e){return u(this,void 0,void 0,(function*(){null==e&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(!0!==e.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=e.fetchOptions){const t=e.fetchOptions;t.mode&&(r.mode=t.mode),t.cache&&(r.cache=t.cache),t.credentials&&(r.credentials=t.credentials),t.redirect&&(r.redirect=t.redirect),t.referrer&&(r.referrer=t.referrer)}const n=yield fetch(t,r),o=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach(((t,e)=>{s[e.toLowerCase()]=t})):n.headers.keys().forEach((t=>{s[t.toLowerCase()]=n.headers.get(t)})),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:(0,i.arrayify)(new Uint8Array(o))}}))}var c=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const l=new a.Logger("web/5.7.1");function f(t){return new Promise((e=>{setTimeout(e,t)}))}function d(t,e){if(null==t)return null;if("string"===typeof t)return t;if((0,i.isBytesLike)(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return(0,s.ZN)(t)}catch(r){}return(0,i.hexlify)(t)}return t}function p(t,e,r){const i="object"===typeof t&&null!=t.throttleLimit?t.throttleLimit:12;l.assertArgument(i>0&&i%1===0,"invalid connection throttle limit","connection.throttleLimit",i);const u="object"===typeof t?t.throttleCallback:null,p="object"===typeof t&&"number"===typeof t.throttleSlotInterval?t.throttleSlotInterval:100;l.assertArgument(p>0&&p%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",p);const g="object"===typeof t&&!!t.errorPassThrough,y={};let m=null;const v={method:"GET"};let b=!1,w=12e4;if("string"===typeof t)m=t;else if("object"===typeof t){if(null!=t&&null!=t.url||l.throwArgumentError("missing URL","connection.url",t),m=t.url,"number"===typeof t.timeout&&t.timeout>0&&(w=t.timeout),t.headers)for(const e in t.headers)y[e.toLowerCase()]={key:e,value:String(t.headers[e])},["if-none-match","if-modified-since"].indexOf(e.toLowerCase())>=0&&(b=!0);if(v.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==m.substring(0,6)&&!0!==t.allowInsecureAuthentication&&l.throwError("basic authentication requires a secure https url",a.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:m,user:t.user,password:"[REDACTED]"});const e=t.user+":"+t.password;y.authorization={key:"Authorization",value:"Basic "+(0,n.c)((0,s.Y0)(e))}}null!=t.skipFetchSetup&&(v.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(v.fetchOptions=(0,o.shallowCopy)(t.fetchOptions))}const E=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),A=m?m.match(E):null;if(A)try{const t={statusCode:200,statusMessage:"OK",headers:{"content-type":A[1]||"text/plain"},body:A[2]?(0,n.J)(A[3]):(k=A[3],(0,s.Y0)(k.replace(/%([0-9a-f][0-9a-f])/gi,((t,e)=>String.fromCharCode(parseInt(e,16))))))};let e=t.body;return r&&(e=r(t.body,t)),Promise.resolve(e)}catch(C){l.throwError("processing response error",a.Logger.errors.SERVER_ERROR,{body:d(A[1],A[2]),error:C,requestBody:null,requestMethod:"GET",url:m})}var k;e&&(v.method="POST",v.body=e,null==y["content-type"]&&(y["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==y["content-length"]&&(y["content-length"]={key:"Content-Length",value:String(e.length)}));const S={};Object.keys(y).forEach((t=>{const e=y[t];S[e.key]=e.value})),v.headers=S;const B=function(){let t=null;return{promise:new Promise((function(e,r){w&&(t=setTimeout((()=>{null!=t&&(t=null,r(l.makeError("timeout",a.Logger.errors.TIMEOUT,{requestBody:d(v.body,S["content-type"]),requestMethod:v.method,timeout:w,url:m})))}),w))})),cancel:function(){null!=t&&(clearTimeout(t),t=null)}}}(),x=function(){return c(this,void 0,void 0,(function*(){for(let t=0;t=300)&&(B.cancel(),l.throwError("bad response",a.Logger.errors.SERVER_ERROR,{status:e.statusCode,headers:e.headers,body:d(n,e.headers?e.headers["content-type"]:null),requestBody:d(v.body,S["content-type"]),requestMethod:v.method,url:m})),r)try{const t=yield r(n,e);return B.cancel(),t}catch(C){if(C.throttleRetry&&t"content-type"===t.toLowerCase())).length||(r.headers=(0,o.shallowCopy)(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};t=r}return p(t,n,((t,e)=>{let n=null;if(null!=t)try{n=JSON.parse((0,s.ZN)(t))}catch(i){l.throwError("invalid JSON",a.Logger.errors.SERVER_ERROR,{body:t,error:i})}return r&&(n=r(n,e)),n}))}function y(t,e){return e||(e={}),null==(e=(0,o.shallowCopy)(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){let i=null,o=!1;const s=()=>!o&&(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout((()=>{s()&&n(new Error("timeout"))}),e.timeout));const a=e.retryLimit;let u=0;!function i(){return t().then((function(t){if(void 0!==t)s()&&r(t);else if(e.oncePoll)e.oncePoll.once("poll",i);else if(e.onceBlock)e.onceBlock.once("block",i);else if(!o){if(u++,u>a)return void(s()&&n(new Error("retry limit reached")));let t=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));te.ceiling&&(t=e.ceiling),setTimeout(i,t)}return null}),(function(t){s()&&n(t)}))}()}))}},28820:function(t){"use strict";t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r>>0,h=new Uint8Array(o);t[r];){var c=e[t.charCodeAt(r)];if(255===c)return;for(var l=0,f=o-1;(0!==c||l>>0,h[f]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");i=l,r++}if(" "!==t[r]){for(var d=o-i;d!==o&&0===h[d];)d++;for(var p=new Uint8Array(n+(o-d)),g=n;d!==o;)p[g++]=h[d++];return p}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var u=(o-i)*h+1>>>0,c=new Uint8Array(u);i!==o;){for(var l=e[i],f=0,d=u-1;(0!==l||f>>0,c[d]=l%s>>>0,l=l/s>>>0;if(0!==l)throw new Error("Non-zero carry");n=f,i++}for(var p=u-n;p!==u&&0===c[p];)p++;for(var g=a.repeat(r);pn===i?t:(r[o]=t,N(t*n,e))),o),e);return t.reduceRight(((t,n,o)=>n===i?t:(r[o]=N(t*r[o],e),N(t*n,e))),n),r}(t.map((t=>t.z)));return t.map(((t,r)=>t.toAffine(e[r])))}static normalizeZ(t){return this.toAffineBatch(t).map(this.fromAffine)}equals(t){v(t);const{x:e,y:r,z:n}=this,{x:i,y:o,z:s}=t,a=N(e*s),u=N(i*n),h=N(r*s),c=N(o*n);return a===u&&h===c}negate(){return new y(N(-this.x),this.y,this.z,N(-this.t))}double(){const{x:t,y:e,z:r}=this,{a:n}=h,i=N(t*t),o=N(e*e),a=N(s*N(r*r)),u=N(n*i),c=t+e,l=N(N(c*c)-i-o),f=u+o,d=f-a,p=u-o,g=N(l*d),m=N(f*p),v=N(l*p),b=N(d*f);return new y(g,m,b,v)}add(t){v(t);const{x:e,y:r,z:n,t:o}=this,{x:a,y:u,z:h,t:c}=t,l=N((r-e)*(u+a)),f=N((r+e)*(u-a)),d=N(f-l);if(d===i)return this.double();const p=N(n*s*c),g=N(o*s*h),m=g+p,b=f+l,w=g-p,E=N(m*d),A=N(b*w),k=N(m*w),S=N(d*b);return new y(E,A,S,k)}subtract(t){return this.add(t.negate())}precomputeWindow(t){const e=1+256/t,r=[];let n=this,i=n;for(let o=0;o>=l,r>u&&(r-=c,t+=o);const a=e,d=e+Math.abs(r)-1,p=f%2!==0,g=r<0;0===r?s=s.add(m(p,n[a])):i=i.add(m(g,n[d]))}return y.normalizeZ([i,s])[0]}multiply(t,e){return this.wNAF(H(t,h.l),e)}multiplyUnsafe(t){let e=H(t,h.l,!1);const r=y.BASE,n=y.ZERO;if(e===i)return n;if(this.equals(n)||e===o)return this;if(this.equals(r))return this.wNAF(e);let s=n,a=this;for(;e>i;)e&o&&(s=s.add(a)),a=a.double(),e>>=o;return s}isSmallOrder(){return this.multiplyUnsafe(h.h).equals(y.ZERO)}isTorsionFree(){let t=this.multiplyUnsafe(h.l/s).double();return h.l%s&&(t=t.add(this)),t.equals(y.ZERO)}toAffine(t){const{x:e,y:r,z:n}=this,i=this.equals(y.ZERO);null==t&&(t=i?a:U(n));const s=N(e*t),u=N(r*t),h=N(n*t);if(i)return k.ZERO;if(h!==o)throw new Error("invZ was invalid");return new k(s,u)}fromRistrettoBytes(){w()}toRistrettoBytes(){w()}fromRistrettoHash(){w()}}function m(t,e){const r=e.negate();return t?r:e}function v(t){if(!(t instanceof y))throw new TypeError("ExtendedPoint expected")}function b(t){if(!(t instanceof E))throw new TypeError("RistrettoPoint expected")}function w(){throw new Error("Legacy method: switch to RistrettoPoint")}e.ExtendedPoint=y,y.BASE=new y(h.Gx,h.Gy,o,N(h.Gx*h.Gy)),y.ZERO=new y(i,o,o,i);class E{constructor(t){this.ep=t}static calcElligatorRistrettoMap(t){const{d:e}=h,r=N(l*t*t),n=N((r+o)*p);let i=BigInt(-1);const s=N((i-e*r)*N(r+e));let{isValid:a,value:u}=F(n,s),c=N(u*t);O(c)||(c=N(-c)),a||(u=c),a||(i=r);const d=N(i*(r-o)*g-s),m=u*u,v=N((u+u)*s),b=N(d*f),w=N(o-m),E=N(o+m);return new y(N(v*E),N(w*b),N(b*E),N(v*w))}static hashToCurve(t){const e=P((t=z(t,64)).slice(0,32)),r=this.calcElligatorRistrettoMap(e),n=P(t.slice(32,64)),i=this.calcElligatorRistrettoMap(n);return new E(r.add(i))}static fromHex(t){t=z(t,32);const{a:e,d:r}=h,n="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",s=P(t);if(!function(t,e){if(t.length!==e.length)return!1;for(let r=0;r=n)throw new Error("Expected 0 < hex < P");if(!e&&s>=c)throw new Error("Expected 0 < hex < 2**256");const a=N(s*s),u=N(a-o),l=N(r*a+o);let{isValid:f,value:d}=F(u,l);if(!f)throw new Error("Point.fromHex: invalid y coordinate");const p=(d&o)===o;return 0!==(128&t[31])!==p&&(d=N(-d)),new k(d,s)}static async fromPrivateKey(t){return(await J(t)).point}toRawBytes(){const t=T(this.y);return t[31]|=this.x&o?128:0,t}toHex(){return C(this.toRawBytes())}toX25519(){const{y:t}=this;return T(N((o+t)*U(o-t)))}isTorsionFree(){return y.fromAffine(this).isTorsionFree()}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new k(N(-this.x),this.y)}add(t){return y.fromAffine(this).add(y.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return y.fromAffine(this).multiply(t,this).toAffine()}}e.Point=k,k.BASE=new k(h.Gx,h.Gy),k.ZERO=new k(i,o);class S{constructor(t,e){this.r=t,this.s=e,this.assertValidity()}static fromHex(t){const e=z(t,64),r=k.fromHex(e.slice(0,32),!1),n=R(e.slice(32,64));return new S(r,n)}assertValidity(){const{r:t,s:e}=this;if(!(t instanceof k))throw new Error("Expected Point instance");return H(e,h.l,!1),this}toRawBytes(){const t=new Uint8Array(64);return t.set(this.r.toRawBytes()),t.set(T(this.s),32),t}toHex(){return C(this.toRawBytes())}}function B(...t){if(!t.every((t=>t instanceof Uint8Array)))throw new Error("Expected Uint8Array list");if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);for(let n=0,i=0;ne.toString(16).padStart(2,"0")));function C(t){if(!(t instanceof Uint8Array))throw new Error("Uint8Array expected");let e="";for(let r=0;r=i?r:e+r}function U(t,e=h.P){if(t===i||e<=i)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=N(t,e),n=e,s=i,a=o,u=o,c=i;for(;r!==i;){const t=n/r,e=n%r,i=s-u*t,o=a-c*t;n=r,r=e,s=u,a=c,u=i,c=o}if(n!==o)throw new Error("invert: does not exist");return N(s,e)}function L(t,e){const{P:r}=h;let n=t;for(;e-- >i;)n*=n,n%=r;return n}function D(t){const{P:e}=h,r=BigInt(5),n=BigInt(10),i=BigInt(20),a=BigInt(40),u=BigInt(80),c=t*t%e*t%e,l=L(c,s)*c%e,f=L(l,o)*t%e,d=L(f,r)*f%e,p=L(d,n)*d%e,g=L(p,i)*p%e,y=L(g,a)*g%e,m=L(y,u)*y%e,v=L(m,u)*y%e,b=L(v,n)*d%e;return{pow_p_5_8:L(b,s)*t%e,b2:c}}function F(t,e){const r=N(e*e*e),n=N(r*r*e);let i=N(t*r*D(t*n).pow_p_5_8);const o=N(e*i*i),s=i,a=N(i*l),u=o===t,h=o===N(-t),c=o===N(-t*l);return u&&(i=s),(h||c)&&(i=a),O(i)&&(i=N(-i)),{isValid:u||h,value:i}}function j(t){return F(o,t)}function K(t){return N(R(t),h.l)}function z(t,e){const r=t instanceof Uint8Array?Uint8Array.from(t):M(t);if("number"===typeof e&&r.length!==e)throw new Error(`Expected ${e} bytes`);return r}function H(t,e,r=!0){if(!e)throw new TypeError("Specify max value");if("number"===typeof t&&Number.isSafeInteger(t)&&(t=BigInt(t)),"bigint"===typeof t&&t=i;h--){const t=s>>h&o;g^=t,c=$(g,l,d),l=c[0],d=c[1],c=$(g,f,p),f=c[0],p=c[1],g=t;const e=l+f,r=N(e*e),n=l-f,i=N(n*n),y=r-i,m=d+p,v=N((d-p)*e),b=N(m*n),w=v+b,E=v-b;d=N(w*w),p=N(u*N(E*E)),l=N(r*i),f=N(y*(r+N(a*y)))}c=$(g,l,d),l=c[0],d=c[1],c=$(g,f,p),f=c[0],p=c[1];const{pow_p_5_8:y,b2:m}=D(f),v=N(L(y,BigInt(3))*m);return N(l*v)}(function(t){const e=z(t,32);return e[31]&=127,R(e)}(e),function(t){return R(q(z(t,32)))}(t));if(r===i)throw new Error("Invalid private or public key received");return function(t){return T(N(t,h.P))}(r)},scalarMultBase:t=>e.curve25519.scalarMult(t,e.curve25519.BASE_POINT_U)};const tt={node:n,web:"object"===typeof self&&"crypto"in self?self.crypto:void 0};e.utils={bytesToHex:C,hexToBytes:M,concatBytes:B,getExtendedPublicKey:J,mod:N,invert:U,TORSION_SUBGROUP:["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"],hashToPrivateScalar:t=>{if((t=z(t)).length<40||t.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return N(R(t),h.l-o)+o},randomBytes:(t=32)=>{if(tt.web)return tt.web.getRandomValues(new Uint8Array(t));if(tt.node){const{randomBytes:e}=tt.node;return new Uint8Array(e(t).buffer)}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.randomBytes(32),sha512:async(...t)=>{const e=B(...t);if(tt.web){const t=await tt.web.subtle.digest("SHA-512",e.buffer);return new Uint8Array(t)}if(tt.node)return Uint8Array.from(tt.node.createHash("sha512").update(e).digest());throw new Error("The environment doesn't have sha512 function")},precompute(t=8,e=k.BASE){const r=e.equals(k.BASE)?e:new k(e.x,e.y);return r._setWindowSize(t),r.multiply(s),r},sha512Sync:void 0},Object.defineProperties(e.utils,{sha512Sync:{configurable:!1,get:()=>W,set(t){W||(W=t)}}})},79656:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const n=r(69159),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),u=BigInt(8),h=Object.freeze({a:i,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:o,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=h;const c=(t,e)=>(t+e/s)/e,l={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(t){const{n:e}=h,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-o*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),u=c(s*t,e),l=c(-n*t,e);let f=L(t-u*r-l*i,e),d=L(-u*n-l*s,e);const p=f>a,g=d>a;if(p&&(f=e-f),g&&(d=e-d),f>a||d>a)throw new Error("splitScalarEndo: Endomorphism failed, k="+t);return{k1neg:p,k1:f,k2neg:g,k2:d}}},f=32,d=32;function p(t){const{a:e,b:r}=h,n=L(t*t),i=L(n*t);return L(i+e*t+r)}const g=h.a===i;class y extends Error{constructor(t){super(t)}}function m(t){if(!(t instanceof v))throw new TypeError("JacobianPoint expected")}class v{constructor(t,e,r){this.x=t,this.y=e,this.z=r}static fromAffine(t){if(!(t instanceof E))throw new TypeError("JacobianPoint#fromAffine: expected Point");return t.equals(E.ZERO)?v.ZERO:new v(t.x,t.y,o)}static toAffineBatch(t){const e=function(t,e=h.P){const r=new Array(t.length),n=F(t.reduce(((t,n,o)=>n===i?t:(r[o]=t,L(t*n,e))),o),e);return t.reduceRight(((t,n,o)=>n===i?t:(r[o]=L(t*r[o],e),L(t*n,e))),n),r}(t.map((t=>t.z)));return t.map(((t,r)=>t.toAffine(e[r])))}static normalizeZ(t){return v.toAffineBatch(t).map(v.fromAffine)}equals(t){m(t);const{x:e,y:r,z:n}=this,{x:i,y:o,z:s}=t,a=L(n*n),u=L(s*s),h=L(e*u),c=L(i*a),l=L(L(r*s)*u),f=L(L(o*n)*a);return h===c&&l===f}negate(){return new v(this.x,L(-this.y),this.z)}double(){const{x:t,y:e,z:r}=this,n=L(t*t),i=L(e*e),o=L(i*i),h=t+i,c=L(s*(L(h*h)-n-o)),l=L(a*n),f=L(l*l),d=L(f-s*c),p=L(l*(c-d)-u*o),g=L(s*e*r);return new v(d,p,g)}add(t){m(t);const{x:e,y:r,z:n}=this,{x:o,y:a,z:u}=t;if(o===i||a===i)return this;if(e===i||r===i)return t;const h=L(n*n),c=L(u*u),l=L(e*c),f=L(o*h),d=L(L(r*u)*c),p=L(L(a*n)*h),g=L(f-l),y=L(p-d);if(g===i)return y===i?this.double():v.ZERO;const b=L(g*g),w=L(g*b),E=L(l*b),A=L(y*y-w-s*E),k=L(y*(E-A)-d*w),S=L(n*u*g);return new v(A,k,S)}subtract(t){return this.add(t.negate())}multiplyUnsafe(t){const e=v.ZERO;if("bigint"===typeof t&&t===i)return e;let r=U(t);if(r===o)return this;if(!g){let t=e,n=this;for(;r>i;)r&o&&(t=t.add(n)),n=n.double(),r>>=o;return t}let{k1neg:n,k1:s,k2neg:a,k2:u}=l.splitScalar(r),h=e,c=e,f=this;for(;s>i||u>i;)s&o&&(h=h.add(f)),u&o&&(c=c.add(f)),f=f.double(),s>>=o,u>>=o;return n&&(h=h.negate()),a&&(c=c.negate()),c=new v(L(c.x*l.beta),c.y,c.z),h.add(c)}precomputeWindow(t){const e=g?128/t+1:256/t+1,r=[];let n=this,i=n;for(let o=0;o>=l,r>u&&(r-=c,t+=o);const a=e,d=e+Math.abs(r)-1,p=f%2!==0,g=r<0;0===r?s=s.add(b(p,n[a])):i=i.add(b(g,n[d]))}return{p:i,f:s}}multiply(t,e){let r,n,i=U(t);if(g){const{k1neg:t,k1:o,k2neg:s,k2:a}=l.splitScalar(i);let{p:u,f:h}=this.wNAF(o,e),{p:c,f:f}=this.wNAF(a,e);u=b(t,u),c=b(s,c),c=new v(L(c.x*l.beta),c.y,c.z),r=u.add(c),n=h.add(f)}else{const{p:t,f:o}=this.wNAF(i,e);r=t,n=o}return v.normalizeZ([r,n])[0]}toAffine(t){const{x:e,y:r,z:n}=this,i=this.equals(v.ZERO);null==t&&(t=i?u:F(n));const s=t,a=L(s*s),h=L(a*s),c=L(e*a),l=L(r*h),f=L(n*s);if(i)return E.ZERO;if(f!==o)throw new Error("invZ was invalid");return new E(c,l)}}function b(t,e){const r=e.negate();return t?r:e}v.BASE=new v(h.Gx,h.Gy,o),v.ZERO=new v(i,o,i);const w=new WeakMap;class E{constructor(t,e){this.x=t,this.y=e}_setWindowSize(t){this._WINDOW_SIZE=t,w.delete(this)}hasEvenY(){return this.y%s===i}static fromCompressedHex(t){const e=32===t.length,r=P(e?t:t.subarray(1));if(!V(r))throw new Error("Point is not on curve");let n=function(t){const{P:e}=h,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),u=BigInt(44),c=BigInt(88),l=t*t*t%e,f=l*l*t%e,d=D(f,a)*f%e,p=D(d,a)*f%e,g=D(p,s)*l%e,y=D(g,n)*g%e,m=D(y,i)*y%e,v=D(m,u)*m%e,b=D(v,c)*v%e,w=D(b,u)*m%e,E=D(w,a)*f%e,A=D(E,o)*y%e,k=D(A,r)*l%e,S=D(k,s);if(S*S%e!==t)throw new Error("Cannot find square root");return S}(p(r));const i=(n&o)===o;if(e)i&&(n=L(-n));else{1===(1&t[0])!==i&&(n=L(-n))}const u=new E(r,n);return u.assertValidity(),u}static fromUncompressedHex(t){const e=P(t.subarray(1,33)),r=P(t.subarray(33,65)),n=new E(e,r);return n.assertValidity(),n}static fromHex(t){const e=N(t),r=e.length,n=e[0];if(r===f)return this.fromCompressedHex(e);if(33===r&&(2===n||3===n))return this.fromCompressedHex(e);if(65===r&&4===n)return this.fromUncompressedHex(e);throw new Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${r}`)}static fromPrivateKey(t){return E.BASE.multiply(W(t))}static fromSignature(t,e,r){const{r:n,s:i}=J(e);if(![0,1,2,3].includes(r))throw new Error("Cannot recover: invalid recovery bit");const o=j(N(t)),{n:s}=h,a=2===r||3===r?n+s:n,u=F(a,s),c=L(-o*u,s),l=L(i*u,s),f=1&r?"03":"02",d=E.fromHex(f+I(a)),p=E.BASE.multiplyAndAddUnsafe(d,c,l);if(!p)throw new Error("Cannot recover signature: point at infinify");return p.assertValidity(),p}toRawBytes(t=!1){return _(this.toHex(t))}toHex(t=!1){const e=I(this.x);if(t){return`${this.hasEvenY()?"02":"03"}${e}`}return`04${e}${I(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const t="Point is not on elliptic curve",{x:e,y:r}=this;if(!V(e)||!V(r))throw new Error(t);const n=L(r*r);if(L(n-p(e))!==i)throw new Error(t)}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new E(this.x,L(-this.y))}double(){return v.fromAffine(this).double().toAffine()}add(t){return v.fromAffine(this).add(v.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return v.fromAffine(this).multiply(t,this).toAffine()}multiplyAndAddUnsafe(t,e,r){const n=v.fromAffine(this),s=e===i||e===o||this!==E.BASE?n.multiplyUnsafe(e):n.multiply(e),a=v.fromAffine(t).multiplyUnsafe(r),u=s.add(a);return u.equals(v.ZERO)?void 0:u.toAffine()}}function A(t){return Number.parseInt(t[0],16)>=8?"00"+t:t}function k(t){if(t.length<2||2!==t[0])throw new Error(`Invalid signature integer tag: ${C(t)}`);const e=t[1],r=t.subarray(2,e+2);if(!e||r.length!==e)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:t.subarray(e+2)}}e.Point=E,E.BASE=new E(h.Gx,h.Gy),E.ZERO=new E(i,i);class S{constructor(t,e){this.r=t,this.s=e,this.assertValidity()}static fromCompact(t){const e=t instanceof Uint8Array,r="Signature.fromCompact";if("string"!==typeof t&&!e)throw new TypeError(`${r}: Expected string or Uint8Array`);const n=e?C(t):t;if(128!==n.length)throw new Error(`${r}: Expected 64-byte hex`);return new S(R(n.slice(0,64)),R(n.slice(64,128)))}static fromDER(t){const e=t instanceof Uint8Array;if("string"!==typeof t&&!e)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:r,s:n}=function(t){if(t.length<2||48!=t[0])throw new Error(`Invalid signature tag: ${C(t)}`);if(t[1]!==t.length-2)throw new Error("Invalid signature: incorrect length");const{data:e,left:r}=k(t.subarray(2)),{data:n,left:i}=k(r);if(i.length)throw new Error(`Invalid signature: left bytes after parsing: ${C(i)}`);return{r:e,s:n}}(e?t:_(t));return new S(r,n)}static fromHex(t){return this.fromDER(t)}assertValidity(){const{r:t,s:e}=this;if(!q(t))throw new Error("Invalid Signature: r must be 0 < r < n");if(!q(e))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const t=h.n>>o;return this.s>t}normalizeS(){return this.hasHighS()?new S(this.r,L(-this.s,h.n)):this}toDERRawBytes(){return _(this.toDERHex())}toDERHex(){const t=A(O(this.s)),e=A(O(this.r)),r=t.length/2,n=e.length/2,i=O(r),o=O(n);return`30${O(n+r+4)}02${o}${e}02${i}${t}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return _(this.toCompactHex())}toCompactHex(){return I(this.r)+I(this.s)}}function B(...t){if(!t.every((t=>t instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);for(let n=0,i=0;ne.toString(16).padStart(2,"0")));function C(t){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");let e="";for(let r=0;r0)return BigInt(t);if("bigint"===typeof t&&q(t))return t;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function L(t,e=h.P){const r=t%e;return r>=i?r:e+r}function D(t,e){const{P:r}=h;let n=t;for(;e-- >i;)n*=n,n%=r;return n}function F(t,e=h.P){if(t===i||e<=i)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=L(t,e),n=e,s=i,a=o,u=o,c=i;for(;r!==i;){const t=n/r,e=n%r,i=s-u*t,o=a-c*t;n=r,r=e,s=u,a=c,u=i,c=o}if(n!==o)throw new Error("invert: does not exist");return L(s,e)}function j(t,e=!1){const r=function(t){const e=8*t.length-256,r=P(t);return e>0?r>>BigInt(e):r}(t);if(e)return r;const{n:n}=h;return r>=n?r-n:r}let K,z;class H{constructor(t,e){if(this.hashLen=t,this.qByteLen=e,"number"!==typeof t||t<2)throw new Error("hashLen must be a number");if("number"!==typeof e||e<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(t).fill(1),this.k=new Uint8Array(t).fill(0),this.counter=0}hmac(...t){return e.utils.hmacSha256(this.k,...t)}hmacSync(...t){return z(this.k,...t)}checkSync(){if("function"!==typeof z)throw new y("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(t=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),t),this.v=await this.hmac(this.v),0!==t.length&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),t),this.v=await this.hmac(this.v))}reseedSync(t=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),t),this.v=this.hmacSync(this.v),0!==t.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),t),this.v=this.hmacSync(this.v))}async generate(){this.incr();let t=0;const e=[];for(;t0)e=BigInt(t);else if("string"===typeof t){if(64!==t.length)throw new Error("Expected 32 bytes of private key");e=R(t)}else{if(!(t instanceof Uint8Array))throw new TypeError("Expected valid private key");if(t.length!==d)throw new Error("Expected 32 bytes of private key");e=P(t)}if(!q(e))throw new Error("Expected private key: 0 < key < n");return e}function Z(t){return t instanceof E?(t.assertValidity(),t):E.fromHex(t)}function J(t){if(t instanceof S)return t.assertValidity(),t;try{return S.fromDER(t)}catch(e){return S.fromCompact(t)}}function Q(t){const e=t instanceof Uint8Array,r="string"===typeof t,n=(e||r)&&t.length;return e?33===n||65===n:r?66===n||130===n:t instanceof E}function X(t){return P(t.length>f?t.slice(0,f):t)}function Y(t){const e=X(t),r=L(e,h.n);return $(r{if((t=N(t)).length<40||t.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");return T(L(P(t),h.n-o)+o)},randomBytes:(t=32)=>{if(ct.web)return ct.web.getRandomValues(new Uint8Array(t));if(ct.node){const{randomBytes:e}=ct.node;return Uint8Array.from(e(t))}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(40)),precompute(t=8,e=E.BASE){const r=e===E.BASE?e:new E(e.x,e.y);return r._setWindowSize(t),r.multiply(a),r},sha256:async(...t)=>{if(ct.web){const e=await ct.web.subtle.digest("SHA-256",B(...t));return new Uint8Array(e)}if(ct.node){const{createHash:e}=ct.node,r=e("sha256");return t.forEach((t=>r.update(t))),Uint8Array.from(r.digest())}throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(t,...e)=>{if(ct.web){const r=await ct.web.subtle.importKey("raw",t,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=B(...e),i=await ct.web.subtle.sign("HMAC",r,n);return new Uint8Array(i)}if(ct.node){const{createHmac:r}=ct.node,n=r("sha256",t);return e.forEach((t=>n.update(t))),Uint8Array.from(n.digest())}throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(t,...r)=>{let n=ft[t];if(void 0===n){const r=await e.utils.sha256(Uint8Array.from(t,(t=>t.charCodeAt(0))));n=B(r,r),ft[t]=n}return e.utils.sha256(n,...r)},taggedHashSync:(t,...e)=>{if("function"!==typeof K)throw new y("sha256Sync is undefined, you need to set it");let r=ft[t];if(void 0===r){const e=K(Uint8Array.from(t,(t=>t.charCodeAt(0))));r=B(e,e),ft[t]=r}return K(r,...e)},_JacobianPoint:v},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get:()=>K,set(t){K||(K=t)}},hmacSha256Sync:{configurable:!1,get:()=>z,set(t){z||(z=t)}}})},34537:function(t){"use strict";t.exports=function(t,e){var r=new Array(arguments.length-1),n=0,i=2,o=!0;for(;i1&&"="===t.charAt(e);)++r;return Math.ceil(3*t.length)/4-r};for(var n=new Array(64),i=new Array(123),o=0;o<64;)i[n[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;r.encode=function(t,e,r){for(var i,o=null,s=[],a=0,u=0;e>2],i=(3&h)<<4,u=1;break;case 1:s[a++]=n[i|h>>4],i=(15&h)<<2,u=2;break;case 2:s[a++]=n[i|h>>6],s[a++]=n[63&h],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=n[i],s[a++]=61,1===u&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";r.decode=function(t,e,r){for(var n,o=r,a=0,u=0;u1)break;if(void 0===(h=i[h]))throw Error(s);switch(a){case 0:n=h,a=1;break;case 1:e[r++]=n<<2|(48&h)>>4,n=h,a=2;break;case 2:e[r++]=(15&n)<<4|(60&h)>>2,n=h,a=3;break;case 3:e[r++]=(3&n)<<6|h,a=0}}if(1===a)throw Error(s);return r-o},r.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},19211:function(t){"use strict";function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,r){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:r||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var r=this._listeners[t],n=0;n0?0:2147483648,r,n);else if(isNaN(e))t(2143289344,r,n);else if(e>34028234663852886e22)t((i<<31|2139095040)>>>0,r,n);else if(e<11754943508222875e-54)t((i<<31|Math.round(e/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(e)/Math.LN2);t((i<<31|o+127<<23|8388607&Math.round(e*Math.pow(2,-o)*8388608))>>>0,r,n)}}function s(t,e,r){var n=t(e,r),i=2*(n>>31)+1,o=n>>>23&255,s=8388607&n;return 255===o?s?NaN:i*(1/0):0===o?1401298464324817e-60*i*s:i*Math.pow(2,o-150)*(s+8388608)}t.writeFloatLE=e.bind(null,r),t.writeFloatBE=e.bind(null,n),t.readFloatLE=s.bind(null,i),t.readFloatBE=s.bind(null,o)}(),"undefined"!==typeof Float64Array?function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),n=128===r[7];function i(t,n,i){e[0]=t,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(t,n,i){e[0]=t,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function s(t,n){return r[0]=t[n],r[1]=t[n+1],r[2]=t[n+2],r[3]=t[n+3],r[4]=t[n+4],r[5]=t[n+5],r[6]=t[n+6],r[7]=t[n+7],e[0]}function a(t,n){return r[7]=t[n],r[6]=t[n+1],r[5]=t[n+2],r[4]=t[n+3],r[3]=t[n+4],r[2]=t[n+5],r[1]=t[n+6],r[0]=t[n+7],e[0]}t.writeDoubleLE=n?i:o,t.writeDoubleBE=n?o:i,t.readDoubleLE=n?s:a,t.readDoubleBE=n?a:s}():function(){function e(t,e,r,n,i,o){var s=n<0?1:0;if(s&&(n=-n),0===n)t(0,i,o+e),t(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))t(0,i,o+e),t(2146959360,i,o+r);else if(n>17976931348623157e292)t(0,i,o+e),t((s<<31|2146435072)>>>0,i,o+r);else{var a;if(n<22250738585072014e-324)t((a=n/5e-324)>>>0,i,o+e),t((s<<31|a/4294967296)>>>0,i,o+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),t(4503599627370496*(a=n*Math.pow(2,-u))>>>0,i,o+e),t((s<<31|u+1023<<20|1048576*a&1048575)>>>0,i,o+r)}}}function s(t,e,r,n,i){var o=t(n,i+e),s=t(n,i+r),a=2*(s>>31)+1,u=s>>>20&2047,h=4294967296*(1048575&s)+o;return 2047===u?h?NaN:a*(1/0):0===u?5e-324*a*h:a*Math.pow(2,u-1075)*(h+4503599627370496)}t.writeDoubleLE=e.bind(null,r,0,4),t.writeDoubleBE=e.bind(null,n,4,0),t.readDoubleLE=s.bind(null,i,0,4),t.readDoubleBE=s.bind(null,o,4,0)}(),t}function r(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function n(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=255&t}function i(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function o(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},67199:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},76662:function(t){"use strict";t.exports=function(t,e,r){var n=r||8192,i=n>>>1,o=null,s=n;return function(r){if(r<1||r>i)return t(r);s+r>n&&(o=t(n),s=0);var a=e.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}},94997:function(t,e){"use strict";var r=e;r.length=function(t){for(var e=0,r=0,n=0;n191&&n<224?o[s++]=(31&n)<<6|63&t[e++]:n>239&&n<365?(n=((7&n)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[s++]=55296+(n>>10),o[s++]=56320+(1023&n)):o[s++]=(15&n)<<12|(63&t[e++])<<6|63&t[e++],s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),s=0);return i?(s&&i.push(String.fromCharCode.apply(String,o.slice(0,s))),i.join("")):String.fromCharCode.apply(String,o.slice(0,s))},r.write=function(t,e,r){for(var n,i,o=r,s=0;s>6|192,e[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=t.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&i),++s,e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=63&n|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=63&n|128);return r-o}},78826:function(t){"use strict";!function(e){function r(t){return parseInt(t)===t}function n(t){if(!r(t.length))return!1;for(var e=0;e255)return!1;return!0}function i(t,e){if(t.buffer&&ArrayBuffer.isView(t)&&"Uint8Array"===t.name)return e&&(t=t.slice?t.slice():Array.prototype.slice.call(t)),t;if(Array.isArray(t)){if(!n(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(r(t.length)&&n(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function o(t){return new Uint8Array(t)}function s(t,e,r,n,i){null==n&&null==i||(t=t.slice?t.slice(n,i):Array.prototype.slice.call(t,n,i)),e.set(t,r)}var a={toBytes:function(t){var e=[],r=0;for(t=encodeURI(t);r191&&n<224?(e.push(String.fromCharCode((31&n)<<6|63&t[r+1])),r+=2):(e.push(String.fromCharCode((15&n)<<12|(63&t[r+1])<<6|63&t[r+2])),r+=3)}return e.join("")}},u=function(){var t="0123456789abcdef";return{toBytes:function(t){for(var e=[],r=0;r>4]+t[15&i])}return r.join("")}}}(),h={16:10,24:12,32:14},c=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],l=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],f=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],d=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],y=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],m=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],v=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],b=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],E=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],k=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],S=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function B(t){for(var e=[],r=0;r>2,this._Ke[r][e%4]=o[e],this._Kd[t-r][e%4]=o[e];for(var s,a=0,u=i;u>16&255]<<24^l[s>>8&255]<<16^l[255&s]<<8^l[s>>24&255]^c[a]<<24,a+=1,8!=i)for(e=1;e>8&255]<<8^l[s>>16&255]<<16^l[s>>24&255]<<24;for(e=i/2+1;e>2,d=u%4,this._Ke[f][d]=o[e],this._Kd[t-f][d]=o[e++],u++}for(var f=1;f>24&255]^A[s>>16&255]^k[s>>8&255]^S[255&s]},x.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,r=[0,0,0,0],n=B(t),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var s=1;s>24&255]^p[n[(i+1)%4]>>16&255]^g[n[(i+2)%4]>>8&255]^y[255&n[(i+3)%4]]^this._Ke[s][i];n=r.slice()}var a,u=o(16);for(i=0;i<4;i++)a=this._Ke[e][i],u[4*i]=255&(l[n[i]>>24&255]^a>>24),u[4*i+1]=255&(l[n[(i+1)%4]>>16&255]^a>>16),u[4*i+2]=255&(l[n[(i+2)%4]>>8&255]^a>>8),u[4*i+3]=255&(l[255&n[(i+3)%4]]^a);return u},x.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,r=[0,0,0,0],n=B(t),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var s=1;s>24&255]^v[n[(i+3)%4]>>16&255]^b[n[(i+2)%4]>>8&255]^w[255&n[(i+1)%4]]^this._Kd[s][i];n=r.slice()}var a,u=o(16);for(i=0;i<4;i++)a=this._Kd[e][i],u[4*i]=255&(f[n[i]>>24&255]^a>>24),u[4*i+1]=255&(f[n[(i+3)%4]>>16&255]^a>>16),u[4*i+2]=255&(f[n[(i+2)%4]>>8&255]^a>>8),u[4*i+3]=255&(f[255&n[(i+1)%4]]^a);return u};var C=function(t){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new x(t)};C.prototype.encrypt=function(t){if((t=i(t)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=o(t.length),r=o(16),n=0;n=0;--e)this._counter[e]=t%256,t>>=8},O.prototype.setBytes=function(t){if(16!=(t=i(t,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},O.prototype.increment=function(){for(var t=15;t>=0;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var R=function(t,e){if(!(this instanceof R))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",e instanceof O||(e=new O(e)),this._counter=e,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new x(t)};R.prototype.encrypt=function(t){for(var e=i(t,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=t.length-e,n=0;n=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),i.forEach(["post","put","patch"],(function(t){c.headers[t]=i.merge(u)})),t.exports=c},80794:function(t){"use strict";t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},31488:function(t){t.exports={version:"0.26.1"}},45912:function(t){"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([r]):s[e]?s[e]+", "+r:r}})),s):s}},64883:function(t){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},82467:function(t,e,r){"use strict";var n=r(31488).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));var o={};i.transitional=function(t,e,r){function i(t,e){return"[Axios v"+n+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,n,s){if(!1===t)throw new Error(i(n," has been removed"+(e?" in "+e:"")));return e&&!o[n]&&(o[n]=!0,console.warn(i(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,n,s)}},t.exports={assertOptions:function(t,e,r){if("object"!==typeof t)throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var o=n[i],s=e[o];if(s){var a=t[o],u=void 0===a||s(a,o,t);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:i}},82:function(t,e,r){"use strict";var n=r(45912),i=Object.prototype.toString;function o(t){return Array.isArray(t)}function s(t){return"undefined"===typeof t}function a(t){return"[object ArrayBuffer]"===i.call(t)}function u(t){return null!==t&&"object"===typeof t}function h(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),o(t))for(var r=0,n=t.length;r=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r>>0,c=new Uint8Array(s);t[r];){var l=e[t.charCodeAt(r)];if(255===l)return;for(var f=0,d=s-1;(0!==l||f>>0,c[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");o=f,r++}for(var p=s-o;p!==s&&0===c[p];)p++;var g=n.allocUnsafe(i+(s-p));g.fill(0,0,i);for(var y=i;p!==s;)g[y++]=c[p++];return g}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,i=0,o=0,s=e.length;o!==s&&0===e[o];)o++,r++;for(var h=(s-o)*c+1>>>0,l=new Uint8Array(h);o!==s;){for(var f=e[o],d=0,p=h-1;(0!==f||d>>0,l[p]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");i=d,o++}for(var g=h-i;g!==h&&0===l[g];)g++;for(var y=u.repeat(r);g>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function o(t){let e=1;for(let r=0;r126)return"Invalid prefix ("+t+")";e=i(e)^n>>5}e=i(e);for(let r=0;r=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<=e)return"Excess padding";if(i<r)return"Exceeds length limit";const s=t.toLowerCase(),a=t.toUpperCase();if(t!==s&&t!==a)return"Mixed-case string "+t;const u=(t=s).lastIndexOf("1");if(-1===u)return"No separator character for "+t;if(0===u)return"Missing prefix for "+t;const h=t.slice(0,u),c=t.slice(u+1);if(c.length<6)return"Data too short";let l=o(h);if("string"===typeof l)return l;const f=[];for(let e=0;e=c.length||f.push(r)}return l!==e?"Invalid checksum for "+t:{prefix:h,words:f}}return e="bech32"===t?1:734539939,{decodeUnsafe:function(t,e){const r=s(t,e);if("object"===typeof r)return r},decode:function(t,e){const r=s(t,e);if("object"===typeof r)return r;throw new Error(r)},encode:function(t,n,s){if(s=s||90,t.length+7+n.length>s)throw new TypeError("Exceeds length limit");let a=o(t=t.toLowerCase());if("string"===typeof a)throw new Error(a);let u=t+"1";for(let e=0;e>5!==0)throw new Error("Non 5-bit word");a=i(a)^t,u+=r.charAt(t)}for(let e=0;e<6;++e)a=i(a);a^=e;for(let e=0;e<6;++e){u+=r.charAt(a>>5*(5-e)&31)}return u},toWords:a,fromWordsUnsafe:u,fromWords:h}}e.gW=c("bech32"),e.iE=c("bech32m")},24736:function(t,e,r){var n;t=r.nmd(t);var i=function(t){"use strict";var e=1e7,r=9007199254740992,n=c(r),o=Math.log(r);function s(t,e){return"undefined"===typeof t?s[0]:"undefined"!==typeof e?10===+e?Z(t):z(t,e):Z(t)}function a(t,e){this.value=t,this.sign=e,this.isSmall=!1}function u(t){this.value=t,this.sign=t<0,this.isSmall=!0}function h(t){return-r0?Math.floor(t):Math.ceil(t)}function g(t,r){var n,i,o=t.length,s=r.length,a=new Array(o),u=0,h=e;for(i=0;i=h?1:0,a[i]=n-u*h;for(;i0&&a.push(u),a}function y(t,e){return t.length>=e.length?g(t,e):g(e,t)}function m(t,r){var n,i,o=t.length,s=new Array(o),a=e;for(i=0;i0;)s[i++]=r%a,r=Math.floor(r/a);return s}function v(t,r){var n,i,o=t.length,s=r.length,a=new Array(o),u=0,h=e;for(n=0;n0;)s[i++]=u%a,u=Math.floor(u/a);return s}function A(t,e){for(var r=[];e-- >0;)r.push(0);return r.concat(t)}function k(t,e){var r=Math.max(t.length,e.length);if(r<=30)return w(t,e);r=Math.ceil(r/2);var n=t.slice(r),i=t.slice(0,r),o=e.slice(r),s=e.slice(0,r),a=k(i,s),u=k(n,o),h=k(y(i,n),y(s,o)),c=y(y(a,A(v(v(h,a),u),r)),A(u,2*r));return f(c),c}function S(t,r,n){return new a(t=0;--r)i=(o=1e7*i+t[r])-(n=p(o/e))*e,a[r]=0|n;return[a,0|i]}function C(t,r){var n,i,o=Z(r),h=t.value,g=o.value;if(0===g)throw new Error("Cannot divide by zero");if(t.isSmall)return o.isSmall?[new u(p(h/g)),new u(h%g)]:[s[0],t];if(o.isSmall){if(1===g)return[t,s[0]];if(-1==g)return[t.negate(),s[0]];var y=Math.abs(g);if(y=0;i--){for(n=p-1,v[i+f]!==y&&(n=Math.floor((v[i+f]*p+v[i+f-1])/y)),o=0,s=0,u=b.length,a=0;ah&&(o=(o+1)*p),n=Math.ceil(o/s);do{if(M(a=E(r,n),d)<=0)break;n--}while(n);c.push(n),d=v(d,a)}return c.reverse(),[l(c),l(d)]}(h,g),i=n[0];var w=t.sign!==o.sign,A=n[1],k=t.sign;return"number"===typeof i?(w&&(i=-i),i=new u(i)):i=new a(i,w),"number"===typeof A?(k&&(A=-A),A=new u(A)):A=new a(A,k),[i,A]}function M(t,e){if(t.length!==e.length)return t.length>e.length?1:-1;for(var r=t.length-1;r>=0;r--)if(t[r]!==e[r])return t[r]>e[r]?1:-1;return 0}function I(t){var e=t.abs();return!e.isUnit()&&(!!(e.equals(2)||e.equals(3)||e.equals(5))||!(e.isEven()||e.isDivisibleBy(3)||e.isDivisibleBy(5))&&(!!e.lesser(49)||void 0))}function T(t,e){for(var r,n,o,a=t.prev(),u=a,h=0;u.isEven();)u=u.divide(2),h++;t:for(n=0;n=0?n=v(t,e):(n=v(e,t),r=!r),"number"===typeof(n=l(n))?(r&&(n=-n),new u(n)):new a(n,r)}(r,n,this.sign)},a.prototype.minus=a.prototype.subtract,u.prototype.subtract=function(t){var e=Z(t),r=this.value;if(r<0!==e.sign)return this.add(e.negate());var n=e.value;return e.isSmall?new u(r-n):b(n,Math.abs(r),r>=0)},u.prototype.minus=u.prototype.subtract,a.prototype.negate=function(){return new a(this.value,!this.sign)},u.prototype.negate=function(){var t=this.sign,e=new u(-this.value);return e.sign=!t,e},a.prototype.abs=function(){return new a(this.value,!1)},u.prototype.abs=function(){return new u(Math.abs(this.value))},a.prototype.multiply=function(t){var r,n,i,o=Z(t),u=this.value,h=o.value,l=this.sign!==o.sign;if(o.isSmall){if(0===h)return s[0];if(1===h)return this;if(-1===h)return this.negate();if((r=Math.abs(h))0?k(u,h):w(u,h),l)},a.prototype.times=a.prototype.multiply,u.prototype._multiplyBySmall=function(t){return h(t.value*this.value)?new u(t.value*this.value):S(Math.abs(t.value),c(Math.abs(this.value)),this.sign!==t.sign)},a.prototype._multiplyBySmall=function(t){return 0===t.value?s[0]:1===t.value?this:-1===t.value?this.negate():S(Math.abs(t.value),this.value,this.sign!==t.sign)},u.prototype.multiply=function(t){return Z(t)._multiplyBySmall(this)},u.prototype.times=u.prototype.multiply,a.prototype.square=function(){return new a(B(this.value),!1)},u.prototype.square=function(){var t=this.value*this.value;return h(t)?new u(t):new a(B(c(Math.abs(this.value))),!1)},a.prototype.divmod=function(t){var e=C(this,t);return{quotient:e[0],remainder:e[1]}},u.prototype.divmod=a.prototype.divmod,a.prototype.divide=function(t){return C(this,t)[0]},u.prototype.over=u.prototype.divide=a.prototype.over=a.prototype.divide,a.prototype.mod=function(t){return C(this,t)[1]},u.prototype.remainder=u.prototype.mod=a.prototype.remainder=a.prototype.mod,a.prototype.pow=function(t){var e,r,n,i=Z(t),o=this.value,a=i.value;if(0===a)return s[1];if(0===o)return s[0];if(1===o)return s[1];if(-1===o)return i.isEven()?s[1]:s[-1];if(i.sign)return s[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&h(e=Math.pow(o,a)))return new u(p(e));for(r=this,n=s[1];!0&a&&(n=n.times(r),--a),0!==a;)a/=2,r=r.square();return n},u.prototype.pow=a.prototype.pow,a.prototype.modPow=function(t,e){if(t=Z(t),(e=Z(e)).isZero())throw new Error("Cannot take modPow with modulus 0");for(var r=s[1],n=this.mod(e);t.isPositive();){if(n.isZero())return s[0];t.isOdd()&&(r=r.multiply(n).mod(e)),t=t.divide(2),n=n.square().mod(e)}return r},u.prototype.modPow=a.prototype.modPow,a.prototype.compareAbs=function(t){var e=Z(t),r=this.value,n=e.value;return e.isSmall?1:M(r,n)},u.prototype.compareAbs=function(t){var e=Z(t),r=Math.abs(this.value),n=e.value;return e.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},a.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=Z(t),r=this.value,n=e.value;return this.sign!==e.sign?e.sign?1:-1:e.isSmall?this.sign?-1:1:M(r,n)*(this.sign?-1:1)},a.prototype.compareTo=a.prototype.compare,u.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=Z(t),r=this.value,n=e.value;return e.isSmall?r==n?0:r>n?1:-1:r<0!==e.sign?r<0?-1:1:r<0?1:-1},u.prototype.compareTo=u.prototype.compare,a.prototype.equals=function(t){return 0===this.compare(t)},u.prototype.eq=u.prototype.equals=a.prototype.eq=a.prototype.equals,a.prototype.notEquals=function(t){return 0!==this.compare(t)},u.prototype.neq=u.prototype.notEquals=a.prototype.neq=a.prototype.notEquals,a.prototype.greater=function(t){return this.compare(t)>0},u.prototype.gt=u.prototype.greater=a.prototype.gt=a.prototype.greater,a.prototype.lesser=function(t){return this.compare(t)<0},u.prototype.lt=u.prototype.lesser=a.prototype.lt=a.prototype.lesser,a.prototype.greaterOrEquals=function(t){return this.compare(t)>=0},u.prototype.geq=u.prototype.greaterOrEquals=a.prototype.geq=a.prototype.greaterOrEquals,a.prototype.lesserOrEquals=function(t){return this.compare(t)<=0},u.prototype.leq=u.prototype.lesserOrEquals=a.prototype.leq=a.prototype.lesserOrEquals,a.prototype.isEven=function(){return 0===(1&this.value[0])},u.prototype.isEven=function(){return 0===(1&this.value)},a.prototype.isOdd=function(){return 1===(1&this.value[0])},u.prototype.isOdd=function(){return 1===(1&this.value)},a.prototype.isPositive=function(){return!this.sign},u.prototype.isPositive=function(){return this.value>0},a.prototype.isNegative=function(){return this.sign},u.prototype.isNegative=function(){return this.value<0},a.prototype.isUnit=function(){return!1},u.prototype.isUnit=function(){return 1===Math.abs(this.value)},a.prototype.isZero=function(){return!1},u.prototype.isZero=function(){return 0===this.value},a.prototype.isDivisibleBy=function(t){var e=Z(t),r=e.value;return 0!==r&&(1===r||(2===r?this.isEven():this.mod(e).equals(s[0])))},u.prototype.isDivisibleBy=a.prototype.isDivisibleBy,a.prototype.isPrime=function(e){var r=I(this);if(r!==t)return r;var n=this.abs(),o=n.bitLength();if(o<=64)return T(n,[2,325,9375,28178,450775,9780504,1795265022]);for(var s=Math.log(2)*o,a=Math.ceil(!0===e?2*Math.pow(s,2):s),u=[],h=0;h-r?new u(t-1):new a(n,!0)};for(var O=[1];2*O[O.length-1]<=e;)O.push(2*O[O.length-1]);var R=O.length,_=O[R-1];function P(t){return("number"===typeof t||"string"===typeof t)&&+Math.abs(t)<=e||t instanceof a&&t.value.length<=1}function N(t,e,r){e=Z(e);for(var n=t.isNegative(),o=e.isNegative(),s=n?t.not():t,a=o?e.not():e,u=0,h=0,c=null,l=null,f=[];!s.isZero()||!a.isZero();)u=(c=C(s,_))[1].toJSNumber(),n&&(u=_-1-u),h=(l=C(a,_))[1].toJSNumber(),o&&(h=_-1-h),s=c[0],a=l[0],f.push(r(u,h));for(var d=0!==r(n?1:0,o?1:0)?i(-1):i(0),p=f.length-1;p>=0;p-=1)d=d.multiply(_).add(i(f[p]));return d}a.prototype.shiftLeft=function(t){if(!P(t))throw new Error(String(t)+" is too large for shifting.");if((t=+t)<0)return this.shiftRight(-t);var e=this;if(e.isZero())return e;for(;t>=R;)e=e.multiply(_),t-=R-1;return e.multiply(O[t])},u.prototype.shiftLeft=a.prototype.shiftLeft,a.prototype.shiftRight=function(t){var e;if(!P(t))throw new Error(String(t)+" is too large for shifting.");if((t=+t)<0)return this.shiftLeft(-t);for(var r=this;t>=R;){if(r.isZero()||r.isNegative()&&r.isUnit())return r;r=(e=C(r,_))[1].isNegative()?e[0].prev():e[0],t-=R-1}return(e=C(r,O[t]))[1].isNegative()?e[0].prev():e[0]},u.prototype.shiftRight=a.prototype.shiftRight,a.prototype.not=function(){return this.negate().prev()},u.prototype.not=a.prototype.not,a.prototype.and=function(t){return N(this,t,(function(t,e){return t&e}))},u.prototype.and=a.prototype.and,a.prototype.or=function(t){return N(this,t,(function(t,e){return t|e}))},u.prototype.or=a.prototype.or,a.prototype.xor=function(t){return N(this,t,(function(t,e){return t^e}))},u.prototype.xor=a.prototype.xor;var U=1<<30;function L(t){var r=t.value,n="number"===typeof r?r|U:r[0]+r[1]*e|1073758208;return n&-n}function D(t,e){if(e.compareTo(t)<=0){var r=D(t,e.square(e)),n=r.p,o=r.e,s=n.multiply(e);return s.compareTo(t)<=0?{p:s,e:2*o+1}:{p:n,e:2*o}}return{p:i(1),e:0}}function F(t,e){return t=Z(t),e=Z(e),t.greater(e)?t:e}function j(t,e){return t=Z(t),e=Z(e),t.lesser(e)?t:e}function K(t,e){if(t=Z(t).abs(),e=Z(e).abs(),t.equals(e))return t;if(t.isZero())return e;if(e.isZero())return t;for(var r,n,i=s[1];t.isEven()&&e.isEven();)r=Math.min(L(t),L(e)),t=t.divide(r),e=e.divide(r),i=i.multiply(r);for(;t.isEven();)t=t.divide(L(t));do{for(;e.isEven();)e=e.divide(L(e));t.greater(e)&&(n=e,e=t,t=n),e=e.subtract(t)}while(!e.isZero());return i.isUnit()?t:t.multiply(i)}a.prototype.bitLength=function(){var t=this;return t.compareTo(i(0))<0&&(t=t.negate().subtract(i(1))),0===t.compareTo(i(0))?i(0):i(D(t,i(2)).e).add(i(1))},u.prototype.bitLength=a.prototype.bitLength;var z=function(t,e){for(var r=t.length,n=Math.abs(e),i=0;i=n){if("1"===c&&1===n)continue;throw new Error(c+" is not a valid digit in base "+e+".")}if(c.charCodeAt(0)-87>=n)throw new Error(c+" is not a valid digit in base "+e+".")}}if(2<=e&&e<=36&&r<=o/Math.log(e)){var s=parseInt(t,e);if(isNaN(s))throw new Error(c+" is not a valid digit in base "+e+".");return new u(parseInt(t,e))}e=Z(e);var a=[],h="-"===t[0];for(i=h?1:0;i"!==t[i]);a.push(Z(t.slice(f+1,i)))}}return H(a,e,h)};function H(t,e,r){var n,i=s[0],o=s[1];for(n=t.length-1;n>=0;n--)i=i.add(t[n].times(o)),o=o.times(e);return r?i.negate():i}function q(t){return t<=35?"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t):"<"+t+">"}function V(t,e){if((e=i(e)).isZero()){if(t.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(e.equals(-1)){if(t.isZero())return{value:[0],isNegative:!1};if(t.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-t)).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(+t-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(t.isNegative()&&e.isPositive()&&(n=!0,t=t.abs()),e.equals(1))return t.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(+t)).map(Number.prototype.valueOf,1),isNegative:n};for(var o,s=[],a=t;a.isNegative()||a.compareAbs(e)>=0;){o=a.divmod(e),a=o.quotient;var u=o.remainder;u.isNegative()&&(u=e.minus(u).abs(),a=a.next()),s.push(u.toJSNumber())}return s.push(a.toJSNumber()),{value:s.reverse(),isNegative:n}}function G(t,e){var r=V(t,e);return(r.isNegative?"-":"")+r.value.map(q).join("")}function W(t){if(h(+t)){var e=+t;if(e===p(e))return new u(e);throw new Error("Invalid integer: "+t)}var r="-"===t[0];r&&(t=t.slice(1));var n=t.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var i=n[1];if("+"===i[0]&&(i=i.slice(1)),(i=+i)!==p(i)||!h(i))throw new Error("Invalid integer: "+i+" is not a valid exponent.");var o=n[0],s=o.indexOf(".");if(s>=0&&(i-=o.length-s-1,o=o.slice(0,s)+o.slice(s+1)),i<0)throw new Error("Cannot include negative exponent part for integers");t=o+=new Array(i+1).join("0")}if(!/^([0-9][0-9]*)$/.test(t))throw new Error("Invalid integer: "+t);for(var c=[],l=t.length,d=l-7;l>0;)c.push(+t.slice(d,l)),(d-=7)<0&&(d=0),l-=7;return f(c),new a(c,r)}function Z(t){return"number"===typeof t?function(t){if(h(t)){if(t!==p(t))throw new Error(t+" is not an integer.");return new u(t)}return W(t.toString())}(t):"string"===typeof t?W(t):t}a.prototype.toArray=function(t){return V(this,t)},u.prototype.toArray=function(t){return V(this,t)},a.prototype.toString=function(e){if(e===t&&(e=10),10!==e)return G(this,e);for(var r,n=this.value,i=n.length,o=String(n[--i]);--i>=0;)r=String(n[i]),o+="0000000".slice(r.length)+r;return(this.sign?"-":"")+o},u.prototype.toString=function(e){return e===t&&(e=10),10!=e?G(this,e):String(this.value)},a.prototype.toJSON=u.prototype.toJSON=function(){return this.toString()},a.prototype.valueOf=function(){return parseInt(this.toString(),10)},a.prototype.toJSNumber=a.prototype.valueOf,u.prototype.valueOf=function(){return this.value},u.prototype.toJSNumber=u.prototype.valueOf;for(var J=0;J<1e3;J++)s[J]=new u(J),J>0&&(s[-J]=new u(-J));return s.one=s[1],s.zero=s[0],s.minusOne=s[-1],s.max=F,s.min=j,s.gcd=K,s.lcm=function(t,e){return t=Z(t).abs(),e=Z(e).abs(),t.divide(K(t,e)).multiply(e)},s.isInstance=function(t){return t instanceof a||t instanceof u},s.randBetween=function(t,r){var n=j(t=Z(t),r=Z(r)),i=F(t,r).subtract(n).add(1);if(i.isSmall)return n.add(Math.floor(Math.random()*i));for(var o=[],s=!0,h=i.value.length-1;h>=0;h--){var c=s?i.value[h]:e,f=p(Math.random()*c);o.unshift(f),f=4294967296&&i++,t[e]=n,t[e+1]=i}function o(t,e,r,n){let i=t[e]+r;r<0&&(i+=4294967296);let o=t[e+1]+n;i>=4294967296&&o++,t[e]=i,t[e+1]=o}function s(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function a(t,e,r,n,s,a){const u=l[s],h=l[s+1],f=l[a],d=l[a+1];i(c,t,e),o(c,t,u,h);let p=c[n]^c[t],g=c[n+1]^c[t+1];c[n]=g,c[n+1]=p,i(c,r,n),p=c[e]^c[r],g=c[e+1]^c[r+1],c[e]=p>>>24^g<<8,c[e+1]=g>>>24^p<<8,i(c,t,e),o(c,t,f,d),p=c[n]^c[t],g=c[n+1]^c[t+1],c[n]=p>>>16^g<<16,c[n+1]=g>>>16^p<<16,i(c,r,n),p=c[e]^c[r],g=c[e+1]^c[r+1],c[e]=g>>>31^p<<1,c[e+1]=p>>>31^g<<1}const u=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),h=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(t){return 2*t}))),c=new Uint32Array(32),l=new Uint32Array(32);function f(t,e){let r=0;for(r=0;r<16;r++)c[r]=t.h[r],c[r+16]=u[r];for(c[24]=c[24]^t.t,c[25]=c[25]^t.t/4294967296,e&&(c[28]=~c[28],c[29]=~c[29]),r=0;r<32;r++)l[r]=s(t.b,4*r);for(r=0;r<12;r++)a(0,8,16,24,h[16*r+0],h[16*r+1]),a(2,10,18,26,h[16*r+2],h[16*r+3]),a(4,12,20,28,h[16*r+4],h[16*r+5]),a(6,14,22,30,h[16*r+6],h[16*r+7]),a(0,10,20,30,h[16*r+8],h[16*r+9]),a(2,12,22,24,h[16*r+10],h[16*r+11]),a(4,14,16,26,h[16*r+12],h[16*r+13]),a(6,8,18,28,h[16*r+14],h[16*r+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^c[r]^c[r+16]}const d=new Uint8Array([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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function p(t,e,r,n){if(0===t||t>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(e&&e.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&16!==r.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(n&&16!==n.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:t};d.fill(0),d[0]=t,e&&(d[1]=e.length),d[2]=1,d[3]=1,r&&d.set(r,32),n&&d.set(n,48);for(let o=0;o<16;o++)i.h[o]=u[o]^s(d,4*o);return e&&(g(i,e),i.c=128),i}function g(t,e){for(let r=0;r>2]>>8*(3&r);return e}function m(t,e,r,i,o){r=r||64,t=n.normalizeInput(t),i&&(i=n.normalizeInput(i)),o&&(o=n.normalizeInput(o));const s=p(r,e,i,o);return g(s,t),y(s)}t.exports={blake2b:m,blake2bHex:function(t,e,r,i,o){const s=m(t,e,r,i,o);return n.toHex(s)},blake2bInit:p,blake2bUpdate:g,blake2bFinal:y}},45297:function(t,e,r){const n=r(99488);function i(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function o(t,e,r,n,i,o){h[t]=h[t]+h[e]+i,h[n]=s(h[n]^h[t],16),h[r]=h[r]+h[n],h[e]=s(h[e]^h[r],12),h[t]=h[t]+h[e]+o,h[n]=s(h[n]^h[t],8),h[r]=h[r]+h[n],h[e]=s(h[e]^h[r],7)}function s(t,e){return t>>>e^t<<32-e}const a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),h=new Uint32Array(16),c=new Uint32Array(16);function l(t,e){let r=0;for(r=0;r<8;r++)h[r]=t.h[r],h[r+8]=a[r];for(h[12]^=t.t,h[13]^=t.t/4294967296,e&&(h[14]=~h[14]),r=0;r<16;r++)c[r]=i(t.b,4*r);for(r=0;r<10;r++)o(0,4,8,12,c[u[16*r+0]],c[u[16*r+1]]),o(1,5,9,13,c[u[16*r+2]],c[u[16*r+3]]),o(2,6,10,14,c[u[16*r+4]],c[u[16*r+5]]),o(3,7,11,15,c[u[16*r+6]],c[u[16*r+7]]),o(0,5,10,15,c[u[16*r+8]],c[u[16*r+9]]),o(1,6,11,12,c[u[16*r+10]],c[u[16*r+11]]),o(2,7,8,13,c[u[16*r+12]],c[u[16*r+13]]),o(3,4,9,14,c[u[16*r+14]],c[u[16*r+15]]);for(r=0;r<8;r++)t.h[r]^=h[r]^h[r+8]}function f(t,e){if(!(t>0&&t<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=e?e.length:0;if(e&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const n={h:new Uint32Array(a),b:new Uint8Array(64),c:0,t:0,outlen:t};return n.h[0]^=16842752^r<<8^t,r>0&&(d(n,e),n.c=64),n}function d(t,e){for(let r=0;r>2]>>8*(3&r)&255;return e}function g(t,e,r){r=r||32,t=n.normalizeInput(t);const i=f(r,e);return d(i,t),p(i)}t.exports={blake2s:g,blake2sHex:function(t,e,r){const i=g(t,e,r);return n.toHex(i)},blake2sInit:f,blake2sUpdate:d,blake2sFinal:p}},1191:function(t,e,r){const n=r(8442),i=r(45297);t.exports={blake2b:n.blake2b,blake2bHex:n.blake2bHex,blake2bInit:n.blake2bInit,blake2bUpdate:n.blake2bUpdate,blake2bFinal:n.blake2bFinal,blake2s:i.blake2s,blake2sHex:i.blake2sHex,blake2sInit:i.blake2sInit,blake2sUpdate:i.blake2sUpdate,blake2sFinal:i.blake2sFinal}},99488:function(t){function e(t){return(4294967296+t).toString(16).substring(1)}t.exports={normalizeInput:function(t){let e;if(t instanceof Uint8Array)e=t;else{if("string"!==typeof t)throw new Error("Input must be an string, Buffer or Uint8Array");e=(new TextEncoder).encode(t)}return e},toHex:function(t){return Array.prototype.map.call(t,(function(t){return(t<16?"0":"")+t.toString(16)})).join("")},debugPrint:function(t,r,n){let i="\n"+t+" = ";for(let o=0;o=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function h(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c1&&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},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=f;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){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"),this.strip();var s,a,u="le"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,g=d>>>13,y=0|s[2],m=8191&y,v=y>>>13,b=0|s[3],w=8191&b,E=b>>>13,A=0|s[4],k=8191&A,S=A>>>13,B=0|s[5],x=8191&B,C=B>>>13,M=0|s[6],I=8191&M,T=M>>>13,O=0|s[7],R=8191&O,_=O>>>13,P=0|s[8],N=8191&P,U=P>>>13,L=0|s[9],D=8191&L,F=L>>>13,j=0|a[0],K=8191&j,z=j>>>13,H=0|a[1],q=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Z=G>>>13,J=0|a[3],Q=8191&J,X=J>>>13,Y=0|a[4],$=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,ft=ct>>>13,dt=0|a[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(h+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(f,K)|0))<<13)|0;h=((o=Math.imul(f,z))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,K),i=(i=Math.imul(p,z))+Math.imul(g,K)|0,o=Math.imul(g,z);var mt=(h+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,q)|0))<<13)|0;h=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,K),i=(i=Math.imul(m,z))+Math.imul(v,K)|0,o=Math.imul(v,z),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,V)|0;var vt=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(f,W)|0))<<13)|0;h=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,K),i=(i=Math.imul(w,z))+Math.imul(E,K)|0,o=Math.imul(E,z),n=n+Math.imul(m,q)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,Z)|0;var bt=(h+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,Q)|0))<<13)|0;h=((o=o+Math.imul(f,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(k,K),i=(i=Math.imul(k,z))+Math.imul(S,K)|0,o=Math.imul(S,z),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,X)|0;var wt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,z))+Math.imul(C,K)|0,o=Math.imul(C,z),n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,V)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var Et=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(I,K),i=(i=Math.imul(I,z))+Math.imul(T,K)|0,o=Math.imul(T,z),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var At=(h+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,ot)|0))<<13)|0;h=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(R,K),i=(i=Math.imul(R,z))+Math.imul(_,K)|0,o=Math.imul(_,z),n=n+Math.imul(I,q)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,X)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var kt=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((o=o+Math.imul(f,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,z))+Math.imul(U,K)|0,o=Math.imul(U,z),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,z))+Math.imul(F,K)|0,o=Math.imul(F,z),n=n+Math.imul(N,q)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(U,q)|0,o=o+Math.imul(U,V)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,ft)|0;var Bt=(h+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,pt)|0))<<13)|0;h=((o=o+Math.imul(f,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,V))+Math.imul(F,q)|0,o=Math.imul(F,V),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Z)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ft)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;h=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,Z))+Math.imul(F,W)|0,o=Math.imul(F,Z),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,X)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ht)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ft)|0;var Ct=(h+(n=n+Math.imul(m,pt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,X))+Math.imul(F,Q)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(U,$)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ft)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ft)|0;var Mt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ft)|0;var It=(h+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(S,pt)|0))<<13)|0;h=((o=o+Math.imul(S,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(D,rt),i=(i=Math.imul(D,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,n=n+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,ot),i=(i=Math.imul(D,st))+Math.imul(F,ot)|0,o=Math.imul(F,st),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(U,ut)|0,o=o+Math.imul(U,ht)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ft)|0;var Ot=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,ut),i=(i=Math.imul(D,ht))+Math.imul(F,ut)|0,o=Math.imul(F,ht),n=n+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(U,lt)|0,o=o+Math.imul(U,ft)|0;var Rt=(h+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,gt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,lt),i=(i=Math.imul(D,ft))+Math.imul(F,lt)|0,o=Math.imul(F,ft);var _t=(h+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(U,pt)|0))<<13)|0;h=((o=o+Math.imul(U,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863;var Pt=(h+(n=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,gt))+Math.imul(F,pt)|0))<<13)|0;return h=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=yt,u[1]=mt,u[2]=vt,u[3]=bt,u[4]=wt,u[5]=Et,u[6]=At,u[7]=kt,u[8]=St,u[9]=Bt,u[10]=xt,u[11]=Ct,u[12]=Mt,u[13]=It,u[14]=Tt,u[15]=Ot,u[16]=Rt,u[17]=_t,u[18]=Pt,0!==h&&(u[19]=h,r.length++),r};function g(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):g(this,t,e),r},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.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;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){k.call(this,t),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)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(b,v),b.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return m[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var g=d,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,k),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),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)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},77191:function(t,e,r){var n=r(58162);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},14288:function(t){"use strict";const e=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,"murmur3-128":34,"murmur3-32":35,"dbl-sha2-256":86,md4:212,md5:213,bmt:214,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,kangarootwelve:7425,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46e3,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082});t.exports={names:e}},21549:function(t,e,r){"use strict";const n=r(36957),i=r(89051),{names:o}=r(14288),{toString:s}=r(92263),{fromString:a}=r(52217),{concat:u}=r(20605),h={};for(const g in o){const t=g;h[o[t]]=t}function c(t){if(!(t instanceof Uint8Array))throw new Error("multihash must be a Uint8Array");if(t.length<2)throw new Error("multihash too short. must be > 2 bytes.");const e=i.decode(t);if(!d(e))throw new Error(`multihash unknown function code: 0x${e.toString(16)}`);t=t.slice(i.decode.bytes);const r=i.decode(t);if(r<0)throw new Error(`multihash invalid length: ${r}`);if((t=t.slice(i.decode.bytes)).length!==r)throw new Error(`multihash length inconsistent: 0x${s(t,"base16")}`);return{code:e,name:h[e],length:r,digest:t}}function l(t){let e=t;if("string"===typeof t){if(void 0===o[t])throw new Error(`Unrecognized hash function named: ${t}`);e=o[t]}if("number"!==typeof e)throw new Error(`Hash function code should be a number. Got: ${e}`);if(void 0===h[e]&&!f(e))throw new Error(`Unrecognized function code: ${e}`);return e}function f(t){return t>0&&t<16}function d(t){return!!f(t)||!!h[t]}function p(t){c(t)}Object.freeze(h),t.exports={names:o,codes:h,toHexString:function(t){if(!(t instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return s(t,"base16")},fromHexString:function(t){return a(t,"base16")},toB58String:function(t){if(!(t instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return s(n.encode("base58btc",t)).slice(1)},fromB58String:function(t){const e=t instanceof Uint8Array?s(t):t;return n.decode("z"+e)},decode:c,encode:function(t,e,r){if(!t||void 0===e)throw new Error("multihash encode requires at least two args: digest, code");const n=l(e);if(!(t instanceof Uint8Array))throw new Error("digest should be a Uint8Array");if(null==r&&(r=t.length),r&&t.length!==r)throw new Error("digest length should be equal to specified length.");const o=i.encode(n),s=i.encode(r);return u([o,s,t],o.length+s.length+t.length)},coerceCode:l,isAppCode:f,validate:p,prefix:function(t){return p(t),t.subarray(0,2)},isValidCode:d}},93919:function(t){t.exports=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<=128);return t.bytes=s-r,i}},33811:function(t){t.exports=function t(r,n,i){n=n||[];var o=i=i||0;for(;r>=e;)n[i++]=255&r|128,r/=128;for(;-128&r;)n[i++]=255&r|128,r>>>=7;return n[i]=0|r,t.bytes=i-o+1,n};var e=Math.pow(2,31)},89051:function(t,e,r){t.exports={encode:r(33811),decode:r(93919),encodingLength:r(94518)}},94518:function(t){var e=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),u=Math.pow(2,56),h=Math.pow(2,63);t.exports=function(t){return t(t[c[e]]=e,t)),{}),f=Symbol.for("@ipld/js-cid/CID");class d{constructor(t,e,r,s){if(this.version,this.codec,this.multihash,Object.defineProperty(this,f,{value:!0}),d.isCID(t)){const e=t;return this.version=e.version,this.codec=e.codec,this.multihash=e.multihash,void(this.multibaseName=e.multibaseName||(0===e.version?"base58btc":"base32"))}if("string"===typeof t){const e=i.isEncoded(t);if(e){const r=i.decode(t);this.version=parseInt(r[0].toString(),16),this.codec=o.getCodec(r.slice(1)),this.multihash=o.rmPrefix(r.slice(1)),this.multibaseName=e}else this.version=0,this.codec="dag-pb",this.multihash=n.fromB58String(t),this.multibaseName="base58btc";return d.validateCID(this),void Object.defineProperty(this,"string",{value:t})}if(t instanceof Uint8Array){const e=parseInt(t[0].toString(),16);if(1===e){const r=t;this.version=e,this.codec=o.getCodec(r.slice(1)),this.multihash=o.rmPrefix(r.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=t,this.multibaseName="base58btc";d.validateCID(this)}else this.version=t,"number"===typeof e&&(e=l[e]),this.codec=e,this.multihash=r,this.multibaseName=s||(0===t?"base58btc":"base32"),d.validateCID(this)}get bytes(){let t=this._bytes;if(!t){if(0===this.version)t=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");{const e=o.getCodeVarint(this.codec);t=a([[1],e,this.multihash],1+e.byteLength+this.multihash.byteLength)}}Object.defineProperty(this,"_bytes",{value:t})}return t}get prefix(){const t=o.getCodeVarint(this.codec),e=n.prefix(this.multihash);return a([[this.version],t,e],1+t.byteLength+e.byteLength)}get code(){return c[this.codec]}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:t,length:e}=n.decode(this.multihash);if("sha2-256"!==t)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==e)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new d(0,this.codec,this.multihash)}toV1(){return new d(1,this.codec,this.multihash,this.multibaseName)}toBaseEncodedString(t=this.multibaseName){if(this.string&&0!==this.string.length&&t===this.multibaseName)return this.string;let e;if(0===this.version){if("base58btc"!==t)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");e=n.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");e=u(i.encode(t,this.bytes))}return t===this.multibaseName&&Object.defineProperty(this,"string",{value:e}),e}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}toString(t){return this.toBaseEncodedString(t)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(t){return this.codec===t.codec&&this.version===t.version&&h(this.multihash,t.multihash)}static validateCID(t){const e=s.checkCIDComponents(t);if(e)throw new Error(e)}static isCID(t){return t instanceof d||Boolean(t&&t[f])}}d.codecs=c,t.exports=d},98514:function(t){"use strict";t.exports=function(t,{className:e,symbolName:r}){const n=Symbol.for(r),i={[e]:class extends t{constructor(...t){super(...t),Object.defineProperty(this,n,{value:!0})}get[Symbol.toStringTag](){return e}}}[e];return i[`is${e}`]=t=>!(!t||!t[n]),i},t.exports.proto=function(t,{className:e,symbolName:r,withoutNew:n}){const i=Symbol.for(r),o={[e]:function(...e){if(n&&!(this instanceof o))return new o(...e);const r=t.call(this,...e)||this;return r&&!r[i]&&Object.defineProperty(r,i,{value:!0}),r}}[e];return o.prototype=Object.create(t.prototype),o.prototype.constructor=o,Object.defineProperty(o.prototype,Symbol.toStringTag,{get:()=>e}),o[`is${e}`]=t=>!(!t||!t[i]),o}},21429:function(t){t.exports=function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var u=r[s]={exports:{}};e[s][0].call(u.exports,(function(t){var r=e[s][1][t];return i(r||t)}),u,u.exports,t,e,r,n)}return r[s].exports}for(var o=void 0,s=0;s>15;--o>=0;){var u=32767&this[t],h=this[t++]>>15,c=a*u+h*s;i=((u=s*u+((32767&c)<<15)+r[n]+(1073741823&i))>>>30)+(c>>>15)+a*h+(i>>>30),r[n++]=1073741823&u}return i}o.prototype.am=a,n=30,o.prototype.DB=n,o.prototype.DM=(1<=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function y(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0}function m(t){var e=s();return e.fromInt(t),e}function b(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var n=t.length,i=!1,s=0;--n>=0;){var a=8==r?255&t[n]:p(t,n);a<0?"-"==t.charAt(n)&&(i=!0):(i=!1,0==s?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t}function E(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else if(64==t)e=6;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=d(r));s>=0;)a>(a+=this.DB-e)):(r=this[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=d(r));return i?o:"0"}function A(){var t=s();return o.ZERO.subTo(this,t),t}function k(){return this.s<0?this.negate():this}function S(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0}function B(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function x(){return this.t<=0?0:this.DB*(this.t-1)+B(this[this.t-1]^this.s&this.DM)}function C(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s}function M(t,e){for(var r=t;r=0;--r)e[r+s+1]=this[r]>>i|a,a=(this[r]&o)<=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()}function T(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(e[this.t-r-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()}function R(t,e){var r=this.abs(),n=t.abs(),i=r.t;for(e.t=i+n.t;--i>=0;)e[i]=0;for(i=0;i=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()}function P(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(c,a),i.lShiftTo(c,r)):(n.copyTo(a),i.copyTo(r));var l=a.t,f=a[l-1];if(0!=f){var d=f*(1<1?a[l-2]>>this.F2:0),p=this.FV/d,g=(1<=0&&(r[r.t++]=1,r.subTo(b,r)),o.ONE.dlShiftTo(l,b),b.subTo(a,a);a.t=0;){var w=r[--m]==f?this.DM:Math.floor(r[m]*p+(r[m-1]+y)*g);if((r[m]+=a.am(0,w,r,v,0,l))0&&r.rShiftTo(c,r),u<0&&o.ZERO.subTo(r,r)}}}function N(t){var e=s();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(o.ZERO)>0&&t.subTo(e,e),e}function U(t){this.m=t}function L(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function D(t){return t}function F(t){t.divRemTo(this.m,null,t)}function j(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function K(t,e){t.squareTo(e),this.reduce(e)}function z(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e}function H(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e}function V(t){var e=s();return t.copyTo(e),this.reduce(e),e}function G(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function W(t,e){t.squareTo(e),this.reduce(e)}function Z(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function J(){return 0==(this.t>0?1&this[0]:this.s)}function Q(t,e){if(t>4294967295||t<1)return o.ONE;var r=s(),n=s(),i=e.convert(this),a=B(t)-1;for(i.copyTo(r);--a>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,i,r);else{var u=r;r=n,n=u}return e.revert(r)}function X(t,e){var r;return r=t<256||e.isEven()?new U(e):new H(e),this.exp(t,r)}function Y(){var t=s();return this.copyTo(t),t}function $(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>24}function et(){return 0==this.t?this.s:this[0]<<16>>16}function rt(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function nt(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function it(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=m(r),i=s(),o=s(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(t).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(t)+a}function ot(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),i=!1,s=0,a=0,u=0;u=r&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)}function st(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(o.ONE.shiftLeft(t-1),pt,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(o.ONE.shiftLeft(t-1),this);else{var n=new Array,i=7&t;n.length=1+(t>>3),e.nextBytes(n),i>0?n[0]&=(1<0)for(n>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<=0;)n<8?(r=(this[t]&(1<>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e}function ut(t){return 0==this.compareTo(t)}function ht(t){return this.compareTo(t)<0?this:t}function ct(t){return this.compareTo(t)>0?this:t}function lt(t,e,r){var n,i,o=Math.min(t.t,this.t);for(n=0;n>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function St(){for(var t=0;t=this.t?0!=this.s:0!=(this[e]&1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()}function _t(t){var e=s();return this.addTo(t,e),e}function Pt(t){var e=s();return this.subTo(t,e),e}function Nt(t){var e=s();return this.multiplyTo(t,e),e}function Ut(){var t=s();return this.squareTo(t),t}function Lt(t){var e=s();return this.divRemTo(t,e,null),e}function Dt(t){var e=s();return this.divRemTo(t,null,e),e}function Ft(t){var e=s(),r=s();return this.divRemTo(t,e,r),new Array(e,r)}function jt(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Kt(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function zt(){}function Ht(t){return t}function qt(t,e,r){t.multiplyTo(e,r)}function Vt(t,e){t.squareTo(e)}function Gt(t){return this.exp(t,new zt)}function Wt(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i=0;)r[n]=0;for(n=Math.max(e-this.t,0);n2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=s();return t.copyTo(e),this.reduce(e),e}function Xt(t){return t}function Yt(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)}function $t(t,e){t.squareTo(e),this.reduce(e)}function te(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function ee(t,e){var r,n,i=t.bitLength(),o=m(1);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new U(e):e.isEven()?new Jt(e):new H(e);var a=new Array,u=3,h=r-1,c=(1<1){var l=s();for(n.sqrTo(a[1],l);u<=c;)a[u]=s(),n.mulTo(l,a[u-2],a[u]),u+=2}var f,d,p=t.t-1,g=!0,y=s();for(i=B(t[p])-1;p>=0;){for(i>=h?f=t[p]>>i-h&c:(f=(t[p]&(1<0&&(f|=t[p-1]>>this.DB+i-h)),u=r;0==(1&f);)f>>=1,--u;if((i-=u)<0&&(i+=this.DB,--p),g)a[f].copyTo(o),g=!1;else{for(;u>1;)n.sqrTo(o,y),n.sqrTo(y,o),u-=2;u>0?n.sqrTo(o,y):(d=o,o=y,y=d),n.mulTo(y,a[f],o)}for(;p>=0&&0==(t[p]&1<0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r}function ne(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r}function ie(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return o.ZERO;for(var r=t.clone(),n=this.clone(),i=m(1),s=m(0),a=m(0),u=m(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(i.isEven()&&s.isEven()||(i.addTo(this,i),s.subTo(t,s)),i.rShiftTo(1,i)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;n.isEven();)n.rShiftTo(1,n),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(n)>=0?(r.subTo(n,r),e&&i.subTo(a,i),s.subTo(u,s)):(n.subTo(r,n),e&&a.subTo(i,a),u.subTo(s,u))}return 0!=n.compareTo(o.ONE)?o.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u}U.prototype.convert=L,U.prototype.revert=D,U.prototype.reduce=F,U.prototype.mulTo=j,U.prototype.sqrTo=K,H.prototype.convert=q,H.prototype.revert=V,H.prototype.reduce=G,H.prototype.mulTo=Z,H.prototype.sqrTo=W,o.prototype.copyTo=g,o.prototype.fromInt=y,o.prototype.fromString=b,o.prototype.clamp=w,o.prototype.dlShiftTo=C,o.prototype.drShiftTo=M,o.prototype.lShiftTo=I,o.prototype.rShiftTo=T,o.prototype.subTo=O,o.prototype.multiplyTo=R,o.prototype.squareTo=_,o.prototype.divRemTo=P,o.prototype.invDigit=z,o.prototype.isEven=J,o.prototype.exp=Q,o.prototype.toString=E,o.prototype.negate=A,o.prototype.abs=k,o.prototype.compareTo=S,o.prototype.bitLength=x,o.prototype.mod=N,o.prototype.modPowInt=X,o.ZERO=m(0),o.ONE=m(1),zt.prototype.convert=Ht,zt.prototype.revert=Ht,zt.prototype.mulTo=qt,zt.prototype.sqrTo=Vt,Jt.prototype.convert=Qt,Jt.prototype.revert=Xt,Jt.prototype.reduce=Yt,Jt.prototype.mulTo=te,Jt.prototype.sqrTo=$t;var oe=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],se=(1<<26)/oe[oe.length-1];function ae(t){var e,r=this.abs();if(1==r.t&&r[0]<=oe[oe.length-1]){for(e=0;e>1)>oe.length&&(t=oe.length);for(var i=s(),a=0;a=o;)t/=2,e/=2,a>>>=1;return(t+a)/e},c},s=e.pow(r,n),i=e.pow(2,i),o=2*i,h(e.random(),t)}([],Math,256,6,52),he.prototype.nextBytes=ce,le.prototype.init=fe,le.prototype.next=de;var ge,ye,me,ve=256;function be(t){ye[me++]^=255&t,ye[me++]^=t>>8&255,ye[me++]^=t>>16&255,ye[me++]^=t>>24&255,me>=ve&&(me-=ve)}function we(){be((new Date).getTime())}if(null==ye){var Ee;for(ye=new Array,me=0;me>>8,ye[me++]=255&Ee;me=0,we()}function Ae(){if(null==ge){for(we(),(ge=pe()).init(ye),me=0;me=0&&e>0;){var i=t.charCodeAt(n--);i<128?r[--e]=i:i>127&&i<2048?(r[--e]=63&i|128,r[--e]=i>>6|192):(r[--e]=63&i|128,r[--e]=i>>6&63|128,r[--e]=i>>12|224)}r[--e]=0;for(var s=new Se,a=new Array;e>2;){for(a[0]=0;0==a[0];)s.nextBytes(a);r[--e]=a[0]}return r[--e]=2,r[--e]=0,new o(r)}function _e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function Pe(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Oe(t,16),this.e=parseInt(e,16)):alert("Invalid RSA public key")}function Ne(t){return t.modPowInt(this.e,this.n)}function Ue(t){var e=Re(t,this.n.bitLength()+7>>3);if(null==e)return null;var r=this.doPublic(e);if(null==r)return null;var n=r.toString(16);return 0==(1&n.length)?n:"0"+n}function Le(){return{coeff:this.coeff.toString(16),d:this.d.toString(16),dmp1:this.dmp1.toString(16),dmq1:this.dmq1.toString(16),e:this.e.toString(16),n:this.n.toString(16),p:this.p.toString(16),q:this.q.toString(16)}}function De(t){var e=JSON.parse(t),r=new _e;return r.setPrivateEx(e.n,e.e,e.d,e.p,e.q,e.dmp1,e.dmq1,e.coeff),r}function Fe(t,e){for(var r=t.toByteArray(),n=0;n=r.length)return null;for(var i="";++n191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&r[n+1]),++n):(i+=String.fromCharCode((15&o)<<12|(63&r[n+1])<<6|63&r[n+2]),n+=2)}return i}function je(t,e,r){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Oe(t,16),this.e=parseInt(e,16),this.d=Oe(r,16)):alert("Invalid RSA private key")}function Ke(t,e,r,n,i,o,s,a){if(!(null!=t&&null!=e&&t.length>0&&e.length>0))throw new Error("Invalid RSA private key");this.n=Oe(t,16),this.e=parseInt(e,16),this.d=Oe(r,16),this.p=Oe(n,16),this.q=Oe(i,16),this.dmp1=Oe(o,16),this.dmq1=Oe(s,16),this.coeff=Oe(a,16)}function ze(t,e){var r=new he,n=t>>1;this.e=parseInt(e,16);for(var i=new o(e,16);;){for(;this.p=new o(t-n,1,r),0!=this.p.subtract(o.ONE).gcd(i).compareTo(o.ONE)||!this.p.isProbablePrime(10););for(;this.q=new o(n,1,r),0!=this.q.subtract(o.ONE).gcd(i).compareTo(o.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var a=this.p.subtract(o.ONE),u=this.q.subtract(o.ONE),h=a.multiply(u);if(0==h.gcd(i).compareTo(o.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(h),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(u),this.coeff=this.q.modInverse(this.p);break}}}function He(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),r=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(r)<0;)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)}function qe(t){var e=Oe(t,16),r=this.doPrivate(e);return null==r?null:Fe(r,this.n.bitLength()+7>>3)}_e.prototype.doPublic=Ne,_e.prototype.setPublic=Pe,_e.prototype.encrypt=Ue,_e.prototype.toJSON=Le,_e.parse=De,_e.prototype.doPrivate=He,_e.prototype.setPrivate=je,_e.prototype.setPrivateEx=Ke,_e.prototype.generate=ze,_e.prototype.decrypt=qe;var Ve=[];Ve.sha1="3021300906052b0e03021a05000414",Ve.sha256="3031300d060960864801650304020105000420";var Ge=[];function We(t,e,r){for(var n=e/4,i=(0,Ge[r])(t),o="0001",s="00"+Ve[r]+i,a="",u=n-o.length-s.length,h=0;h=256&&(i^=283)):n>24&&o%n==16&&(s=new Array(t.Sbox[s[0]],t.Sbox[s[1]],t.Sbox[s[2]],t.Sbox[s[3]]));for(var a=0;a<4;a++)e[o+a]=e[o+a-n]^s[a]}},t.Encrypt=function(e,r){var n=r.length;t.AddRoundKey(e,r.slice(0,16));for(var i=16;i=16;i-=16)t.AddRoundKey(e,r.slice(i,i+16)),t.MixColumns_Inv(e),t.ShiftRows(e,t.ShiftRowTab_Inv),t.SubBytes(e,t.Sbox_Inv);t.AddRoundKey(e,r.slice(0,16))},t.SubBytes=function(t,e){for(var r=0;r<16;r++)t[r]=e[t[r]]},t.AddRoundKey=function(t,e){for(var r=0;r<16;r++)t[r]^=e[r]},t.ShiftRows=function(t,e){for(var r=(new Array).concat(t),n=0;n<16;n++)t[n]=r[e[n]]},t.MixColumns=function(e){for(var r=0;r<16;r+=4){var n=e[r+0],i=e[r+1],o=e[r+2],s=e[r+3],a=n^i^o^s;e[r+0]^=a^t.xtime[n^i],e[r+1]^=a^t.xtime[i^o],e[r+2]^=a^t.xtime[o^s],e[r+3]^=a^t.xtime[s^n]}},t.MixColumns_Inv=function(e){for(var r=0;r<16;r+=4){var n=e[r+0],i=e[r+1],o=e[r+2],s=e[r+3],a=n^i^o^s,u=t.xtime[a],h=t.xtime[t.xtime[u^n^o]]^a,c=t.xtime[t.xtime[u^i^s]]^a;e[r+0]^=h^t.xtime[n^i],e[r+1]^=c^t.xtime[i^o],e[r+2]^=h^t.xtime[o^s],e[r+3]^=c^t.xtime[s^n]}},t}(),ir=function(){var t={};nr.Init();var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";return t.b256to64=function(t){var r,n,i,o="",s=0,a=t.length;for(i=0;i>2&63),r=(3&n)<<4):1==s?(o+=e.charAt(r|n>>4&15),r=(15&n)<<2):2==s&&(o+=e.charAt(r|n>>6&3),o+=e.charAt(63&n)),3==(s+=1)&&(s=0);return s>0&&(o+=e.charAt(r),o+="="),1==s&&(o+="="),o},t.b64to256=function(t){var r,n,i="",o=0,s=0,a=t.length;for(n=0;n=0&&(o&&(i+=String.fromCharCode(s|r>>6-o&255)),s=r<<(o=o+2&7)&255);return i},t.b16to64=function(t){var r,n,i="";for(t.length%2==1&&(t="0"+t),r=0;r+3<=t.length;r+=3)n=parseInt(t.substring(r,r+3),16),i+=e.charAt(n>>6)+e.charAt(63&n);for(r+1==t.length?(n=parseInt(t.substring(r,r+1),16),i+=e.charAt(n<<2)):r+2==t.length&&(n=parseInt(t.substring(r,r+2),16),i+=e.charAt(n>>2)+e.charAt((3&n)<<4));(3&i.length)>0;)i+="=";return i},t.b64to16=function(t){var r,n,i="",o=0;for(r=0;r>2),n=3&v,o=1):1==o?(i+=d(n<<2|v>>4),n=15&v,o=2):2==o?(i+=d(n),i+=d(v>>2),n=3&v,o=3):(i+=d(n<<2|v>>4),i+=d(15&v),o=0));return 1==o&&(i+=d(n<<2)),i},t.string2bytes=function(t){for(var e=new Array,r=0;ri&&(n=i):n=i;var s=e.length;G(s%2===0,"Invalid hex string"),n>s/2&&(n=s/2);for(var a=0;an)&&(r=n);for(var i="",o=e;o=o))return r?(i=t[e],e+1=o))return r?(e+2>>0)):(e+1>>0),i}function w(t,e,r,n){if(n||(G("boolean"===typeof r,"missing or invalid endian"),G(void 0!==e&&null!==e,"missing offset"),G(e+1=t.length)){var i=v(t,e,r,!0);return 32768&i?-1*(65535-i+1):i}}function E(t,e,r,n){if(n||(G("boolean"===typeof r,"missing or invalid endian"),G(void 0!==e&&null!==e,"missing offset"),G(e+3=t.length)){var i=b(t,e,r,!0);return 2147483648&i?-1*(4294967295-i+1):i}}function A(t,e,r,n){return n||(G("boolean"===typeof r,"missing or invalid endian"),G(e+3=o))for(var s=0,a=Math.min(o-r,2);s>>8*(n?s:1-s)}function B(t,e,r,n,i){i||(G(void 0!==e&&null!==e,"missing value"),G("boolean"===typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3=o))for(var s=0,a=Math.min(o-r,4);s>>8*(n?s:3-s)&255}function x(t,e,r,n,i){i||(G(void 0!==e&&null!==e,"missing value"),G("boolean"===typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+1=t.length||S(t,e>=0?e:65535+e+1,r,n,i)}function C(t,e,r,n,i){i||(G(void 0!==e&&null!==e,"missing value"),G("boolean"===typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3=t.length||B(t,e>=0?e:4294967295+e+1,r,n,i)}function M(t,e,r,n,o){o||(G(void 0!==e&&null!==e,"missing value"),G("boolean"===typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3=t.length||i.write(t,e,r,n,23,4)}function I(t,e,r,n,o){o||(G(void 0!==e&&null!==e,"missing value"),G("boolean"===typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+7=t.length||i.write(t,e,r,n,52,8)}function T(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}r.Buffer=o,r.SlowBuffer=o,r.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"===typeof e.subarray}catch(r){return!1}}(),o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.isBuffer=function(t){return!(null===t||void 0===t||!t._isBuffer)},o.byteLength=function(t,e){var r;switch(t+="",e||"utf8"){case"hex":r=t.length/2;break;case"utf8":case"utf-8":r=L(t).length;break;case"ascii":case"binary":case"raw":r=t.length;break;case"base64":r=j(t).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*t.length;break;default:throw new Error("Unknown encoding")}return r},o.concat=function(t,e){if(G(P(t),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===t.length)return new o(0);if(1===t.length)return t[0];var r;if("number"!==typeof e)for(e=0,r=0;rf&&(r=f):r=f,n=String(n||"utf8").toLowerCase()){case"hex":o=s(this,t,e,r);break;case"utf8":case"utf-8":o=a(this,t,e,r);break;case"ascii":o=u(this,t,e,r);break;case"binary":o=h(this,t,e,r);break;case"base64":o=c(this,t,e,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":o=l(this,t,e,r);break;default:throw new Error("Unknown encoding")}return o},o.prototype.toString=function(t,e,r){var n,i=this;if(t=String(t||"utf8").toLowerCase(),e=Number(e)||0,(r=void 0!==r?Number(r):r=i.length)===e)return"";switch(t){case"hex":n=y(i,e,r);break;case"utf8":case"utf-8":n=d(i,e,r);break;case"ascii":n=p(i,e,r);break;case"binary":n=g(i,e,r);break;case"base64":n=f(i,e,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=m(i,e,r);break;default:throw new Error("Unknown encoding")}return n},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(t,e,r,n){var i=this;if(r||(r=0),n||0===n||(n=this.length),e||(e=0),n!==r&&0!==t.length&&0!==i.length){G(n>=r,"sourceEnd < sourceStart"),G(e>=0&&e=0&&r=0&&n<=i.length,"sourceEnd out of bounds"),n>this.length&&(n=this.length),t.length-e=this.length))return this[t]},o.prototype.readUInt16LE=function(t,e){return v(this,t,!0,e)},o.prototype.readUInt16BE=function(t,e){return v(this,t,!1,e)},o.prototype.readUInt32LE=function(t,e){return b(this,t,!0,e)},o.prototype.readUInt32BE=function(t,e){return b(this,t,!1,e)},o.prototype.readInt8=function(t,e){if(e||(G(void 0!==t&&null!==t,"missing offset"),G(t=this.length))return 128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){return w(this,t,!0,e)},o.prototype.readInt16BE=function(t,e){return w(this,t,!1,e)},o.prototype.readInt32LE=function(t,e){return E(this,t,!0,e)},o.prototype.readInt32BE=function(t,e){return E(this,t,!1,e)},o.prototype.readFloatLE=function(t,e){return A(this,t,!0,e)},o.prototype.readFloatBE=function(t,e){return A(this,t,!1,e)},o.prototype.readDoubleLE=function(t,e){return k(this,t,!0,e)},o.prototype.readDoubleBE=function(t,e){return k(this,t,!1,e)},o.prototype.writeUInt8=function(t,e,r){r||(G(void 0!==t&&null!==t,"missing value"),G(void 0!==e&&null!==e,"missing offset"),G(e=this.length||(this[e]=t)},o.prototype.writeUInt16LE=function(t,e,r){S(this,t,e,!0,r)},o.prototype.writeUInt16BE=function(t,e,r){S(this,t,e,!1,r)},o.prototype.writeUInt32LE=function(t,e,r){B(this,t,e,!0,r)},o.prototype.writeUInt32BE=function(t,e,r){B(this,t,e,!1,r)},o.prototype.writeInt8=function(t,e,r){r||(G(void 0!==t&&null!==t,"missing value"),G(void 0!==e&&null!==e,"missing offset"),G(e=this.length||(t>=0?this.writeUInt8(t,e,r):this.writeUInt8(255+t+1,e,r))},o.prototype.writeInt16LE=function(t,e,r){x(this,t,e,!0,r)},o.prototype.writeInt16BE=function(t,e,r){x(this,t,e,!1,r)},o.prototype.writeInt32LE=function(t,e,r){C(this,t,e,!0,r)},o.prototype.writeInt32BE=function(t,e,r){C(this,t,e,!1,r)},o.prototype.writeFloatLE=function(t,e,r){M(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){M(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){I(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){I(this,t,e,!1,r)},o.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),"string"===typeof t&&(t=t.charCodeAt(0)),G("number"===typeof t&&!isNaN(t),"value is not a number"),G(r>=e,"end < start"),r!==e&&0!==this.length){G(e>=0&&e=0&&r<=this.length,"end out of bounds");for(var n=e;n"},o.prototype.toArrayBuffer=function(){if("undefined"!==typeof Uint8Array){if(o._useTypedArrays)return new o(this).buffer;for(var t=new Uint8Array(this.length),e=0,r=t.length;e=e?e:t>=0||(t+=e)>=0?t:0}function _(t){return(t=~~Math.ceil(+t))<0?0:t}function P(t){return(Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)})(t)}function N(t){return P(t)||o.isBuffer(t)||t&&"object"===typeof t&&"number"===typeof t.length}function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function L(t){for(var e=[],r=0;r=55296&&n<=57343&&r++;for(var o=encodeURIComponent(t.slice(i,r+1)).substr(1).split("%"),s=0;s>8,n=e%256,i.push(n),i.push(r);return i}function j(t){return n.toByteArray(t)}function K(t,e,r,n){for(var i=0;i=e.length||i>=t.length);i++)e[i+r]=t[i];return i}function z(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}function H(t,e){G("number"===typeof t,"cannot write a non-number as a number"),G(t>=0,"specified a negative value for writing an unsigned value"),G(t<=e,"value is larger than maximum value for type"),G(Math.floor(t)===t,"value has a fractional component")}function q(t,e,r){G("number"===typeof t,"cannot write a non-number as a number"),G(t<=e,"value larger than maximum allowed value"),G(t>=r,"value smaller than minimum allowed value"),G(Math.floor(t)===t,"value has a fractional component")}function V(t,e,r){G("number"===typeof t,"cannot write a non-number as a number"),G(t<=e,"value larger than maximum allowed value"),G(t>=r,"value smaller than minimum allowed value")}function G(t,e){if(!t)throw new Error(e||"Failed assertion")}o._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=O.get,t.set=O.set,t.write=O.write,t.toString=O.toString,t.toLocaleString=O.toString,t.toJSON=O.toJSON,t.copy=O.copy,t.slice=O.slice,t.readUInt8=O.readUInt8,t.readUInt16LE=O.readUInt16LE,t.readUInt16BE=O.readUInt16BE,t.readUInt32LE=O.readUInt32LE,t.readUInt32BE=O.readUInt32BE,t.readInt8=O.readInt8,t.readInt16LE=O.readInt16LE,t.readInt16BE=O.readInt16BE,t.readInt32LE=O.readInt32LE,t.readInt32BE=O.readInt32BE,t.readFloatLE=O.readFloatLE,t.readFloatBE=O.readFloatBE,t.readDoubleLE=O.readDoubleLE,t.readDoubleBE=O.readDoubleBE,t.writeUInt8=O.writeUInt8,t.writeUInt16LE=O.writeUInt16LE,t.writeUInt16BE=O.writeUInt16BE,t.writeUInt32LE=O.writeUInt32LE,t.writeUInt32BE=O.writeUInt32BE,t.writeInt8=O.writeInt8,t.writeInt16LE=O.writeInt16LE,t.writeInt16BE=O.writeInt16BE,t.writeInt32LE=O.writeInt32LE,t.writeInt32BE=O.writeInt32BE,t.writeFloatLE=O.writeFloatLE,t.writeFloatBE=O.writeFloatBE,t.writeDoubleLE=O.writeDoubleLE,t.writeDoubleBE=O.writeDoubleBE,t.fill=O.fill,t.inspect=O.inspect,t.toArrayBuffer=O.toArrayBuffer,t}},{"base64-js":3,ieee754:4}],3:[function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";var e="undefined"!==typeof Uint8Array?Uint8Array:Array,r="+".charCodeAt(0),i="/".charCodeAt(0),o="0".charCodeAt(0),s="a".charCodeAt(0),a="A".charCodeAt(0),u="-".charCodeAt(0),h="_".charCodeAt(0);function c(t){var e=t.charCodeAt(0);return e===r||e===u?62:e===i||e===h?63:e0)throw new Error("Invalid string. Length must be a multiple of 4");var u=t.length;s="="===t.charAt(u-2)?2:"="===t.charAt(u-1)?1:0,a=new e(3*t.length/4-s),i=s>0?t.length-4:t.length;var h=0;function l(t){a[h++]=t}for(r=0,n=0;r>16),l((65280&o)>>8),l(255&o);return 2===s?l(255&(o=c(t.charAt(r))<<2|c(t.charAt(r+1))>>4)):1===s&&(l((o=c(t.charAt(r))<<10|c(t.charAt(r+1))<<4|c(t.charAt(r+2))>>2)>>8&255),l(255&o)),a}function f(t){var e,r,i,o=t.length%3,s="";function a(t){return n.charAt(t)}function u(t){return a(t>>18&63)+a(t>>12&63)+a(t>>6&63)+a(63&t)}for(e=0,i=t.length-o;e>2),s+=a(r<<4&63),s+="==";break;case 2:s+=a((r=(t[t.length-2]<<8)+t[t.length-1])>>10),s+=a(r>>4&63),s+=a(r<<2&63),s+="="}return s}t.toByteArray=l,t.fromByteArray=f}("undefined"===typeof r?this.base64js={}:r)},{}],4:[function(t,e,r){r.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,c=-7,l=r?i-1:0,f=r?-1:1,d=t[e+l];for(l+=f,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+t[e+l],l+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+l],l+=f,c-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=h}return(d?-1:1)*s*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var s,a,u,h=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+l>=1?f/u:f*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=c?(a=0,s=c):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;t[r+d]=255&s,d+=p,s/=256,h-=8);t[r+d-p]|=128*g}},{}],5:[function(t,e,r){var n=t("buffer").Buffer,i=4,o=new n(i);o.fill(0);var s=8;function a(t,e){if(t.length%i!==0){var r=t.length+(i-t.length%i);t=n.concat([t,o],r)}for(var s=[],a=e?t.readInt32BE:t.readInt32LE,u=0;uu?e=t(e):e.length>5]|=128<>>9<<4)]=e;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,l=0;l>16)+(e>>16)+(r>>16)<<16|65535&r}function l(t,e){return t<>>32-e}e.exports=function(t){return n.hash(t,i,16)}},{"./helpers":5}],8:[function(t,e,r){!function(){var t,r;t=function(t){for(var e,r=new Array(t),n=0;n>>((3&n)<<3)&255;return r},this.crypto&&crypto.getRandomValues&&(r=function(t){var e=new Uint8Array(t);return crypto.getRandomValues(e),e}),e.exports=r||t}()},{}],9:[function(t,e,r){var n=t("./helpers");function i(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var r=Array(80),n=1732584193,i=-271733879,h=-1732584194,c=271733878,l=-1009589776,f=0;f>16)+(e>>16)+(r>>16)<<16|65535&r}function u(t,e){return t<>>32-e}e.exports=function(t){return n.hash(t,i,20,!0)}},{"./helpers":5}],10:[function(t,e,r){var n=t("./helpers"),i=function(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r},o=function(t,e){return t>>>e|t<<32-e},s=function(t,e){return t>>>e},a=function(t,e,r){return t&e^~t&r},u=function(t,e,r){return t&e^t&r^e&r},h=function(t){return o(t,2)^o(t,13)^o(t,22)},c=function(t){return o(t,6)^o(t,11)^o(t,25)},l=function(t){return o(t,7)^o(t,18)^s(t,3)},f=function(t){return o(t,17)^o(t,19)^s(t,10)},d=function(t,e){var r,n,o,s,d,p,g,y,m,v,b=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),w=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),E=new Array(64);t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var A=0;A=3&&(o=r),"[object Array]"===i.call(t)?s(t,e,o):"string"===typeof t?a(t,e,o):u(t,e,o)}},27296:function(t,e,r){"use strict";var n=r(40210)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(i){n=null}t.exports=n},96410:function(t,e,r){"use strict";var n=r(55419);t.exports=function(){return n()&&!!Symbol.toStringTag}},33715:function(t,e,r){var n=e;n.utils=r(26436),n.common=r(95772),n.sha=r(89041),n.ripemd=r(12949),n.hmac=r(52344),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},95772:function(t,e,r){"use strict";var n=r(26436),i=r(79746);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}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},26436:function(t,e,r){"use strict";var n=r(79746),i=r(35717);function o(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"===typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n>>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},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var u=0,h=e;return u+=(h=h+n>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,u,h){var c=0,l=e;return c+=(l=l+n>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,u,h){return e+n+o+a+h>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},8679:function(t,e,r){"use strict";var n=r(21296),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function u(t){return n.isMemo(t)?s:a[t.$$typeof]||i}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=s;var h=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;t.exports=function t(e,r,n){if("string"!==typeof r){if(p){var i=d(r);i&&i!==p&&t(e,i,n)}var s=c(r);l&&(s=s.concat(l(r)));for(var a=u(e),g=u(r),y=0;y=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=a?o:s},95320:function(t){"use strict";var e,r,n=Function.prototype.toString,i="object"===typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"===typeof i&&"function"===typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,e)}catch(d){d!==r&&(i=null)}else i=null;var o=/^\s*class\b/,s=function(t){try{var e=n.call(t);return o.test(e)}catch(r){return!1}},a=function(t){try{return!s(t)&&(n.call(t),!0)}catch(e){return!1}},u=Object.prototype.toString,h="function"===typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),l=function(){return!1};if("object"===typeof document){var f=document.all;u.call(f)===u.call(document.all)&&(l=function(t){if((c||!t)&&("undefined"===typeof t||"object"===typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(r){}return!1})}t.exports=i?function(t){if(l(t))return!0;if(!t)return!1;if("function"!==typeof t&&"object"!==typeof t)return!1;try{i(t,null,e)}catch(n){if(n!==r)return!1}return!s(t)&&a(t)}:function(t){if(l(t))return!0;if(!t)return!1;if("function"!==typeof t&&"object"!==typeof t)return!1;if(h)return a(t);if(s(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&a(t)}},48662:function(t,e,r){"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(96410)(),u=Object.getPrototypeOf;t.exports=function(t){if("function"!==typeof t)return!1;if(s.test(o.call(t)))return!0;if(!a)return"[object GeneratorFunction]"===i.call(t);if(!u)return!1;if("undefined"===typeof n){var e=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&u(e)}return u(t)===n}},85692:function(t,e,r){"use strict";var n=r(94029),i=r(63083),o=r(21924),s=o("Object.prototype.toString"),a=r(96410)(),u=r(27296),h="undefined"===typeof globalThis?r.g:globalThis,c=i(),l=o("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1}return!!u&&function(t){var e=!1;return n(d,(function(r,n){if(!e)try{e=r.call(t)===n}catch(i){}})),e}(t)}},1914:function(t){"use strict";const e=65536;t.exports=function(t){const r=new Uint8Array(t);let n=0;if(t>0)if(t>e)for(;nt?(crypto.getRandomValues(r.subarray(n,n+(t-n))),n+=t-n):(crypto.getRandomValues(r.subarray(n,n+e)),n+=e);else crypto.getRandomValues(r);return r}},12130:function(t,e,r){var n=r(48764).Buffer;"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof r.g&&r.g,t.exports=function(){"use strict";var t="3.7.5",e=t,r="function"===typeof atob,i="function"===typeof btoa,o="function"===typeof n,s="function"===typeof TextDecoder?new TextDecoder:void 0,a="function"===typeof TextEncoder?new TextEncoder:void 0,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h=Array.prototype.slice.call(u),c=function(t){var e={};return t.forEach((function(t,r){return e[t]=r})),e}(h),l=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,f=String.fromCharCode.bind(String),d="function"===typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t){return new Uint8Array(Array.prototype.slice.call(t,0))},p=function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))},g=function(t){return t.replace(/[^A-Za-z0-9\+\/]/g,"")},y=function(t){for(var e,r,n,i,o="",s=t.length%3,a=0;a255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");o+=h[(e=r<<16|n<<8|i)>>18&63]+h[e>>12&63]+h[e>>6&63]+h[63&e]}return s?o.slice(0,s-3)+"===".substring(s):o},m=i?function(t){return btoa(t)}:o?function(t){return n.from(t,"binary").toString("base64")}:y,v=o?function(t){return n.from(t).toString("base64")}:function(t){for(var e=4096,r=[],n=0,i=t.length;n>>6)+f(128|63&e):f(224|e>>>12&15)+f(128|e>>>6&63)+f(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return f(240|e>>>18&7)+f(128|e>>>12&63)+f(128|e>>>6&63)+f(128|63&e)},E=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,A=function(t){return t.replace(E,w)},k=o?function(t){return n.from(t,"utf8").toString("base64")}:a?function(t){return v(a.encode(t))}:function(t){return m(A(t))},S=function(t,e){return void 0===e&&(e=!1),e?p(k(t)):k(t)},B=function(t){return S(t,!0)},x=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,C=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return f(55296+(e>>>10))+f(56320+(1023&e));case 3:return f((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return f((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},M=function(t){return t.replace(x,C)},I=function(t){if(t=t.replace(/\s+/g,""),!l.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var e,r,n,i="",o=0;o>16&255):64===n?f(e>>16&255,e>>8&255):f(e>>16&255,e>>8&255,255&e);return i},T=r?function(t){return atob(g(t))}:o?function(t){return n.from(t,"base64").toString("binary")}:I,O=o?function(t){return d(n.from(t,"base64"))}:function(t){return d(T(t).split("").map((function(t){return t.charCodeAt(0)})))},R=function(t){return O(P(t))},_=o?function(t){return n.from(t,"base64").toString("utf8")}:s?function(t){return s.decode(O(t))}:function(t){return M(T(t))},P=function(t){return g(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})))},N=function(t){return _(P(t))},U=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}},L=function(){var t=function(t,e){return Object.defineProperty(String.prototype,t,U(e))};t("fromBase64",(function(){return N(this)})),t("toBase64",(function(t){return S(this,t)})),t("toBase64URI",(function(){return S(this,!0)})),t("toBase64URL",(function(){return S(this,!0)})),t("toUint8Array",(function(){return R(this)}))},D=function(){var t=function(t,e){return Object.defineProperty(Uint8Array.prototype,t,U(e))};t("toBase64",(function(t){return b(this,t)})),t("toBase64URI",(function(){return b(this,!0)})),t("toBase64URL",(function(){return b(this,!0)}))},F=function(){L(),D()},j={version:t,VERSION:e,atob:T,atobPolyfill:I,btoa:m,btoaPolyfill:y,fromBase64:N,toBase64:S,encode:S,encodeURI:B,encodeURL:B,utob:A,btou:M,decode:N,isValid:function(t){if("string"!==typeof t)return!1;var e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:b,toUint8Array:R,extendString:L,extendUint8Array:D,extendBuiltins:F,Base64:{}};return Object.keys(j).forEach((function(t){return j.Base64[t]=j[t]})),j}()},30728:function(t,e,r){var n,i=r(34155);!function(){"use strict";var e="object"===typeof window?window:{};!e.JS_CRC_NO_NODE_JS&&"object"===typeof i&&i.versions&&i.versions.node&&(e=r.g);var o,s,a,u,h=!e.JS_CRC_NO_COMMON_JS&&t.exports,c=r.amdO,l=!e.JS_CRC_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,f="0123456789abcdef".split(""),d=[{name:"crc32",polynom:3988292384,initValue:-1,bytes:4},{name:"crc16",polynom:40961,initValue:0,bytes:2}];for(o=0;o>>1:u>>>1;y.table[s]=u>>>0}}var p=function(t,e){var r="string"!==typeof t;r&&l&&t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n,i,o=e.initValue,s=t.length,a=e.table;if(r)for(i=0;i>>8;else for(i=0;i>>8:n<2048?a[255&((o=a[255&(o^(192|n>>6))]^o>>>8)^(128|63&n))]^o>>>8:n<55296||n>=57344?a[255&((o=a[255&((o=a[255&(o^(224|n>>12))]^o>>>8)^(128|n>>6&63))]^o>>>8)^(128|63&n))]^o>>>8:a[255&((o=a[255&((o=a[255&((o=a[255&(o^(240|(n=65536+((1023&n)<<10|1023&t.charCodeAt(++i)))>>18))]^o>>>8)^(128|n>>12&63))]^o>>>8)^(128|n>>6&63))]^o>>>8)^(128|63&n))]^o>>>8;o^=e.initValue;var u="";return e.bytes>2&&(u+=f[o>>28&15]+f[o>>24&15]+f[o>>20&15]+f[o>>16&15]),u+=f[o>>12&15]+f[o>>8&15]+f[o>>4&15]+f[15&o]},g={};for(o=0;o>6,s[u++]=128|63&o):o<55296||o>=57344?(s[u++]=224|o>>12,s[u++]=128|o>>6&63,s[u++]=128|63&o):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++n)),s[u++]=240|o>>18,s[u++]=128|o>>12&63,s[u++]=128|o>>6&63,s[u++]=128|63&o);t=s}else{if("object"!==i)throw new Error(ERROR);if(null===t)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(t)))throw new Error(ERROR)}t.length>64&&(t=new Sha256(e,!0).update(t).array());var h=[],c=[];for(n=0;n<64;++n){var l=t[n]||0;h[n]=92^l,c[n]=54^l}Sha256.call(this,e,r),this.update(c),this.oKeyPad=h,this.inner=!0,this.sharedMemory=r}Sha256.prototype.update=function(t){if(!this.finalized){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(ERROR);if(null===t)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(t)))throw new Error(ERROR);e=!0}for(var n,i,o=0,s=t.length,a=this.blocks;o>2]|=t[o]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(a[i>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=64?(this.block=a[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=EXTRA[3&e],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var t,e,r,n,i,o,s,a,u,h=this.h0,c=this.h1,l=this.h2,f=this.h3,d=this.h4,p=this.h5,g=this.h6,y=this.h7,m=this.blocks;for(t=16;t<64;++t)e=((i=m[t-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,r=((i=m[t-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,m[t]=m[t-16]+e+m[t-7]+r<<0;for(u=c&l,t=0;t<64;t+=4)this.first?(this.is224?(o=300032,y=(i=m[0]-1413257819)-150054599<<0,f=i+24177077<<0):(o=704751109,y=(i=m[0]-210244248)-1521486534<<0,f=i+143694565<<0),this.first=!1):(e=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),n=(o=h&c)^h&l^u,y=f+(i=y+(r=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&p^~d&g)+K[t]+m[t])<<0,f=i+(e+n)<<0),e=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),n=(s=f&h)^f&c^o,g=l+(i=g+(r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&d^~y&p)+K[t+1]+m[t+1])<<0,e=((l=i+(e+n)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),n=(a=l&f)^l&h^s,p=c+(i=p+(r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&y^~g&d)+K[t+2]+m[t+2])<<0,e=((c=i+(e+n)<<0)>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),n=(u=c&l)^c&f^a,d=h+(i=d+(r=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&g^~p&y)+K[t+3]+m[t+3])<<0,h=i+(e+n)<<0;this.h0=this.h0+h<<0,this.h1=this.h1+c<<0,this.h2=this.h2+l<<0,this.h3=this.h3+f<<0,this.h4=this.h4+d<<0,this.h5=this.h5+p<<0,this.h6=this.h6+g<<0,this.h7=this.h7+y<<0},Sha256.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s];return this.is224||(u+=HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]),u},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s];return this.is224||u.push(a>>24&255,a>>16&255,a>>8&255,255&a),u},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},91094:function(t,e,r){var n,i=r(34155);!function(){"use strict";var o="input is invalid type",s="object"===typeof window,a=s?window:{};a.JS_SHA3_NO_WINDOW&&(s=!1);var u=!s&&"object"===typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"===typeof i&&i.versions&&i.versions.node?a=r.g:u&&(a=self);var h=!a.JS_SHA3_NO_COMMON_JS&&t.exports,c=r.amdO,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,f="0123456789abcdef".split(""),d=[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],y=[224,256,384,512],m=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!l||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"===typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var w=function(t,e,r){return function(n){return new N(t,e,t).update(n)[r]()}},E=function(t,e,r){return function(n,i){return new N(t,e,i).update(n)[r]()}},A=function(t,e,r){return function(e,n,i,o){return C["cshake"+t].update(e,n,i,o)[r]()}},k=function(t,e,r){return function(e,n,i,o){return C["kmac"+t].update(e,n,i,o)[r]()}},S=function(t,e,r,n){for(var i=0;i>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 U(t,e,r){N.call(this,t,e,r)}N.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(o);if(null===t)throw new Error(o);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw new Error(o);e=!0}for(var n,i,s=this.blocks,a=this.byteCount,u=t.length,h=this.blockCount,c=0,f=this.s;c>2]|=t[c]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=a){for(this.start=n-a,this.block=s[h],n=0;n>=8);r>0;)i.unshift(r),r=255&(t>>=8),++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},N.prototype.encodeString=function(t){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(o);if(null===t)throw new Error(o);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw new Error(o);e=!0}var n=0,i=t.length;if(e)n=i;else for(var s=0;s=57344?n+=3:(a=65536+((1023&a)<<10|1023&t.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(t),n},N.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e>4&15]+f[15&t]+f[t>>12&15]+f[t>>8&15]+f[t>>20&15]+f[t>>16&15]+f[t>>28&15]+f[t>>24&15];s%e===0&&(L(r),o=0)}return i&&(t=r[o],a+=f[t>>4&15]+f[15&t],i>1&&(a+=f[t>>12&15]+f[t>>8&15]),i>2&&(a+=f[t>>20&15]+f[t>>16&15])),a},N.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;t=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(t);s>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;a%r===0&&L(n)}return o&&(t=a<<2,e=n[s],u[t]=255&e,o>1&&(u[t+1]=e>>8&255),o>2&&(u[t+2]=e>>16&255)),u},U.prototype=new N,U.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var L=function(t){var e,r,n,i,o,s,a,u,h,c,l,f,d,p,y,m,v,b,w,E,A,k,S,B,x,C,M,I,T,O,R,_,P,N,U,L,D,F,j,K,z,H,q,V,G,W,Z,J,Q,X,Y,$,tt,et,rt,nt,it,ot,st,at,ut,ht,ct;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],h=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],e=(f=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|a>>>31),r=(d=t[9]^t[19]^t[29]^t[39]^t[49])^(a<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(u<<1|h>>>31),r=o^(h<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(c<<1|l>>>31),r=a^(l<<1|c>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(f<<1|d>>>31),r=h^(d<<1|f>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=c^(i<<1|o>>>31),r=l^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,p=t[0],y=t[1],W=t[11]<<4|t[10]>>>28,Z=t[10]<<4|t[11]>>>28,I=t[20]<<3|t[21]>>>29,T=t[21]<<3|t[20]>>>29,at=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,q=t[41]<<18|t[40]>>>14,N=t[2]<<1|t[3]>>>31,U=t[3]<<1|t[2]>>>31,m=t[13]<<12|t[12]>>>20,v=t[12]<<12|t[13]>>>20,J=t[22]<<10|t[23]>>>22,Q=t[23]<<10|t[22]>>>22,O=t[33]<<13|t[32]>>>19,R=t[32]<<13|t[33]>>>19,ht=t[42]<<2|t[43]>>>30,ct=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,L=t[14]<<6|t[15]>>>26,D=t[15]<<6|t[14]>>>26,b=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,X=t[34]<<15|t[35]>>>17,Y=t[35]<<15|t[34]>>>17,_=t[45]<<29|t[44]>>>3,P=t[44]<<29|t[45]>>>3,B=t[6]<<28|t[7]>>>4,x=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,F=t[26]<<25|t[27]>>>7,j=t[27]<<25|t[26]>>>7,E=t[36]<<21|t[37]>>>11,A=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,V=t[8]<<27|t[9]>>>5,G=t[9]<<27|t[8]>>>5,C=t[18]<<20|t[19]>>>12,M=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,K=t[38]<<8|t[39]>>>24,z=t[39]<<8|t[38]>>>24,k=t[48]<<14|t[49]>>>18,S=t[49]<<14|t[48]>>>18,t[0]=p^~m&b,t[1]=y^~v&w,t[10]=B^~C&I,t[11]=x^~M&T,t[20]=N^~L&F,t[21]=U^~D&j,t[30]=V^~W&J,t[31]=G^~Z&Q,t[40]=et^~nt&ot,t[41]=rt^~it&st,t[2]=m^~b&E,t[3]=v^~w&A,t[12]=C^~I&O,t[13]=M^~T&R,t[22]=L^~F&K,t[23]=D^~j&z,t[32]=W^~J&X,t[33]=Z^~Q&Y,t[42]=nt^~ot&at,t[43]=it^~st&ut,t[4]=b^~E&k,t[5]=w^~A&S,t[14]=I^~O&_,t[15]=T^~R&P,t[24]=F^~K&H,t[25]=j^~z&q,t[34]=J^~X&$,t[35]=Q^~Y&tt,t[44]=ot^~at&ht,t[45]=st^~ut&ct,t[6]=E^~k&p,t[7]=A^~S&y,t[16]=O^~_&B,t[17]=R^~P&x,t[26]=K^~H&N,t[27]=z^~q&U,t[36]=X^~$&V,t[37]=Y^~tt&G,t[46]=at^~ht&et,t[47]=ut^~ct&rt,t[8]=k^~p&m,t[9]=S^~y&v,t[18]=_^~B&C,t[19]=P^~x&M,t[28]=H^~N&L,t[29]=q^~U&D,t[38]=$^~V&W,t[39]=tt^~G&Z,t[48]=ht^~et&nt,t[49]=ct^~rt&it,t[0]^=g[n],t[1]^=g[n+1]};if(h)t.exports=C;else{for(I=0;I>6,u[h++]=128|63&a):a<55296||a>=57344?(u[h++]=224|a>>12,u[h++]=128|a>>6&63,u[h++]=128|63&a):(a=65536+((1023&a)<<10|1023&t.charCodeAt(++l)),u[h++]=240|a>>18,u[h++]=128|a>>12&63,u[h++]=128|a>>6&63,u[h++]=128|63&a);t=u}t.length>128&&(t=new E(r,!0).update(t).array());var f=[],d=[];for(l=0;l<128;++l){var p=t[l]||0;f[l]=92^p,d[l]=54^p}E.call(this,r,n),this.update(d),this.oKeyPad=f,this.inner=!0,this.sharedMemory=n}E.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var r,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(e);if(null===t)throw new Error(e);if(c&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!c||!ArrayBuffer.isView(t)))throw new Error(e);r=!0}for(var i,o,s=0,a=t.length,u=this.blocks;s>2]|=t[s]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(u[o>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=128?(this.block=u[32],this.start=o-128,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},E.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[32]=this.block,t[e>>2]|=f[3&e],this.block=t[32],e>=112&&(this.hashed||this.hash(),t[0]=this.block,t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=t[16]=t[17]=t[18]=t[19]=t[20]=t[21]=t[22]=t[23]=t[24]=t[25]=t[26]=t[27]=t[28]=t[29]=t[30]=t[31]=t[32]=0),t[30]=this.hBytes<<3|this.bytes>>>29,t[31]=this.bytes<<3,this.hash()}},E.prototype.hash=function(){var t,e,r,n,i,o,s,a,u,h,c,l,f,d,g,y,m,v,b,w,E,A,k,S,B,x=this.h0h,C=this.h0l,M=this.h1h,I=this.h1l,T=this.h2h,O=this.h2l,R=this.h3h,_=this.h3l,P=this.h4h,N=this.h4l,U=this.h5h,L=this.h5l,D=this.h6h,F=this.h6l,j=this.h7h,K=this.h7l,z=this.blocks;for(t=32;t<160;t+=2)e=((w=z[t-30])>>>1|(E=z[t-29])<<31)^(w>>>8|E<<24)^w>>>7,r=(E>>>1|w<<31)^(E>>>8|w<<24)^(E>>>7|w<<25),n=((w=z[t-4])>>>19|(E=z[t-3])<<13)^(E>>>29|w<<3)^w>>>6,i=(E>>>19|w<<13)^(w>>>29|E<<3)^(E>>>6|w<<26),w=z[t-32],E=z[t-31],u=((A=z[t-14])>>>16)+(w>>>16)+(e>>>16)+(n>>>16)+((a=(65535&A)+(65535&w)+(65535&e)+(65535&n)+((s=((k=z[t-13])>>>16)+(E>>>16)+(r>>>16)+(i>>>16)+((o=(65535&k)+(65535&E)+(65535&r)+(65535&i))>>>16))>>>16))>>>16),z[t]=u<<16|65535&a,z[t+1]=s<<16|65535&o;var H=x,q=C,V=M,G=I,W=T,Z=O,J=R,Q=_,X=P,Y=N,$=U,tt=L,et=D,rt=F,nt=j,it=K;for(y=V&W,m=G&Z,t=0;t<160;t+=8)e=(H>>>28|q<<4)^(q>>>2|H<<30)^(q>>>7|H<<25),r=(q>>>28|H<<4)^(H>>>2|q<<30)^(H>>>7|q<<25),n=(X>>>14|Y<<18)^(X>>>18|Y<<14)^(Y>>>9|X<<23),i=(Y>>>14|X<<18)^(Y>>>18|X<<14)^(X>>>9|Y<<23),v=(h=H&V)^H&W^y,b=(c=q&G)^q&Z^m,S=X&$^~X&et,B=Y&tt^~Y&rt,w=z[t],E=z[t+1],w=(u=((A=p[t])>>>16)+(w>>>16)+(S>>>16)+(n>>>16)+(nt>>>16)+((a=(65535&A)+(65535&w)+(65535&S)+(65535&n)+(65535&nt)+((s=((k=p[t+1])>>>16)+(E>>>16)+(B>>>16)+(i>>>16)+(it>>>16)+((o=(65535&k)+(65535&E)+(65535&B)+(65535&i)+(65535&it))>>>16))>>>16))>>>16))<<16|65535&a,E=s<<16|65535&o,A=(u=(v>>>16)+(e>>>16)+((a=(65535&v)+(65535&e)+((s=(b>>>16)+(r>>>16)+((o=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,k=s<<16|65535&o,nt=(u=(J>>>16)+(w>>>16)+((a=(65535&J)+(65535&w)+((s=(Q>>>16)+(E>>>16)+((o=(65535&Q)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a,it=s<<16|65535&o,e=((J=(u=(A>>>16)+(w>>>16)+((a=(65535&A)+(65535&w)+((s=(k>>>16)+(E>>>16)+((o=(65535&k)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(Q=s<<16|65535&o)<<4)^(Q>>>2|J<<30)^(Q>>>7|J<<25),r=(Q>>>28|J<<4)^(J>>>2|Q<<30)^(J>>>7|Q<<25),n=(nt>>>14|it<<18)^(nt>>>18|it<<14)^(it>>>9|nt<<23),i=(it>>>14|nt<<18)^(it>>>18|nt<<14)^(nt>>>9|it<<23),v=(l=J&H)^J&V^h,b=(f=Q&q)^Q&G^c,S=nt&X^~nt&$,B=it&Y^~it&tt,w=z[t+2],E=z[t+3],w=(u=((A=p[t+2])>>>16)+(w>>>16)+(S>>>16)+(n>>>16)+(et>>>16)+((a=(65535&A)+(65535&w)+(65535&S)+(65535&n)+(65535&et)+((s=((k=p[t+3])>>>16)+(E>>>16)+(B>>>16)+(i>>>16)+(rt>>>16)+((o=(65535&k)+(65535&E)+(65535&B)+(65535&i)+(65535&rt))>>>16))>>>16))>>>16))<<16|65535&a,E=s<<16|65535&o,A=(u=(v>>>16)+(e>>>16)+((a=(65535&v)+(65535&e)+((s=(b>>>16)+(r>>>16)+((o=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,k=s<<16|65535&o,et=(u=(W>>>16)+(w>>>16)+((a=(65535&W)+(65535&w)+((s=(Z>>>16)+(E>>>16)+((o=(65535&Z)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a,rt=s<<16|65535&o,e=((W=(u=(A>>>16)+(w>>>16)+((a=(65535&A)+(65535&w)+((s=(k>>>16)+(E>>>16)+((o=(65535&k)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(Z=s<<16|65535&o)<<4)^(Z>>>2|W<<30)^(Z>>>7|W<<25),r=(Z>>>28|W<<4)^(W>>>2|Z<<30)^(W>>>7|Z<<25),n=(et>>>14|rt<<18)^(et>>>18|rt<<14)^(rt>>>9|et<<23),i=(rt>>>14|et<<18)^(rt>>>18|et<<14)^(et>>>9|rt<<23),v=(d=W&J)^W&H^l,b=(g=Z&Q)^Z&q^f,S=et&nt^~et&X,B=rt&it^~rt&Y,w=z[t+4],E=z[t+5],w=(u=((A=p[t+4])>>>16)+(w>>>16)+(S>>>16)+(n>>>16)+($>>>16)+((a=(65535&A)+(65535&w)+(65535&S)+(65535&n)+(65535&$)+((s=((k=p[t+5])>>>16)+(E>>>16)+(B>>>16)+(i>>>16)+(tt>>>16)+((o=(65535&k)+(65535&E)+(65535&B)+(65535&i)+(65535&tt))>>>16))>>>16))>>>16))<<16|65535&a,E=s<<16|65535&o,A=(u=(v>>>16)+(e>>>16)+((a=(65535&v)+(65535&e)+((s=(b>>>16)+(r>>>16)+((o=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,k=s<<16|65535&o,$=(u=(V>>>16)+(w>>>16)+((a=(65535&V)+(65535&w)+((s=(G>>>16)+(E>>>16)+((o=(65535&G)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a,tt=s<<16|65535&o,e=((V=(u=(A>>>16)+(w>>>16)+((a=(65535&A)+(65535&w)+((s=(k>>>16)+(E>>>16)+((o=(65535&k)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(G=s<<16|65535&o)<<4)^(G>>>2|V<<30)^(G>>>7|V<<25),r=(G>>>28|V<<4)^(V>>>2|G<<30)^(V>>>7|G<<25),n=($>>>14|tt<<18)^($>>>18|tt<<14)^(tt>>>9|$<<23),i=(tt>>>14|$<<18)^(tt>>>18|$<<14)^($>>>9|tt<<23),v=(y=V&W)^V&J^d,b=(m=G&Z)^G&Q^g,S=$&et^~$&nt,B=tt&rt^~tt&it,w=z[t+6],E=z[t+7],w=(u=((A=p[t+6])>>>16)+(w>>>16)+(S>>>16)+(n>>>16)+(X>>>16)+((a=(65535&A)+(65535&w)+(65535&S)+(65535&n)+(65535&X)+((s=((k=p[t+7])>>>16)+(E>>>16)+(B>>>16)+(i>>>16)+(Y>>>16)+((o=(65535&k)+(65535&E)+(65535&B)+(65535&i)+(65535&Y))>>>16))>>>16))>>>16))<<16|65535&a,E=s<<16|65535&o,A=(u=(v>>>16)+(e>>>16)+((a=(65535&v)+(65535&e)+((s=(b>>>16)+(r>>>16)+((o=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,k=s<<16|65535&o,X=(u=(H>>>16)+(w>>>16)+((a=(65535&H)+(65535&w)+((s=(q>>>16)+(E>>>16)+((o=(65535&q)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a,Y=s<<16|65535&o,H=(u=(A>>>16)+(w>>>16)+((a=(65535&A)+(65535&w)+((s=(k>>>16)+(E>>>16)+((o=(65535&k)+(65535&E))>>>16))>>>16))>>>16))<<16|65535&a,q=s<<16|65535&o;u=(x>>>16)+(H>>>16)+((a=(65535&x)+(65535&H)+((s=(C>>>16)+(q>>>16)+((o=(65535&C)+(65535&q))>>>16))>>>16))>>>16),this.h0h=u<<16|65535&a,this.h0l=s<<16|65535&o,u=(M>>>16)+(V>>>16)+((a=(65535&M)+(65535&V)+((s=(I>>>16)+(G>>>16)+((o=(65535&I)+(65535&G))>>>16))>>>16))>>>16),this.h1h=u<<16|65535&a,this.h1l=s<<16|65535&o,u=(T>>>16)+(W>>>16)+((a=(65535&T)+(65535&W)+((s=(O>>>16)+(Z>>>16)+((o=(65535&O)+(65535&Z))>>>16))>>>16))>>>16),this.h2h=u<<16|65535&a,this.h2l=s<<16|65535&o,u=(R>>>16)+(J>>>16)+((a=(65535&R)+(65535&J)+((s=(_>>>16)+(Q>>>16)+((o=(65535&_)+(65535&Q))>>>16))>>>16))>>>16),this.h3h=u<<16|65535&a,this.h3l=s<<16|65535&o,u=(P>>>16)+(X>>>16)+((a=(65535&P)+(65535&X)+((s=(N>>>16)+(Y>>>16)+((o=(65535&N)+(65535&Y))>>>16))>>>16))>>>16),this.h4h=u<<16|65535&a,this.h4l=s<<16|65535&o,u=(U>>>16)+($>>>16)+((a=(65535&U)+(65535&$)+((s=(L>>>16)+(tt>>>16)+((o=(65535&L)+(65535&tt))>>>16))>>>16))>>>16),this.h5h=u<<16|65535&a,this.h5l=s<<16|65535&o,u=(D>>>16)+(et>>>16)+((a=(65535&D)+(65535&et)+((s=(F>>>16)+(rt>>>16)+((o=(65535&F)+(65535&rt))>>>16))>>>16))>>>16),this.h6h=u<<16|65535&a,this.h6l=s<<16|65535&o,u=(j>>>16)+(nt>>>16)+((a=(65535&j)+(65535&nt)+((s=(K>>>16)+(it>>>16)+((o=(65535&K)+(65535&it))>>>16))>>>16))>>>16),this.h7h=u<<16|65535&a,this.h7l=s<<16|65535&o},E.prototype.hex=function(){this.finalize();var t=this.h0h,e=this.h0l,r=this.h1h,n=this.h1l,i=this.h2h,o=this.h2l,s=this.h3h,a=this.h3l,u=this.h4h,h=this.h4l,c=this.h5h,f=this.h5l,d=this.h6h,p=this.h6l,g=this.h7h,y=this.h7l,m=this.bits,v=l[t>>28&15]+l[t>>24&15]+l[t>>20&15]+l[t>>16&15]+l[t>>12&15]+l[t>>8&15]+l[t>>4&15]+l[15&t]+l[e>>28&15]+l[e>>24&15]+l[e>>20&15]+l[e>>16&15]+l[e>>12&15]+l[e>>8&15]+l[e>>4&15]+l[15&e]+l[r>>28&15]+l[r>>24&15]+l[r>>20&15]+l[r>>16&15]+l[r>>12&15]+l[r>>8&15]+l[r>>4&15]+l[15&r]+l[n>>28&15]+l[n>>24&15]+l[n>>20&15]+l[n>>16&15]+l[n>>12&15]+l[n>>8&15]+l[n>>4&15]+l[15&n]+l[i>>28&15]+l[i>>24&15]+l[i>>20&15]+l[i>>16&15]+l[i>>12&15]+l[i>>8&15]+l[i>>4&15]+l[15&i]+l[o>>28&15]+l[o>>24&15]+l[o>>20&15]+l[o>>16&15]+l[o>>12&15]+l[o>>8&15]+l[o>>4&15]+l[15&o]+l[s>>28&15]+l[s>>24&15]+l[s>>20&15]+l[s>>16&15]+l[s>>12&15]+l[s>>8&15]+l[s>>4&15]+l[15&s];return m>=256&&(v+=l[a>>28&15]+l[a>>24&15]+l[a>>20&15]+l[a>>16&15]+l[a>>12&15]+l[a>>8&15]+l[a>>4&15]+l[15&a]),m>=384&&(v+=l[u>>28&15]+l[u>>24&15]+l[u>>20&15]+l[u>>16&15]+l[u>>12&15]+l[u>>8&15]+l[u>>4&15]+l[15&u]+l[h>>28&15]+l[h>>24&15]+l[h>>20&15]+l[h>>16&15]+l[h>>12&15]+l[h>>8&15]+l[h>>4&15]+l[15&h]+l[c>>28&15]+l[c>>24&15]+l[c>>20&15]+l[c>>16&15]+l[c>>12&15]+l[c>>8&15]+l[c>>4&15]+l[15&c]+l[f>>28&15]+l[f>>24&15]+l[f>>20&15]+l[f>>16&15]+l[f>>12&15]+l[f>>8&15]+l[f>>4&15]+l[15&f]),512==m&&(v+=l[d>>28&15]+l[d>>24&15]+l[d>>20&15]+l[d>>16&15]+l[d>>12&15]+l[d>>8&15]+l[d>>4&15]+l[15&d]+l[p>>28&15]+l[p>>24&15]+l[p>>20&15]+l[p>>16&15]+l[p>>12&15]+l[p>>8&15]+l[p>>4&15]+l[15&p]+l[g>>28&15]+l[g>>24&15]+l[g>>20&15]+l[g>>16&15]+l[g>>12&15]+l[g>>8&15]+l[g>>4&15]+l[15&g]+l[y>>28&15]+l[y>>24&15]+l[y>>20&15]+l[y>>16&15]+l[y>>12&15]+l[y>>8&15]+l[y>>4&15]+l[15&y]),v},E.prototype.toString=E.prototype.hex,E.prototype.digest=function(){this.finalize();var t=this.h0h,e=this.h0l,r=this.h1h,n=this.h1l,i=this.h2h,o=this.h2l,s=this.h3h,a=this.h3l,u=this.h4h,h=this.h4l,c=this.h5h,l=this.h5l,f=this.h6h,d=this.h6l,p=this.h7h,g=this.h7l,y=this.bits,m=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s];return y>=256&&m.push(a>>24&255,a>>16&255,a>>8&255,255&a),y>=384&&m.push(u>>24&255,u>>16&255,u>>8&255,255&u,h>>24&255,h>>16&255,h>>8&255,255&h,c>>24&255,c>>16&255,c>>8&255,255&c,l>>24&255,l>>16&255,l>>8&255,255&l),512==y&&m.push(f>>24&255,f>>16&255,f>>8&255,255&f,d>>24&255,d>>16&255,d>>8&255,255&d,p>>24&255,p>>16&255,p>>8&255,255&p,g>>24&255,g>>16&255,g>>8&255,255&g),m},E.prototype.array=E.prototype.digest,E.prototype.arrayBuffer=function(){this.finalize();var t=this.bits,e=new ArrayBuffer(t/8),r=new DataView(e);return r.setUint32(0,this.h0h),r.setUint32(4,this.h0l),r.setUint32(8,this.h1h),r.setUint32(12,this.h1l),r.setUint32(16,this.h2h),r.setUint32(20,this.h2l),r.setUint32(24,this.h3h),t>=256&&r.setUint32(28,this.h3l),t>=384&&(r.setUint32(32,this.h4h),r.setUint32(36,this.h4l),r.setUint32(40,this.h5h),r.setUint32(44,this.h5l)),512==t&&(r.setUint32(48,this.h6h),r.setUint32(52,this.h6l),r.setUint32(56,this.h7h),r.setUint32(60,this.h7l)),e},E.prototype.clone=function(){var t=new E(this.bits,!1);return this.copyTo(t),t},E.prototype.copyTo=function(t){var e=0,r=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(e=0;e`${t} (${e})`)).join(" / ");throw n(new Error(`Invalid key length ${t.length} bytes. Must be ${e}`),"ERR_INVALID_KEY_LENGTH")}return e}},98380:function(t,e,r){"use strict";r(8925);const n=r(3832),{toString:i}=r(92263),{fromString:o}=r(52217);t.exports={createCipheriv:(t,e,r)=>{const s=n.cipher.createCipher("AES-CTR",i(e,"ascii"));return s.start({iv:i(r,"ascii")}),{update:t=>(s.update(n.util.createBuffer(i(t,"ascii"))),o(s.output.getBytes(),"ascii"))}},createDecipheriv:(t,e,r)=>{const s=n.cipher.createDecipher("AES-CTR",i(e,"ascii"));return s.start({iv:i(r,"ascii")}),{update:t=>(s.update(n.util.createBuffer(i(t,"ascii"))),o(s.output.getBytes(),"ascii"))}}}},88411:function(t,e,r){"use strict";const n=r(98380),i=r(73226);e.create=async function(t,e){const r=i(t),o=n.createCipheriv(r,t,e),s=n.createDecipheriv(r,t,e);return{encrypt:async t=>o.update(t),decrypt:async t=>s.update(t)}}},27552:function(t,e,r){"use strict";const{concat:n}=r(20605),{fromString:i}=r(52217),o=r(63649);t.exports={create:function({algorithm:t="AES-GCM",nonceLength:e=12,keyLength:r=16,digest:s="SHA-256",saltLength:a=16,iterations:u=32767}={}){const h=o.get();return r*=8,{encrypt:async function(o,c){const l=h.getRandomValues(new Uint8Array(a)),f=h.getRandomValues(new Uint8Array(e)),d={name:t,iv:f},p={name:"PBKDF2",salt:l,iterations:u,hash:{name:s}},g=await h.subtle.importKey("raw",i(c),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]),y=await h.subtle.deriveKey(p,g,{name:t,length:r},!0,["encrypt"]),m=await h.subtle.encrypt(d,y,o);return n([l,d.iv,new Uint8Array(m)])},decrypt:async function(n,o){const c=n.slice(0,a),l=n.slice(a,a+e),f=n.slice(a+e),d={name:t,iv:l},p={name:"PBKDF2",salt:c,iterations:u,hash:{name:s}},g=await h.subtle.importKey("raw",i(o),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]),y=await h.subtle.deriveKey(p,g,{name:t,length:r},!0,["decrypt"]),m=await h.subtle.decrypt(d,y,f);return new Uint8Array(m)}}}}},31088:function(t,e,r){"use strict";const n=r(63649),i=r(38872),o={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};e.create=async function(t,e){const r=o[t],s=await n.get().subtle.importKey("raw",e,{name:"HMAC",hash:{name:r}},!1,["sign"]);return{digest:async t=>(async(t,e)=>{const r=await n.get().subtle.sign({name:"HMAC"},t,e);return new Uint8Array(r,r.byteOffset,r.byteLength)})(s,t),length:i[t]}}},38872:function(t){"use strict";t.exports={SHA1:20,SHA256:32,SHA512:64}},82204:function(t,e,r){"use strict";const n=r(31088),i=r(88411),o=r(14437);e.XP=o,r(87503),r(93221)},78590:function(t,e,r){"use strict";const n=r(32114),i=r(63649),{base64urlToBuffer:o}=r(56441),s=r(45753),{toString:a}=r(92263),{concat:u}=r(20605),{equals:h}=r(19588),c={"P-256":256,"P-384":384,"P-521":521};e.generateEphmeralKeyPair=async function(t){s(Object.keys(c),t);const e=await i.get().subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]);return{key:f(await i.get().subtle.exportKey("jwk",e.publicKey)),genSharedKey:async(r,n)=>{let o;o=n?await i.get().subtle.importKey("jwk",p(t,n),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):e.privateKey;const s=[await i.get().subtle.importKey("jwk",d(t,r),{name:"ECDH",namedCurve:t},!1,[]),o],a=await i.get().subtle.deriveBits({name:"ECDH",namedCurve:t,public:s[0]},s[1],c[t]);return new Uint8Array(a,a.byteOffset,a.byteLength)}}};const l={"P-256":32,"P-384":48,"P-521":66};function f(t){const e=l[t.crv];return u([Uint8Array.from([4]),o(t.x,e),o(t.y,e)],1+2*e)}function d(t,e){const r=l[t];if(h(!e.slice(0,1),Uint8Array.from([4])))throw n(new Error("Cannot unmarshal public key - invalid key format"),"ERR_INVALID_KEY_FORMAT");return{kty:"EC",crv:t,x:a(e.slice(1,r+1),"base64url"),y:a(e.slice(1+r),"base64url"),ext:!0}}const p=(t,e)=>({...d(t,e.public),d:a(e.private,"base64url")})},96535:function(t,e,r){"use strict";const n=r(32114),{equals:i}=r(19588),{sha256:o}=r(41256),{base58btc:s}=r(45522),{identity:a}=r(27871),u=r(71127),h=r(17241),c=r(69716);class l{constructor(t){this._key=d(t,u.publicKeyLength)}async verify(t,e){return u.hashAndVerify(this._key,e,t)}marshal(){return this._key}get bytes(){return h.PublicKey.encode({Type:h.KeyType.Ed25519,Data:this.marshal()}).finish()}equals(t){return i(this.bytes,t.bytes)}async hash(){const{bytes:t}=await o.digest(this.bytes);return t}}class f{constructor(t,e){this._key=d(t,u.privateKeyLength),this._publicKey=d(e,u.publicKeyLength)}async sign(t){return u.hashAndSign(this._key,t)}get public(){return new l(this._publicKey)}marshal(){return this._key}get bytes(){return h.PrivateKey.encode({Type:h.KeyType.Ed25519,Data:this.marshal()}).finish()}equals(t){return i(this.bytes,t.bytes)}async hash(){const{bytes:t}=await o.digest(this.bytes);return t}async id(){const t=await a.digest(this.public.bytes);return s.encode(t.bytes).substring(1)}async export(t,e="libp2p-key"){if("libp2p-key"===e)return c.export(this.bytes,t);throw n(new Error(`export format '${e}' is not supported`),"ERR_INVALID_EXPORT_FORMAT")}}function d(t,e){if((t=Uint8Array.from(t||[])).length!==e)throw n(new Error(`Key must be a Uint8Array of length ${e}, got ${t.length}`),"ERR_INVALID_KEY_TYPE");return t}t.exports={Ed25519PublicKey:l,Ed25519PrivateKey:f,unmarshalEd25519PrivateKey:function(t){if(t.length>u.privateKeyLength){const e=(t=d(t,u.privateKeyLength+u.publicKeyLength)).slice(0,u.privateKeyLength),r=t.slice(u.privateKeyLength,t.length);return new f(e,r)}const e=(t=d(t,u.privateKeyLength)).slice(0,u.privateKeyLength),r=t.slice(u.publicKeyLength);return new f(e,r)},unmarshalEd25519PublicKey:function(t){return t=d(t,u.publicKeyLength),new l(t)},generateKeyPair:async function(){const{privateKey:t,publicKey:e}=await u.generateKey();return new f(t,e)},generateKeyPairFromSeed:async function(t){const{privateKey:e,publicKey:r}=await u.generateKeyFromSeed(t);return new f(e,r)}}},71127:function(t,e,r){"use strict";const n=r(50222);function i(t,r){const n=new Uint8Array(e.privateKeyLength);for(let e=0;e<32;e++)n[e]=t[e],n[32+e]=r[e];return n}e.publicKeyLength=32,e.privateKeyLength=64,e.generateKey=async function(){const t=n.utils.randomPrivateKey(),e=await n.getPublicKey(t);return{privateKey:i(t,e),publicKey:e}},e.generateKeyFromSeed=async function(t){if(32!==t.length)throw new TypeError('"seed" must be 32 bytes in length.');if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, or Uint8Array.');const e=t,r=await n.getPublicKey(e);return{privateKey:i(e,r),publicKey:r}},e.hashAndSign=function(t,e){const r=t.slice(0,32);return n.sign(e,r)},e.hashAndVerify=function(t,e,r){return n.verify(e,r,t)}},55563:function(t,e,r){"use strict";const n=r(78590);t.exports=async t=>n.generateEphmeralKeyPair(t)},69716:function(t,e,r){"use strict";const{base64:n}=r(23456),i=r(27552);t.exports={export:async function(t,e){const r=i.create(),o=await r.encrypt(t,e);return n.encode(o)}}},24709:function(t,e,r){"use strict";const{base64:n}=r(23456),i=r(27552);t.exports={import:async function(t,e){const r=n.decode(t),o=i.create();return await o.decrypt(r,e)}}},14437:function(t,e,r){"use strict";const n=r(17241);r(3068),r(97450);const i=r(3832),o=r(32114),{fromString:s}=r(52217),a=r(24709),u={rsa:r(19950),ed25519:r(96535),secp256k1:r(49434)(n,r(87503))},h="secp256k1 support requires libp2p-crypto-secp256k1 package",c="ERR_MISSING_PACKAGE";function l(t){const e=u[t.toLowerCase()];if(!e){const e=Object.keys(u).join(" / ");throw o(new Error(`invalid or unsupported key type ${t}. Must be ${e}`),"ERR_UNSUPPORTED_KEY_TYPE")}return e}const f=async t=>{const e=n.PrivateKey.decode(t),r=e.Data;switch(e.Type){case n.KeyType.RSA:return u.rsa.unmarshalRsaPrivateKey(r);case n.KeyType.Ed25519:return u.ed25519.unmarshalEd25519PrivateKey(r);case n.KeyType.Secp256k1:if(u.secp256k1)return u.secp256k1.unmarshalSecp256k1PrivateKey(r);throw o(new Error(h),c);default:l(e.Type)}};t.exports={supportedKeys:u,keysPBM:n,keyStretcher:r(73494),generateEphemeralKeyPair:r(55563),generateKeyPair:async(t,e)=>l(t).generateKeyPair(e),generateKeyPairFromSeed:async(t,e,r)=>{const n=l(t);if("ed25519"!==t.toLowerCase())throw o(new Error("Seed key derivation is unimplemented for RSA or secp256k1"),"ERR_UNSUPPORTED_KEY_DERIVATION_TYPE");return n.generateKeyPairFromSeed(e,r)},unmarshalPublicKey:t=>{const e=n.PublicKey.decode(t),r=e.Data;switch(e.Type){case n.KeyType.RSA:return u.rsa.unmarshalRsaPublicKey(r);case n.KeyType.Ed25519:return u.ed25519.unmarshalEd25519PublicKey(r);case n.KeyType.Secp256k1:if(u.secp256k1)return u.secp256k1.unmarshalSecp256k1PublicKey(r);throw o(new Error(h),c);default:l(e.Type)}},marshalPublicKey:(t,e)=>(l(e=(e||"rsa").toLowerCase()),t.bytes),unmarshalPrivateKey:f,marshalPrivateKey:(t,e)=>(l(e=(e||"rsa").toLowerCase()),t.bytes),import:async(t,e)=>{try{const r=await a.import(t,e);return f(r)}catch(h){}const r=i.pki.decryptRsaPrivateKey(t,e);if(null===r)throw o(new Error("Cannot read the key, most likely the password is wrong or not a RSA key"),"ERR_CANNOT_DECRYPT_PEM");let n=i.asn1.toDer(i.pki.privateKeyToAsn1(r));return n=s(n.getBytes(),"ascii"),u.rsa.unmarshalRsaPrivateKey(n)}}},925:function(t,e,r){"use strict";r(28095);const n=r(3832),{base64urlToBigInteger:i}=r(56441);function o(t,e){return e.map((e=>i(t[e])))}t.exports={jwk2pub:function(t){return n.pki.setRsaPublicKey(...o(t,["n","e"]))},jwk2priv:function(t){return n.pki.setRsaPrivateKey(...o(t,["n","e","d","p","q","dp","dq","qi"]))}}},73494:function(t,e,r){"use strict";const n=r(32114),{concat:i}=r(20605),{fromString:o}=r(52217),s=r(31088),a={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};t.exports=async(t,e,r)=>{const u=a[t];if(!u){const e=Object.keys(a).join(" / ");throw n(new Error(`unknown cipher type '${t}'. Must be ${e}`),"ERR_INVALID_CIPHER_TYPE")}if(!e)throw n(new Error("missing hash type"),"ERR_MISSING_HASH_TYPE");const h=u.keySize,c=u.ivSize,l=o("key expansion"),f=2*(c+h+20),d=await s.create(e,r);let p=await d.digest(l);const g=[];let y=0;for(;yf&&(e=f-y),g.push(t),y+=e,p=await d.digest(p)}const m=f/2,v=i(g),b=v.slice(0,m),w=v.slice(m,f),E=t=>({iv:t.slice(0,c),cipherKey:t.slice(c,c+h),macKey:t.slice(c+h)});return{k1:E(b),k2:E(w)}}},17241:function(t,e,r){"use strict";var n=r(62100),i=n.Reader,o=n.Writer,s=n.util,a=n.roots["libp2p-crypto-keys"]||(n.roots["libp2p-crypto-keys"]={});a.KeyType=function(){var t={},e=Object.create(t);return e[t[0]="RSA"]=0,e[t[1]="Ed25519"]=1,e[t[2]="Secp256k1"]=2,e}(),a.PublicKey=function(){function t(t){if(t)for(var e=Object.keys(t),r=0;r>>3){case 1:n.Type=t.int32();break;case 2:n.Data=t.bytes();break;default:t.skipType(7&o)}}if(!n.hasOwnProperty("Type"))throw s.ProtocolError("missing required 'Type'",{instance:n});if(!n.hasOwnProperty("Data"))throw s.ProtocolError("missing required 'Data'",{instance:n});return n},t.fromObject=function(t){if(t instanceof a.PublicKey)return t;var e=new a.PublicKey;switch(t.Type){case"RSA":case 0:e.Type=0;break;case"Ed25519":case 1:e.Type=1;break;case"Secp256k1":case 2:e.Type=2}return null!=t.Data&&("string"===typeof t.Data?s.base64.decode(t.Data,e.Data=s.newBuffer(s.base64.length(t.Data)),0):t.Data.length&&(e.Data=t.Data)),e},t.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.Type=e.enums===String?"RSA":0,e.bytes===String?r.Data="":(r.Data=[],e.bytes!==Array&&(r.Data=s.newBuffer(r.Data)))),null!=t.Type&&t.hasOwnProperty("Type")&&(r.Type=e.enums===String?a.KeyType[t.Type]:t.Type),null!=t.Data&&t.hasOwnProperty("Data")&&(r.Data=e.bytes===String?s.base64.encode(t.Data,0,t.Data.length):e.bytes===Array?Array.prototype.slice.call(t.Data):t.Data),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},t}(),a.PrivateKey=function(){function t(t){if(t)for(var e=Object.keys(t),r=0;r>>3){case 1:n.Type=t.int32();break;case 2:n.Data=t.bytes();break;default:t.skipType(7&o)}}if(!n.hasOwnProperty("Type"))throw s.ProtocolError("missing required 'Type'",{instance:n});if(!n.hasOwnProperty("Data"))throw s.ProtocolError("missing required 'Data'",{instance:n});return n},t.fromObject=function(t){if(t instanceof a.PrivateKey)return t;var e=new a.PrivateKey;switch(t.Type){case"RSA":case 0:e.Type=0;break;case"Ed25519":case 1:e.Type=1;break;case"Secp256k1":case 2:e.Type=2}return null!=t.Data&&("string"===typeof t.Data?s.base64.decode(t.Data,e.Data=s.newBuffer(s.base64.length(t.Data)),0):t.Data.length&&(e.Data=t.Data)),e},t.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.Type=e.enums===String?"RSA":0,e.bytes===String?r.Data="":(r.Data=[],e.bytes!==Array&&(r.Data=s.newBuffer(r.Data)))),null!=t.Type&&t.hasOwnProperty("Type")&&(r.Type=e.enums===String?a.KeyType[t.Type]:t.Type),null!=t.Data&&t.hasOwnProperty("Data")&&(r.Data=e.bytes===String?s.base64.encode(t.Data,0,t.Data.length):e.bytes===Array?Array.prototype.slice.call(t.Data):t.Data),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},t}(),t.exports=a},96741:function(t,e,r){"use strict";const n=r(63649),i=r(87503),{toString:o}=r(92263),{fromString:s}=r(52217);function a(t){return Promise.all([n.get().subtle.exportKey("jwk",t.privateKey),n.get().subtle.exportKey("jwk",t.publicKey)])}e.utils=r(94604),e.generateKey=async function(t){const e=await n.get().subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]),r=await a(e);return{privateKey:r[0],publicKey:r[1]}},e.unmarshalPrivateKey=async function(t){const e=[await n.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]),await(r=t,n.get().subtle.importKey("jwk",{kty:r.kty,n:r.n,e:r.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))];var r;const i=await a({privateKey:e[0],publicKey:e[1]});return{privateKey:i[0],publicKey:i[1]}},e.getRandomValues=i,e.hashAndSign=async function(t,e){const r=await n.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]),i=await n.get().subtle.sign({name:"RSASSA-PKCS1-v1_5"},r,Uint8Array.from(e));return new Uint8Array(i,i.byteOffset,i.byteLength)},e.hashAndVerify=async function(t,e,r){const i=await n.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]);return n.get().subtle.verify({name:"RSASSA-PKCS1-v1_5"},i,e,r)};const{jwk2pub:u,jwk2priv:h}=r(925);function c(t,e,r,n){const i=e?u(t):h(t),a=n(o(Uint8Array.from(r),"ascii"),i);return s(a,"ascii")}e.encrypt=function(t,e){return c(t,!0,e,((t,e)=>e.encrypt(t)))},e.decrypt=function(t,e){return c(t,!1,e,((t,e)=>e.decrypt(t)))}},19950:function(t,e,r){"use strict";const{sha256:n}=r(41256),i=r(32114),{equals:o}=r(19588),{toString:s}=r(92263);r(63219);const a=r(3832),u=r(96741),h=r(17241),c=r(69716);class l{constructor(t){this._key=t}async verify(t,e){return u.hashAndVerify(this._key,e,t)}marshal(){return u.utils.jwkToPkix(this._key)}get bytes(){return h.PublicKey.encode({Type:h.KeyType.RSA,Data:this.marshal()}).finish()}encrypt(t){return u.encrypt(this._key,t)}equals(t){return o(this.bytes,t.bytes)}async hash(){const{bytes:t}=await n.digest(this.bytes);return t}}class f{constructor(t,e){this._key=t,this._publicKey=e}genSecret(){return u.getRandomValues(16)}async sign(t){return u.hashAndSign(this._key,t)}get public(){if(!this._publicKey)throw i(new Error("public key not provided"),"ERR_PUBKEY_NOT_PROVIDED");return new l(this._publicKey)}decrypt(t){return u.decrypt(this._key,t)}marshal(){return u.utils.jwkToPkcs1(this._key)}get bytes(){return h.PrivateKey.encode({Type:h.KeyType.RSA,Data:this.marshal()}).finish()}equals(t){return o(this.bytes,t.bytes)}async hash(){const{bytes:t}=await n.digest(this.bytes);return t}async id(){const t=await this.public.hash();return s(t,"base58btc")}async export(t,e="pkcs-8"){if("pkcs-8"===e){const e=new a.util.ByteBuffer(this.marshal()),r=a.asn1.fromDer(e),n=a.pki.privateKeyFromAsn1(r),i={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};return a.pki.encryptRsaPrivateKey(n,t,i)}if("libp2p-key"===e)return c.export(this.bytes,t);throw i(new Error(`export format '${e}' is not supported`),"ERR_INVALID_EXPORT_FORMAT")}}t.exports={RsaPublicKey:l,RsaPrivateKey:f,unmarshalRsaPublicKey:function(t){const e=u.utils.pkixToJwk(t);return new l(e)},unmarshalRsaPrivateKey:async function(t){const e=u.utils.pkcs1ToJwk(t),r=await u.unmarshalPrivateKey(e);return new f(r.privateKey,r.publicKey)},generateKeyPair:async function(t){const e=await u.generateKey(t);return new f(e.privateKey,e.publicKey)},fromJwk:async function(t){const e=await u.unmarshalPrivateKey(t);return new f(e.privateKey,e.publicKey)}}},94604:function(t,e,r){"use strict";r(3068),r(28095);const n=r(3832),{bigIntegerToUintBase64url:i,base64urlToBigInteger:o}=r(56441),{fromString:s}=r(52217),{toString:a}=r(92263);e.pkcs1ToJwk=function(t){const e=n.asn1.fromDer(a(t,"ascii")),r=n.pki.privateKeyFromAsn1(e);return{kty:"RSA",n:i(r.n),e:i(r.e),d:i(r.d),p:i(r.p),q:i(r.q),dp:i(r.dP),dq:i(r.dQ),qi:i(r.qInv),alg:"RS256",kid:"2011-04-29"}},e.jwkToPkcs1=function(t){const e=n.pki.privateKeyToAsn1({n:o(t.n),e:o(t.e),d:o(t.d),p:o(t.p),q:o(t.q),dP:o(t.dp),dQ:o(t.dq),qInv:o(t.qi)});return s(n.asn1.toDer(e).getBytes(),"ascii")},e.pkixToJwk=function(t){const e=n.asn1.fromDer(a(t,"ascii")),r=n.pki.publicKeyFromAsn1(e);return{kty:"RSA",n:i(r.n),e:i(r.e),alg:"RS256",kid:"2011-04-29"}},e.jwkToPkix=function(t){const e=n.pki.publicKeyToAsn1({n:o(t.n),e:o(t.e)});return s(n.asn1.toDer(e).getBytes(),"ascii")}},49434:function(t,e,r){"use strict";const{sha256:n}=r(41256),i=r(32114),{equals:o}=r(19588),{toString:s}=r(92263),a=r(69716);t.exports=(t,e,u)=>{u=u||r(54056)();class h{constructor(t){u.validatePublicKey(t),this._key=t}verify(t,e){return u.hashAndVerify(this._key,e,t)}marshal(){return u.compressPublicKey(this._key)}get bytes(){return t.PublicKey.encode({Type:t.KeyType.Secp256k1,Data:this.marshal()}).finish()}equals(t){return o(this.bytes,t.bytes)}async hash(){const{bytes:t}=await n.digest(this.bytes);return t}}class c{constructor(t,e){this._key=t,this._publicKey=e||u.computePublicKey(t),u.validatePrivateKey(this._key),u.validatePublicKey(this._publicKey)}sign(t){return u.hashAndSign(this._key,t)}get public(){return new h(this._publicKey)}marshal(){return this._key}get bytes(){return t.PrivateKey.encode({Type:t.KeyType.Secp256k1,Data:this.marshal()}).finish()}equals(t){return o(this.bytes,t.bytes)}async hash(){const{bytes:t}=await n.digest(this.bytes);return t}async id(){const t=await this.public.hash();return s(t,"base58btc")}async export(t,e="libp2p-key"){if("libp2p-key"===e)return a.export(this.bytes,t);throw i(new Error(`export format '${e}' is not supported`),"ERR_INVALID_EXPORT_FORMAT")}}return{Secp256k1PublicKey:h,Secp256k1PrivateKey:c,unmarshalSecp256k1PrivateKey:function(t){return new c(t)},unmarshalSecp256k1PublicKey:function(t){return new h(t)},generateKeyPair:async function(){const t=await u.generateKey();return new c(t)}}}},54056:function(t,e,r){"use strict";const n=r(32114),i=r(79656),{sha256:o}=r(41256);t.exports=()=>({generateKey:function(){return i.utils.randomPrivateKey()},privateKeyLength:32,hashAndSign:async function(t,e){const{digest:r}=await o.digest(e);try{return await i.sign(r,t)}catch(s){throw n(s,"ERR_INVALID_INPUT")}},hashAndVerify:async function(t,e,r){try{const{digest:n}=await o.digest(r);return i.verify(e,n,t)}catch(s){throw n(s,"ERR_INVALID_INPUT")}},compressPublicKey:function(t){return i.Point.fromHex(t).toRawBytes(!0)},decompressPublicKey:function(t){return i.Point.fromHex(t).toRawBytes(!1)},validatePrivateKey:function(t){try{i.getPublicKey(t,!0)}catch(e){throw n(e,"ERR_INVALID_PRIVATE_KEY")}},validatePublicKey:function(t){try{i.Point.fromHex(t)}catch(e){throw n(e,"ERR_INVALID_PUBLIC_KEY")}},computePublicKey:function(t){try{return i.getPublicKey(t,!0)}catch(e){throw n(e,"ERR_INVALID_PRIVATE_KEY")}}})},45753:function(t,e,r){"use strict";const n=r(32114);t.exports=function(t,e){if(!t.includes(e)){const r=t.join(" / ");throw n(new Error(`Unknown curve: ${e}. Must be ${r}`),"ERR_INVALID_CURVE")}}},93221:function(t,e,r){"use strict";const n=r(98960),i=r(97116),o=r(32114),s={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};t.exports=function(t,e,r,a,u){const h=s[u];if(!h){const t=Object.keys(s).join(" / ");throw o(new Error(`Hash '${u}' is unknown or not supported. Must be ${t}`),"ERR_UNSUPPORTED_HASH_TYPE")}const c=n(t,e,r,a,h);return i.encode64(c)}},87503:function(t,e,r){"use strict";const n=r(1914),i=r(32114);t.exports=function(t){if(isNaN(t)||t<=0)throw i(new Error("random bytes length must be a Number bigger than 0"),"ERR_INVALID_LENGTH");return n(t)}},56441:function(t,e,r){"use strict";r(97116),r(15764);const n=r(3832),{fromString:i}=r(52217),{toString:o}=r(92263),{concat:s}=r(20605);e.bigIntegerToUintBase64url=(t,e)=>{let r=Uint8Array.from(t.abs().toByteArray());if(r=0===r[0]?r.slice(1):r,null!=e){if(r.length>e)throw new Error("byte array longer than desired length");r=s([new Uint8Array(e-r.length),r])}return o(r,"base64url")},e.base64urlToBigInteger=t=>{const r=e.base64urlToBuffer(t);return new n.jsbn.BigInteger(o(r,"base16"),16)},e.base64urlToBuffer=(t,e)=>{let r=i(t,"base64urlpad");if(null!=e){if(r.length>e)throw new Error("byte array longer than desired length");r=s([new Uint8Array(e-r.length),r])}return r}},63649:function(t,e){"use strict";e.get=(t=globalThis)=>{const e=t.crypto;if(!e||!e.subtle)throw Object.assign(new Error("Missing Web Crypto API. The most likely cause of this error is that this page is being accessed from an insecure context (i.e. not HTTPS). For more information and possible resolutions see https://github.com/libp2p/js-libp2p-crypto/blob/master/README.md#web-crypto-api"),{code:"ERR_MISSING_WEB_CRYPTO"});return e}},43720:function(t){t.exports=r;var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(B){}function r(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function n(t){return!0===(t&&t.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var i={},o={};function s(t,e){var r,n,s;return e?(s=0<=(t>>>=0)&&t<256)&&(n=o[t])?n:(r=u(t,(0|t)<0?-1:0,!0),s&&(o[t]=r),r):(s=-128<=(t|=0)&&t<128)&&(n=i[t])?n:(r=u(t,t<0?-1:0,!1),s&&(i[t]=r),r)}function a(t,e){if(isNaN(t))return e?m:y;if(e){if(t<0)return m;if(t>=d)return A}else{if(t<=-p)return k;if(t+1>=p)return E}return t<0?a(-t,e).neg():u(t%f|0,t/f|0,e)}function u(t,e,n){return new r(t,e,n)}r.fromInt=s,r.fromNumber=a,r.fromBits=u;var h=Math.pow;function c(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return y;if("number"===typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return c(t.substring(1),e,r).neg();for(var i=a(h(r,8)),o=y,s=0;s>>0:this.low},S.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},S.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((o=u).isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}},S.getHighBits=function(){return this.high},S.getHighBitsUnsigned=function(){return this.high>>>0},S.getLowBits=function(){return this.low},S.getLowBitsUnsigned=function(){return this.low>>>0},S.getNumBitsAbs=function(){if(this.isNegative())return this.eq(k)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<=0},S.isOdd=function(){return 1===(1&this.low)},S.isEven=function(){return 0===(1&this.low)},S.equals=function(t){return n(t)||(t=l(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},S.eq=S.equals,S.notEquals=function(t){return!this.eq(t)},S.neq=S.notEquals,S.ne=S.notEquals,S.lessThan=function(t){return this.comp(t)<0},S.lt=S.lessThan,S.lessThanOrEqual=function(t){return this.comp(t)<=0},S.lte=S.lessThanOrEqual,S.le=S.lessThanOrEqual,S.greaterThan=function(t){return this.comp(t)>0},S.gt=S.greaterThan,S.greaterThanOrEqual=function(t){return this.comp(t)>=0},S.gte=S.greaterThanOrEqual,S.ge=S.greaterThanOrEqual,S.compare=function(t){if(n(t)||(t=l(t)),this.eq(t))return 0;var e=this.isNegative(),r=t.isNegative();return e&&!r?-1:!e&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},S.comp=S.compare,S.negate=function(){return!this.unsigned&&this.eq(k)?k:this.not().add(v)},S.neg=S.negate,S.add=function(t){n(t)||(t=l(t));var e=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,h=t.low>>>16,c=0,f=0,d=0,p=0;return d+=(p+=o+(65535&t.low))>>>16,f+=(d+=i+h)>>>16,c+=(f+=r+a)>>>16,c+=e+s,u((d&=65535)<<16|(p&=65535),(c&=65535)<<16|(f&=65535),this.unsigned)},S.subtract=function(t){return n(t)||(t=l(t)),this.add(t.neg())},S.sub=S.subtract,S.multiply=function(t){if(this.isZero())return y;if(n(t)||(t=l(t)),e)return u(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return y;if(this.eq(k))return t.isOdd()?k:y;if(t.eq(k))return this.isOdd()?k:y;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(g)&&t.lt(g))return a(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,h=t.high>>>16,c=65535&t.high,f=t.low>>>16,d=65535&t.low,p=0,m=0,v=0,b=0;return v+=(b+=s*d)>>>16,m+=(v+=o*d)>>>16,v&=65535,m+=(v+=s*f)>>>16,p+=(m+=i*d)>>>16,m&=65535,p+=(m+=o*f)>>>16,m&=65535,p+=(m+=s*c)>>>16,p+=r*d+i*f+o*c+s*h,u((v&=65535)<<16|(b&=65535),(p&=65535)<<16|(m&=65535),this.unsigned)},S.mul=S.multiply,S.divide=function(t){if(n(t)||(t=l(t)),t.isZero())throw Error("division by zero");var r,i,o;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?u((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?m:y;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return m;if(t.gt(this.shru(1)))return b;o=m}else{if(this.eq(k))return t.eq(v)||t.eq(w)?k:t.eq(k)?v:(r=this.shr(1).div(t).shl(1)).eq(y)?t.isNegative()?v:w:(i=this.sub(t.mul(r)),o=r.add(i.div(t)));if(t.eq(k))return this.unsigned?m:y;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=y}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),c=s<=48?1:h(2,s-48),f=a(r),d=f.mul(t);d.isNegative()||d.gt(i);)d=(f=a(r-=c,this.unsigned)).mul(t);f.isZero()&&(f=v),o=o.add(f),i=i.sub(d)}return o},S.div=S.divide,S.modulo=function(t){return n(t)||(t=l(t)),e?u((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},S.mod=S.modulo,S.rem=S.modulo,S.not=function(){return u(~this.low,~this.high,this.unsigned)},S.and=function(t){return n(t)||(t=l(t)),u(this.low&t.low,this.high&t.high,this.unsigned)},S.or=function(t){return n(t)||(t=l(t)),u(this.low|t.low,this.high|t.high,this.unsigned)},S.xor=function(t){return n(t)||(t=l(t)),u(this.low^t.low,this.high^t.high,this.unsigned)},S.shiftLeft=function(t){return n(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?u(this.low<>>32-t,this.unsigned):u(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):u(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},S.shr=S.shiftRight,S.shiftRightUnsigned=function(t){if(n(t)&&(t=t.toInt()),0===(t&=63))return this;var e=this.high;return t<32?u(this.low>>>t|e<<32-t,e>>>t,this.unsigned):u(32===t?e:e>>>t-32,0,this.unsigned)},S.shru=S.shiftRightUnsigned,S.shr_u=S.shiftRightUnsigned,S.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},S.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},S.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},S.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},S.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},r.fromBytes=function(t,e,n){return n?r.fromBytesLE(t,e):r.fromBytesBE(t,e)},r.fromBytesLE=function(t,e){return new r(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},r.fromBytesBE=function(t,e){return new r(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}},79746:function(t){function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},80556:function(t,e,r){"use strict";const{encodeText:n}=r(82413);t.exports=class{constructor(t,e,r,i){this.name=t,this.code=e,this.codeBuf=n(this.code),this.alphabet=i,this.codec=r(i)}encode(t){return this.codec.encode(t)}decode(t){for(const e of t)if(this.alphabet&&this.alphabet.indexOf(e)<0)throw new Error(`invalid character '${e}' in '${t}'`);return this.codec.decode(t)}}},25077:function(t,e,r){"use strict";const n=r(28820),i=r(80556),{rfc4648:o}=r(36727),{decodeText:s,encodeText:a}=r(82413),u=[["identity","\0",()=>({encode:s,decode:a}),""],["base2","0",o(1),"01"],["base8","7",o(3),"01234567"],["base10","9",n,"0123456789"],["base16","f",o(4),"0123456789abcdef"],["base16upper","F",o(4),"0123456789ABCDEF"],["base32hex","v",o(5),"0123456789abcdefghijklmnopqrstuv"],["base32hexupper","V",o(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV"],["base32hexpad","t",o(5),"0123456789abcdefghijklmnopqrstuv="],["base32hexpadupper","T",o(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV="],["base32","b",o(5),"abcdefghijklmnopqrstuvwxyz234567"],["base32upper","B",o(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"],["base32pad","c",o(5),"abcdefghijklmnopqrstuvwxyz234567="],["base32padupper","C",o(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567="],["base32z","h",o(5),"ybndrfg8ejkmcpqxot1uwisza345h769"],["base36","k",n,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",n,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",n,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",n,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base64","m",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],h=u.reduce(((t,e)=>(t[e[0]]=new i(e[0],e[1],e[2],e[3]),t)),{}),c=u.reduce(((t,e)=>(t[e[1]]=h[e[0]],t)),{});t.exports={names:h,codes:c}},36957:function(t,e,r){"use strict";const n=r(25077),{encodeText:i,decodeText:o,concat:s}=r(82413);function a(t){if(Object.prototype.hasOwnProperty.call(n.names,t))return n.names[t];if(Object.prototype.hasOwnProperty.call(n.codes,t))return n.codes[t];throw new Error(`Unsupported encoding: ${t}`)}(e=t.exports=function(t,e){if(!e)throw new Error("requires an encoded Uint8Array");const{name:r,codeBuf:n}=a(t);return function(t,e){a(t).decode(o(e))}(r,e),s([n,e],n.length+e.length)}).encode=function(t,e){const r=a(t),n=i(r.encode(e));return s([r.codeBuf,n],r.codeBuf.length+n.length)},e.decode=function(t){t instanceof Uint8Array&&(t=o(t));const e=t[0];return["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(e)&&(t=t.toLowerCase()),a(t[0]).decode(t.substring(1))},e.isEncoded=function(t){if(t instanceof Uint8Array&&(t=o(t)),"[object String]"!==Object.prototype.toString.call(t))return!1;try{return a(t[0]).name}catch(e){return!1}},e.encoding=a,e.encodingFromData=function(t){return t instanceof Uint8Array&&(t=o(t)),a(t[0])};const u=Object.freeze(n.names),h=Object.freeze(n.codes);e.names=u,e.codes=h},36727:function(t){"use strict";t.exports={rfc4648:t=>e=>({encode:r=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<((t,e,r)=>{const n={};for(let h=0;h=8&&(s-=8,o[u++]=255&a>>s)}if(s>=r||255&a<<8-s)throw new SyntaxError("Unexpected end of data");return o})(r,e,t)})}},82413:function(t){"use strict";const e=new TextDecoder,r=new TextEncoder;t.exports={decodeText:t=>e.decode(t),encodeText:t=>r.encode(t),concat:function(t,e){const r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}}},58636:function(t){"use strict";const e=Object.freeze({identity:0,cidv1:1,cidv2:2,cidv3:3,ip4:4,tcp:6,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,dccp:33,"murmur3-128":34,"murmur3-32":35,ip6:41,ip6zone:42,path:47,multicodec:48,multihash:49,multiaddr:50,multibase:51,dns:53,dns4:54,dns6:55,dnsaddr:56,protobuf:80,cbor:81,raw:85,"dbl-sha2-256":86,rlp:96,bencode:99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,sctp:132,"dag-jose":133,"dag-cose":134,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"eth-receipt-log-trie":153,"eth-reciept-log":154,"bitcoin-block":176,"bitcoin-tx":177,"bitcoin-witness-commitment":178,"zcash-block":192,"zcash-tx":193,"caip-50":202,streamid:206,"stellar-block":208,"stellar-tx":209,md4:212,md5:213,bmt:214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,zeronet:230,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"x25519-pub":236,"ed25519-pub":237,"bls12_381-g1g2-pub":238,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,udp:273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,udt:301,utp:302,unix:400,thread:406,p2p:421,ipfs:421,https:443,onion:444,onion3:445,garlic64:446,garlic32:447,tls:448,noise:454,quic:460,ws:477,wss:478,"p2p-websocket-star":479,http:480,"swhid-1-snp":496,json:512,messagepack:513,"libp2p-peer-record":769,"libp2p-relay-rsvp":770,"car-index-sorted":1024,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,"p256-pub":4608,"p384-pub":4609,"p521-pub":4610,"ed448-pub":4611,"x448-pub":4612,"ed25519-priv":4864,"secp256k1-priv":4865,"x25519-priv":4866,kangarootwelve:7425,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46e3,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082,"zeroxcert-imprint-256":52753,"fil-commitment-unsealed":61697,"fil-commitment-sealed":61698,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332,"skynet-ns":11639056,"arweave-ns":11704592});t.exports={baseTable:e}},76883:function(t,e,r){"use strict";const n=r(94676),{concat:i}=r(20605),o=r(55945),{nameToVarint:s,constantToCode:a,nameToCode:u,codeToName:h}=r(21843);function c(t){const e=n.decode(t),r=h[e];if(void 0===r)throw new Error(`Code "${e}" not found`);return r}function l(t){return h[t]}function f(t){const e=u[t];if(void 0===e)throw new Error(`Codec "${t}" not found`);return e}function d(t){return n.decode(t)}function p(t){const e=s[t];if(void 0===e)throw new Error(`Codec "${t}" not found`);return e}function g(t){return o.varintEncode(t)}t.exports={addPrefix:function(t,e){let r;if(t instanceof Uint8Array)r=o.varintUint8ArrayEncode(t);else{if(!s[t])throw new Error("multicodec not recognized");r=s[t]}return i([r,e],r.length+e.length)},rmPrefix:function(t){return n.decode(t),t.slice(n.decode.bytes)},getNameFromData:c,getNameFromCode:l,getCodeFromName:f,getCodeFromData:d,getVarintFromName:p,getVarintFromCode:g,getCodec:function(t){return c(t)},getName:function(t){return l(t)},getNumber:function(t){return f(t)},getCode:function(t){return d(t)},getCodeVarint:function(t){return p(t)},getVarint:function(t){return Array.from(g(t))},...a,nameToVarint:s,nameToCode:u,codeToName:h}},21843:function(t,e,r){"use strict";const{baseTable:n}=r(58636),i=r(55945).varintEncode,o={},s={},a={};for(const h in n){const t=h,e=n[t];o[t]=i(e);s[t.toUpperCase().replace(/-/g,"_")]=e,a[e]||(a[e]=t)}Object.freeze(o),Object.freeze(s),Object.freeze(a);const u=Object.freeze(n);t.exports={nameToVarint:o,constantToCode:s,nameToCode:u,codeToName:a}},55945:function(t,e,r){"use strict";const n=r(94676),{toString:i}=r(92263),{fromString:o}=r(52217);function s(t){return parseInt(i(t,"base16"),16)}t.exports={numberToUint8Array:function(t){let e=t.toString(16);e.length%2===1&&(e="0"+e);return o(e,"base16")},uint8ArrayToNumber:s,varintUint8ArrayEncode:function(t){return Uint8Array.from(n.encode(s(t)))},varintEncode:function(t){return Uint8Array.from(n.encode(t))}}},94268:function(t,e,r){"use strict";const{Buffer:n}=r(48764);t.exports=class{constructor(t,e,r,i){this.name=t,this.code=e,this.codeBuf=n.from(this.code),this.alphabet=i,this.engine=r(i)}encode(t){return this.engine.encode(t)}decode(t){for(const e of t)if(this.alphabet&&this.alphabet.indexOf(e)<0)throw new Error(`invalid character '${e}' in '${t}'`);return this.engine.decode(t)}}},37302:function(t,e,r){"use strict";const n=r(58162),i=r(94268),o=r(92154),{decodeText:s,encodeText:a}=r(2708),u=[["identity","\0",()=>({encode:s,decode:a}),""],["base2","0",o(1),"01"],["base8","7",o(3),"01234567"],["base10","9",n,"0123456789"],["base16","f",o(4),"0123456789abcdef"],["base16upper","F",o(4),"0123456789ABCDEF"],["base32hex","v",o(5),"0123456789abcdefghijklmnopqrstuv"],["base32hexupper","V",o(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV"],["base32hexpad","t",o(5),"0123456789abcdefghijklmnopqrstuv="],["base32hexpadupper","T",o(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV="],["base32","b",o(5),"abcdefghijklmnopqrstuvwxyz234567"],["base32upper","B",o(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"],["base32pad","c",o(5),"abcdefghijklmnopqrstuvwxyz234567="],["base32padupper","C",o(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567="],["base32z","h",o(5),"ybndrfg8ejkmcpqxot1uwisza345h769"],["base36","k",n,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",n,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",n,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",n,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base64","m",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],h=u.reduce(((t,e)=>(t[e[0]]=new i(e[0],e[1],e[2],e[3]),t)),{}),c=u.reduce(((t,e)=>(t[e[1]]=h[e[0]],t)),{});t.exports={names:h,codes:c}},77102:function(t,e,r){"use strict";const{Buffer:n}=r(48764),i=r(37302),{decodeText:o,asBuffer:s}=r(2708);function a(t){if(i.names[t])return i.names[t];if(i.codes[t])return i.codes[t];throw new Error(`Unsupported encoding: ${t}`)}(e=t.exports=function(t,e){if(!e)throw new Error("requires an encoded buffer");const{name:r,codeBuf:i}=a(t);!function(t,e){a(t).decode(o(e))}(r,e);const s=n.alloc(i.length+e.length);return s.set(i,0),s.set(e,i.length),s}).encode=function(t,e){const r=a(t);return n.concat([r.codeBuf,n.from(r.encode(e))])},e.decode=function(t){ArrayBuffer.isView(t)&&(t=o(t));const e=t[0];["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(e)&&(t=t.toLowerCase());const r=a(t[0]);return s(r.decode(t.substring(1)))},e.isEncoded=function(t){if(t instanceof Uint8Array&&(t=o(t)),"[object String]"!==Object.prototype.toString.call(t))return!1;try{return a(t[0]).name}catch(e){return!1}},e.encoding=a,e.encodingFromData=function(t){return t instanceof Uint8Array&&(t=o(t)),a(t[0])},e.names=Object.freeze(i.names),e.codes=Object.freeze(i.codes)},92154:function(t){"use strict";t.exports=t=>e=>({encode:r=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<((t,e,r)=>{const n={};for(let h=0;h=8&&(s-=8,o[u++]=255&a>>s)}if(s>=r||255&a<<8-s)throw new SyntaxError("Unexpected end of data");return o})(r,e,t)})},2708:function(t,e,r){"use strict";const{Buffer:n}=r(48764),{TextEncoder:i,TextDecoder:o}=r(47259),s=new o,a=new i;t.exports={decodeText:t=>s.decode(t),encodeText:t=>a.encode(t),asBuffer:({buffer:t,byteLength:e,byteOffset:r})=>n.from(t,r,e)}},2623:function(t){t.exports=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<=128);return t.bytes=s-r,i}},13657:function(t){t.exports=function t(r,n,i){n=n||[];var o=i=i||0;for(;r>=e;)n[i++]=255&r|128,r/=128;for(;-128&r;)n[i++]=255&r|128,r>>>=7;return n[i]=0|r,t.bytes=i-o+1,n};var e=Math.pow(2,31)},88414:function(t,e,r){t.exports={encode:r(13657),decode:r(2623),encodingLength:r(58078)}},58078:function(t){var e=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),u=Math.pow(2,56),h=Math.pow(2,63);t.exports=function(t){return t 2 bytes.");const i=o.decode(r);if(!e.isValidCode(i))throw new Error(`multihash unknown function code: 0x${i.toString(16)}`);r=r.slice(o.decode.bytes);const s=o.decode(r);if(s<0)throw new Error(`multihash invalid length: ${s}`);if(r=r.slice(o.decode.bytes),r.length!==s)throw new Error(`multihash length inconsistent: 0x${r.toString("hex")}`);return{code:i,name:h[i],length:s,digest:r}},e.encode=function(t,r,i){if(!t||void 0===r)throw new Error("multihash encode requires at least two args: digest, code");const s=e.coerceCode(r);if(!(t instanceof Uint8Array))throw new Error("digest should be a Uint8Array");if(null==i&&(i=t.length),i&&t.length!==i)throw new Error("digest length should be equal to specified length.");const a=o.encode(s),u=o.encode(i),h=n.alloc(a.length+u.length+t.length);return h.set(a,0),h.set(u,a.length),h.set(t,a.length+u.length),h},e.coerceCode=function(t){let r=t;if("string"===typeof t){if(void 0===s[t])throw new Error(`Unrecognized hash function named: ${t}`);r=s[t]}if("number"!==typeof r)throw new Error(`Hash function code should be a number. Got: ${r}`);if(void 0===h[r]&&!e.isAppCode(r))throw new Error(`Unrecognized function code: ${r}`);return r},e.isAppCode=function(t){return t>0&&t<16},e.isValidCode=function(t){return!!e.isAppCode(t)||!!h[t]},e.validate=c,e.prefix=function(t){return c(t),n.from(t.buffer,t.byteOffset,2)}},83854:function(t){const e="13456789abcdefghijkmnopqrstuwxyz";function r(t){var r=e.indexOf(t);if(-1===r)throw new Error("Invalid character found: "+t);return r}t.exports={encode:function(t){if(t.constructor!==Uint8Array)throw new Error("View must be a Uint8Array!");const r=t.length,n=8*r%5,i=0===n?0:5-n;let o=0,s="",a=0;for(var u=0;u=5;)s+=e[o>>>a+i-5&31],a-=5;return a>0&&(s+=e[o<<5-(a+i)&31]),s},decode:function(t){if("string"!==typeof t)throw new Error("Input must be a string!");var e=t.length;const n=5*e%8,i=0===n?0:8-n;for(var o=0,s=0,a=0,u=new Uint8Array(Math.ceil(5*e/8)),h=0;h=8&&(u[a++]=s>>>o+i-8&255,o-=8);return o>0&&(u[a++]=s<0&&void 0!==arguments[0]?arguments[0]:{},e=t.ampFirst,r=void 0!==e&&e,n=t.hybrid,i=void 0!==n&&n,o=t.hasQuery,s=void 0!==o&&o;return r||i&&s}("function"===typeof e.default||"object"===typeof e.default&&null!==e.default)&&(Object.assign(e.default,e),t.exports=e.default)},16505:function(t,e,r){"use strict";var n=r(930);function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}Object.defineProperty(e,"__esModule",{value:!0}),e.defaultHead=l,e.default=void 0;var o,s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}return e.default=t,e}(r(67294)),a=(o=r(70148))&&o.__esModule?o:{default:o},u=r(17285),h=r(60523),c=r(49546);r(67206);function l(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=[s.default.createElement("meta",{charSet:"utf-8"})];return t||e.push(s.default.createElement("meta",{name:"viewport",content:"width=device-width"})),e}function f(t,e){return"string"===typeof e||"number"===typeof e?t:e.type===s.default.Fragment?t.concat(s.default.Children.toArray(e.props.children).reduce((function(t,e){return"string"===typeof e||"number"===typeof e?t:t.concat(e)}),[])):t.concat(e)}var d=["name","httpEquiv","charSet","itemProp"];function p(t,e){return t.reduce((function(t,e){var r=s.default.Children.toArray(e.props.children);return t.concat(r)}),[]).reduce(f,[]).reverse().concat(l(e.inAmpMode)).filter(function(){var t=new Set,e=new Set,r=new Set,n={};return function(i){var o=!0,s=!1;if(i.key&&"number"!==typeof i.key&&i.key.indexOf("$")>0){s=!0;var a=i.key.slice(i.key.indexOf("$")+1);t.has(a)?o=!1:t.add(a)}switch(i.type){case"title":case"base":e.has(i.type)?o=!1:e.add(i.type);break;case"meta":for(var u=0,h=d.length;u>>=2;for(i=0;i>8^255&l^99,o[g]=l,s[l]=g,d=(f=t[l])<<24^l<<16^l<<8^l^f,p=((r=t[g])^(n=t[r])^(i=t[n]))<<24^(g^i)<<16^(g^n^i)<<8^g^r^i;for(var m=0;m<4;++m)u[m][g]=d,h[m][l]=p,d=d<<24|d>>>8,p=p<<24|p>>>8;0===g?g=y=1:(g=r^t[t[t[r^i]]],y^=t[t[y]])}}function f(t,e){for(var r,n=t.slice(0),i=1,s=n.length,u=4*(s+6+1),c=s;c>>16&255]<<24^o[r>>>8&255]<<16^o[255&r]<<8^o[r>>>24]^a[i]<<24,i++):s>6&&c%s===4&&(r=o[r>>>24]<<24^o[r>>>16&255]<<16^o[r>>>8&255]<<8^o[255&r]),n[c]=n[c-s]^r;if(e){for(var l,f=h[0],d=h[1],p=h[2],g=h[3],y=n.slice(0),m=(c=0,(u=n.length)-4);c>>24]]^d[o[l>>>16&255]]^p[o[l>>>8&255]]^g[o[255&l]];n=y}return n}function d(t,e,r,n){var i,a,c,l,f,d,p,g,y,m,v,b,w=t.length/4-1;n?(i=h[0],a=h[1],c=h[2],l=h[3],f=s):(i=u[0],a=u[1],c=u[2],l=u[3],f=o),d=e[0]^t[0],p=e[n?3:1]^t[1],g=e[2]^t[2],y=e[n?1:3]^t[3];for(var E=3,A=1;A>>24]^a[p>>>16&255]^c[g>>>8&255]^l[255&y]^t[++E],v=i[p>>>24]^a[g>>>16&255]^c[y>>>8&255]^l[255&d]^t[++E],b=i[g>>>24]^a[y>>>16&255]^c[d>>>8&255]^l[255&p]^t[++E],y=i[y>>>24]^a[d>>>16&255]^c[p>>>8&255]^l[255&g]^t[++E],d=m,p=v,g=b;r[0]=f[d>>>24]<<24^f[p>>>16&255]<<16^f[g>>>8&255]<<8^f[255&y]^t[++E],r[n?3:1]=f[p>>>24]<<24^f[g>>>16&255]<<16^f[y>>>8&255]<<8^f[255&d]^t[++E],r[2]=f[g>>>24]<<24^f[y>>>16&255]<<16^f[d>>>8&255]<<8^f[255&p]^t[++E],r[n?1:3]=f[y>>>24]<<24^f[d>>>16&255]<<16^f[p>>>8&255]<<8^f[255&g]^t[++E]}function p(t){var e,r="AES-"+((t=t||{}).mode||"CBC").toUpperCase(),i=(e=t.decrypt?n.cipher.createDecipher(r,t.key):n.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=t,i.call(e,r)},e}},3068:function(t,e,r){var n=r(3832);r(97116),r(66270);var i=t.exports=n.asn1=n.asn1||{};function o(t,e,r){if(r>e){var n=new Error("Too few bytes to parse DER.");throw n.available=t.length(),n.remaining=e,n.requested=r,n}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(t,e,r,o,s){if(n.util.isArray(o)){for(var a=[],u=0;ue){if(n.strict){var p=new Error("Too few bytes to read ASN.1 value.");throw p.available=t.length(),p.remaining=e,p.requested=d,p}d=e}var g=32===(32&u);if(g)if(l=[],void 0===d)for(;;){if(o(t,e,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),e-=2;break}a=t.length(),l.push(s(t,e,r+1,n)),e-=a-t.length()}else for(;d>0;)a=t.length(),l.push(s(t,d,r+1,n)),e-=a-t.length(),d-=a-t.length();if(void 0===l&&h===i.Class.UNIVERSAL&&c===i.Type.BITSTRING&&(f=t.bytes(d)),void 0===l&&n.decodeBitStrings&&h===i.Class.UNIVERSAL&&c===i.Type.BITSTRING&&d>1){var y=t.read,m=e,v=0;if(c===i.Type.BITSTRING&&(o(t,e,1),v=t.getByte(),e--),0===v)try{a=t.length();var b=s(t,e,r+1,{strict:!0,decodeBitStrings:!0}),w=a-t.length();e-=w,c==i.Type.BITSTRING&&w++;var E=b.tagClass;w!==d||E!==i.Class.UNIVERSAL&&E!==i.Class.CONTEXT_SPECIFIC||(l=[b])}catch(k){}void 0===l&&(t.read=y,e=m)}if(void 0===l){if(void 0===d){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");d=e}if(c===i.Type.BMPSTRING)for(l="";d>0;d-=2)o(t,e,2),l+=String.fromCharCode(t.getInt16()),e-=2;else l=t.getBytes(d),e-=d}var A=void 0===f?null:{bitStringContents:f};return i.create(h,c,g,l,A)}i.fromDer=function(t,e){void 0===e&&(e={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),"boolean"===typeof e&&(e={strict:e,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"parseAllBytes"in e||(e.parseAllBytes=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),"string"===typeof t&&(t=n.util.createBuffer(t));var r=t.length(),i=s(t,t.length(),0,e);if(e.parseAllBytes&&0!==t.length()){var o=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw o.byteCount=r,o.remaining=t.length(),o}return i},i.toDer=function(t){var e=n.util.createBuffer(),r=t.tagClass|t.type,o=n.util.createBuffer(),s=!1;if("bitStringContents"in t&&(s=!0,t.original&&(s=i.equals(t,t.original))),s)o.putBytes(t.bitStringContents);else if(t.composed){t.constructed?r|=32:o.putByte(0);for(var a=0;a1&&(0===t.value.charCodeAt(0)&&0===(128&t.value.charCodeAt(1))||255===t.value.charCodeAt(0)&&128===(128&t.value.charCodeAt(1)))?o.putBytes(t.value.substr(1)):o.putBytes(t.value);if(e.putByte(r),o.length()<=127)e.putByte(127&o.length());else{var u=o.length(),h="";do{h+=String.fromCharCode(255&u),u>>>=8}while(u>0);e.putByte(128|h.length);for(a=h.length-1;a>=0;--a)e.putByte(h.charCodeAt(a))}return e.putBuffer(o),e},i.oidToDer=function(t){var e,r,i,o,s=t.split("."),a=n.util.createBuffer();a.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var u=2;u>>=7,e||(o|=128),r.push(o),e=!1}while(i>0);for(var h=r.length-1;h>=0;--h)a.putByte(r[h])}return a},i.derToOid=function(t){var e;"string"===typeof t&&(t=n.util.createBuffer(t));var r=t.getByte();e=Math.floor(r/40)+"."+r%40;for(var i=0;t.length()>0;)i<<=7,128&(r=t.getByte())?i+=127&r:(e+="."+(i+r),i=0);return e},i.utcTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(t.substr(2,2),10)-1,i=parseInt(t.substr(4,2),10),o=parseInt(t.substr(6,2),10),s=parseInt(t.substr(8,2),10),a=0;if(t.length>11){var u=t.charAt(10),h=10;"+"!==u&&"-"!==u&&(a=parseInt(t.substr(10,2),10),h+=2)}if(e.setUTCFullYear(r,n,i),e.setUTCHours(o,s,a,0),h&&("+"===(u=t.charAt(h))||"-"===u)){var c=60*parseInt(t.substr(h+1,2),10)+parseInt(t.substr(h+4,2),10);c*=6e4,"+"===u?e.setTime(+e-c):e.setTime(+e+c)}return e},i.generalizedTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,4),10),n=parseInt(t.substr(4,2),10)-1,i=parseInt(t.substr(6,2),10),o=parseInt(t.substr(8,2),10),s=parseInt(t.substr(10,2),10),a=parseInt(t.substr(12,2),10),u=0,h=0,c=!1;"Z"===t.charAt(t.length-1)&&(c=!0);var l=t.length-5,f=t.charAt(l);"+"!==f&&"-"!==f||(h=60*parseInt(t.substr(l+1,2),10)+parseInt(t.substr(l+4,2),10),h*=6e4,"+"===f&&(h*=-1),c=!0);return"."===t.charAt(14)&&(u=1e3*parseFloat(t.substr(14),10)),c?(e.setUTCFullYear(r,n,i),e.setUTCHours(o,s,a,u),e.setTime(+e+h)):(e.setFullYear(r,n,i),e.setHours(o,s,a,u)),e},i.dateToUtcTime=function(t){if("string"===typeof t)return t;var e="",r=[];r.push((""+t.getUTCFullYear()).substr(2)),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var n=0;n=-128&&t<128)return e.putSignedInt(t,8);if(t>=-32768&&t<32768)return e.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return e.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return e.putSignedInt(t,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=t,r},i.derToInteger=function(t){"string"===typeof t&&(t=n.util.createBuffer(t));var e=8*t.length();if(e>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(e)},i.validate=function(t,e,r,o){var s=!1;if(t.tagClass!==e.tagClass&&"undefined"!==typeof e.tagClass||t.type!==e.type&&"undefined"!==typeof e.type)o&&(t.tagClass!==e.tagClass&&o.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+t.tagClass+'"'),t.type!==e.type&&o.push("["+e.name+'] Expected type "'+e.type+'", got "'+t.type+'"'));else if(t.constructed===e.constructed||"undefined"===typeof e.constructed){if(s=!0,e.value&&n.util.isArray(e.value))for(var a=0,u=0;s&&u0&&(o+="\n");for(var s="",u=0;u1?o+="0x"+n.util.bytesToHex(t.value.slice(1)):o+="(none)",t.value.length>0){var f=t.value.charCodeAt(0);1==f?o+=" (1 unused bit shown)":f>1&&(o+=" ("+f+" unused bits shown)")}}else if(t.type===i.Type.OCTETSTRING)a.test(t.value)||(o+="("+t.value+") "),o+="0x"+n.util.bytesToHex(t.value);else if(t.type===i.Type.UTF8)try{o+=n.util.decodeUtf8(t.value)}catch(p){if("URI malformed"!==p.message)throw p;o+="0x"+n.util.bytesToHex(t.value)+" (malformed UTF8)"}else t.type===i.Type.PRINTABLESTRING||t.type===i.Type.IA5String?o+=t.value:a.test(t.value)?o+="0x"+n.util.bytesToHex(t.value):0===t.value.length?o+="[null]":o+=t.value}return o}},78807:function(t,e,r){var n=r(62678).Buffer,i={};t.exports=i;var o={};i.encode=function(t,e,r){if("string"!==typeof e)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!==typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(t instanceof Uint8Array){var i=0,o=e.length,s=e.charAt(0),a=[0];for(i=0;i0;)a.push(h%o),h=h/o|0}for(i=0;0===t[i]&&i=0;--i)n+=e[a[i]]}else n=function(t,e){var r=0,n=e.length,i=e.charAt(0),o=[0];for(r=0;r0;)o.push(a%n),a=a/n|0}var u="";for(r=0;0===t.at(r)&&r=0;--r)u+=e[o[r]];return u}(t,e);if(r){var c=new RegExp(".{1,"+r+"}","g");n=n.match(c).join("\r\n")}return n},i.decode=function(t,e){if("string"!==typeof t)throw new TypeError('"input" must be a string.');if("string"!==typeof e)throw new TypeError('"alphabet" must be a string.');var r=o[e];if(!r){r=o[e]=[];for(var i=0;i>=8;for(;l>0;)u.push(255&l),l>>=8}for(var f=0;t[f]===a&&f4){var r=t;t=n.util.createBuffer();for(var i=0;i0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return!(n>this.blockSize<<2)&&(t.truncate(n),!0)},i.cbc=function(t){t=t||{},this.name="CBC",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(t){if(null===t.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv,this.blockSize),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(t,e,r){if(t.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return!(n>this.blockSize<<2)&&(t.truncate(n),!0)},i.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(t,e,r){var n=t.length();if(0===t.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var e,r=n.util.createBuffer(t.iv);if(this._cipherLength=0,e="additionalData"in t?n.util.createBuffer(t.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in t?t.tagLength:128,this._tag=null,t.decrypt&&(this._tag=n.util.createBuffer(t.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(a(8*i)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,e=n.util.createBuffer(e),this._aDataLength=a(8*e.length());var o=e.length()%this.blockSize;for(o&&e.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];e.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()])},i.gcm.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},i.gcm.prototype.decrypt=function(t,e,r){var n=t.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=t.getInt32(),this._hashBlock[1]=t.getInt32(),this._hashBlock[2]=t.getInt32(),this._hashBlock[3]=t.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i0;--n)e[n]=t[n]>>>1|(1&t[n-1])<<31;e[0]=t[0]>>>1,r&&(e[0]^=this._R)},i.gcm.prototype.tableMultiply=function(t){for(var e=[0,0,0,0],r=0;r<32;++r){var n=t[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];e[0]^=i[0],e[1]^=i[1],e[2]^=i[2],e[3]^=i[3]}return e},i.gcm.prototype.ghash=function(t,e,r){return e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3],this.tableMultiply(e)},i.gcm.prototype.generateHashTable=function(t,e){for(var r=8/e,n=4*r,i=16*r,o=new Array(i),s=0;s>>1,i=new Array(r);i[n]=t.slice(0);for(var o=n>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1;for(o=2;o8?3:1,m=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],b=0,w=0;w>>4^A))<<4,E^=e=65535&((A^=e)>>>-16^E),E^=(e=858993459&(E>>>2^(A^=e<<-16)))<<2,E^=e=65535&((A^=e)>>>-16^E),E^=(e=1431655765&(E>>>1^(A^=e<<-16)))<<1,E^=e=16711935&((A^=e)>>>8^E),e=(E^=(e=1431655765&(E>>>1^(A^=e<<8)))<<1)<<8|(A^=e)>>>20&240,E=A<<24|A<<8&16711680|A>>>8&65280|A>>>24&240,A=e;for(var k=0;k>>26,A=A<<2|A>>>26):(E=E<<1|E>>>27,A=A<<1|A>>>27),A&=-15;var S=r[(E&=-15)>>>28]|n[E>>>24&15]|i[E>>>20&15]|o[E>>>16&15]|s[E>>>12&15]|a[E>>>8&15]|u[E>>>4&15],B=h[A>>>28]|c[A>>>24&15]|l[A>>>20&15]|f[A>>>16&15]|d[A>>>12&15]|p[A>>>8&15]|g[A>>>4&15];e=65535&(B>>>16^S),m[b++]=S^e,m[b++]=B^e<<16}}return m}(e),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],a=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],c=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],l=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],f=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function d(t,e,r,n){var i,d,p=32===t.length?3:9;i=3===p?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=e[0],y=e[1];g^=(d=252645135&(g>>>4^y))<<4,g^=(d=65535&(g>>>16^(y^=d)))<<16,g^=d=858993459&((y^=d)>>>2^g),g^=d=16711935&((y^=d<<2)>>>8^g),g=(g^=(d=1431655765&(g>>>1^(y^=d<<8)))<<1)<<1|g>>>31,y=(y^=d)<<1|y>>>31;for(var m=0;m>>4|y<<28)^t[w+1];d=g,g=y,y=d^(s[E>>>24&63]|u[E>>>16&63]|c[E>>>8&63]|f[63&E]|o[A>>>24&63]|a[A>>>16&63]|h[A>>>8&63]|l[63&A])}d=g,g=y,y=d}y=y>>>1|y<<31,y^=d=1431655765&((g=g>>>1|g<<31)>>>1^y),y^=(d=16711935&(y>>>8^(g^=d<<1)))<<8,y^=(d=858993459&(y>>>2^(g^=d)))<<2,y^=d=65535&((g^=d)>>>16^y),y^=d=252645135&((g^=d<<16)>>>4^y),g^=d<<4,r[0]=g,r[1]=y}function p(t){var e,r="DES-"+((t=t||{}).mode||"CBC").toUpperCase(),i=(e=t.decrypt?n.cipher.createDecipher(r,t.key):n.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=t,i.call(e,r)},e}},3832:function(t){t.exports={options:{usePureJavaScript:!1}}},36607:function(t,e,r){var n=r(3832);r(28991),r(97116),(t.exports=n.hmac=n.hmac||{}).create=function(){var t=null,e=null,r=null,i=null,o={start:function(o,s){if(null!==o)if("string"===typeof o){if(!((o=o.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+o+'"');e=n.md.algorithms[o].create()}else e=o;if(null===s)s=t;else{if("string"===typeof s)s=n.util.createBuffer(s);else if(n.util.isArray(s)){var a=s;s=n.util.createBuffer();for(var u=0;ue.blockLength&&(e.start(),e.update(s.bytes()),s=e.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),h=s.length();for(u=0;u>14;--o>=0;){var u=16383&this.data[t],h=this.data[t++]>>14,c=a*u+h*s;i=((u=s*u+((16383&c)<<14)+r.data[n]+i)>>28)+(c>>14)+a*h,r.data[n++]=268435455&u}return i}i.jsbn.BigInteger=o,"undefined"===typeof navigator?(o.prototype.am=a,n=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(t,e,r,n,i,o){for(var s=32767&e,a=e>>15;--o>=0;){var u=32767&this.data[t],h=this.data[t++]>>15,c=a*u+h*s;i=((u=s*u+((32767&c)<<15)+r.data[n]+(1073741823&i))>>>30)+(c>>>15)+a*h+(i>>>30),r.data[n++]=1073741823&u}return i},n=30):"Netscape"!=navigator.appName?(o.prototype.am=function(t,e,r,n,i,o){for(;--o>=0;){var s=e*this.data[t++]+r.data[n]+i;i=Math.floor(s/67108864),r.data[n++]=67108863&s}return i},n=26):(o.prototype.am=a,n=28),o.prototype.DB=n,o.prototype.DM=(1<>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function g(t){this.m=t}function y(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function A(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function k(){}function S(t){return t}function B(t){this.r2=s(),this.q3=s(),o.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}g.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},g.prototype.revert=function(t){return t},g.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},g.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},g.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},y.prototype.convert=function(t){var e=s();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(o.ZERO)>0&&this.m.subTo(e,e),e},y.prototype.revert=function(t){var e=s();return t.copyTo(e),this.reduce(e),e},y.prototype.reduce=function(t){for(;t.t<=this.mt2;)t.data[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t.data[r]+=this.m.am(0,n,t,e,0,this.m.t);t.data[r]>=t.DV;)t.data[r]-=t.DV,t.data[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},y.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},y.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},o.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t.data[e]=this.data[e];t.t=this.t,t.s=this.s},o.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this.data[0]=t:t<-1?this.data[0]=t+this.DV:this.t=0},o.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var n=t.length,i=!1,s=0;--n>=0;){var a=8==r?255&t[n]:f(t,n);a<0?"-"==t.charAt(n)&&(i=!0):(i=!1,0==s?this.data[this.t++]=a:s+r>this.DB?(this.data[this.t-1]|=(a&(1<>this.DB-s):this.data[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==t;)--this.t},o.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e.data[r+t]=this.data[r];for(r=t-1;r>=0;--r)e.data[r]=0;e.t=this.t+t,e.s=this.s},o.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e.data[r+s+1]=this.data[r]>>i|a,a=(this.data[r]&o)<=0;--r)e.data[r]=0;e.data[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},o.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(e.data[this.t-r-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e.data[r++]=this.DV+n:n>0&&(e.data[r++]=n),e.t=r,e.clamp()},o.prototype.multiplyTo=function(t,e){var r=this.abs(),n=t.abs(),i=r.t;for(e.t=i+n.t;--i>=0;)e.data[i]=0;for(i=0;i=0;)t.data[r]=0;for(r=0;r=e.DV&&(t.data[r+e.t]-=e.DV,t.data[r+e.t+1]=1)}t.t>0&&(t.data[t.t-1]+=e.am(r,e.data[r],t,2*r,0,1)),t.s=0,t.clamp()},o.prototype.divRemTo=function(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(c,a),i.lShiftTo(c,r)):(n.copyTo(a),i.copyTo(r));var l=a.t,f=a.data[l-1];if(0!=f){var d=f*(1<1?a.data[l-2]>>this.F2:0),g=this.FV/d,y=(1<=0&&(r.data[r.t++]=1,r.subTo(w,r)),o.ONE.dlShiftTo(l,w),w.subTo(a,a);a.t=0;){var E=r.data[--v]==f?this.DM:Math.floor(r.data[v]*g+(r.data[v-1]+m)*y);if((r.data[v]+=a.am(0,E,r,b,0,l))0&&r.rShiftTo(c,r),u<0&&o.ZERO.subTo(r,r)}}},o.prototype.invDigit=function(){if(this.t<1)return 0;var t=this.data[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(t,e){if(t>4294967295||t<1)return o.ONE;var r=s(),n=s(),i=e.convert(this),a=p(t)-1;for(i.copyTo(r);--a>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,i,r);else{var u=r;r=n,n=u}return e.revert(r)},o.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=l(r));s>=0;)a>(a+=this.DB-e)):(r=this.data[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=l(r));return i?o:"0"},o.prototype.negate=function(){var t=s();return o.ZERO.subTo(this,t),t},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this.data[r]-t.data[r]))return e;return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this.data[this.t-1]^this.s&this.DM)},o.prototype.mod=function(t){var e=s();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(o.ZERO)>0&&t.subTo(e,e),e},o.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new g(e):new y(e),this.exp(t,r)},o.ZERO=d(0),o.ONE=d(1),k.prototype.convert=S,k.prototype.revert=S,k.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},k.prototype.sqrTo=function(t,e){t.squareTo(e)},B.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=s();return t.copyTo(e),this.reduce(e),e},B.prototype.revert=function(t){return t},B.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},B.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},B.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var x=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],C=(1<<26)/x[x.length-1];o.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},o.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=d(r),i=s(),o=s(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(t).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(t)+a},o.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),i=!1,s=0,a=0,u=0;u=r&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(o.ONE.shiftLeft(t-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(o.ONE.shiftLeft(t-1),this);else{var n=new Array,i=7&t;n.length=1+(t>>3),e.nextBytes(n),i>0?n[0]&=(1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e.data[r++]=n:n<-1&&(e.data[r++]=this.DV+n),e.t=r,e.clamp()},o.prototype.dMultiply=function(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=t;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}},o.prototype.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i=0;)r.data[n]=0;for(n=Math.max(e-this.t,0);n0)if(0==e)r=this.data[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this.data[n])%t;return r},o.prototype.millerRabin=function(t){var e=this.subtract(o.ONE),r=e.getLowestSetBit();if(r<=0)return!1;for(var n,i=e.shiftRight(r),s={nextBytes:function(t){for(var e=0;e=0);var u=n.modPow(i,this);if(0!=u.compareTo(o.ONE)&&0!=u.compareTo(e)){for(var h=1;h++>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<=0;)n<8?(r=(this.data[t]&(1<>(n+=this.DB-8)):(r=this.data[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},o.prototype.equals=function(t){return 0==this.compareTo(t)},o.prototype.min=function(t){return this.compareTo(t)<0?this:t},o.prototype.max=function(t){return this.compareTo(t)>0?this:t},o.prototype.and=function(t){var e=s();return this.bitwiseTo(t,m,e),e},o.prototype.or=function(t){var e=s();return this.bitwiseTo(t,v,e),e},o.prototype.xor=function(t){var e=s();return this.bitwiseTo(t,b,e),e},o.prototype.andNot=function(t){var e=s();return this.bitwiseTo(t,w,e),e},o.prototype.not=function(){for(var t=s(),e=0;e=this.t?0!=this.s:0!=(this.data[e]&1<1){var l=s();for(n.sqrTo(a[1],l);u<=c;)a[u]=s(),n.mulTo(l,a[u-2],a[u]),u+=2}var f,m,v=t.t-1,b=!0,w=s();for(i=p(t.data[v])-1;v>=0;){for(i>=h?f=t.data[v]>>i-h&c:(f=(t.data[v]&(1<0&&(f|=t.data[v-1]>>this.DB+i-h)),u=r;0==(1&f);)f>>=1,--u;if((i-=u)<0&&(i+=this.DB,--v),b)a[f].copyTo(o),b=!1;else{for(;u>1;)n.sqrTo(o,w),n.sqrTo(w,o),u-=2;u>0?n.sqrTo(o,w):(m=o,o=w,w=m),n.mulTo(w,a[f],o)}for(;v>=0&&0==(t.data[v]&1<=0?(r.subTo(n,r),e&&i.subTo(a,i),s.subTo(u,s)):(n.subTo(r,n),e&&a.subTo(i,a),u.subTo(s,u))}return 0!=n.compareTo(o.ONE)?o.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},o.prototype.pow=function(t){return this.exp(t,new k)},o.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},o.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r.data[0]<=x[x.length-1]){for(e=0;e=0;u--)I>>=8,I+=B.at(u)+M.at(u),M.setAt(u,255&I);C.putBuffer(M)}w=C,l.putBuffer(k)}return l.truncate(l.length()-o),l},s.pbe.getCipher=function(t,e,r){switch(t){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(t,e,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(t,e,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=t,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},s.pbe.getCipherForPBES2=function(t,e,r){var i,a={},u=[];if(!o.validate(e,h,a,u))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,i;if((t=o.derToOid(a.kdfOid))!==s.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=t,i.supportedOids=["pkcs5PBKDF2"],i;if((t=o.derToOid(a.encOid))!==s.oids["aes128-CBC"]&&t!==s.oids["aes192-CBC"]&&t!==s.oids["aes256-CBC"]&&t!==s.oids["des-EDE3-CBC"]&&t!==s.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=t,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var c,l,d=a.kdfSalt,p=n.util.createBuffer(a.kdfIterationCount);switch(p=p.getInt(p.length()<<3),s.oids[t]){case"aes128-CBC":c=16,l=n.aes.createDecryptionCipher;break;case"aes192-CBC":c=24,l=n.aes.createDecryptionCipher;break;case"aes256-CBC":c=32,l=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":c=24,l=n.des.createDecryptionCipher;break;case"desCBC":c=8,l=n.des.createDecryptionCipher}var g=f(a.prfOid),y=n.pkcs5.pbkdf2(r,d,p,c,g),m=a.encIv,v=l(y);return v.start(m),v},s.pbe.getCipherForPKCS12PBE=function(t,e,r){var i={},a=[];if(!o.validate(e,c,i,a))throw(g=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=a,g;var u,h,l,d=n.util.createBuffer(i.salt),p=n.util.createBuffer(i.iterations);switch(p=p.getInt(p.length()<<3),t){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,h=8,l=n.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,h=8,l=function(t,e){var r=n.rc2.createDecryptionCipher(t,40);return r.start(e,null),r};break;default:var g;throw(g=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=t,g}var y=f(i.prfOid),m=s.pbe.generatePkcs12Key(r,d,1,p,u,y);return y.start(),l(m,s.pbe.generatePkcs12Key(r,d,2,p,h,y))},s.pbe.opensslDeriveBytes=function(t,e,r,i){if("undefined"===typeof i||null===i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===e&&(e="");for(var o=[l(i,t+e)],s=16,a=1;s4||!a||"sha1"===a))return"string"!==typeof a&&(a="sha1"),t=n.from(t,"binary"),e=n.from(e,"binary"),u?4===o.pbkdf2Sync.length?o.pbkdf2(t,e,r,s,(function(t,e){if(t)return u(t);u(null,e.toString("binary"))})):o.pbkdf2(t,e,r,s,a,(function(t,e){if(t)return u(t);u(null,e.toString("binary"))})):4===o.pbkdf2Sync.length?o.pbkdf2Sync(t,e,r,s).toString("binary"):o.pbkdf2Sync(t,e,r,s,a).toString("binary");if("undefined"!==typeof a&&null!==a||(a="sha1"),"string"===typeof a){if(!(a in i.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=i.md[a].create()}var h=a.digestLength;if(s>4294967295*h){var c=new Error("Derived key is too long.");if(u)return u(c);throw c}var l=Math.ceil(s/h),f=s-(l-1)*h,d=i.hmac.create();d.start(a,t);var p,g,y,m="";if(!u){for(var v=1;v<=l;++v){d.start(null,null),d.update(e),d.update(i.util.int32ToBytes(v)),p=y=d.digest().getBytes();for(var b=2;b<=r;++b)d.start(null,null),d.update(y),g=d.digest().getBytes(),p=i.util.xorBytes(p,g,h),y=g;m+=vl)return u(null,m);d.start(null,null),d.update(e),d.update(i.util.int32ToBytes(v)),p=y=d.digest().getBytes(),b=2,E()}function E(){if(b<=r)return d.start(null,null),d.update(y),g=d.digest().getBytes(),p=i.util.xorBytes(p,g,h),y=g,++b,i.util.setImmediate(E);m+=v65&&-1!==s){var a=e[s];","===a?(++s,e=e.substr(0,s)+"\r\n "+e.substr(s)):e=e.substr(0,s)+"\r\n"+a+e.substr(s+1),o=i-s-1,s=-1,++i}else" "!==e[i]&&"\t"!==e[i]&&","!==e[i]||(s=i);return e}function s(t){return t.replace(/^\s+/,"")}i.encode=function(t,e){e=e||{};var r,i="-----BEGIN "+t.type+"-----\r\n";if(t.procType&&(i+=o(r={name:"Proc-Type",values:[String(t.procType.version),t.procType.type]})),t.contentDomain&&(i+=o(r={name:"Content-Domain",values:[t.contentDomain]})),t.dekInfo&&(r={name:"DEK-Info",values:[t.dekInfo.algorithm]},t.dekInfo.parameters&&r.values.push(t.dekInfo.parameters),i+=o(r)),t.headers)for(var s=0;s>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(t+a),i+=r.digest().getBytes()}return i.substring(0,e)}i.encode_rsa_oaep=function(t,e,r){var i,s,a,u;"string"===typeof r?(i=r,s=arguments[3]||void 0,a=arguments[4]||void 0):r&&(i=r.label||void 0,s=r.seed||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),a?a.start():a=n.md.sha1.create(),u||(u=a);var h=Math.ceil(t.n.bitLength()/8),c=h-2*a.digestLength-2;if(e.length>c)throw(y=new Error("RSAES-OAEP input message length is too long.")).length=e.length,y.maxLength=c,y;i||(i=""),a.update(i,"raw");for(var l=a.digest(),f="",d=c-e.length,p=0;pt&&(s=h(t,e));var d=s.toString(16);i.target.postMessage({hex:d,workLoad:c}),s.dAddOffset(l,0)}}}d()}(t,e,i,o);return a(t,e,i,o)}(t,u,o.options,i);throw new Error("Invalid prime generation algorithm: "+o.name)}}function a(t,e,r,n){var i=h(t,e),o=function(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}(i.bitLength());"millerRabinTests"in r&&(o=r.millerRabinTests);var s=10;"maxBlockTime"in r&&(s=r.maxBlockTime),u(i,t,e,0,o,s,n)}function u(t,e,r,o,s,a,c){var l=+new Date;do{if(t.bitLength()>e&&(t=h(e,r)),t.isProbablePrime(s))return c(null,t);t.dAddOffset(i[o++%8],0)}while(a<0||+new Date-l=32)return u();var t=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(t)),u()}function u(){e.reseeds=4294967295===e.reseeds?0:e.reseeds+1;var t=e.plugin.md.create();t.update(e.keyBytes);for(var r=1,n=0;n<32;++n)e.reseeds%r===0&&(t.update(e.pools[n].digest().getBytes()),e.pools[n].start()),r<<=1;e.keyBytes=t.digest().getBytes(),t.start(),t.update(e.keyBytes);var i=t.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(i),e.generated=0}function h(t){var e=null,r=i.util.globalScope,n=r.crypto||r.msCrypto;n&&n.getRandomValues&&(e=function(t){return n.getRandomValues(t)});var o=i.util.createBuffer();if(e)for(;o.length()>16)))<<16,f=4294967295&(c=(2147483647&(c+=h>>15))+(c>>31));for(u=0;u<3;++u)l=f>>>(u<<3),l^=Math.floor(256*Math.random()),o.putByte(255&l)}return o.getBytes(t)}return e.pools=n,e.pool=0,e.generate=function(t,r){if(!r)return e.generateSync(t);var n=e.plugin.cipher,o=e.plugin.increment,s=e.plugin.formatKey,a=e.plugin.formatSeed,h=i.util.createBuffer();e.key=null,function c(l){if(l)return r(l);if(h.length()>=t)return r(null,h.getBytes(t));e.generated>1048575&&(e.key=null);if(null===e.key)return i.util.nextTick((function(){!function(t){if(e.pools[0].messageLength>=32)return u(),t();var r=32-e.pools[0].messageLength<<5;e.seedFile(r,(function(r,n){if(r)return t(r);e.collect(n),u(),t()}))}(c)}));var f=n(e.key,e.seed);e.generated+=f.length,h.putBytes(f),e.key=s(n(e.key,o(e.seed))),e.seed=a(n(e.key,e.seed)),i.util.setImmediate(c)}()},e.generateSync=function(t){var r=e.plugin.cipher,n=e.plugin.increment,o=e.plugin.formatKey,s=e.plugin.formatSeed;e.key=null;for(var u=i.util.createBuffer();u.length()1048575&&(e.key=null),null===e.key&&a();var h=r(e.key,e.seed);e.generated+=h.length,u.putBytes(h),e.key=o(r(e.key,n(e.seed))),e.seed=s(r(e.key,e.seed))}return u.getBytes(t)},o?(e.seedFile=function(t,e){o.randomBytes(t,(function(t,r){if(t)return e(t);e(null,r.toString())}))},e.seedFileSync=function(t){return o.randomBytes(t).toString()}):(e.seedFile=function(t,e){try{e(null,h(t))}catch(r){e(r)}},e.seedFileSync=h),e.collect=function(t){for(var r=t.length,n=0;n>i&255);e.collect(n)},e.registerWorker=function(t){if(t===self)e.seedFile=function(t,e){self.addEventListener("message",(function t(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",t),e(n.forge.prng.err,n.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:t}}})};else{t.addEventListener("message",(function(r){var n=r.data;n.forge&&n.forge.prng&&e.seedFile(n.forge.prng.needed,(function(e,r){t.postMessage({forge:{prng:{err:e,bytes:r}}})}))}))}},e}},49563:function(t,e,r){var n=r(3832);r(8925),r(41668),r(74933),r(97116),n.random&&n.random.getBytes?t.exports=n.random:function(e){var r={},i=new Array(4),o=n.util.createBuffer();function s(){var t=n.prng.create(r);return t.getBytes=function(e,r){return t.generate(e,r)},t.getBytesSync=function(e){return t.generate(e)},t}r.formatKey=function(t){var e=n.util.createBuffer(t);return(t=new Array(4))[0]=e.getInt32(),t[1]=e.getInt32(),t[2]=e.getInt32(),t[3]=e.getInt32(),n.aes._expandKey(t,!1)},r.formatSeed=function(t){var e=n.util.createBuffer(t);return(t=new Array(4))[0]=e.getInt32(),t[1]=e.getInt32(),t[2]=e.getInt32(),t[3]=e.getInt32(),t},r.cipher=function(t,e){return n.aes._updateBlock(t,e,i,!1),o.putInt32(i[0]),o.putInt32(i[1]),o.putInt32(i[2]),o.putInt32(i[3]),o.getBytes()},r.increment=function(t){return++t[3],t},r.md=n.md.sha256;var a=s(),u=null,h=n.util.globalScope,c=h.crypto||h.msCrypto;if(c&&c.getRandomValues&&(u=function(t){return c.getRandomValues(t)}),n.options.usePureJavaScript||!n.util.isNodejs&&!u){if("undefined"===typeof window||window.document,a.collectInt(+new Date,32),"undefined"!==typeof navigator){var l="";for(var f in navigator)try{"string"==typeof navigator[f]&&(l+=navigator[f])}catch(d){}a.collect(l),l=null}e&&(e().mousemove((function(t){a.collectInt(t.clientX,16),a.collectInt(t.clientY,16)})),e().keypress((function(t){a.collectInt(t.charCode,8)})))}if(n.random)for(var f in a)n.random[f]=a[f];else n.random=a;n.random.createInstance=s,t.exports=n.random}("undefined"!==typeof jQuery?jQuery:null)},69372:function(t,e,r){var n=r(3832);r(97116);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],o=[1,2,3,5],s=function(t,e){return t<>16-e},a=function(t,e){return(65535&t)>>e|t<<16-e&65535};t.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(t,e){"string"===typeof t&&(t=n.util.createBuffer(t)),e=e||128;var r,o=t,s=t.length(),a=e,u=Math.ceil(a/8),h=255>>(7&a);for(r=s;r<128;r++)o.putByte(i[o.at(r-1)+o.at(r-s)&255]);for(o.setAt(128-u,i[o.at(128-u)&h]),r=127-u;r>=0;r--)o.setAt(r,i[o.at(r+1)^o.at(r+u)]);return o};var u=function(t,e,r){var i,u,h,c,l=!1,f=null,d=null,p=null,g=[];for(t=n.rc2.expandKey(t,e),h=0;h<64;h++)g.push(t.getInt16Le());r?(i=function(t){for(h=0;h<4;h++)t[h]+=g[c]+(t[(h+3)%4]&t[(h+2)%4])+(~t[(h+3)%4]&t[(h+1)%4]),t[h]=s(t[h],o[h]),c++},u=function(t){for(h=0;h<4;h++)t[h]+=g[63&t[(h+3)%4]]}):(i=function(t){for(h=3;h>=0;h--)t[h]=a(t[h],o[h]),t[h]-=g[c]+(t[(h+3)%4]&t[(h+2)%4])+(~t[(h+3)%4]&t[(h+1)%4]),c--},u=function(t){for(h=3;h>=0;h--)t[h]-=g[63&t[(h+3)%4]]});var y=function(t){var e=[];for(h=0;h<4;h++){var n=f.getInt16Le();null!==p&&(r?n^=p.getInt16Le():p.putInt16Le(n)),e.push(65535&n)}c=r?0:63;for(var i=0;i=8;)y([[5,i],[1,u],[6,i],[1,u],[5,i]])},finish:function(t){var e=!0;if(r)if(t)e=t(8,f,!r);else{var n=8===f.length()?8:8-f.length();f.fillWithByte(n,n)}if(e&&(l=!0,m.update()),!r&&(e=0===f.length()))if(t)e=t(8,d,!r);else{var i=d.length(),o=d.at(i-1);o>i?e=!1:d.truncate(o)}return e}}};n.rc2.startEncrypting=function(t,e,r){var i=n.rc2.createEncryptionCipher(t,128);return i.start(e,r),i},n.rc2.createEncryptionCipher=function(t,e){return u(t,e,!0)},n.rc2.startDecrypting=function(t,e,r){var i=n.rc2.createDecryptionCipher(t,128);return i.start(e,r),i},n.rc2.createDecryptionCipher=function(t,e){return u(t,e,!1)}},28095:function(t,e,r){var n=r(3832);if(r(3068),r(15764),r(66270),r(18936),r(29654),r(49563),r(97116),"undefined"===typeof i)var i=n.jsbn.BigInteger;var o=n.util.isNodejs?r(25819):null,s=n.asn1,a=n.util;n.pki=n.pki||{},t.exports=n.pki.rsa=n.rsa=n.rsa||{};var u=n.pki,h=[6,4,2,4,2,4,6,2],c={name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},l={name:"RSAPrivateKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},f={name:"RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},d=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},p={name:"DigestInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:s.Class.UNIVERSAL,type:s.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},g=function(t){var e;if(!(t.algorithm in u.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=t.algorithm,r}e=u.oids[t.algorithm];var n=s.oidToDer(e).getBytes(),i=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]),o=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]);o.value.push(s.create(s.Class.UNIVERSAL,s.Type.OID,!1,n)),o.value.push(s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,""));var a=s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,t.digest().getBytes());return i.value.push(o),i.value.push(a),s.toDer(i).getBytes()},y=function(t,e,r){if(r)return t.modPow(e.e,e.n);if(!e.p||!e.q)return t.modPow(e.d,e.n);var o;e.dP||(e.dP=e.d.mod(e.p.subtract(i.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(i.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));do{o=new i(n.util.bytesToHex(n.random.getBytes(e.n.bitLength()/8)),16)}while(o.compareTo(e.n)>=0||!o.gcd(e.n).equals(i.ONE));for(var s=(t=t.multiply(o.modPow(e.e,e.n)).mod(e.n)).mod(e.p).modPow(e.dP,e.p),a=t.mod(e.q).modPow(e.dQ,e.q);s.compareTo(a)<0;)s=s.add(e.p);var u=s.subtract(a).multiply(e.qInv).mod(e.p).multiply(e.q).add(a);return u=u.multiply(o.modInverse(e.n)).mod(e.n)};function m(t,e,r){var i=n.util.createBuffer(),o=Math.ceil(e.n.bitLength()/8);if(t.length>o-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=t.length,s.max=o-11,s}i.putByte(0),i.putByte(r);var a,u=o-3-t.length;if(0===r||1===r){a=0===r?0:255;for(var h=0;h0;){var c=0,l=n.random.getBytes(u);for(h=0;h1;){if(255!==s.getByte()){--s.read;break}++h}else if(2===u)for(h=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++h}if(0!==s.getByte()||h!==o-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function b(t,e,r){"function"===typeof e&&(r=e,e={});var o={algorithm:{name:(e=e||{}).algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};function s(){a(t.pBits,(function(e,n){return e?r(e):(t.p=n,null!==t.q?h(e,t.q):void a(t.qBits,h))}))}function a(t,e){n.prime.generateProbablePrime(t,o,e)}function h(e,n){if(e)return r(e);if(t.q=n,t.p.compareTo(t.q)<0){var o=t.p;t.p=t.q,t.q=o}if(0!==t.p.subtract(i.ONE).gcd(t.e).compareTo(i.ONE))return t.p=null,void s();if(0!==t.q.subtract(i.ONE).gcd(t.e).compareTo(i.ONE))return t.q=null,void a(t.qBits,h);if(t.p1=t.p.subtract(i.ONE),t.q1=t.q.subtract(i.ONE),t.phi=t.p1.multiply(t.q1),0!==t.phi.gcd(t.e).compareTo(i.ONE))return t.p=t.q=null,void s();if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits)return t.q=null,void a(t.qBits,h);var c=t.e.modInverse(t.phi);t.keys={privateKey:u.rsa.setPrivateKey(t.n,t.e,c,t.p,t.q,c.mod(t.p1),c.mod(t.q1),t.q.modInverse(t.p)),publicKey:u.rsa.setPublicKey(t.n,t.e)},r(null,t.keys)}"prng"in e&&(o.prng=e.prng),s()}function w(t){var e=t.toString(16);e[0]>="8"&&(e="00"+e);var r=n.util.hexToBytes(e);return r.length>1&&(0===r.charCodeAt(0)&&0===(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128===(128&r.charCodeAt(1)))?r.substr(1):r}function E(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}function A(t){return n.util.isNodejs&&"function"===typeof o[t]}function k(t){return"undefined"!==typeof a.globalScope&&"object"===typeof a.globalScope.crypto&&"object"===typeof a.globalScope.crypto.subtle&&"function"===typeof a.globalScope.crypto.subtle[t]}function S(t){return"undefined"!==typeof a.globalScope&&"object"===typeof a.globalScope.msCrypto&&"object"===typeof a.globalScope.msCrypto.subtle&&"function"===typeof a.globalScope.msCrypto.subtle[t]}function B(t){for(var e=n.util.hexToBytes(t.toString(16)),r=new Uint8Array(e.length),i=0;i0;)c.putByte(0),--l;return c.putBytes(n.util.hexToBytes(h)),c.getBytes()},u.rsa.decrypt=function(t,e,r,o){var s=Math.ceil(e.n.bitLength()/8);if(t.length!==s){var a=new Error("Encrypted message length is invalid.");throw a.length=t.length,a.expected=s,a}var u=new i(n.util.createBuffer(t).toHex(),16);if(u.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var h=y(u,e,r).toString(16),c=n.util.createBuffer(),l=s-Math.ceil(h.length/2);l>0;)c.putByte(0),--l;return c.putBytes(n.util.hexToBytes(h)),!1!==o?v(c.getBytes(),e,r):c.getBytes()},u.rsa.createKeyPairGenerationState=function(t,e,r){"string"===typeof t&&(t=parseInt(t,10)),t=t||2048;var o,s=(r=r||{}).prng||n.random,a={nextBytes:function(t){for(var e=s.getBytesSync(t.length),r=0;r>1,pBits:t-(t>>1),pqState:0,num:null,keys:null}).e.fromInt(o.eInt),o},u.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,o=0,s=function(t,e){return t|e},a=+new Date,c=0;null===t.keys&&(e<=0||cl?t.pqState=0:t.num.isProbablePrime(E(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(h[o++%8],0):2===t.pqState?t.pqState=0===t.num.subtract(i.ONE).gcd(t.e).compareTo(i.ONE)?3:0:3===t.pqState&&(t.pqState=0,null===t.p?t.p=t.num:t.q=t.num,null!==t.p&&null!==t.q&&++t.state,t.num=null)}else if(1===t.state)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(2===t.state)t.p1=t.p.subtract(i.ONE),t.q1=t.q.subtract(i.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(3===t.state)0===t.phi.gcd(t.e).compareTo(i.ONE)?++t.state:(t.p=null,t.q=null,t.state=0);else if(4===t.state)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(5===t.state){var d=t.e.modInverse(t.phi);t.keys={privateKey:u.rsa.setPrivateKey(t.n,t.e,d,t.p,t.q,d.mod(t.p1),d.mod(t.q1),t.q.modInverse(t.p)),publicKey:u.rsa.setPublicKey(t.n,t.e)}}c+=(n=+new Date)-a,a=n}return null!==t.keys},u.rsa.generateKeyPair=function(t,e,r,i){if(1===arguments.length?"object"===typeof t?(r=t,t=void 0):"function"===typeof t&&(i=t,t=void 0):2===arguments.length?"number"===typeof t?"function"===typeof e?(i=e,e=void 0):"number"!==typeof e&&(r=e,e=void 0):(r=t,i=e,t=void 0,e=void 0):3===arguments.length&&("number"===typeof e?"function"===typeof r&&(i=r,r=void 0):(i=r,r=e,e=void 0)),r=r||{},void 0===t&&(t=r.bits||2048),void 0===e&&(e=r.e||65537),!n.options.usePureJavaScript&&!r.prng&&t>=256&&t<=16384&&(65537===e||3===e))if(i){if(A("generateKeyPair"))return o.generateKeyPair("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(t,e,r){if(t)return i(t);i(null,{privateKey:u.privateKeyFromPem(r),publicKey:u.publicKeyFromPem(e)})}));if(k("generateKey")&&k("exportKey"))return a.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:B(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(t){return a.globalScope.crypto.subtle.exportKey("pkcs8",t.privateKey)})).then(void 0,(function(t){i(t)})).then((function(t){if(t){var e=u.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(t)));i(null,{privateKey:e,publicKey:u.setRsaPublicKey(e.n,e.e)})}}));if(S("generateKey")&&S("exportKey")){var h=a.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:B(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);return h.oncomplete=function(t){var e=t.target.result,r=a.globalScope.msCrypto.subtle.exportKey("pkcs8",e.privateKey);r.oncomplete=function(t){var e=t.target.result,r=u.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(e)));i(null,{privateKey:r,publicKey:u.setRsaPublicKey(r.n,r.e)})},r.onerror=function(t){i(t)}},void(h.onerror=function(t){i(t)})}}else if(A("generateKeyPairSync")){var c=o.generateKeyPairSync("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:u.privateKeyFromPem(c.privateKey),publicKey:u.publicKeyFromPem(c.publicKey)}}var l=u.rsa.createKeyPairGenerationState(t,e,r);if(!i)return u.rsa.stepKeyPairGenerationState(l,0),l.keys;b(l,r,i)},u.setRsaPublicKey=u.rsa.setPublicKey=function(t,e){var r={n:t,e:e,encrypt:function(t,e,i){if("string"===typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===e)e={encode:function(t,e,r){return m(t,e,2).getBytes()}};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={encode:function(t,e){return n.pkcs1.encode_rsa_oaep(e,t,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(e))e={encode:function(t){return t}};else if("string"===typeof e)throw new Error('Unsupported encryption scheme: "'+e+'".');var o=e.encode(t,r,!0);return u.rsa.encrypt(o,r,!0)},verify:function(t,e,i,o){"string"===typeof i?i=i.toUpperCase():void 0===i&&(i="RSASSA-PKCS1-V1_5"),void 0===o&&(o={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in o||(o._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===i?i={verify:function(t,e){e=v(e,r,!0);var i=s.fromDer(e,{parseAllBytes:o._parseAllDigestBytes}),a={},u=[];if(!s.validate(i,p,a,u))throw(h=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=u,h;var h,c=s.derToOid(a.algorithmIdentifier);if(c!==n.oids.md2&&c!==n.oids.md5&&c!==n.oids.sha1&&c!==n.oids.sha224&&c!==n.oids.sha256&&c!==n.oids.sha384&&c!==n.oids.sha512&&c!==n.oids["sha512-224"]&&c!==n.oids["sha512-256"])throw(h=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=c,h;if((c===n.oids.md2||c===n.oids.md5)&&!("parameters"in a))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return t===a.digest}}:"NONE"!==i&&"NULL"!==i&&null!==i||(i={verify:function(t,e){return t===(e=v(e,r,!0))}});var a=u.rsa.decrypt(e,r,!0,!1);return i.verify(t,a,r.n.bitLength())}};return r},u.setRsaPrivateKey=u.rsa.setPrivateKey=function(t,e,r,i,o,s,a,h){var c={n:t,e:e,d:r,p:i,q:o,dP:s,dQ:a,qInv:h,decrypt:function(t,e,r){"string"===typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5");var i=u.rsa.decrypt(t,c,!1,!1);if("RSAES-PKCS1-V1_5"===e)e={decode:v};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={decode:function(t,e){return n.pkcs1.decode_rsa_oaep(e,t,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(e))throw new Error('Unsupported encryption scheme: "'+e+'".');e={decode:function(t){return t}}}return e.decode(i,c,!1)},sign:function(t,e){var r=!1;"string"===typeof e&&(e=e.toUpperCase()),void 0===e||"RSASSA-PKCS1-V1_5"===e?(e={encode:g},r=1):"NONE"!==e&&"NULL"!==e&&null!==e||(e={encode:function(){return t}},r=1);var n=e.encode(t,c.n.bitLength());return u.rsa.encrypt(n,c,r)}};return c},u.wrapRsaPrivateKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(u.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,s.toDer(t).getBytes())])},u.privateKeyFromAsn1=function(t){var e,r,o,a,h,f,d,p,g={},y=[];if(s.validate(t,c,g,y)&&(t=s.fromDer(n.util.createBuffer(g.privateKey))),g={},y=[],!s.validate(t,l,g,y)){var m=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw m.errors=y,m}return e=n.util.createBuffer(g.privateKeyModulus).toHex(),r=n.util.createBuffer(g.privateKeyPublicExponent).toHex(),o=n.util.createBuffer(g.privateKeyPrivateExponent).toHex(),a=n.util.createBuffer(g.privateKeyPrime1).toHex(),h=n.util.createBuffer(g.privateKeyPrime2).toHex(),f=n.util.createBuffer(g.privateKeyExponent1).toHex(),d=n.util.createBuffer(g.privateKeyExponent2).toHex(),p=n.util.createBuffer(g.privateKeyCoefficient).toHex(),u.setRsaPrivateKey(new i(e,16),new i(r,16),new i(o,16),new i(a,16),new i(h,16),new i(f,16),new i(d,16),new i(p,16))},u.privateKeyToAsn1=u.privateKeyToRSAPrivateKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.e)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.d)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.p)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.q)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.dP)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.dQ)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.qInv))])},u.publicKeyFromAsn1=function(t){var e={},r=[];if(s.validate(t,d,e,r)){var o,a=s.derToOid(e.publicKeyOid);if(a!==u.oids.rsaEncryption)throw(o=new Error("Cannot read public key. Unknown OID.")).oid=a,o;t=e.rsaPublicKey}if(r=[],!s.validate(t,f,e,r))throw(o=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,o;var h=n.util.createBuffer(e.publicKeyModulus).toHex(),c=n.util.createBuffer(e.publicKeyExponent).toHex();return u.setRsaPublicKey(new i(h,16),new i(c,16))},u.publicKeyToAsn1=u.publicKeyToSubjectPublicKeyInfo=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(u.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.BITSTRING,!1,[u.publicKeyToRSAPublicKey(t)])])},u.publicKeyToRSAPublicKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(t.e))])}},137:function(t,e,r){var n=r(3832);r(28991),r(97116);var i=t.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),s=!0);var t=null,e=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,u>>>0];for(var h=i.fullMessageLength.length-1;h>=0;--h)i.fullMessageLength[h]+=u[1],u[1]=u[0]+(i.fullMessageLength[h]/4294967296>>>0),i.fullMessageLength[h]=i.fullMessageLength[h]>>>0,u[0]=u[1]/4294967296>>>0;return e.putBytes(o),a(t,r,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(e.bytes());var u,h=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-h));for(var c=8*i.fullMessageLength[0],l=0;l>>0,s.putInt32(c>>>0),c=u>>>0;s.putInt32(c);var f={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};a(f,r,s);var d=n.util.createBuffer();return d.putInt32(f.h0),d.putInt32(f.h1),d.putInt32(f.h2),d.putInt32(f.h3),d.putInt32(f.h4),d},i};var o=null,s=!1;function a(t,e,r){for(var n,i,o,s,a,u,h,c=r.length();c>=64;){for(i=t.h0,o=t.h1,s=t.h2,a=t.h3,u=t.h4,h=0;h<16;++h)n=r.getInt32(),e[h]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+u+1518500249+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;h<20;++h)n=(n=e[h-3]^e[h-8]^e[h-14]^e[h-16])<<1|n>>>31,e[h]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+u+1518500249+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;h<32;++h)n=(n=e[h-3]^e[h-8]^e[h-14]^e[h-16])<<1|n>>>31,e[h]=n,n=(i<<5|i>>>27)+(o^s^a)+u+1859775393+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;h<40;++h)n=(n=e[h-6]^e[h-16]^e[h-28]^e[h-32])<<2|n>>>30,e[h]=n,n=(i<<5|i>>>27)+(o^s^a)+u+1859775393+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;h<60;++h)n=(n=e[h-6]^e[h-16]^e[h-28]^e[h-32])<<2|n>>>30,e[h]=n,n=(i<<5|i>>>27)+(o&s|a&(o^s))+u+2400959708+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;h<80;++h)n=(n=e[h-6]^e[h-16]^e[h-28]^e[h-32])<<2|n>>>30,e[h]=n,n=(i<<5|i>>>27)+(o^s^a)+u+3395469782+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;t.h0=t.h0+i|0,t.h1=t.h1+o|0,t.h2=t.h2+s|0,t.h3=t.h3+a|0,t.h4=t.h4+u|0,c-=64}}},41668:function(t,e,r){var n=r(3832);r(28991),r(97116);var i=t.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=i,i.create=function(){s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),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=!0);var t=null,e=n.util.createBuffer(),r=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,a>>>0];for(var h=i.fullMessageLength.length-1;h>=0;--h)i.fullMessageLength[h]+=a[1],a[1]=a[0]+(i.fullMessageLength[h]/4294967296>>>0),i.fullMessageLength[h]=i.fullMessageLength[h]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(o),u(t,r,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(e.bytes());var a,h=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-h));for(var c=8*i.fullMessageLength[0],l=0;l>>0,s.putInt32(c>>>0),c=a>>>0;s.putInt32(c);var f={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};u(f,r,s);var d=n.util.createBuffer();return d.putInt32(f.h0),d.putInt32(f.h1),d.putInt32(f.h2),d.putInt32(f.h3),d.putInt32(f.h4),d.putInt32(f.h5),d.putInt32(f.h6),d.putInt32(f.h7),d},i};var o=null,s=!1,a=null;function u(t,e,r){for(var n,i,o,s,u,h,c,l,f,d,p,g,y,m=r.length();m>=64;){for(u=0;u<16;++u)e[u]=r.getInt32();for(;u<64;++u)n=((n=e[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=e[u-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,e[u]=n+e[u-7]+i+e[u-16]|0;for(h=t.h0,c=t.h1,l=t.h2,f=t.h3,d=t.h4,p=t.h5,g=t.h6,y=t.h7,u=0;u<64;++u)o=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),s=h&c|l&(h^c),n=y+((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(g^d&(p^g))+a[u]+e[u],y=g,g=p,p=d,d=f+n>>>0,f=l,l=c,c=h,h=n+(i=o+s)>>>0;t.h0=t.h0+h|0,t.h1=t.h1+c|0,t.h2=t.h2+l|0,t.h3=t.h3+f|0,t.h4=t.h4+d|0,t.h5=t.h5+p|0,t.h6=t.h6+g|0,t.h7=t.h7+y|0,m-=64}}},63219:function(t,e,r){var n=r(3832);r(28991),r(97116);var i=t.exports=n.sha512=n.sha512||{};n.md.sha512=n.md.algorithms.sha512=i;var o=n.sha384=n.sha512.sha384=n.sha512.sha384||{};o.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=o,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(t){if(a||(s=String.fromCharCode(128),s+=n.util.fillString(String.fromCharCode(0),128),u=[[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]],(h={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],h["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],h["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],h["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],a=!0),"undefined"===typeof t&&(t="SHA-512"),!(t in h))throw new Error("Invalid SHA-512 algorithm: "+t);for(var e=h[t],r=null,i=n.util.createBuffer(),o=new Array(80),l=0;l<80;++l)o[l]=new Array(2);var f=64;switch(t){case"SHA-384":f=48;break;case"SHA-512/256":f=32;break;case"SHA-512/224":f=28}var d={algorithm:t.replace("-","").toLowerCase(),blockLength:128,digestLength:f,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){d.messageLength=0,d.fullMessageLength=d.messageLength128=[];for(var t=d.messageLengthSize/4,o=0;o>>0,s>>>0];for(var a=d.fullMessageLength.length-1;a>=0;--a)d.fullMessageLength[a]+=s[1],s[1]=s[0]+(d.fullMessageLength[a]/4294967296>>>0),d.fullMessageLength[a]=d.fullMessageLength[a]>>>0,s[0]=s[1]/4294967296>>>0;return i.putBytes(t),c(r,o,i),(i.read>2048||0===i.length())&&i.compact(),d},d.digest=function(){var e=n.util.createBuffer();e.putBytes(i.bytes());var a,u=d.fullMessageLength[d.fullMessageLength.length-1]+d.messageLengthSize&d.blockLength-1;e.putBytes(s.substr(0,d.blockLength-u));for(var h=8*d.fullMessageLength[0],l=0;l>>0,e.putInt32(h>>>0),h=a>>>0;e.putInt32(h);var f=new Array(r.length);for(l=0;l=128;){for(T=0;T<16;++T)e[T][0]=r.getInt32()>>>0,e[T][1]=r.getInt32()>>>0;for(;T<80;++T)n=(((O=(_=e[T-2])[0])>>>19|(R=_[1])<<13)^(R>>>29|O<<3)^O>>>6)>>>0,i=((O<<13|R>>>19)^(R<<3|O>>>29)^(O<<26|R>>>6))>>>0,o=(((O=(N=e[T-15])[0])>>>1|(R=N[1])<<31)^(O>>>8|R<<24)^O>>>7)>>>0,s=((O<<31|R>>>1)^(O<<24|R>>>8)^(O<<25|R>>>7))>>>0,P=e[T-7],U=e[T-16],R=i+P[1]+s+U[1],e[T][0]=n+P[0]+o+U[0]+(R/4294967296>>>0)>>>0,e[T][1]=R>>>0;for(p=t[0][0],g=t[0][1],y=t[1][0],m=t[1][1],v=t[2][0],b=t[2][1],w=t[3][0],E=t[3][1],A=t[4][0],k=t[4][1],S=t[5][0],B=t[5][1],x=t[6][0],C=t[6][1],M=t[7][0],I=t[7][1],T=0;T<80;++T)c=((A>>>14|k<<18)^(A>>>18|k<<14)^(k>>>9|A<<23))>>>0,l=(x^A&(S^x))>>>0,a=((p>>>28|g<<4)^(g>>>2|p<<30)^(g>>>7|p<<25))>>>0,h=((p<<4|g>>>28)^(g<<30|p>>>2)^(g<<25|p>>>7))>>>0,f=(p&y|v&(p^y))>>>0,d=(g&m|b&(g^m))>>>0,R=I+(((A<<18|k>>>14)^(A<<14|k>>>18)^(k<<23|A>>>9))>>>0)+((C^k&(B^C))>>>0)+u[T][1]+e[T][1],n=M+c+l+u[T][0]+e[T][0]+(R/4294967296>>>0)>>>0,i=R>>>0,o=a+f+((R=h+d)/4294967296>>>0)>>>0,s=R>>>0,M=x,I=C,x=S,C=B,S=A,B=k,A=w+n+((R=E+i)/4294967296>>>0)>>>0,k=R>>>0,w=v,E=b,v=y,b=m,y=p,m=g,p=n+o+((R=i+s)/4294967296>>>0)>>>0,g=R>>>0;R=t[0][1]+g,t[0][0]=t[0][0]+p+(R/4294967296>>>0)>>>0,t[0][1]=R>>>0,R=t[1][1]+m,t[1][0]=t[1][0]+y+(R/4294967296>>>0)>>>0,t[1][1]=R>>>0,R=t[2][1]+b,t[2][0]=t[2][0]+v+(R/4294967296>>>0)>>>0,t[2][1]=R>>>0,R=t[3][1]+E,t[3][0]=t[3][0]+w+(R/4294967296>>>0)>>>0,t[3][1]=R>>>0,R=t[4][1]+k,t[4][0]=t[4][0]+A+(R/4294967296>>>0)>>>0,t[4][1]=R>>>0,R=t[5][1]+B,t[5][0]=t[5][0]+S+(R/4294967296>>>0)>>>0,t[5][1]=R>>>0,R=t[6][1]+C,t[6][0]=t[6][0]+x+(R/4294967296>>>0)>>>0,t[6][1]=R>>>0,R=t[7][1]+I,t[7][0]=t[7][0]+M+(R/4294967296>>>0)>>>0,t[7][1]=R>>>0,L-=128}}},97116:function(t,e,r){var n=r(24112),i=r(62678).Buffer,o=r(3832),s=r(78807),a=t.exports=o.util=o.util||{};function u(t){if(8!==t&&16!==t&&24!==t&&32!==t)throw new Error("Only 8, 16, 24, or 32 bits supported: "+t)}function h(t){if(this.data="",this.read=0,"string"===typeof t)this.data=t;else if(a.isArrayBuffer(t)||a.isArrayBufferView(t))if("undefined"!==typeof i&&t instanceof i)this.data=t.toString("binary");else{var e=new Uint8Array(t);try{this.data=String.fromCharCode.apply(null,e)}catch(n){for(var r=0;r15?(r=Date.now(),s(t)):(e.push(t),1===e.length&&o.setAttribute("a",i=!i))}}a.nextTick=a.setImmediate}(),a.isNodejs="undefined"!==typeof n&&n.versions&&n.versions.node,a.globalScope=a.isNodejs?r.g:"undefined"===typeof self?window:self,a.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},a.isArrayBuffer=function(t){return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer},a.isArrayBufferView=function(t){return t&&a.isArrayBuffer(t.buffer)&&void 0!==t.byteLength},a.ByteBuffer=h,a.ByteStringBuffer=h;a.ByteStringBuffer.prototype._optimizeConstructedString=function(t){this._constructedStringLength+=t,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},a.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},a.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},a.ByteStringBuffer.prototype.putByte=function(t){return this.putBytes(String.fromCharCode(t))},a.ByteStringBuffer.prototype.fillWithByte=function(t,e){t=String.fromCharCode(t);for(var r=this.data;e>0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return this.data=r,this._optimizeConstructedString(e),this},a.ByteStringBuffer.prototype.putBytes=function(t){return this.data+=t,this._optimizeConstructedString(t.length),this},a.ByteStringBuffer.prototype.putString=function(t){return this.putBytes(a.encodeUtf8(t))},a.ByteStringBuffer.prototype.putInt16=function(t){return this.putBytes(String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},a.ByteStringBuffer.prototype.putInt24=function(t){return this.putBytes(String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},a.ByteStringBuffer.prototype.putInt32=function(t){return this.putBytes(String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},a.ByteStringBuffer.prototype.putInt16Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255))},a.ByteStringBuffer.prototype.putInt24Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255))},a.ByteStringBuffer.prototype.putInt32Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>24&255))},a.ByteStringBuffer.prototype.putInt=function(t,e){u(e);var r="";do{e-=8,r+=String.fromCharCode(t>>e&255)}while(e>0);return this.putBytes(r)},a.ByteStringBuffer.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<0);return e},a.ByteStringBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e},a.ByteStringBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},a.ByteStringBuffer.prototype.bytes=function(t){return"undefined"===typeof t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},a.ByteStringBuffer.prototype.at=function(t){return this.data.charCodeAt(this.read+t)},a.ByteStringBuffer.prototype.setAt=function(t,e){return this.data=this.data.substr(0,this.read+t)+String.fromCharCode(e)+this.data.substr(this.read+t+1),this},a.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},a.ByteStringBuffer.prototype.copy=function(){var t=a.createBuffer(this.data);return t.read=this.read,t},a.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},a.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},a.ByteStringBuffer.prototype.truncate=function(t){var e=Math.max(0,this.length()-t);return this.data=this.data.substr(this.read,e),this.read=0,this},a.ByteStringBuffer.prototype.toHex=function(){for(var t="",e=this.read;e=t)return this;e=Math.max(e||this.growSize,t);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+e);return n.set(r),this.data=new DataView(n.buffer),this},a.DataBuffer.prototype.putByte=function(t){return this.accommodate(1),this.data.setUint8(this.write++,t),this},a.DataBuffer.prototype.fillWithByte=function(t,e){this.accommodate(e);for(var r=0;r>8&65535),this.data.setInt8(this.write,t>>16&255),this.write+=3,this},a.DataBuffer.prototype.putInt32=function(t){return this.accommodate(4),this.data.setInt32(this.write,t),this.write+=4,this},a.DataBuffer.prototype.putInt16Le=function(t){return this.accommodate(2),this.data.setInt16(this.write,t,!0),this.write+=2,this},a.DataBuffer.prototype.putInt24Le=function(t){return this.accommodate(3),this.data.setInt8(this.write,t>>16&255),this.data.setInt16(this.write,t>>8&65535,!0),this.write+=3,this},a.DataBuffer.prototype.putInt32Le=function(t){return this.accommodate(4),this.data.setInt32(this.write,t,!0),this.write+=4,this},a.DataBuffer.prototype.putInt=function(t,e){u(e),this.accommodate(e/8);do{e-=8,this.data.setInt8(this.write++,t>>e&255)}while(e>0);return this},a.DataBuffer.prototype.putSignedInt=function(t,e){return u(e),this.accommodate(e/8),t<0&&(t+=2<0);return e},a.DataBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e},a.DataBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},a.DataBuffer.prototype.bytes=function(t){return"undefined"===typeof t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},a.DataBuffer.prototype.at=function(t){return this.data.getUint8(this.read+t)},a.DataBuffer.prototype.setAt=function(t,e){return this.data.setUint8(t,e),this},a.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},a.DataBuffer.prototype.copy=function(){return new a.DataBuffer(this)},a.DataBuffer.prototype.compact=function(){if(this.read>0){var t=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(t.byteLength);e.set(t),this.data=new DataView(e),this.write-=this.read,this.read=0}return this},a.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},a.DataBuffer.prototype.truncate=function(t){return this.write=Math.max(0,this.length()-t),this.read=Math.min(this.read,this.write),this},a.DataBuffer.prototype.toHex=function(){for(var t="",e=this.read;e0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return r},a.xorBytes=function(t,e,r){for(var n="",i="",o="",s=0,a=0;r>0;--r,++s)i=t.charCodeAt(s)^e.charCodeAt(s),a>=10&&(n+=o,o="",a=0),o+=String.fromCharCode(i),++a;return n+=o},a.hexToBytes=function(t){var e="",r=0;for(!0&t.length&&(r=1,e+=String.fromCharCode(parseInt(t[0],16)));r>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t)};var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],f="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";a.encode64=function(t,e){for(var r,n,i,o="",s="",a=0;a>2),o+=c.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=c.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":c.charAt(63&i)),e&&o.length>e&&(s+=o.substr(0,e)+"\r\n",o=o.substr(e));return s+=o},a.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e,r,n,i,o="",s=0;s>4),64!==n&&(o+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(o+=String.fromCharCode((3&n)<<6|i)));return o},a.encodeUtf8=function(t){return unescape(encodeURIComponent(t))},a.decodeUtf8=function(t){return decodeURIComponent(escape(t))},a.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:s.encode,decode:s.decode}},a.binary.raw.encode=function(t){return String.fromCharCode.apply(null,t)},a.binary.raw.decode=function(t,e,r){var n=e;n||(n=new Uint8Array(t.length));for(var i=r=r||0,o=0;o>2),o+=c.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=c.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":c.charAt(63&i)),e&&o.length>e&&(s+=o.substr(0,e)+"\r\n",o=o.substr(e));return s+=o},a.binary.base64.decode=function(t,e,r){var n,i,o,s,a=e;a||(a=new Uint8Array(3*Math.ceil(t.length/4))),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var u=0,h=r=r||0;u>4,64!==o&&(a[h++]=(15&i)<<4|o>>2,64!==s&&(a[h++]=(3&o)<<6|s));return e?h-r:a.subarray(0,h)},a.binary.base58.encode=function(t,e){return a.binary.baseN.encode(t,f,e)},a.binary.base58.decode=function(t,e){return a.binary.baseN.decode(t,f,e)},a.text={utf8:{},utf16:{}},a.text.utf8.encode=function(t,e,r){t=a.encodeUtf8(t);var n=e;n||(n=new Uint8Array(t.length));for(var i=r=r||0,o=0;o0&&o.push(r),s=n.lastIndex;var a=e[0][1];switch(a){case"s":case"o":i");break;case"%":o.push("%");break;default:o.push("<%"+a+"?>")}}return o.push(t.substring(s)),o.join("")},a.formatNumber=function(t,e,r,n){var i=t,o=isNaN(e=Math.abs(e))?2:e,s=void 0===r?",":r,a=void 0===n?".":n,u=i<0?"-":"",h=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",c=h.length>3?h.length%3:0;return u+(c?h.substr(0,c)+a:"")+h.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+a)+(o?s+Math.abs(i-h).toFixed(o).slice(2):"")},a.formatSize=function(t){return t=t>=1073741824?a.formatNumber(t/1073741824,2,".","")+" GiB":t>=1048576?a.formatNumber(t/1048576,2,".","")+" MiB":t>=1024?a.formatNumber(t/1024,0)+" KiB":a.formatNumber(t,0)+" bytes"},a.bytesFromIP=function(t){return-1!==t.indexOf(".")?a.bytesFromIPv4(t):-1!==t.indexOf(":")?a.bytesFromIPv6(t):null},a.bytesFromIPv4=function(t){if(4!==(t=t.split(".")).length)return null;for(var e=a.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1)):r.push({start:u,end:u})}e.push(o)}if(r.length>0){var h=r[n];h.end-h.start>0&&(e.splice(h.start,h.end-h.start+1,""),0===h.start&&e.unshift(""),7===h.end&&e.push(""))}return e.join(":")},a.estimateCores=function(t,e){if("function"===typeof t&&(e=t,t={}),t=t||{},"cores"in a&&!t.update)return e(null,a.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return a.cores=navigator.hardwareConcurrency,e(null,a.cores);if("undefined"===typeof Worker)return a.cores=1,e(null,a.cores);if("undefined"===typeof Blob)return a.cores=2,e(null,a.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(t){for(var e=Date.now(),r=e+4;Date.now()a.st&&i.sti.st&&a.stt.or(b[e])),h.decoder);const E=d(class{constructor(t,e,r){if(!(t instanceof Uint8Array))throw new Error("invalid id provided");if(e&&r&&!g(e.public.bytes,r.bytes))throw new Error("inconsistent arguments");this._id=t,this._idB58String=u.encode(this.id).substring(1),this._privKey=e,this._pubKey=r}get id(){return this._id}set id(t){throw new Error("Id is immutable")}get privKey(){return this._privKey}set privKey(t){this._privKey=t}get pubKey(){if(this._pubKey)return this._pubKey;if(this._privKey)return this._privKey.public;try{const t=l.decode(this.id);t.code===v.code&&(this._pubKey=f.unmarshalPublicKey(t.digest))}catch(t){}return this._pubKey}set pubKey(t){this._pubKey=t}marshalPubKey(){if(this.pubKey)return f.marshalPublicKey(this.pubKey)}marshalPrivKey(){if(this.privKey)return f.marshalPrivateKey(this.privKey)}marshal(t){return p.encode({id:this.toBytes(),pubKey:this.marshalPubKey(),privKey:t?null:this.marshalPrivKey()}).finish()}toPrint(){let t=this.toB58String();t.startsWith("Qm")&&(t=t.slice(2));let e=6;return t.length"}toJSON(){return{id:this.toB58String(),privKey:B(this.marshalPrivKey()),pubKey:B(this.marshalPubKey())}}toHexString(){return c.encode(this.id).substring(1)}toBytes(){return this.id}toB58String(){return this._idB58String}toString(){if(!this._idCIDString){const t=n.createV1(114,l.decode(this.id));Object.defineProperty(this,"_idCIDString",{value:t.toString(),enumerable:!1})}return this._idCIDString}equals(t){if(t instanceof Uint8Array)return g(this.id,t);if(t.id)return g(this.id,t.id);throw new Error("not valid Id")}isEqual(t){return this.equals(t)}isValid(){return Boolean(this.privKey&&this.privKey.public&&this.privKey.public.bytes&&this.pubKey.bytes instanceof Uint8Array&&g(this.privKey.public.bytes,this.pubKey.bytes))}hasInlinePublicKey(){try{if(l.decode(this.id).code===v.code)return!0}catch(t){}return!1}},{className:"PeerId",symbolName:"@libp2p/js-peer-id/PeerId"});e=t.exports=E;const A=t=>t.bytes.length<=42?l.create(v.code,t.bytes).bytes:t.hash(),k=async(t,e)=>{const r=await A(e);return new E(r,t,e)};e.create=async t=>{(t=t||{}).bits=t.bits||2048,t.keyType=t.keyType||"RSA";const e=await f.generateKeyPair(t.keyType,t.bits);return k(e,e.public)},e.createFromHexString=t=>new E(c.decode("f"+t)),e.createFromBytes=t=>{try{const r=n.decode(t);if(!S(r))throw new Error("Supplied PeerID CID is invalid");return e.createFromCID(r)}catch{if(l.decode(t).code!==v.code)throw new Error("Supplied PeerID CID is invalid");return new E(t)}},e.createFromB58String=t=>e.createFromBytes(u.decode("z"+t));const S=t=>114===t.code||112===t.code;function B(t){if(t)return m(t,"base64pad")}e.createFromCID=t=>{if(!(t=n.asCID(t))||!S(t))throw new Error("Supplied PeerID CID is invalid");return new E(t.multihash.bytes)},e.createFromPubKey=async t=>{let e=t;if("string"===typeof e&&(e=y(t,"base64pad")),!(e instanceof Uint8Array))throw new Error("Supplied key is neither a base64 string nor a Uint8Array");const r=await f.unmarshalPublicKey(e);return k(void 0,r)},e.createFromPrivKey=async t=>{if("string"===typeof t&&(t=y(t,"base64pad")),!(t instanceof Uint8Array))throw new Error("Supplied key is neither a base64 string nor a Uint8Array");const e=await f.unmarshalPrivateKey(t);return k(e,e.public)},e.createFromJSON=async t=>{const e=u.decode("z"+t.id),r=t.privKey&&y(t.privKey,"base64pad"),n=t.pubKey&&y(t.pubKey,"base64pad"),i=n&&await f.unmarshalPublicKey(n);if(!r)return new E(e,void 0,i);const o=await f.unmarshalPrivateKey(r),s=await A(o.public);let a;if(i&&(a=await A(i)),i&&!g(s,a))throw new Error("Public and private key do not match");if(e&&!g(s,e))throw new Error("Id and private key do not match");return new E(e,o,i)},e.createFromProtobuf=async t=>{"string"===typeof t&&(t=y(t,"base16"));let e,r,{id:n,privKey:i,pubKey:o}=p.decode(t);if(i=!!i&&await f.unmarshalPrivateKey(i),o=!!o&&await f.unmarshalPublicKey(o),i&&(r=await A(i.public)),o&&(e=await A(o)),i){if(o&&!g(r,e))throw new Error("Public and private key do not match");return new E(r,i,i.public)}if(o)return new E(e,void 0,o);if(n)return new E(n);throw new Error("Protobuf did not contain any usable key material")},e.parse=t=>("1"!==t.charAt(0)&&"Q"!==t.charAt(0)||(t=`z${t}`),e.createFromBytes(w.decode(t))),e.isPeerId=t=>Boolean("object"===typeof t&&t._id&&t._idB58String)},28780:function(t,e,r){"use strict";var n=r(62100),i=n.Reader,o=n.Writer,s=n.util,a=n.roots["libp2p-peer-id"]||(n.roots["libp2p-peer-id"]={});a.PeerIdProto=function(){function t(t){if(t)for(var e=Object.keys(t),r=0;r>>3){case 1:n.id=t.bytes();break;case 2:n.pubKey=t.bytes();break;case 3:n.privKey=t.bytes();break;default:t.skipType(7&o)}}if(!n.hasOwnProperty("id"))throw s.ProtocolError("missing required 'id'",{instance:n});return n},t.fromObject=function(t){if(t instanceof a.PeerIdProto)return t;var e=new a.PeerIdProto;return null!=t.id&&("string"===typeof t.id?s.base64.decode(t.id,e.id=s.newBuffer(s.base64.length(t.id)),0):t.id.length&&(e.id=t.id)),null!=t.pubKey&&("string"===typeof t.pubKey?s.base64.decode(t.pubKey,e.pubKey=s.newBuffer(s.base64.length(t.pubKey)),0):t.pubKey.length&&(e.pubKey=t.pubKey)),null!=t.privKey&&("string"===typeof t.privKey?s.base64.decode(t.privKey,e.privKey=s.newBuffer(s.base64.length(t.privKey)),0):t.privKey.length&&(e.privKey=t.privKey)),e},t.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(e.bytes===String?r.id="":(r.id=[],e.bytes!==Array&&(r.id=s.newBuffer(r.id))),e.bytes===String?r.pubKey="":(r.pubKey=[],e.bytes!==Array&&(r.pubKey=s.newBuffer(r.pubKey))),e.bytes===String?r.privKey="":(r.privKey=[],e.bytes!==Array&&(r.privKey=s.newBuffer(r.privKey)))),null!=t.id&&t.hasOwnProperty("id")&&(r.id=e.bytes===String?s.base64.encode(t.id,0,t.id.length):e.bytes===Array?Array.prototype.slice.call(t.id):t.id),null!=t.pubKey&&t.hasOwnProperty("pubKey")&&(r.pubKey=e.bytes===String?s.base64.encode(t.pubKey,0,t.pubKey.length):e.bytes===Array?Array.prototype.slice.call(t.pubKey):t.pubKey),null!=t.privKey&&t.hasOwnProperty("privKey")&&(r.privKey=e.bytes===String?s.base64.encode(t.privKey,0,t.privKey.length):e.bytes===Array?Array.prototype.slice.call(t.privKey):t.privKey),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},t}(),t.exports=a},62100:function(t,e,r){"use strict";t.exports=r(89482)},89482:function(t,e,r){"use strict";var n=e;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(41173),n.BufferWriter=r(43155),n.Reader=r(51408),n.BufferReader=r(50593),n.util=r(99693),n.rpc=r(35994),n.roots=r(85054),n.configure=i,i()},51408:function(t,e,r){"use strict";t.exports=u;var n,i=r(99693),o=i.LongBits,s=i.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function u(t){this.buf=t,this.pos=0,this.len=t.length}var h="undefined"!==typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new u(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new u(t);throw Error("illegal buffer")},c=function(){return i.Buffer?function(t){return(u.create=function(t){return i.Buffer.isBuffer(t)?new n(t):h(t)})(t)}:h};function l(){var t=new o(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function f(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw a(this,8);return new o(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}u.create=c(),u.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,u.prototype.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return t}}(),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},u.prototype.bool=function(){return 0!==this.uint32()},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},u.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},u.prototype.bytes=function(){var t=this.uint32(),e=this.pos,r=this.pos+t;if(r>this.len)throw a(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,r):e===r?new this.buf.constructor(0):this._slice.call(this.buf,e,r)},u.prototype.string=function(){var t=this.bytes();return s.read(t,0,t.length)},u.prototype.skip=function(t){if("number"===typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},u.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},u._configure=function(t){n=t,u.create=c(),n._configure();var e=i.Long?"toLong":"toNumber";i.merge(u.prototype,{int64:function(){return l.call(this)[e](!1)},uint64:function(){return l.call(this)[e](!0)},sint64:function(){return l.call(this).zzDecode()[e](!1)},fixed64:function(){return d.call(this)[e](!0)},sfixed64:function(){return d.call(this)[e](!1)}})}},50593:function(t,e,r){"use strict";t.exports=o;var n=r(51408);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(99693);function o(t){n.call(this,t)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},o._configure()},85054:function(t){"use strict";t.exports={}},35994:function(t,e,r){"use strict";e.Service=r(77948)},77948:function(t,e,r){"use strict";t.exports=i;var n=r(99693);function i(t,e,r){if("function"!==typeof t)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(r)}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function t(e,r,i,o,s){if(!o)throw TypeError("request must be specified");var a=this;if(!s)return n.asPromise(t,a,e,r,i,o);if(a.rpcImpl)try{return a.rpcImpl(e,r[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(t,r){if(t)return a.emit("error",t,e),s(t);if(null!==r){if(!(r instanceof i))try{r=i[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(t){return a.emit("error",t,e),s(t)}return a.emit("data",r,e),s(null,r)}a.end(!0)}))}catch(u){return a.emit("error",u,e),void setTimeout((function(){s(u)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},i.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},1945:function(t,e,r){"use strict";t.exports=i;var n=r(99693);function i(t,e){this.lo=t>>>0,this.hi=e>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var r=t>>>0,n=(t-r)/4294967296>>>0;return e&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(t){if("number"===typeof t)return i.fromNumber(t);if(n.isString(t)){if(!n.Long)return i.fromNumber(parseInt(t,10));t=n.Long.fromString(t)}return t.low||t.high?new i(t.low>>>0,t.high>>>0):o},i.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,r=~this.hi>>>0;return e||(r=r+1>>>0),-(e+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(t){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;i.fromHash=function(t){return t===s?o:new i((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},i.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},i.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}},99693:function(t,e,r){"use strict";var n=e;function i(t,e,r){for(var n=Object.keys(e),i=0;i0)},n.Buffer=function(){try{var t=n.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(t){return"number"===typeof t?n.Buffer?n._Buffer_allocUnsafe(t):new n.Array(t):n.Buffer?n._Buffer_from(t):"undefined"===typeof Uint8Array?t:new Uint8Array(t)},n.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(t){return t?n.LongBits.from(t).toHash():n.LongBits.zeroHash},n.longFromHash=function(t,e){var r=n.LongBits.fromHash(t);return n.Long?n.Long.fromBits(r.lo,r.hi,e):r.toNumber(Boolean(e))},n.merge=i,n.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(t){for(var e={},r=0;r-1;--r)if(1===e[t[r]]&&void 0!==this[t[r]]&&null!==this[t[r]])return t[r]}},n.oneOfSetter=function(t){return function(e){for(var r=0;r>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=127&t.lo|128,t.lo=t.lo>>>7;e[r++]=t.lo}function y(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}l.create=f(),l.alloc=function(t){return new i.Array(t)},i.Array!==Array&&(l.alloc=i.pool(l.alloc,i.Array.prototype.subarray)),l.prototype._push=function(t,e,r){return this.tail=this.tail.next=new u(t,e,r),this.len+=e,this},p.prototype=Object.create(u.prototype),p.prototype.fn=function(t,e,r){for(;t>127;)e[r++]=127&t|128,t>>>=7;e[r]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new p((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this._push(g,10,o.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var e=o.from(t);return this._push(g,e.length(),e)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var e=o.from(t).zzEncode();return this._push(g,e.length(),e)},l.prototype.bool=function(t){return this._push(d,1,t?1:0)},l.prototype.fixed32=function(t){return this._push(y,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var e=o.from(t);return this._push(y,4,e.lo)._push(y,4,e.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this._push(i.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this._push(i.float.writeDoubleLE,8,t)};var m=i.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var n=0;n>>0;if(!e)return this._push(d,1,0);if(i.isString(t)){var r=l.alloc(e=s.length(t));s.decode(t,r,0),t=r}return this.uint32(e)._push(m,e,t)},l.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(d,1,0)},l.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new u(h,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(h,0,0),this.len=0),this},l.prototype.ldelim=function(){var t=this.head,e=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=e,this.len+=r),this},l.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,e,r),r+=t.len,t=t.next;return e},l._configure=function(t){n=t,l.create=f(),n._configure()}},43155:function(t,e,r){"use strict";t.exports=o;var n=r(41173);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(99693);function o(){n.call(this)}function s(t,e,r){t.length<40?i.utf8.write(t,e,r):e.utf8Write?e.utf8Write(t,r):e.write(t,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){if(t.copy)t.copy(e,r,0,t.length);else for(var n=0;n>>0;return this.uint32(e),e&&this._push(o.writeBytesBuffer,e,t),this},o.prototype.string=function(t){var e=i.Buffer.byteLength(t);return this.uint32(e),e&&this._push(s,e,t),this},o._configure()},69921:function(t,e){"use strict";var r,n=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),h=Symbol.for("react.context"),c=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen");function m(t){if("object"===typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case o:case a:case s:case f:case d:return t;default:switch(t=t&&t.$$typeof){case c:case h:case l:case g:case p:case u:return t;default:return e}}case i:return e}}}r=Symbol.for("react.module.reference"),e.isValidElementType=function(t){return"string"===typeof t||"function"===typeof t||t===o||t===a||t===s||t===f||t===d||t===y||"object"===typeof t&&null!==t&&(t.$$typeof===g||t.$$typeof===p||t.$$typeof===u||t.$$typeof===h||t.$$typeof===l||t.$$typeof===r||void 0!==t.getModuleId)},e.typeOf=m},59864:function(t,e,r){"use strict";t.exports=r(69921)},75533:function(t,e,r){"use strict";r.d(e,{ZP:function(){return y}});var n=r(67294),i=function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=64;){let d,p,g,y,m,v=r,b=n,w=i,E=o,A=s,k=a,S=u,B=h;for(p=0;p<16;p++)g=l+4*p,c[p]=(255&t[g])<<24|(255&t[g+1])<<16|(255&t[g+2])<<8|255&t[g+3];for(p=16;p<64;p++)d=c[p-2],y=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,d=c[p-15],m=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,c[p]=(y+c[p-7]|0)+(m+c[p-16]|0)|0;for(p=0;p<64;p++)y=(((A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7))+(A&k^~A&S)|0)+(B+(e[p]+c[p]|0)|0)|0,m=((v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+(v&b^v&w^b&w)|0,B=S,S=k,k=A,A=E+y|0,E=w,w=b,b=v,v=y+m|0;r=r+v|0,n=n+b|0,i=i+w|0,o=o+E|0,s=s+A|0,a=a+k|0,u=u+S|0,h=h+B|0,l+=64,f-=64}}l(t);let f,d=t.length%64,p=t.length/536870912|0,g=t.length<<3,y=d<56?56:120,m=t.slice(t.length-d,t.length);for(m.push(128),f=d+1;f>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),m.push(g>>>24&255),m.push(g>>>16&255),m.push(g>>>8&255),m.push(g>>>0&255),l(m),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,h>>>24&255,h>>>16&255,h>>>8&255,h>>>0&255]}function i(t,e,r){t=t.length<=64?t:n(t);const i=64+e.length+4,o=new Array(i),s=new Array(64);let a,u=[];for(a=0;a<64;a++)o[a]=54;for(a=0;a=i-4;t--){if(o[t]++,o[t]<=255)return;o[t]=0}}for(;r>=32;)h(),u=u.concat(n(s.concat(n(o)))),r-=32;return r>0&&(h(),u=u.concat(n(s.concat(n(o))).slice(0,r))),u}function o(t,e,r,n,i){let o;for(h(t,16*(2*r-1),i,0,16),o=0;o<2*r;o++)u(t,16*o,i,16),a(i,n),h(i,0,t,e+16*o,16);for(o=0;o>>32-e}function a(t,e){h(t,0,e,0,16);for(let r=8;r>0;r-=2)e[4]^=s(e[0]+e[12],7),e[8]^=s(e[4]+e[0],9),e[12]^=s(e[8]+e[4],13),e[0]^=s(e[12]+e[8],18),e[9]^=s(e[5]+e[1],7),e[13]^=s(e[9]+e[5],9),e[1]^=s(e[13]+e[9],13),e[5]^=s(e[1]+e[13],18),e[14]^=s(e[10]+e[6],7),e[2]^=s(e[14]+e[10],9),e[6]^=s(e[2]+e[14],13),e[10]^=s(e[6]+e[2],18),e[3]^=s(e[15]+e[11],7),e[7]^=s(e[3]+e[15],9),e[11]^=s(e[7]+e[3],13),e[15]^=s(e[11]+e[7],18),e[1]^=s(e[0]+e[3],7),e[2]^=s(e[1]+e[0],9),e[3]^=s(e[2]+e[1],13),e[0]^=s(e[3]+e[2],18),e[6]^=s(e[5]+e[4],7),e[7]^=s(e[6]+e[5],9),e[4]^=s(e[7]+e[6],13),e[5]^=s(e[4]+e[7],18),e[11]^=s(e[10]+e[9],7),e[8]^=s(e[11]+e[10],9),e[9]^=s(e[8]+e[11],13),e[10]^=s(e[9]+e[8],18),e[12]^=s(e[15]+e[14],7),e[13]^=s(e[12]+e[15],9),e[14]^=s(e[13]+e[12],13),e[15]^=s(e[14]+e[13],18);for(let r=0;r<16;++r)t[r]+=e[r]}function u(t,e,r,n){for(let i=0;i=256)return!1}return!0}function l(t,e){if("number"!==typeof t||t%1)throw new Error("invalid "+e);return t}function f(t,e,n,s,a,f,d){if(n=l(n,"N"),s=l(s,"r"),a=l(a,"p"),f=l(f,"dkLen"),0===n||0!==(n&n-1))throw new Error("N must be power of 2");if(n>r/128/s)throw new Error("N too large");if(s>r/128/a)throw new Error("r too large");if(!c(t))throw new Error("password must be an array or buffer");if(t=Array.prototype.slice.call(t),!c(e))throw new Error("salt must be an array or buffer");e=Array.prototype.slice.call(e);let p=i(t,e,128*a*s);const g=new Uint32Array(32*a*s);for(let r=0;rI&&(e=I);for(let t=0;tI&&(e=I);for(let t=0;t>0&255),p.push(g[t]>>8&255),p.push(g[t]>>16&255),p.push(g[t]>>24&255);const r=i(t,p,f);return d&&d(null,1,r),r}d&&T(O)};if(!d)for(;;){const t=O();if(void 0!=t)return t}O()}const d={scrypt:function(t,e,r,n,i,o,s){return new Promise((function(a,u){let h=0;s&&s(0),f(t,e,r,n,i,o,(function(t,e,r){if(t)u(t);else if(r)s&&1!==h&&s(1),a(new Uint8Array(r));else if(s&&e!==h)return h=e,s(e)}))}))},syncScrypt:function(t,e,r,n,i,o){return new Uint8Array(f(t,e,r,n,i,o))}};t.exports=d}()},35682:function(t,e,r){"use strict";e.Aj=e.C4=void 0;var n,i=r(55926),o=(n=r(29274))&&n.__esModule?n:{default:n};var s=function(t){var e=t.allowedSizes,r=t.defaultSize,n=t.padding;return function t(){var s=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;if(!this||this.constructor!==t)return new t(a);if(e&&!e.includes(a))throw new Error("Unsupported hash length");var u=new o.default({capacity:a});return this.update=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";if(i.Buffer.isBuffer(t))return u.absorb(t),s;if("string"===typeof t)return s.update(i.Buffer.from(t,e));throw new TypeError("Not a string or buffer")},this.digest=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"binary",e="string"===typeof t?{format:t}:t,r=u.squeeze({buffer:e.buffer,padding:e.padding||n});return e.format&&"binary"!==e.format?r.toString(e.format):r},this.reset=function(){return u.reset(),s},this}},a=s({allowedSizes:[224,256,384,512],defaultSize:512,padding:1});e.C4=a;var u=s({allowedSizes:[224,256,384,512],defaultSize:512,padding:6});e.Aj=u,s({allowedSizes:[128,256],defaultSize:256,padding:31});var h=a;u.SHA3Hash=h},55926:function(t,e,r){"use strict";const n=r(79742),i=r(80645),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"===typeof t){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return h(t,e,r)}function h(t,e,r){if("string"===typeof t)return function(t,e){"string"===typeof e&&""!==e||(e="utf8");if(!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let n=a(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(J(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(J(t,ArrayBuffer)||t&&J(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!==typeof SharedArrayBuffer&&(J(t,SharedArrayBuffer)||t&&J(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const i=function(t){if(u.isBuffer(t)){const e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!==typeof t.length||Q(t.length)?a(0):f(t);if("Buffer"===t.type&&Array.isArray(t.data))return f(t.data)}(t);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!==typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return c(t),a(t<0?0:0|p(t))}function f(t){const e=t.length<0?0:0|p(t.length),r=a(e);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||J(t,ArrayBuffer))return t.byteLength;if("string"!==typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(t).length;default:if(i)return n?-1:G(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return M(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Q(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){let o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128===(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128===(192&r)&&128===(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128===(192&r)&&128===(192&n)&&128===(192&a)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(J(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),h=this.slice(n,i),c=t.slice(e,r);for(let u=0;u>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>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,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":case"latin1":case"binary":return A(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function M(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let o=e;or)throw new RangeError("Trying to access beyond buffer length")}function _(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function P(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function N(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function U(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,n,o){return e=+e,r>>>=0,o||U(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,o){return e=+e,r>>>=0,o||U(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=Y((function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=Y((function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||R(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){_(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,!n){_(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=Y((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Y((function(t,e=0){return N(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);_(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);_(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=Y((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Y((function(t,e=0){return N(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function z(t,e,r,n,i,o){if(t>r||t3?0===e||e===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}`:`>= ${e}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){H(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||q(e,t.length-(r+1))}(n,i,o)}function H(t,e){if("number"!==typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function q(t,e,r){if(Math.floor(t)!==t)throw H(t,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=K(String(r)):"bigint"===typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=K(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function G(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=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((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function Z(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Q(t){return t!==t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Y(t){return"undefined"===typeof BigInt?$:t}function $(){throw new Error("BigInt not supported")}},29274:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=r(55926),o=(n=r(99618))&&n.__esModule?n:{default:n};var s=function(t,e){for(var r=0;r>>8,e[r+2]=t[n+1]>>>16,e[r+3]=t[n+1]>>>24,e[r+4]=t[n],e[r+5]=t[n]>>>8,e[r+6]=t[n]>>>16,e[r+7]=t[n]>>>24}return e},u=function(t){var e=this,r=t.capacity,n=t.padding,u=(0,o.default)(),h=r/8,c=200-r/4,l=0,f=new Uint32Array(50),d=i.Buffer.allocUnsafe(c);return this.absorb=function(t){for(var r=0;r=c&&(s(d,f),u(f),l=0);return e},this.squeeze=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={buffer:t.buffer||i.Buffer.allocUnsafe(h),padding:t.padding||n,queue:i.Buffer.allocUnsafe(d.length),state:new Uint32Array(f.length)};d.copy(e.queue);for(var r=0;r>>c,s[(h+1)%2]=u<>>c,(0,o.default)(s,0)(e,f),(0,o.default)(r,0)(s,0)}};e.default=a},76325:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=[10,7,11,17,18,3,5,16,8,21,24,4,15,23,19,13,12,2,20,14,22,9,6,1];e.default=r},23010:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=[1,3,6,10,15,21,28,36,45,55,2,14,27,41,56,8,25,43,62,18,39,61,20,44];e.default=r},57959:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(76605))&&n.__esModule?n:{default:n};var o=function(t){for(var e=t.A,r=t.C,n=t.D,o=t.W,s=0,a=0,u=0;u<5;u++){var h=2*u,c=2*(u+5),l=2*(u+10),f=2*(u+15),d=2*(u+20);r[h]=e[h]^e[c]^e[l]^e[f]^e[d],r[h+1]=e[h+1]^e[c+1]^e[l+1]^e[f+1]^e[d+1]}for(var p=0;p<5;p++){(0,i.default)(r,(p+1)%5)(o,0),s=o[0],a=o[1],o[0]=s<<1|a>>>31,o[1]=a<<1|s>>>31,n[2*p]=r[(p+4)%5*2]^o[0],n[2*p+1]=r[(p+4)%5*2+1]^o[1];for(var g=0;g<25;g+=5)e[2*(g+p)]^=n[2*p],e[2*(g+p)+1]^=n[2*p+1]}};e.default=o},96774:function(t){t.exports=function(t,e,r,n){var i=r?r.call(n,t,e):void 0;if(void 0!==i)return!!i;if(t===e)return!0;if("object"!==typeof t||!t||"object"!==typeof e||!e)return!1;var o=Object.keys(t),s=Object.keys(e);if(o.length!==s.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(e),u=0;ud)&&(F=(z=z.replace(" ",":")).length),0<_&&void 0!==(w=a(1,z,n,t,M,C,H.length,h,f,h))&&0===(F=(z=w.trim()).length)&&(z="\0\0"),d=z.charCodeAt(0),p=z.charCodeAt(1),d){case 0:break;case 64:if(105===p||99===p){V+=z+u.charAt(U);break}default:58!==z.charCodeAt(F-1)&&(H+=i(z,d,p,z.charCodeAt(2)))}D=L=P=d=0,z="",p=u.charCodeAt(++U)}}switch(p){case 13:case 10:47===k?k=0:0===1+d&&107!==h&&0n&&(n=(e=e.trim()).charCodeAt(0)),n){case 38:return e.replace(y,"$1"+t.trim());case 58:return t.trim()+e.replace(y,"$1"+t.trim());default:if(0<1*r&&0u.charCodeAt(8))break;case 115:s=s.replace(u,"-webkit-"+u)+";"+s;break;case 207:case 102:s=s.replace(u,"-webkit-"+(102n.charCodeAt(0)&&(n=n.trim()),n=[n],0<_){var i=a(-1,r,n,n,M,C,0,0,0,0);void 0!==i&&"string"===typeof i&&(r=i)}var o=e(O,n,r,0,0);return 0<_&&(void 0!==(i=a(-2,o,n,n,M,C,o.length,0,0,0))&&(o=i)),"",I=0,C=M=1,o}var c=/^\0+/g,l=/[\0\r\f]/g,f=/: */g,d=/zoo|gra/,p=/([,: ])(transform)/g,g=/,\r+?/g,y=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,b=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,E=/\(\s*(.*)\s*\)/g,A=/([\s\S]*?);/g,k=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,B=/stretch|:\s*\w+\-(?:conte|avail)/,x=/([^-])(image-set\()/,C=1,M=1,I=0,T=1,O=[],R=[],_=0,P=null,N=0;return h.use=function t(e){switch(e){case void 0:case null:_=R.length=0;break;default:if("function"===typeof e)R[_++]=e;else if("object"===typeof e)for(var r=0,n=e.length;r1?e-1:0),n=1;n0?" Args: "+r.join(", "):""))}var C=function(){function t(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}var e=t.prototype;return e.indexOfGroup=function(t){for(var e=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;t>=i;)(i<<=1)<0&&x(16,""+t);this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=n;o=this.length||0===this.groupSizes[t])return e;for(var r=this.groupSizes[t],n=this.indexOfGroup(t),i=n+r,o=n;o=T&&(T=e+1),M.set(t,e),I.set(e,t)},P="style["+k+'][data-styled-version="5.3.11"]',N=new RegExp("^"+k+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),U=function(t,e,r){for(var n,i=r.split(","),o=0,s=i.length;o=0;r--){var n=e[r];if(n&&1===n.nodeType&&n.hasAttribute(k))return n}}(r),o=void 0!==i?i.nextSibling:null;n.setAttribute(k,"active"),n.setAttribute("data-styled-version","5.3.11");var s=D();return s&&n.setAttribute("nonce",s),r.insertBefore(n,o),n},j=function(){function t(t){var e=this.element=F(t);e.appendChild(document.createTextNode("")),this.sheet=function(t){if(t.sheet)return t.sheet;for(var e=document.styleSheets,r=0,n=e.length;r=0){var r=document.createTextNode(e),n=this.nodes[t];return this.element.insertBefore(r,n||null),this.length++,!0}return!1},e.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.getRule=function(t){return t0&&(h+=t+",")})),n+=""+a+u+'{content:"'+h+'"}/*!sc*/\n'}}}return n}(this)},t}(),G=/(a)(d)/gi,W=function(t){return String.fromCharCode(t+(t>25?39:97))};function Z(t){var e,r="";for(e=Math.abs(t);e>52;e=e/52|0)r=W(e%52)+r;return(W(e%52)+r).replace(G,"$1-$2")}var J=function(t,e){for(var r=e.length;r;)t=33*t^e.charCodeAt(--r);return t},Q=function(t){return J(5381,t)};function X(t){for(var e=0;e>>0);if(!e.hasNameForId(n,s)){var a=r(o,"."+s,void 0,n);e.insertRules(n,s,a)}i.push(s),this.staticRulesId=s}else{for(var u=this.rules.length,h=J(this.baseHash,r.hash),c="",l=0;l>>0);if(!e.hasNameForId(n,g)){var y=r(c,"."+g,void 0,n);e.insertRules(n,g,y)}i.push(g)}}return i.join(" ")},t}(),tt=/^\s*\/\/.*$/gm,et=[":","[",".","#"];function rt(t){var e,r,n,i,o=void 0===t?b:t,s=o.options,u=void 0===s?b:s,h=o.plugins,c=void 0===h?v:h,l=new a(u),f=[],d=function(t){function e(e){if(e)try{t(e+"}")}catch(t){}}return function(r,n,i,o,s,a,u,h,c,l){switch(r){case 1:if(0===c&&64===n.charCodeAt(0))return t(n+";"),"";break;case 2:if(0===h)return n+"/*|*/";break;case 3:switch(h){case 102:case 112:return t(i[0]+n),"";default:return n+(0===l?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(e)}}}((function(t){f.push(t)})),p=function(t,n,o){return 0===n&&-1!==et.indexOf(o[r.length])||o.match(i)?t:"."+e};function g(t,o,s,a){void 0===a&&(a="&");var u=t.replace(tt,""),h=o&&s?s+" "+o+" { "+u+" }":u;return e=a,r=o,n=new RegExp("\\"+r+"\\b","g"),i=new RegExp("(\\"+r+"\\b){2,}"),l(s||!o?"":o,h)}return l.use([].concat(c,[function(t,e,i){2===t&&i.length&&i[0].lastIndexOf(r)>0&&(i[0]=i[0].replace(n,p))},d,function(t){if(-2===t){var e=f;return f=[],e}}])),g.hash=c.length?c.reduce((function(t,e){return e.name||x(15),J(t,e.name)}),5381).toString():"",g}var nt=i.createContext(),it=(nt.Consumer,i.createContext()),ot=(it.Consumer,new V),st=rt();function at(){return(0,i.useContext)(nt)||ot}function ut(){return(0,i.useContext)(it)||st}function ht(t){var e=(0,i.useState)(t.stylisPlugins),r=e[0],n=e[1],o=at(),a=(0,i.useMemo)((function(){var e=o;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target]),u=(0,i.useMemo)((function(){return rt({options:{prefix:!t.disableVendorPrefixes},plugins:r})}),[t.disableVendorPrefixes,r]);return(0,i.useEffect)((function(){s()(r,t.stylisPlugins)||n(t.stylisPlugins)}),[t.stylisPlugins]),i.createElement(nt.Provider,{value:a},i.createElement(it.Provider,{value:u},t.children))}var ct=function(){function t(t,e){var r=this;this.inject=function(t,e){void 0===e&&(e=st);var n=r.name+e.hash;t.hasNameForId(r.id,n)||t.insertRules(r.id,n,e(r.rules,n,"@keyframes"))},this.toString=function(){return x(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=e}return t.prototype.getName=function(t){return void 0===t&&(t=st),this.name+t.hash},t}(),lt=/([A-Z])/,ft=/([A-Z])/g,dt=/^ms-/,pt=function(t){return"-"+t.toLowerCase()};function gt(t){return lt.test(t)?t.replace(ft,pt).replace(dt,"-ms-"):t}var yt=function(t){return null==t||!1===t||""===t};function mt(t,e,r,n){if(Array.isArray(t)){for(var i,o=[],s=0,a=t.length;s1?e-1:0),n=1;n?@[\\\]^`{|}~-]+/g,At=/(^-|-$)/g;function kt(t){return t.replace(Et,"-").replace(At,"")}var St=function(t){return Z(Q(t)>>>0)};function Bt(t){return"string"==typeof t&&!0}var xt=function(t){return"function"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)},Ct=function(t){return"__proto__"!==t&&"constructor"!==t&&"prototype"!==t};function Mt(t,e,r){var n=t[r];xt(e)&&xt(n)?It(n,e):t[r]=e}function It(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n=0||(i[r]=t[r]);return i}(e,["componentId"]),o=n&&n+"-"+(Bt(t)?t:kt(E(t)));return Rt(t,g({},i,{attrs:y,componentId:o}),r)},Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=n?It({},t.defaultProps,e):e}}),Object.defineProperty(k,"toString",{value:function(){return"."+k.styledComponentId}}),o&&d()(k,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),k}var _t=function(t){return function t(e,r,i){if(void 0===i&&(i=b),!(0,n.isValidElementType)(r))return x(1,String(r));var o=function(){return e(r,i,bt.apply(void 0,arguments))};return o.withConfig=function(n){return t(e,r,g({},i,{},n))},o.attrs=function(n){return t(e,r,g({},i,{attrs:Array.prototype.concat(i.attrs,n).filter(Boolean)}))},o}(Rt,t)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(t){_t[t]=_t(t)}));!function(){function t(t,e){this.rules=t,this.componentId=e,this.isStatic=X(t),V.registerId(this.componentId+1)}var e=t.prototype;e.createStyles=function(t,e,r,n){var i=n(mt(this.rules,e,r,n).join(""),""),o=this.componentId+t;r.insertRules(o,o,i)},e.removeStyles=function(t,e){e.clearRules(this.componentId+t)},e.renderStyles=function(t,e,r,n){t>2&&V.registerId(this.componentId+t),this.removeStyles(t,r),this.createStyles(t,e,r,n)}}();!function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString();if(!e)return"";var r=D();return""},this.getStyleTags=function(){return t.sealed?x(2):t._emitSheetCSS()},this.getStyleElement=function(){var e;if(t.sealed)return x(2);var r=((e={})[k]="",e["data-styled-version"]="5.3.11",e.dangerouslySetInnerHTML={__html:t.instance.toString()},e),n=D();return n&&(r.nonce=n),[i.createElement("style",g({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new V({isServer:!0}),this.sealed=!1}var e=t.prototype;e.collectStyles=function(t){return this.sealed?x(2):i.createElement(ht,{sheet:this.instance},t)},e.interleaveWithNodeStream=function(t){return x(3)}}();var Pt=_t},28230:function(t,e){"use strict";function r(t,e,r){void 0===r&&(r=!1),r&&(e/=t,t=1);var n,i=[],o=0,s=0,a=function(){var r=o+e,u=Date.now();if(ue&&(o=l,s=0),s++=i)return t;switch(t){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 t}})),a=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&e._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=c),f(n,t,n.depth)}function c(t,e){var r=h.styles[e];return r?"\x1b["+h.colors[r][0]+"m"+t+"\x1b["+h.colors[r][1]+"m":t}function l(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&B(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=f(t,i,n)),i}var o=function(t,e){if(w(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(v(e))return t.stylize(""+e,"number");if(y(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),S(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return d(r);if(0===s.length){if(B(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(E(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(S(r))return d(r)}var h,c="",l=!1,A=["{","}"];(g(r)&&(l=!0,A=["[","]"]),B(r))&&(c=" [Function"+(r.name?": "+r.name:"")+"]");return E(r)&&(c=" "+RegExp.prototype.toString.call(r)),k(r)&&(c=" "+Date.prototype.toUTCString.call(r)),S(r)&&(c=" "+d(r)),0!==s.length||l&&0!=r.length?n<0?E(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),h=l?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(h,c,A)):A[0]+c+A[1]}function d(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),T(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=m(r)?f(t,u.value,null):f(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function g(t){return Array.isArray(t)}function y(t){return"boolean"===typeof t}function m(t){return null===t}function v(t){return"number"===typeof t}function b(t){return"string"===typeof t}function w(t){return void 0===t}function E(t){return A(t)&&"[object RegExp]"===x(t)}function A(t){return"object"===typeof t&&null!==t}function k(t){return A(t)&&"[object Date]"===x(t)}function S(t){return A(t)&&("[object Error]"===x(t)||t instanceof Error)}function B(t){return"function"===typeof t}function x(t){return Object.prototype.toString.call(t)}function C(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!s[t])if(a.test(t)){var r=n.pid;s[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else s[t]=function(){};return s[t]},e.inspect=h,h.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},h.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(55955),e.isArray=g,e.isBoolean=y,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=v,e.isString=b,e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=w,e.isRegExp=E,e.types.isRegExp=E,e.isObject=A,e.isDate=k,e.types.isDate=k,e.isError=S,e.types.isNativeError=S,e.isFunction=B,e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=r(20384);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var t=new Date,e=[C(t.getHours()),C(t.getMinutes()),C(t.getSeconds())].join(":");return[t.getDate(),M[t.getMonth()],e].join(" ")}function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",I(),e.format.apply(e,arguments))},e.inherits=r(35717),e._extend=function(t,e){if(!e||!A(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var O="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');if(O&&t[O]){var e;if("function"!==typeof(e=t[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o=a||o>49)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<=128);return t.bytes=s-r,i}},1312:function(t){t.exports=function t(r,n,i){if(Number.MAX_SAFE_INTEGER&&r>Number.MAX_SAFE_INTEGER)throw t.bytes=0,new RangeError("Could not encode varint");n=n||[];var o=i=i||0;for(;r>=e;)n[i++]=255&r|128,r/=128;for(;-128&r;)n[i++]=255&r|128,r>>>=7;return n[i]=0|r,t.bytes=i-o+1,n};var e=Math.pow(2,31)},94676:function(t,e,r){t.exports={encode:r(1312),decode:r(26988),encodingLength:r(10082)}},10082:function(t){var e=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),u=Math.pow(2,56),h=Math.pow(2,63);t.exports=function(t){return t-1?e:"Object"===e&&function(t){var e=!1;return n(g,(function(r,n){if(!e)try{r(t),e=f(n,1)}catch(i){}})),e}(t)}return a?function(t){var e=!1;return n(g,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=f(n,1))}catch(i){}})),e}(t):null}},63083:function(t,e,r){"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"===typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e>24&255,e[r+i]=n>>16&255,e[r+o]=n>>8&255,e[r+s]=255&n}}function E(t,e,r,n,i,o){return function(t,e){A(t,e|=0);var r=s(t,e+i);return b(s(t,e+o),r)};function s(i,o){return 16777216*i[o+t]+(i[o+e]<<16|i[o+r]<<8|i[o+n])}}function A(t,e){if(null==(t=t&&t.length))throw new TypeError("Invalid Buffer");if(t(t+e/a)/e,f={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(t){const{n:e}=c,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-s*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,a=BigInt("0x100000000000000000000000000000000"),u=l(o*t,e),h=l(-n*t,e);let f=D(t-u*r-h*i,e),d=D(-u*n-h*o,e);const p=f>a,g=d>a;if(p&&(f=e-f),g&&(d=e-d),f>a||d>a)throw new Error("splitScalarEndo: Endomorphism failed, k="+t);return{k1neg:p,k1:f,k2neg:g,k2:d}}},d=32,p=32;function g(t){const{a:e,b:r}=c,n=D(t*t),i=D(n*t);return D(i+e*t+r)}const y=c.a===o;class m extends Error{constructor(t){super(t)}}function v(t){if(!(t instanceof b))throw new TypeError("JacobianPoint expected")}class b{constructor(t,e,r){this.x=t,this.y=e,this.z=r}static fromAffine(t){if(!(t instanceof A))throw new TypeError("JacobianPoint#fromAffine: expected Point");return t.equals(A.ZERO)?b.ZERO:new b(t.x,t.y,s)}static toAffineBatch(t){const e=function(t,e=c.P){const r=new Array(t.length),n=j(t.reduce(((t,n,i)=>n===o?t:(r[i]=t,D(t*n,e))),s),e);return t.reduceRight(((t,n,i)=>n===o?t:(r[i]=D(t*r[i],e),D(t*n,e))),n),r}(t.map((t=>t.z)));return t.map(((t,r)=>t.toAffine(e[r])))}static normalizeZ(t){return b.toAffineBatch(t).map(b.fromAffine)}equals(t){v(t);const{x:e,y:r,z:n}=this,{x:i,y:o,z:s}=t,a=D(n*n),u=D(s*s),h=D(e*u),c=D(i*a),l=D(D(r*s)*u),f=D(D(o*n)*a);return h===c&&l===f}negate(){return new b(this.x,D(-this.y),this.z)}double(){const{x:t,y:e,z:r}=this,n=D(t*t),i=D(e*e),o=D(i*i),s=t+i,c=D(a*(D(s*s)-n-o)),l=D(u*n),f=D(l*l),d=D(f-a*c),p=D(l*(c-d)-h*o),g=D(a*e*r);return new b(d,p,g)}add(t){v(t);const{x:e,y:r,z:n}=this,{x:i,y:s,z:u}=t;if(i===o||s===o)return this;if(e===o||r===o)return t;const h=D(n*n),c=D(u*u),l=D(e*c),f=D(i*h),d=D(D(r*u)*c),p=D(D(s*n)*h),g=D(f-l),y=D(p-d);if(g===o)return y===o?this.double():b.ZERO;const m=D(g*g),w=D(g*m),E=D(l*m),A=D(y*y-w-a*E),k=D(y*(E-A)-d*w),S=D(n*u*g);return new b(A,k,S)}subtract(t){return this.add(t.negate())}multiplyUnsafe(t){const e=b.ZERO;if("bigint"===typeof t&&t===o)return e;let r=L(t);if(r===s)return this;if(!y){let t=e,n=this;for(;r>o;)r&s&&(t=t.add(n)),n=n.double(),r>>=s;return t}let{k1neg:n,k1:i,k2neg:a,k2:u}=f.splitScalar(r),h=e,c=e,l=this;for(;i>o||u>o;)i&s&&(h=h.add(l)),u&s&&(c=c.add(l)),l=l.double(),i>>=s,u>>=s;return n&&(h=h.negate()),a&&(c=c.negate()),c=new b(D(c.x*f.beta),c.y,c.z),h.add(c)}precomputeWindow(t){const e=y?128/t+1:256/t+1,r=[];let n=this,i=n;for(let o=0;o>=l,r>u&&(r-=c,t+=s);const a=e,d=e+Math.abs(r)-1,p=f%2!==0,g=r<0;0===r?o=o.add(w(p,n[a])):i=i.add(w(g,n[d]))}return{p:i,f:o}}multiply(t,e){let r,n,i=L(t);if(y){const{k1neg:t,k1:o,k2neg:s,k2:a}=f.splitScalar(i);let{p:u,f:h}=this.wNAF(o,e),{p:c,f:l}=this.wNAF(a,e);u=w(t,u),c=w(s,c),c=new b(D(c.x*f.beta),c.y,c.z),r=u.add(c),n=h.add(l)}else{const{p:t,f:o}=this.wNAF(i,e);r=t,n=o}return b.normalizeZ([r,n])[0]}toAffine(t){const{x:e,y:r,z:n}=this,i=this.equals(b.ZERO);null==t&&(t=i?h:j(n));const o=t,a=D(o*o),u=D(a*o),c=D(e*a),l=D(r*u),f=D(n*o);if(i)return A.ZERO;if(f!==s)throw new Error("invZ was invalid");return new A(c,l)}}function w(t,e){const r=e.negate();return t?r:e}b.BASE=new b(c.Gx,c.Gy,s),b.ZERO=new b(o,s,o);const E=new WeakMap;class A{constructor(t,e){this.x=t,this.y=e}_setWindowSize(t){this._WINDOW_SIZE=t,E.delete(this)}hasEvenY(){return this.y%a===o}static fromCompressedHex(t){const e=32===t.length,r=N(e?t:t.subarray(1));if(!V(r))throw new Error("Point is not on curve");let n=function(t){const{P:e}=c,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),s=BigInt(44),h=BigInt(88),l=t*t*t%e,f=l*l*t%e,d=F(f,u)*f%e,p=F(d,u)*f%e,g=F(p,a)*l%e,y=F(g,n)*g%e,m=F(y,i)*y%e,v=F(m,s)*m%e,b=F(v,h)*v%e,w=F(b,s)*m%e,E=F(w,u)*f%e,A=F(E,o)*y%e,k=F(A,r)*l%e,S=F(k,a);if(S*S%e!==t)throw new Error("Cannot find square root");return S}(g(r));const i=(n&s)===s;if(e)i&&(n=D(-n));else{1===(1&t[0])!==i&&(n=D(-n))}const o=new A(r,n);return o.assertValidity(),o}static fromUncompressedHex(t){const e=N(t.subarray(1,33)),r=N(t.subarray(33,65)),n=new A(e,r);return n.assertValidity(),n}static fromHex(t){const e=U(t),r=e.length,n=e[0];if(r===d)return this.fromCompressedHex(e);if(33===r&&(2===n||3===n))return this.fromCompressedHex(e);if(65===r&&4===n)return this.fromUncompressedHex(e);throw new Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${r}`)}static fromPrivateKey(t){return A.BASE.multiply(G(t))}static fromSignature(t,e,r){const{r:n,s:i}=W(e);if(![0,1,2,3].includes(r))throw new Error("Cannot recover: invalid recovery bit");const o=K(U(t)),{n:s}=c,a=2===r||3===r?n+s:n,u=j(a,s),h=D(-o*u,s),l=D(i*u,s),f=1&r?"03":"02",d=A.fromHex(f+T(a)),p=A.BASE.multiplyAndAddUnsafe(d,h,l);if(!p)throw new Error("Cannot recover signature: point at infinify");return p.assertValidity(),p}toRawBytes(t=!1){return P(this.toHex(t))}toHex(t=!1){const e=T(this.x);if(t){return`${this.hasEvenY()?"02":"03"}${e}`}return`04${e}${T(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const t="Point is not on elliptic curve",{x:e,y:r}=this;if(!V(e)||!V(r))throw new Error(t);const n=D(r*r);if(D(n-g(e))!==o)throw new Error(t)}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new A(this.x,D(-this.y))}double(){return b.fromAffine(this).double().toAffine()}add(t){return b.fromAffine(this).add(b.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return b.fromAffine(this).multiply(t,this).toAffine()}multiplyAndAddUnsafe(t,e,r){const n=b.fromAffine(this),i=e===o||e===s||this!==A.BASE?n.multiplyUnsafe(e):n.multiply(e),a=b.fromAffine(t).multiplyUnsafe(r),u=i.add(a);return u.equals(b.ZERO)?void 0:u.toAffine()}}function k(t){return Number.parseInt(t[0],16)>=8?"00"+t:t}function S(t){if(t.length<2||2!==t[0])throw new Error(`Invalid signature integer tag: ${M(t)}`);const e=t[1],r=t.subarray(2,e+2);if(!e||r.length!==e)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:N(r),left:t.subarray(e+2)}}A.BASE=new A(c.Gx,c.Gy),A.ZERO=new A(o,o);class B{constructor(t,e){this.r=t,this.s=e,this.assertValidity()}static fromCompact(t){const e=t instanceof Uint8Array,r="Signature.fromCompact";if("string"!==typeof t&&!e)throw new TypeError(`${r}: Expected string or Uint8Array`);const n=e?M(t):t;if(128!==n.length)throw new Error(`${r}: Expected 64-byte hex`);return new B(_(n.slice(0,64)),_(n.slice(64,128)))}static fromDER(t){const e=t instanceof Uint8Array;if("string"!==typeof t&&!e)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:r,s:n}=function(t){if(t.length<2||48!=t[0])throw new Error(`Invalid signature tag: ${M(t)}`);if(t[1]!==t.length-2)throw new Error("Invalid signature: incorrect length");const{data:e,left:r}=S(t.subarray(2)),{data:n,left:i}=S(r);if(i.length)throw new Error(`Invalid signature: left bytes after parsing: ${M(i)}`);return{r:e,s:n}}(e?t:P(t));return new B(r,n)}static fromHex(t){return this.fromDER(t)}assertValidity(){const{r:t,s:e}=this;if(!q(t))throw new Error("Invalid Signature: r must be 0 < r < n");if(!q(e))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const t=c.n>>s;return this.s>t}normalizeS(){return this.hasHighS()?new B(this.r,D(-this.s,c.n)):this}toDERRawBytes(){return P(this.toDERHex())}toDERHex(){const t=k(R(this.s)),e=k(R(this.r)),r=t.length/2,n=e.length/2,i=R(r),o=R(n);return`30${R(n+r+4)}02${o}${e}02${i}${t}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return P(this.toCompactHex())}toCompactHex(){return T(this.r)+T(this.s)}}function x(...t){if(!t.every((t=>t instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);for(let n=0,i=0;ne.toString(16).padStart(2,"0")));function M(t){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");let e="";for(let r=0;r0)return BigInt(t);if("bigint"===typeof t&&q(t))return t;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function D(t,e=c.P){const r=t%e;return r>=o?r:e+r}function F(t,e){const{P:r}=c;let n=t;for(;e-- >o;)n*=n,n%=r;return n}function j(t,e=c.P){if(t===o||e<=o)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=D(t,e),n=e,i=o,a=s,u=s,h=o;for(;r!==o;){const t=n/r,e=n%r,o=i-u*t,s=a-h*t;n=r,r=e,i=u,a=h,u=o,h=s}if(n!==s)throw new Error("invert: does not exist");return D(i,e)}function K(t,e=!1){const r=function(t){const e=8*t.length-256,r=N(t);return e>0?r>>BigInt(e):r}(t);if(e)return r;const{n:n}=c;return r>=n?r-n:r}let z,H;function q(t){return o0)e=BigInt(t);else if("string"===typeof t){if(64!==t.length)throw new Error("Expected 32 bytes of private key");e=_(t)}else{if(!(t instanceof Uint8Array))throw new TypeError("Expected valid private key");if(t.length!==p)throw new Error("Expected 32 bytes of private key");e=N(t)}if(!q(e))throw new Error("Expected private key: 0 < key < n");return e}function W(t){if(t instanceof B)return t.assertValidity(),t;try{return B.fromDER(t)}catch(e){return B.fromCompact(t)}}function Z(t,e=!1){return A.fromPrivateKey(t).toRawBytes(e)}A.BASE._setWindowSize(8);const J={node:n||(n=r.t(i,2)),web:"object"===typeof self&&"crypto"in self?self.crypto:void 0},Q={},X={bytesToHex:M,hexToBytes:P,concatBytes:x,mod:D,invert:j,isValidPrivateKey(t){try{return G(t),!0}catch(e){return!1}},_bigintTo32Bytes:O,_normalizePrivateKey:G,hashToPrivateKey:t=>{if((t=U(t)).length<40||t.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");return O(D(N(t),c.n-s)+s)},randomBytes:(t=32)=>{if(J.web)return J.web.getRandomValues(new Uint8Array(t));if(J.node){const{randomBytes:e}=J.node;return Uint8Array.from(e(t))}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>X.hashToPrivateKey(X.randomBytes(40)),precompute(t=8,e=A.BASE){const r=e===A.BASE?e:new A(e.x,e.y);return r._setWindowSize(t),r.multiply(u),r},sha256:async(...t)=>{if(J.web){const e=await J.web.subtle.digest("SHA-256",x(...t));return new Uint8Array(e)}if(J.node){const{createHash:e}=J.node,r=e("sha256");return t.forEach((t=>r.update(t))),Uint8Array.from(r.digest())}throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(t,...e)=>{if(J.web){const r=await J.web.subtle.importKey("raw",t,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=x(...e),i=await J.web.subtle.sign("HMAC",r,n);return new Uint8Array(i)}if(J.node){const{createHmac:r}=J.node,n=r("sha256",t);return e.forEach((t=>n.update(t))),Uint8Array.from(n.digest())}throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(t,...e)=>{let r=Q[t];if(void 0===r){const e=await X.sha256(Uint8Array.from(t,(t=>t.charCodeAt(0))));r=x(e,e),Q[t]=r}return X.sha256(r,...e)},taggedHashSync:(t,...e)=>{if("function"!==typeof z)throw new m("sha256Sync is undefined, you need to set it");let r=Q[t];if(void 0===r){const e=z(Uint8Array.from(t,(t=>t.charCodeAt(0))));r=x(e,e),Q[t]=r}return z(r,...e)},_JacobianPoint:b};Object.defineProperties(X,{sha256Sync:{configurable:!1,get:()=>z,set(t){z||(z=t)}},hmacSha256Sync:{configurable:!1,get:()=>H,set(t){H||(H=t)}}})},35689:function(t,e,r){"use strict";var n;r.d(e,{$3:function(){return J},P6:function(){return X}});var i=r(33397);const o=BigInt(0),s=BigInt(1),a=BigInt(2),u=BigInt(8),h=BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),c=Object.freeze({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),l:h,n:h,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")}),l=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),f=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),d=(BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742"),BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235")),p=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),g=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),y=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952");class m{constructor(t,e,r,n){this.x=t,this.y=e,this.z=r,this.t=n}static fromAffine(t){if(!(t instanceof S))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return t.equals(S.ZERO)?m.ZERO:new m(t.x,t.y,s,N(t.x*t.y))}static toAffineBatch(t){const e=function(t,e=c.P){const r=new Array(t.length),n=U(t.reduce(((t,n,i)=>n===o?t:(r[i]=t,N(t*n,e))),s),e);return t.reduceRight(((t,n,i)=>n===o?t:(r[i]=N(t*r[i],e),N(t*n,e))),n),r}(t.map((t=>t.z)));return t.map(((t,r)=>t.toAffine(e[r])))}static normalizeZ(t){return this.toAffineBatch(t).map(this.fromAffine)}equals(t){b(t);const{x:e,y:r,z:n}=this,{x:i,y:o,z:s}=t,a=N(e*s),u=N(i*n),h=N(r*s),c=N(o*n);return a===u&&h===c}negate(){return new m(N(-this.x),this.y,this.z,N(-this.t))}double(){const{x:t,y:e,z:r}=this,{a:n}=c,i=N(t*t),o=N(e*e),s=N(a*N(r*r)),u=N(n*i),h=t+e,l=N(N(h*h)-i-o),f=u+o,d=f-s,p=u-o,g=N(l*d),y=N(f*p),v=N(l*p),b=N(d*f);return new m(g,y,b,v)}add(t){b(t);const{x:e,y:r,z:n,t:i}=this,{x:s,y:u,z:h,t:c}=t,l=N((r-e)*(u+s)),f=N((r+e)*(u-s)),d=N(f-l);if(d===o)return this.double();const p=N(n*a*c),g=N(i*a*h),y=g+p,v=f+l,w=g-p,E=N(y*d),A=N(v*w),k=N(y*w),S=N(d*v);return new m(E,A,S,k)}subtract(t){return this.add(t.negate())}precomputeWindow(t){const e=1+256/t,r=[];let n=this,i=n;for(let o=0;o>=l,r>u&&(r-=c,t+=s);const a=e,d=e+Math.abs(r)-1,p=f%2!==0,g=r<0;0===r?o=o.add(v(p,n[a])):i=i.add(v(g,n[d]))}return m.normalizeZ([i,o])[0]}multiply(t,e){return this.wNAF(H(t,c.l),e)}multiplyUnsafe(t){let e=H(t,c.l,!1);const r=m.BASE,n=m.ZERO;if(e===o)return n;if(this.equals(n)||e===s)return this;if(this.equals(r))return this.wNAF(e);let i=n,a=this;for(;e>o;)e&s&&(i=i.add(a)),a=a.double(),e>>=s;return i}isSmallOrder(){return this.multiplyUnsafe(c.h).equals(m.ZERO)}isTorsionFree(){let t=this.multiplyUnsafe(c.l/a).double();return c.l%a&&(t=t.add(this)),t.equals(m.ZERO)}toAffine(t){const{x:e,y:r,z:n}=this,i=this.equals(m.ZERO);null==t&&(t=i?u:U(n));const o=N(e*t),a=N(r*t),h=N(n*t);if(i)return S.ZERO;if(h!==s)throw new Error("invZ was invalid");return new S(o,a)}fromRistrettoBytes(){E()}toRistrettoBytes(){E()}fromRistrettoHash(){E()}}function v(t,e){const r=e.negate();return t?r:e}function b(t){if(!(t instanceof m))throw new TypeError("ExtendedPoint expected")}function w(t){if(!(t instanceof A))throw new TypeError("RistrettoPoint expected")}function E(){throw new Error("Legacy method: switch to RistrettoPoint")}m.BASE=new m(c.Gx,c.Gy,s,N(c.Gx*c.Gy)),m.ZERO=new m(o,s,s,o);class A{constructor(t){this.ep=t}static calcElligatorRistrettoMap(t){const{d:e}=c,r=N(f*t*t),n=N((r+s)*g);let i=BigInt(-1);const o=N((i-e*r)*N(r+e));let{isValid:a,value:u}=F(n,o),h=N(u*t);O(h)||(h=N(-h)),a||(u=h),a||(i=r);const l=N(i*(r-s)*y-o),p=u*u,v=N((u+u)*o),b=N(l*d),w=N(s-p),E=N(s+p);return new m(N(v*E),N(w*b),N(b*E),N(v*w))}static hashToCurve(t){const e=P((t=z(t,64)).slice(0,32)),r=this.calcElligatorRistrettoMap(e),n=P(t.slice(32,64)),i=this.calcElligatorRistrettoMap(n);return new A(r.add(i))}static fromHex(t){t=z(t,32);const{a:e,d:r}=c,n="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",i=P(t);if(!function(t,e){if(t.length!==e.length)return!1;for(let r=0;r=n)throw new Error("Expected 0 < hex < P");if(!e&&o>=l)throw new Error("Expected 0 < hex < 2**256");const a=N(o*o),u=N(a-s),h=N(r*a+s);let{isValid:f,value:d}=F(u,h);if(!f)throw new Error("Point.fromHex: invalid y coordinate");const p=(d&s)===s;return 0!==(128&t[31])!==p&&(d=N(-d)),new S(d,o)}static async fromPrivateKey(t){return(await Z(t)).point}toRawBytes(){const t=T(this.y);return t[31]|=this.x&s?128:0,t}toHex(){return C(this.toRawBytes())}toX25519(){const{y:t}=this;return T(N((s+t)*U(s-t)))}isTorsionFree(){return m.fromAffine(this).isTorsionFree()}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new S(N(-this.x),this.y)}add(t){return m.fromAffine(this).add(m.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return m.fromAffine(this).multiply(t,this).toAffine()}}S.BASE=new S(c.Gx,c.Gy),S.ZERO=new S(o,s);function B(...t){if(!t.every((t=>t instanceof Uint8Array)))throw new Error("Expected Uint8Array list");if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);for(let n=0,i=0;ne.toString(16).padStart(2,"0")));function C(t){if(!(t instanceof Uint8Array))throw new Error("Uint8Array expected");let e="";for(let r=0;r=o?r:e+r}function U(t,e=c.P){if(t===o||e<=o)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=N(t,e),n=e,i=o,a=s,u=s,h=o;for(;r!==o;){const t=n/r,e=n%r,o=i-u*t,s=a-h*t;n=r,r=e,i=u,a=h,u=o,h=s}if(n!==s)throw new Error("invert: does not exist");return N(i,e)}function L(t,e){const{P:r}=c;let n=t;for(;e-- >o;)n*=n,n%=r;return n}function D(t){const{P:e}=c,r=BigInt(5),n=BigInt(10),i=BigInt(20),o=BigInt(40),u=BigInt(80),h=t*t%e*t%e,l=L(h,a)*h%e,f=L(l,s)*t%e,d=L(f,r)*f%e,p=L(d,n)*d%e,g=L(p,i)*p%e,y=L(g,o)*g%e,m=L(y,u)*y%e,v=L(m,u)*y%e,b=L(v,n)*d%e;return{pow_p_5_8:L(b,a)*t%e,b2:h}}function F(t,e){const r=N(e*e*e),n=N(r*r*e);let i=N(t*r*D(t*n).pow_p_5_8);const o=N(e*i*i),s=i,a=N(i*f),u=o===t,h=o===N(-t),c=o===N(-t*f);return u&&(i=s),(h||c)&&(i=a),O(i)&&(i=N(-i)),{isValid:u||h,value:i}}function j(t){return F(s,t)}function K(t){return N(R(t),c.l)}function z(t,e){const r=t instanceof Uint8Array?Uint8Array.from(t):M(t);if("number"===typeof e&&r.length!==e)throw new Error(`Expected ${e} bytes`);return r}function H(t,e,r=!0){if(!e)throw new TypeError("Specify max value");if("number"===typeof t&&Number.isSafeInteger(t)&&(t=BigInt(t)),"bigint"===typeof t&&t{if((t=z(t)).length<40||t.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return N(R(t),c.l-s)+s},randomBytes:(t=32)=>{if(Q.web)return Q.web.getRandomValues(new Uint8Array(t));if(Q.node){const{randomBytes:e}=Q.node;return new Uint8Array(e(t).buffer)}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>X.randomBytes(32),sha512:async(...t)=>{const e=B(...t);if(Q.web){const t=await Q.web.subtle.digest("SHA-512",e.buffer);return new Uint8Array(t)}if(Q.node)return Uint8Array.from(Q.node.createHash("sha512").update(e).digest());throw new Error("The environment doesn't have sha512 function")},precompute(t=8,e=S.BASE){const r=e.equals(S.BASE)?e:new S(e.x,e.y);return r._setWindowSize(t),r.multiply(a),r},sha512Sync:void 0};Object.defineProperties(X,{sha512Sync:{configurable:!1,get:()=>W,set(t){W||(W=t)}}})},97540:function(t,e,r){"use strict";r.d(e,{kU:function(){return l},ET:function(){return f}});var n=function(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,s=new Uint8Array(o);t[e];){var c=r[t.charCodeAt(e)];if(255===c)return;for(var l=0,f=o-1;(0!==c||l>>0,s[f]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");i=l,e++}if(" "!==t[e]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(n+(o-d)),g=n;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var s=(o-i)*c+1>>>0,h=new Uint8Array(s);i!==o;){for(var l=e[i],f=0,d=s-1;(0!==l||f>>0,h[d]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");n=f,i++}for(var p=s-n;p!==s&&0===h[p];)p++;for(var g=u.repeat(r);pnew a({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class h{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new o(t,e,r),this.decoder=new s(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const c=({name:t,prefix:e,encode:r,decode:n})=>new h(t,e,r,n),l=({prefix:t,name:e,alphabet:r})=>{const{encode:o,decode:s}=n(r,e);return c({prefix:t,name:e,encode:o,decode:t=>(0,i.oQ)(s(t))})},f=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>c({prefix:e,name:t,encode:t=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<((t,e,r,n)=>{const i={};for(let c=0;c=8&&(a-=8,s[h++]=255&u>>a)}if(a>=r||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,n,r,t)})},45522:function(t,e,r){"use strict";r.r(e),r.d(e,{base58btc:function(){return i},base58flickr:function(){return o}});var n=r(97540);const i=(0,n.kU)({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),o=(0,n.kU)({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})},23456:function(t,e,r){"use strict";r.r(e),r.d(e,{base64:function(){return i},base64pad:function(){return o},base64url:function(){return s},base64urlpad:function(){return a}});var n=r(97540);const i=(0,n.ET)({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),o=(0,n.ET)({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),s=(0,n.ET)({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),a=(0,n.ET)({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})},37594:function(t,e,r){"use strict";r.d(e,{oQ:function(){return n}});new Uint8Array(0);const n=t=>{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")}},80449:function(t,e,r){"use strict";r.d(e,{Ue:function(){return v}});r(37594);var n=function t(e,r,n){r=r||[];var o=n=n||0;for(;e>=i;)r[n++]=255&e|128,e/=128;for(;-128&e;)r[n++]=255&e|128,e>>>=7;return r[n]=0|e,t.bytes=n-o+1,r},i=Math.pow(2,31);var o=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<=128);return t.bytes=s-r,i};var s=Math.pow(2,7),a=Math.pow(2,14),u=Math.pow(2,21),h=Math.pow(2,28),c=Math.pow(2,35),l=Math.pow(2,42),f=Math.pow(2,49),d=Math.pow(2,56),p=Math.pow(2,63),g={encode:n,decode:o,encodingLength:function(t){return t(g.encode(t,e,r),e),m=t=>g.encodingLength(t),v=(t,e)=>{const r=e.byteLength,n=m(t),i=n+m(r),o=new Uint8Array(i+r);return y(t,o,0),y(r,o,n),o.set(e,i),new b(t,r,e,o)};class b{constructor(t,e,r,n){this.code=t,this.size=e,this.digest=r,this.bytes=n}}},27871:function(t,e,r){"use strict";r.r(e),r.d(e,{identity:function(){return s}});var n=r(37594),i=r(80449);const o=n.oQ,s={code:0,name:"identity",encode:o,digest:t=>i.Ue(0,o(t))}},41256:function(t,e,r){"use strict";r.r(e),r.d(e,{sha256:function(){return a},sha512:function(){return u}});var n=r(80449);const i=({name:t,code:e,encode:r})=>new o(t,e,r);class o{constructor(t,e,r){this.name=t,this.code=e,this.encode=r}digest(t){if(t instanceof Uint8Array){const e=this.encode(t);return e instanceof Uint8Array?n.Ue(this.code,e):e.then((t=>n.Ue(this.code,t)))}throw Error("Unknown type, must be binary type")}}const s=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),a=i({name:"sha2-256",code:18,encode:s("SHA-256")}),u=i({name:"sha2-512",code:19,encode:s("SHA-512")})},52587:function(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,s=new Uint8Array(o);t[e];){var c=r[t.charCodeAt(e)];if(255===c)return;for(var l=0,f=o-1;(0!==c||l>>0,s[f]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");i=l,e++}if(" "!==t[e]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(n+(o-d)),g=n;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var s=(o-i)*c+1>>>0,h=new Uint8Array(s);i!==o;){for(var l=e[i],f=0,d=s-1;(0!==l||f>>0,h[d]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");n=f,i++}for(var p=s-n;p!==s&&0===h[p];)p++;for(var g=u.repeat(r);pnew a({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class h{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new o(t,e,r),this.decoder=new s(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const c=({name:t,prefix:e,encode:r,decode:n})=>new h(t,e,r,n),l=({prefix:t,name:e,alphabet:r})=>{const{encode:o,decode:s}=n(r,e);return c({prefix:t,name:e,encode:o,decode:t=>(0,i.oQ)(s(t))})},f=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>c({prefix:e,name:t,encode:t=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<((t,e,r,n)=>{const i={};for(let c=0;c=8&&(a-=8,s[h++]=255&u>>a)}if(a>=r||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,n,r,t)})},12084:function(t,e,r){"use strict";r.r(e),r.d(e,{base16:function(){return i},base16upper:function(){return o}});var n=r(86677);const i=(0,n.ET)({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),o=(0,n.ET)({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})},72208:function(t,e,r){"use strict";r.r(e),r.d(e,{base32:function(){return i},base32hex:function(){return u},base32hexpad:function(){return c},base32hexpadupper:function(){return l},base32hexupper:function(){return h},base32pad:function(){return s},base32padupper:function(){return a},base32upper:function(){return o},base32z:function(){return f}});var n=r(86677);const i=(0,n.ET)({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),o=(0,n.ET)({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),s=(0,n.ET)({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),a=(0,n.ET)({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),u=(0,n.ET)({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),h=(0,n.ET)({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),c=(0,n.ET)({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),l=(0,n.ET)({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),f=(0,n.ET)({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})},51044:function(t,e,r){"use strict";r.r(e),r.d(e,{base36:function(){return i},base36upper:function(){return o}});var n=r(86677);const i=(0,n.kU)({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),o=(0,n.kU)({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})},86862:function(t,e,r){"use strict";r.r(e),r.d(e,{base58btc:function(){return i},base58flickr:function(){return o}});var n=r(86677);const i=(0,n.kU)({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),o=(0,n.kU)({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})},81412:function(t,e,r){"use strict";r.r(e),r.d(e,{base64:function(){return i},base64pad:function(){return o},base64url:function(){return s},base64urlpad:function(){return a}});var n=r(86677);const i=(0,n.ET)({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),o=(0,n.ET)({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),s=(0,n.ET)({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),a=(0,n.ET)({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})},33966:function(t,e,r){"use strict";r.d(e,{fS:function(){return n},oQ:function(){return i}});new Uint8Array(0);const n=(t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")}},59353:function(t,e,r){"use strict";r.r(e),r.d(e,{CID:function(){return u}});var n=r(64335),i=r(82006),o=r(86862),s=r(72208),a=r(33966);class u{constructor(t,e,r,n){this.code=e,this.version=t,this.multihash=r,this.bytes=n,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:m,byteLength:m,code:y,version:y,multihash:y,bytes:y,_baseCache:m,asCID:m})}toV0(){if(0===this.version)return this;{const{code:t,multihash:e}=this;if(t!==f)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==d)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return u.createV0(e)}}toV1(){switch(this.version){case 0:{const{code:t,digest:e}=this.multihash,r=i.create(t,e);return u.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(t){return t&&this.code===t.code&&this.version===t.version&&i.equals(this.multihash,t.multihash)}toString(t){const{bytes:e,version:r,_baseCache:n}=this;return 0===r?c(e,n,t||o.base58btc.encoder):l(e,n,t||s.base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(t){return v(/^0\.0/,b),!(!t||!t[g]&&t.asCID!==t)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(t){if(t instanceof u)return t;if(null!=t&&t.asCID===t){const{version:e,code:r,multihash:n,bytes:i}=t;return new u(e,r,n,i||p(e,r,n.bytes))}if(null!=t&&!0===t[g]){const{version:e,multihash:r,code:n}=t,o=i.decode(r);return u.create(e,n,o)}return null}static create(t,e,r){if("number"!==typeof e)throw new Error("String codecs are no longer supported");switch(t){case 0:if(e!==f)throw new Error(`Version 0 CID must use dag-pb (code: ${f}) block encoding`);return new u(t,e,r,r.bytes);case 1:{const n=p(t,e,r.bytes);return new u(t,e,r,n)}default:throw new Error("Invalid version")}}static createV0(t){return u.create(0,f,t)}static createV1(t,e){return u.create(1,t,e)}static decode(t){const[e,r]=u.decodeFirst(t);if(r.length)throw new Error("Incorrect length");return e}static decodeFirst(t){const e=u.inspectBytes(t),r=e.size-e.multihashSize,n=(0,a.oQ)(t.subarray(r,r+e.multihashSize));if(n.byteLength!==e.multihashSize)throw new Error("Incorrect length");const o=n.subarray(e.multihashSize-e.digestSize),s=new i.Digest(e.multihashCode,e.digestSize,o,n);return[0===e.version?u.createV0(s):u.createV1(e.codec,s),t.subarray(e.size)]}static inspectBytes(t){let e=0;const r=()=>{const[r,i]=n.Jx(t.subarray(e));return e+=i,r};let i=r(),o=f;if(18===i?(i=0,e=0):1===i&&(o=r()),0!==i&&1!==i)throw new RangeError(`Invalid CID version ${i}`);const s=e,a=r(),u=r(),h=e+u;return{version:i,codec:o,multihashCode:a,digestSize:u,multihashSize:h-s,size:h}}static parse(t,e){const[r,n]=h(t,e),i=u.decode(n);return i._baseCache.set(r,t),i}}const h=(t,e)=>{switch(t[0]){case"Q":{const r=e||o.base58btc;return[o.base58btc.prefix,r.decode(`${o.base58btc.prefix}${t}`)]}case o.base58btc.prefix:{const r=e||o.base58btc;return[o.base58btc.prefix,r.decode(t)]}case s.base32.prefix:{const r=e||s.base32;return[s.base32.prefix,r.decode(t)]}default:if(null==e)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}},c=(t,e,r)=>{const{prefix:n}=r;if(n!==o.base58btc.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const i=e.get(n);if(null==i){const i=r.encode(t).slice(1);return e.set(n,i),i}return i},l=(t,e,r)=>{const{prefix:n}=r,i=e.get(n);if(null==i){const i=r.encode(t);return e.set(n,i),i}return i},f=112,d=18,p=(t,e,r)=>{const i=n.P$(t),o=i+n.P$(e),s=new Uint8Array(o+r.byteLength);return n.mL(t,s,0),n.mL(e,s,i),s.set(r,o),s},g=Symbol.for("@ipld/js-cid/CID"),y={writable:!1,configurable:!1,enumerable:!0},m={writable:!1,enumerable:!1,configurable:!1},v=(t,e)=>{if(!t.test("0.0.0-dev"))throw new Error(e);console.warn(e)},b="CID.isCID(v) is deprecated and will be removed in the next major release.\nFollowing code pattern:\n\nif (CID.isCID(value)) {\n doSomethingWithCID(value)\n}\n\nIs replaced with:\n\nconst cid = CID.asCID(value)\nif (cid) {\n // Make sure to use cid instead of value\n doSomethingWithCID(cid)\n}\n"},82006:function(t,e,r){"use strict";r.r(e),r.d(e,{Digest:function(){return u},create:function(){return o},decode:function(){return s},equals:function(){return a}});var n=r(33966),i=r(64335);const o=(t,e)=>{const r=e.byteLength,n=i.P$(t),o=n+i.P$(r),s=new Uint8Array(o+r);return i.mL(t,s,0),i.mL(r,s,n),s.set(e,o),new u(t,r,e,s)},s=t=>{const e=(0,n.oQ)(t),[r,o]=i.Jx(e),[s,a]=i.Jx(e.subarray(o)),h=e.subarray(o+a);if(h.byteLength!==s)throw new Error("Incorrect length");return new u(r,s,h,e)},a=(t,e)=>t===e||t.code===e.code&&t.size===e.size&&(0,n.fS)(t.bytes,e.bytes);class u{constructor(t,e,r,n){this.code=t,this.size=e,this.digest=r,this.bytes=n}}},92792:function(t,e,r){"use strict";r.r(e),r.d(e,{identity:function(){return s}});var n=r(33966),i=r(82006);const o=n.oQ,s={code:0,name:"identity",encode:o,digest:t=>i.create(0,o(t))}},64335:function(t,e,r){"use strict";r.d(e,{Jx:function(){return y},mL:function(){return m},P$:function(){return v}});var n=function t(e,r,n){r=r||[];var o=n=n||0;for(;e>=i;)r[n++]=255&e|128,e/=128;for(;-128&e;)r[n++]=255&e|128,e>>>=7;return r[n]=0|e,t.bytes=n-o+1,r},i=Math.pow(2,31);var o=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<=128);return t.bytes=s-r,i};var s=Math.pow(2,7),a=Math.pow(2,14),u=Math.pow(2,21),h=Math.pow(2,28),c=Math.pow(2,35),l=Math.pow(2,42),f=Math.pow(2,49),d=Math.pow(2,56),p=Math.pow(2,63),g={encode:n,decode:o,encodingLength:function(t){return t[g.decode(t,e),g.decode.bytes],m=(t,e,r=0)=>(g.encode(t,e,r),e),v=t=>g.encodingLength(t)},19588:function(t,e,r){"use strict";function n(t,e){if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")};var a=function t(e,r,n){r=r||[];var i=n=n||0;for(;e>=u;)r[n++]=255&e|128,e/=128;for(;-128&e;)r[n++]=255&e|128,e>>>=7;return r[n]=0|e,t.bytes=n-i+1,r},u=Math.pow(2,31);var h=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<=128);return t.bytes=s-r,i};var c=Math.pow(2,7),l=Math.pow(2,14),f=Math.pow(2,21),d=Math.pow(2,28),p=Math.pow(2,35),g=Math.pow(2,42),y=Math.pow(2,49),m=Math.pow(2,56),v=Math.pow(2,63),b={encode:a,decode:h,encodingLength:function(t){return t[b.decode(t,e),b.decode.bytes],E=(t,e,r=0)=>(b.encode(t,e,r),e),A=t=>b.encodingLength(t),k=(t,e)=>{const r=e.byteLength,n=A(t),i=n+A(r),o=new Uint8Array(i+r);return E(t,o,0),E(r,o,n),o.set(e,i),new B(t,r,e,o)},S=t=>{const e=s(t),[r,n]=w(e),[i,o]=w(e.subarray(n)),a=e.subarray(n+o);if(a.byteLength!==i)throw new Error("Incorrect length");return new B(r,i,a,e)};class B{constructor(t,e,r,n){this.code=t,this.size=e,this.digest=r,this.bytes=n}}const x=0;var C=function(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,s=new Uint8Array(o);t[e];){var c=r[t.charCodeAt(e)];if(255===c)return;for(var l=0,f=o-1;(0!==c||l>>0,s[f]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");i=l,e++}if(" "!==t[e]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(n+(o-d)),g=n;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var s=(o-i)*c+1>>>0,h=new Uint8Array(s);i!==o;){for(var l=e[i],f=0,d=s-1;(0!==l||f>>0,h[d]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");n=f,i++}for(var p=s-n;p!==s&&0===h[p];)p++;for(var g=u.repeat(r);pnew O({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class _{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new I(t,e,r),this.decoder=new T(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const P=({name:t,prefix:e,encode:r,decode:n})=>new _(t,e,r,n),N=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=M(r,e);return P({prefix:t,name:e,encode:n,decode:t=>s(i(t))})},U=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>P({prefix:e,name:t,encode:t=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<((t,e,r,n)=>{const i={};for(let c=0;c=8&&(a-=8,s[h++]=255&u>>a)}if(a>=r||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,n,r,t)}),L=N({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),D=(N({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),N({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"})),F=(N({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),U({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5})),j=(U({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),U({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),U({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),U({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),U({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),U({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),U({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),U({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),(t,e)=>{const{bytes:r,version:n}=t;return 0===n?V(r,z(t),e||D.encoder):G(r,z(t),e||F.encoder)}),K=new WeakMap,z=t=>{const e=K.get(t);if(null==e){const e=new Map;return K.set(t,e),e}return e};class H{constructor(t,e,r,n){this.code=e,this.version=t,this.multihash=r,this.bytes=n,this["/"]=n}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:t,multihash:e}=this;if(t!==W)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==Z)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return H.createV0(e)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:t,digest:e}=this.multihash,r=k(t,e);return H.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(t){return H.equals(this,t)}static equals(t,e){const r=e;return r&&t.code===r.code&&t.version===r.version&&((t,e)=>{if(t===e)return!0;{const r=e;return t.code===r.code&&t.size===r.size&&r.bytes instanceof Uint8Array&&((t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r{const[r,n]=w(t.subarray(e));return e+=n,r};let n=r(),i=W;if(18===n?(n=0,e=0):i=r(),0!==n&&1!==n)throw new RangeError(`Invalid CID version ${n}`);const o=e,s=r(),a=r(),u=e+a;return{version:n,codec:i,multihashCode:s,digestSize:a,multihashSize:u-o,size:u}}static parse(t,e){const[r,n]=q(t,e),i=H.decode(n);if(0===i.version&&"Q"!==t[0])throw Error("Version 0 CID string must not include multibase prefix");return z(i).set(r,t),i}}const q=(t,e)=>{switch(t[0]){case"Q":{const r=e||D;return[D.prefix,r.decode(`${D.prefix}${t}`)]}case D.prefix:{const r=e||D;return[D.prefix,r.decode(t)]}case F.prefix:{const r=e||F;return[F.prefix,r.decode(t)]}default:if(null==e)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}},V=(t,e,r)=>{const{prefix:n}=r;if(n!==D.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const i=e.get(n);if(null==i){const i=r.encode(t).slice(1);return e.set(n,i),i}return i},G=(t,e,r)=>{const{prefix:n}=r,i=e.get(n);if(null==i){const i=r.encode(t);return e.set(n,i),i}return i},W=112,Z=18,J=(t,e,r)=>{const n=A(t),i=n+A(e),o=new Uint8Array(i+r.byteLength);return E(t,o,0),E(e,o,n),o.set(r,i),o},Q=Symbol.for("@ipld/js-cid/CID");var X=r(79297);const Y="/",$=(new TextEncoder).encode(Y);$[0];Symbol.toStringTag;r(88785);new Uint8Array(0);Math.pow(2,31);Math.pow(2,7),Math.pow(2,14),Math.pow(2,21),Math.pow(2,28),Math.pow(2,35),Math.pow(2,42),Math.pow(2,49),Math.pow(2,56),Math.pow(2,63);var tt=r(32114);class et{constructor(t,e,r){this.name=t,this.prefix=e,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class rt{constructor(t,e,r){if(this.name=t,this.prefix=e,void 0===e.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=e.codePointAt(0),this.baseDecode=r}decode(t){if("string"===typeof t){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(t){return it(this,t)}}class nt{constructor(t){this.decoders=t}or(t){return it(this,t)}decode(t){const e=t[0],r=this.decoders[e];if(r)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const it=(t,e)=>new nt({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class ot{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new et(t,e,r),this.decoder=new rt(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const st=({name:t,prefix:e,encode:r,decode:n})=>new ot(t,e,r,n),at=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>st({prefix:e,name:t,encode:t=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<((t,e,r,n)=>{const i={};for(let c=0;c=8&&(a-=8,s[h++]=255&u>>a)}if(a>=r||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,n,r,t)});at({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),at({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),at({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),at({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),at({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),at({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),at({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),at({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),at({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var ut=r(20605);r(19588);const ht=["string","number","bigint","symbol"],ct=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function lt(t){if(null===t)return"null";if(void 0===t)return"undefined";if(!0===t||!1===t)return"boolean";const e=typeof t;if(ht.includes(e))return e;if("function"===e)return"Function";if(Array.isArray(t))return"Array";if(function(t){return t&&t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer.call(null,t)}(t))return"Buffer";const r=function(t){const e=Object.prototype.toString.call(t).slice(8,-1);if(ct.includes(e))return e;return}(t);return r||"Object"}class ft{constructor(t,e,r){this.major=t,this.majorEncoded=t<<5,this.name=e,this.terminal=r}toString(){return`Type[${this.major}].${this.name}`}compare(t){return this.majort.major?1:0}}ft.uint=new ft(0,"uint",!0),ft.negint=new ft(1,"negint",!0),ft.bytes=new ft(2,"bytes",!0),ft.string=new ft(3,"string",!0),ft.array=new ft(4,"array",!1),ft.map=new ft(5,"map",!1),ft.tag=new ft(6,"tag",!1),ft.float=new ft(7,"float",!0),ft.false=new ft(7,"false",!0),ft.true=new ft(7,"true",!0),ft.null=new ft(7,"null",!0),ft.undefined=new ft(7,"undefined",!0),ft.break=new ft(7,"break",!0);class dt{constructor(t,e,r){this.type=t,this.value=e,this.encodedLength=r,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}}const pt=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&"function"===typeof globalThis.Buffer.isBuffer,gt=new TextDecoder,yt=new TextEncoder;function mt(t){return pt&&globalThis.Buffer.isBuffer(t)}function vt(t){return t instanceof Uint8Array?mt(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t:Uint8Array.from(t)}const bt=pt?(t,e,r)=>r-e>64?globalThis.Buffer.from(t.subarray(e,r)).toString("utf8"):xt(t,e,r):(t,e,r)=>r-e>64?gt.decode(t.subarray(e,r)):xt(t,e,r),wt=pt?t=>t.length>64?globalThis.Buffer.from(t):Bt(t):t=>t.length>64?yt.encode(t):Bt(t),Et=t=>Uint8Array.from(t),At=pt?(t,e,r)=>mt(t)?new Uint8Array(t.subarray(e,r)):t.slice(e,r):(t,e,r)=>t.slice(e,r),kt=pt?(t,e)=>(t=t.map((t=>t instanceof Uint8Array?t:globalThis.Buffer.from(t))),vt(globalThis.Buffer.concat(t,e))):(t,e)=>{const r=new Uint8Array(e);let n=0;for(let i of t)n+i.length>r.length&&(i=i.subarray(0,r.length-n)),r.set(i,n),n+=i.length;return r},St=pt?t=>globalThis.Buffer.allocUnsafe(t):t=>new Uint8Array(t);function Bt(t,e=1/0){let r;const n=t.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=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((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function xt(t,e,r){const n=[];for(;e239?4:i>223?3:i>191?2:1;if(e+s<=r){let r,n,a,u;switch(s){case 1:i<128&&(o=i);break;case 2:r=t[e+1],128===(192&r)&&(u=(31&i)<<6|63&r,u>127&&(o=u));break;case 3:r=t[e+1],n=t[e+2],128===(192&r)&&128===(192&n)&&(u=(15&i)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[e+1],n=t[e+2],a=t[e+3],128===(192&r)&&128===(192&n)&&128===(192&a)&&(u=(15&i)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),e+=s}return function(t){const e=t.length;if(e<=Ct)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nr.length/2?(e=this.cursor===r.length?r:r.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):e=At(r,0,this.cursor)}else e=kt(this.chunks,this.cursor);return t&&this.reset(),e}}const It=[];function Tt(t,e,r){if(t.length-e>>8,255&n])}else if(r>>24&255,n>>>16&255,n>>>8&255,255&n])}else{const n=BigInt(r);if(!(n>BigInt(32)&BigInt(4294967295));r[8]=255&i,i>>=8,r[7]=255&i,i>>=8,r[6]=255&i,i>>=8,r[5]=255&i,r[4]=255&o,o>>=8,r[3]=255&o,o>>=8,r[2]=255&o,o>>=8,r[1]=255&o,t.push(r)}}}Ut.encodedSize=function(t){return Lt.encodedSize(t.value)},Lt.encodedSize=function(t){return te.value?1:0};const Dt=BigInt(-1),Ft=BigInt(1);function jt(t,e){const r=e.value,n="bigint"===typeof r?r*Dt-Ft:-1*r-1;Lt(t,e.type.majorEncoded,n)}function Kt(t,e,r,n){Tt(t,e,r+n);const i=At(t,e+r,e+r+n);return new dt(ft.bytes,i,r+n)}function zt(t,e,r,n){return Kt(t,e,1,r)}function Ht(t){return void 0===t.encodedBytes&&(t.encodedBytes=t.type===ft.string?wt(t.value):t.value),t.encodedBytes}function qt(t,e){const r=Ht(e);Lt(t,e.type.majorEncoded,r.length),t.push(r)}function Vt(t,e,r,n,i){const o=r+n;Tt(t,e,o);const s=new dt(ft.string,bt(t,e+r,e+o),o);return!0===i.retainStringBytes&&(s.byteValue=At(t,e+r,e+o)),s}function Gt(t,e,r,n){return Vt(t,e,1,r,n)}jt.encodedSize=function(t){const e=t.value,r="bigint"===typeof e?e*Dt-Ft:-1*e-1;return re.value?-1:0},qt.encodedSize=function(t){const e=Ht(t);return Lt.encodedSize(e.length)+e.length},qt.compareTokens=function(t,e){return r=Ht(t),n=Ht(e),r.lengthn.length?1:function(t,e){if(mt(t)&&mt(e))return t.compare(e);for(let r=0;r>23,n=8388607&e;if(255===r)oe.setUint16(0,31744,!1);else if(0===r)oe.setUint16(0,(2147483648&t)>>16|n>>13,!1);else{const t=r-127;t<-24?oe.setUint16(0,0):t<-14?oe.setUint16(0,(2147483648&e)>>16|1<<24+t,!1):oe.setUint16(0,(2147483648&e)>>16|t+15<<10|n>>13,!1)}}}function ue(t,e){if(t.length-e<2)throw new Error("CBOR decode error: not enough data for float16");const r=(t[e]<<8)+t[e+1];if(31744===r)return 1/0;if(64512===r)return-1/0;if(32256===r)return NaN;const n=r>>10&31,i=1023&r;let o;return o=0===n?i*2**-24:31!==n?(i+1024)*2**(n-25):0===i?1/0:NaN,32768&r?-o:o}function he(t){oe.setFloat32(0,t,!1)}function ce(t,e){if(t.length-e<4)throw new Error("CBOR decode error: not enough data for float32");const r=(t.byteOffset||0)+e;return new DataView(t.buffer,r,4).getFloat32(0,!1)}function le(t,e){if(t.length-e<8)throw new Error("CBOR decode error: not enough data for float64");const r=(t.byteOffset||0)+e;return new DataView(t.buffer,r,8).getFloat64(0,!1)}function fe(t,e,r){throw new Error(`CBOR decode error: encountered invalid minor (${r}) for major ${t[e]>>>5}`)}function de(t){return()=>{throw new Error(`CBOR decode error: ${t}`)}}ne.compareTokens=Ut.compareTokens;const pe=[];for(let kn=0;kn<=23;kn++)pe[kn]=fe;pe[24]=function(t,e,r,n){return new dt(ft.uint,Rt(t,e+1,n),2)},pe[25]=function(t,e,r,n){return new dt(ft.uint,_t(t,e+1,n),3)},pe[26]=function(t,e,r,n){return new dt(ft.uint,Pt(t,e+1,n),5)},pe[27]=function(t,e,r,n){return new dt(ft.uint,Nt(t,e+1,n),9)},pe[28]=fe,pe[29]=fe,pe[30]=fe,pe[31]=fe;for(let kn=32;kn<=55;kn++)pe[kn]=fe;pe[56]=function(t,e,r,n){return new dt(ft.negint,-1-Rt(t,e+1,n),2)},pe[57]=function(t,e,r,n){return new dt(ft.negint,-1-_t(t,e+1,n),3)},pe[58]=function(t,e,r,n){return new dt(ft.negint,-1-Pt(t,e+1,n),5)},pe[59]=function(t,e,r,n){const i=Nt(t,e+1,n);if("bigint"!==typeof i){const t=-1-i;if(t>=Number.MIN_SAFE_INTEGER)return new dt(ft.negint,t,9)}if(!0!==n.allowBigInt)throw new Error("CBOR decode error: integers outside of the safe integer range are not supported");return new dt(ft.negint,Dt-BigInt(i),9)},pe[60]=fe,pe[61]=fe,pe[62]=fe,pe[63]=fe;for(let kn=64;kn<=87;kn++)pe[kn]=zt;pe[88]=function(t,e,r,n){return Kt(t,e,2,Rt(t,e+1,n))},pe[89]=function(t,e,r,n){return Kt(t,e,3,_t(t,e+1,n))},pe[90]=function(t,e,r,n){return Kt(t,e,5,Pt(t,e+1,n))},pe[91]=function(t,e,r,n){const i=Nt(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer bytes lengths not supported");return Kt(t,e,9,i)},pe[92]=fe,pe[93]=fe,pe[94]=fe,pe[95]=de("indefinite length bytes/strings are not supported");for(let kn=96;kn<=119;kn++)pe[kn]=Gt;pe[120]=function(t,e,r,n){return Vt(t,e,2,Rt(t,e+1,n),n)},pe[121]=function(t,e,r,n){return Vt(t,e,3,_t(t,e+1,n),n)},pe[122]=function(t,e,r,n){return Vt(t,e,5,Pt(t,e+1,n),n)},pe[123]=function(t,e,r,n){const i=Nt(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer string lengths not supported");return Vt(t,e,9,i,n)},pe[124]=fe,pe[125]=fe,pe[126]=fe,pe[127]=de("indefinite length bytes/strings are not supported");for(let kn=128;kn<=151;kn++)pe[kn]=Jt;pe[152]=function(t,e,r,n){return Zt(0,0,2,Rt(t,e+1,n))},pe[153]=function(t,e,r,n){return Zt(0,0,3,_t(t,e+1,n))},pe[154]=function(t,e,r,n){return Zt(0,0,5,Pt(t,e+1,n))},pe[155]=function(t,e,r,n){const i=Nt(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer array lengths not supported");return Zt(0,0,9,i)},pe[156]=fe,pe[157]=fe,pe[158]=fe,pe[159]=function(t,e,r,n){if(!1===n.allowIndefinite)throw new Error("CBOR decode error: indefinite length items not allowed");return Zt(0,0,1,1/0)};for(let kn=160;kn<=183;kn++)pe[kn]=Yt;pe[184]=function(t,e,r,n){return Xt(0,0,2,Rt(t,e+1,n))},pe[185]=function(t,e,r,n){return Xt(0,0,3,_t(t,e+1,n))},pe[186]=function(t,e,r,n){return Xt(0,0,5,Pt(t,e+1,n))},pe[187]=function(t,e,r,n){const i=Nt(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer map lengths not supported");return Xt(0,0,9,i)},pe[188]=fe,pe[189]=fe,pe[190]=fe,pe[191]=function(t,e,r,n){if(!1===n.allowIndefinite)throw new Error("CBOR decode error: indefinite length items not allowed");return Xt(0,0,1,1/0)};for(let kn=192;kn<=215;kn++)pe[kn]=te;pe[216]=function(t,e,r,n){return new dt(ft.tag,Rt(t,e+1,n),2)},pe[217]=function(t,e,r,n){return new dt(ft.tag,_t(t,e+1,n),3)},pe[218]=function(t,e,r,n){return new dt(ft.tag,Pt(t,e+1,n),5)},pe[219]=function(t,e,r,n){return new dt(ft.tag,Nt(t,e+1,n),9)},pe[220]=fe,pe[221]=fe,pe[222]=fe,pe[223]=fe;for(let kn=224;kn<=243;kn++)pe[kn]=de("simple values are not supported");pe[244]=fe,pe[245]=fe,pe[246]=fe,pe[247]=function(t,e,r,n){if(!1===n.allowUndefined)throw new Error("CBOR decode error: undefined values are not supported");return!0===n.coerceUndefinedToNull?new dt(ft.null,null,1):new dt(ft.undefined,void 0,1)},pe[248]=de("simple values are not supported"),pe[249]=function(t,e,r,n){return re(ue(t,e+1),3,n)},pe[250]=function(t,e,r,n){return re(ce(t,e+1),5,n)},pe[251]=function(t,e,r,n){return re(le(t,e+1),9,n)},pe[252]=fe,pe[253]=fe,pe[254]=fe,pe[255]=function(t,e,r,n){if(!1===n.allowIndefinite)throw new Error("CBOR decode error: indefinite length items not allowed");return new dt(ft.break,void 0,1)};const ge=[];for(let kn=0;kn<24;kn++)ge[kn]=new dt(ft.uint,kn,1);for(let kn=-1;kn>=-24;kn--)ge[31-kn]=new dt(ft.negint,kn,1);ge[64]=new dt(ft.bytes,new Uint8Array(0),1),ge[96]=new dt(ft.string,"",1),ge[128]=new dt(ft.array,0,1),ge[160]=new dt(ft.map,0,1),ge[244]=new dt(ft.false,!1,1),ge[245]=new dt(ft.true,!0,1),ge[246]=new dt(ft.null,null,1);const ye={float64:!1,mapSorter:function(t,e){const r=Array.isArray(t[0])?t[0][0]:t[0],n=Array.isArray(e[0])?e[0][0]:e[0];if(r.type!==n.type)return r.type.compare(n.type);const i=r.type.major,o=me[i].compareTokens(r,n);0===o&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone");return o},quickEncodeToken:function(t){switch(t.type){case ft.false:return Et([244]);case ft.true:return Et([245]);case ft.null:return Et([246]);case ft.bytes:return t.value.length?void 0:Et([64]);case ft.string:return""===t.value?Et([96]):void 0;case ft.array:return 0===t.value?Et([128]):void 0;case ft.map:return 0===t.value?Et([160]):void 0;case ft.uint:return t.value<24?Et([Number(t.value)]):void 0;case ft.negint:if(t.value>=-24)return Et([31-Number(t.value)])}}};const me=function(){const t=[];return t[ft.uint.major]=Ut,t[ft.negint.major]=jt,t[ft.bytes.major]=qt,t[ft.string.major]=Wt,t[ft.array.major]=Qt,t[ft.map.major]=$t,t[ft.tag.major]=ee,t[ft.float.major]=ne,t}(),ve=new Mt;class be{constructor(t,e){this.obj=t,this.parent=e}includes(t){let e=this;do{if(e.obj===t)return!0}while(e=e.parent);return!1}static createCheck(t,e){if(t&&t.includes(e))throw new Error("CBOR encode error: object contains circular references");return new be(e,t)}}const we={null:new dt(ft.null,null),undefined:new dt(ft.undefined,void 0),true:new dt(ft.true,!0),false:new dt(ft.false,!1),emptyArray:new dt(ft.array,0),emptyMap:new dt(ft.map,0)},Ee={number:(t,e,r,n)=>Number.isInteger(t)&&Number.isSafeInteger(t)?new dt(t>=0?ft.uint:ft.negint,t):new dt(ft.float,t),bigint:(t,e,r,n)=>t>=BigInt(0)?new dt(ft.uint,t):new dt(ft.negint,t),Uint8Array:(t,e,r,n)=>new dt(ft.bytes,t),string:(t,e,r,n)=>new dt(ft.string,t),boolean:(t,e,r,n)=>t?we.true:we.false,null:(t,e,r,n)=>we.null,undefined:(t,e,r,n)=>we.undefined,ArrayBuffer:(t,e,r,n)=>new dt(ft.bytes,new Uint8Array(t)),DataView:(t,e,r,n)=>new dt(ft.bytes,new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),Array(t,e,r,n){if(!t.length)return!0===r.addBreakTokens?[we.emptyArray,new dt(ft.break)]:we.emptyArray;n=be.createCheck(n,t);const i=[];let o=0;for(const s of t)i[o++]=Ae(s,r,n);return r.addBreakTokens?[new dt(ft.array,t.length),i,new dt(ft.break)]:[new dt(ft.array,t.length),i]},Object(t,e,r,n){const i="Object"!==e,o=i?t.keys():Object.keys(t),s=i?t.size:o.length;if(!s)return!0===r.addBreakTokens?[we.emptyMap,new dt(ft.break)]:we.emptyMap;n=be.createCheck(n,t);const a=[];let u=0;for(const h of o)a[u++]=[Ae(h,r,n),Ae(i?t.get(h):t[h],r,n)];return function(t,e){e.mapSorter&&t.sort(e.mapSorter)}(a,r),r.addBreakTokens?[new dt(ft.map,s),a,new dt(ft.break)]:[new dt(ft.map,s),a]}};Ee.Map=Ee.Object,Ee.Buffer=Ee.Uint8Array;for(const kn of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))Ee[`${kn}Array`]=Ee.DataView;function Ae(t,e={},r){const n=lt(t),i=e&&e.typeEncoders&&e.typeEncoders[n]||Ee[n];if("function"===typeof i){const o=i(t,n,e,r);if(null!=o)return o}const o=Ee[n];if(!o)throw new Error(`CBOR encode error: unsupported type: ${n}`);return o(t,n,e,r)}function ke(t,e,r,n){if(Array.isArray(e))for(const i of e)ke(t,i,r,n);else r[e.type.major](t,e,n)}function Se(t,e,r){const n=Ae(t,r);if(!Array.isArray(n)&&r.quickEncodeToken){const t=r.quickEncodeToken(n);if(t)return t;const i=e[n.type.major];if(i.encodedSize){const t=i.encodedSize(n,r),e=new Mt(t);if(i(e,n,r),1!==e.chunks.length)throw new Error(`Unexpected error: pre-calculated length for ${n} was wrong`);return vt(e.chunks[0])}}return ve.reset(),ke(ve,n,e,r),ve.toBytes(!0)}Symbol.for("DONE"),Symbol.for("BREAK");var Be=r(43720),xe=r(11227),Ce=r(62100);const Me=Ce.Reader,Ie=Ce.Writer,Te=Ce.util,Oe=Ce.roots["ipfs-ipns"]||(Ce.roots["ipfs-ipns"]={}),Re=Oe.IpnsEntry=(()=>{function t(t){if(t)for(var e=Object.keys(t),r=0;r>>3){case 1:n.value=t.bytes();break;case 2:n.signature=t.bytes();break;case 3:n.validityType=t.int32();break;case 4:n.validity=t.bytes();break;case 5:n.sequence=t.uint64();break;case 6:n.ttl=t.uint64();break;case 7:n.pubKey=t.bytes();break;case 8:n.signatureV2=t.bytes();break;case 9:n.data=t.bytes();break;default:t.skipType(7&i)}}return n},t.fromObject=function(t){if(t instanceof Oe.IpnsEntry)return t;var e=new Oe.IpnsEntry;switch(null!=t.value&&("string"===typeof t.value?Te.base64.decode(t.value,e.value=Te.newBuffer(Te.base64.length(t.value)),0):t.value.length&&(e.value=t.value)),null!=t.signature&&("string"===typeof t.signature?Te.base64.decode(t.signature,e.signature=Te.newBuffer(Te.base64.length(t.signature)),0):t.signature.length&&(e.signature=t.signature)),t.validityType){case"EOL":case 0:e.validityType=0}return null!=t.validity&&("string"===typeof t.validity?Te.base64.decode(t.validity,e.validity=Te.newBuffer(Te.base64.length(t.validity)),0):t.validity.length&&(e.validity=t.validity)),null!=t.sequence&&(Te.Long?(e.sequence=Te.Long.fromValue(t.sequence)).unsigned=!0:"string"===typeof t.sequence?e.sequence=parseInt(t.sequence,10):"number"===typeof t.sequence?e.sequence=t.sequence:"object"===typeof t.sequence&&(e.sequence=new Te.LongBits(t.sequence.low>>>0,t.sequence.high>>>0).toNumber(!0))),null!=t.ttl&&(Te.Long?(e.ttl=Te.Long.fromValue(t.ttl)).unsigned=!0:"string"===typeof t.ttl?e.ttl=parseInt(t.ttl,10):"number"===typeof t.ttl?e.ttl=t.ttl:"object"===typeof t.ttl&&(e.ttl=new Te.LongBits(t.ttl.low>>>0,t.ttl.high>>>0).toNumber(!0))),null!=t.pubKey&&("string"===typeof t.pubKey?Te.base64.decode(t.pubKey,e.pubKey=Te.newBuffer(Te.base64.length(t.pubKey)),0):t.pubKey.length&&(e.pubKey=t.pubKey)),null!=t.signatureV2&&("string"===typeof t.signatureV2?Te.base64.decode(t.signatureV2,e.signatureV2=Te.newBuffer(Te.base64.length(t.signatureV2)),0):t.signatureV2.length&&(e.signatureV2=t.signatureV2)),null!=t.data&&("string"===typeof t.data?Te.base64.decode(t.data,e.data=Te.newBuffer(Te.base64.length(t.data)),0):t.data.length&&(e.data=t.data)),e},t.toObject=function(t,e){e||(e={});var r={};if(e.defaults){if(e.bytes===String?r.value="":(r.value=[],e.bytes!==Array&&(r.value=Te.newBuffer(r.value))),e.bytes===String?r.signature="":(r.signature=[],e.bytes!==Array&&(r.signature=Te.newBuffer(r.signature))),r.validityType=e.enums===String?"EOL":0,e.bytes===String?r.validity="":(r.validity=[],e.bytes!==Array&&(r.validity=Te.newBuffer(r.validity))),Te.Long){var n=new Te.Long(0,0,!0);r.sequence=e.longs===String?n.toString():e.longs===Number?n.toNumber():n}else r.sequence=e.longs===String?"0":0;if(Te.Long){n=new Te.Long(0,0,!0);r.ttl=e.longs===String?n.toString():e.longs===Number?n.toNumber():n}else r.ttl=e.longs===String?"0":0;e.bytes===String?r.pubKey="":(r.pubKey=[],e.bytes!==Array&&(r.pubKey=Te.newBuffer(r.pubKey))),e.bytes===String?r.signatureV2="":(r.signatureV2=[],e.bytes!==Array&&(r.signatureV2=Te.newBuffer(r.signatureV2))),e.bytes===String?r.data="":(r.data=[],e.bytes!==Array&&(r.data=Te.newBuffer(r.data)))}return null!=t.value&&t.hasOwnProperty("value")&&(r.value=e.bytes===String?Te.base64.encode(t.value,0,t.value.length):e.bytes===Array?Array.prototype.slice.call(t.value):t.value),null!=t.signature&&t.hasOwnProperty("signature")&&(r.signature=e.bytes===String?Te.base64.encode(t.signature,0,t.signature.length):e.bytes===Array?Array.prototype.slice.call(t.signature):t.signature),null!=t.validityType&&t.hasOwnProperty("validityType")&&(r.validityType=e.enums===String?Oe.IpnsEntry.ValidityType[t.validityType]:t.validityType),null!=t.validity&&t.hasOwnProperty("validity")&&(r.validity=e.bytes===String?Te.base64.encode(t.validity,0,t.validity.length):e.bytes===Array?Array.prototype.slice.call(t.validity):t.validity),null!=t.sequence&&t.hasOwnProperty("sequence")&&("number"===typeof t.sequence?r.sequence=e.longs===String?String(t.sequence):t.sequence:r.sequence=e.longs===String?Te.Long.prototype.toString.call(t.sequence):e.longs===Number?new Te.LongBits(t.sequence.low>>>0,t.sequence.high>>>0).toNumber(!0):t.sequence),null!=t.ttl&&t.hasOwnProperty("ttl")&&("number"===typeof t.ttl?r.ttl=e.longs===String?String(t.ttl):t.ttl:r.ttl=e.longs===String?Te.Long.prototype.toString.call(t.ttl):e.longs===Number?new Te.LongBits(t.ttl.low>>>0,t.ttl.high>>>0).toNumber(!0):t.ttl),null!=t.pubKey&&t.hasOwnProperty("pubKey")&&(r.pubKey=e.bytes===String?Te.base64.encode(t.pubKey,0,t.pubKey.length):e.bytes===Array?Array.prototype.slice.call(t.pubKey):t.pubKey),null!=t.signatureV2&&t.hasOwnProperty("signatureV2")&&(r.signatureV2=e.bytes===String?Te.base64.encode(t.signatureV2,0,t.signatureV2.length):e.bytes===Array?Array.prototype.slice.call(t.signatureV2):t.signatureV2),null!=t.data&&t.hasOwnProperty("data")&&(r.data=e.bytes===String?Te.base64.encode(t.data,0,t.data.length):e.bytes===Array?Array.prototype.slice.call(t.data):t.data),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,Ce.util.toJSONOptions)},t.ValidityType=function(){const t={},e=Object.create(t);return e[t[0]="EOL"]=0,e}(),t})();const _e="ERR_UNRECOGNIZED_VALIDITY",Pe=Object.assign(xe("jsipns"),{error:xe("jsipns:error")}),Ne=((0,n.fromString)("/ipns/"),async(t,e,r,i,o,s)=>{r=BigInt(r);const a=(0,n.fromString)(o.toString()),u=await Le(t,e,i,a),h=Ue(e,a,i,r,s),c=Fe(h),l={value:e,signature:u,validityType:i,validity:a,sequence:r,ttl:s,signatureV2:await t.sign(c),data:h};return Pe(`ipns entry for ${e} created`),l}),Ue=(t,e,r,n,i)=>function(t,e){return e=Object.assign({},ye,e),Se(t,me,e)}({Value:t,Validity:e,ValidityType:r,Sequence:n,TTL:i}),Le=(t,e,r,n)=>{try{const i=De(e,r,n);return t.sign(i)}catch(i){throw Pe.error("record signature creation failed"),tt(new Error("record signature creation failed: "+i.message),"ERR_SIGNATURE_CREATION")}},De=(t,e,r)=>{const i=(0,n.fromString)((t=>{if("0"===t.toString())return"EOL";const e=new Error(`unrecognized validity type ${t.toString()}`);throw Pe.error(e),tt(e,_e)})(e));return(0,ut.concat)([t,r,i])},Fe=t=>{const e=(0,n.fromString)("ipns-signature:");return(0,ut.concat)([e,t])},je=["string","number","bigint","symbol"],Ke=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function ze(t){if(null===t)return"null";if(void 0===t)return"undefined";if(!0===t||!1===t)return"boolean";const e=typeof t;if(je.includes(e))return e;if("function"===e)return"Function";if(Array.isArray(t))return"Array";if(function(t){return t&&t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer.call(null,t)}(t))return"Buffer";const r=function(t){const e=Object.prototype.toString.call(t).slice(8,-1);if(Ke.includes(e))return e;return}(t);return r||"Object"}class He{constructor(t,e,r){this.major=t,this.majorEncoded=t<<5,this.name=e,this.terminal=r}toString(){return`Type[${this.major}].${this.name}`}compare(t){return this.majort.major?1:0}}He.uint=new He(0,"uint",!0),He.negint=new He(1,"negint",!0),He.bytes=new He(2,"bytes",!0),He.string=new He(3,"string",!0),He.array=new He(4,"array",!1),He.map=new He(5,"map",!1),He.tag=new He(6,"tag",!1),He.float=new He(7,"float",!0),He.false=new He(7,"false",!0),He.true=new He(7,"true",!0),He.null=new He(7,"null",!0),He.undefined=new He(7,"undefined",!0),He.break=new He(7,"break",!0);class qe{constructor(t,e,r){this.type=t,this.value=e,this.encodedLength=r,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}}const Ve=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&"function"===typeof globalThis.Buffer.isBuffer,Ge=new TextDecoder,We=new TextEncoder;function Ze(t){return Ve&&globalThis.Buffer.isBuffer(t)}function Je(t){return t instanceof Uint8Array?Ze(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t:Uint8Array.from(t)}const Qe=Ve?(t,e,r)=>r-e>64?globalThis.Buffer.from(t.subarray(e,r)).toString("utf8"):nr(t,e,r):(t,e,r)=>r-e>64?Ge.decode(t.subarray(e,r)):nr(t,e,r),Xe=Ve?t=>t.length>64?globalThis.Buffer.from(t):rr(t):t=>t.length>64?We.encode(t):rr(t),Ye=t=>Uint8Array.from(t),$e=Ve?(t,e,r)=>Ze(t)?new Uint8Array(t.subarray(e,r)):t.slice(e,r):(t,e,r)=>t.slice(e,r),tr=Ve?(t,e)=>(t=t.map((t=>t instanceof Uint8Array?t:globalThis.Buffer.from(t))),Je(globalThis.Buffer.concat(t,e))):(t,e)=>{const r=new Uint8Array(e);let n=0;for(let i of t)n+i.length>r.length&&(i=i.subarray(0,r.length-n)),r.set(i,n),n+=i.length;return r},er=Ve?t=>globalThis.Buffer.allocUnsafe(t):t=>new Uint8Array(t);function rr(t,e=1/0){let r;const n=t.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=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((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function nr(t,e,r){const n=[];for(;e239?4:i>223?3:i>191?2:1;if(e+s<=r){let r,n,a,u;switch(s){case 1:i<128&&(o=i);break;case 2:r=t[e+1],128===(192&r)&&(u=(31&i)<<6|63&r,u>127&&(o=u));break;case 3:r=t[e+1],n=t[e+2],128===(192&r)&&128===(192&n)&&(u=(15&i)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[e+1],n=t[e+2],a=t[e+3],128===(192&r)&&128===(192&n)&&128===(192&a)&&(u=(15&i)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),e+=s}return function(t){const e=t.length;if(e<=ir)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nr.length/2?(e=this.cursor===r.length?r:r.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):e=$e(r,0,this.cursor)}else e=tr(this.chunks,this.cursor);return t&&this.reset(),e}}const sr=[];function ar(t,e,r){if(t.length-e>>8,255&n])}else if(r>>24&255,n>>>16&255,n>>>8&255,255&n])}else{const n=BigInt(r);if(!(n>BigInt(32)&BigInt(4294967295));r[8]=255&i,i>>=8,r[7]=255&i,i>>=8,r[6]=255&i,i>>=8,r[5]=255&i,r[4]=255&o,o>>=8,r[3]=255&o,o>>=8,r[2]=255&o,o>>=8,r[1]=255&o,t.push(r)}}}dr.encodedSize=function(t){return pr.encodedSize(t.value)},pr.encodedSize=function(t){return te.value?1:0};const gr=BigInt(-1),yr=BigInt(1);function mr(t,e){const r=e.value,n="bigint"===typeof r?r*gr-yr:-1*r-1;pr(t,e.type.majorEncoded,n)}function vr(t,e,r,n){ar(t,e,r+n);const i=$e(t,e+r,e+r+n);return new qe(He.bytes,i,r+n)}function br(t,e,r,n){return vr(t,e,1,r)}function wr(t){return void 0===t.encodedBytes&&(t.encodedBytes=t.type===He.string?Xe(t.value):t.value),t.encodedBytes}function Er(t,e){const r=wr(e);pr(t,e.type.majorEncoded,r.length),t.push(r)}function Ar(t,e,r,n,i){const o=r+n;ar(t,e,o);const s=new qe(He.string,Qe(t,e+r,e+o),o);return!0===i.retainStringBytes&&(s.byteValue=$e(t,e+r,e+o)),s}function kr(t,e,r,n){return Ar(t,e,1,r,n)}mr.encodedSize=function(t){const e=t.value,r="bigint"===typeof e?e*gr-yr:-1*e-1;return re.value?-1:0},Er.encodedSize=function(t){const e=wr(t);return pr.encodedSize(e.length)+e.length},Er.compareTokens=function(t,e){return r=wr(t),n=wr(e),r.lengthn.length?1:function(t,e){if(Ze(t)&&Ze(e))return t.compare(e);for(let r=0;r>23,n=8388607&e;if(255===r)Ur.setUint16(0,31744,!1);else if(0===r)Ur.setUint16(0,(2147483648&t)>>16|n>>13,!1);else{const t=r-127;t<-24?Ur.setUint16(0,0):t<-14?Ur.setUint16(0,(2147483648&e)>>16|1<<24+t,!1):Ur.setUint16(0,(2147483648&e)>>16|t+15<<10|n>>13,!1)}}}function Fr(t,e){if(t.length-e<2)throw new Error("CBOR decode error: not enough data for float16");const r=(t[e]<<8)+t[e+1];if(31744===r)return 1/0;if(64512===r)return-1/0;if(32256===r)return NaN;const n=r>>10&31,i=1023&r;let o;return o=0===n?i*2**-24:31!==n?(i+1024)*2**(n-25):0===i?1/0:NaN,32768&r?-o:o}function jr(t){Ur.setFloat32(0,t,!1)}function Kr(t,e){if(t.length-e<4)throw new Error("CBOR decode error: not enough data for float32");const r=(t.byteOffset||0)+e;return new DataView(t.buffer,r,4).getFloat32(0,!1)}function zr(t,e){if(t.length-e<8)throw new Error("CBOR decode error: not enough data for float64");const r=(t.byteOffset||0)+e;return new DataView(t.buffer,r,8).getFloat64(0,!1)}function Hr(t,e,r){throw new Error(`CBOR decode error: encountered invalid minor (${r}) for major ${t[e]>>>5}`)}function qr(t){return()=>{throw new Error(`CBOR decode error: ${t}`)}}Pr.compareTokens=dr.compareTokens;const Vr=[];for(let kn=0;kn<=23;kn++)Vr[kn]=Hr;Vr[24]=function(t,e,r,n){return new qe(He.uint,hr(t,e+1,n),2)},Vr[25]=function(t,e,r,n){return new qe(He.uint,cr(t,e+1,n),3)},Vr[26]=function(t,e,r,n){return new qe(He.uint,lr(t,e+1,n),5)},Vr[27]=function(t,e,r,n){return new qe(He.uint,fr(t,e+1,n),9)},Vr[28]=Hr,Vr[29]=Hr,Vr[30]=Hr,Vr[31]=Hr;for(let kn=32;kn<=55;kn++)Vr[kn]=Hr;Vr[56]=function(t,e,r,n){return new qe(He.negint,-1-hr(t,e+1,n),2)},Vr[57]=function(t,e,r,n){return new qe(He.negint,-1-cr(t,e+1,n),3)},Vr[58]=function(t,e,r,n){return new qe(He.negint,-1-lr(t,e+1,n),5)},Vr[59]=function(t,e,r,n){const i=fr(t,e+1,n);if("bigint"!==typeof i){const t=-1-i;if(t>=Number.MIN_SAFE_INTEGER)return new qe(He.negint,t,9)}if(!0!==n.allowBigInt)throw new Error("CBOR decode error: integers outside of the safe integer range are not supported");return new qe(He.negint,gr-BigInt(i),9)},Vr[60]=Hr,Vr[61]=Hr,Vr[62]=Hr,Vr[63]=Hr;for(let kn=64;kn<=87;kn++)Vr[kn]=br;Vr[88]=function(t,e,r,n){return vr(t,e,2,hr(t,e+1,n))},Vr[89]=function(t,e,r,n){return vr(t,e,3,cr(t,e+1,n))},Vr[90]=function(t,e,r,n){return vr(t,e,5,lr(t,e+1,n))},Vr[91]=function(t,e,r,n){const i=fr(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer bytes lengths not supported");return vr(t,e,9,i)},Vr[92]=Hr,Vr[93]=Hr,Vr[94]=Hr,Vr[95]=qr("indefinite length bytes/strings are not supported");for(let kn=96;kn<=119;kn++)Vr[kn]=kr;Vr[120]=function(t,e,r,n){return Ar(t,e,2,hr(t,e+1,n),n)},Vr[121]=function(t,e,r,n){return Ar(t,e,3,cr(t,e+1,n),n)},Vr[122]=function(t,e,r,n){return Ar(t,e,5,lr(t,e+1,n),n)},Vr[123]=function(t,e,r,n){const i=fr(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer string lengths not supported");return Ar(t,e,9,i,n)},Vr[124]=Hr,Vr[125]=Hr,Vr[126]=Hr,Vr[127]=qr("indefinite length bytes/strings are not supported");for(let kn=128;kn<=151;kn++)Vr[kn]=xr;Vr[152]=function(t,e,r,n){return Br(0,0,2,hr(t,e+1,n))},Vr[153]=function(t,e,r,n){return Br(0,0,3,cr(t,e+1,n))},Vr[154]=function(t,e,r,n){return Br(0,0,5,lr(t,e+1,n))},Vr[155]=function(t,e,r,n){const i=fr(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer array lengths not supported");return Br(0,0,9,i)},Vr[156]=Hr,Vr[157]=Hr,Vr[158]=Hr,Vr[159]=function(t,e,r,n){if(!1===n.allowIndefinite)throw new Error("CBOR decode error: indefinite length items not allowed");return Br(0,0,1,1/0)};for(let kn=160;kn<=183;kn++)Vr[kn]=Ir;Vr[184]=function(t,e,r,n){return Mr(0,0,2,hr(t,e+1,n))},Vr[185]=function(t,e,r,n){return Mr(0,0,3,cr(t,e+1,n))},Vr[186]=function(t,e,r,n){return Mr(0,0,5,lr(t,e+1,n))},Vr[187]=function(t,e,r,n){const i=fr(t,e+1,n);if("bigint"===typeof i)throw new Error("CBOR decode error: 64-bit integer map lengths not supported");return Mr(0,0,9,i)},Vr[188]=Hr,Vr[189]=Hr,Vr[190]=Hr,Vr[191]=function(t,e,r,n){if(!1===n.allowIndefinite)throw new Error("CBOR decode error: indefinite length items not allowed");return Mr(0,0,1,1/0)};for(let kn=192;kn<=215;kn++)Vr[kn]=Or;Vr[216]=function(t,e,r,n){return new qe(He.tag,hr(t,e+1,n),2)},Vr[217]=function(t,e,r,n){return new qe(He.tag,cr(t,e+1,n),3)},Vr[218]=function(t,e,r,n){return new qe(He.tag,lr(t,e+1,n),5)},Vr[219]=function(t,e,r,n){return new qe(He.tag,fr(t,e+1,n),9)},Vr[220]=Hr,Vr[221]=Hr,Vr[222]=Hr,Vr[223]=Hr;for(let kn=224;kn<=243;kn++)Vr[kn]=qr("simple values are not supported");Vr[244]=Hr,Vr[245]=Hr,Vr[246]=Hr,Vr[247]=function(t,e,r,n){if(!1===n.allowUndefined)throw new Error("CBOR decode error: undefined values are not supported");return!0===n.coerceUndefinedToNull?new qe(He.null,null,1):new qe(He.undefined,void 0,1)},Vr[248]=qr("simple values are not supported"),Vr[249]=function(t,e,r,n){return _r(Fr(t,e+1),3,n)},Vr[250]=function(t,e,r,n){return _r(Kr(t,e+1),5,n)},Vr[251]=function(t,e,r,n){return _r(zr(t,e+1),9,n)},Vr[252]=Hr,Vr[253]=Hr,Vr[254]=Hr,Vr[255]=function(t,e,r,n){if(!1===n.allowIndefinite)throw new Error("CBOR decode error: indefinite length items not allowed");return new qe(He.break,void 0,1)};const Gr=[];for(let kn=0;kn<24;kn++)Gr[kn]=new qe(He.uint,kn,1);for(let kn=-1;kn>=-24;kn--)Gr[31-kn]=new qe(He.negint,kn,1);Gr[64]=new qe(He.bytes,new Uint8Array(0),1),Gr[96]=new qe(He.string,"",1),Gr[128]=new qe(He.array,0,1),Gr[160]=new qe(He.map,0,1),Gr[244]=new qe(He.false,!1,1),Gr[245]=new qe(He.true,!0,1),Gr[246]=new qe(He.null,null,1);const Wr={float64:!1,mapSorter:function(t,e){const r=Array.isArray(t[0])?t[0][0]:t[0],n=Array.isArray(e[0])?e[0][0]:e[0];if(r.type!==n.type)return r.type.compare(n.type);const i=r.type.major,o=Zr[i].compareTokens(r,n);0===o&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone");return o},quickEncodeToken:function(t){switch(t.type){case He.false:return Ye([244]);case He.true:return Ye([245]);case He.null:return Ye([246]);case He.bytes:return t.value.length?void 0:Ye([64]);case He.string:return""===t.value?Ye([96]):void 0;case He.array:return 0===t.value?Ye([128]):void 0;case He.map:return 0===t.value?Ye([160]):void 0;case He.uint:return t.value<24?Ye([Number(t.value)]):void 0;case He.negint:if(t.value>=-24)return Ye([31-Number(t.value)])}}};const Zr=function(){const t=[];return t[He.uint.major]=dr,t[He.negint.major]=mr,t[He.bytes.major]=Er,t[He.string.major]=Sr,t[He.array.major]=Cr,t[He.map.major]=Tr,t[He.tag.major]=Rr,t[He.float.major]=Pr,t}(),Jr=new or;class Qr{constructor(t,e){this.obj=t,this.parent=e}includes(t){let e=this;do{if(e.obj===t)return!0}while(e=e.parent);return!1}static createCheck(t,e){if(t&&t.includes(e))throw new Error("CBOR encode error: object contains circular references");return new Qr(e,t)}}const Xr={null:new qe(He.null,null),undefined:new qe(He.undefined,void 0),true:new qe(He.true,!0),false:new qe(He.false,!1),emptyArray:new qe(He.array,0),emptyMap:new qe(He.map,0)},Yr={number:(t,e,r,n)=>Number.isInteger(t)&&Number.isSafeInteger(t)?new qe(t>=0?He.uint:He.negint,t):new qe(He.float,t),bigint:(t,e,r,n)=>t>=BigInt(0)?new qe(He.uint,t):new qe(He.negint,t),Uint8Array:(t,e,r,n)=>new qe(He.bytes,t),string:(t,e,r,n)=>new qe(He.string,t),boolean:(t,e,r,n)=>t?Xr.true:Xr.false,null:(t,e,r,n)=>Xr.null,undefined:(t,e,r,n)=>Xr.undefined,ArrayBuffer:(t,e,r,n)=>new qe(He.bytes,new Uint8Array(t)),DataView:(t,e,r,n)=>new qe(He.bytes,new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),Array(t,e,r,n){if(!t.length)return!0===r.addBreakTokens?[Xr.emptyArray,new qe(He.break)]:Xr.emptyArray;n=Qr.createCheck(n,t);const i=[];let o=0;for(const s of t)i[o++]=$r(s,r,n);return r.addBreakTokens?[new qe(He.array,t.length),i,new qe(He.break)]:[new qe(He.array,t.length),i]},Object(t,e,r,n){const i="Object"!==e,o=i?t.keys():Object.keys(t),s=i?t.size:o.length;if(!s)return!0===r.addBreakTokens?[Xr.emptyMap,new qe(He.break)]:Xr.emptyMap;n=Qr.createCheck(n,t);const a=[];let u=0;for(const h of o)a[u++]=[$r(h,r,n),$r(i?t.get(h):t[h],r,n)];return function(t,e){e.mapSorter&&t.sort(e.mapSorter)}(a,r),r.addBreakTokens?[new qe(He.map,s),a,new qe(He.break)]:[new qe(He.map,s),a]}};Yr.Map=Yr.Object,Yr.Buffer=Yr.Uint8Array;for(const kn of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))Yr[`${kn}Array`]=Yr.DataView;function $r(t,e={},r){const n=ze(t),i=e&&e.typeEncoders&&e.typeEncoders[n]||Yr[n];if("function"===typeof i){const o=i(t,n,e,r);if(null!=o)return o}const o=Yr[n];if(!o)throw new Error(`CBOR encode error: unsupported type: ${n}`);return o(t,n,e,r)}function tn(t,e,r,n){if(Array.isArray(e))for(const i of e)tn(t,i,r,n);else r[e.type.major](t,e,n)}function en(t,e,r){const n=$r(t,r);if(!Array.isArray(n)&&r.quickEncodeToken){const t=r.quickEncodeToken(n);if(t)return t;const i=e[n.type.major];if(i.encodedSize){const t=i.encodedSize(n,r),e=new or(t);if(i(e,n,r),1!==e.chunks.length)throw new Error(`Unexpected error: pre-calculated length for ${n} was wrong`);return Je(e.chunks[0])}}return Jr.reset(),tn(Jr,n,e,r),Jr.toBytes(!0)}const rn={strict:!1,allowIndefinite:!0,allowUndefined:!0,allowBigInt:!0};class nn{constructor(t,e={}){this.pos=0,this.data=t,this.options=e}done(){return this.pos>=this.data.length}next(){const t=this.data[this.pos];let e=Gr[t];if(void 0===e){const r=Vr[t];if(!r)throw new Error(`CBOR decode error: no decoder for major type ${t>>>5} (byte 0x${t.toString(16).padStart(2,"0")})`);const n=31&t;e=r(this.data,this.pos,n,this.options)}return this.pos+=e.encodedLength,e}}const on=Symbol.for("DONE"),sn=Symbol.for("BREAK");function an(t,e){if(t.done())return on;const r=t.next();if(r.type===He.break)return sn;if(r.type.terminal)return r.value;if(r.type===He.array)return function(t,e,r){const n=[];for(let i=0;inew Date(Date.now()+31536e6).toISOString(),pn=new class{constructor(t=new URL("https://name.web3.storage/"),e=function(){const t=un(30,1e4);return async()=>await t((()=>{}))}()){this.endpoint=t,this.waitForRateLimit=e}};class gn{constructor(t){this._pubKey=t}get bytes(){const t=k(x,this._pubKey.bytes);return H.createV1(114,t).bytes}toString(){const t=k(x,this._pubKey.bytes);return H.createV1(114,t).toString(L)}}class yn extends gn{constructor(t){super(t.public),this._privKey=t}get key(){return this._privKey}}async function mn(t){const e=await o.XP.unmarshalPrivateKey(t);return new yn(e)}async function vn(t,e){return new wn(t,e,0n,dn())}async function bn(t,e){const r=t.sequence+1n;return new wn(t.name,e,r,dn())}class wn{constructor(t,e,r,n){if(this._name=t,"string"!=typeof e)throw new Error("invalid value");if(this._value=e,"bigint"!=typeof r)throw new Error("invalid sequence number");if(this._sequence=r,"string"!=typeof n)throw new Error("invalid validity");this._validity=n}get name(){return this._name}get value(){return this._value}get sequence(){return this._sequence}get validity(){return this._validity}static encode(t){return e={name:t._name.toString(),value:t._value,sequence:t._sequence,validity:t._validity},r=Object.assign({},Wr,r),en(e,Zr,r);var e,r}static decode(t){const e=function(t,e){if(!(t instanceof Uint8Array))throw new Error("CBOR decode error: data to decode must be a Uint8Array");const r=(e=Object.assign({},rn,e)).tokenizer||new nn(t,e),n=an(r,e);if(n===on)throw new Error("CBOR decode error: did not find any content to decode");if(n===sn)throw new Error("CBOR decode error: got unexpected break");if(!r.done())throw new Error("CBOR decode error: too many terminals, data makes no sense");return n}(t),r=function(t){const e=H.parse(t,L);if(114!==e.code)throw new Error(`Invalid key, expected 114 codec code but got ${e.code}`);const r=o.XP.unmarshalPublicKey(S(e.multihash.bytes).bytes);return new gn(r)}(e.name);return new wn(r,e.value,BigInt(e.sequence),e.validity)}}async function En(t,e,r=pn){const o=new URL(`name/${t.name.toString()}`,r.endpoint),s=await((t,e,r,n)=>{const i=new X(Date.now()+Number(n)),o=Re.ValidityType.EOL,[s,a]=n.toString().split("."),u=BigInt(s)*BigInt(1e5)+BigInt(a||0);return Ne(t,e,r,o,i,u)})(e,(0,n.fromString)(t.value),t.sequence,new Date(t.validity).getTime()-Date.now());var a;await r.waitForRateLimit(),await An(fn(o.toString(),{method:"POST",body:(0,i.toString)((a=s,Re.encode({...a,sequence:Be.fromString(a.sequence.toString()),ttl:null==a.ttl?void 0:Be.fromString(a.ttl.toString())}).finish()),"base64pad")}))}async function An(t){const e=await t;if(e.ok)return e;let r;try{const t=await e.json();r=new Error(t.message)}catch(t){r=new Error(`unexpected response from API, cannot parse error response. Received status: ${e.status}`)}throw r}}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/556.bab5f5b7ff8ff120.js b/out/_next/static/chunks/556.bab5f5b7ff8ff120.js new file mode 100644 index 00000000..ca70d36d --- /dev/null +++ b/out/_next/static/chunks/556.bab5f5b7ff8ff120.js @@ -0,0 +1 @@ +!function(){var t={70512:function(t,n,e){"use strict";var r=e(50029),o=e(87794),u=e.n(o),c=e(24978),i=(e(35689),e(26894)),f=e(11606),a=(e(27760),e(21429));try{fetch}catch(l){}function s(t,n,e,r){return p.apply(this,arguments)}function p(){return(p=(0,r.Z)(u().mark((function t(n,e,r,o){var s,p,l,v,d,y;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r.length<64)){t.next=2;break}throw new Error("SIGNATURE TOO SHORT; LENGTH SHOULD BE 65 BYTES");case 2:return s=(0,f.J)(c.UG.hexToBytes(r.toLowerCase().startsWith("0x")?r.slice(2):r)),2048,p="".concat(e,":").concat(n),l=(0,f.J)("".concat(p,":").concat(o||"",":").concat(r.slice(-64))),v=(0,i.Di)(f.J,s,l,p,42),d=a.generateRSAKey(v,2048),y=a.publicKeyString(d),t.abrupt("return",[d,y]);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}addEventListener("message",(function(t){var n=t.data,e=function(){var t=(0,r.Z)(u().mark((function t(){var e;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s(n._origin,n._caip10,n._sigRSA,n._salt);case 2:e=t.sent,postMessage(e);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();e()}))},95856:function(){},33397:function(){}},n={};function e(r){var o=n[r];if(void 0!==o)return o.exports;var u=n[r]={exports:{}},c=!0;try{t[r](u,u.exports,e),c=!1}finally{c&&delete n[r]}return u.exports}e.m=t,e.x=function(){var t=e.O(void 0,[6724,5660],(function(){return e(70512)}));return t=e.O(t)},function(){var t=[];e.O=function(n,r,o,u){if(!r){var c=1/0;for(s=0;s=u)&&Object.keys(e.O).every((function(t){return e.O[t](r[f])}))?r.splice(f--,1):(i=!1,u0&&t[s-1][2]>u;s--)t[s]=t[s-1];t[s]=[r,o,u]}}(),e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},function(){var t,n=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__};e.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var u=Object.create(null);e.r(u);var c={};t=t||[null,n({}),n([]),n(n)];for(var i=2&o&&r;"object"==typeof i&&!~t.indexOf(i);i=n(i))Object.getOwnPropertyNames(i).forEach((function(t){c[t]=function(){return r[t]}}));return c.default=function(){return r},e.d(u,c),u}}(),e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.f={},e.e=function(t){return Promise.all(Object.keys(e.f).reduce((function(n,r){return e.f[r](t,n),n}),[]))},e.u=function(t){return 6724===t?"static/chunks/6724-b954bf9a27972ff7.js":"static/chunks/"+t+".294b57e99702d064.js"},e.miniCssF=function(t){},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.p="/_next/",function(){var t={556:1,2174:1};e.f.i=function(n,r){t[n]||importScripts(e.p+e.u(n))};var n=self.webpackChunk_N_E=self.webpackChunk_N_E||[],r=n.push.bind(n);n.push=function(n){var o=n[0],u=n[1],c=n[2];for(var i in u)e.o(u,i)&&(e.m[i]=u[i]);for(c&&c(e);o.length;)t[o.pop()]=1;r(n)}}(),function(){var t=e.x;e.x=function(){return Promise.all([e.e(6724),e.e(5660)]).then(t)}}();var r=e.x();_N_E=r}(); \ No newline at end of file diff --git a/out/_next/static/chunks/5660.294b57e99702d064.js b/out/_next/static/chunks/5660.294b57e99702d064.js new file mode 100644 index 00000000..55aa53b3 --- /dev/null +++ b/out/_next/static/chunks/5660.294b57e99702d064.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5660],{21429:function(t){t.exports=function t(r,e,n){function i(s,a){if(!e[s]){if(!r[s]){if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var f=e[s]={exports:{}};r[s][0].call(f.exports,(function(t){var e=r[s][1][t];return i(e||t)}),f,f.exports,t,r,e,n)}return e[s].exports}for(var o=void 0,s=0;s>15;--o>=0;){var f=32767&this[t],u=this[t++]>>15,h=a*f+u*s;i=((f=s*f+((32767&h)<<15)+e[n]+(1073741823&i))>>>30)+(h>>>15)+a*u+(i>>>30),e[n++]=1073741823&f}return i}o.prototype.am=a,n=30,o.prototype.DB=n,o.prototype.DM=(1<=0;--r)t[r]=this[r];t.t=this.t,t.s=this.s}function g(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0}function m(t){var r=s();return r.fromInt(t),r}function w(t,r){var e;if(16==r)e=4;else if(8==r)e=3;else if(256==r)e=8;else if(2==r)e=1;else if(32==r)e=5;else{if(4!=r)return void this.fromRadix(t,r);e=2}this.t=0,this.s=0;for(var n=t.length,i=!1,s=0;--n>=0;){var a=8==e?255&t[n]:d(t,n);a<0?"-"==t.charAt(n)&&(i=!0):(i=!1,0==s?this[this.t++]=a:s+e>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==e&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t}function E(t){if(this.s<0)return"-"+this.negate().toString(t);var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else if(64==t)r=6;else{if(4!=t)return this.toRadix(t);r=2}var e,n=(1<0)for(a>a)>0&&(i=!0,o=p(e));s>=0;)a>(a+=this.DB-r)):(e=this[s]>>(a-=r)&n,a<=0&&(a+=this.DB,--s)),e>0&&(i=!0),i&&(o+=p(e));return i?o:"0"}function S(){var t=s();return o.ZERO.subTo(this,t),t}function x(){return this.s<0?this.negate():this}function B(t){var r=this.s-t.s;if(0!=r)return r;var e=this.t;if(0!=(r=e-t.t))return r;for(;--e>=0;)if(0!=(r=this[e]-t[e]))return r;return 0}function A(t){var r,e=1;return 0!=(r=t>>>16)&&(t=r,e+=16),0!=(r=t>>8)&&(t=r,e+=8),0!=(r=t>>4)&&(t=r,e+=4),0!=(r=t>>2)&&(t=r,e+=2),0!=(r=t>>1)&&(t=r,e+=1),e}function T(){return this.t<=0?0:this.DB*(this.t-1)+A(this[this.t-1]^this.s&this.DM)}function I(t,r){var e;for(e=this.t-1;e>=0;--e)r[e+t]=this[e];for(e=t-1;e>=0;--e)r[e]=0;r.t=this.t+t,r.s=this.s}function R(t,r){for(var e=t;e=0;--e)r[e+s+1]=this[e]>>i|a,a=(this[e]&o)<=0;--e)r[e]=0;r[s]=a,r.t=this.t+s+1,r.s=this.s,r.clamp()}function U(t,r){r.s=this.s;var e=Math.floor(t/this.DB);if(e>=this.t)r.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<>n;for(var s=e+1;s>n;n>0&&(r[this.t-e-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;e>=this.DB;n-=t.s}r.s=n<0?-1:0,n<-1?r[e++]=this.DV+n:n>0&&(r[e++]=n),r.t=e,r.clamp()}function O(t,r){var e=this.abs(),n=t.abs(),i=e.t;for(r.t=i+n.t;--i>=0;)r[i]=0;for(i=0;i=0;)t[e]=0;for(e=0;e=r.DV&&(t[e+r.t]-=r.DV,t[e+r.t+1]=1)}t.t>0&&(t[t.t-1]+=r.am(e,r[e],t,2*e,0,1)),t.s=0,t.clamp()}function P(t,r,e){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(h,a),i.lShiftTo(h,e)):(n.copyTo(a),i.copyTo(e));var c=a.t,l=a[c-1];if(0!=l){var p=l*(1<1?a[c-2]>>this.F2:0),d=this.FV/p,y=(1<=0&&(e[e.t++]=1,e.subTo(w,e)),o.ONE.dlShiftTo(c,w),w.subTo(a,a);a.t=0;){var b=e[--v]==l?this.DM:Math.floor(e[v]*d+(e[v-1]+g)*y);if((e[v]+=a.am(0,b,e,m,0,c))0&&e.rShiftTo(h,e),f<0&&o.ZERO.subTo(e,e)}}}function C(t){var r=s();return this.abs().divRemTo(t,null,r),this.s<0&&r.compareTo(o.ZERO)>0&&t.subTo(r,r),r}function M(t){this.m=t}function _(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function k(t){return t}function q(t){t.divRemTo(this.m,null,t)}function H(t,r,e){t.multiplyTo(r,e),this.reduce(e)}function F(t,r){t.squareTo(r),this.reduce(r)}function Z(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var r=3&t;return(r=(r=(r=(r=r*(2-(15&t)*r)&15)*(2-(255&t)*r)&255)*(2-((65535&t)*r&65535))&65535)*(2-t*r%this.DV)%this.DV)>0?this.DV-r:-r}function z(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(r,r),r}function j(t){var r=s();return t.copyTo(r),this.reduce(r),r}function K(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var r=0;r>15)*this.mpl&this.um)<<15)&t.DM;for(t[e=r+this.m.t]+=this.m.am(0,n,t,r,0,this.m.t);t[e]>=t.DV;)t[e]-=t.DV,t[++e]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function W(t,r){t.squareTo(r),this.reduce(r)}function G(t,r,e){t.multiplyTo(r,e),this.reduce(e)}function $(){return 0==(this.t>0?1&this[0]:this.s)}function J(t,r){if(t>4294967295||t<1)return o.ONE;var e=s(),n=s(),i=r.convert(this),a=A(t)-1;for(i.copyTo(e);--a>=0;)if(r.sqrTo(e,n),(t&1<0)r.mulTo(n,i,e);else{var f=e;e=n,n=f}return r.revert(e)}function X(t,r){var e;return e=t<256||r.isEven()?new M(r):new z(r),this.exp(t,e)}function Y(){var t=s();return this.copyTo(t),t}function Q(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>24}function rt(){return 0==this.t?this.s:this[0]<<16>>16}function et(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function nt(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function it(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var r=this.chunkSize(t),e=Math.pow(t,r),n=m(e),i=s(),o=s(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(e+o.intValue()).toString(t).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(t)+a}function ot(t,r){this.fromInt(0),null==r&&(r=10);for(var e=this.chunkSize(r),n=Math.pow(r,e),i=!1,s=0,a=0,f=0;f=e&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(r,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)}function st(t,r,e){if("number"==typeof r)if(t<2)this.fromInt(1);else for(this.fromNumber(t,e),this.testBit(t-1)||this.bitwiseTo(o.ONE.shiftLeft(t-1),dt,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(o.ONE.shiftLeft(t-1),this);else{var n=new Array,i=7&t;n.length=1+(t>>3),r.nextBytes(n),i>0?n[0]&=(1<0)for(n>n)!=(this.s&this.DM)>>n&&(r[i++]=e|this.s<=0;)n<8?(e=(this[t]&(1<>(n+=this.DB-8)):(e=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&e)&&(e|=-256),0==i&&(128&this.s)!=(128&e)&&++i,(i>0||e!=this.s)&&(r[i++]=e);return r}function ft(t){return 0==this.compareTo(t)}function ut(t){return this.compareTo(t)<0?this:t}function ht(t){return this.compareTo(t)>0?this:t}function ct(t,r,e){var n,i,o=Math.min(t.t,this.t);for(n=0;n>=16,r+=16),0==(255&t)&&(t>>=8,r+=8),0==(15&t)&&(t>>=4,r+=4),0==(3&t)&&(t>>=2,r+=2),0==(1&t)&&++r,r}function Bt(){for(var t=0;t=this.t?0!=this.s:0!=(this[r]&1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;e>=this.DB;n+=t.s}r.s=n<0?-1:0,n>0?r[e++]=n:n<-1&&(r[e++]=this.DV+n),r.t=e,r.clamp()}function Nt(t){var r=s();return this.addTo(t,r),r}function Pt(t){var r=s();return this.subTo(t,r),r}function Ct(t){var r=s();return this.multiplyTo(t,r),r}function Mt(){var t=s();return this.squareTo(t),t}function _t(t){var r=s();return this.divRemTo(t,r,null),r}function kt(t){var r=s();return this.divRemTo(t,null,r),r}function qt(t){var r=s(),e=s();return this.divRemTo(t,r,e),new Array(r,e)}function Ht(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Ft(t,r){if(0!=t){for(;this.t<=r;)this[this.t++]=0;for(this[r]+=t;this[r]>=this.DV;)this[r]-=this.DV,++r>=this.t&&(this[this.t++]=0),++this[r]}}function Zt(){}function zt(t){return t}function Vt(t,r,e){t.multiplyTo(r,e)}function jt(t,r){t.squareTo(r)}function Kt(t){return this.exp(t,new Zt)}function Wt(t,r,e){var n,i=Math.min(this.t+t.t,r);for(e.s=0,e.t=i;i>0;)e[--i]=0;for(n=e.t-this.t;i=0;)e[n]=0;for(n=Math.max(r-this.t,0);n2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var r=s();return t.copyTo(r),this.reduce(r),r}function Xt(t){return t}function Yt(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)}function Qt(t,r){t.squareTo(r),this.reduce(r)}function tr(t,r,e){t.multiplyTo(r,e),this.reduce(e)}function rr(t,r){var e,n,i=t.bitLength(),o=m(1);if(i<=0)return o;e=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new M(r):r.isEven()?new $t(r):new z(r);var a=new Array,f=3,u=e-1,h=(1<1){var c=s();for(n.sqrTo(a[1],c);f<=h;)a[f]=s(),n.mulTo(c,a[f-2],a[f]),f+=2}var l,p,d=t.t-1,y=!0,g=s();for(i=A(t[d])-1;d>=0;){for(i>=u?l=t[d]>>i-u&h:(l=(t[d]&(1<0&&(l|=t[d-1]>>this.DB+i-u)),f=e;0==(1&l);)l>>=1,--f;if((i-=f)<0&&(i+=this.DB,--d),y)a[l].copyTo(o),y=!1;else{for(;f>1;)n.sqrTo(o,g),n.sqrTo(g,o),f-=2;f>0?n.sqrTo(o,g):(p=o,o=g,g=p),n.mulTo(g,a[l],o)}for(;d>=0&&0==(t[d]&1<0&&(r.rShiftTo(o,r),e.rShiftTo(o,e));r.signum()>0;)(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),r.compareTo(e)>=0?(r.subTo(e,r),r.rShiftTo(1,r)):(e.subTo(r,e),e.rShiftTo(1,e));return o>0&&e.lShiftTo(o,e),e}function nr(t){if(t<=0)return 0;var r=this.DV%t,e=this.s<0?t-1:0;if(this.t>0)if(0==r)e=this[0]%t;else for(var n=this.t-1;n>=0;--n)e=(r*e+this[n])%t;return e}function ir(t){var r=t.isEven();if(this.isEven()&&r||0==t.signum())return o.ZERO;for(var e=t.clone(),n=this.clone(),i=m(1),s=m(0),a=m(0),f=m(1);0!=e.signum();){for(;e.isEven();)e.rShiftTo(1,e),r?(i.isEven()&&s.isEven()||(i.addTo(this,i),s.subTo(t,s)),i.rShiftTo(1,i)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;n.isEven();)n.rShiftTo(1,n),r?(a.isEven()&&f.isEven()||(a.addTo(this,a),f.subTo(t,f)),a.rShiftTo(1,a)):f.isEven()||f.subTo(t,f),f.rShiftTo(1,f);e.compareTo(n)>=0?(e.subTo(n,e),r&&i.subTo(a,i),s.subTo(f,s)):(n.subTo(e,n),r&&a.subTo(i,a),f.subTo(s,f))}return 0!=n.compareTo(o.ONE)?o.ZERO:f.compareTo(t)>=0?f.subtract(t):f.signum()<0?(f.addTo(t,f),f.signum()<0?f.add(t):f):f}M.prototype.convert=_,M.prototype.revert=k,M.prototype.reduce=q,M.prototype.mulTo=H,M.prototype.sqrTo=F,z.prototype.convert=V,z.prototype.revert=j,z.prototype.reduce=K,z.prototype.mulTo=G,z.prototype.sqrTo=W,o.prototype.copyTo=y,o.prototype.fromInt=g,o.prototype.fromString=w,o.prototype.clamp=b,o.prototype.dlShiftTo=I,o.prototype.drShiftTo=R,o.prototype.lShiftTo=D,o.prototype.rShiftTo=U,o.prototype.subTo=L,o.prototype.multiplyTo=O,o.prototype.squareTo=N,o.prototype.divRemTo=P,o.prototype.invDigit=Z,o.prototype.isEven=$,o.prototype.exp=J,o.prototype.toString=E,o.prototype.negate=S,o.prototype.abs=x,o.prototype.compareTo=B,o.prototype.bitLength=T,o.prototype.mod=C,o.prototype.modPowInt=X,o.ZERO=m(0),o.ONE=m(1),Zt.prototype.convert=zt,Zt.prototype.revert=zt,Zt.prototype.mulTo=Vt,Zt.prototype.sqrTo=jt,$t.prototype.convert=Jt,$t.prototype.revert=Xt,$t.prototype.reduce=Yt,$t.prototype.mulTo=tr,$t.prototype.sqrTo=Qt;var or=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],sr=(1<<26)/or[or.length-1];function ar(t){var r,e=this.abs();if(1==e.t&&e[0]<=or[or.length-1]){for(r=0;r>1)>or.length&&(t=or.length);for(var i=s(),a=0;a=o;)t/=2,r/=2,a>>>=1;return(t+a)/r},h},s=r.pow(e,n),i=r.pow(2,i),o=2*i,u(r.random(),t)}([],Math,256,6,52),ur.prototype.nextBytes=hr,cr.prototype.init=lr,cr.prototype.next=pr;var yr,gr,vr,mr=256;function wr(t){gr[vr++]^=255&t,gr[vr++]^=t>>8&255,gr[vr++]^=t>>16&255,gr[vr++]^=t>>24&255,vr>=mr&&(vr-=mr)}function br(){wr((new Date).getTime())}if(null==gr){var Er;for(gr=new Array,vr=0;vr>>8,gr[vr++]=255&Er;vr=0,br()}function Sr(){if(null==yr){for(br(),(yr=dr()).init(gr),vr=0;vr=0&&r>0;){var i=t.charCodeAt(n--);i<128?e[--r]=i:i>127&&i<2048?(e[--r]=63&i|128,e[--r]=i>>6|192):(e[--r]=63&i|128,e[--r]=i>>6&63|128,e[--r]=i>>12|224)}e[--r]=0;for(var s=new Br,a=new Array;r>2;){for(a[0]=0;0==a[0];)s.nextBytes(a);e[--r]=a[0]}return e[--r]=2,e[--r]=0,new o(e)}function Nr(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function Pr(t,r){null!=t&&null!=r&&t.length>0&&r.length>0?(this.n=Lr(t,16),this.e=parseInt(r,16)):alert("Invalid RSA public key")}function Cr(t){return t.modPowInt(this.e,this.n)}function Mr(t){var r=Or(t,this.n.bitLength()+7>>3);if(null==r)return null;var e=this.doPublic(r);if(null==e)return null;var n=e.toString(16);return 0==(1&n.length)?n:"0"+n}function _r(){return{coeff:this.coeff.toString(16),d:this.d.toString(16),dmp1:this.dmp1.toString(16),dmq1:this.dmq1.toString(16),e:this.e.toString(16),n:this.n.toString(16),p:this.p.toString(16),q:this.q.toString(16)}}function kr(t){var r=JSON.parse(t),e=new Nr;return e.setPrivateEx(r.n,r.e,r.d,r.p,r.q,r.dmp1,r.dmq1,r.coeff),e}function qr(t,r){for(var e=t.toByteArray(),n=0;n=e.length)return null;for(var i="";++n191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&e[n+1]),++n):(i+=String.fromCharCode((15&o)<<12|(63&e[n+1])<<6|63&e[n+2]),n+=2)}return i}function Hr(t,r,e){null!=t&&null!=r&&t.length>0&&r.length>0?(this.n=Lr(t,16),this.e=parseInt(r,16),this.d=Lr(e,16)):alert("Invalid RSA private key")}function Fr(t,r,e,n,i,o,s,a){if(!(null!=t&&null!=r&&t.length>0&&r.length>0))throw new Error("Invalid RSA private key");this.n=Lr(t,16),this.e=parseInt(r,16),this.d=Lr(e,16),this.p=Lr(n,16),this.q=Lr(i,16),this.dmp1=Lr(o,16),this.dmq1=Lr(s,16),this.coeff=Lr(a,16)}function Zr(t,r){var e=new ur,n=t>>1;this.e=parseInt(r,16);for(var i=new o(r,16);;){for(;this.p=new o(t-n,1,e),0!=this.p.subtract(o.ONE).gcd(i).compareTo(o.ONE)||!this.p.isProbablePrime(10););for(;this.q=new o(n,1,e),0!=this.q.subtract(o.ONE).gcd(i).compareTo(o.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var a=this.p.subtract(o.ONE),f=this.q.subtract(o.ONE),u=a.multiply(f);if(0==u.gcd(i).compareTo(o.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(u),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(f),this.coeff=this.q.modInverse(this.p);break}}}function zr(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var r=t.mod(this.p).modPow(this.dmp1,this.p),e=t.mod(this.q).modPow(this.dmq1,this.q);r.compareTo(e)<0;)r=r.add(this.p);return r.subtract(e).multiply(this.coeff).mod(this.p).multiply(this.q).add(e)}function Vr(t){var r=Lr(t,16),e=this.doPrivate(r);return null==e?null:qr(e,this.n.bitLength()+7>>3)}Nr.prototype.doPublic=Cr,Nr.prototype.setPublic=Pr,Nr.prototype.encrypt=Mr,Nr.prototype.toJSON=_r,Nr.parse=kr,Nr.prototype.doPrivate=zr,Nr.prototype.setPrivate=Hr,Nr.prototype.setPrivateEx=Fr,Nr.prototype.generate=Zr,Nr.prototype.decrypt=Vr;var jr=[];jr.sha1="3021300906052b0e03021a05000414",jr.sha256="3031300d060960864801650304020105000420";var Kr=[];function Wr(t,r,e){for(var n=r/4,i=(0,Kr[e])(t),o="0001",s="00"+jr[e]+i,a="",f=n-o.length-s.length,u=0;u=256&&(i^=283)):n>24&&o%n==16&&(s=new Array(t.Sbox[s[0]],t.Sbox[s[1]],t.Sbox[s[2]],t.Sbox[s[3]]));for(var a=0;a<4;a++)r[o+a]=r[o+a-n]^s[a]}},t.Encrypt=function(r,e){var n=e.length;t.AddRoundKey(r,e.slice(0,16));for(var i=16;i=16;i-=16)t.AddRoundKey(r,e.slice(i,i+16)),t.MixColumns_Inv(r),t.ShiftRows(r,t.ShiftRowTab_Inv),t.SubBytes(r,t.Sbox_Inv);t.AddRoundKey(r,e.slice(0,16))},t.SubBytes=function(t,r){for(var e=0;e<16;e++)t[e]=r[t[e]]},t.AddRoundKey=function(t,r){for(var e=0;e<16;e++)t[e]^=r[e]},t.ShiftRows=function(t,r){for(var e=(new Array).concat(t),n=0;n<16;n++)t[n]=e[r[n]]},t.MixColumns=function(r){for(var e=0;e<16;e+=4){var n=r[e+0],i=r[e+1],o=r[e+2],s=r[e+3],a=n^i^o^s;r[e+0]^=a^t.xtime[n^i],r[e+1]^=a^t.xtime[i^o],r[e+2]^=a^t.xtime[o^s],r[e+3]^=a^t.xtime[s^n]}},t.MixColumns_Inv=function(r){for(var e=0;e<16;e+=4){var n=r[e+0],i=r[e+1],o=r[e+2],s=r[e+3],a=n^i^o^s,f=t.xtime[a],u=t.xtime[t.xtime[f^n^o]]^a,h=t.xtime[t.xtime[f^i^s]]^a;r[e+0]^=u^t.xtime[n^i],r[e+1]^=h^t.xtime[i^o],r[e+2]^=u^t.xtime[o^s],r[e+3]^=h^t.xtime[s^n]}},t}(),ie=function(){var t={};ne.Init();var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";return t.b256to64=function(t){var e,n,i,o="",s=0,a=t.length;for(i=0;i>2&63),e=(3&n)<<4):1==s?(o+=r.charAt(e|n>>4&15),e=(15&n)<<2):2==s&&(o+=r.charAt(e|n>>6&3),o+=r.charAt(63&n)),3==(s+=1)&&(s=0);return s>0&&(o+=r.charAt(e),o+="="),1==s&&(o+="="),o},t.b64to256=function(t){var e,n,i="",o=0,s=0,a=t.length;for(n=0;n=0&&(o&&(i+=String.fromCharCode(s|e>>6-o&255)),s=e<<(o=o+2&7)&255);return i},t.b16to64=function(t){var e,n,i="";for(t.length%2==1&&(t="0"+t),e=0;e+3<=t.length;e+=3)n=parseInt(t.substring(e,e+3),16),i+=r.charAt(n>>6)+r.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),i+=r.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),i+=r.charAt(n>>2)+r.charAt((3&n)<<4));(3&i.length)>0;)i+="=";return i},t.b64to16=function(t){var e,n,i="",o=0;for(e=0;e>2),n=3&v,o=1):1==o?(i+=p(n<<2|v>>4),n=15&v,o=2):2==o?(i+=p(n),i+=p(v>>2),n=3&v,o=3):(i+=p(n<<2|v>>4),i+=p(15&v),o=0));return 1==o&&(i+=p(n<<2)),i},t.string2bytes=function(t){for(var r=new Array,e=0;ei&&(n=i):n=i;var s=r.length;K(s%2===0,"Invalid hex string"),n>s/2&&(n=s/2);for(var a=0;an)&&(e=n);for(var i="",o=r;o=o))return e?(i=t[r],r+1=o))return e?(r+2>>0)):(r+1>>0),i}function b(t,r,e,n){if(n||(K("boolean"===typeof e,"missing or invalid endian"),K(void 0!==r&&null!==r,"missing offset"),K(r+1=t.length)){var i=m(t,r,e,!0);return 32768&i?-1*(65535-i+1):i}}function E(t,r,e,n){if(n||(K("boolean"===typeof e,"missing or invalid endian"),K(void 0!==r&&null!==r,"missing offset"),K(r+3=t.length)){var i=w(t,r,e,!0);return 2147483648&i?-1*(4294967295-i+1):i}}function S(t,r,e,n){return n||(K("boolean"===typeof e,"missing or invalid endian"),K(r+3=o))for(var s=0,a=Math.min(o-e,2);s>>8*(n?s:1-s)}function A(t,r,e,n,i){i||(K(void 0!==r&&null!==r,"missing value"),K("boolean"===typeof n,"missing or invalid endian"),K(void 0!==e&&null!==e,"missing offset"),K(e+3=o))for(var s=0,a=Math.min(o-e,4);s>>8*(n?s:3-s)&255}function T(t,r,e,n,i){i||(K(void 0!==r&&null!==r,"missing value"),K("boolean"===typeof n,"missing or invalid endian"),K(void 0!==e&&null!==e,"missing offset"),K(e+1=t.length||B(t,r>=0?r:65535+r+1,e,n,i)}function I(t,r,e,n,i){i||(K(void 0!==r&&null!==r,"missing value"),K("boolean"===typeof n,"missing or invalid endian"),K(void 0!==e&&null!==e,"missing offset"),K(e+3=t.length||A(t,r>=0?r:4294967295+r+1,e,n,i)}function R(t,r,e,n,o){o||(K(void 0!==r&&null!==r,"missing value"),K("boolean"===typeof n,"missing or invalid endian"),K(void 0!==e&&null!==e,"missing offset"),K(e+3=t.length||i.write(t,r,e,n,23,4)}function D(t,r,e,n,o){o||(K(void 0!==r&&null!==r,"missing value"),K("boolean"===typeof n,"missing or invalid endian"),K(void 0!==e&&null!==e,"missing offset"),K(e+7=t.length||i.write(t,r,e,n,52,8)}function U(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}e.Buffer=o,e.SlowBuffer=o,e.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var t=new ArrayBuffer(0),r=new Uint8Array(t);return r.foo=function(){return 42},42===r.foo()&&"function"===typeof r.subarray}catch(e){return!1}}(),o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.isBuffer=function(t){return!(null===t||void 0===t||!t._isBuffer)},o.byteLength=function(t,r){var e;switch(t+="",r||"utf8"){case"hex":e=t.length/2;break;case"utf8":case"utf-8":e=_(t).length;break;case"ascii":case"binary":case"raw":e=t.length;break;case"base64":e=H(t).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":e=2*t.length;break;default:throw new Error("Unknown encoding")}return e},o.concat=function(t,r){if(K(P(t),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===t.length)return new o(0);if(1===t.length)return t[0];var e;if("number"!==typeof r)for(r=0,e=0;el&&(e=l):e=l,n=String(n||"utf8").toLowerCase()){case"hex":o=s(this,t,r,e);break;case"utf8":case"utf-8":o=a(this,t,r,e);break;case"ascii":o=f(this,t,r,e);break;case"binary":o=u(this,t,r,e);break;case"base64":o=h(this,t,r,e);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":o=c(this,t,r,e);break;default:throw new Error("Unknown encoding")}return o},o.prototype.toString=function(t,r,e){var n,i=this;if(t=String(t||"utf8").toLowerCase(),r=Number(r)||0,(e=void 0!==e?Number(e):e=i.length)===r)return"";switch(t){case"hex":n=g(i,r,e);break;case"utf8":case"utf-8":n=p(i,r,e);break;case"ascii":n=d(i,r,e);break;case"binary":n=y(i,r,e);break;case"base64":n=l(i,r,e);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=v(i,r,e);break;default:throw new Error("Unknown encoding")}return n},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(t,r,e,n){var i=this;if(e||(e=0),n||0===n||(n=this.length),r||(r=0),n!==e&&0!==t.length&&0!==i.length){K(n>=e,"sourceEnd < sourceStart"),K(r>=0&&r=0&&e=0&&n<=i.length,"sourceEnd out of bounds"),n>this.length&&(n=this.length),t.length-r=this.length))return this[t]},o.prototype.readUInt16LE=function(t,r){return m(this,t,!0,r)},o.prototype.readUInt16BE=function(t,r){return m(this,t,!1,r)},o.prototype.readUInt32LE=function(t,r){return w(this,t,!0,r)},o.prototype.readUInt32BE=function(t,r){return w(this,t,!1,r)},o.prototype.readInt8=function(t,r){if(r||(K(void 0!==t&&null!==t,"missing offset"),K(t=this.length))return 128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,r){return b(this,t,!0,r)},o.prototype.readInt16BE=function(t,r){return b(this,t,!1,r)},o.prototype.readInt32LE=function(t,r){return E(this,t,!0,r)},o.prototype.readInt32BE=function(t,r){return E(this,t,!1,r)},o.prototype.readFloatLE=function(t,r){return S(this,t,!0,r)},o.prototype.readFloatBE=function(t,r){return S(this,t,!1,r)},o.prototype.readDoubleLE=function(t,r){return x(this,t,!0,r)},o.prototype.readDoubleBE=function(t,r){return x(this,t,!1,r)},o.prototype.writeUInt8=function(t,r,e){e||(K(void 0!==t&&null!==t,"missing value"),K(void 0!==r&&null!==r,"missing offset"),K(r=this.length||(this[r]=t)},o.prototype.writeUInt16LE=function(t,r,e){B(this,t,r,!0,e)},o.prototype.writeUInt16BE=function(t,r,e){B(this,t,r,!1,e)},o.prototype.writeUInt32LE=function(t,r,e){A(this,t,r,!0,e)},o.prototype.writeUInt32BE=function(t,r,e){A(this,t,r,!1,e)},o.prototype.writeInt8=function(t,r,e){e||(K(void 0!==t&&null!==t,"missing value"),K(void 0!==r&&null!==r,"missing offset"),K(r=this.length||(t>=0?this.writeUInt8(t,r,e):this.writeUInt8(255+t+1,r,e))},o.prototype.writeInt16LE=function(t,r,e){T(this,t,r,!0,e)},o.prototype.writeInt16BE=function(t,r,e){T(this,t,r,!1,e)},o.prototype.writeInt32LE=function(t,r,e){I(this,t,r,!0,e)},o.prototype.writeInt32BE=function(t,r,e){I(this,t,r,!1,e)},o.prototype.writeFloatLE=function(t,r,e){R(this,t,r,!0,e)},o.prototype.writeFloatBE=function(t,r,e){R(this,t,r,!1,e)},o.prototype.writeDoubleLE=function(t,r,e){D(this,t,r,!0,e)},o.prototype.writeDoubleBE=function(t,r,e){D(this,t,r,!1,e)},o.prototype.fill=function(t,r,e){if(t||(t=0),r||(r=0),e||(e=this.length),"string"===typeof t&&(t=t.charCodeAt(0)),K("number"===typeof t&&!isNaN(t),"value is not a number"),K(e>=r,"end < start"),e!==r&&0!==this.length){K(r>=0&&r=0&&e<=this.length,"end out of bounds");for(var n=r;n"},o.prototype.toArrayBuffer=function(){if("undefined"!==typeof Uint8Array){if(o._useTypedArrays)return new o(this).buffer;for(var t=new Uint8Array(this.length),r=0,e=t.length;r=r?r:t>=0||(t+=r)>=0?t:0}function N(t){return(t=~~Math.ceil(+t))<0?0:t}function P(t){return(Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)})(t)}function C(t){return P(t)||o.isBuffer(t)||t&&"object"===typeof t&&"number"===typeof t.length}function M(t){return t<16?"0"+t.toString(16):t.toString(16)}function _(t){for(var r=[],e=0;e=55296&&n<=57343&&e++;for(var o=encodeURIComponent(t.slice(i,e+1)).substr(1).split("%"),s=0;s>8,n=r%256,i.push(n),i.push(e);return i}function H(t){return n.toByteArray(t)}function F(t,r,e,n){for(var i=0;i=r.length||i>=t.length);i++)r[i+e]=t[i];return i}function Z(t){try{return decodeURIComponent(t)}catch(r){return String.fromCharCode(65533)}}function z(t,r){K("number"===typeof t,"cannot write a non-number as a number"),K(t>=0,"specified a negative value for writing an unsigned value"),K(t<=r,"value is larger than maximum value for type"),K(Math.floor(t)===t,"value has a fractional component")}function V(t,r,e){K("number"===typeof t,"cannot write a non-number as a number"),K(t<=r,"value larger than maximum allowed value"),K(t>=e,"value smaller than minimum allowed value"),K(Math.floor(t)===t,"value has a fractional component")}function j(t,r,e){K("number"===typeof t,"cannot write a non-number as a number"),K(t<=r,"value larger than maximum allowed value"),K(t>=e,"value smaller than minimum allowed value")}function K(t,r){if(!t)throw new Error(r||"Failed assertion")}o._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=L.get,t.set=L.set,t.write=L.write,t.toString=L.toString,t.toLocaleString=L.toString,t.toJSON=L.toJSON,t.copy=L.copy,t.slice=L.slice,t.readUInt8=L.readUInt8,t.readUInt16LE=L.readUInt16LE,t.readUInt16BE=L.readUInt16BE,t.readUInt32LE=L.readUInt32LE,t.readUInt32BE=L.readUInt32BE,t.readInt8=L.readInt8,t.readInt16LE=L.readInt16LE,t.readInt16BE=L.readInt16BE,t.readInt32LE=L.readInt32LE,t.readInt32BE=L.readInt32BE,t.readFloatLE=L.readFloatLE,t.readFloatBE=L.readFloatBE,t.readDoubleLE=L.readDoubleLE,t.readDoubleBE=L.readDoubleBE,t.writeUInt8=L.writeUInt8,t.writeUInt16LE=L.writeUInt16LE,t.writeUInt16BE=L.writeUInt16BE,t.writeUInt32LE=L.writeUInt32LE,t.writeUInt32BE=L.writeUInt32BE,t.writeInt8=L.writeInt8,t.writeInt16LE=L.writeInt16LE,t.writeInt16BE=L.writeInt16BE,t.writeInt32LE=L.writeInt32LE,t.writeInt32BE=L.writeInt32BE,t.writeFloatLE=L.writeFloatLE,t.writeFloatBE=L.writeFloatBE,t.writeDoubleLE=L.writeDoubleLE,t.writeDoubleBE=L.writeDoubleBE,t.fill=L.fill,t.inspect=L.inspect,t.toArrayBuffer=L.toArrayBuffer,t}},{"base64-js":3,ieee754:4}],3:[function(t,r,e){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";var r="undefined"!==typeof Uint8Array?Uint8Array:Array,e="+".charCodeAt(0),i="/".charCodeAt(0),o="0".charCodeAt(0),s="a".charCodeAt(0),a="A".charCodeAt(0),f="-".charCodeAt(0),u="_".charCodeAt(0);function h(t){var r=t.charCodeAt(0);return r===e||r===f?62:r===i||r===u?63:r0)throw new Error("Invalid string. Length must be a multiple of 4");var f=t.length;s="="===t.charAt(f-2)?2:"="===t.charAt(f-1)?1:0,a=new r(3*t.length/4-s),i=s>0?t.length-4:t.length;var u=0;function c(t){a[u++]=t}for(e=0,n=0;e>16),c((65280&o)>>8),c(255&o);return 2===s?c(255&(o=h(t.charAt(e))<<2|h(t.charAt(e+1))>>4)):1===s&&(c((o=h(t.charAt(e))<<10|h(t.charAt(e+1))<<4|h(t.charAt(e+2))>>2)>>8&255),c(255&o)),a}function l(t){var r,e,i,o=t.length%3,s="";function a(t){return n.charAt(t)}function f(t){return a(t>>18&63)+a(t>>12&63)+a(t>>6&63)+a(63&t)}for(r=0,i=t.length-o;r>2),s+=a(e<<4&63),s+="==";break;case 2:s+=a((e=(t[t.length-2]<<8)+t[t.length-1])>>10),s+=a(e>>4&63),s+=a(e<<2&63),s+="="}return s}t.toByteArray=c,t.fromByteArray=l}("undefined"===typeof e?this.base64js={}:e)},{}],4:[function(t,r,e){e.read=function(t,r,e,n,i){var o,s,a=8*i-n-1,f=(1<>1,h=-7,c=e?i-1:0,l=e?-1:1,p=t[r+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[r+c],c+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[r+c],c+=l,h-=8);if(0===o)o=1-u;else{if(o===f)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,r,e,n,i,o){var s,a,f,u=8*o-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,s=h):(s=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-s))<1&&(s--,f*=2),(r+=s+c>=1?l/f:l*Math.pow(2,1-c))*f>=2&&(s++,f/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(r*f-1)*Math.pow(2,i),s+=c):(a=r*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[e+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[e+p]=255&s,p+=d,s/=256,u-=8);t[e+p-d]|=128*y}},{}],5:[function(t,r,e){var n=t("buffer").Buffer,i=4,o=new n(i);o.fill(0);var s=8;function a(t,r){if(t.length%i!==0){var e=t.length+(i-t.length%i);t=n.concat([t,o],e)}for(var s=[],a=r?t.readInt32BE:t.readInt32LE,f=0;ff?r=t(r):r.length>5]|=128<>>9<<4)]=r;for(var e=1732584193,n=-271733879,i=-1732584194,o=271733878,c=0;c>16)+(r>>16)+(e>>16)<<16|65535&e}function c(t,r){return t<>>32-r}r.exports=function(t){return n.hash(t,i,16)}},{"./helpers":5}],8:[function(t,r,e){!function(){var t,e;t=function(t){for(var r,e=new Array(t),n=0;n>>((3&n)<<3)&255;return e},this.crypto&&crypto.getRandomValues&&(e=function(t){var r=new Uint8Array(t);return crypto.getRandomValues(r),r}),r.exports=e||t}()},{}],9:[function(t,r,e){var n=t("./helpers");function i(t,r){t[r>>5]|=128<<24-r%32,t[15+(r+64>>9<<4)]=r;for(var e=Array(80),n=1732584193,i=-271733879,u=-1732584194,h=271733878,c=-1009589776,l=0;l>16)+(r>>16)+(e>>16)<<16|65535&e}function f(t,r){return t<>>32-r}r.exports=function(t){return n.hash(t,i,20,!0)}},{"./helpers":5}],10:[function(t,r,e){var n=t("./helpers"),i=function(t,r){var e=(65535&t)+(65535&r);return(t>>16)+(r>>16)+(e>>16)<<16|65535&e},o=function(t,r){return t>>>r|t<<32-r},s=function(t,r){return t>>>r},a=function(t,r,e){return t&r^~t&e},f=function(t,r,e){return t&r^t&e^r&e},u=function(t){return o(t,2)^o(t,13)^o(t,22)},h=function(t){return o(t,6)^o(t,11)^o(t,25)},c=function(t){return o(t,7)^o(t,18)^s(t,3)},l=function(t){return o(t,17)^o(t,19)^s(t,10)},p=function(t,r){var e,n,o,s,p,d,y,g,v,m,w=new Array(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),b=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),E=new Array(64);t[r>>5]|=128<<24-r%32,t[15+(r+64>>9<<4)]=r;for(var S=0;S=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var f=n.call(s,"catchLoc"),u=n.call(s,"finallyLoc");if(f&&u){if(this.prev=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),d}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var i=n.arg;T(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:R(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),d}},t}(t.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},27760:function(t,r,e){"use strict";var n,i=e(95856);const o=BigInt(0),s=BigInt(1),a=BigInt(2),f=BigInt(3),u=BigInt(8),h=Object.freeze({a:o,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:s,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")}),c=(t,r)=>(t+r/a)/r,l={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(t){const{n:r}=h,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-s*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=e,a=BigInt("0x100000000000000000000000000000000"),f=c(o*t,r),u=c(-n*t,r);let l=k(t-f*e-u*i,r),p=k(-f*n-u*o,r);const d=l>a,y=p>a;if(d&&(l=r-l),y&&(p=r-p),l>a||p>a)throw new Error("splitScalarEndo: Endomorphism failed, k="+t);return{k1neg:d,k1:l,k2neg:y,k2:p}}},p=32,d=32;function y(t){const{a:r,b:e}=h,n=k(t*t),i=k(n*t);return k(i+r*t+e)}const g=h.a===o;class v extends Error{constructor(t){super(t)}}function m(t){if(!(t instanceof w))throw new TypeError("JacobianPoint expected")}class w{constructor(t,r,e){this.x=t,this.y=r,this.z=e}static fromAffine(t){if(!(t instanceof S))throw new TypeError("JacobianPoint#fromAffine: expected Point");return t.equals(S.ZERO)?w.ZERO:new w(t.x,t.y,s)}static toAffineBatch(t){const r=function(t,r=h.P){const e=new Array(t.length),n=H(t.reduce(((t,n,i)=>n===o?t:(e[i]=t,k(t*n,r))),s),r);return t.reduceRight(((t,n,i)=>n===o?t:(e[i]=k(t*e[i],r),k(t*n,r))),n),e}(t.map((t=>t.z)));return t.map(((t,e)=>t.toAffine(r[e])))}static normalizeZ(t){return w.toAffineBatch(t).map(w.fromAffine)}equals(t){m(t);const{x:r,y:e,z:n}=this,{x:i,y:o,z:s}=t,a=k(n*n),f=k(s*s),u=k(r*f),h=k(i*a),c=k(k(e*s)*f),l=k(k(o*n)*a);return u===h&&c===l}negate(){return new w(this.x,k(-this.y),this.z)}double(){const{x:t,y:r,z:e}=this,n=k(t*t),i=k(r*r),o=k(i*i),s=t+i,h=k(a*(k(s*s)-n-o)),c=k(f*n),l=k(c*c),p=k(l-a*h),d=k(c*(h-p)-u*o),y=k(a*r*e);return new w(p,d,y)}add(t){m(t);const{x:r,y:e,z:n}=this,{x:i,y:s,z:f}=t;if(i===o||s===o)return this;if(r===o||e===o)return t;const u=k(n*n),h=k(f*f),c=k(r*h),l=k(i*u),p=k(k(e*f)*h),d=k(k(s*n)*u),y=k(l-c),g=k(d-p);if(y===o)return g===o?this.double():w.ZERO;const v=k(y*y),b=k(y*v),E=k(c*v),S=k(g*g-b-a*E),x=k(g*(E-S)-p*b),B=k(n*f*y);return new w(S,x,B)}subtract(t){return this.add(t.negate())}multiplyUnsafe(t){const r=w.ZERO;if("bigint"===typeof t&&t===o)return r;let e=_(t);if(e===s)return this;if(!g){let t=r,n=this;for(;e>o;)e&s&&(t=t.add(n)),n=n.double(),e>>=s;return t}let{k1neg:n,k1:i,k2neg:a,k2:f}=l.splitScalar(e),u=r,h=r,c=this;for(;i>o||f>o;)i&s&&(u=u.add(c)),f&s&&(h=h.add(c)),c=c.double(),i>>=s,f>>=s;return n&&(u=u.negate()),a&&(h=h.negate()),h=new w(k(h.x*l.beta),h.y,h.z),u.add(h)}precomputeWindow(t){const r=g?128/t+1:256/t+1,e=[];let n=this,i=n;for(let o=0;o>=c,e>f&&(e-=h,t+=s);const a=r,p=r+Math.abs(e)-1,d=l%2!==0,y=e<0;0===e?o=o.add(b(d,n[a])):i=i.add(b(y,n[p]))}return{p:i,f:o}}multiply(t,r){let e,n,i=_(t);if(g){const{k1neg:t,k1:o,k2neg:s,k2:a}=l.splitScalar(i);let{p:f,f:u}=this.wNAF(o,r),{p:h,f:c}=this.wNAF(a,r);f=b(t,f),h=b(s,h),h=new w(k(h.x*l.beta),h.y,h.z),e=f.add(h),n=u.add(c)}else{const{p:t,f:o}=this.wNAF(i,r);e=t,n=o}return w.normalizeZ([e,n])[0]}toAffine(t){const{x:r,y:e,z:n}=this,i=this.equals(w.ZERO);null==t&&(t=i?u:H(n));const o=t,a=k(o*o),f=k(a*o),h=k(r*a),c=k(e*f),l=k(n*o);if(i)return S.ZERO;if(l!==s)throw new Error("invZ was invalid");return new S(h,c)}}function b(t,r){const e=r.negate();return t?e:r}w.BASE=new w(h.Gx,h.Gy,s),w.ZERO=new w(o,s,o);const E=new WeakMap;class S{constructor(t,r){this.x=t,this.y=r}_setWindowSize(t){this._WINDOW_SIZE=t,E.delete(this)}hasEvenY(){return this.y%a===o}static fromCompressedHex(t){const r=32===t.length,e=C(r?t:t.subarray(1));if(!j(e))throw new Error("Point is not on curve");let n=function(t){const{P:r}=h,e=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),s=BigInt(44),u=BigInt(88),c=t*t*t%r,l=c*c*t%r,p=q(l,f)*l%r,d=q(p,f)*l%r,y=q(d,a)*c%r,g=q(y,n)*y%r,v=q(g,i)*g%r,m=q(v,s)*v%r,w=q(m,u)*m%r,b=q(w,s)*v%r,E=q(b,f)*l%r,S=q(E,o)*g%r,x=q(S,e)*c%r,B=q(x,a);if(B*B%r!==t)throw new Error("Cannot find square root");return B}(y(e));const i=(n&s)===s;if(r)i&&(n=k(-n));else{1===(1&t[0])!==i&&(n=k(-n))}const o=new S(e,n);return o.assertValidity(),o}static fromUncompressedHex(t){const r=C(t.subarray(1,33)),e=C(t.subarray(33,65)),n=new S(r,e);return n.assertValidity(),n}static fromHex(t){const r=M(t),e=r.length,n=r[0];if(e===p)return this.fromCompressedHex(r);if(33===e&&(2===n||3===n))return this.fromCompressedHex(r);if(65===e&&4===n)return this.fromUncompressedHex(r);throw new Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${e}`)}static fromPrivateKey(t){return S.BASE.multiply(K(t))}static fromSignature(t,r,e){const{r:n,s:i}=W(r);if(![0,1,2,3].includes(e))throw new Error("Cannot recover: invalid recovery bit");const o=F(M(t)),{n:s}=h,a=2===e||3===e?n+s:n,f=H(a,s),u=k(-o*f,s),c=k(i*f,s),l=1&e?"03":"02",p=S.fromHex(l+U(a)),d=S.BASE.multiplyAndAddUnsafe(p,u,c);if(!d)throw new Error("Cannot recover signature: point at infinify");return d.assertValidity(),d}toRawBytes(t=!1){return P(this.toHex(t))}toHex(t=!1){const r=U(this.x);if(t){return`${this.hasEvenY()?"02":"03"}${r}`}return`04${r}${U(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const t="Point is not on elliptic curve",{x:r,y:e}=this;if(!j(r)||!j(e))throw new Error(t);const n=k(e*e);if(k(n-y(r))!==o)throw new Error(t)}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new S(this.x,k(-this.y))}double(){return w.fromAffine(this).double().toAffine()}add(t){return w.fromAffine(this).add(w.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return w.fromAffine(this).multiply(t,this).toAffine()}multiplyAndAddUnsafe(t,r,e){const n=w.fromAffine(this),i=r===o||r===s||this!==S.BASE?n.multiplyUnsafe(r):n.multiply(r),a=w.fromAffine(t).multiplyUnsafe(e),f=i.add(a);return f.equals(w.ZERO)?void 0:f.toAffine()}}function x(t){return Number.parseInt(t[0],16)>=8?"00"+t:t}function B(t){if(t.length<2||2!==t[0])throw new Error(`Invalid signature integer tag: ${R(t)}`);const r=t[1],e=t.subarray(2,r+2);if(!r||e.length!==r)throw new Error("Invalid signature integer: wrong length");if(0===e[0]&&e[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:C(e),left:t.subarray(r+2)}}S.BASE=new S(h.Gx,h.Gy),S.ZERO=new S(o,o);class A{constructor(t,r){this.r=t,this.s=r,this.assertValidity()}static fromCompact(t){const r=t instanceof Uint8Array,e="Signature.fromCompact";if("string"!==typeof t&&!r)throw new TypeError(`${e}: Expected string or Uint8Array`);const n=r?R(t):t;if(128!==n.length)throw new Error(`${e}: Expected 64-byte hex`);return new A(N(n.slice(0,64)),N(n.slice(64,128)))}static fromDER(t){const r=t instanceof Uint8Array;if("string"!==typeof t&&!r)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:e,s:n}=function(t){if(t.length<2||48!=t[0])throw new Error(`Invalid signature tag: ${R(t)}`);if(t[1]!==t.length-2)throw new Error("Invalid signature: incorrect length");const{data:r,left:e}=B(t.subarray(2)),{data:n,left:i}=B(e);if(i.length)throw new Error(`Invalid signature: left bytes after parsing: ${R(i)}`);return{r:r,s:n}}(r?t:P(t));return new A(e,n)}static fromHex(t){return this.fromDER(t)}assertValidity(){const{r:t,s:r}=this;if(!V(t))throw new Error("Invalid Signature: r must be 0 < r < n");if(!V(r))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const t=h.n>>s;return this.s>t}normalizeS(){return this.hasHighS()?new A(this.r,k(-this.s,h.n)):this}toDERRawBytes(){return P(this.toDERHex())}toDERHex(){const t=x(O(this.s)),r=x(O(this.r)),e=t.length/2,n=r.length/2,i=O(e),o=O(n);return`30${O(n+e+4)}02${o}${r}02${i}${t}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return P(this.toCompactHex())}toCompactHex(){return U(this.r)+U(this.s)}}function T(...t){if(!t.every((t=>t instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===t.length)return t[0];const r=t.reduce(((t,r)=>t+r.length),0),e=new Uint8Array(r);for(let n=0,i=0;nr.toString(16).padStart(2,"0")));function R(t){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");let r="";for(let e=0;e0)return BigInt(t);if("bigint"===typeof t&&V(t))return t;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function k(t,r=h.P){const e=t%r;return e>=o?e:r+e}function q(t,r){const{P:e}=h;let n=t;for(;r-- >o;)n*=n,n%=e;return n}function H(t,r=h.P){if(t===o||r<=o)throw new Error(`invert: expected positive integers, got n=${t} mod=${r}`);let e=k(t,r),n=r,i=o,a=s,f=s,u=o;for(;e!==o;){const t=n/e,r=n%e,o=i-f*t,s=a-u*t;n=e,e=r,i=f,a=u,f=o,u=s}if(n!==s)throw new Error("invert: does not exist");return k(i,r)}function F(t,r=!1){const e=function(t){const r=8*t.length-256,e=C(t);return r>0?e>>BigInt(r):e}(t);if(r)return e;const{n:n}=h;return e>=n?e-n:e}let Z,z;function V(t){return o0)r=BigInt(t);else if("string"===typeof t){if(64!==t.length)throw new Error("Expected 32 bytes of private key");r=N(t)}else{if(!(t instanceof Uint8Array))throw new TypeError("Expected valid private key");if(t.length!==d)throw new Error("Expected 32 bytes of private key");r=C(t)}if(!V(r))throw new Error("Expected private key: 0 < key < n");return r}function W(t){if(t instanceof A)return t.assertValidity(),t;try{return A.fromDER(t)}catch(r){return A.fromCompact(t)}}S.BASE._setWindowSize(8);const G={node:n||(n=e.t(i,2)),web:"object"===typeof self&&"crypto"in self?self.crypto:void 0},$={},J={bytesToHex:R,hexToBytes:P,concatBytes:T,mod:k,invert:H,isValidPrivateKey(t){try{return K(t),!0}catch(r){return!1}},_bigintTo32Bytes:L,_normalizePrivateKey:K,hashToPrivateKey:t=>{if((t=M(t)).length<40||t.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");return L(k(C(t),h.n-s)+s)},randomBytes:(t=32)=>{if(G.web)return G.web.getRandomValues(new Uint8Array(t));if(G.node){const{randomBytes:r}=G.node;return Uint8Array.from(r(t))}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>J.hashToPrivateKey(J.randomBytes(40)),precompute(t=8,r=S.BASE){const e=r===S.BASE?r:new S(r.x,r.y);return e._setWindowSize(t),e.multiply(f),e},sha256:async(...t)=>{if(G.web){const r=await G.web.subtle.digest("SHA-256",T(...t));return new Uint8Array(r)}if(G.node){const{createHash:r}=G.node,e=r("sha256");return t.forEach((t=>e.update(t))),Uint8Array.from(e.digest())}throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(t,...r)=>{if(G.web){const e=await G.web.subtle.importKey("raw",t,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=T(...r),i=await G.web.subtle.sign("HMAC",e,n);return new Uint8Array(i)}if(G.node){const{createHmac:e}=G.node,n=e("sha256",t);return r.forEach((t=>n.update(t))),Uint8Array.from(n.digest())}throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(t,...r)=>{let e=$[t];if(void 0===e){const r=await J.sha256(Uint8Array.from(t,(t=>t.charCodeAt(0))));e=T(r,r),$[t]=e}return J.sha256(e,...r)},taggedHashSync:(t,...r)=>{if("function"!==typeof Z)throw new v("sha256Sync is undefined, you need to set it");let e=$[t];if(void 0===e){const r=Z(Uint8Array.from(t,(t=>t.charCodeAt(0))));e=T(r,r),$[t]=e}return Z(e,...r)},_JacobianPoint:w};Object.defineProperties(J,{sha256Sync:{configurable:!1,get:()=>Z,set(t){Z||(Z=t)}},hmacSha256Sync:{configurable:!1,get:()=>z,set(t){z||(z=t)}}})},35689:function(t,r,e){"use strict";var n,i=e(33397);const o=BigInt(0),s=BigInt(1),a=BigInt(2),f=BigInt(8),u=BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h=Object.freeze({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),l:u,n:u,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")}),c=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),l=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),p=(BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742"),BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235")),d=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),y=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),g=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952");class v{constructor(t,r,e,n){this.x=t,this.y=r,this.z=e,this.t=n}static fromAffine(t){if(!(t instanceof B))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return t.equals(B.ZERO)?v.ZERO:new v(t.x,t.y,s,C(t.x*t.y))}static toAffineBatch(t){const r=function(t,r=h.P){const e=new Array(t.length),n=M(t.reduce(((t,n,i)=>n===o?t:(e[i]=t,C(t*n,r))),s),r);return t.reduceRight(((t,n,i)=>n===o?t:(e[i]=C(t*e[i],r),C(t*n,r))),n),e}(t.map((t=>t.z)));return t.map(((t,e)=>t.toAffine(r[e])))}static normalizeZ(t){return this.toAffineBatch(t).map(this.fromAffine)}equals(t){w(t);const{x:r,y:e,z:n}=this,{x:i,y:o,z:s}=t,a=C(r*s),f=C(i*n),u=C(e*s),h=C(o*n);return a===f&&u===h}negate(){return new v(C(-this.x),this.y,this.z,C(-this.t))}double(){const{x:t,y:r,z:e}=this,{a:n}=h,i=C(t*t),o=C(r*r),s=C(a*C(e*e)),f=C(n*i),u=t+r,c=C(C(u*u)-i-o),l=f+o,p=l-s,d=f-o,y=C(c*p),g=C(l*d),m=C(c*d),w=C(p*l);return new v(y,g,w,m)}add(t){w(t);const{x:r,y:e,z:n,t:i}=this,{x:s,y:f,z:u,t:h}=t,c=C((e-r)*(f+s)),l=C((e+r)*(f-s)),p=C(l-c);if(p===o)return this.double();const d=C(n*a*h),y=C(i*a*u),g=y+d,m=l+c,b=y-d,E=C(g*p),S=C(m*b),x=C(g*b),B=C(p*m);return new v(E,S,B,x)}subtract(t){return this.add(t.negate())}precomputeWindow(t){const r=1+256/t,e=[];let n=this,i=n;for(let o=0;o>=c,e>f&&(e-=h,t+=s);const a=r,p=r+Math.abs(e)-1,d=l%2!==0,y=e<0;0===e?o=o.add(m(d,n[a])):i=i.add(m(y,n[p]))}return v.normalizeZ([i,o])[0]}multiply(t,r){return this.wNAF(z(t,h.l),r)}multiplyUnsafe(t){let r=z(t,h.l,!1);const e=v.BASE,n=v.ZERO;if(r===o)return n;if(this.equals(n)||r===s)return this;if(this.equals(e))return this.wNAF(r);let i=n,a=this;for(;r>o;)r&s&&(i=i.add(a)),a=a.double(),r>>=s;return i}isSmallOrder(){return this.multiplyUnsafe(h.h).equals(v.ZERO)}isTorsionFree(){let t=this.multiplyUnsafe(h.l/a).double();return h.l%a&&(t=t.add(this)),t.equals(v.ZERO)}toAffine(t){const{x:r,y:e,z:n}=this,i=this.equals(v.ZERO);null==t&&(t=i?f:M(n));const o=C(r*t),a=C(e*t),u=C(n*t);if(i)return B.ZERO;if(u!==s)throw new Error("invZ was invalid");return new B(o,a)}fromRistrettoBytes(){E()}toRistrettoBytes(){E()}fromRistrettoHash(){E()}}function m(t,r){const e=r.negate();return t?e:r}function w(t){if(!(t instanceof v))throw new TypeError("ExtendedPoint expected")}function b(t){if(!(t instanceof S))throw new TypeError("RistrettoPoint expected")}function E(){throw new Error("Legacy method: switch to RistrettoPoint")}v.BASE=new v(h.Gx,h.Gy,s,C(h.Gx*h.Gy)),v.ZERO=new v(o,s,s,o);class S{constructor(t){this.ep=t}static calcElligatorRistrettoMap(t){const{d:r}=h,e=C(l*t*t),n=C((e+s)*y);let i=BigInt(-1);const o=C((i-r*e)*C(e+r));let{isValid:a,value:f}=q(n,o),u=C(f*t);L(u)||(u=C(-u)),a||(f=u),a||(i=e);const c=C(i*(e-s)*g-o),d=f*f,m=C((f+f)*o),w=C(c*p),b=C(s-d),E=C(s+d);return new v(C(m*E),C(b*w),C(w*E),C(m*b))}static hashToCurve(t){const r=P((t=Z(t,64)).slice(0,32)),e=this.calcElligatorRistrettoMap(r),n=P(t.slice(32,64)),i=this.calcElligatorRistrettoMap(n);return new S(e.add(i))}static fromHex(t){t=Z(t,32);const{a:r,d:e}=h,n="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",i=P(t);if(!function(t,r){if(t.length!==r.length)return!1;for(let e=0;e=n)throw new Error("Expected 0 < hex < P");if(!r&&o>=c)throw new Error("Expected 0 < hex < 2**256");const a=C(o*o),f=C(a-s),u=C(e*a+s);let{isValid:l,value:p}=q(f,u);if(!l)throw new Error("Point.fromHex: invalid y coordinate");const d=(p&s)===s;return 0!==(128&t[31])!==d&&(p=C(-p)),new B(p,o)}static async fromPrivateKey(t){return(await G(t)).point}toRawBytes(){const t=U(this.y);return t[31]|=this.x&s?128:0,t}toHex(){return I(this.toRawBytes())}toX25519(){const{y:t}=this;return U(C((s+t)*M(s-t)))}isTorsionFree(){return v.fromAffine(this).isTorsionFree()}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new B(C(-this.x),this.y)}add(t){return v.fromAffine(this).add(v.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return v.fromAffine(this).multiply(t,this).toAffine()}}B.BASE=new B(h.Gx,h.Gy),B.ZERO=new B(o,s);function A(...t){if(!t.every((t=>t instanceof Uint8Array)))throw new Error("Expected Uint8Array list");if(1===t.length)return t[0];const r=t.reduce(((t,r)=>t+r.length),0),e=new Uint8Array(r);for(let n=0,i=0;nr.toString(16).padStart(2,"0")));function I(t){if(!(t instanceof Uint8Array))throw new Error("Uint8Array expected");let r="";for(let e=0;e=o?e:r+e}function M(t,r=h.P){if(t===o||r<=o)throw new Error(`invert: expected positive integers, got n=${t} mod=${r}`);let e=C(t,r),n=r,i=o,a=s,f=s,u=o;for(;e!==o;){const t=n/e,r=n%e,o=i-f*t,s=a-u*t;n=e,e=r,i=f,a=u,f=o,u=s}if(n!==s)throw new Error("invert: does not exist");return C(i,r)}function _(t,r){const{P:e}=h;let n=t;for(;r-- >o;)n*=n,n%=e;return n}function k(t){const{P:r}=h,e=BigInt(5),n=BigInt(10),i=BigInt(20),o=BigInt(40),f=BigInt(80),u=t*t%r*t%r,c=_(u,a)*u%r,l=_(c,s)*t%r,p=_(l,e)*l%r,d=_(p,n)*p%r,y=_(d,i)*d%r,g=_(y,o)*y%r,v=_(g,f)*g%r,m=_(v,f)*g%r,w=_(m,n)*p%r;return{pow_p_5_8:_(w,a)*t%r,b2:u}}function q(t,r){const e=C(r*r*r),n=C(e*e*r);let i=C(t*e*k(t*n).pow_p_5_8);const o=C(r*i*i),s=i,a=C(i*l),f=o===t,u=o===C(-t),h=o===C(-t*l);return f&&(i=s),(u||h)&&(i=a),L(i)&&(i=C(-i)),{isValid:f||u,value:i}}function H(t){return q(s,t)}function F(t){return C(O(t),h.l)}function Z(t,r){const e=t instanceof Uint8Array?Uint8Array.from(t):R(t);if("number"===typeof r&&e.length!==r)throw new Error(`Expected ${r} bytes`);return e}function z(t,r,e=!0){if(!r)throw new TypeError("Specify max value");if("number"===typeof t&&Number.isSafeInteger(t)&&(t=BigInt(t)),"bigint"===typeof t&&t{if((t=Z(t)).length<40||t.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return C(O(t),h.l-s)+s},randomBytes:(t=32)=>{if($.web)return $.web.getRandomValues(new Uint8Array(t));if($.node){const{randomBytes:r}=$.node;return new Uint8Array(r(t).buffer)}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>J.randomBytes(32),sha512:async(...t)=>{const r=A(...t);if($.web){const t=await $.web.subtle.digest("SHA-512",r.buffer);return new Uint8Array(t)}if($.node)return Uint8Array.from($.node.createHash("sha512").update(r).digest());throw new Error("The environment doesn't have sha512 function")},precompute(t=8,r=B.BASE){const e=r.equals(B.BASE)?r:new B(r.x,r.y);return e._setWindowSize(t),e.multiply(a),e},sha512Sync:void 0};Object.defineProperties(J,{sha512Sync:{configurable:!1,get:()=>W,set(t){W||(W=t)}}})}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/6724-b954bf9a27972ff7.js b/out/_next/static/chunks/6724-b954bf9a27972ff7.js new file mode 100644 index 00000000..427f2f44 --- /dev/null +++ b/out/_next/static/chunks/6724-b954bf9a27972ff7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6724],{93527:function(t,e,n){function s(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function r(t,...e){if(!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new TypeError(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}const i={number:s,bool:function(t){if("boolean"!==typeof t)throw new Error(`Expected boolean, not ${t}`)},bytes:r,hash:function(t){if("function"!==typeof t||"function"!==typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");s(t.outputLen),s(t.blockLen)},exists:function(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")},output:function(t,e){r(t);const n=e.outputLen;if(t.lengthi?t.create().update(n).digest():n);for(let s=0;snew i(t,e).update(n).digest();o.create=(t,e)=>new i(t,e);const h=new Uint8Array([0]),u=new Uint8Array;const c=(t,e,n,i,c)=>function(t,e,n,r=32){if(s.ZP.hash(t),s.ZP.number(r),r>255*t.outputLen)throw new Error("Length should be <= 255*HashLen");const i=Math.ceil(r/t.outputLen);void 0===n&&(n=u);const c=new Uint8Array(i*t.outputLen),a=o.create(t,e),f=a._cloneInto(),l=new Uint8Array(a.outputLen);for(let s=0;si-h&&(this.process(n,0),h=0);for(let s=h;s>r&i),h=Number(n&i),u=s?4:0,c=s?0:4;t.setUint32(e+u,o,s),t.setUint32(e+c,h,s)}(n,i-8,BigInt(8*this.length),o),this.process(n,0);const u=(0,r.GL)(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const a=c/4,f=this.get();if(a>f.length)throw new Error("_sha2: outputLen bigger than state");for(let s=0;st&e^t&n^e&n,h=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]),u=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class a extends i{constructor(){super(64,32,8,!1),this.A=0|u[0],this.B=0|u[1],this.C=0|u[2],this.D=0|u[3],this.E=0|u[4],this.F=0|u[5],this.G=0|u[6],this.H=0|u[7]}get(){const{A:t,B:e,C:n,D:s,E:r,F:i,G:o,H:h}=this;return[t,e,n,s,r,i,o,h]}set(t,e,n,s,r,i,o,h){this.A=0|t,this.B=0|e,this.C=0|n,this.D=0|s,this.E=0|r,this.F=0|i,this.G=0|o,this.H=0|h}process(t,e){for(let r=0;r<16;r++,e+=4)c[r]=t.getUint32(e,!1);for(let o=16;o<64;o++){const t=c[o-15],e=c[o-2],n=(0,r.np)(t,7)^(0,r.np)(t,18)^t>>>3,s=(0,r.np)(e,17)^(0,r.np)(e,19)^e>>>10;c[o]=s+c[o-7]+n+c[o-16]|0}let{A:n,B:s,C:i,D:u,E:a,F:f,G:l,H:d}=this;for(let y=0;y<64;y++){const t=d+((0,r.np)(a,6)^(0,r.np)(a,11)^(0,r.np)(a,25))+((p=a)&f^~p&l)+h[y]+c[y]|0,e=((0,r.np)(n,2)^(0,r.np)(n,13)^(0,r.np)(n,22))+o(n,s,i)|0;d=l,l=f,f=a,a=u+t|0,u=i,i=s,s=n,n=t+e|0}var p;n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,u=u+this.D|0,a=a+this.E|0,f=f+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(n,s,i,u,a,f,l,d)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class f extends a{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const l=(0,r.hE)((()=>new a));(0,r.hE)((()=>new f))},93811:function(t,e,n){n.d(e,{kb:function(){return o},GL:function(){return s},np:function(){return r},O0:function(){return i},hE:function(){return h}});"object"===typeof self&&"crypto"in self&&self.crypto;const s=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),r=(t,e)=>t<<32-e|t>>>e;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function i(t){if("string"===typeof t&&(t=function(t){if("string"!==typeof t)throw new TypeError("utf8ToBytes expected string, got "+typeof t);return(new TextEncoder).encode(t)}(t)),!(t instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof t})`);return t}class o{clone(){return this._cloneInto()}}function h(t){const e=e=>t().update(i(e)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}},24978:function(t,e,n){n.d(e,{UG:function(){return P}});const s=2n**255n-19n,r=2n**252n+27742317777372353535851937790883648493n,i=0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51an,o=0x6666666666666666666666666666666666666666666666666666666666666658n,h={a:-1n,d:37095705934669439343138083508754565189542113879843219016388785533085940283555n,p:s,n:r,h:8,Gx:i,Gy:o},u=(t="")=>{throw new Error(t)},c=t=>"string"===typeof t,a=(t,e)=>!(t instanceof Uint8Array)||"number"===typeof e&&e>0&&t.length!==e?u("Uint8Array expected"):t,f=t=>new Uint8Array(t),l=(t,e)=>a(c(t)?E(t):f(t),e),d=(t,e=s)=>{let n=t%e;return n>=0n?n:e+n},p=t=>t instanceof b?t:u("Point expected");let y;class b{constructor(t,e,n,s){this.ex=t,this.ey=e,this.ez=n,this.et=s}static fromAffine(t){return new b(t.x,t.y,1n,d(t.x*t.y))}static fromHex(t,e=!0){const{d:n}=h,r=(t=l(t,32)).slice();r[31]=-129&t[31];const i=H(r);0n===i||(!e||0n0n;r=r.double(),t>>=1n)1n&t?n=n.add(r):e&&(s=s.add(r));return n}multiply(t){return this.mul(t)}clearCofactor(){return this.mul(BigInt(h.h),!1)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){let t=this.mul(r/2n,!1).double();return r%2n&&(t=t.add(this)),t.is0()}toAffine(){const{ex:t,ey:e,ez:n}=this;if(this.is0())return{x:0n,y:0n};const s=v(n);return 1n!==d(n*s)&&u("invalid inverse"),{x:d(t*s),y:d(e*s)}}toRawBytes(){const{x:t,y:e}=this.toAffine(),n=A(e);return n[31]|=1n&t?128:0,n}toHex(){return L(this.toRawBytes())}}b.BASE=new b(i,o,1n,d(i*o)),b.ZERO=new b(0n,1n,1n,0n);const{BASE:g,ZERO:w}=b,x=(t,e)=>t.toString(16).padStart(e,"0"),L=t=>Array.from(t).map((t=>x(t,2))).join(""),E=t=>{const e=t.length;(!c(t)||e%2)&&u("hex invalid 1");const n=f(e/2);for(let s=0;sE(x(t,64)).reverse(),H=t=>BigInt("0x"+L(f(a(t)).reverse())),m=(...t)=>{const e=f(t.reduce(((t,e)=>t+a(e).length),0));let n=0;return t.forEach((t=>{e.set(t,n),n+=t.length})),e},v=(t,e=s)=>{(0n===t||e<=0n)&&u("no inverse n="+t+" mod="+e);let n=d(t,e),r=e,i=0n,o=1n,h=1n,c=0n;for(;0n!==n;){const t=r/n,e=r%n,s=i-h*t,u=o-c*t;r=n,n=e,i=h,o=c,h=s,c=u}return 1n===r?d(i,e):u("no inverse")},U=(t,e)=>{let n=t;for(;e-- >0n;)n*=n,n%=s;return n},I=19681161376707505956807079304988542015446066515923890162744021073123829784752n,B=(t,e)=>{const n=d(e*e*e),r=(t=>{const e=t*t%s*t%s,n=U(e,2n)*e%s,r=U(n,1n)*t%s,i=U(r,5n)*r%s,o=U(i,10n)*i%s,h=U(o,20n)*o%s,u=U(h,40n)*h%s,c=U(u,80n)*u%s,a=U(c,80n)*u%s,f=U(a,10n)*i%s;return{pow_p_5_8:U(f,2n)*t%s,b2:e}})(t*d(n*n*e)).pow_p_5_8;let i=d(t*n*r);const o=d(e*i*i),h=i,u=d(i*I),c=o===t,a=o===d(-t),f=o===d(-t*I);return c&&(i=h),(a||f)&&(i=u),1n===(1n&d(i))&&(i=d(-i)),{isValid:c||a,value:i}};let k;const _=()=>"object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,P={bytesToHex:L,hexToBytes:E,concatBytes:m,mod:d,invert:v,randomBytes:t=>{const e=_();return e||u("crypto.getRandomValues must be defined"),e.getRandomValues(f(t))},sha512Async:async(...t)=>{const e=_();e||u("crypto.subtle or etc.sha512Async must be defined");const n=m(...t);return f(await e.subtle.digest("SHA-512",n.buffer))},sha512Sync:void 0};Object.defineProperties(P,{sha512Sync:{configurable:!1,get:()=>k,set(t){k||(k=t)}}});const O=t=>{const e=y||(y=(()=>{const t=[];let e=g,n=e;for(let s=0;s<33;s++){n=e,t.push(n);for(let s=1;s<128;s++)n=n.add(e),t.push(n);e=n.double()}return t})()),n=(t,e)=>{let n=e.negate();return t?n:e};let s=w,r=g;const i=BigInt(255),o=BigInt(8);for(let h=0;h<33;h++){const u=128*h;let c=Number(t&i);t>>=o,c>128&&(c-=256,t+=1n);const a=u,f=u+Math.abs(c)-1,l=h%2!==0,d=c<0;0===c?r=r.add(n(l,e[a])):s=s.add(n(d,e[f]))}return{p:s,f:r}}},50029:function(t,e,n){function s(t,e,n,s,r,i,o){try{var h=t[i](o),u=h.value}catch(c){return void n(c)}h.done?e(u):Promise.resolve(u).then(s,r)}function r(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function h(t){s(o,r,i,h,u,"next",t)}function u(t){s(o,r,i,h,u,"throw",t)}h(void 0)}))}}n.d(e,{Z:function(){return r}})}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/main-235b4afd80b524a5.js b/out/_next/static/chunks/main-235b4afd80b524a5.js index 0ee9632d..9e434c41 100644 --- a/out/_next/static/chunks/main-235b4afd80b524a5.js +++ b/out/_next/static/chunks/main-235b4afd80b524a5.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[179],{13143:function(){"use strict";try{self["workbox:window:6.5.4"]&&_()}catch(e){}function e(e,t){return new Promise((function(r){var n=new MessageChannel;n.port1.onmessage=function(e){r(e.data)},e.postMessage(t,[n.port2])}))}function t(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var o=function(){var e=this;this.promise=new Promise((function(t,r){e.resolve=t,e.reject=r}))};function a(e,t){var r=location.href;return new URL(e,r).href===new URL(t,r).href}var i=function(e,t){this.type=e,Object.assign(this,t)};function u(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function c(){}var s={type:"SKIP_WAITING"};function l(e,t){if(!t)return e&&e.then?e.then(c):Promise.resolve()}var f=function(r){var n,c;function f(e,t){var n,c;return void 0===t&&(t={}),(n=r.call(this)||this).nn={},n.tn=0,n.rn=new o,n.en=new o,n.on=new o,n.un=0,n.an=new Set,n.cn=function(){var e=n.fn,t=e.installing;n.tn>0||!a(t.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=t,e.removeEventListener("updatefound",n.cn)):(n.hn=t,n.an.add(t),n.rn.resolve(t)),++n.tn,t.addEventListener("statechange",n.ln)},n.ln=function(e){var t=n.fn,r=e.target,o=r.state,a=r===n.vn,u={sw:r,isExternal:a,originalEvent:e};!a&&n.mn&&(u.isUpdate=!0),n.dispatchEvent(new i(o,u)),"installed"===o?n.wn=self.setTimeout((function(){"installed"===o&&t.waiting===r&&n.dispatchEvent(new i("waiting",u))}),200):"activating"===o&&(clearTimeout(n.wn),a||n.en.resolve(r))},n.dn=function(e){var t=n.hn,r=t!==navigator.serviceWorker.controller;n.dispatchEvent(new i("controlling",{isExternal:r,originalEvent:e,sw:t,isUpdate:n.mn})),r||n.on.resolve(t)},n.gn=(c=function(e){var t=e.data,r=e.ports,o=e.source;return u(n.getSW(),(function(){n.an.has(o)&&n.dispatchEvent(new i("message",{data:t,originalEvent:e,ports:r,sw:o}))}))},function(){for(var e=[],t=0;te.put("/",new Response("",{status:200}))))})),window.workbox=new f(window.location.origin+"/sw.js",{scope:"/"}),window.workbox.addEventListener("installed",(async({isUpdate:e})=>{if(!e){const e=await caches.open("start-url"),t=await fetch("/");let r=t;t.redirected&&(r=new Response(t.body,{status:200,statusText:"OK",headers:t.headers})),await e.put("/",r)}})),window.workbox.addEventListener("installed",(async()=>{const e=window.performance.getEntriesByType("resource").map((e=>e.name)).filter((e=>e.startsWith(`${window.location.origin}/ccip2-eth-client/_next/data/`)&&e.endsWith(".json"))),t=await caches.open("next-data");e.forEach((e=>t.add(e)))})),window.workbox.register();{const e=function(e){if(window.navigator.onLine)return"/"===e?fetch("/").then((function(e){return e.redirected?Promise.resolve():caches.open("start-url").then((t=>t.put("/",e)))})):void 0},t=history.pushState;history.pushState=function(){t.apply(history,arguments),e(arguments[2])};const r=history.replaceState;history.replaceState=function(){r.apply(history,arguments),e(arguments[2])},window.addEventListener("online",(()=>{e(window.location.pathname)}))}window.addEventListener("online",(()=>{location.reload()}))}},63133:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=null;return{mountedInstances:new Set,updateHead:function(t){var r=e=Promise.resolve().then((function(){if(r===e){e=null;var a={};t.forEach((function(e){if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'.concat(e.props["data-href"],'"]')))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}var t=a[e.type]||[];t.push(e),a[e.type]=t}));var i=a.title?a.title[0]:null,u="";if(i){var c=i.props.children;u="string"===typeof c?c:Array.isArray(c)?c.join(""):""}u!==document.title&&(document.title=u),["meta","base","link","style","script"].forEach((function(e){!function(e,t){var r=document.getElementsByTagName("head")[0],a=r.querySelector("meta[name=next-head-count]");0;for(var i=Number(a.content),u=[],c=0,s=a.previousElementSibling;c0&&void 0!==u[0]?u[0]:{},I=JSON.parse(document.getElementById("__NEXT_DATA__").textContent),window.__NEXT_DATA__=I,G=I.defaultLocale,t=I.assetPrefix||"",r.p="".concat(t,"/ccip2-eth-client/_next/"),g.setConfig({serverRuntimeConfig:{},publicRuntimeConfig:I.runtimeConfig||{}}),D=b.getURL(),v.hasBasePath(D)&&(D=v.delBasePath(D)),I.scriptLoader&&(a=r(97829),(0,a.initScriptLoader)(I.scriptLoader)),W=new x.default(I.buildId,t),i=function(e){var t=o(e,2),r=t[0],n=t[1];return W.routeLoader.onEntrypoint(r,n)},window.__NEXT_P&&window.__NEXT_P.map((function(e){return setTimeout((function(){return i(e)}),0)})),window.__NEXT_P=[],window.__NEXT_P.push=i,(F=_.default()).getIsSsr=function(){return T.isSsr},q=document.getElementById("__next"),e.abrupt("return",{assetPrefix:t});case 21:case"end":return e.stop()}}),e)}))),X.apply(this,arguments)}function K(){return(K=L(n.mark((function e(r){var o,a,i,u,c,s,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=I.err,e.prev=1,e.next=4,W.routeLoader.whenEntrypoint("/_app");case 4:if(!("error"in(a=e.sent))){e.next=7;break}throw a.error;case 7:i=a.component,u=a.exports,B=i,c=u&&u.reportWebVitals,H=function(e){var t,r=e.id,n=e.name,o=e.startTime,a=e.value,i=e.duration,u=e.entryType,s=e.entries,l="".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12);s&&s.length&&(t=s[0].startTime);var f={id:r||l,name:n,startTime:o||t,value:null==a?i:a,label:"mark"===u||"measure"===u?"custom":"web-vital"};null===c||void 0===c||c(f),k.trackWebVitalMetric(f)},e.next=15;break;case 15:return e.next=17,W.routeLoader.whenEntrypoint(I.page);case 17:e.t0=e.sent;case 18:if(!("error"in(s=e.t0))){e.next=21;break}throw s.error;case 21:z=s.component,!!s.exports.__next_rsc__,e.next=27;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(1),o=O.getProperError(e.t1);case 32:if(!window.__NEXT_PRELOADREADY){e.next=36;break}return e.next=36,window.__NEXT_PRELOADREADY(I.dynamicIds);case 36:if(t.router=T=E.createRouter(I.page,I.query,D,{initialProps:I.props,pageLoader:W,App:B,Component:z,wrapApp:ue,err:o,isFallback:Boolean(I.isFallback),subscription:function(e,t,r){return Y(Object.assign({},e,{App:t,scroll:r}))},locale:I.locale,locales:I.locales,defaultLocale:G,domainLocales:I.domainLocales,isPreview:I.isPreview,isRsc:I.rsc}),l={App:B,initial:!0,Component:z,props:I.props,err:o},!(null===r||void 0===r?void 0:r.beforeRender)){e.next=41;break}return e.next=41,r.beforeRender();case 41:Y(l);case 42:case"end":return e.stop()}}),e,null,[[1,29]])})))).apply(this,arguments)}function Y(e){return Q.apply(this,arguments)}function Q(){return(Q=L(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,J(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,ce(t);case 7:e.next=17;break;case 9:if(e.prev=9,e.t0=e.catch(4),!(r=O.getProperError(e.t0)).cancelled){e.next=14;break}throw r;case 14:return e.next=17,J(A({},t,{err:r}));case 17:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function J(e){var t=e.App,n=e.err;return console.error(n),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),W.loadPage("/_error").then((function(e){var t=e.page,n=e.styleSheets;return(null===ie||void 0===ie?void 0:ie.Component)===t?r.e(9894).then(r.bind(r,89894)).then((function(e){return{ErrorComponent:e.default,styleSheets:[]}})):{ErrorComponent:t,styleSheets:n}})).then((function(r){var o=r.ErrorComponent,a=r.styleSheets,i=ue(t),u={Component:o,AppTree:i,router:T,ctx:{err:n,pathname:I.page,query:I.query,asPath:D,AppTree:i}};return Promise.resolve(e.props?e.props:b.loadGetInitialProps(t,u)).then((function(t){return ce(A({},e,{err:n,Component:o,styleSheets:a,props:t}))}))}))}var Z=null,ee=!0;function te(){b.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),H&&performance.getEntriesByName("Next.js-hydration").forEach(H),ne())}function re(){if(b.ST){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),H&&(performance.getEntriesByName("Next.js-render").forEach(H),performance.getEntriesByName("Next.js-route-change-to-render").forEach(H)),ne(),["Next.js-route-change-to-render","Next.js-render"].forEach((function(e){return performance.clearMeasures(e)})))}}function ne(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach((function(e){return performance.clearMarks(e)}))}function oe(e){var t=e.children;return f.default.createElement($,{fn:function(e){return J({App:B,err:e}).catch((function(e){return console.error("Error rendering page: ",e)}))}},f.default.createElement(h.RouterContext.Provider,{value:E.makePublicRouterInstance(T)},f.default.createElement(p.HeadManagerContext.Provider,{value:F},f.default.createElement(R.ImageConfigContext.Provider,{value:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"",loader:"akamai",experimentalLayoutRaw:!1}},t))))}function ae(e,t){return f.default.createElement(e,Object.assign({},t))}var ie,ue=function(e){return function(t){var r=A({},t,{Component:z,err:I.err,router:T});return f.default.createElement(oe,null,ae(e,r))}};function ce(e){var t=e.App,n=e.Component,o=e.props,a=e.err,i=e.__N_RSC,u="initial"in e?void 0:e.styleSheets;n=n||ie.Component;var c=A({},o=o||ie.props,{Component:!!i?undefined:n,err:a,router:T});ie=c;var s,l=!1,p=new Promise((function(e,t){U&&U(),s=function(){U=null,e()},U=function(){l=!0,U=null;var e=new Error("Cancel rendering route");e.cancelled=!0,t(e)}}));function d(){s()}!function(){if(!u)return!1;var e=V(document.querySelectorAll("style[data-n-href]")),t=new Set(e.map((function(e){return e.getAttribute("data-n-href")}))),r=document.querySelector("noscript[data-n-css]"),n=null===r||void 0===r?void 0:r.getAttribute("data-n-css");u.forEach((function(e){var r=e.href,o=e.text;if(!t.has(r)){var a=document.createElement("style");a.setAttribute("data-n-href",r),a.setAttribute("media","x"),n&&a.setAttribute("nonce",n),document.head.appendChild(a),a.appendChild(document.createTextNode(o))}}))}();var h=f.default.createElement(f.default.Fragment,null,f.default.createElement(le,{callback:function(){if(u&&!l){for(var t=new Set(u.map((function(e){return e.href}))),r=V(document.querySelectorAll("style[data-n-href]")),n=r.map((function(e){return e.getAttribute("data-n-href")})),o=0;o=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=new Map,d=new Set,h=["onLoad","dangerouslySetInnerHTML","children","onError","strategy"],v=function(e){var t=e.src,r=e.id,n=e.onLoad,a=void 0===n?function(){}:n,i=e.dangerouslySetInnerHTML,c=e.children,s=void 0===c?"":c,l=e.strategy,f=void 0===l?"afterInteractive":l,v=e.onError,m=r||t;if(!m||!d.has(m)){if(p.has(t))return d.add(m),void p.get(t).then(a,v);var y=document.createElement("script"),g=new Promise((function(e,t){y.addEventListener("load",(function(t){e(),a&&a.call(this,t)})),y.addEventListener("error",(function(e){t(e)}))})).catch((function(e){v&&v(e)}));t&&p.set(t,g),d.add(m),i?y.innerHTML=i.__html||"":s?y.textContent="string"===typeof s?s:Array.isArray(s)?s.join(""):"":t&&(y.src=t);for(var b=0,w=Object.entries(e);b>>0,1)},emit:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o-1||r>-1)&&(e=e.substring(0,t>-1?t:r)),e}function A(e){return function(e,t){return(e=C(e))===t||e.startsWith(t+"/")}(e,"")}function T(e){return function(e,t){if(!e.startsWith("/")||!t)return e;var r=C(e);return f.normalizePathTrailingSlash("".concat(t).concat(r))+e.slice(r.length)}(e,"")}function N(e){return(e=e.slice("".length)).startsWith("/")||(e="/".concat(e)),e}function I(e){if(e.startsWith("/")||e.startsWith("#")||e.startsWith("?"))return!0;try{var t=g.getLocationOrigin(),r=new URL(e,t);return r.origin===t&&A(r.pathname)}catch(_){return!1}}function D(e,t,r){var n="",o=E.getRouteRegex(e),a=o.groups,i=(t!==e?S.getRouteMatcher(o)(t):"")||r;n=e;var u=Object.keys(a);return u.every((function(e){var t=i[e]||"",r=a[e],o=r.repeat,u=r.optional,c="[".concat(o?"...":"").concat(e,"]");return u&&(c="".concat(t?"":"/","[").concat(c,"]")),o&&!Array.isArray(t)&&(t=[t]),(u||e in i)&&(n=n.replace(c,o?t.map((function(e){return encodeURIComponent(e)})).join("/"):encodeURIComponent(t))||"/")}))||(n=""),{params:u,result:n}}function W(e,t){var r={};return Object.keys(e).forEach((function(n){t.includes(n)||(r[n]=e[n])})),r}function q(e,t,r){var n,o="string"===typeof t?t:k.formatWithValidation(t),a=o.match(/^[a-zA-Z]{1,}:\/\//),i=a?o.slice(a[0].length):o;if((i.split("?")[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href passed to next/router: ".concat(o,", repeated forward-slashes (//) or backslashes \\ are not valid in the href"));var u=g.normalizeRepeatedSlashes(i);o=(a?a[0]:"")+u}if(!I(o))return r?[o]:o;try{n=new URL(o.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(_){n=new URL("/","http://n")}try{var c=new URL(o,n);c.pathname=f.normalizePathTrailingSlash(c.pathname);var s="";if(b.isDynamicRoute(c.pathname)&&c.searchParams&&r){var l=x.searchParamsToUrlQuery(c.searchParams),p=D(c.pathname,c.pathname,l),d=p.result,h=p.params;d&&(s=k.formatWithValidation({pathname:d,hash:c.hash,query:W(l,h)}))}var v=c.origin===n.origin?c.href.slice(c.origin.length):c.href;return r?[v,s||v]:v}catch(m){return r?[o]:o}}function F(e){var t=g.getLocationOrigin();return e.startsWith(t)?e.substring(t.length):e}function U(e,t,r){var n=q(e,t,!0),o=c(n,2),a=o[0],i=o[1],u=g.getLocationOrigin(),s=a.startsWith(u),l=i&&i.startsWith(u);a=F(a),i=i?F(i):i;var f=s?a:T(a),p=r?F(q(e,r)):i||a;return{url:f,as:l?p:T(p)}}function B(e,t){var r=f.removePathTrailingSlash(v.denormalizePagePath(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some((function(t){if(b.isDynamicRoute(t)&&E.getRouteRegex(t).re.test(r))return e=t,!0})),f.removePathTrailingSlash(e))}var H=Symbol("SSG_DATA_NOT_FOUND");function z(e,t,r){return fetch(e,{credentials:"same-origin"}).then((function(n){if(!n.ok){if(t>1&&n.status>=500)return z(e,t-1,r);if(404===n.status)return n.json().then((function(e){if(e.notFound)return{notFound:H};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.text?n.text():n.json()}))}function V(e,t,r,n,o){var a=new URL(e,window.location.href).href;return void 0!==n[a]?n[a]:n[a]=z(e,t?3:1,{text:r}).catch((function(e){throw t||p.markAssetError(e),e})).then((function(e){return o||delete n[a],e})).catch((function(e){throw delete n[a],e}))}var G=function(){function e(t,r,n,o){var a=this,u=o.initialProps,c=o.pageLoader,s=o.App,l=o.wrapApp,p=o.Component,d=o.err,h=o.subscription,v=o.isFallback,m=o.locale,y=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview),_=o.isRsc;i(this,e),this.sdc={},this.sdr={},this.sde={},this._idx=0,this.onPopState=function(e){var t=e.state;if(t){if(t.__N){var r=t.url,n=t.as,o=t.options,i=t.idx;a._idx=i;var u=w.parseRelativeUrl(r).pathname;a.isSsr&&n===T(a.asPath)&&u===T(a.pathname)||a._bps&&!a._bps(t)||a.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&a._shallow,locale:o.locale||a.defaultLocale}),undefined)}}else{var c=a.pathname,s=a.query;a.changeState("replaceState",k.formatWithValidation({pathname:T(c),query:s}),g.getURL())}};var x=f.removePathTrailingSlash(t);this.components={},"/_error"!==t&&(this.components[x]={Component:p,initial:!0,props:u,err:d,__N_SSG:u&&u.__N_SSG,__N_SSP:u&&u.__N_SSP,__N_RSC:!!_}),this.components["/_app"]={Component:s,styleSheets:[]},this.events=e.events,this.pageLoader=c;var P=b.isDynamicRoute(t)&&self.__NEXT_DATA__.autoExport;if(this.basePath="",this.sub=h,this.clc=null,this._wrapApp=l,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!P&&!self.location.search),this.state={route:x,pathname:t,query:r,asPath:P?t:n,isPreview:!!y,locale:void 0,isFallback:v},!n.startsWith("//")){var S={locale:m};S._shouldResolveHref=n!==t,this.changeState("replaceState",k.formatWithValidation({pathname:T(t),query:r}),g.getURL(),S)}window.addEventListener("popstate",this.onPopState)}return u(e,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=U(this,e,t);return e=n.url,t=n.as,this.change("pushState",e,t,r)}},{key:"replace",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=U(this,e,t);return e=n.url,t=n.as,this.change("replaceState",e,t,r)}},{key:"change",value:function(){var t=a(n.mark((function t(r,o,a,i,u){var s,v,m,y,_,x,P,O,R,j,q,F,z,V,G,$,X,K,Y,Q,J,Z,ee,te,re,ne,oe,ae,ie,ue,ce,se,le,fe,pe,de,he,ve,me,ye,ge,be,we,_e,xe,Pe;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(I(o)){t.next=3;break}return window.location.href=o,t.abrupt("return",!1);case 3:s=i._h||i._shouldResolveHref||C(o)===C(a),v=l({},this.state),i._h&&(this.isReady=!0),m=v.locale,t.next=19;break;case 19:if(i._h||(this.isSsr=!1),g.ST&&performance.mark("routeChange"),y=i.shallow,_=void 0!==y&&y,x=i.scroll,P=void 0===x||x,O={shallow:_},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,O),a=T(L(A(a)?N(a):a,i.locale,this.defaultLocale)),R=M(A(a)?N(a):a,v.locale),this._inFlightRoute=a,j=m!==v.locale,i._h||!this.onlyAHashChange(R)||j){t.next=36;break}return v.asPath=R,e.events.emit("hashChangeStart",a,O),this.changeState(r,o,a,l(l({},i),{},{scroll:!1})),P&&this.scrollToHash(R),this.set(v,this.components[v.route],null),e.events.emit("hashChangeComplete",a,O),t.abrupt("return",!0);case 36:return q=w.parseRelativeUrl(o),F=q.pathname,z=q.query,t.prev=38,t.next=41,Promise.all([this.pageLoader.getPageList(),p.getClientBuildManifest(),this.pageLoader.getMiddlewareList()]);case 41:G=t.sent,$=c(G,2),V=$[0],$[1].__rewrites,t.next=51;break;case 47:return t.prev=47,t.t0=t.catch(38),window.location.href=a,t.abrupt("return",!1);case 51:if(this.urlIsNew(R)||j||(r="replaceState"),X=a,F=F?f.removePathTrailingSlash(N(F)):F,!s||"/_error"===F){t.next=67;break}i._shouldResolveHref=!0,t.next=65;break;case 61:X=K.asPath,K.matchedPage&&K.resolvedHref&&(F=K.resolvedHref,q.pathname=T(F),o=k.formatWithValidation(q)),t.next=67;break;case 65:q.pathname=B(F,V),q.pathname!==F&&(F=q.pathname,q.pathname=T(F),o=k.formatWithValidation(q));case 67:if(I(a)){t.next=72;break}t.next=70;break;case 70:return window.location.href=a,t.abrupt("return",!1);case 72:if(X=M(N(X),v.locale),i.shallow&&1!==i._h||1===i._h&&!b.isDynamicRoute(f.removePathTrailingSlash(F))){t.next=97;break}return t.next=76,this._preflightRequest({as:a,cache:!0,pages:V,pathname:F,query:z,locale:v.locale,isPreview:v.isPreview});case 76:if("rewrite"!==(Y=t.sent).type){t.next=85;break}z=l(l({},z),Y.parsedAs.query),X=Y.asPath,F=Y.resolvedHref,q.pathname=Y.resolvedHref,o=k.formatWithValidation(q),t.next=97;break;case 85:if("redirect"!==Y.type||!Y.newAs){t.next=89;break}return t.abrupt("return",this.change(r,Y.newUrl,Y.newAs,i));case 89:if("redirect"!==Y.type||!Y.destination){t.next=94;break}return window.location.href=Y.destination,t.abrupt("return",new Promise((function(){})));case 94:if("refresh"!==Y.type||a===window.location.pathname){t.next=97;break}return window.location.href=a,t.abrupt("return",new Promise((function(){})));case 97:if(Q=f.removePathTrailingSlash(F),!b.isDynamicRoute(Q)){t.next=113;break}if(J=w.parseRelativeUrl(X),Z=J.pathname,ee=E.getRouteRegex(Q),te=S.getRouteMatcher(ee)(Z),ne=(re=Q===Z)?D(Q,Z,z):{},te&&(!re||ne.result)){t.next=112;break}if(!((oe=Object.keys(ee.groups).filter((function(e){return!z[e]}))).length>0)){t.next=110;break}throw new Error((re?"The provided `href` (".concat(o,") value is missing query values (").concat(oe.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(Z,") is incompatible with the `href` value (").concat(Q,"). "))+"Read more: https://nextjs.org/docs/messages/".concat(re?"href-interpolation-failed":"incompatible-href-as"));case 110:t.next=113;break;case 112:re?a=k.formatWithValidation(Object.assign({},J,{pathname:ne.result,query:W(z,ne.params)})):Object.assign(z,te);case 113:return e.events.emit("routeChangeStart",a,O),t.prev=114,t.next=117,this.getRouteInfo(Q,F,z,a,X,O,v.locale,v.isPreview);case 117:if(ue=t.sent,se=(ce=ue).error,le=ce.props,fe=ce.__N_SSG,pe=ce.__N_SSP,(de=ue.Component)&&de.unstable_scriptLoader&&[].concat(de.unstable_scriptLoader()).forEach((function(e){d.handleClientScriptLoad(e.props)})),!fe&&!pe||!le){t.next=145;break}if(!le.pageProps||!le.pageProps.__N_REDIRECT){t.next=131;break}if(!(he=le.pageProps.__N_REDIRECT).startsWith("/")||!1===le.pageProps.__N_REDIRECT_BASE_PATH){t.next=129;break}return(ve=w.parseRelativeUrl(he)).pathname=B(ve.pathname,V),me=U(this,he,he),ye=me.url,ge=me.as,t.abrupt("return",this.change(r,ye,ge,i));case 129:return window.location.href=he,t.abrupt("return",new Promise((function(){})));case 131:if(v.isPreview=!!le.__N_PREVIEW,le.notFound!==H){t.next=145;break}return t.prev=133,t.next=136,this.fetchComponent("/404");case 136:be="/404",t.next=142;break;case 139:t.prev=139,t.t1=t.catch(133),be="/_error";case 142:return t.next=144,this.getRouteInfo(be,be,z,a,X,{shallow:!1},v.locale,v.isPreview);case 144:ue=t.sent;case 145:return e.events.emit("beforeHistoryChange",a,O),this.changeState(r,o,a,i),i._h&&"/_error"===F&&500===(null===(ae=self.__NEXT_DATA__.props)||void 0===ae||null===(ie=ae.pageProps)||void 0===ie?void 0:ie.statusCode)&&(null===le||void 0===le?void 0:le.pageProps)&&(le.pageProps.statusCode=500),we=i.shallow&&v.route===Q,xe=null!==(_e=i.scroll)&&void 0!==_e?_e:!we,Pe=xe?{x:0,y:0}:null,t.next=153,this.set(l(l({},v),{},{route:Q,pathname:F,query:z,asPath:R,isFallback:!1}),ue,null!==u&&void 0!==u?u:Pe).catch((function(e){if(!e.cancelled)throw e;se=se||e}));case 153:if(!se){t.next=156;break}throw e.events.emit("routeChangeError",se,R,O),se;case 156:return e.events.emit("routeChangeComplete",a,O),t.abrupt("return",!0);case 161:if(t.prev=161,t.t2=t.catch(114),!h.default(t.t2)||!t.t2.cancelled){t.next=165;break}return t.abrupt("return",!1);case 165:throw t.t2;case 166:case"end":return t.stop()}}),t,this,[[38,47],[114,161],[133,139]])})));return function(e,r,n,o,a){return t.apply(this,arguments)}}()},{key:"changeState",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===e&&g.getURL()===r||(this._shallow=n.shallow,window.history[e]({url:t,as:r,options:n,__N:!0,idx:this._idx="pushState"!==e?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var t=a(n.mark((function t(r,o,a,i,u,c){var s,l,f,d;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.cancelled){t.next=2;break}throw r;case 2:if(!p.isAssetError(r)&&!c){t.next=6;break}throw e.events.emit("routeChangeError",r,i,u),window.location.href=i,j();case 6:if(t.prev=6,"undefined"!==typeof s&&"undefined"!==typeof l){t.next=13;break}return t.next=10,this.fetchComponent("/_error");case 10:f=t.sent,s=f.page,l=f.styleSheets;case 13:if((d={props:undefined,Component:s,styleSheets:l,err:r,error:r}).props){t.next=25;break}return t.prev=15,t.next=18,this.getInitialProps(s,{err:r,pathname:o,query:a});case 18:d.props=t.sent,t.next=25;break;case 21:t.prev=21,t.t0=t.catch(15),console.error("Error in error page `getInitialProps`: ",t.t0),d.props={};case 25:return t.abrupt("return",d);case 28:return t.prev=28,t.t1=t.catch(6),t.abrupt("return",this.handleRouteInfoError(h.default(t.t1)?t.t1:new Error(t.t1+""),o,a,i,u,!0));case 31:case"end":return t.stop()}}),t,this,[[6,28],[15,21]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var e=a(n.mark((function e(t,r,o,a,i,u,c,s){var l,f,p,d,v,m,y,g,b,w,_,x,P,S=this;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,l=this.components[t],!u.shallow||!l||this.route!==t){e.next=4;break}return e.abrupt("return",l);case 4:if(f=void 0,l&&!("initial"in l)&&(f=l),e.t0=f,e.t0){e.next=11;break}return e.next=10,this.fetchComponent(t).then((function(e){return{Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP,__N_RSC:!!e.mod.__next_rsc__}}));case 10:e.t0=e.sent;case 11:p=e.t0,d=p.Component,v=p.__N_SSG,m=p.__N_SSP,y=p.__N_RSC,e.next=17;break;case 17:return b=m&&y,(v||m||y)&&(g=this.pageLoader.getDataHref({href:k.formatWithValidation({pathname:r,query:o}),asPath:i,ssg:v,flight:b,locale:c})),e.next=21,this._getData((function(){return(v||m||y)&&!b?V(g,S.isSsr,!1,v?S.sdc:S.sdr,!!v&&!s):S.getInitialProps(d,{pathname:r,query:o,asPath:a,locale:c,locales:S.locales,defaultLocale:S.defaultLocale})}));case 21:if(w=e.sent,!y){e.next=33;break}if(!b){e.next=31;break}return e.next=26,this._getData((function(){return S._getFlightData(g)}));case 26:_=e.sent,x=_.data,w.pageProps=Object.assign(w.pageProps,{__flight__:x}),e.next=33;break;case 31:P=w.__flight__,w.pageProps=Object.assign({},w.pageProps,{__flight__:P});case 33:return p.props=w,this.components[t]=p,e.abrupt("return",p);case 38:return e.prev=38,e.t1=e.catch(0),e.abrupt("return",this.handleRouteInfoError(h.getProperError(e.t1),r,o,a,u));case 41:case"end":return e.stop()}}),e,this,[[0,38]])})));return function(t,r,n,o,a,i,u,c){return e.apply(this,arguments)}}()},{key:"set",value:function(e,t,r){return this.state=e,this.sub(t,this.components["/_app"].Component,r)}},{key:"beforePopState",value:function(e){this._bps=e}},{key:"onlyAHashChange",value:function(e){if(!this.asPath)return!1;var t=this.asPath.split("#"),r=c(t,2),n=r[0],o=r[1],a=e.split("#"),i=c(a,2),u=i[0],s=i[1];return!(!s||n!==u||o!==s)||n===u&&o!==s}},{key:"scrollToHash",value:function(e){var t=e.split("#"),r=c(t,2)[1],n=void 0===r?"":r;if(""!==n&&"top"!==n){var o=document.getElementById(n);if(o)o.scrollIntoView();else{var a=document.getElementsByName(n)[0];a&&a.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(e){return this.asPath!==e}},{key:"prefetch",value:function(){var e=a(n.mark((function e(t){var r,o,a,i,u,c,s,p,d,h,v,m,y=this,g=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:t,o=g.length>2&&void 0!==g[2]?g[2]:{},a=w.parseRelativeUrl(t),i=a.pathname,u=a.query,e.next=7,this.pageLoader.getPageList();case 7:c=e.sent,s=r,e.next=21;break;case 12:if(d=e.sent,p=d.__rewrites,!(h=P.default(T(L(r,this.locale)),c,p,a.query,(function(e){return B(e,c)}),this.locales)).externalDest){e.next=17;break}return e.abrupt("return");case 17:s=M(N(h.asPath),this.locale),h.matchedPage&&h.resolvedHref&&(i=h.resolvedHref,a.pathname=i,t=k.formatWithValidation(a)),e.next=23;break;case 21:a.pathname=B(a.pathname,c),a.pathname!==i&&(i=a.pathname,a.pathname=i,t=k.formatWithValidation(a));case 23:e.next=25;break;case 25:return e.next=27,this._preflightRequest({as:T(r),cache:!0,pages:c,pathname:i,query:u,locale:this.locale,isPreview:this.isPreview});case 27:return"rewrite"===(v=e.sent).type&&(a.pathname=v.resolvedHref,i=v.resolvedHref,u=l(l({},u),v.parsedAs.query),s=v.asPath,t=k.formatWithValidation(a)),m=f.removePathTrailingSlash(i),e.next=32,Promise.all([this.pageLoader._isSsg(m).then((function(e){return!!e&&V(y.pageLoader.getDataHref({href:t,asPath:s,ssg:!0,locale:"undefined"!==typeof o.locale?o.locale:y.locale}),!1,!1,y.sdc,!0)})),this.pageLoader[o.priority?"loadPage":"prefetch"](m)]);case 32:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var e=a(n.mark((function e(t){var r,o,a,i,u=this;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=!1,o=this.clc=function(){r=!0},a=function(){if(r){var e=new Error('Abort fetching component for route: "'.concat(t,'"'));throw e.cancelled=!0,e}o===u.clc&&(u.clc=null)},e.prev=3,e.next=6,this.pageLoader.loadPage(t);case 6:return i=e.sent,a(),e.abrupt("return",i);case 11:throw e.prev=11,e.t0=e.catch(3),a(),e.t0;case 15:case"end":return e.stop()}}),e,this,[[3,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_getData",value:function(e){var t=this,r=!1,n=function(){r=!0};return this.clc=n,e().then((function(e){if(n===t.clc&&(t.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return e}))}},{key:"_getFlightData",value:function(e){return V(e,!0,!0,this.sdc,!1).then((function(e){return{data:e}}))}},{key:"_preflightRequest",value:function(){var e=a(n.mark((function e(t){var r,o,a,i,u,s,l,p,d,h,v,y,g;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=C(t.as),o=M(A(r)?N(r):r,t.locale),e.next=4,this.pageLoader.getMiddlewareList();case 4:if(a=e.sent,a.some((function(e){var t=c(e,2),r=t[0],n=t[1];return S.getRouteMatcher(O.getMiddlewareRegex(r,!n))(o)}))){e.next=8;break}return e.abrupt("return",{type:"next"});case 8:return i=L(t.as,t.locale),e.prev=9,e.next=12,this._getPreflightData({preflightHref:i,shouldCache:t.cache,isPreview:t.isPreview});case 12:u=e.sent,e.next=18;break;case 15:return e.prev=15,e.t0=e.catch(9),e.abrupt("return",{type:"redirect",destination:t.as});case 18:if(!u.rewrite){e.next=25;break}if(u.rewrite.startsWith("/")){e.next=21;break}return e.abrupt("return",{type:"redirect",destination:t.as});case 21:return s=w.parseRelativeUrl(m.normalizeLocalePath(A(u.rewrite)?N(u.rewrite):u.rewrite,this.locales).pathname),l=f.removePathTrailingSlash(s.pathname),t.pages.includes(l)?(p=!0,d=l):(d=B(l,t.pages))!==s.pathname&&t.pages.includes(d)&&(p=!0),e.abrupt("return",{type:"rewrite",asPath:s.pathname,parsedAs:s,matchedPage:p,resolvedHref:d});case 25:if(!u.redirect){e.next=31;break}if(!u.redirect.startsWith("/")){e.next=30;break}return h=f.removePathTrailingSlash(m.normalizeLocalePath(A(u.redirect)?N(u.redirect):u.redirect,this.locales).pathname),v=U(this,h,h),y=v.url,g=v.as,e.abrupt("return",{type:"redirect",newUrl:y,newAs:g});case 30:return e.abrupt("return",{type:"redirect",destination:u.redirect});case 31:if(!u.refresh||u.ssr){e.next=33;break}return e.abrupt("return",{type:"refresh"});case 33:return e.abrupt("return",{type:"next"});case 34:case"end":return e.stop()}}),e,this,[[9,15]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_getPreflightData",value:function(e){var t=this,r=e.preflightHref,n=e.shouldCache,o=void 0!==n&&n,a=e.isPreview,i=new URL(r,window.location.href).href;return!a&&o&&this.sde[i]?Promise.resolve(this.sde[i]):fetch(r,{method:"HEAD",credentials:"same-origin",headers:{"x-middleware-preflight":"1"}}).then((function(e){if(!e.ok)throw new Error("Failed to preflight request");return{cache:e.headers.get("x-middleware-cache"),redirect:e.headers.get("Location"),refresh:e.headers.has("x-middleware-refresh"),rewrite:e.headers.get("x-middleware-rewrite"),ssr:!!e.headers.get("x-middleware-ssr")}})).then((function(e){return o&&"no-cache"!==e.cache&&(t.sde[i]=e),e})).catch((function(e){throw delete t.sde[i],e}))}},{key:"getInitialProps",value:function(e,t){var r=this.components["/_app"].Component,n=this._wrapApp(r);return t.AppTree=n,g.loadGetInitialProps(r,{AppTree:n,Component:e,router:this,ctx:t})}},{key:"abortComponentLoad",value:function(t,r){this.clc&&(e.events.emit("routeChangeError",j(),t,r),this.clc(),this.clc=null)}},{key:"route",get:function(){return this.state.route}},{key:"pathname",get:function(){return this.state.pathname}},{key:"query",get:function(){return this.state.query}},{key:"asPath",get:function(){return this.state.asPath}},{key:"locale",get:function(){return this.state.locale}},{key:"isFallback",get:function(){return this.state.isFallback}},{key:"isPreview",get:function(){return this.state.isPreview}}]),e}();t.default=G,G.events=y.default()},17389:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUrl=a,t.formatWithValidation=function(e){0;return a(e)},t.urlObjectKeys=void 0;var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(24470));var o=/https?|ftp|gopher|file/;function a(e){var t=e.auth,r=e.hostname,a=e.protocol||"",i=e.pathname||"",u=e.hash||"",c=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?"[".concat(r,"]"):r),e.port&&(s+=":"+e.port)),c&&"object"===typeof c&&(c=String(n.urlQueryToSearchParams(c)));var l=e.search||c&&"?".concat(c)||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s=""),u&&"#"!==u[0]&&(u="#"+u),l&&"?"!==l[0]&&(l="?"+l),i=i.replace(/[?#]/g,encodeURIComponent),l=l.replace("#","%23"),"".concat(a).concat(s).concat(i).concat(l).concat(u)}t.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"]},60838:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r="/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index".concat(e):"".concat(e);return r+t}},70837:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMiddlewareRegex=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=n.getParametrizedRoute(e),o=t?"(?!_next).*":"",a=t?"(?:(/.*)?)":"";if("routeKeys"in r)return"/"===r.parameterizedRoute?{groups:{},namedRegex:"^/".concat(o,"$"),re:new RegExp("^/".concat(o,"$")),routeKeys:{}}:{groups:r.groups,namedRegex:"^".concat(r.namedParameterizedRoute).concat(a,"$"),re:new RegExp("^".concat(r.parameterizedRoute).concat(a,"$")),routeKeys:r.routeKeys};if("/"===r.parameterizedRoute)return{groups:{},re:new RegExp("^/".concat(o,"$"))};return{groups:{},re:new RegExp("^".concat(r.parameterizedRoute).concat(a,"$"))}};var n=r(75566)},27722:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getMiddlewareRegex",{enumerable:!0,get:function(){return n.getMiddlewareRegex}}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o.getRouteMatcher}}),Object.defineProperty(t,"getRouteRegex",{enumerable:!0,get:function(){return a.getRouteRegex}}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return i.getSortedRoutes}}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return u.isDynamicRoute}});var n=r(70837),o=r(50859),a=r(75566),i=r(10125),u=r(52829)},52829:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDynamicRoute=function(e){return r.test(e)};var r=/\/\[[^/]+?\](?=\/|$)/},22226:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseRelativeUrl=function(e,t){var r=new URL(n.getLocationOrigin()),a=t?new URL(t,r):r,i=new URL(e,a),u=i.pathname,c=i.searchParams,s=i.search,l=i.hash,f=i.href;if(i.origin!==r.origin)throw new Error("invariant: invalid relative URL, router received ".concat(e));return{pathname:u,query:o.searchParamsToUrlQuery(c),search:s,hash:l,href:f.slice(r.origin.length)}};var n=r(67206),o=r(24470)},24470:function(e,t,r){"use strict";var n=r(85696);function o(e){return"string"===typeof e||"number"===typeof e&&!isNaN(e)||"boolean"===typeof e?String(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.searchParamsToUrlQuery=function(e){var t={};return e.forEach((function(e,r){"undefined"===typeof t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]})),t},t.urlQueryToSearchParams=function(e){var t=new URLSearchParams;return Object.entries(e).forEach((function(e){var r=n(e,2),a=r[0],i=r[1];Array.isArray(i)?i.forEach((function(e){return t.append(a,o(e))})):t.set(a,o(i))})),t},t.assign=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:"/",r=n(this.children.keys()).sort();null!==this.slugName&&r.splice(r.indexOf("[]"),1),null!==this.restSlugName&&r.splice(r.indexOf("[...]"),1),null!==this.optionalRestSlugName&&r.splice(r.indexOf("[[...]]"),1);var o=r.map((function(r){return e.children.get(r)._smoosh("".concat(t).concat(r,"/"))})).reduce((function(e,t){return[].concat(n(e),n(t))}),[]);if(null!==this.slugName&&o.push.apply(o,n(this.children.get("[]")._smoosh("".concat(t,"[").concat(this.slugName,"]/")))),!this.placeholder){var a="/"===t?"/":t.slice(0,-1);if(null!=this.optionalRestSlugName)throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("'.concat(a,'" and "').concat(a,"[[...").concat(this.optionalRestSlugName,']]").'));o.unshift(a)}return null!==this.restSlugName&&o.push.apply(o,n(this.children.get("[...]")._smoosh("".concat(t,"[...").concat(this.restSlugName,"]/")))),null!==this.optionalRestSlugName&&o.push.apply(o,n(this.children.get("[[...]]")._smoosh("".concat(t,"[[...").concat(this.optionalRestSlugName,"]]/")))),o}},{key:"_insert",value:function(t,r,n){if(0!==t.length){if(n)throw new Error("Catch-all must be the last part of the URL.");var o=t[0];if(o.startsWith("[")&&o.endsWith("]")){var a=function(e,t){if(null!==e&&e!==t)throw new Error("You cannot use different slug names for the same dynamic path ('".concat(e,"' !== '").concat(t,"')."));r.forEach((function(e){if(e===t)throw new Error('You cannot have the same slug name "'.concat(t,'" repeat within a single dynamic path'));if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw new Error('You cannot have the slug names "'.concat(e,'" and "').concat(t,'" differ only by non-word symbols within a single dynamic path'))})),r.push(t)},i=o.slice(1,-1),u=!1;if(i.startsWith("[")&&i.endsWith("]")&&(i=i.slice(1,-1),u=!0),i.startsWith("...")&&(i=i.substring(3),n=!0),i.startsWith("[")||i.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('".concat(i,"')."));if(i.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('".concat(i,"')."));if(n)if(u){if(null!=this.restSlugName)throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...'.concat(this.restSlugName,']" and "').concat(t[0],'" ).'));a(this.optionalRestSlugName,i),this.optionalRestSlugName=i,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...'.concat(this.optionalRestSlugName,']]" and "').concat(t[0],'").'));a(this.restSlugName,i),this.restSlugName=i,o="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'.concat(t[0],'").'));a(this.slugName,i),this.slugName=i,o="[]"}}this.children.has(o)||this.children.set(o,new e),this.children.get(o)._insert(t.slice(1),r,n)}else this.placeholder=!1}}]),e}()},62156:function(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.setConfig=function(e){r=e},t.default=void 0;t.default=function(){return r}},67206:function(e,t,r){"use strict";var n=r(87794),o=r(33227),a=r(85971),i=r(52715),u=r(91193),c=r(36558),s=r(49376);function l(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=u(e);if(t){var o=u(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return i(this,r)}}function f(){var e=window.location,t=e.protocol,r=e.hostname,n=e.port;return"".concat(t,"//").concat(r).concat(n?":"+n:"")}function p(e){return"string"===typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function h(e,t){return v.apply(this,arguments)}function v(){return(v=s(n.mark((function e(t,r){var o,a,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.next=4;break;case 4:if(o=r.res||r.ctx&&r.ctx.res,t.getInitialProps){e.next=12;break}if(!r.ctx||!r.Component){e.next=11;break}return e.next=9,h(r.Component,r.ctx);case 9:return e.t0=e.sent,e.abrupt("return",{pageProps:e.t0});case 11:return e.abrupt("return",{});case 12:return e.next=14,t.getInitialProps(r);case 14:if(a=e.sent,!o||!d(o)){e.next=17;break}return e.abrupt("return",a);case 17:if(a){e.next=20;break}throw i='"'.concat(p(t),'.getInitialProps()" should resolve to an object. But found "').concat(a,'" instead.'),new Error(i);case 20:return e.abrupt("return",a);case 22:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.execOnce=function(e){var t,r=!1;return function(){return r||(r=!0,t=e.apply(void 0,arguments)),t}},t.getLocationOrigin=f,t.getURL=function(){var e=window.location.href,t=f();return e.substring(t.length)},t.getDisplayName=p,t.isResSent=d,t.normalizeRepeatedSlashes=function(e){var t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?".concat(t.slice(1).join("?")):"")},t.loadGetInitialProps=h,t.ST=t.SP=t.warnOnce=void 0;t.warnOnce=function(e){};var m="undefined"!==typeof performance;t.SP=m;var y=m&&"function"===typeof performance.mark&&"function"===typeof performance.measure;t.ST=y;var g=function(e){a(r,e);var t=l(r);function r(){return o(this,r),t.apply(this,arguments)}return r}(c(Error));t.DecodeError=g;var b=function(e){a(r,e);var t=l(r);function r(){return o(this,r),t.apply(this,arguments)}return r}(c(Error));t.NormalizeError=b},40037:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))})},90479:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(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 o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:R(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(r){Function("r","regeneratorRuntime = r")(t)}},38745:function(e){!function(){var t={106:function(e,t){!function(e){"use strict";var t,r,n,o,a=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},i=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var r=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return r.observe({type:e,buffered:!0}),r}}catch(e){}},u=function(e,t){var r=function r(n){"pagehide"!==n.type&&"hidden"!==document.visibilityState||(e(n),t&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)},c=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},s=function(e,t,r){var n;return function(o){t.value>=0&&(o||r)&&(t.delta=t.value-(n||0),(t.delta||void 0===n)&&(n=t.value,e(t)))}},l=-1,f=function(){return"hidden"===document.visibilityState?0:1/0},p=function(){u((function(e){var t=e.timeStamp;l=t}),!0)},d=function(){return l<0&&(l=f(),p(),c((function(){setTimeout((function(){l=f(),p()}),0)}))),{get firstHiddenTime(){return l}}},h=function(e,t){var r,n=d(),o=a("FCP"),u=function(e){"first-contentful-paint"===e.name&&(f&&f.disconnect(),e.startTime=0&&r1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var r=function(){b(e,t),o()},n=function(){o()},o=function(){removeEventListener("pointerup",r,y),removeEventListener("pointercancel",n,y)};addEventListener("pointerup",r,y),addEventListener("pointercancel",n,y)}(t,e):b(t,e)}},x=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,_,y)}))},P=new Set;e.getCLS=function(e,t){v||(h((function(e){m=e.value})),v=!0);var r,n=function(t){m>-1&&e(t)},o=a("CLS",0),l=0,f=[],p=function(e){if(!e.hadRecentInput){var t=f[0],n=f[f.length-1];l&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(l+=e.value,f.push(e)):(l=e.value,f=[e]),l>o.value&&(o.value=l,o.entries=f,r())}},d=i("layout-shift",p);d&&(r=s(n,o,t),u((function(){d.takeRecords().map(p),r(!0)})),c((function(){l=0,m=-1,o=a("CLS",0),r=s(n,o,t)})))},e.getFCP=h,e.getFID=function(e,n){var l,f=d(),p=a("FID"),h=function(e){e.startTimee.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var o=function(){var e=this;this.promise=new Promise((function(t,r){e.resolve=t,e.reject=r}))};function a(e,t){var r=location.href;return new URL(e,r).href===new URL(t,r).href}var i=function(e,t){this.type=e,Object.assign(this,t)};function u(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function c(){}var s={type:"SKIP_WAITING"};function l(e,t){if(!t)return e&&e.then?e.then(c):Promise.resolve()}var f=function(r){var n,c;function f(e,t){var n,c;return void 0===t&&(t={}),(n=r.call(this)||this).nn={},n.tn=0,n.rn=new o,n.en=new o,n.on=new o,n.un=0,n.an=new Set,n.cn=function(){var e=n.fn,t=e.installing;n.tn>0||!a(t.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=t,e.removeEventListener("updatefound",n.cn)):(n.hn=t,n.an.add(t),n.rn.resolve(t)),++n.tn,t.addEventListener("statechange",n.ln)},n.ln=function(e){var t=n.fn,r=e.target,o=r.state,a=r===n.vn,u={sw:r,isExternal:a,originalEvent:e};!a&&n.mn&&(u.isUpdate=!0),n.dispatchEvent(new i(o,u)),"installed"===o?n.wn=self.setTimeout((function(){"installed"===o&&t.waiting===r&&n.dispatchEvent(new i("waiting",u))}),200):"activating"===o&&(clearTimeout(n.wn),a||n.en.resolve(r))},n.dn=function(e){var t=n.hn,r=t!==navigator.serviceWorker.controller;n.dispatchEvent(new i("controlling",{isExternal:r,originalEvent:e,sw:t,isUpdate:n.mn})),r||n.on.resolve(t)},n.gn=(c=function(e){var t=e.data,r=e.ports,o=e.source;return u(n.getSW(),(function(){n.an.has(o)&&n.dispatchEvent(new i("message",{data:t,originalEvent:e,ports:r,sw:o}))}))},function(){for(var e=[],t=0;te.put("/",new Response("",{status:200}))))})),window.workbox=new f(window.location.origin+"/sw.js",{scope:"/"}),window.workbox.addEventListener("installed",(async({isUpdate:e})=>{if(!e){const e=await caches.open("start-url"),t=await fetch("/");let r=t;t.redirected&&(r=new Response(t.body,{status:200,statusText:"OK",headers:t.headers})),await e.put("/",r)}})),window.workbox.addEventListener("installed",(async()=>{const e=window.performance.getEntriesByType("resource").map((e=>e.name)).filter((e=>e.startsWith(`${window.location.origin}/_next/data/`)&&e.endsWith(".json"))),t=await caches.open("next-data");e.forEach((e=>t.add(e)))})),window.workbox.register();{const e=function(e){if(window.navigator.onLine)return"/"===e?fetch("/").then((function(e){return e.redirected?Promise.resolve():caches.open("start-url").then((t=>t.put("/",e)))})):void 0},t=history.pushState;history.pushState=function(){t.apply(history,arguments),e(arguments[2])};const r=history.replaceState;history.replaceState=function(){r.apply(history,arguments),e(arguments[2])},window.addEventListener("online",(()=>{e(window.location.pathname)}))}window.addEventListener("online",(()=>{location.reload()}))}},63133:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=null;return{mountedInstances:new Set,updateHead:function(t){var r=e=Promise.resolve().then((function(){if(r===e){e=null;var a={};t.forEach((function(e){if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'.concat(e.props["data-href"],'"]')))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}var t=a[e.type]||[];t.push(e),a[e.type]=t}));var i=a.title?a.title[0]:null,u="";if(i){var c=i.props.children;u="string"===typeof c?c:Array.isArray(c)?c.join(""):""}u!==document.title&&(document.title=u),["meta","base","link","style","script"].forEach((function(e){!function(e,t){var r=document.getElementsByTagName("head")[0],a=r.querySelector("meta[name=next-head-count]");0;for(var i=Number(a.content),u=[],c=0,s=a.previousElementSibling;c0&&void 0!==u[0]?u[0]:{},I=JSON.parse(document.getElementById("__NEXT_DATA__").textContent),window.__NEXT_DATA__=I,G=I.defaultLocale,t=I.assetPrefix||"",r.p="".concat(t,"/_next/"),g.setConfig({serverRuntimeConfig:{},publicRuntimeConfig:I.runtimeConfig||{}}),D=b.getURL(),v.hasBasePath(D)&&(D=v.delBasePath(D)),I.scriptLoader&&(a=r(97829),(0,a.initScriptLoader)(I.scriptLoader)),W=new x.default(I.buildId,t),i=function(e){var t=o(e,2),r=t[0],n=t[1];return W.routeLoader.onEntrypoint(r,n)},window.__NEXT_P&&window.__NEXT_P.map((function(e){return setTimeout((function(){return i(e)}),0)})),window.__NEXT_P=[],window.__NEXT_P.push=i,(F=_.default()).getIsSsr=function(){return T.isSsr},q=document.getElementById("__next"),e.abrupt("return",{assetPrefix:t});case 21:case"end":return e.stop()}}),e)}))),X.apply(this,arguments)}function K(){return(K=L(n.mark((function e(r){var o,a,i,u,c,s,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=I.err,e.prev=1,e.next=4,W.routeLoader.whenEntrypoint("/_app");case 4:if(!("error"in(a=e.sent))){e.next=7;break}throw a.error;case 7:i=a.component,u=a.exports,B=i,c=u&&u.reportWebVitals,H=function(e){var t,r=e.id,n=e.name,o=e.startTime,a=e.value,i=e.duration,u=e.entryType,s=e.entries,l="".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12);s&&s.length&&(t=s[0].startTime);var f={id:r||l,name:n,startTime:o||t,value:null==a?i:a,label:"mark"===u||"measure"===u?"custom":"web-vital"};null===c||void 0===c||c(f),k.trackWebVitalMetric(f)},e.next=15;break;case 15:return e.next=17,W.routeLoader.whenEntrypoint(I.page);case 17:e.t0=e.sent;case 18:if(!("error"in(s=e.t0))){e.next=21;break}throw s.error;case 21:z=s.component,!!s.exports.__next_rsc__,e.next=27;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(1),o=O.getProperError(e.t1);case 32:if(!window.__NEXT_PRELOADREADY){e.next=36;break}return e.next=36,window.__NEXT_PRELOADREADY(I.dynamicIds);case 36:if(t.router=T=E.createRouter(I.page,I.query,D,{initialProps:I.props,pageLoader:W,App:B,Component:z,wrapApp:ue,err:o,isFallback:Boolean(I.isFallback),subscription:function(e,t,r){return Y(Object.assign({},e,{App:t,scroll:r}))},locale:I.locale,locales:I.locales,defaultLocale:G,domainLocales:I.domainLocales,isPreview:I.isPreview,isRsc:I.rsc}),l={App:B,initial:!0,Component:z,props:I.props,err:o},!(null===r||void 0===r?void 0:r.beforeRender)){e.next=41;break}return e.next=41,r.beforeRender();case 41:Y(l);case 42:case"end":return e.stop()}}),e,null,[[1,29]])})))).apply(this,arguments)}function Y(e){return Q.apply(this,arguments)}function Q(){return(Q=L(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,J(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,ce(t);case 7:e.next=17;break;case 9:if(e.prev=9,e.t0=e.catch(4),!(r=O.getProperError(e.t0)).cancelled){e.next=14;break}throw r;case 14:return e.next=17,J(A({},t,{err:r}));case 17:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function J(e){var t=e.App,n=e.err;return console.error(n),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),W.loadPage("/_error").then((function(e){var t=e.page,n=e.styleSheets;return(null===ie||void 0===ie?void 0:ie.Component)===t?r.e(9894).then(r.bind(r,89894)).then((function(e){return{ErrorComponent:e.default,styleSheets:[]}})):{ErrorComponent:t,styleSheets:n}})).then((function(r){var o=r.ErrorComponent,a=r.styleSheets,i=ue(t),u={Component:o,AppTree:i,router:T,ctx:{err:n,pathname:I.page,query:I.query,asPath:D,AppTree:i}};return Promise.resolve(e.props?e.props:b.loadGetInitialProps(t,u)).then((function(t){return ce(A({},e,{err:n,Component:o,styleSheets:a,props:t}))}))}))}var Z=null,ee=!0;function te(){b.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),H&&performance.getEntriesByName("Next.js-hydration").forEach(H),ne())}function re(){if(b.ST){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),H&&(performance.getEntriesByName("Next.js-render").forEach(H),performance.getEntriesByName("Next.js-route-change-to-render").forEach(H)),ne(),["Next.js-route-change-to-render","Next.js-render"].forEach((function(e){return performance.clearMeasures(e)})))}}function ne(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach((function(e){return performance.clearMarks(e)}))}function oe(e){var t=e.children;return f.default.createElement($,{fn:function(e){return J({App:B,err:e}).catch((function(e){return console.error("Error rendering page: ",e)}))}},f.default.createElement(h.RouterContext.Provider,{value:E.makePublicRouterInstance(T)},f.default.createElement(p.HeadManagerContext.Provider,{value:F},f.default.createElement(R.ImageConfigContext.Provider,{value:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"",loader:"akamai",experimentalLayoutRaw:!1}},t))))}function ae(e,t){return f.default.createElement(e,Object.assign({},t))}var ie,ue=function(e){return function(t){var r=A({},t,{Component:z,err:I.err,router:T});return f.default.createElement(oe,null,ae(e,r))}};function ce(e){var t=e.App,n=e.Component,o=e.props,a=e.err,i=e.__N_RSC,u="initial"in e?void 0:e.styleSheets;n=n||ie.Component;var c=A({},o=o||ie.props,{Component:!!i?undefined:n,err:a,router:T});ie=c;var s,l=!1,p=new Promise((function(e,t){U&&U(),s=function(){U=null,e()},U=function(){l=!0,U=null;var e=new Error("Cancel rendering route");e.cancelled=!0,t(e)}}));function d(){s()}!function(){if(!u)return!1;var e=V(document.querySelectorAll("style[data-n-href]")),t=new Set(e.map((function(e){return e.getAttribute("data-n-href")}))),r=document.querySelector("noscript[data-n-css]"),n=null===r||void 0===r?void 0:r.getAttribute("data-n-css");u.forEach((function(e){var r=e.href,o=e.text;if(!t.has(r)){var a=document.createElement("style");a.setAttribute("data-n-href",r),a.setAttribute("media","x"),n&&a.setAttribute("nonce",n),document.head.appendChild(a),a.appendChild(document.createTextNode(o))}}))}();var h=f.default.createElement(f.default.Fragment,null,f.default.createElement(le,{callback:function(){if(u&&!l){for(var t=new Set(u.map((function(e){return e.href}))),r=V(document.querySelectorAll("style[data-n-href]")),n=r.map((function(e){return e.getAttribute("data-n-href")})),o=0;o=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=new Map,d=new Set,h=["onLoad","dangerouslySetInnerHTML","children","onError","strategy"],v=function(e){var t=e.src,r=e.id,n=e.onLoad,a=void 0===n?function(){}:n,i=e.dangerouslySetInnerHTML,c=e.children,s=void 0===c?"":c,l=e.strategy,f=void 0===l?"afterInteractive":l,v=e.onError,m=r||t;if(!m||!d.has(m)){if(p.has(t))return d.add(m),void p.get(t).then(a,v);var y=document.createElement("script"),g=new Promise((function(e,t){y.addEventListener("load",(function(t){e(),a&&a.call(this,t)})),y.addEventListener("error",(function(e){t(e)}))})).catch((function(e){v&&v(e)}));t&&p.set(t,g),d.add(m),i?y.innerHTML=i.__html||"":s?y.textContent="string"===typeof s?s:Array.isArray(s)?s.join(""):"":t&&(y.src=t);for(var b=0,w=Object.entries(e);b>>0,1)},emit:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o-1||r>-1)&&(e=e.substring(0,t>-1?t:r)),e}function A(e){return function(e,t){return(e=C(e))===t||e.startsWith(t+"/")}(e,"")}function T(e){return function(e,t){if(!e.startsWith("/")||!t)return e;var r=C(e);return f.normalizePathTrailingSlash("".concat(t).concat(r))+e.slice(r.length)}(e,"")}function N(e){return(e=e.slice("".length)).startsWith("/")||(e="/".concat(e)),e}function I(e){if(e.startsWith("/")||e.startsWith("#")||e.startsWith("?"))return!0;try{var t=g.getLocationOrigin(),r=new URL(e,t);return r.origin===t&&A(r.pathname)}catch(_){return!1}}function D(e,t,r){var n="",o=E.getRouteRegex(e),a=o.groups,i=(t!==e?S.getRouteMatcher(o)(t):"")||r;n=e;var u=Object.keys(a);return u.every((function(e){var t=i[e]||"",r=a[e],o=r.repeat,u=r.optional,c="[".concat(o?"...":"").concat(e,"]");return u&&(c="".concat(t?"":"/","[").concat(c,"]")),o&&!Array.isArray(t)&&(t=[t]),(u||e in i)&&(n=n.replace(c,o?t.map((function(e){return encodeURIComponent(e)})).join("/"):encodeURIComponent(t))||"/")}))||(n=""),{params:u,result:n}}function W(e,t){var r={};return Object.keys(e).forEach((function(n){t.includes(n)||(r[n]=e[n])})),r}function q(e,t,r){var n,o="string"===typeof t?t:k.formatWithValidation(t),a=o.match(/^[a-zA-Z]{1,}:\/\//),i=a?o.slice(a[0].length):o;if((i.split("?")[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href passed to next/router: ".concat(o,", repeated forward-slashes (//) or backslashes \\ are not valid in the href"));var u=g.normalizeRepeatedSlashes(i);o=(a?a[0]:"")+u}if(!I(o))return r?[o]:o;try{n=new URL(o.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(_){n=new URL("/","http://n")}try{var c=new URL(o,n);c.pathname=f.normalizePathTrailingSlash(c.pathname);var s="";if(b.isDynamicRoute(c.pathname)&&c.searchParams&&r){var l=x.searchParamsToUrlQuery(c.searchParams),p=D(c.pathname,c.pathname,l),d=p.result,h=p.params;d&&(s=k.formatWithValidation({pathname:d,hash:c.hash,query:W(l,h)}))}var v=c.origin===n.origin?c.href.slice(c.origin.length):c.href;return r?[v,s||v]:v}catch(m){return r?[o]:o}}function F(e){var t=g.getLocationOrigin();return e.startsWith(t)?e.substring(t.length):e}function U(e,t,r){var n=q(e,t,!0),o=c(n,2),a=o[0],i=o[1],u=g.getLocationOrigin(),s=a.startsWith(u),l=i&&i.startsWith(u);a=F(a),i=i?F(i):i;var f=s?a:T(a),p=r?F(q(e,r)):i||a;return{url:f,as:l?p:T(p)}}function B(e,t){var r=f.removePathTrailingSlash(v.denormalizePagePath(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some((function(t){if(b.isDynamicRoute(t)&&E.getRouteRegex(t).re.test(r))return e=t,!0})),f.removePathTrailingSlash(e))}var H=Symbol("SSG_DATA_NOT_FOUND");function z(e,t,r){return fetch(e,{credentials:"same-origin"}).then((function(n){if(!n.ok){if(t>1&&n.status>=500)return z(e,t-1,r);if(404===n.status)return n.json().then((function(e){if(e.notFound)return{notFound:H};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.text?n.text():n.json()}))}function V(e,t,r,n,o){var a=new URL(e,window.location.href).href;return void 0!==n[a]?n[a]:n[a]=z(e,t?3:1,{text:r}).catch((function(e){throw t||p.markAssetError(e),e})).then((function(e){return o||delete n[a],e})).catch((function(e){throw delete n[a],e}))}var G=function(){function e(t,r,n,o){var a=this,u=o.initialProps,c=o.pageLoader,s=o.App,l=o.wrapApp,p=o.Component,d=o.err,h=o.subscription,v=o.isFallback,m=o.locale,y=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview),_=o.isRsc;i(this,e),this.sdc={},this.sdr={},this.sde={},this._idx=0,this.onPopState=function(e){var t=e.state;if(t){if(t.__N){var r=t.url,n=t.as,o=t.options,i=t.idx;a._idx=i;var u=w.parseRelativeUrl(r).pathname;a.isSsr&&n===T(a.asPath)&&u===T(a.pathname)||a._bps&&!a._bps(t)||a.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&a._shallow,locale:o.locale||a.defaultLocale}),undefined)}}else{var c=a.pathname,s=a.query;a.changeState("replaceState",k.formatWithValidation({pathname:T(c),query:s}),g.getURL())}};var x=f.removePathTrailingSlash(t);this.components={},"/_error"!==t&&(this.components[x]={Component:p,initial:!0,props:u,err:d,__N_SSG:u&&u.__N_SSG,__N_SSP:u&&u.__N_SSP,__N_RSC:!!_}),this.components["/_app"]={Component:s,styleSheets:[]},this.events=e.events,this.pageLoader=c;var P=b.isDynamicRoute(t)&&self.__NEXT_DATA__.autoExport;if(this.basePath="",this.sub=h,this.clc=null,this._wrapApp=l,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!P&&!self.location.search),this.state={route:x,pathname:t,query:r,asPath:P?t:n,isPreview:!!y,locale:void 0,isFallback:v},!n.startsWith("//")){var S={locale:m};S._shouldResolveHref=n!==t,this.changeState("replaceState",k.formatWithValidation({pathname:T(t),query:r}),g.getURL(),S)}window.addEventListener("popstate",this.onPopState)}return u(e,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=U(this,e,t);return e=n.url,t=n.as,this.change("pushState",e,t,r)}},{key:"replace",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=U(this,e,t);return e=n.url,t=n.as,this.change("replaceState",e,t,r)}},{key:"change",value:function(){var t=a(n.mark((function t(r,o,a,i,u){var s,v,m,y,_,x,P,O,R,j,q,F,z,V,G,$,X,K,Y,Q,J,Z,ee,te,re,ne,oe,ae,ie,ue,ce,se,le,fe,pe,de,he,ve,me,ye,ge,be,we,_e,xe,Pe;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(I(o)){t.next=3;break}return window.location.href=o,t.abrupt("return",!1);case 3:s=i._h||i._shouldResolveHref||C(o)===C(a),v=l({},this.state),i._h&&(this.isReady=!0),m=v.locale,t.next=19;break;case 19:if(i._h||(this.isSsr=!1),g.ST&&performance.mark("routeChange"),y=i.shallow,_=void 0!==y&&y,x=i.scroll,P=void 0===x||x,O={shallow:_},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,O),a=T(L(A(a)?N(a):a,i.locale,this.defaultLocale)),R=M(A(a)?N(a):a,v.locale),this._inFlightRoute=a,j=m!==v.locale,i._h||!this.onlyAHashChange(R)||j){t.next=36;break}return v.asPath=R,e.events.emit("hashChangeStart",a,O),this.changeState(r,o,a,l(l({},i),{},{scroll:!1})),P&&this.scrollToHash(R),this.set(v,this.components[v.route],null),e.events.emit("hashChangeComplete",a,O),t.abrupt("return",!0);case 36:return q=w.parseRelativeUrl(o),F=q.pathname,z=q.query,t.prev=38,t.next=41,Promise.all([this.pageLoader.getPageList(),p.getClientBuildManifest(),this.pageLoader.getMiddlewareList()]);case 41:G=t.sent,$=c(G,2),V=$[0],$[1].__rewrites,t.next=51;break;case 47:return t.prev=47,t.t0=t.catch(38),window.location.href=a,t.abrupt("return",!1);case 51:if(this.urlIsNew(R)||j||(r="replaceState"),X=a,F=F?f.removePathTrailingSlash(N(F)):F,!s||"/_error"===F){t.next=67;break}i._shouldResolveHref=!0,t.next=65;break;case 61:X=K.asPath,K.matchedPage&&K.resolvedHref&&(F=K.resolvedHref,q.pathname=T(F),o=k.formatWithValidation(q)),t.next=67;break;case 65:q.pathname=B(F,V),q.pathname!==F&&(F=q.pathname,q.pathname=T(F),o=k.formatWithValidation(q));case 67:if(I(a)){t.next=72;break}t.next=70;break;case 70:return window.location.href=a,t.abrupt("return",!1);case 72:if(X=M(N(X),v.locale),i.shallow&&1!==i._h||1===i._h&&!b.isDynamicRoute(f.removePathTrailingSlash(F))){t.next=97;break}return t.next=76,this._preflightRequest({as:a,cache:!0,pages:V,pathname:F,query:z,locale:v.locale,isPreview:v.isPreview});case 76:if("rewrite"!==(Y=t.sent).type){t.next=85;break}z=l(l({},z),Y.parsedAs.query),X=Y.asPath,F=Y.resolvedHref,q.pathname=Y.resolvedHref,o=k.formatWithValidation(q),t.next=97;break;case 85:if("redirect"!==Y.type||!Y.newAs){t.next=89;break}return t.abrupt("return",this.change(r,Y.newUrl,Y.newAs,i));case 89:if("redirect"!==Y.type||!Y.destination){t.next=94;break}return window.location.href=Y.destination,t.abrupt("return",new Promise((function(){})));case 94:if("refresh"!==Y.type||a===window.location.pathname){t.next=97;break}return window.location.href=a,t.abrupt("return",new Promise((function(){})));case 97:if(Q=f.removePathTrailingSlash(F),!b.isDynamicRoute(Q)){t.next=113;break}if(J=w.parseRelativeUrl(X),Z=J.pathname,ee=E.getRouteRegex(Q),te=S.getRouteMatcher(ee)(Z),ne=(re=Q===Z)?D(Q,Z,z):{},te&&(!re||ne.result)){t.next=112;break}if(!((oe=Object.keys(ee.groups).filter((function(e){return!z[e]}))).length>0)){t.next=110;break}throw new Error((re?"The provided `href` (".concat(o,") value is missing query values (").concat(oe.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(Z,") is incompatible with the `href` value (").concat(Q,"). "))+"Read more: https://nextjs.org/docs/messages/".concat(re?"href-interpolation-failed":"incompatible-href-as"));case 110:t.next=113;break;case 112:re?a=k.formatWithValidation(Object.assign({},J,{pathname:ne.result,query:W(z,ne.params)})):Object.assign(z,te);case 113:return e.events.emit("routeChangeStart",a,O),t.prev=114,t.next=117,this.getRouteInfo(Q,F,z,a,X,O,v.locale,v.isPreview);case 117:if(ue=t.sent,se=(ce=ue).error,le=ce.props,fe=ce.__N_SSG,pe=ce.__N_SSP,(de=ue.Component)&&de.unstable_scriptLoader&&[].concat(de.unstable_scriptLoader()).forEach((function(e){d.handleClientScriptLoad(e.props)})),!fe&&!pe||!le){t.next=145;break}if(!le.pageProps||!le.pageProps.__N_REDIRECT){t.next=131;break}if(!(he=le.pageProps.__N_REDIRECT).startsWith("/")||!1===le.pageProps.__N_REDIRECT_BASE_PATH){t.next=129;break}return(ve=w.parseRelativeUrl(he)).pathname=B(ve.pathname,V),me=U(this,he,he),ye=me.url,ge=me.as,t.abrupt("return",this.change(r,ye,ge,i));case 129:return window.location.href=he,t.abrupt("return",new Promise((function(){})));case 131:if(v.isPreview=!!le.__N_PREVIEW,le.notFound!==H){t.next=145;break}return t.prev=133,t.next=136,this.fetchComponent("/404");case 136:be="/404",t.next=142;break;case 139:t.prev=139,t.t1=t.catch(133),be="/_error";case 142:return t.next=144,this.getRouteInfo(be,be,z,a,X,{shallow:!1},v.locale,v.isPreview);case 144:ue=t.sent;case 145:return e.events.emit("beforeHistoryChange",a,O),this.changeState(r,o,a,i),i._h&&"/_error"===F&&500===(null===(ae=self.__NEXT_DATA__.props)||void 0===ae||null===(ie=ae.pageProps)||void 0===ie?void 0:ie.statusCode)&&(null===le||void 0===le?void 0:le.pageProps)&&(le.pageProps.statusCode=500),we=i.shallow&&v.route===Q,xe=null!==(_e=i.scroll)&&void 0!==_e?_e:!we,Pe=xe?{x:0,y:0}:null,t.next=153,this.set(l(l({},v),{},{route:Q,pathname:F,query:z,asPath:R,isFallback:!1}),ue,null!==u&&void 0!==u?u:Pe).catch((function(e){if(!e.cancelled)throw e;se=se||e}));case 153:if(!se){t.next=156;break}throw e.events.emit("routeChangeError",se,R,O),se;case 156:return e.events.emit("routeChangeComplete",a,O),t.abrupt("return",!0);case 161:if(t.prev=161,t.t2=t.catch(114),!h.default(t.t2)||!t.t2.cancelled){t.next=165;break}return t.abrupt("return",!1);case 165:throw t.t2;case 166:case"end":return t.stop()}}),t,this,[[38,47],[114,161],[133,139]])})));return function(e,r,n,o,a){return t.apply(this,arguments)}}()},{key:"changeState",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===e&&g.getURL()===r||(this._shallow=n.shallow,window.history[e]({url:t,as:r,options:n,__N:!0,idx:this._idx="pushState"!==e?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var t=a(n.mark((function t(r,o,a,i,u,c){var s,l,f,d;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.cancelled){t.next=2;break}throw r;case 2:if(!p.isAssetError(r)&&!c){t.next=6;break}throw e.events.emit("routeChangeError",r,i,u),window.location.href=i,j();case 6:if(t.prev=6,"undefined"!==typeof s&&"undefined"!==typeof l){t.next=13;break}return t.next=10,this.fetchComponent("/_error");case 10:f=t.sent,s=f.page,l=f.styleSheets;case 13:if((d={props:undefined,Component:s,styleSheets:l,err:r,error:r}).props){t.next=25;break}return t.prev=15,t.next=18,this.getInitialProps(s,{err:r,pathname:o,query:a});case 18:d.props=t.sent,t.next=25;break;case 21:t.prev=21,t.t0=t.catch(15),console.error("Error in error page `getInitialProps`: ",t.t0),d.props={};case 25:return t.abrupt("return",d);case 28:return t.prev=28,t.t1=t.catch(6),t.abrupt("return",this.handleRouteInfoError(h.default(t.t1)?t.t1:new Error(t.t1+""),o,a,i,u,!0));case 31:case"end":return t.stop()}}),t,this,[[6,28],[15,21]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var e=a(n.mark((function e(t,r,o,a,i,u,c,s){var l,f,p,d,v,m,y,g,b,w,_,x,P,S=this;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,l=this.components[t],!u.shallow||!l||this.route!==t){e.next=4;break}return e.abrupt("return",l);case 4:if(f=void 0,l&&!("initial"in l)&&(f=l),e.t0=f,e.t0){e.next=11;break}return e.next=10,this.fetchComponent(t).then((function(e){return{Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP,__N_RSC:!!e.mod.__next_rsc__}}));case 10:e.t0=e.sent;case 11:p=e.t0,d=p.Component,v=p.__N_SSG,m=p.__N_SSP,y=p.__N_RSC,e.next=17;break;case 17:return b=m&&y,(v||m||y)&&(g=this.pageLoader.getDataHref({href:k.formatWithValidation({pathname:r,query:o}),asPath:i,ssg:v,flight:b,locale:c})),e.next=21,this._getData((function(){return(v||m||y)&&!b?V(g,S.isSsr,!1,v?S.sdc:S.sdr,!!v&&!s):S.getInitialProps(d,{pathname:r,query:o,asPath:a,locale:c,locales:S.locales,defaultLocale:S.defaultLocale})}));case 21:if(w=e.sent,!y){e.next=33;break}if(!b){e.next=31;break}return e.next=26,this._getData((function(){return S._getFlightData(g)}));case 26:_=e.sent,x=_.data,w.pageProps=Object.assign(w.pageProps,{__flight__:x}),e.next=33;break;case 31:P=w.__flight__,w.pageProps=Object.assign({},w.pageProps,{__flight__:P});case 33:return p.props=w,this.components[t]=p,e.abrupt("return",p);case 38:return e.prev=38,e.t1=e.catch(0),e.abrupt("return",this.handleRouteInfoError(h.getProperError(e.t1),r,o,a,u));case 41:case"end":return e.stop()}}),e,this,[[0,38]])})));return function(t,r,n,o,a,i,u,c){return e.apply(this,arguments)}}()},{key:"set",value:function(e,t,r){return this.state=e,this.sub(t,this.components["/_app"].Component,r)}},{key:"beforePopState",value:function(e){this._bps=e}},{key:"onlyAHashChange",value:function(e){if(!this.asPath)return!1;var t=this.asPath.split("#"),r=c(t,2),n=r[0],o=r[1],a=e.split("#"),i=c(a,2),u=i[0],s=i[1];return!(!s||n!==u||o!==s)||n===u&&o!==s}},{key:"scrollToHash",value:function(e){var t=e.split("#"),r=c(t,2)[1],n=void 0===r?"":r;if(""!==n&&"top"!==n){var o=document.getElementById(n);if(o)o.scrollIntoView();else{var a=document.getElementsByName(n)[0];a&&a.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(e){return this.asPath!==e}},{key:"prefetch",value:function(){var e=a(n.mark((function e(t){var r,o,a,i,u,c,s,p,d,h,v,m,y=this,g=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:t,o=g.length>2&&void 0!==g[2]?g[2]:{},a=w.parseRelativeUrl(t),i=a.pathname,u=a.query,e.next=7,this.pageLoader.getPageList();case 7:c=e.sent,s=r,e.next=21;break;case 12:if(d=e.sent,p=d.__rewrites,!(h=P.default(T(L(r,this.locale)),c,p,a.query,(function(e){return B(e,c)}),this.locales)).externalDest){e.next=17;break}return e.abrupt("return");case 17:s=M(N(h.asPath),this.locale),h.matchedPage&&h.resolvedHref&&(i=h.resolvedHref,a.pathname=i,t=k.formatWithValidation(a)),e.next=23;break;case 21:a.pathname=B(a.pathname,c),a.pathname!==i&&(i=a.pathname,a.pathname=i,t=k.formatWithValidation(a));case 23:e.next=25;break;case 25:return e.next=27,this._preflightRequest({as:T(r),cache:!0,pages:c,pathname:i,query:u,locale:this.locale,isPreview:this.isPreview});case 27:return"rewrite"===(v=e.sent).type&&(a.pathname=v.resolvedHref,i=v.resolvedHref,u=l(l({},u),v.parsedAs.query),s=v.asPath,t=k.formatWithValidation(a)),m=f.removePathTrailingSlash(i),e.next=32,Promise.all([this.pageLoader._isSsg(m).then((function(e){return!!e&&V(y.pageLoader.getDataHref({href:t,asPath:s,ssg:!0,locale:"undefined"!==typeof o.locale?o.locale:y.locale}),!1,!1,y.sdc,!0)})),this.pageLoader[o.priority?"loadPage":"prefetch"](m)]);case 32:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var e=a(n.mark((function e(t){var r,o,a,i,u=this;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=!1,o=this.clc=function(){r=!0},a=function(){if(r){var e=new Error('Abort fetching component for route: "'.concat(t,'"'));throw e.cancelled=!0,e}o===u.clc&&(u.clc=null)},e.prev=3,e.next=6,this.pageLoader.loadPage(t);case 6:return i=e.sent,a(),e.abrupt("return",i);case 11:throw e.prev=11,e.t0=e.catch(3),a(),e.t0;case 15:case"end":return e.stop()}}),e,this,[[3,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_getData",value:function(e){var t=this,r=!1,n=function(){r=!0};return this.clc=n,e().then((function(e){if(n===t.clc&&(t.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return e}))}},{key:"_getFlightData",value:function(e){return V(e,!0,!0,this.sdc,!1).then((function(e){return{data:e}}))}},{key:"_preflightRequest",value:function(){var e=a(n.mark((function e(t){var r,o,a,i,u,s,l,p,d,h,v,y,g;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=C(t.as),o=M(A(r)?N(r):r,t.locale),e.next=4,this.pageLoader.getMiddlewareList();case 4:if(a=e.sent,a.some((function(e){var t=c(e,2),r=t[0],n=t[1];return S.getRouteMatcher(O.getMiddlewareRegex(r,!n))(o)}))){e.next=8;break}return e.abrupt("return",{type:"next"});case 8:return i=L(t.as,t.locale),e.prev=9,e.next=12,this._getPreflightData({preflightHref:i,shouldCache:t.cache,isPreview:t.isPreview});case 12:u=e.sent,e.next=18;break;case 15:return e.prev=15,e.t0=e.catch(9),e.abrupt("return",{type:"redirect",destination:t.as});case 18:if(!u.rewrite){e.next=25;break}if(u.rewrite.startsWith("/")){e.next=21;break}return e.abrupt("return",{type:"redirect",destination:t.as});case 21:return s=w.parseRelativeUrl(m.normalizeLocalePath(A(u.rewrite)?N(u.rewrite):u.rewrite,this.locales).pathname),l=f.removePathTrailingSlash(s.pathname),t.pages.includes(l)?(p=!0,d=l):(d=B(l,t.pages))!==s.pathname&&t.pages.includes(d)&&(p=!0),e.abrupt("return",{type:"rewrite",asPath:s.pathname,parsedAs:s,matchedPage:p,resolvedHref:d});case 25:if(!u.redirect){e.next=31;break}if(!u.redirect.startsWith("/")){e.next=30;break}return h=f.removePathTrailingSlash(m.normalizeLocalePath(A(u.redirect)?N(u.redirect):u.redirect,this.locales).pathname),v=U(this,h,h),y=v.url,g=v.as,e.abrupt("return",{type:"redirect",newUrl:y,newAs:g});case 30:return e.abrupt("return",{type:"redirect",destination:u.redirect});case 31:if(!u.refresh||u.ssr){e.next=33;break}return e.abrupt("return",{type:"refresh"});case 33:return e.abrupt("return",{type:"next"});case 34:case"end":return e.stop()}}),e,this,[[9,15]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_getPreflightData",value:function(e){var t=this,r=e.preflightHref,n=e.shouldCache,o=void 0!==n&&n,a=e.isPreview,i=new URL(r,window.location.href).href;return!a&&o&&this.sde[i]?Promise.resolve(this.sde[i]):fetch(r,{method:"HEAD",credentials:"same-origin",headers:{"x-middleware-preflight":"1"}}).then((function(e){if(!e.ok)throw new Error("Failed to preflight request");return{cache:e.headers.get("x-middleware-cache"),redirect:e.headers.get("Location"),refresh:e.headers.has("x-middleware-refresh"),rewrite:e.headers.get("x-middleware-rewrite"),ssr:!!e.headers.get("x-middleware-ssr")}})).then((function(e){return o&&"no-cache"!==e.cache&&(t.sde[i]=e),e})).catch((function(e){throw delete t.sde[i],e}))}},{key:"getInitialProps",value:function(e,t){var r=this.components["/_app"].Component,n=this._wrapApp(r);return t.AppTree=n,g.loadGetInitialProps(r,{AppTree:n,Component:e,router:this,ctx:t})}},{key:"abortComponentLoad",value:function(t,r){this.clc&&(e.events.emit("routeChangeError",j(),t,r),this.clc(),this.clc=null)}},{key:"route",get:function(){return this.state.route}},{key:"pathname",get:function(){return this.state.pathname}},{key:"query",get:function(){return this.state.query}},{key:"asPath",get:function(){return this.state.asPath}},{key:"locale",get:function(){return this.state.locale}},{key:"isFallback",get:function(){return this.state.isFallback}},{key:"isPreview",get:function(){return this.state.isPreview}}]),e}();t.default=G,G.events=y.default()},17389:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUrl=a,t.formatWithValidation=function(e){0;return a(e)},t.urlObjectKeys=void 0;var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(24470));var o=/https?|ftp|gopher|file/;function a(e){var t=e.auth,r=e.hostname,a=e.protocol||"",i=e.pathname||"",u=e.hash||"",c=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?"[".concat(r,"]"):r),e.port&&(s+=":"+e.port)),c&&"object"===typeof c&&(c=String(n.urlQueryToSearchParams(c)));var l=e.search||c&&"?".concat(c)||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s=""),u&&"#"!==u[0]&&(u="#"+u),l&&"?"!==l[0]&&(l="?"+l),i=i.replace(/[?#]/g,encodeURIComponent),l=l.replace("#","%23"),"".concat(a).concat(s).concat(i).concat(l).concat(u)}t.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"]},60838:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r="/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index".concat(e):"".concat(e);return r+t}},70837:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMiddlewareRegex=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=n.getParametrizedRoute(e),o=t?"(?!_next).*":"",a=t?"(?:(/.*)?)":"";if("routeKeys"in r)return"/"===r.parameterizedRoute?{groups:{},namedRegex:"^/".concat(o,"$"),re:new RegExp("^/".concat(o,"$")),routeKeys:{}}:{groups:r.groups,namedRegex:"^".concat(r.namedParameterizedRoute).concat(a,"$"),re:new RegExp("^".concat(r.parameterizedRoute).concat(a,"$")),routeKeys:r.routeKeys};if("/"===r.parameterizedRoute)return{groups:{},re:new RegExp("^/".concat(o,"$"))};return{groups:{},re:new RegExp("^".concat(r.parameterizedRoute).concat(a,"$"))}};var n=r(75566)},27722:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getMiddlewareRegex",{enumerable:!0,get:function(){return n.getMiddlewareRegex}}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o.getRouteMatcher}}),Object.defineProperty(t,"getRouteRegex",{enumerable:!0,get:function(){return a.getRouteRegex}}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return i.getSortedRoutes}}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return u.isDynamicRoute}});var n=r(70837),o=r(50859),a=r(75566),i=r(10125),u=r(52829)},52829:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDynamicRoute=function(e){return r.test(e)};var r=/\/\[[^/]+?\](?=\/|$)/},22226:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseRelativeUrl=function(e,t){var r=new URL(n.getLocationOrigin()),a=t?new URL(t,r):r,i=new URL(e,a),u=i.pathname,c=i.searchParams,s=i.search,l=i.hash,f=i.href;if(i.origin!==r.origin)throw new Error("invariant: invalid relative URL, router received ".concat(e));return{pathname:u,query:o.searchParamsToUrlQuery(c),search:s,hash:l,href:f.slice(r.origin.length)}};var n=r(67206),o=r(24470)},24470:function(e,t,r){"use strict";var n=r(85696);function o(e){return"string"===typeof e||"number"===typeof e&&!isNaN(e)||"boolean"===typeof e?String(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.searchParamsToUrlQuery=function(e){var t={};return e.forEach((function(e,r){"undefined"===typeof t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]})),t},t.urlQueryToSearchParams=function(e){var t=new URLSearchParams;return Object.entries(e).forEach((function(e){var r=n(e,2),a=r[0],i=r[1];Array.isArray(i)?i.forEach((function(e){return t.append(a,o(e))})):t.set(a,o(i))})),t},t.assign=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:"/",r=n(this.children.keys()).sort();null!==this.slugName&&r.splice(r.indexOf("[]"),1),null!==this.restSlugName&&r.splice(r.indexOf("[...]"),1),null!==this.optionalRestSlugName&&r.splice(r.indexOf("[[...]]"),1);var o=r.map((function(r){return e.children.get(r)._smoosh("".concat(t).concat(r,"/"))})).reduce((function(e,t){return[].concat(n(e),n(t))}),[]);if(null!==this.slugName&&o.push.apply(o,n(this.children.get("[]")._smoosh("".concat(t,"[").concat(this.slugName,"]/")))),!this.placeholder){var a="/"===t?"/":t.slice(0,-1);if(null!=this.optionalRestSlugName)throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("'.concat(a,'" and "').concat(a,"[[...").concat(this.optionalRestSlugName,']]").'));o.unshift(a)}return null!==this.restSlugName&&o.push.apply(o,n(this.children.get("[...]")._smoosh("".concat(t,"[...").concat(this.restSlugName,"]/")))),null!==this.optionalRestSlugName&&o.push.apply(o,n(this.children.get("[[...]]")._smoosh("".concat(t,"[[...").concat(this.optionalRestSlugName,"]]/")))),o}},{key:"_insert",value:function(t,r,n){if(0!==t.length){if(n)throw new Error("Catch-all must be the last part of the URL.");var o=t[0];if(o.startsWith("[")&&o.endsWith("]")){var a=function(e,t){if(null!==e&&e!==t)throw new Error("You cannot use different slug names for the same dynamic path ('".concat(e,"' !== '").concat(t,"')."));r.forEach((function(e){if(e===t)throw new Error('You cannot have the same slug name "'.concat(t,'" repeat within a single dynamic path'));if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw new Error('You cannot have the slug names "'.concat(e,'" and "').concat(t,'" differ only by non-word symbols within a single dynamic path'))})),r.push(t)},i=o.slice(1,-1),u=!1;if(i.startsWith("[")&&i.endsWith("]")&&(i=i.slice(1,-1),u=!0),i.startsWith("...")&&(i=i.substring(3),n=!0),i.startsWith("[")||i.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('".concat(i,"')."));if(i.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('".concat(i,"')."));if(n)if(u){if(null!=this.restSlugName)throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...'.concat(this.restSlugName,']" and "').concat(t[0],'" ).'));a(this.optionalRestSlugName,i),this.optionalRestSlugName=i,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...'.concat(this.optionalRestSlugName,']]" and "').concat(t[0],'").'));a(this.restSlugName,i),this.restSlugName=i,o="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'.concat(t[0],'").'));a(this.slugName,i),this.slugName=i,o="[]"}}this.children.has(o)||this.children.set(o,new e),this.children.get(o)._insert(t.slice(1),r,n)}else this.placeholder=!1}}]),e}()},62156:function(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.setConfig=function(e){r=e},t.default=void 0;t.default=function(){return r}},67206:function(e,t,r){"use strict";var n=r(87794),o=r(33227),a=r(85971),i=r(52715),u=r(91193),c=r(36558),s=r(49376);function l(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=u(e);if(t){var o=u(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return i(this,r)}}function f(){var e=window.location,t=e.protocol,r=e.hostname,n=e.port;return"".concat(t,"//").concat(r).concat(n?":"+n:"")}function p(e){return"string"===typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function h(e,t){return v.apply(this,arguments)}function v(){return(v=s(n.mark((function e(t,r){var o,a,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.next=4;break;case 4:if(o=r.res||r.ctx&&r.ctx.res,t.getInitialProps){e.next=12;break}if(!r.ctx||!r.Component){e.next=11;break}return e.next=9,h(r.Component,r.ctx);case 9:return e.t0=e.sent,e.abrupt("return",{pageProps:e.t0});case 11:return e.abrupt("return",{});case 12:return e.next=14,t.getInitialProps(r);case 14:if(a=e.sent,!o||!d(o)){e.next=17;break}return e.abrupt("return",a);case 17:if(a){e.next=20;break}throw i='"'.concat(p(t),'.getInitialProps()" should resolve to an object. But found "').concat(a,'" instead.'),new Error(i);case 20:return e.abrupt("return",a);case 22:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.execOnce=function(e){var t,r=!1;return function(){return r||(r=!0,t=e.apply(void 0,arguments)),t}},t.getLocationOrigin=f,t.getURL=function(){var e=window.location.href,t=f();return e.substring(t.length)},t.getDisplayName=p,t.isResSent=d,t.normalizeRepeatedSlashes=function(e){var t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?".concat(t.slice(1).join("?")):"")},t.loadGetInitialProps=h,t.ST=t.SP=t.warnOnce=void 0;t.warnOnce=function(e){};var m="undefined"!==typeof performance;t.SP=m;var y=m&&"function"===typeof performance.mark&&"function"===typeof performance.measure;t.ST=y;var g=function(e){a(r,e);var t=l(r);function r(){return o(this,r),t.apply(this,arguments)}return r}(c(Error));t.DecodeError=g;var b=function(e){a(r,e);var t=l(r);function r(){return o(this,r),t.apply(this,arguments)}return r}(c(Error));t.NormalizeError=b},40037:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))})},90479:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(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 o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:R(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(r){Function("r","regeneratorRuntime = r")(t)}},38745:function(e){!function(){var t={106:function(e,t){!function(e){"use strict";var t,r,n,o,a=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},i=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var r=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return r.observe({type:e,buffered:!0}),r}}catch(e){}},u=function(e,t){var r=function r(n){"pagehide"!==n.type&&"hidden"!==document.visibilityState||(e(n),t&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)},c=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},s=function(e,t,r){var n;return function(o){t.value>=0&&(o||r)&&(t.delta=t.value-(n||0),(t.delta||void 0===n)&&(n=t.value,e(t)))}},l=-1,f=function(){return"hidden"===document.visibilityState?0:1/0},p=function(){u((function(e){var t=e.timeStamp;l=t}),!0)},d=function(){return l<0&&(l=f(),p(),c((function(){setTimeout((function(){l=f(),p()}),0)}))),{get firstHiddenTime(){return l}}},h=function(e,t){var r,n=d(),o=a("FCP"),u=function(e){"first-contentful-paint"===e.name&&(f&&f.disconnect(),e.startTime=0&&r1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var r=function(){b(e,t),o()},n=function(){o()},o=function(){removeEventListener("pointerup",r,y),removeEventListener("pointercancel",n,y)};addEventListener("pointerup",r,y),addEventListener("pointercancel",n,y)}(t,e):b(t,e)}},x=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,_,y)}))},P=new Set;e.getCLS=function(e,t){v||(h((function(e){m=e.value})),v=!0);var r,n=function(t){m>-1&&e(t)},o=a("CLS",0),l=0,f=[],p=function(e){if(!e.hadRecentInput){var t=f[0],n=f[f.length-1];l&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(l+=e.value,f.push(e)):(l=e.value,f=[e]),l>o.value&&(o.value=l,o.entries=f,r())}},d=i("layout-shift",p);d&&(r=s(n,o,t),u((function(){d.takeRecords().map(p),r(!0)})),c((function(){l=0,m=-1,o=a("CLS",0),r=s(n,o,t)})))},e.getFCP=h,e.getFID=function(e,n){var l,f=d(),p=a("FID"),h=function(e){e.startTime{s=e},t.getSafeInfo=function(e,t){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:e,address:t}})},t.getIncomingTransfers=function(e,t,n,r){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:e,address:t},query:n},r)},t.getModuleTransactions=function(e,t,n,r){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:e,address:t},query:n},r)},t.getMultisigTransactions=function(e,t,n,r){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:e,address:t},query:n},r)},t.getBalances=function(e,t,n="usd",r={}){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:e,address:t,currency:n},query:r})},t.getFiatCurrencies=function(){return(0,a.getEndpoint)(s,"/v1/balances/supported-fiat-codes")},t.getOwnedSafes=function(e,t){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:e,address:t}})},t.getCollectibles=function(e,t,n={}){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:n})},t.getCollectiblesPage=function(e,t,n={},r){return(0,a.getEndpoint)(s,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:n},r)},t.getTransactionHistory=function(e,t,n){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:e,safe_address:t},query:{}},n)},t.getTransactionQueue=function(e,t,n,r){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:e,safe_address:t},query:{trusted:r}},n)},t.getTransactionDetails=function(e,t){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:e,transactionId:t}})},t.postSafeGasEstimation=function(e,t,n){return(0,a.postEndpoint)(s,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:e,safe_address:t},body:n})},t.proposeTransaction=function(e,t,n){return(0,a.postEndpoint)(s,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:e,safe_address:t},body:n})},t.getChainsConfig=function(e){return(0,a.getEndpoint)(s,"/v1/chains",{query:e})},t.getChainConfig=function(e){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}",{path:{chainId:e}})},t.getSafeApps=function(e,t={}){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safe-apps",{path:{chainId:e},query:t})},t.getMasterCopies=function(e){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:e}})},t.getDecodedData=function(e,t){return(0,a.postEndpoint)(s,"/v1/chains/{chainId}/data-decoder",{path:{chainId:e},body:{data:t}})},t.getSafeMessages=function(e,t,n){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},query:{}},n)},t.getSafeMessage=function(e,t){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:e,message_hash:t}})},t.proposeSafeMessage=function(e,t,n){return(0,a.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},body:n})},t.confirmSafeMessage=function(e,t,n){return(0,a.postEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:e,message_hash:t},body:n})}},28996:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FEATURES=t.GAS_PRICE_TYPE=t.RPC_AUTHENTICATION=void 0,function(e){e.API_KEY_PATH="API_KEY_PATH",e.NO_AUTHENTICATION="NO_AUTHENTICATION",e.UNKNOWN="UNKNOWN"}(t.RPC_AUTHENTICATION||(t.RPC_AUTHENTICATION={})),function(e){e.ORACLE="ORACLE",e.FIXED="FIXED",e.UNKNOWN="UNKNOWN"}(t.GAS_PRICE_TYPE||(t.GAS_PRICE_TYPE={})),function(e){e.ERC721="ERC721",e.SAFE_APPS="SAFE_APPS",e.CONTRACT_INTERACTION="CONTRACT_INTERACTION",e.DOMAIN_LOOKUP="DOMAIN_LOOKUP",e.SPENDING_LIMIT="SPENDING_LIMIT",e.EIP1559="EIP1559",e.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",e.TX_SIMULATION="TX_SIMULATION",e.EIP1271="EIP1271"}(t.FEATURES||(t.FEATURES={}))},23075:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenType=void 0,function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_TOKEN="NATIVE_TOKEN"}(t.TokenType||(t.TokenType={}))},83571:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},80247:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22394:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeAppSocialPlatforms=t.SafeAppFeatures=t.SafeAppAccessPolicyTypes=void 0,function(e){e.NoRestrictions="NO_RESTRICTIONS",e.DomainAllowlist="DOMAIN_ALLOWLIST"}(t.SafeAppAccessPolicyTypes||(t.SafeAppAccessPolicyTypes={})),function(e){e.BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS"}(t.SafeAppFeatures||(t.SafeAppFeatures={})),function(e){e.TWITTER="TWITTER",e.GITHUB="GITHUB",e.DISCORD="DISCORD"}(t.SafeAppSocialPlatforms||(t.SafeAppSocialPlatforms={}))},32733:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationVersionState=void 0,function(e){e.UP_TO_DATE="UP_TO_DATE",e.OUTDATED="OUTDATED",e.UNKNOWN="UNKNOWN"}(t.ImplementationVersionState||(t.ImplementationVersionState={}))},43150:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeMessageStatus=t.SafeMessageListItemType=void 0,function(e){e.DATE_LABEL="DATE_LABEL",e.MESSAGE="MESSAGE"}(t.SafeMessageListItemType||(t.SafeMessageListItemType={})),function(e){e.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",e.CONFIRMED="CONFIRMED"}(t.SafeMessageStatus||(t.SafeMessageStatus={}))},17584:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LabelValue=t.DetailedExecutionInfoType=t.TransactionListItemType=t.ConflictType=t.TransactionInfoType=t.SettingsInfoType=t.TransactionTokenType=t.TransferDirection=t.TransactionStatus=t.Operation=void 0,function(e){e[e.CALL=0]="CALL",e[e.DELEGATE=1]="DELEGATE"}(t.Operation||(t.Operation={})),function(e){e.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",e.AWAITING_EXECUTION="AWAITING_EXECUTION",e.CANCELLED="CANCELLED",e.FAILED="FAILED",e.SUCCESS="SUCCESS"}(t.TransactionStatus||(t.TransactionStatus={})),function(e){e.INCOMING="INCOMING",e.OUTGOING="OUTGOING",e.UNKNOWN="UNKNOWN"}(t.TransferDirection||(t.TransferDirection={})),function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_COIN="NATIVE_COIN"}(t.TransactionTokenType||(t.TransactionTokenType={})),function(e){e.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",e.ADD_OWNER="ADD_OWNER",e.REMOVE_OWNER="REMOVE_OWNER",e.SWAP_OWNER="SWAP_OWNER",e.CHANGE_THRESHOLD="CHANGE_THRESHOLD",e.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",e.ENABLE_MODULE="ENABLE_MODULE",e.DISABLE_MODULE="DISABLE_MODULE",e.SET_GUARD="SET_GUARD",e.DELETE_GUARD="DELETE_GUARD"}(t.SettingsInfoType||(t.SettingsInfoType={})),function(e){e.TRANSFER="Transfer",e.SETTINGS_CHANGE="SettingsChange",e.CUSTOM="Custom",e.CREATION="Creation"}(t.TransactionInfoType||(t.TransactionInfoType={})),function(e){e.NONE="None",e.HAS_NEXT="HasNext",e.END="End"}(t.ConflictType||(t.ConflictType={})),function(e){e.TRANSACTION="TRANSACTION",e.LABEL="LABEL",e.CONFLICT_HEADER="CONFLICT_HEADER",e.DATE_LABEL="DATE_LABEL"}(t.TransactionListItemType||(t.TransactionListItemType={})),function(e){e.MULTISIG="MULTISIG",e.MODULE="MODULE"}(t.DetailedExecutionInfoType||(t.DetailedExecutionInfoType={})),function(e){e.Queued="Queued",e.Next="Next"}(t.LabelValue||(t.LabelValue={}))},59136:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchData=t.stringifyQuery=t.insertParams=void 0;const a=o(n(54098));t.insertParams=function(e,t){return t?Object.keys(t).reduce(((e,n)=>function(e,t,n){return e.replace(new RegExp(`\\{${t}\\}`,"g"),n)}(e,n,String(t[n]))),e):e},t.stringifyQuery=function(e){if(!e)return"";const t=new URLSearchParams;Object.keys(e).forEach((n=>{null!=e[n]&&t.append(n,String(e[n]))}));const n=t.toString();return n?`?${n}`:""},t.fetchData=function(e,t){return r(this,void 0,void 0,(function*(){let n;null!=t&&(n={method:"POST",body:"string"===typeof t?t:JSON.stringify(t),headers:{"Content-Type":"application/json"}});const r=yield(0,a.default)(e,n);let o;try{o=yield r.json()}catch(s){if(r.headers&&"0"!==r.headers.get("content-length"))throw new Error(`Invalid response content: ${r.statusText}`)}if(!r.ok){const e="object"===typeof(i=o)&&null!==i&&"code"in i&&"message"in i?`${o.code}: ${o.message}`:r.statusText;throw new Error(e)}var i;return o}))}},98099:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(97117);function o(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function a(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function i(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function s(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function c(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function u(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function l(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function d(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function f(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),l(e/4294967296>>>0,t,n),l(e>>>0,t,n+4),t}function h(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),d(e>>>0,t,n),d(e/4294967296>>>0,t,n+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=o,t.writeInt16BE=o,t.writeUint16LE=a,t.writeInt16LE=a,t.readInt32BE=i,t.readUint32BE=s,t.readInt32LE=c,t.readUint32LE=u,t.writeUint32BE=l,t.writeInt32BE=l,t.writeUint32LE=d,t.writeInt32LE=d,t.readInt64BE=function(e,t){void 0===t&&(t=0);var n=i(e,t),r=i(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*s(e,t)+s(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var n=c(e,t);return 4294967296*c(e,t+4)+n-4294967296*(n>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var n=u(e,t);return 4294967296*u(e,t+4)+n},t.writeUint64BE=f,t.writeInt64BE=f,t.writeUint64LE=h,t.writeInt64LE=h,t.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,o=1,a=e/8+n-1;a>=n;a--)r+=t[a]*o,o*=256;return r},t.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,o=1,a=n;a=o;i--)n[i]=t/a&255,a*=256;return n},t.writeUintLE=function(e,t,n,o){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===o&&(o=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!r.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var a=1,i=o;i>>16|k<<16)|0)>>>20|P<<12,C=(C^=T=T+(_=(_^=E=E+C|0)>>>16|_<<16)|0)>>>20|C<<12,j=(j^=S=S+(N=(N^=A=A+j|0)>>>16|N<<16)|0)>>>20|j<<12,I=(I^=B=B+(M=(M^=x=x+I|0)>>>16|M<<16)|0)>>>20|I<<12,j=(j^=S=S+(N=(N^=A=A+j|0)>>>24|N<<8)|0)>>>25|j<<7,I=(I^=B=B+(M=(M^=x=x+I|0)>>>24|M<<8)|0)>>>25|I<<7,C=(C^=T=T+(_=(_^=E=E+C|0)>>>24|_<<8)|0)>>>25|C<<7,P=(P^=O=O+(k=(k^=w=w+P|0)>>>24|k<<8)|0)>>>25|P<<7,C=(C^=S=S+(M=(M^=w=w+C|0)>>>16|M<<16)|0)>>>20|C<<12,j=(j^=B=B+(k=(k^=E=E+j|0)>>>16|k<<16)|0)>>>20|j<<12,I=(I^=O=O+(_=(_^=A=A+I|0)>>>16|_<<16)|0)>>>20|I<<12,P=(P^=T=T+(N=(N^=x=x+P|0)>>>16|N<<16)|0)>>>20|P<<12,I=(I^=O=O+(_=(_^=A=A+I|0)>>>24|_<<8)|0)>>>25|I<<7,P=(P^=T=T+(N=(N^=x=x+P|0)>>>24|N<<8)|0)>>>25|P<<7,j=(j^=B=B+(k=(k^=E=E+j|0)>>>24|k<<8)|0)>>>25|j<<7,C=(C^=S=S+(M=(M^=w=w+C|0)>>>24|M<<8)|0)>>>25|C<<7;r.writeUint32LE(w+o|0,e,0),r.writeUint32LE(E+a|0,e,4),r.writeUint32LE(A+i|0,e,8),r.writeUint32LE(x+s|0,e,12),r.writeUint32LE(P+c|0,e,16),r.writeUint32LE(C+u|0,e,20),r.writeUint32LE(j+l|0,e,24),r.writeUint32LE(I+d|0,e,28),r.writeUint32LE(O+f|0,e,32),r.writeUint32LE(T+h|0,e,36),r.writeUint32LE(S+p|0,e,40),r.writeUint32LE(B+m|0,e,44),r.writeUint32LE(k+b|0,e,48),r.writeUint32LE(_+g|0,e,52),r.writeUint32LE(N+y|0,e,56),r.writeUint32LE(M+v|0,e,60)}function i(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=i,t.stream=function(e,t,n,r){return void 0===r&&(r=0),o.wipe(n),i(e,t,n,n,r)}},15501:function(e,t,n){"use strict";var r=n(25439),o=n(63027),a=n(17309),i=n(98099),s=n(4153);t.Cv=32,t.WH=12,t.pg=16;var c=new Uint8Array(16),u=function(){function e(e){if(this.nonceLength=t.WH,this.tagLength=t.pg,e.length!==t.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,n,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var i=new Uint8Array(16);i.set(e,i.length-e.length);var s=new Uint8Array(32);r.stream(this._key,i,s,4);var c,u=t.length+this.tagLength;if(o){if(o.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=o}else c=new Uint8Array(u);return r.streamXOR(this._key,i,t,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),s,c.subarray(0,c.length-this.tagLength),n),a.wipe(i),c},e.prototype.open=function(e,t,n,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length0&&s.update(c.subarray(r.length%16))),s.update(n),n.length%16>0&&s.update(c.subarray(n.length%16));var u=new Uint8Array(8);r&&i.writeUint64LE(r.length,u),s.update(u),i.writeUint64LE(n.length,u),s.update(u);for(var l=s.digest(),d=0;d>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,n){return~(e-1)&t|e-1&n},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=n,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==n(e,t)}},79984:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return"undefined"!==typeof e.saveState&&"undefined"!==typeof e.restoreState&&"undefined"!==typeof e.cleanSavedState}},512:function(e,t,n){"use strict";var r=n(25629),o=n(17309),a=function(){function e(e,t,n,o){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=o;var a=r.hmac(this._hash,n,t);this._hmac=new r.HMAC(e,a),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;nthis.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var o=0;o>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},63027:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4153),o=n(17309);t.DIGEST_LENGTH=16;var a=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=e[0]|e[1]<<8;this._r[0]=8191&n;var r=e[2]|e[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var o=e[4]|e[5]<<8;this._r[2]=7939&(r>>>10|o<<6);var a=e[6]|e[7]<<8;this._r[3]=8191&(o>>>7|a<<9);var i=e[8]|e[9]<<8;this._r[4]=255&(a>>>4|i<<12),this._r[5]=i>>>1&8190;var s=e[10]|e[11]<<8;this._r[6]=8191&(i>>>14|s<<2);var c=e[12]|e[13]<<8;this._r[7]=8065&(s>>>11|c<<5);var u=e[14]|e[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,o=this._h[0],a=this._h[1],i=this._h[2],s=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],d=this._h[7],f=this._h[8],h=this._h[9],p=this._r[0],m=this._r[1],b=this._r[2],g=this._r[3],y=this._r[4],v=this._r[5],w=this._r[6],E=this._r[7],A=this._r[8],x=this._r[9];n>=16;){var P=e[t+0]|e[t+1]<<8;o+=8191&P;var C=e[t+2]|e[t+3]<<8;a+=8191&(P>>>13|C<<3);var j=e[t+4]|e[t+5]<<8;i+=8191&(C>>>10|j<<6);var I=e[t+6]|e[t+7]<<8;s+=8191&(j>>>7|I<<9);var O=e[t+8]|e[t+9]<<8;c+=8191&(I>>>4|O<<12),u+=O>>>1&8191;var T=e[t+10]|e[t+11]<<8;l+=8191&(O>>>14|T<<2);var S=e[t+12]|e[t+13]<<8;d+=8191&(T>>>11|S<<5);var B=e[t+14]|e[t+15]<<8,k=0,_=k;_+=o*p,_+=a*(5*x),_+=i*(5*A),_+=s*(5*E),k=(_+=c*(5*w))>>>13,_&=8191,_+=u*(5*v),_+=l*(5*y),_+=d*(5*g),_+=(f+=8191&(S>>>8|B<<8))*(5*b);var N=k+=(_+=(h+=B>>>5|r)*(5*m))>>>13;N+=o*m,N+=a*p,N+=i*(5*x),N+=s*(5*A),k=(N+=c*(5*E))>>>13,N&=8191,N+=u*(5*w),N+=l*(5*v),N+=d*(5*y),N+=f*(5*g),k+=(N+=h*(5*b))>>>13,N&=8191;var M=k;M+=o*b,M+=a*m,M+=i*p,M+=s*(5*x),k=(M+=c*(5*A))>>>13,M&=8191,M+=u*(5*E),M+=l*(5*w),M+=d*(5*v),M+=f*(5*y);var R=k+=(M+=h*(5*g))>>>13;R+=o*g,R+=a*b,R+=i*m,R+=s*p,k=(R+=c*(5*x))>>>13,R&=8191,R+=u*(5*A),R+=l*(5*E),R+=d*(5*w),R+=f*(5*v);var F=k+=(R+=h*(5*y))>>>13;F+=o*y,F+=a*g,F+=i*b,F+=s*m,k=(F+=c*p)>>>13,F&=8191,F+=u*(5*x),F+=l*(5*A),F+=d*(5*E),F+=f*(5*w);var U=k+=(F+=h*(5*v))>>>13;U+=o*v,U+=a*y,U+=i*g,U+=s*b,k=(U+=c*m)>>>13,U&=8191,U+=u*p,U+=l*(5*x),U+=d*(5*A),U+=f*(5*E);var L=k+=(U+=h*(5*w))>>>13;L+=o*w,L+=a*v,L+=i*y,L+=s*g,k=(L+=c*b)>>>13,L&=8191,L+=u*m,L+=l*p,L+=d*(5*x),L+=f*(5*A);var D=k+=(L+=h*(5*E))>>>13;D+=o*E,D+=a*w,D+=i*v,D+=s*y,k=(D+=c*g)>>>13,D&=8191,D+=u*b,D+=l*m,D+=d*p,D+=f*(5*x);var q=k+=(D+=h*(5*A))>>>13;q+=o*A,q+=a*E,q+=i*w,q+=s*v,k=(q+=c*y)>>>13,q&=8191,q+=u*g,q+=l*b,q+=d*m,q+=f*p;var H=k+=(q+=h*(5*x))>>>13;H+=o*x,H+=a*A,H+=i*E,H+=s*w,k=(H+=c*v)>>>13,H&=8191,H+=u*y,H+=l*g,H+=d*b,H+=f*m,o=_=8191&(k=(k=((k+=(H+=h*p)>>>13)<<2)+k|0)+(_&=8191)|0),a=N+=k>>>=13,i=M&=8191,s=R&=8191,c=F&=8191,u=U&=8191,l=L&=8191,d=D&=8191,f=q&=8191,h=H&=8191,t+=16,n-=16}this._h[0]=o,this._h[1]=a,this._h[2]=i,this._h[3]=s,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=d,this._h[8]=f,this._h[9]=h},e.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,o,a,i=new Uint16Array(10);if(this._leftover){for(a=this._leftover,this._buffer[a++]=1;a<16;a++)this._buffer[a]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,a=2;a<10;a++)this._h[a]+=n,n=this._h[a]>>>13,this._h[a]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,i[0]=this._h[0]+5,n=i[0]>>>13,i[0]&=8191,a=1;a<10;a++)i[a]=this._h[a]+n,n=i[a]>>>13,i[a]&=8191;for(i[9]-=8192,r=(1^n)-1,a=0;a<10;a++)i[a]&=r;for(r=~r,a=0;a<10;a++)this._h[a]=this._h[a]&r|i[a];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),o=this._h[0]+this._pad[0],this._h[0]=65535&o,a=1;a<8;a++)o=(this._h[a]+this._pad[a]|0)+(o>>>16)|0,this._h[a]=65535&o;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var o=0;o=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(o=0;o256)throw new Error("randomString charset is too long");let o="";const c=n.length,u=256-256%c;for(;e>0;){const t=i(Math.ceil(256*e/u),r);for(let r=0;r0;r++){const a=t[r];a0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=s(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,n=this._bufferLength,o=t/536870912|0,a=t<<3,i=t%64<56?64:128;this._buffer[n]=128;for(var c=n+1;c0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){o.wipe(e.state),e.buffer&&o.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.mE=a;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function s(e,t,n,o,a){for(;a>=64;){for(var s=t[0],c=t[1],u=t[2],l=t[3],d=t[4],f=t[5],h=t[6],p=t[7],m=0;m<16;m++){var b=o+4*m;e[m]=r.readUint32BE(n,b)}for(m=16;m<64;m++){var g=e[m-2],y=(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10,v=((g=e[m-15])>>>7|g<<25)^(g>>>18|g<<14)^g>>>3;e[m]=(y+e[m-7]|0)+(v+e[m-16]|0)}for(m=0;m<64;m++){y=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&f^~d&h)|0)+(p+(i[m]+e[m]|0)|0)|0,v=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&c^s&u^c&u)|0;p=h,h=f,f=d,d=l+y|0,l=u,u=c,c=s,s=y+v|0}t[0]+=s,t[1]+=c,t[2]+=u,t[3]+=l,t[4]+=d,t[5]+=f,t[6]+=h,t[7]+=p,o+=64,a-=64}return o}t.vp=function(e){var t=new a;t.update(e);var n=t.digest();return t.clean(),n}},17309:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t=0;--a){const e=n[a>>>3]>>>(7&a)&1;u(o,i,e),u(p,m,e),l(b,o,p),d(o,o,p),l(p,i,m),d(i,i,m),h(m,b),h(g,o),f(o,p,o),f(p,i,b),l(b,o,p),d(o,o,p),h(i,o),d(p,m,g),f(o,p,s),l(o,o,m),f(p,p,o),f(o,m,g),f(m,i,r),h(i,b),u(o,i,e),u(p,m,e)}for(let a=0;a<16;a++)r[a+16]=o[a],r[a+32]=p[a],r[a+48]=i[a],r[a+64]=m[a];const y=r.subarray(32),v=r.subarray(16);!function(e,t){const n=a();for(let r=0;r<16;r++)n[r]=t[r];for(let r=253;r>=0;r--)h(n,n),2!==r&&4!==r&&f(n,n,t);for(let r=0;r<16;r++)e[r]=n[r]}(y,y),f(v,v,y);const w=new Uint8Array(32);return function(e,t){const n=a(),r=a();for(let o=0;o<16;o++)r[o]=t[o];c(r),c(r),c(r);for(let o=0;o<2;o++){n[0]=r[0]-65517;for(let t=1;t<15;t++)n[t]=r[t]-65535-(n[t-1]>>16&1),n[t-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,u(r,n,1-e)}for(let o=0;o<16;o++)e[2*o]=255&r[o],e[2*o+1]=r[o]>>8}(w,v),w}function m(e){return p(e,i)}function b(e){if(e.length!==t.KS)throw new Error(`x25519: seed must be ${t.KS} bytes`);const n=new Uint8Array(e);return{publicKey:m(n),secretKey:n}}t.Au=function(e){const t=(0,r.randomBytes)(32,e),n=b(t);return(0,o.wipe)(t),n},t.gi=function(e,n,r=!1){if(e.length!==t.kz)throw new Error("X25519: incorrect secret key length");if(n.length!==t.kz)throw new Error("X25519: incorrect public key length");const o=p(e,n);if(r){let e=0;for(let t=0;t(e&&(e.hash=n[0]),e)));case"eth_getTransactionReceipt":{let e=n[0];try{e=(await this.sdk.txs.getBySafeTxHash(e)).txHash||e}catch(r){}return this.sdk.eth.getTransactionReceipt([e]).then((e=>(e&&(e.transactionHash=n[0]),e)))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(n[0]);case"eth_call":return this.sdk.eth.call([n[0],n[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([n[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(n[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([n[0]]);default:throw Error(`"${e.method}" not implemented`)}}send(e,t){e||t("Undefined request"),this.request(e).then((n=>t(null,{jsonrpc:"2.0",id:e.id,result:n}))).catch((e=>t(e,null)))}}t.SafeAppProvider=a},63045:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLowerCase=void 0,t.getLowerCase=function(e){return e?e.toLowerCase():e}},74372:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0});const a=n(76995);t.default=class{constructor(e=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer="undefined"===typeof window,this.isValidMessage=({origin:e,data:t,source:n})=>{const r=!t,o=!this.isServer&&n===window.parent,a=("undefined"!==typeof t.version&&parseInt(t.version.split(".")[0]))>=1;let i=!0;return Array.isArray(this.allowedOrigins)&&(i=void 0!==this.allowedOrigins.find((t=>t.test(e)))),!r&&o&&a&&i},this.logIncomingMessage=e=>{console.info(`Safe Apps SDK v1: A message was received from origin ${e.origin}. `,e.data)},this.onParentMessage=e=>{this.isValidMessage(e)&&(this.debugMode&&this.logIncomingMessage(e),this.handleIncomingMessage(e.data))},this.handleIncomingMessage=e=>{const{id:t}=e,n=this.callbacks.get(t);n&&(n(e),this.callbacks.delete(t))},this.send=(e,t)=>{const n=a.MessageFormatter.makeRequest(e,t);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(n,"*"),new Promise(((e,t)=>{this.callbacks.set(n.id,(n=>{n.success?e(n):t(new Error(n.error))}))}))},this.allowedOrigins=e,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}},o(n(39972),t)},76995:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFormatter=void 0;const r=n(27899),o=n(22451);class a{}t.MessageFormatter=a,a.makeRequest=(e,t)=>({id:(0,o.generateRequestId)(),method:e,params:t,env:{sdkVersion:(0,r.getSDKVersion)()}}),a.makeResponse=(e,t,n)=>({id:e,success:!0,version:n,data:t}),a.makeErrorResponse=(e,t,n)=>({id:e,success:!1,error:t,version:n})},39972:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RestrictedMethods=t.Methods=void 0,function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage",e.signTypedMessage="signTypedMessage",e.getEnvironmentInfo="getEnvironmentInfo",e.getOffChainSignature="getOffChainSignature",e.requestAddressBook="requestAddressBook",e.wallet_getPermissions="wallet_getPermissions",e.wallet_requestPermissions="wallet_requestPermissions"}(t.Methods||(t.Methods={})),function(e){e.requestAddressBook="requestAddressBook"}(t.RestrictedMethods||(t.RestrictedMethods={}))},22451:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRequestId=void 0;const n=e=>e.toString(16).padStart(2,"0");t.generateRequestId=()=>"undefined"!==typeof window?(e=>{const t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,n).join("")})(10):(new Date).getTime().toString(36)},86444:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(97071),o=n(98443),a=(e,t)=>t.some((t=>t.parentCapability===e));t.default=()=>(e,t,n)=>{const i=n.value;return n.value=async function(){const e=new r.Wallet(this.communicator);let n=await e.getPermissions();if(a(t,n)||(n=await e.requestPermissions([{[t]:{}}])),!a(t,n))throw new o.PermissionsError("Permissions rejected",o.PERMISSIONS_REQUEST_REJECTED);return i.apply(this)},n}},68193:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPC_CALLS=void 0,t.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"}},14204:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eth=void 0;const r=n(68193),o=n(39972),a={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};t.Eth=class{constructor(e){this.communicator=e,this.call=this.buildRequest({call:r.RPC_CALLS.eth_call,formatters:[null,a.defaultBlockParam]}),this.getBalance=this.buildRequest({call:r.RPC_CALLS.eth_getBalance,formatters:[null,a.defaultBlockParam]}),this.getCode=this.buildRequest({call:r.RPC_CALLS.eth_getCode,formatters:[null,a.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:r.RPC_CALLS.eth_getStorageAt,formatters:[null,a.blockNumberToHex,a.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:r.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:r.RPC_CALLS.eth_getBlockByHash,formatters:[null,a.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:r.RPC_CALLS.eth_getBlockByNumber,formatters:[a.blockNumberToHex,a.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:r.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:r.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:r.RPC_CALLS.eth_getTransactionCount,formatters:[null,a.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:r.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=e=>this.buildRequest({call:r.RPC_CALLS.eth_estimateGas})([e]),this.setSafeSettings=this.buildRequest({call:r.RPC_CALLS.safe_setSettings})}buildRequest(e){const{call:t,formatters:n}=e;return async e=>{n&&Array.isArray(e)&&n.forEach(((t,n)=>{t&&(e[n]=t(e[n]))}));const r={call:t,params:e||[]};return(await this.communicator.send(o.Methods.rpcCall,r)).data}}}},42691:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;const i=a(n(78697));t.default=i.default,o(n(78697),t),o(n(43416),t),o(n(39972),t),o(n(76995),t);var s=n(27899);Object.defineProperty(t,"getSDKVersion",{enumerable:!0,get:function(){return s.getSDKVersion}})},68996:function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Safe=void 0;const a=n(68995),i=n(4994),s=n(39972),c=n(68193),u=n(43416),l=o(n(86444));class d{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(s.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(s.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(s.Methods.getSafeBalances,{currency:e})).data}async check1271Signature(e,t="0x"){const n=await this.getInfo(),r=(0,a.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,t]}),o={call:c.RPC_CALLS.eth_call,params:[{to:n.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(s.Methods.rpcCall,o)).data.slice(0,10).toLowerCase()===i.MAGIC_VALUE}catch(u){return!1}}async check1271SignatureBytes(e,t="0x"){const n=await this.getInfo(),r=(0,a.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,t]}),o={call:c.RPC_CALLS.eth_call,params:[{to:n.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(s.Methods.rpcCall,o)).data.slice(0,10).toLowerCase()===i.MAGIC_VALUE_BYTES}catch(u){return!1}}calculateMessageHash(e){return(0,a.hashMessage)(e)}calculateTypedMessageHash(e){const t="object"===typeof e.domain.chainId?e.domain.chainId.toNumber():Number(e.domain.chainId);let n=e.primaryType;if(!n){const t=Object.values(e.types),r=Object.keys(e.types).filter((e=>t.every((t=>t.every((({type:t})=>t.replace("[","").replace("]","")!==e))))));if(0===r.length||r.length>1)throw new Error("Please specify primaryType");n=r[0]}return(0,a.hashTypedData)({message:e.message,domain:Object.assign(Object.assign({},e.domain),{chainId:t,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt}),types:e.types,primaryType:n})}async getOffChainSignature(e){return(await this.communicator.send(s.Methods.getOffChainSignature,e)).data}async isMessageSigned(e,t="0x"){let n;if("string"===typeof e&&(n=async()=>{const n=this.calculateMessageHash(e);return await this.isMessageHashSigned(n,t)}),(0,u.isObjectEIP712TypedData)(e)&&(n=async()=>{const n=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(n,t)}),n){return await n()}throw new Error("Invalid message type")}async isMessageHashSigned(e,t="0x"){const n=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const r of n){if(await r(e,t))return!0}return!1}async getEnvironmentInfo(){return(await this.communicator.send(s.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(s.Methods.requestAddressBook,void 0)).data}}r([(0,l.default)()],d.prototype,"requestAddressBook",null),t.Safe=d},4994:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAGIC_VALUE_BYTES=t.MAGIC_VALUE=void 0;t.MAGIC_VALUE="0x1626ba7e";t.MAGIC_VALUE_BYTES="0x20c13b0b"},78697:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(74372)),a=n(18097),i=n(14204),s=n(68996),c=n(97071);t.default=class{constructor(e={}){const{allowedDomains:t=null,debug:n=!1}=e;this.communicator=new o.default(t,n),this.eth=new i.Eth(this.communicator),this.txs=new a.TXs(this.communicator),this.safe=new s.Safe(this.communicator),this.wallet=new c.Wallet(this.communicator)}}},18097:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TXs=void 0;const r=n(39972),o=n(43416);t.TXs=class{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(r.Methods.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const t={message:e};return(await this.communicator.send(r.Methods.signMessage,t)).data}async signTypedMessage(e){if(!(0,o.isObjectEIP712TypedData)(e))throw new Error("Invalid typed data");return(await this.communicator.send(r.Methods.signTypedMessage,{typedData:e})).data}async send({txs:e,params:t}){if(!e||!e.length)throw new Error("No transactions were passed");const n={txs:e,params:t};return(await this.communicator.send(r.Methods.sendTransactions,n)).data}}},31418:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransferDirection=t.TransactionStatus=t.TokenType=t.Operation=void 0;var r=n(18831);Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return r.Operation}}),Object.defineProperty(t,"TokenType",{enumerable:!0,get:function(){return r.TokenType}}),Object.defineProperty(t,"TransactionStatus",{enumerable:!0,get:function(){return r.TransactionStatus}}),Object.defineProperty(t,"TransferDirection",{enumerable:!0,get:function(){return r.TransferDirection}})},43416:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(27806),t),o(n(4806),t),o(n(31418),t),o(n(52310),t)},52310:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(39972)},98443:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionsError=t.PERMISSIONS_REQUEST_REJECTED=void 0,t.PERMISSIONS_REQUEST_REJECTED=4001;class n extends Error{constructor(e,t,r){super(e),this.code=t,this.data=r,Object.setPrototypeOf(this,n.prototype)}}t.PermissionsError=n},4806:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27806:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObjectEIP712TypedData=void 0;t.isObjectEIP712TypedData=e=>"object"===typeof e&&null!=e&&"domain"in e&&"types"in e&&"message"in e},27899:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;const o=r(n(64122));t.getSDKVersion=()=>o.default.version.split("-")[0]},97071:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;const r=n(39972),o=n(98443);t.Wallet=class{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(r.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new o.PermissionsError("Permissions request is invalid",o.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(r.Methods.wallet_requestPermissions,e)).data}catch(t){throw new o.PermissionsError("Permissions rejected",o.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(e){return e.every((e=>"object"===typeof e&&Object.keys(e).every((e=>!!Object.values(r.RestrictedMethods).includes(e)))))}}},16987:function(e,t,n){"use strict";n.d(t,{AW:function(){return B},rV:function(){return N},gn:function(){return we},H1:function(){return pe},hF:function(){return me},WG:function(){return D},pe:function(){return H},m$:function(){return F},vB:function(){return z},HI:function(){return q},E0:function(){return Ae},Gq:function(){return ye},$0:function(){return le},Z4:function(){return ge},Bv:function(){return Me},Au:function(){return M},jd:function(){return R},gu:function(){return O},D:function(){return ce},Z7:function(){return Ze},cO:function(){return je},_H:function(){return Ce},fc:function(){return We},D6:function(){return Xe},Hh:function(){return Pe},Ym:function(){return U},rj:function(){return L},jU:function(){return ie},gp:function(){return Ke},rF:function(){return Ot},Bw:function(){return Ee},UG:function(){return oe},xW:function(){return ct},b$:function(){return ae},Ih:function(){return at},h1:function(){return ut},Q8:function(){return W},o8:function(){return nt},qt:function(){return et},Dd:function(){return lt},$t:function(){return Et},nf:function(){return Pt},Q0:function(){return vt},in:function(){return bt},p8:function(){return Ct},sI:function(){return It},al:function(){return jt},L5:function(){return tt},EJ:function(){return wt},Z2:function(){return gt},PM:function(){return yt},hH:function(){return At},ON:function(){return St},n:function(){return mt},JT:function(){return xt},M_:function(){return rt},jv:function(){return st},KC:function(){return fe},eG:function(){return xe},fK:function(){return Ve},IP:function(){return he},iP:function(){return ve},M:function(){return Qe},he:function(){return _e},Ll:function(){return G},EN:function(){return $}});var r=n(15501),o=n(512),a=n(31416),i=n(73294),s=n(57664),c=n(37466),u=n(34155),l=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o{if(t.length&&!t.includes(r))return;const o=e[r];n.push(...o.accounts)})),n}function T(e,t){return e.includes(":")?[e]:t.chains||[]}const S="base10",B="base16",k="base64pad",_="utf8",N=1;function M(){const e=s.Au();return{privateKey:(0,c.BB)(e.secretKey,B),publicKey:(0,c.BB)(e.publicKey,B)}}function R(){const e=(0,a.randomBytes)(32);return(0,c.BB)(e,B)}function F(e,t){const n=s.gi((0,c.mL)(e,B),(0,c.mL)(t,B)),r=new o.t(i.mE,n).expand(32);return(0,c.BB)(r,B)}function U(e){const t=(0,i.vp)((0,c.mL)(e,B));return(0,c.BB)(t,B)}function L(e){const t=(0,i.vp)((0,c.mL)(e,_));return(0,c.BB)(t,B)}function D(e){return Number((0,c.BB)(e,S))}function q(e){const t=function(e){return(0,c.mL)(`${e}`,S)}(typeof e.type<"u"?e.type:0);if(D(t)===N&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?(0,c.mL)(e.senderPublicKey,B):void 0,o=typeof e.iv<"u"?(0,c.mL)(e.iv,B):(0,a.randomBytes)(12);return function(e){if(D(e.type)===N){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return(0,c.BB)((0,c.zo)([e.type,e.senderPublicKey,e.iv,e.sealed]),k)}return(0,c.BB)((0,c.zo)([e.type,e.iv,e.sealed]),k)}({type:t,sealed:new r.OK((0,c.mL)(e.symKey,B)).seal(o,(0,c.mL)(e.message,_)),iv:o,senderPublicKey:n})}function H(e){const t=new r.OK((0,c.mL)(e.symKey,B)),{sealed:n,iv:o}=z(e.encoded),a=t.open(o,n);if(null===a)throw new Error("Failed to decrypt");return(0,c.BB)(a,_)}function z(e){const t=(0,c.mL)(e,k),n=t.slice(0,1);if(D(n)===N){const e=33,r=e+12,o=t.slice(1,e),a=t.slice(e,r);return{type:n,sealed:t.slice(r),iv:a,senderPublicKey:o}}const r=t.slice(1,13);return{type:n,sealed:t.slice(13),iv:r}}function G(e,t){const n=z(e);return $({type:D(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?(0,c.BB)(n.senderPublicKey,B):void 0,receiverPublicKey:t?.receiverPublicKey})}function $(e){const t=e?.type||0;if(t===N){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function W(e){return e.type===N&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var K=Object.defineProperty,Q=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,Y=(e,t,n)=>t in e?K(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z=(e,t)=>{for(var n in t||(t={}))V.call(t,n)&&Y(e,n,t[n]);if(Q)for(var n of Q(t))J.call(t,n)&&Y(e,n,t[n]);return e};const X="react-native",ee="node",te="browser",ne="unknown",re="js";function oe(){return typeof I<"u"&&typeof I.versions<"u"&&typeof I.versions.node<"u"}function ae(){return!(0,x.getDocument)()&&!!(0,x.getNavigator)()&&"ReactNative"===navigator.product}function ie(){return!oe()&&!!(0,x.getNavigator)()}function se(){return ae()?X:oe()?ee:ie()?te:ne}function ce(){return(0,P.D)()||{name:"",description:"",url:"",icons:[""]}}function ue(e,t,r){const o=function(){if(se()===X&&typeof n.g<"u"&&typeof(null==n.g?void 0:n.g.Platform)<"u"){const{OS:e,Version:t}=n.g.Platform;return[e,t].join("-")}const e=v();if(null===e)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}(),a=function(){var e;const t=se();return t===te?[t,(null==(e=(0,x.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[re,r].join("-"),o,a].join("/")}function le({protocol:e,version:t,relayUrl:n,sdkVersion:r,auth:o,projectId:a,useOnCloseEvent:i}){const s=n.split("?"),c={auth:o,ua:ue(e,t,r),projectId:a,useOnCloseEvent:i||void 0},u=function(e,t){let n=C.parse(e);return n=Z(Z({},n),t),C.stringify(n)}(s[1]||"",c);return s[0]+"?"+u}function de(e,t){return e.filter((e=>t.includes(e))).length===e.length}function fe(e){return Object.fromEntries(e.entries())}function he(e){return new Map(Object.entries(e))}function pe(e=A.FIVE_MINUTES,t){const n=(0,A.toMiliseconds)(e||A.FIVE_MINUTES);let r,o,a;return{resolve:e=>{a&&r&&(clearTimeout(a),r(e))},reject:e=>{a&&o&&(clearTimeout(a),o(e))},done:()=>new Promise(((e,i)=>{a=setTimeout((()=>{i(new Error(t))}),n),r=e,o=i}))}}function me(e,t,n){return new Promise((async(r,o)=>{const a=setTimeout((()=>o(new Error(n))),t);try{r(await e)}catch(i){o(i)}clearTimeout(a)}))}function be(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function ge(e){return be("topic",e)}function ye(e){return be("id",e)}function ve(e){const[t,n]=e.split(":"),r={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof n)r.topic=n;else{if("id"!==t||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${n}`);r.id=Number(n)}return r}function we(e,t){return(0,A.fromMiliseconds)((t||Date.now())+(0,A.toMiliseconds)(e))}function Ee(e){return Date.now()>=(0,A.toMiliseconds)(e)}function Ae(e,t){return`${e}${t?`:${t}`:""}`}function xe(e=[],t=[]){return[...new Set([...e,...t])]}async function Pe({id:e,topic:t,wcDeepLink:r}){try{if(!r)return;let o=("string"==typeof r?JSON.parse(r):r)?.href;if("string"!=typeof o)return;o.endsWith("/")&&(o=o.slice(0,-1));const a=`${o}/wc?requestId=${e}&sessionTopic=${t}`,i=se();i===te?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):i===X&&typeof(null==n.g?void 0:n.g.Linking)<"u"&&await n.g.Linking.openURL(a)}catch(o){console.error(o)}}function Ce(e){return e?.relay||{protocol:"irn"}}function je(e){const t=j[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var Ie=Object.defineProperty,Oe=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,Be=(e,t,n)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function ke(e,t="-"){const n={},r="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(r)){const o=t.replace(r,""),a=e[t];n[o]=a}})),n}function _e(e){const t=e.indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t),o=e.substring(t+1,n).split("@"),a=typeof n<"u"?e.substring(n):"",i=C.parse(a);return{protocol:r,topic:Ne(o[0]),version:parseInt(o[1],10),symKey:i.symKey,relay:ke(i)}}function Ne(e){return e.startsWith("//")?e.substring(2):e}function Me(e){return`${e.protocol}:${e.topic}@${e.version}?`+C.stringify(((e,t)=>{for(var n in t||(t={}))Te.call(t,n)&&Be(e,n,t[n]);if(Oe)for(var n of Oe(t))Se.call(t,n)&&Be(e,n,t[n]);return e})({symKey:e.symKey},function(e,t="-"){const n={};return Object.keys(e).forEach((r=>{const o="relay"+t+r;e[r]&&(n[o]=e[r])})),n}(e.relay)))}var Re=Object.defineProperty,Fe=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,He=(e,t,n)=>t in e?Re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ze=(e,t)=>{for(var n in t||(t={}))De.call(t,n)&&He(e,n,t[n]);if(Le)for(var n of Le(t))qe.call(t,n)&&He(e,n,t[n]);return e},Ge=(e,t)=>Fe(e,Ue(t));function $e(e){const t=[];return e.forEach((e=>{const[n,r]=e.split(":");t.push(`${n}:${r}`)})),t}function We(e,t){const n=bt(e,t);if(n)throw new Error(n.message);const r={};for(const[o,a]of Object.entries(e))r[o]={methods:a.methods,events:a.events,chains:a.accounts.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))};return r}function Ke(e){return e.includes(":")}function Qe(e){return Ke(e)?e.split(":")[0]:e}function Ve(e){var t,n,r;const o={};if(!tt(e))return o;for(const[a,i]of Object.entries(e)){const e=Ke(a)?[a]:i.chains,s=i.methods||[],c=i.events||[],u=Qe(a);o[u]=Ge(ze({},o[u]),{chains:xe(e,null==(t=o[u])?void 0:t.chains),methods:xe(s,null==(n=o[u])?void 0:n.methods),events:xe(c,null==(r=o[u])?void 0:r.events)})}return o}const Je={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Ye={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Ze(e,t){const{message:n,code:r}=Ye[e];return{message:t?`${n} ${t}`:n,code:r}}function Xe(e,t){const{message:n,code:r}=Je[e];return{message:t?`${n} ${t}`:n,code:r}}function et(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function tt(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function nt(e){return typeof e>"u"}function rt(e,t){return!(!t||!nt(e))||"string"==typeof e&&!!e.trim().length}function ot(e,t){return!(!t||!nt(e))||"number"==typeof e&&!isNaN(e)}function at(e,t){const{requiredNamespaces:n}=t,r=Object.keys(e.namespaces),o=Object.keys(n);let a=!0;return!!de(o,r)&&(r.forEach((t=>{const{accounts:r,methods:o,events:i}=e.namespaces[t],s=$e(r),c=n[t];(!de(T(t,c),s)||!de(c.methods,o)||!de(c.events,i))&&(a=!1)})),a)}function it(e){return!(!rt(e,!1)||!e.includes(":"))&&2===e.split(":").length}function st(e){if(rt(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function ct(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}function ut(e){return e?.topic}function lt(e,t){let n=null;return rt(e?.publicKey,!1)||(n=Ze("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}function dt(e){let t=!0;return et(e)?e.length&&(t=e.every((e=>rt(e,!1)))):t=!1,t}function ft(e,t,n){let r=null;return Object.entries(e).forEach((([e,o])=>{if(r)return;const a=function(e,t,n){let r=null;return et(t)&&t.length?t.forEach((e=>{r||it(e)||(r=Xe("UNSUPPORTED_CHAINS",`${n}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):it(e)||(r=Xe("UNSUPPORTED_CHAINS",`${n}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),r}(e,T(e,o),`${t} ${n}`);a&&(r=a)})),r}function ht(e,t){let n=null;return et(e)?e.forEach((e=>{n||function(e){if(rt(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&it(e)}}return!1}(e)||(n=Xe("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):n=Xe("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function pt(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=function(e,t){let n=null;return dt(e?.methods)?dt(e?.events)||(n=Xe("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=Xe("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),n}(e,`${t}, namespace`);r&&(n=r)})),n}function mt(e,t,n){let r=null;if(e&&tt(e)){const o=pt(e,t);o&&(r=o);const a=ft(e,t,n);a&&(r=a)}else r=Ze("MISSING_OR_INVALID",`${t}, ${n} should be an object with data`);return r}function bt(e,t){let n=null;if(e&&tt(e)){const r=pt(e,t);r&&(n=r);const o=function(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=ht(e?.accounts,`${t} namespace`);r&&(n=r)})),n}(e,t);o&&(n=o)}else n=Ze("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function gt(e){return rt(e.protocol,!0)}function yt(e,t){let n=!1;return t&&!e?n=!0:e&&et(e)&&e.length&&e.forEach((e=>{n=gt(e)})),n}function vt(e){return"number"==typeof e}function wt(e){return typeof e<"u"&&null!==typeof e}function Et(e){return!(!e||"object"!=typeof e||!e.code||!ot(e.code,!1)||!e.message||!rt(e.message,!1))}function At(e){return!(nt(e)||!rt(e.method,!1))}function xt(e){return!(nt(e)||nt(e.result)&&nt(e.error)||!ot(e.id,!1)||!rt(e.jsonrpc,!1))}function Pt(e){return!(nt(e)||!rt(e.name,!1))}function Ct(e,t){return!(!it(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...$e(e.accounts))})),t}(e).includes(t))}function jt(e,t,n){return!!rt(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{$e(e.accounts).includes(t)&&n.push(...e.methods)})),n}(e,t).includes(n)}function It(e,t,n){return!!rt(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{$e(e.accounts).includes(t)&&n.push(...e.events)})),n}(e,t).includes(n)}function Ot(e,t,n){let r=null;const o=function(e){const t={};return Object.keys(e).forEach((n=>{var r;n.includes(":")?t[n]=e[n]:null==(r=e[n].chains)||r.forEach((r=>{t[r]={methods:e[n].methods,events:e[n].events}}))})),t}(e),a=function(e){const t={};return Object.keys(e).forEach((n=>{if(n.includes(":"))t[n]=e[n];else{$e(e[n].accounts)?.forEach((r=>{t[r]={accounts:e[n].accounts.filter((e=>e.includes(`${r}:`))),methods:e[n].methods,events:e[n].events}}))}})),t}(t),i=Object.keys(o),s=Object.keys(a),c=Tt(Object.keys(e)),u=Tt(Object.keys(t)),l=c.filter((e=>!u.includes(e)));return l.length&&(r=Ze("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${l.toString()}\n Received: ${Object.keys(t).toString()}`)),de(i,s)||(r=Ze("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${i.toString()}\n Approved: ${s.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||r)return;const o=$e(t[e].accounts);o.includes(e)||(r=Ze("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${o.toString()}`))})),i.forEach((e=>{r||(de(o[e].methods,a[e].methods)?de(o[e].events,a[e].events)||(r=Ze("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=Ze("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))})),r}function Tt(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function St(e,t){return ot(e,!1)&&e<=t.max&&e>=t.min}},81029:function(e,t){"use strict";function n(e){let t;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(t=window[e]),t}function r(e){const t=n(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=n,t.getFromWindowOrThrow=r,t.getDocumentOrThrow=function(){return r("document")},t.getDocument=function(){return n("document")},t.getNavigatorOrThrow=function(){return r("navigator")},t.getNavigator=function(){return n("navigator")},t.getLocationOrThrow=function(){return r("location")},t.getLocation=function(){return n("location")},t.getCryptoOrThrow=function(){return r("crypto")},t.getCrypto=function(){return n("crypto")},t.getLocalStorageOrThrow=function(){return r("localStorage")},t.getLocalStorage=function(){return n("localStorage")}},55680:function(e,t,n){"use strict";t.D=void 0;const r=n(81029);t.D=function(){let e,t;try{e=r.getDocumentOrThrow(),t=r.getLocationOrThrow()}catch(a){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;er.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(o.length&&o){const e=r.getAttribute("content");if(e)return e}}return""}const o=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:n("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e-1){const e=o.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop();n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}(),name:o}}},24143:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,i){if("function"!==typeof r)throw new TypeError("The listener must be a function");var s=new o(r,a||e,i),c=n?n+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 i(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,a=r.length,i=new Array(a);oNumber(e)-Number(t))).map((t=>e[t])):e}function f(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function h(e){const t=(e=f(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function m(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const o="string"===typeof n&&n.includes(e.arrayFormatSeparator),a="string"===typeof n&&!o&&l(n,e).includes(e.arrayFormatSeparator);n=a?l(n,e):n;const i=o||a?n.split(e.arrayFormatSeparator).map((t=>l(t,e))):null===n?n:l(n,e);r[t]=i};case"bracket-separator":return(t,n,r)=>{const o=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!o)return void(r[t]=n?l(n,e):n);const a=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>l(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],a):r[t]=a};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const o of e.split("&")){if(""===o)continue;let[e,i]=a(t.decode?o.replace(/\+/g," "):o,"=");i=void 0===i?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?i:l(i,t),n(l(e,t),i,r)}for(const o of Object.keys(r)){const e=r[o];if("object"===typeof e&&null!==e)for(const n of Object.keys(e))e[n]=p(e[n],t);else r[o]=p(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const n=r[t];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?e[t]=d(n):e[t]=n,e}),Object.create(null))}t.extract=h,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>{return t.skipNull&&(null===(r=e[n])||void 0===r)||t.skipEmptyString&&""===e[n];var r},r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const o=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[u(t,e),"[",o,"]"].join("")]:[...n,[u(t,e),"[",u(o,e),"]=",u(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[u(t,e),"[]"].join("")]:[...n,[u(t,e),"[]=",u(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[u(t,e),":list="].join("")]:[...n,[u(t,e),":list=",u(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,o)=>void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?r:(o=null===o?"":o,0===r.length?[[u(n,e),t,u(o,e)].join("")]:[[r,u(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,u(t,e)]:[...n,[u(t,e),"=",u(r,e)].join("")]}}(t),o={};for(const i of Object.keys(e))n(i)||(o[i]=e[i]);const a=Object.keys(o);return!1!==t.sort&&a.sort(t.sort),a.map((n=>{const o=e[n];return void 0===o?"":null===o?u(n,t):Array.isArray(o)?0===o.length&&"bracket-separator"===t.arrayFormat?u(n,t)+"[]":o.reduce(r(n),[]).join("&"):u(n,t)+"="+u(o,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=a(e,"#");return Object.assign({url:n.split("?")[0]||"",query:m(h(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:l(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0,[s]:!0},n);const r=f(e.url).split("?")[0]||"",o=t.extract(e.url),a=t.parse(o,{sort:!1}),i=Object.assign(a,e.query);let c=t.stringify(i,n);c&&(c=`?${c}`);let l=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(l=`#${n[s]?u(e.fragmentIdentifier,n):e.fragmentIdentifier}`),`${r}${c}${l}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[s]:!1},r);const{url:o,query:a,fragmentIdentifier:c}=t.parseUrl(e,r);return t.stringifyUrl({url:o,query:i(a,n),fragmentIdentifier:c},r)},t.exclude=(e,n,r)=>{const o=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,o,r)}},61882:function(){},36900:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(30004);r.__exportStar(n(46869),t),r.__exportStar(n(88033),t)},46869:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},88033:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},66736:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(30004);r.__exportStar(n(44273),t),r.__exportStar(n(47001),t),r.__exportStar(n(52939),t),r.__exportStar(n(36900),t)},52939:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(30004).__exportStar(n(88766),t)},88766:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;t.IWatch=class{}},83207:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const r=n(36900);t.toMiliseconds=function(e){return e*r.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/r.ONE_THOUSAND)}},83873:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}},44273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(30004);r.__exportStar(n(83873),t),r.__exportStar(n(83207),t)},47001:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class n{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if("undefined"!==typeof t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){const t=this.timestamps.get(e);if("undefined"===typeof t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=n,t.default=n},30004:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return a},__asyncDelegator:function(){return w},__asyncGenerator:function(){return v},__asyncValues:function(){return E},__await:function(){return y},__awaiter:function(){return l},__classPrivateFieldGet:function(){return C},__classPrivateFieldSet:function(){return j},__createBinding:function(){return f},__decorate:function(){return s},__exportStar:function(){return h},__extends:function(){return o},__generator:function(){return d},__importDefault:function(){return P},__importStar:function(){return x},__makeTemplateObject:function(){return A},__metadata:function(){return u},__param:function(){return c},__read:function(){return m},__rest:function(){return i},__spread:function(){return b},__spreadArrays:function(){return g},__values:function(){return p}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function b(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof y?Promise.resolve(n.value.v).then(c,u):l(a[0][2],n)}catch(r){l(a[0][3],r)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function A(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function j(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},86010:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"===typeof e||"number"===typeof e)o+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t-1};function u(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!==typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():i&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=p(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function E(e){var t=new f;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t}function A(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},g.call(v.prototype),g.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},A.error=function(){var e=new A(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];A.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new A(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(C){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function P(e,n){return new Promise((function(r,a){var i=new v(e,n);if(i.signal&&i.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:E(s.getAllResponseHeaders()||"")};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var t="response"in s?s.response:s.responseText;r(new A(t,e))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(i.method,i.url,!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&o&&(s.responseType="blob"),i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",c)}),s.send("undefined"===typeof i._bodyInit?null:i._bodyInit)}))}P.polyfill=!0,e.fetch||(e.fetch=P,e.Headers=f,e.Request=v,e.Response=A),t.Headers=f,t.Request=v,t.Response=A,t.fetch=P,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},44020:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp("("+t+")|([^%]+?)","gi"),r=new RegExp("("+t+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch(a){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function a(e){try{return decodeURIComponent(e)}catch(a){for(var t=e.match(n)||[],r=1;rd)&&(a[c]=d,h.push(c,d),o[c]=s));if("undefined"!==typeof r&&"undefined"===typeof a[r]){var p=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(p)}return o},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var o=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,o={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=e.sorter||r.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},62378:function(e){"use strict";e.exports=function(e){for(var t=[],n=e.length,r=0;r=55296&&o<=56319&&n>r+1){var a=e.charCodeAt(r+1);a>=56320&&a<=57343&&(o=1024*(o-55296)+a-56320+65536,r+=1)}o<128?t.push(o):o<2048?(t.push(o>>6|192),t.push(63&o|128)):o<55296||o>=57344&&o<65536?(t.push(o>>12|224),t.push(o>>6&63|128),t.push(63&o|128)):o>=65536&&o<=1114111?(t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},17187:function(e){"use strict";var t,n="object"===typeof Reflect?Reflect:null,r=n&&"function"===typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!==e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,a),r(n)}function a(){"function"===typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}m(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"===typeof e.on&&m(e,"error",t,n)}(e,o,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var i=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?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var o,a,i,u;if(s(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),i=a[t]),void 0===i)i=a[t]=n,++e._eventsCount;else if("function"===typeof i?i=a[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(o=c(e))>0&&i.length>o&&!i.warned){i.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=i.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 d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=l.bind(r);return o.listener=n,r.wrapFn=o,o}function f(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"===typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var c=a[e];if(void 0===c)return!1;if("function"===typeof c)r(c,this,t);else{var u=c.length,l=p(c,u);for(n=0;n=0;a--)if(n[a]===t||n[a].listener===t){i=n[a].listener,o=a;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},92806:function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),o=Array.isArray(t),a=0;a{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,I.K)(e[0])})})),(0,C.ov)(this,"onChainChanged",(e=>{const t=Number(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})})),(0,C.ov)(this,"onDisconnect",(()=>{(0,C.U9)(this,m,b).call(this,[]),this.emit("disconnect")})),(0,C.ov)(this,"onDisplayUri",(e=>{this.emit("message",{type:"display_uri",data:e})})),(0,C.ov)(this,"onConnect",(()=>{this.emit("connect",{})})),(0,C.U9)(this,a,i).call(this)}async connect({chainId:e,pairingTopic:t}={}){try{let n=e;if(!n){const e=this.storage?.getItem("store"),t=e?.state?.data?.chain?.id;n=t&&!this.isChainUnsupported(t)?t:this.chains[0]?.id}if(!n)throw new Error("No chains found on connector.");const r=await this.getProvider();(0,C.U9)(this,d,f).call(this);const o=(0,C.U9)(this,u,l).call(this);if(r.session&&o&&await r.disconnect(),!r.session||o){const e=this.chains.filter((e=>e.id!==n)).map((e=>e.id));this.emit("message",{type:"connecting"}),await r.connect({pairingTopic:t,chains:[n],optionalChains:e.length?e:void 0}),(0,C.U9)(this,m,b).call(this,this.chains.map((({id:e})=>e)))}const a=await r.enable(),i=(0,I.K)(a[0]),s=await this.getChainId();return{account:i,chain:{id:s,unsupported:this.isChainUnsupported(s)}}}catch(n){if(/user rejected/i.test(n?.message))throw new O.ab(n);throw n}}async disconnect(){const e=await this.getProvider();try{await e.disconnect()}catch(t){if(!/No matching key/i.test(t.message))throw t}finally{(0,C.U9)(this,h,p).call(this),(0,C.U9)(this,m,b).call(this,[])}}async getAccount(){const{accounts:e}=await this.getProvider();return(0,I.K)(e[0])}async getChainId(){const{chainId:e}=await this.getProvider();return e}async getProvider({chainId:e}={}){return(0,C.ac)(this,r)||await(0,C.U9)(this,a,i).call(this),e&&await this.switchChain(e),(0,C.ac)(this,r)}async getWalletClient({chainId:e}={}){const[t,n]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,T.K)({account:n,chain:r,transport:(0,S.P)(t)})}async isAuthorized(){try{const[e,t]=await Promise.all([this.getAccount(),this.getProvider()]),n=(0,C.U9)(this,u,l).call(this);if(!e)return!1;if(n&&t.session){try{await t.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(e){const t=this.chains.find((t=>t.id===e));if(!t)throw new O.x3(new Error("chain not found on connector."));try{const n=await this.getProvider(),r=(0,C.U9)(this,v,w).call(this),o=(0,C.U9)(this,E,A).call(this);if(!r.includes(e)&&o.includes(_)){await n.request({method:_,params:[{chainId:(0,B.eC)(t.id),blockExplorerUrls:[t.blockExplorers?.default?.url],chainName:t.name,nativeCurrency:t.nativeCurrency,rpcUrls:[...t.rpcUrls.default.http]}]});const r=(0,C.U9)(this,g,y).call(this);r.push(e),(0,C.U9)(this,m,b).call(this,r)}return await n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,B.eC)(e)}]}),t}catch(n){if(/user rejected request/i.test("string"===typeof n?n:n?.message))throw new O.ab(n);throw new O.x3(n)}}};r=new WeakMap,o=new WeakMap,a=new WeakSet,i=async function(){return(0,C.ac)(this,o)||"undefined"===typeof window||(0,C.qx)(this,o,(0,C.U9)(this,s,c).call(this)),(0,C.ac)(this,o)},s=new WeakSet,c=async function(){const{EthereumProvider:e,OPTIONAL_EVENTS:t,OPTIONAL_METHODS:o}=await Promise.all([n.e(1894),n.e(5023)]).then(n.bind(n,35023)),[a,...i]=this.chains.map((({id:e})=>e));if(a){const{projectId:n,showQrModal:s=!0,qrModalOptions:c,metadata:u,relayUrl:l}=this.options;(0,C.qx)(this,r,await e.init({showQrModal:s,qrModalOptions:c,projectId:n,optionalMethods:o,optionalEvents:t,chains:[a],optionalChains:i.length?i:void 0,rpcMap:Object.fromEntries(this.chains.map((e=>[e.id,e.rpcUrls.default.http[0]]))),metadata:u,relayUrl:l}))}},u=new WeakSet,l=function(){if((0,C.U9)(this,E,A).call(this).includes(_))return!1;if(!this.options.isNewChainsStale)return!1;const e=(0,C.U9)(this,g,y).call(this),t=this.chains.map((({id:e})=>e)),n=(0,C.U9)(this,v,w).call(this);return!(n.length&&!n.some((e=>t.includes(e))))&&!t.every((t=>e.includes(t)))},d=new WeakSet,f=function(){(0,C.ac)(this,r)&&((0,C.U9)(this,h,p).call(this),(0,C.ac)(this,r).on("accountsChanged",this.onAccountsChanged),(0,C.ac)(this,r).on("chainChanged",this.onChainChanged),(0,C.ac)(this,r).on("disconnect",this.onDisconnect),(0,C.ac)(this,r).on("session_delete",this.onDisconnect),(0,C.ac)(this,r).on("display_uri",this.onDisplayUri),(0,C.ac)(this,r).on("connect",this.onConnect))},h=new WeakSet,p=function(){(0,C.ac)(this,r)&&((0,C.ac)(this,r).removeListener("accountsChanged",this.onAccountsChanged),(0,C.ac)(this,r).removeListener("chainChanged",this.onChainChanged),(0,C.ac)(this,r).removeListener("disconnect",this.onDisconnect),(0,C.ac)(this,r).removeListener("session_delete",this.onDisconnect),(0,C.ac)(this,r).removeListener("display_uri",this.onDisplayUri),(0,C.ac)(this,r).removeListener("connect",this.onConnect))},m=new WeakSet,b=function(e){this.storage?.setItem(k,e)},g=new WeakSet,y=function(){return this.storage?.getItem(k)??[]},v=new WeakSet,w=function(){if(!(0,C.ac)(this,r))return[];const e=(0,C.ac)(this,r).session?.namespaces;if(!e)return[];const t=(0,j.fK)(e).eip155?.chains?.map((e=>parseInt(e.split(":")[1]||"")));return t??[]},E=new WeakSet,A=function(){if(!(0,C.ac)(this,r))return[];const e=(0,C.ac)(this,r).session?.namespaces;if(!e)return[];const t=(0,j.fK)(e).eip155?.methods;return t??[]};var M,R,F,U=n(64546),L=n(57292),D=n(38039),q=class extends C.wR{constructor({chains:e,options:t}){super({chains:e,options:{reloadOnDisconnect:!1,...t}}),(0,C.ov)(this,"id","coinbaseWallet"),(0,C.ov)(this,"name","Coinbase Wallet"),(0,C.ov)(this,"ready",!0),(0,C.Ko)(this,M,void 0),(0,C.Ko)(this,R,void 0),(0,C.ov)(this,"onAccountsChanged",(e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,I.K)(e[0])})})),(0,C.ov)(this,"onChainChanged",(e=>{const t=(0,D.J)(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})})),(0,C.ov)(this,"onDisconnect",(()=>{this.emit("disconnect")}))}async connect({chainId:e}={}){try{const t=await this.getProvider();t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect),this.emit("message",{type:"connecting"});const n=await t.enable(),r=(0,I.K)(n[0]);let o=await this.getChainId(),a=this.isChainUnsupported(o);if(e&&o!==e){o=(await this.switchChain(e)).id,a=this.isChainUnsupported(o)}return{account:r,chain:{id:o,unsupported:a}}}catch(t){if(/(user closed modal|accounts received is empty)/i.test(t.message))throw new O.ab(t);throw t}}async disconnect(){if(!(0,C.ac)(this,R))return;const e=await this.getProvider();e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),e.disconnect(),e.close()}async getAccount(){const e=await this.getProvider(),t=await e.request({method:"eth_accounts"});return(0,I.K)(t[0])}async getChainId(){const e=await this.getProvider();return(0,D.J)(e.chainId)}async getProvider(){if(!(0,C.ac)(this,R)){let e=(await Promise.all([n.e(8764),n.e(8109),n.e(5811),n.e(2027)]).then(n.t.bind(n,45811,19))).default;"function"!==typeof e&&"function"===typeof e.default&&(e=e.default),(0,C.qx)(this,M,new e(this.options));const t=(0,C.ac)(this,M).walletExtension?.getChainId(),r=this.chains.find((e=>this.options.chainId?e.id===this.options.chainId:e.id===t))||this.chains[0],o=this.options.chainId||r?.id,a=this.options.jsonRpcUrl||r?.rpcUrls.default.http[0];(0,C.qx)(this,R,(0,C.ac)(this,M).makeWeb3Provider(a,o))}return(0,C.ac)(this,R)}async getWalletClient({chainId:e}={}){const[t,n]=await Promise.all([this.getProvider(),this.getAccount()]),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,T.K)({account:n,chain:r,transport:(0,S.P)(t)})}async isAuthorized(){try{return!!(await this.getAccount())}catch{return!1}}async switchChain(e){const t=await this.getProvider(),n=(0,B.eC)(e);try{return await t.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]}),this.chains.find((t=>t.id===e))??{id:e,name:`Chain ${n}`,network:`${n}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(r){const a=this.chains.find((t=>t.id===e));if(!a)throw new L.B({chainId:e,connectorId:this.id});if(4902===r.code)try{return await t.request({method:"wallet_addEthereumChain",params:[{chainId:n,chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:[a.rpcUrls.public?.http[0]??""],blockExplorerUrls:this.getBlockExplorerUrls(a)}]}),a}catch(o){throw new O.ab(o)}throw new O.x3(r)}}async watchAsset({address:e,decimals:t=18,image:n,symbol:r}){return(await this.getProvider()).request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:t,image:n,symbol:r}}})}};M=new WeakMap,R=new WeakMap;var H=class extends U._{constructor({chains:e,options:t}={}){const n={name:"MetaMask",shimDisconnect:!0,getProvider(){function e(e){if(!!e?.isMetaMask&&(!e.isBraveWallet||e._events||e._state)&&!e.isApexWallet&&!e.isAvalanche&&!e.isBitKeep&&!e.isBlockWallet&&!e.isCoin98&&!e.isFordefi&&!e.isMathWallet&&!e.isOkxWallet&&!e.isOKExWallet&&!e.isOneInchIOSWallet&&!e.isOneInchAndroidWallet&&!e.isOpera&&!e.isPortal&&!e.isRabby&&!e.isDefiant&&!e.isTokenPocket&&!e.isTokenary&&!e.isZerion)return e}if("undefined"===typeof window)return;const t=window.ethereum;return t?.providers?t.providers.find(e):e(t)},...t};super({chains:e,options:n}),(0,C.ov)(this,"id","metaMask"),(0,C.ov)(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),(0,C.Ko)(this,F,void 0),(0,C.qx)(this,F,n.UNSTABLE_shimOnConnectSelectAccount)}async connect({chainId:e}={}){try{const n=await this.getProvider();if(!n)throw new L.N;n.on&&(n.on("accountsChanged",this.onAccountsChanged),n.on("chainChanged",this.onChainChanged),n.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let r=null;if((0,C.ac)(this,F)&&this.options?.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey)){r=await this.getAccount().catch((()=>null));if(!!r)try{await n.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),r=await this.getAccount()}catch(t){if(this.isUserRejectedRequestError(t))throw new O.ab(t);if(t.code===new O.pT(t).code)throw t}}if(!r){const e=await n.request({method:"eth_requestAccounts"});r=(0,I.K)(e[0])}let o=await this.getChainId(),a=this.isChainUnsupported(o);if(e&&o!==e){o=(await this.switchChain(e)).id,a=this.isChainUnsupported(o)}return this.options?.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:r,chain:{id:o,unsupported:a},provider:n}}catch(t){if(this.isUserRejectedRequestError(t))throw new O.ab(t);if(-32002===t.code)throw new O.pT(t);throw t}}};F=new WeakMap;var z,G,$,W=/(imtoken|metamask|rainbow|trust wallet|uniswap wallet|ledger)/i,K=class extends C.wR{constructor(){super(...arguments),(0,C.Ko)(this,G),(0,C.ov)(this,"id","walletConnectLegacy"),(0,C.ov)(this,"name","WalletConnectLegacy"),(0,C.ov)(this,"ready",!0),(0,C.Ko)(this,z,void 0),(0,C.ov)(this,"onAccountsChanged",(e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,I.K)(e[0])})})),(0,C.ov)(this,"onChainChanged",(e=>{const t=(0,D.J)(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})})),(0,C.ov)(this,"onDisconnect",(()=>{this.emit("disconnect")}))}async connect({chainId:e}={}){try{let t=e;if(!t){const e=this.storage?.getItem("store"),n=e?.state?.data?.chain?.id;n&&!this.isChainUnsupported(n)&&(t=n)}const n=await this.getProvider({chainId:t,create:!0});n.on("accountsChanged",this.onAccountsChanged),n.on("chainChanged",this.onChainChanged),n.on("disconnect",this.onDisconnect),setTimeout((()=>this.emit("message",{type:"connecting"})),0);const r=await n.enable(),o=(0,I.K)(r[0]),a=await this.getChainId(),i=this.isChainUnsupported(a),s=n.connector?.peerMeta?.name??"";return W.test(s)&&(this.switchChain=(0,C.U9)(this,G,$)),{account:o,chain:{id:a,unsupported:i}}}catch(t){if(/user closed modal/i.test(t.message))throw new O.ab(t);throw t}}async disconnect(){const e=await this.getProvider();await e.disconnect(),e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),"undefined"!==typeof localStorage&&localStorage.removeItem("walletconnect")}async getAccount(){const e=(await this.getProvider()).accounts;return(0,I.K)(e[0])}async getChainId(){const e=await this.getProvider();return(0,D.J)(e.chainId)}async getProvider({chainId:e,create:t}={}){if(!(0,C.ac)(this,z)||e||t){const t=this.options?.infuraId?{}:this.chains.reduce(((e,t)=>({...e,[t.id]:t.rpcUrls.default.http[0]})),{}),r=(await Promise.all([n.e(8764),n.e(1894),n.e(7749)]).then(n.bind(n,67749))).default;(0,C.qx)(this,z,new r({...this.options,chainId:e,rpc:{...t,...this.options?.rpc}})),(0,C.ac)(this,z).http=await(0,C.ac)(this,z).setHttpProvider(e)}return(0,C.ac)(this,z)}async getWalletClient({chainId:e}={}){const[t,n]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,T.K)({account:n,chain:r,transport:(0,S.P)(t)})}async isAuthorized(){try{return!!(await this.getAccount())}catch{return!1}}};z=new WeakMap,G=new WeakSet,$=async function(e){const t=await this.getProvider(),n=(0,B.eC)(e);try{return await Promise.race([t.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]}),new Promise((t=>this.on("change",(({chain:n})=>{n?.id===e&&t(e)}))))]),this.chains.find((t=>t.id===e))??{id:e,name:`Chain ${n}`,network:`${n}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(r){if(/user rejected request/i.test("string"===typeof r?r:r?.message))throw new O.ab(r);throw new O.x3(r)}};var Q,V,J=n(65378),Y=n(42691),Z=class extends C.wR{constructor({chains:e,options:t}){const n={shimDisconnect:!1,...t};super({chains:e,options:n}),(0,C.ov)(this,"id","safe"),(0,C.ov)(this,"name","Safe"),(0,C.ov)(this,"ready",!("undefined"===typeof window)&&window?.parent!==window),(0,C.Ko)(this,Q,void 0),(0,C.Ko)(this,V,void 0),(0,C.ov)(this,"shimDisconnectKey",`${this.id}.shimDisconnect`);let r=Y;"function"!==typeof Y&&"function"===typeof Y.default&&(r=Y.default),(0,C.qx)(this,V,new r(n))}async connect(){const e=await this.getProvider();if(!e)throw new L.N;e.on&&(e.on("accountsChanged",this.onAccountsChanged),e.on("chainChanged",this.onChainChanged),e.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const t=await this.getAccount(),n=await this.getChainId();return this.options.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:t,chain:{id:n,unsupported:this.isChainUnsupported(n)}}}async disconnect(){const e=await this.getProvider();e?.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))}async getAccount(){const e=await this.getProvider();if(!e)throw new L.N;const t=await e.request({method:"eth_accounts"});return(0,I.K)(t[0])}async getChainId(){const e=await this.getProvider();if(!e)throw new L.N;return(0,D.J)(e.chainId)}async getProvider(){if(!(0,C.ac)(this,Q)){const e=await(0,C.ac)(this,V).safe.getInfo();if(!e)throw new Error("Could not load Safe information");(0,C.qx)(this,Q,new J.N(e,(0,C.ac)(this,V)))}return(0,C.ac)(this,Q)}async getWalletClient({chainId:e}={}){const t=await this.getProvider(),n=await this.getAccount(),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,T.K)({account:n,chain:r,transport:(0,S.P)(t)})}async isAuthorized(){try{if(this.options.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey))return!1;return!!(await this.getAccount())}catch{return!1}}onAccountsChanged(e){}onChainChanged(e){}onDisconnect(){this.emit("disconnect")}};Q=new WeakMap,V=new WeakMap;var X=e=>()=>{let t=-1;const n=[],r=[],o=[],a=[];e.forEach((({groupName:e,wallets:n},a)=>{n.forEach((n=>{if(t++,(null==n?void 0:n.iconAccent)&&!(0,P.A7)(null==n?void 0:n.iconAccent))throw new Error(`Property \`iconAccent\` is not a hex value for wallet: ${n.name}`);const i={...n,groupIndex:a,groupName:e,index:t};"function"===typeof n.hidden?o.push(i):r.push(i)}))}));return[...r,...o].forEach((({createConnector:e,groupIndex:t,groupName:r,hidden:o,index:i,...s})=>{if("function"===typeof o){if(o({wallets:[...a.map((({connector:e,id:t,installed:n,name:r})=>({connector:e,id:t,installed:n,name:r})))]}))return}const{connector:c,...u}=(l=e(),Object.fromEntries(Object.entries(l).filter((([e,t])=>void 0!==t))));var l;let d;if("walletConnect"===s.id&&u.qrCode&&!(0,P.tq)()){const{chains:e,options:t}=c;d=new N({chains:e,options:{...t,showQrModal:!0}}),n.push(d)}const f={connector:c,groupIndex:t,groupName:r,index:i,walletConnectModalConnector:d,...s,...u};a.push(f),n.includes(c)||(n.push(c),c._wallets=[]),c._wallets.push(f)})),n},ee=({chains:e,...t})=>{var r;return{id:"brave",name:"Brave Wallet",iconUrl:async()=>(await n.e(6847).then(n.bind(n,86847))).default,iconBackground:"#fff",installed:"undefined"!==typeof window&&!0===(null==(r=window.ethereum)?void 0:r.isBraveWallet),downloadUrls:{},createConnector:()=>({connector:new U._({chains:e,options:t})})}},te=({appName:e,chains:t,...r})=>{var o;return{id:"coinbase",name:"Coinbase Wallet",shortName:"Coinbase",iconUrl:async()=>(await n.e(1950).then(n.bind(n,41950))).default,iconAccent:"#2c5ff6",iconBackground:"#2c5ff6",installed:"undefined"!==typeof window&&!0===(null==(o=window.ethereum)?void 0:o.isCoinbaseWallet)||void 0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=org.toshi",ios:"https://apps.apple.com/us/app/coinbase-wallet-store-crypto/id1278383455",mobile:"https://coinbase.com/wallet/downloads",qrCode:"https://coinbase-wallet.onelink.me/q5Sx/fdb9b250",chrome:"https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad",browserExtension:"https://coinbase.com/wallet"},createConnector:()=>{const n=(0,P.gn)(),o=new q({chains:t,options:{appName:e,headlessMode:!0,...r}});return{connector:o,...n?{}:{qrCode:{getUri:async()=>(await o.getProvider()).qrUrl,instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-mobile",steps:[{description:"We recommend putting Coinbase Wallet on your home screen for quicker access.",step:"install",title:"Open the Coinbase Wallet app"},{description:"You can easily backup your wallet using the cloud backup feature.",step:"create",title:"Create or Import a Wallet"},{description:"After you scan, a connection prompt will appear for you to connect your wallet.",step:"scan",title:"Tap the scan button"}]}},extension:{instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-extension",steps:[{description:"We recommend pinning Coinbase Wallet to your taskbar for quicker access to your wallet.",step:"install",title:"Install the Coinbase Wallet extension"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",step:"refresh",title:"Refresh your browser"}]}}}}}}},ne=({chains:e,...t})=>({id:"injected",name:"Browser Wallet",iconUrl:async()=>(await n.e(1088).then(n.bind(n,81088))).default,iconBackground:"#fff",hidden:({wallets:e})=>e.some((e=>e.installed&&e.name===e.connector.name&&(e.connector instanceof U._||"coinbase"===e.id))),createConnector:()=>({connector:new U._({chains:e,options:t})})});async function re(e,t){const n=await e.getProvider();return"2"===t?new Promise((e=>n.once("display_uri",e))):n.connector.uri}var oe=new Map;function ae({chains:e,options:t={},projectId:n,version:r="2"}){const o="21fef48091f12692cad574a6f7753643";if("2"===r){if(!n||""===n)throw new Error("No projectId found. Every dApp must now provide a WalletConnect Cloud projectId to enable WalletConnect v2 https://www.rainbowkit.com/docs/installation#configure");"YOUR_PROJECT_ID"!==n&&n!==o||console.warn("Invalid projectId. Please create a unique WalletConnect Cloud projectId for your dApp https://www.rainbowkit.com/docs/installation#configure")}const a={chains:e,options:"1"===r?{qrcode:!1,...t}:{projectId:"YOUR_PROJECT_ID"===n?o:n,showQrModal:!1,...t}},i=JSON.stringify(a),s=oe.get(i);return null!=s?s:function(e,t){const n="1"===e?new K(t):new N(t);return oe.set(JSON.stringify(t),n),n}(r,a)}function ie(e){return!!(null==e?void 0:e.isMetaMask)&&(!(e.isBraveWallet&&!e._events&&!e._state)&&(!e.isApexWallet&&(!e.isAvalanche&&(!e.isBackpack&&(!e.isBifrost&&(!e.isBitKeep&&(!e.isBitski&&(!e.isBlockWallet&&(!e.isCoinbaseWallet&&(!e.isDawn&&(!e.isEnkrypt&&(!e.isExodus&&(!e.isFrame&&(!e.isFrontier&&(!e.isGamestop&&(!e.isHyperPay&&(!e.isImToken&&(!e.isKuCoinWallet&&(!e.isMathWallet&&(!e.isOkxWallet&&!e.isOKExWallet&&(!e.isOneInchIOSWallet&&!e.isOneInchAndroidWallet&&(!e.isOpera&&(!e.isPhantom&&(!e.isPortal&&(!e.isRabby&&(!e.isRainbow&&(!e.isStatus&&(!e.isTalisman&&(!e.isTally&&(!e.isTokenPocket&&(!e.isTokenary&&(!e.isTrust&&!e.isTrustWallet&&(!e.isXDEFI&&!e.isZerion)))))))))))))))))))))))))))))))))}var se=({chains:e,projectId:t,walletConnectOptions:r,walletConnectVersion:o="2",...a})=>{var i,s;const c="undefined"!==typeof window&&(null==(i=window.ethereum)?void 0:i.providers),u="undefined"!==typeof window&&"undefined"!==typeof window.ethereum&&((null==(s=window.ethereum.providers)?void 0:s.some(ie))||window.ethereum.isMetaMask),l=!u;return{id:"metaMask",name:"MetaMask",iconUrl:async()=>(await n.e(4419).then(n.bind(n,84419))).default,iconAccent:"#f6851a",iconBackground:"#fff",installed:l?void 0:u,downloadUrls:{android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/us/app/metamask/id1438144202",mobile:"https://metamask.io/download",qrCode:"https://metamask.io/download",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask",opera:"https://addons.opera.com/extensions/details/metamask-10",browserExtension:"https://metamask.io/download"},createConnector:()=>{const n=l?ae({projectId:t,chains:e,version:o,options:r}):new H({chains:e,options:{getProvider:()=>c?c.find(ie):"undefined"!==typeof window?window.ethereum:void 0,...a}}),i=async()=>{const e=await re(n,o);return(0,P.Dt)()?e:(0,P.gn)()?`metamask://wc?uri=${encodeURIComponent(e)}`:`https://metamask.app.link/wc?uri=${encodeURIComponent(e)}`};return{connector:n,mobile:{getUri:l?i:void 0},qrCode:l?{getUri:i,instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"We recommend putting MetaMask on your home screen for quicker access.",step:"install",title:"Open the MetaMask app"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"After you scan, a connection prompt will appear for you to connect your wallet.",step:"scan",title:"Tap the scan button"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"We recommend pinning MetaMask to your taskbar for quicker access to your wallet.",step:"install",title:"Install the MetaMask extension"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",step:"refresh",title:"Refresh your browser"}]}}}}}};var ce=({chains:e,projectId:t,walletConnectOptions:r,walletConnectVersion:o="2",...a})=>{const i="undefined"!==typeof window&&"undefined"!==typeof window.ethereum&&(s=window.ethereum,!!Boolean(s.isRainbow));var s;const c=!i;return{id:"rainbow",name:"Rainbow",iconUrl:async()=>(await n.e(1608).then(n.bind(n,31608))).default,iconBackground:"#0c2f78",installed:c?void 0:i,downloadUrls:{android:"https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",ios:"https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",mobile:"https://rainbow.download?utm_source=rainbowkit",qrCode:"https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",browserExtension:"https://rainbow.me/extension?utm_source=rainbowkit"},createConnector:()=>{const n=c?ae({projectId:t,chains:e,version:o,options:r}):new U._({chains:e,options:a}),i=async()=>{const e=await re(n,o);return(0,P.Dt)()?e:(0,P.gn)()?`rainbow://wc?uri=${encodeURIComponent(e)}&connector=rainbowkit`:`https://rnbwapp.com/wc?uri=${encodeURIComponent(e)}&connector=rainbowkit`};return{connector:n,mobile:{getUri:c?i:void 0},qrCode:c?{getUri:i,instructions:{learnMoreUrl:"https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",steps:[{description:"We recommend putting Rainbow on your home screen for faster access to your wallet.",step:"install",title:"Open the Rainbow app"},{description:"You can easily backup your wallet using our backup feature on your phone.",step:"create",title:"Create or Import a Wallet"},{description:"After you scan, a connection prompt will appear for you to connect your wallet.",step:"scan",title:"Tap the scan button"}]}}:void 0}}}},ue=({chains:e,...t})=>({id:"safe",name:"Safe",iconAccent:"#12ff80",iconBackground:"#fff",iconUrl:async()=>(await n.e(514).then(n.bind(n,60514))).default,installed:!("undefined"===typeof window)&&(null==window?void 0:window.parent)!==window,downloadUrls:{},createConnector:()=>({connector:new Z({chains:e,options:t})})}),le=({chains:e,options:t,projectId:r,version:o="2"})=>({id:"walletConnect",name:"Wallet Connect",iconUrl:async()=>(await n.e(3525).then(n.bind(n,33525))).default,iconBackground:"#3b99fc",createConnector:()=>{const n=(0,P.gn)(),a=ae("1"===o?{version:"1",chains:e,options:{qrcode:n,...t}}:{version:"2",chains:e,projectId:r,options:{showQrModal:n,...t}}),i=async()=>re(a,o);return{connector:a,...n?{}:{mobile:{getUri:i},qrCode:{getUri:i}}}}});P.xZ,P.Bg,P.VQ,P.UG;var de=n(13105),fe=n(35133),he=n(94077),pe=n(85518),me=n(85893);function be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t{const r=[{groupName:"Popular",wallets:[ne({chains:t}),ue({chains:t}),ce({chains:t,projectId:n}),te({appName:e,chains:t}),se({chains:t,projectId:n}),le({chains:t,projectId:n}),ee({chains:t})]}];return{connectors:X(r),wallets:r}})({appName:"NameSys",projectId:"58107e13d36d52fd554cd1ece3258891",chains:Ee}),Pe=xe.connectors,Ce={appName:"NameSys: Off-Chain ENS Records Manager"},je=(0,fe._g)({autoConnect:!0,connectors:Pe,publicClient:Ae});var Ie=function(e){var t=e.Component,n=e.pageProps;return(0,me.jsx)(fe.eM,{config:je,children:(0,me.jsx)(P.pj,{modalSize:pe.tq?"compact":"wide",appInfo:Ce,chains:Ee,theme:ve,children:(0,me.jsx)(t,ge({},n))})})}},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(18164)}])},41159:function(){},38401:function(){},34155:function(e){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"===typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var s,c=[],u=!1,l=-1;function d(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&f())}function f(){if(!u){var e=i(d);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l1)for(var n=1;n>>7-e%8&1)},put:function(e,t){for(let n=0;n>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},73280:function(e){function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,r){const o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},43424:function(e,t,n){const r=n(62378),o=n(76910);function a(e){this.mode=o.BYTE,this.data=new Uint8Array(r(e))}a.getBitsLength=function(e){return 8*e},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){for(let t=0,n=this.data.length;t=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(r){return n}}},76526:function(e,t,n){const r=n(10242).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},61642:function(e,t,n){const r=n(10242),o=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let a=n<<10;for(;r.getBCHDigit(a)-o>=0;)a^=1335<=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=a},27126:function(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,r=3,o=40,a=10;function i(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return r%3===0;case t.Patterns.PATTERN011:return(n+r)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2===0;case t.Patterns.PATTERN101:return n*r%2+n*r%3===0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2===0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,o=0,a=0,i=null,s=null;for(let c=0;c=5&&(r+=n+(o-5)),i=t,o=1),t=e.get(u,c),t===s?a++:(a>=5&&(r+=n+(a-5)),s=t,a=1)}o>=5&&(r+=n+(o-5)),a>=5&&(r+=n+(a-5))}return r},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r=10&&(1488===r||93===r)&&n++,a=a<<1&2047|e.get(i,o),i>=10&&(1488===a||93===a)&&n++}return n*o},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(r){return n}}},41085:function(e,t,n){const r=n(76910);function o(e){this.mode=r.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const o=this.data.length-t;o>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*o+1))},e.exports=o},26143:function(e,t,n){const r=n(69729);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let o=0;o=0;){const e=n[0];for(let a=0;a>a&1),a<6?e.set(a,8,i,!0):a<8?e.set(a+1,8,i,!0):e.set(r-15+a,8,i,!0),a<8?e.set(8,r-a-1,i,!0):a<9?e.set(8,15-a-1+1,i,!0):e.set(8,15-a-1,i,!0);e.set(r-8,8,1,!0)}function g(e,t,n){const o=new a;n.forEach((function(t){o.put(t.mode.bit,4),o.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(o)}));const i=8*(r.getSymbolTotalCodewords(e)-l.getTotalCodewordsCount(e,t));for(o.getLengthInBits()+4<=i&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const s=(i-o.getLengthInBits())/8;for(let r=0;r=0&&r<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===r||6===r)||r>=2&&r<=4&&o>=2&&o<=4?e.set(t+r,a+o,!0,!0):e.set(t+r,a+o,!1,!0))}}(p,t),function(e){const t=e.size;for(let n=8;n=7&&function(e,t){const n=e.size,r=f.getEncodedBits(t);let o,a,i;for(let s=0;s<18;s++)o=Math.floor(s/3),a=s%3+n-8-3,i=1===(r>>s&1),e.set(o,a,i,!0),e.set(a,o,i,!0)}(p,t),function(e,t){const n=e.size;let r=-1,o=n-1,a=7,i=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(o,s-n)){let r=!1;i>>a&1)),e.set(o,s-n,r),a--,-1===a&&(i++,a=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(p,d),isNaN(o)&&(o=u.getBestMask(p,b.bind(null,p,n))),u.applyMask(o,p),b(p,n,o),{modules:p,version:t,errorCorrectionLevel:n,maskPattern:o,segments:a}}t.create=function(e,t){if("undefined"===typeof e||""===e)throw new Error("No input text");let n,a,i=o.M;return"undefined"!==typeof t&&(i=o.from(t.errorCorrectionLevel,o.M),n=f.from(t.version),a=u.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),y(e,n,i,a)}},52882:function(e,t,n){const r=n(26143);function o(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),o=this.degree-n.length;if(o>0){const e=new Uint8Array(this.degree);return e.set(n,o),e}return n},e.exports=o},7007:function(e,t){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(o,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const a=new RegExp("^"+r+"$"),i=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return a.test(e)},t.testNumeric=function(e){return i.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},16130:function(e,t,n){const r=n(76910),o=n(41085),a=n(8260),i=n(43424),s=n(35442),c=n(7007),u=n(10242),l=n(65987);function d(e){return unescape(encodeURIComponent(e)).length}function f(e,t,n){const r=[];let o;for(;null!==(o=e.exec(n));)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function h(e){const t=f(c.NUMERIC,r.NUMERIC,e),n=f(c.ALPHANUMERIC,r.ALPHANUMERIC,e);let o,a;u.isKanjiModeEnabled()?(o=f(c.BYTE,r.BYTE,e),a=f(c.KANJI,r.KANJI,e)):(o=f(c.BYTE_KANJI,r.BYTE,e),a=[]);return t.concat(n,o,a).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function p(e,t){switch(t){case r.NUMERIC:return o.getBitsLength(e);case r.ALPHANUMERIC:return a.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return i.getBitsLength(e)}}function m(e,t){let n;const c=r.getBestModeForData(e);if(n=r.from(t,c),n!==r.BYTE&&n.bit=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(s))},t.rawSplit=function(e){return t.fromArray(h(e,u.isKanjiModeEnabled()))}},10242:function(e,t){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!==typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return"undefined"!==typeof n},t.toSJIS=function(e){return n(e)}},43114:function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},23103:function(e,t,n){const r=n(10242),o=n(35393),a=n(64908),i=n(76910),s=n(43114),c=r.getBCHDigit(7973);function u(e,t){return i.getCharCountIndicator(e,t)+4}function l(e,t){let n=0;return e.forEach((function(e){const r=u(e.mode,t);n+=r+e.getBitsLength()})),n}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!s.isValid(e))throw new Error("Invalid QR Code version");"undefined"===typeof n&&(n=i.BYTE);const a=8*(r.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t));if(n===i.MIXED)return a;const c=a-u(n,e);switch(n){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let r;const o=a.from(n,a.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(l(e,r)<=t.getCapacity(r,n,i.MIXED))return r}(e,o);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(r.mode,r.getLength(),o)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-c>=0;)t^=7973<':"",d="0&&u>0&&e[c-1]||(r+=i?a("M",u+n,.5+l+n):a("m",o,0),o=0,i=!1),u+1',f='viewBox="0 0 '+u+" "+u+'"',h=''+l+d+"\n";return"function"===typeof n&&n(null,h),h}},89653:function(e,t){function n(e){if("number"===typeof e&&(e=e.toString()),"string"!==typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t="undefined"===typeof e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:r,scale:r?4:o,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,a=n.modules.data,i=t.getScale(o,r),s=Math.floor((o+2*r.margin)*i),c=r.margin*i,u=[r.color.light,r.color.dark];for(let t=0;t=c&&n>=c&&t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(c){s=!0,o=c}finally{try{i||null==n.return||n.return()}finally{if(s)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"none";return e||t},L=function(){return!("undefined"===typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},D=function(e){var t=L();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},q=function(e,t,n,r){return function(e){for(var t=1;t1)&&!window.MSStream},Ce=function(){return D("iPad")},je=function(){return D("iPhone")},Ie=function(){return D("iPod")},Oe=function(e){return U(e)};function Te(e){var t=e||b,n=t.device,r=t.browser,o=t.os,a=t.engine,i=t.ua;return{isSmartTV:$(n),isConsole:Q(n),isWearable:K(n),isEmbedded:V(n),isMobileSafari:fe(r)||Ce(),isChromium:ce(r),isMobile:G(n)||Ce(),isMobileOnly:H(n),isTablet:z(n)||Ce(),isBrowser:W(n),isDesktop:W(n),isAndroid:X(o),isWinPhone:ne(o),isIOS:re(o)||Ce(),isChrome:ie(r),isFirefox:se(r),isSafari:de(r),isOpera:he(r),isIE:pe(r),osVersion:oe(o),osName:ae(o),fullBrowserVersion:ge(r),browserVersion:ye(r),browserName:ve(r),mobileVendor:J(n),mobileModel:Y(n),engineName:we(a),engineVersion:Ee(a),getUA:Oe(i),isEdge:ue(r)||xe(i),isYandex:le(r),deviceType:Z(n),isIOS13:Pe(),isIPad13:Ce(),isIPhone13:je(),isIPod13:Ie(),isElectron:Ae(),isEdgeChromium:xe(i),isLegacyEdge:ue(r)&&!xe(i),isWindows:ee(o),isMacOs:te(o),isMIUI:me(r),isSamsungBrowser:be(r)}}var Se=$(l),Be=Q(l),ke=K(l),_e=V(l),Ne=fe(c)||Ce(),Me=ce(c),Re=G(l)||Ce(),Fe=H(l),Ue=z(l)||Ce(),Le=W(l),De=W(l),qe=X(f),He=ne(f),ze=re(f)||Ce(),Ge=ie(c),$e=se(c),We=de(c),Ke=he(c),Qe=pe(c),Ve=oe(f),Je=ae(f),Ye=ge(c),Ze=ye(c),Xe=ve(c),et=J(l),tt=Y(l),nt=we(d),rt=Ee(d),ot=Oe(h),at=ue(c)||xe(h),it=le(c),st=Z(l),ct=Pe(),ut=Ce(),lt=je(),dt=Ie(),ft=Ae(),ht=xe(h),pt=ue(c)&&!xe(h),mt=ee(f),bt=te(f),gt=me(c),yt=be(c);function vt(e){var t=e||window.navigator.userAgent;return m(t)}t.tq=Re},80500:function(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 n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},70610:function(e){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},23451:function(e,t,n){var r;!function(o,a){"use strict";var i="function",s="undefined",c="object",u="string",l="major",d="model",f="name",h="type",p="vendor",m="version",b="architecture",g="console",y="mobile",v="tablet",w="smarttv",E="wearable",A="embedded",x="Amazon",P="Apple",C="ASUS",j="BlackBerry",I="Firefox",O="Google",T="Huawei",S="LG",B="Microsoft",k="Motorola",_="Opera",N="Samsung",M="Sharp",R="Sony",F="Xiaomi",U="Zebra",L="Facebook",D="Chromium OS",q="Mac OS",H=function(e){for(var t={},n=0;n0?2===s.length?typeof s[1]==i?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==i||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):a:this[s[0]]=l?s[1].call(this,l,s[2]):a:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):a):this[s]=l||a;d+=2}},K=function(e,t){for(var n in t)if(typeof t[n]===c&&t[n].length>0){for(var r=0;r2&&(e.model="iPad",e.type=v),e},this.getEngine=function(){var e={};return e.name=a,e.version=a,W.call(e,r,d.engine),e},this.getOS=function(){var e={};return e.name=a,e.version=a,W.call(e,r,d.os),f&&!e.name&&l&&"Unknown"!=l.platform&&(e.name=l.platform.replace(/chrome os/i,D).replace(/macos/i,q)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===u&&e.length>350?$(e,350):e,this},this.setUA(r),this};J.VERSION="1.0.35",J.BROWSER=H([f,m,l]),J.CPU=H([b]),J.DEVICE=H([d,p,h,g,y,w,v,E,A]),J.ENGINE=J.OS=H([f,m]),typeof t!==s?(e.exports&&(t=e.exports=J),t.UAParser=J):n.amdO?(r=function(){return J}.call(t,n,t,e))===a||(e.exports=r):typeof o!==s&&(o.UAParser=J);var Y=typeof o!==s&&(o.jQuery||o.Zepto);if(Y&&!Y.ua){var Z=new J;Y.ua=Z.getResult(),Y.ua.get=function(){return Z.getUA()},Y.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var n in t)Y.ua[n]=t[n]}}}("object"===typeof window?window:this)},53250:function(e,t,n){"use strict";var r=n(67294);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=r.useState,i=r.useEffect,s=r.useLayoutEffect,c=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(r){return!0}}var l="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),o=r[0].inst,l=r[1];return s((function(){o.value=n,o.getSnapshot=t,u(o)&&l({inst:o})}),[e,n,t]),i((function(){return u(o)&&l({inst:o}),e((function(){u(o)&&l({inst:o})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},50139:function(e,t,n){"use strict";var r=n(67294),o=n(61688);var a="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},i=o.useSyncExternalStore,s=r.useRef,c=r.useEffect,u=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=u((function(){function e(e){if(!c){if(c=!0,i=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return s=t}return s=e}if(t=s,a(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,s=n)}var i,s,c=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var h=i(e,d[0],d[1]);return c((function(){f.hasValue=!0,f.value=h}),[h]),l(h),h}},61688:function(e,t,n){"use strict";e.exports=n(53250)},52798:function(e,t,n){"use strict";e.exports=n(50139)},32286:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const r=n(67556),o=n(86226),a=n(49575);function i(e){return{hash:e,hmac:(t,...n)=>(0,r.hmac)(e,t,(0,o.concatBytes)(...n)),randomBytes:o.randomBytes}}t.getHash=i,t.createCurve=function(e,t){const n=t=>(0,a.weierstrass)({...e,...i(t)});return Object.freeze({...n(t),create:n})}},68886:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const r=n(3188),o=n(41830),a=BigInt(0),i=BigInt(1);t.wNAF=function(e,t){const n=(e,t)=>{const n=t.negate();return e?n:t},r=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,o=t;for(;n>a;)n&i&&(r=r.add(o)),o=o.double(),n>>=i;return r},precomputeWindow(e,t){const{windows:n,windowSize:o}=r(t),a=[];let i=e,s=i;for(let r=0;r>=h,r>c&&(r-=f,a+=i);const s=t,p=t+Math.abs(r)-1,m=e%2!==0,b=r<0;0===r?l=l.add(n(m,o[s])):u=u.add(n(b,o[p]))}return{p:u,f:l}},wNAFCached(e,t,n,r){const o=e._WINDOW_SIZE||1;let a=t.get(e);return a||(a=this.precomputeWindow(e,o),1!==o&&t.set(e,r(a))),this.wNAF(o,a,n)}}},t.validateBasic=function(e){return(0,r.validateField)(e.Fp),(0,o.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,r.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},11534:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const r=n(3188),o=n(41830);const a=o.bytesToNumberBE;function i(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const n=Array.from({length:t}).fill(0);for(let r=t-1;r>=0;r--)n[r]=255&e,e>>>=8;return new Uint8Array(n)}function s(e,t){const n=new Uint8Array(e.length);for(let r=0;r255&&(t=r((0,o.concatBytes)((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:a,blockLen:l}=r,d=Math.ceil(n/a);if(d>255)throw new Error("Invalid xmd length");const f=(0,o.concatBytes)(t,i(t.length,1)),h=i(0,l),p=i(n,2),m=new Array(d),b=r((0,o.concatBytes)(h,e,p,i(0,1),f));m[0]=r((0,o.concatBytes)(b,i(1,1),f));for(let c=1;c<=d;c++){const e=[s(b,m[c-1]),i(c+1,1),f];m[c]=r((0,o.concatBytes)(...e))}return(0,o.concatBytes)(...m).slice(0,n)}function d(e,t,n,r,a){if(c(e),c(t),u(n),t.length>255){const e=Math.ceil(2*r/8);t=a.create({dkLen:e}).update((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return a.create({dkLen:n}).update(e).update(i(n,2)).update(t).update(i(t.length,1)).digest()}function f(e,t,n){(0,o.validateObject)(n,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:i,k:s,m:f,hash:h,expand:p,DST:m}=n;c(e),u(t);const b=function(e){if(e instanceof Uint8Array)return e;if("string"===typeof e)return(0,o.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(m),g=i.toString(2).length,y=Math.ceil((g+s)/8),v=t*f*y;let w;if("xmd"===p)w=l(e,b,v,h);else if("xof"===p)w=d(e,b,v,s,h);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');w=e}const E=new Array(t);for(let o=0;oArray.from(e).reverse()));return(t,r)=>{const[o,a,i,s]=n.map((n=>n.reduce(((n,r)=>e.add(e.mul(n,t),r)))));return t=e.div(o,a),r=e.mul(r,e.div(i,s)),{x:t,y:r}}},t.createHasher=function(e,t,n){if("function"!==typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(r,o){const a=f(r,2,{...n,DST:n.DST,...o}),i=e.fromAffine(t(a[0])),s=e.fromAffine(t(a[1])),c=i.add(s).clearCofactor();return c.assertValidity(),c},encodeToCurve(r,o){const a=f(r,1,{...n,DST:n.encodeDST,...o}),i=e.fromAffine(t(a[0])).clearCofactor();return i.assertValidity(),i}}}},3188:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const r=n(41830),o=BigInt(0),a=BigInt(1),i=BigInt(2),s=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);BigInt(9),BigInt(16);function d(e,t){const n=e%t;return n>=o?n:t+n}function f(e,t,n){if(n<=o||t 0");if(n===a)return o;let r=a;for(;t>o;)t&a&&(r=r*e%n),e=e*e%n,t>>=a;return r}function h(e,t){if(e===o||t<=o)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=d(e,t),r=t,i=o,s=a,c=a,u=o;for(;n!==o;){const e=r/n,t=r%n,o=i-c*e,a=s-u*e;r=n,n=t,i=c,s=u,c=o,u=a}if(r!==a)throw new Error("invert: does not exist");return d(i,t)}function p(e){const t=(e-a)/i;let n,r,s;for(n=e-a,r=0;n%i===o;n/=i,r++);for(s=i;so;)r*=r,r%=n;return r},t.invert=h,t.tonelliShanks=p,t.FpSqrt=m;t.isNegativeLE=(e,t)=>(d(e,t)&a)===a;const b=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function g(e,t,n){if(n 0");if(n===o)return e.ONE;if(n===a)return t;let r=e.ONE,i=t;for(;n>o;)n&a&&(r=e.mul(r,i)),i=e.sqr(i),n>>=a;return r}function y(e,t){const n=new Array(t.length),r=t.reduce(((t,r,o)=>e.is0(r)?t:(n[o]=t,e.mul(t,r))),e.ONE),o=e.inv(r);return t.reduceRight(((t,r,o)=>e.is0(r)?t:(n[o]=e.mul(t,n[o]),e.mul(t,r))),o),n}function v(e,t){const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}t.validateField=function(e){const t=b.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,r.validateObject)(e,t)},t.FpPow=g,t.FpInvertBatch=y,t.FpDiv=function(e,t,n){return e.mul(t,"bigint"===typeof n?h(n,e.ORDER):e.inv(n))},t.FpIsSquare=function(e){const t=(e.ORDER-a)/i;return n=>{const r=e.pow(n,t);return e.eql(r,e.ZERO)||e.eql(r,e.ONE)}},t.nLength=v,t.Field=function(e,t,n=!1,i={}){if(e<=o)throw new Error(`Expected Fp ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:c}=v(e,t);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");const u=m(e),l=Object.freeze({ORDER:e,BITS:s,BYTES:c,MASK:(0,r.bitMask)(s),ZERO:o,ONE:a,create:t=>d(t,e),isValid:t=>{if("bigint"!==typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return o<=t&&te===o,isOdd:e=>(e&a)===a,neg:t=>d(-t,e),eql:(e,t)=>e===t,sqr:t=>d(t*t,e),add:(t,n)=>d(t+n,e),sub:(t,n)=>d(t-n,e),mul:(t,n)=>d(t*n,e),pow:(e,t)=>g(l,e,t),div:(t,n)=>d(t*h(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>h(t,e),sqrt:i.sqrt||(e=>u(l,e)),invertBatch:e=>y(l,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?(0,r.numberToBytesLE)(e,c):(0,r.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n},t.hashToPrivateScalar=function(e,t,n=!1){const o=(e=(0,r.ensureBytes)("privateHash",e)).length,i=v(t).nByteLength+8;if(i<24||o1024)throw new Error(`hashToPrivateScalar: expected ${i}-1024 bytes of input, got ${o}`);return d(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-a)+a}},41830:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const n=BigInt(0),r=BigInt(1),o=BigInt(2),a=e=>e instanceof Uint8Array,i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function s(e){if(!a(e))throw new Error("Uint8Array expected");let t="";for(let n=0;ne+t.length),0));let n=0;return e.forEach((e=>{if(!a(e))throw new Error("Uint8Array expected");t.set(e,n),n+=e.length})),t}t.bytesToHex=s,t.numberToHexUnpadded=c,t.hexToNumber=u,t.hexToBytes=l,t.bytesToNumberBE=function(e){return u(s(e))},t.bytesToNumberLE=function(e){if(!a(e))throw new Error("Uint8Array expected");return u(s(Uint8Array.from(e).reverse()))},t.numberToBytesBE=d,t.numberToBytesLE=function(e,t){return d(e,t).reverse()},t.numberToVarBytesBE=function(e){return l(c(e))},t.ensureBytes=function(e,t,n){let r;if("string"===typeof t)try{r=l(t)}catch(i){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${i}`)}else{if(!a(t))throw new Error(`${e} must be hex string or Uint8Array`);r=Uint8Array.from(t)}const o=r.length;if("number"===typeof n&&o!==n)throw new Error(`${e} expected ${n} bytes, got ${o}`);return r},t.concatBytes=f,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let n=0;nn;e>>=r,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&r};t.bitSet=(e,t,o)=>e|(o?r:n)<(o<new Uint8Array(e),p=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,n){if("number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!==typeof n)throw new Error("hmacFn must be a function");let r=h(e),o=h(e),a=0;const i=()=>{r.fill(1),o.fill(0),a=0},s=(...e)=>n(o,r,...e),c=(e=h())=>{o=s(p([0]),e),r=s(),0!==e.length&&(o=s(p([1]),e),r=s())},u=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e{let n;for(i(),c(e);!(n=t(u()));)c();return i(),n}};const m={bigint:e=>"bigint"===typeof e,function:e=>"function"===typeof e,boolean:e=>"boolean"===typeof e,string:e=>"string"===typeof e,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"===typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,n={}){const r=(t,n,r)=>{const o=m[n];if("function"!==typeof o)throw new Error(`Invalid validator "${n}", expected function`);const a=e[t];if((!r||void 0!==a)&&!o(a,e))throw new Error(`Invalid param ${String(t)}=${a} (${typeof a}), expected ${n}`)};for(const[o,a]of Object.entries(t))r(o,a,!1);for(const[o,a]of Object.entries(n))r(o,a,!0);return e}},49575:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const r=n(3188),o=n(41830),a=n(41830),i=n(68886);const{bytesToNumberBE:s,hexToBytes:c}=o;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:n}=t.DER;if(e.length<2||2!==e[0])throw new n("Invalid signature integer tag");const r=e[1],o=e.subarray(2,r+2);if(!r||o.length!==r)throw new n("Invalid signature integer: wrong length");if(128&o[0])throw new n("Invalid signature integer: negative");if(0===o[0]&&!(128&o[1]))throw new n("Invalid signature integer: unnecessary leading zero");return{d:s(o),l:e.subarray(r+2)}},toSig(e){const{Err:n}=t.DER,r="string"===typeof e?c(e):e;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let o=r.length;if(o<2||48!=r[0])throw new n("Invalid signature tag");if(r[1]!==o-2)throw new n("Invalid signature: incorrect length");const{d:a,l:i}=t.DER._parseInt(r.subarray(2)),{d:s,l:u}=t.DER._parseInt(i);if(u.length)throw new n("Invalid signature: left bytes after parsing");return{r:a,s:s}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,n=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},r=t(n(e.s)),o=t(n(e.r)),a=r.length/2,i=o.length/2,s=n(a),c=n(i);return`30${n(i+a+4)}02${c}${o}02${s}${r}`}};const u=BigInt(0),l=BigInt(1),d=BigInt(2),f=BigInt(3),h=BigInt(4);function p(e){const t=function(e){const t=(0,i.validateBasic)(e);o.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:a}=t;if(n){if(!r.eql(a,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==typeof n||"bigint"!==typeof n.beta||"function"!==typeof n.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=t,s=t.toBytes||((e,t,r)=>{const a=t.toAffine();return o.concatBytes(Uint8Array.from([4]),n.toBytes(a.x),n.toBytes(a.y))}),c=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function d(e){const{a:r,b:o}=t,a=n.sqr(e),i=n.mul(a,e);return n.add(n.add(i,n.mul(e,r)),o)}if(!n.eql(n.sqr(t.Gy),d(t.Gx)))throw new Error("bad generator point: equation left != right");function h(e){return"bigint"===typeof e&&un.eql(e,n.ZERO);return o(t)&&o(r)?y.ZERO:new y(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(y.fromAffine)}static fromHex(e){const t=y.fromAffine(c((0,a.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return y.BASE.multiply(m(e))}_setWindowSize(e){this._WINDOW_SIZE=e,b.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:e,y:r}=this.toAffine();if(!n.isValid(e)||!n.isValid(r))throw new Error("bad point: x or y not FE");const o=n.sqr(r),a=d(e);if(!n.eql(o,a))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){g(e);const{px:t,py:r,pz:o}=this,{px:a,py:i,pz:s}=e,c=n.eql(n.mul(t,s),n.mul(a,o)),u=n.eql(n.mul(r,s),n.mul(i,o));return c&&u}negate(){return new y(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,o=n.mul(r,f),{px:a,py:i,pz:s}=this;let c=n.ZERO,u=n.ZERO,l=n.ZERO,d=n.mul(a,a),h=n.mul(i,i),p=n.mul(s,s),m=n.mul(a,i);return m=n.add(m,m),l=n.mul(a,s),l=n.add(l,l),c=n.mul(e,l),u=n.mul(o,p),u=n.add(c,u),c=n.sub(h,u),u=n.add(h,u),u=n.mul(c,u),c=n.mul(m,c),l=n.mul(o,l),p=n.mul(e,p),m=n.sub(d,p),m=n.mul(e,m),m=n.add(m,l),l=n.add(d,d),d=n.add(l,d),d=n.add(d,p),d=n.mul(d,m),u=n.add(u,d),p=n.mul(i,s),p=n.add(p,p),d=n.mul(p,m),c=n.sub(c,d),l=n.mul(p,h),l=n.add(l,l),l=n.add(l,l),new y(c,u,l)}add(e){g(e);const{px:r,py:o,pz:a}=this,{px:i,py:s,pz:c}=e;let u=n.ZERO,l=n.ZERO,d=n.ZERO;const h=t.a,p=n.mul(t.b,f);let m=n.mul(r,i),b=n.mul(o,s),v=n.mul(a,c),w=n.add(r,o),E=n.add(i,s);w=n.mul(w,E),E=n.add(m,b),w=n.sub(w,E),E=n.add(r,a);let A=n.add(i,c);return E=n.mul(E,A),A=n.add(m,v),E=n.sub(E,A),A=n.add(o,a),u=n.add(s,c),A=n.mul(A,u),u=n.add(b,v),A=n.sub(A,u),d=n.mul(h,E),u=n.mul(p,v),d=n.add(u,d),u=n.sub(b,d),d=n.add(b,d),l=n.mul(u,d),b=n.add(m,m),b=n.add(b,m),v=n.mul(h,v),E=n.mul(p,E),b=n.add(b,v),v=n.sub(m,v),v=n.mul(h,v),E=n.add(E,v),m=n.mul(b,E),l=n.add(l,m),m=n.mul(A,E),u=n.mul(w,u),u=n.sub(u,m),m=n.mul(w,b),d=n.mul(A,d),d=n.add(d,m),new y(u,l,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(y.ZERO)}wNAF(e){return w.wNAFCached(this,b,e,(e=>{const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(y.fromAffine)}))}multiplyUnsafe(e){const r=y.ZERO;if(e===u)return r;if(p(e),e===l)return this;const{endo:o}=t;if(!o)return w.unsafeLadder(this,e);let{k1neg:a,k1:i,k2neg:s,k2:c}=o.splitScalar(e),d=r,f=r,h=this;for(;i>u||c>u;)i&l&&(d=d.add(h)),c&l&&(f=f.add(h)),h=h.double(),i>>=l,c>>=l;return a&&(d=d.negate()),s&&(f=f.negate()),f=new y(n.mul(f.px,o.beta),f.py,f.pz),d.add(f)}multiply(e){p(e);let r,o,a=e;const{endo:i}=t;if(i){const{k1neg:e,k1:t,k2neg:s,k2:c}=i.splitScalar(a);let{p:u,f:l}=this.wNAF(t),{p:d,f:f}=this.wNAF(c);u=w.constTimeNegate(e,u),d=w.constTimeNegate(s,d),d=new y(n.mul(d.px,i.beta),d.py,d.pz),r=u.add(d),o=l.add(f)}else{const{p:e,f:t}=this.wNAF(a);r=e,o=t}return y.normalizeZ([r,o])[0]}multiplyAndAddUnsafe(e,t,n){const r=y.BASE,o=(e,t)=>t!==u&&t!==l&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),a=o(this,t).add(o(e,n));return a.is0()?void 0:a}toAffine(e){const{px:t,py:r,pz:o}=this,a=this.is0();null==e&&(e=a?n.ONE:n.inv(o));const i=n.mul(t,e),s=n.mul(r,e),c=n.mul(o,e);if(a)return{x:n.ZERO,y:n.ZERO};if(!n.eql(c,n.ONE))throw new Error("invZ was invalid");return{x:i,y:s}}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===l)return!0;if(n)return n(y,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===l?this:n?n(y,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),s(y,this,e)}toHex(e=!0){return o.bytesToHex(this.toRawBytes(e))}}y.BASE=new y(t.Gx,t.Gy,n.ONE),y.ZERO=new y(n.ZERO,n.ONE,n.ZERO);const v=t.nBitLength,w=(0,i.wNAF)(y,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:y,normPrivateKeyToScalar:m,weierstrassEquation:d,isWithinCurveOrder:h}}function m(e,t){const n=e.ORDER;let r=u;for(let f=n-l;f%d===u;f/=d)r+=l;const o=r,a=d<{let r=b,a=e.pow(n,p),i=e.sqr(a);i=e.mul(i,n);let s=e.mul(t,i);s=e.pow(s,c),s=e.mul(s,a),a=e.mul(s,n),i=e.mul(s,t);let u=e.mul(i,a);s=e.pow(u,m);let f=e.eql(s,e.ONE);a=e.mul(i,g),s=e.mul(u,r),i=e.cmov(a,i,f),u=e.cmov(s,u,f);for(let c=o;c>l;c--){let t=c-d;t=d<{let a=e.sqr(o);const i=e.mul(t,o);a=e.mul(a,i);let s=e.pow(a,n);s=e.mul(s,i);const c=e.mul(s,r),u=e.mul(e.sqr(s),o),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,s,l)}}}return y}t.weierstrassPoints=p,t.weierstrass=function(e){const n=function(e){const t=(0,i.validateBasic)(e);return o.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:s,n:c}=n,d=s.BYTES+1,f=2*s.BYTES+1;function h(e){return r.mod(e,c)}function m(e){return r.invert(e,c)}const{ProjectivePoint:b,normPrivateKeyToScalar:g,weierstrassEquation:y,isWithinCurveOrder:v}=p({...n,toBytes(e,t,n){const r=t.toAffine(),a=s.toBytes(r.x),i=o.concatBytes;return n?i(Uint8Array.from([t.hasEvenY()?2:3]),a):i(Uint8Array.from([4]),a,s.toBytes(r.y))},fromBytes(e){const t=e.length,n=e[0],r=e.subarray(1);if(t!==d||2!==n&&3!==n){if(t===f&&4===n){return{x:s.fromBytes(r.subarray(0,s.BYTES)),y:s.fromBytes(r.subarray(s.BYTES,2*s.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${d} compressed bytes or ${f} uncompressed bytes`)}{const e=o.bytesToNumberBE(r);if(!(u<(a=e)&&ao.bytesToHex(o.numberToBytesBE(e,n.nByteLength));function E(e){return e>c>>l}const A=(e,t,n)=>o.bytesToNumberBE(e.slice(t,n));class x{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const t=n.nByteLength;return e=(0,a.ensureBytes)("compactSignature",e,2*t),new x(A(e,0,t),A(e,t,2*t))}static fromDER(e){const{r:n,s:r}=t.DER.toSig((0,a.ensureBytes)("DER",e));return new x(n,r)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new x(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:r,recovery:o}=this,i=I((0,a.ensureBytes)("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const c=2===o||3===o?t+n.n:t;if(c>=s.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=0===(1&o)?"02":"03",l=b.fromHex(u+w(c)),d=m(c),f=h(-i*d),p=h(r*d),g=b.BASE.multiplyAndAddUnsafe(l,f,p);if(!g)throw new Error("point at infinify");return g.assertValidity(),g}hasHighS(){return E(this.s)}normalizeS(){return this.hasHighS()?new x(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const P={isValidPrivateKey(e){try{return g(e),!0}catch(t){return!1}},normPrivateKeyToScalar:g,randomPrivateKey:()=>{const e=n.randomBytes(s.BYTES+8),t=r.hashToPrivateScalar(e,c);return o.numberToBytesBE(t,n.nByteLength)},precompute:(e=8,t=b.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function C(e){const t=e instanceof Uint8Array,n="string"===typeof e,r=(t||n)&&e.length;return t?r===d||r===f:n?r===2*d||r===2*f:e instanceof b}const j=n.bits2int||function(e){const t=o.bytesToNumberBE(e),r=8*e.length-n.nBitLength;return r>0?t>>BigInt(r):t},I=n.bits2int_modN||function(e){return h(j(e))},O=o.bitMask(n.nBitLength);function T(e){if("bigint"!==typeof e)throw new Error("bigint expected");if(!(u<=e&&ee in r)))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:c}=n;let{lowS:d,prehash:f,extraEntropy:p}=r;null==d&&(d=!0),e=(0,a.ensureBytes)("msgHash",e),f&&(e=(0,a.ensureBytes)("prehashed msgHash",i(e)));const y=I(e),w=g(t),A=[T(w),T(y)];if(null!=p){const e=!0===p?c(s.BYTES):p;A.push((0,a.ensureBytes)("extraEntropy",e,s.BYTES))}const P=o.concatBytes(...A),C=y;return{seed:P,k2sig:function(e){const t=j(e);if(!v(t))return;const n=m(t),r=b.BASE.multiply(t).toAffine(),o=h(r.x);if(o===u)return;const a=h(n*h(C+o*w));if(a===u)return;let i=(r.x===o?0:2)|Number(r.y&l),s=a;return d&&E(a)&&(s=function(e){return E(e)?h(-e):e}(a),i^=1),new x(o,s,i)}}}const B={lowS:n.lowS,prehash:!1},k={lowS:n.lowS,prehash:!1};return b.BASE._setWindowSize(8),{CURVE:n,getPublicKey:function(e,t=!0){return b.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(C(e))throw new Error("first arg must be private key");if(!C(t))throw new Error("second arg must be public key");return b.fromHex(t).multiply(g(e)).toRawBytes(n)},sign:function(e,t,r=B){const{seed:a,k2sig:i}=S(e,t,r),s=n;return o.createHmacDrbg(s.hash.outputLen,s.nByteLength,s.hmac)(a,i)},verify:function(e,r,o,i=k){const s=e;if(r=(0,a.ensureBytes)("msgHash",r),o=(0,a.ensureBytes)("publicKey",o),"strict"in i)throw new Error("options.strict was renamed to lowS");const{lowS:c,prehash:u}=i;let l,d;try{if("string"===typeof s||s instanceof Uint8Array)try{l=x.fromDER(s)}catch(A){if(!(A instanceof t.DER.Err))throw A;l=x.fromCompact(s)}else{if("object"!==typeof s||"bigint"!==typeof s.r||"bigint"!==typeof s.s)throw new Error("PARSE");{const{r:e,s:t}=s;l=new x(e,t)}}d=b.fromHex(o)}catch(P){if("PARSE"===P.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&l.hasHighS())return!1;u&&(r=n.hash(r));const{r:f,s:p}=l,g=I(r),y=m(p),v=h(g*y),w=h(f*y),E=b.BASE.multiplyAndAddUnsafe(d,v,w)?.toAffine();return!!E&&h(E.x)===f},ProjectivePoint:b,Signature:x,utils:P}},t.SWUFpSqrtRatio=m,t.mapToCurveSimpleSWU=function(e,t){if(r.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const n=m(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let o,a,i,s,c,u,l,d;o=e.sqr(r),o=e.mul(o,t.Z),a=e.sqr(o),a=e.add(a,o),i=e.add(a,e.ONE),i=e.mul(i,t.B),s=e.cmov(t.Z,e.neg(a),!e.eql(a,e.ZERO)),s=e.mul(s,t.A),a=e.sqr(i),u=e.sqr(s),c=e.mul(u,t.A),a=e.add(a,c),a=e.mul(a,i),u=e.mul(u,s),c=e.mul(u,t.B),a=e.add(a,c),l=e.mul(o,i);const{isValid:f,value:h}=n(a,u);d=e.mul(o,r),d=e.mul(d,h),l=e.cmov(l,i,f),d=e.cmov(d,h,f);const p=e.isOdd(r)===e.isOdd(d);return d=e.cmov(e.neg(d),d,p),l=e.div(l,s),{x:l,y:d}}}},54791:function(e,t){"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function r(e){if("boolean"!==typeof e)throw new Error(`Expected boolean, not ${e}`)}function o(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function a(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function i(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){o(e);const n=t.outputLen;if(e.lengtha-s&&(this.process(n,0),s=0);for(let r=s;r>o&a),s=Number(n&a),c=r?4:0,u=r?0:4;e.setUint32(t+c,i,r),e.setUint32(t+u,s,r)}(n,a-8,BigInt(8*this.length),i),this.process(n,0);const c=(0,o.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let r=0;ra?e.create().update(n).digest():n);for(let r=0;rnew a(e,t).update(n).digest(),t.hmac.create=(e,t)=>new a(e,t)},33271:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const r=n(72529),o=n(86226),a=(e,t,n)=>e&t^e&n^t&n,i=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 r.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:n,D:r,E:o,F:a,G:i,H:s}=this;return[e,t,n,r,o,a,i,s]}set(e,t,n,r,o,a,i,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|a,this.G=0|i,this.H=0|s}process(e,t){for(let o=0;o<16;o++,t+=4)c[o]=e.getUint32(t,!1);for(let a=16;a<64;a++){const e=c[a-15],t=c[a-2],n=(0,o.rotr)(e,7)^(0,o.rotr)(e,18)^e>>>3,r=(0,o.rotr)(t,17)^(0,o.rotr)(t,19)^t>>>10;c[a]=r+c[a-7]+n+c[a-16]|0}let{A:n,B:r,C:s,D:u,E:l,F:d,G:f,H:h}=this;for(let m=0;m<64;m++){const e=h+((0,o.rotr)(l,6)^(0,o.rotr)(l,11)^(0,o.rotr)(l,25))+((p=l)&d^~p&f)+i[m]+c[m]|0,t=((0,o.rotr)(n,2)^(0,o.rotr)(n,13)^(0,o.rotr)(n,22))+a(n,r,s)|0;h=f,f=d,d=l,l=u+e|0,u=s,s=r,r=n,n=e+t|0}var p;n=n+this.A|0,r=r+this.B|0,s=s+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,r,s,u,l,d,f,h)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,o.wrapConstructor)((()=>new u)),t.sha224=(0,o.wrapConstructor)((()=>new l))},86226:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=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 r=n(39153),o=e=>e instanceof Uint8Array;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);if(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 a=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n{},t.asyncLoop=async function(e,n,r){let o=Date.now();for(let a=0;a=0&&ee+t.length),0));let n=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,n),n+=e.length})),t};t.Hash=class{clone(){return this._cloneInto()}};t.checkOpts=function(e,t){if(void 0!==t&&("object"!==typeof t||(n=t,"[object Object]"!==Object.prototype.toString.call(n)||n.constructor!==Object)))throw new Error("Options should be object or undefined");var n;return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(s(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(s(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(s(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(r.crypto&&"function"===typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},20050:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const r=n(33271),o=n(86226),a=n(3188),i=n(49575),s=n(41830),c=n(11534),u=n(32286),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f=BigInt(1),h=BigInt(2),p=(e,t)=>(e+t/h)/t;function m(e){const t=l,n=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),s=BigInt(23),c=BigInt(44),u=BigInt(88),d=e*e*e%t,f=d*d*e%t,p=(0,a.pow2)(f,n,t)*f%t,m=(0,a.pow2)(p,n,t)*f%t,g=(0,a.pow2)(m,h,t)*d%t,y=(0,a.pow2)(g,o,t)*g%t,v=(0,a.pow2)(y,i,t)*y%t,w=(0,a.pow2)(v,c,t)*v%t,E=(0,a.pow2)(w,u,t)*w%t,A=(0,a.pow2)(E,c,t)*v%t,x=(0,a.pow2)(A,n,t)*f%t,P=(0,a.pow2)(x,s,t)*y%t,C=(0,a.pow2)(P,r,t)*d%t,j=(0,a.pow2)(C,h,t);if(!b.eql(b.sqr(j),e))throw new Error("Cannot find square root");return j}const b=(0,a.Field)(l,void 0,void 0,{sqrt:m});t.secp256k1=(0,u.createCurve)({a:BigInt(0),b:BigInt(7),Fp:b,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=d,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,s=BigInt("0x100000000000000000000000000000000"),c=p(i*e,t),u=p(-r*e,t);let l=(0,a.mod)(e-c*n-u*o,t),h=(0,a.mod)(-c*r-u*i,t);const m=l>s,b=h>s;if(m&&(l=t-l),b&&(h=t-h),l>s||h>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:m,k1:l,k2neg:b,k2:h}}}},r.sha256);const g=BigInt(0),y=e=>"bigint"===typeof e&&ge.charCodeAt(0))));n=(0,s.concatBytes)(t,t),v[e]=n}return(0,r.sha256)((0,s.concatBytes)(n,...t))}const E=e=>e.toRawBytes(!0).slice(1),A=e=>(0,s.numberToBytesBE)(e,32),x=e=>(0,a.mod)(e,l),P=e=>(0,a.mod)(e,d),C=t.secp256k1.ProjectivePoint;function j(e){let n=t.secp256k1.utils.normPrivateKeyToScalar(e),r=C.fromPrivateKey(n);return{scalar:r.hasEvenY()?n:P(-n),bytes:E(r)}}function I(e){if(!y(e))throw new Error("bad x: need 0 < x < p");const t=x(e*e);let n=m(x(t*e+BigInt(7)));n%h!==g&&(n=x(-n));const r=new C(e,n,f);return r.assertValidity(),r}function O(...e){return P((0,s.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function T(e){return j(e).bytes}function S(e,t,n=(0,o.randomBytes)(32)){const r=(0,s.ensureBytes)("message",e),{bytes:a,scalar:i}=j(t),c=(0,s.ensureBytes)("auxRand",n,32),u=A(i^(0,s.bytesToNumberBE)(w("BIP0340/aux",c))),l=w("BIP0340/nonce",u,a,r),d=P((0,s.bytesToNumberBE)(l));if(d===g)throw new Error("sign failed: k is zero");const{bytes:f,scalar:h}=j(d),p=O(f,a,r),m=new Uint8Array(64);if(m.set(f,0),m.set(A(P(h+p*i)),32),!B(m,r,a))throw new Error("sign: Invalid signature produced");return m}function B(e,t,n){const r=(0,s.ensureBytes)("signature",e,64),o=(0,s.ensureBytes)("message",t),a=(0,s.ensureBytes)("publicKey",n,32);try{const e=I((0,s.bytesToNumberBE)(a)),t=(0,s.bytesToNumberBE)(r.subarray(0,32));if(!y(t))return!1;const n=(0,s.bytesToNumberBE)(r.subarray(32,64));if(!("bigint"===typeof(l=n)&&g(0,c.isogenyMap)(b,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),_=(()=>(0,i.mapToCurveSimpleSWU)(b,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:b.create(BigInt("-11"))}))(),N=(()=>(0,c.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:n}=_(b.create(e[0]));return k(t,n)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:b.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}))();t.hashToCurve=N.hashToCurve,t.encodeToCurve=N.encodeToCurve},71427:function(e,t){"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function r(e){if("boolean"!==typeof e)throw new Error(`Expected boolean, not ${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}`)}function a(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function i(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){o(e);const n=t.outputLen;if(e.length>r&n)}:{h:0|Number(e>>r&n),l:0|Number(e&n)}}function a(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let a=0;aBigInt(e>>>0)<>>0);function i(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}}t.add=i;const s={fromBig:o,split:a,toBig:t.toBig,shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:(e,t,n)=>e<>>32-n,rotlSL:(e,t,n)=>t<>>32-n,rotlBH:(e,t,n)=>t<>>64-n,rotlBL:(e,t,n)=>e<>>64-n,add:i,add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,add5H:(e,t,n,r,o,a)=>t+n+r+o+a+(e/2**32|0)|0,add5L:(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0)};t.default=s},922:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},7217:function(e,t,n){"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 r=n(71427),o=n(30066),a=n(74574),[i,s,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),d=BigInt(2),f=BigInt(7),h=BigInt(256),p=BigInt(113);for(let x=0,P=l,C=1,j=0;x<24;x++){[C,j]=[j,(2*C+3*j)%5],i.push(2*(5*j+C)),s.push((x+1)*(x+2)/2%64);let e=u;for(let t=0;t<7;t++)P=(P<>f)*p)%h,P&d&&(e^=l<<(l<n>32?o.default.rotlBH(e,t,n):o.default.rotlSH(e,t,n),y=(e,t,n)=>n>32?o.default.rotlBL(e,t,n):o.default.rotlSL(e,t,n);function v(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,o=(r+2)%10,a=n[o],i=n[o+1],s=g(a,i,1)^n[t],c=y(a,i,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=s,e[r+n+1]^=c}let t=e[2],o=e[3];for(let n=0;n<24;n++){const r=s[n],a=g(t,o,r),c=y(t,o,r),u=i[n];t=e[u],o=e[u+1],e[u]=a,e[u+1]=c}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=m[r],e[1]^=b[r]}n.fill(0)}t.keccakP=v;class w extends a.Hash{constructor(e,t,n,o=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=o,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,r.default.number(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,a.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){r.default.exists(this);const{blockLen:t,state:n}=this,o=(e=(0,a.toBytes)(e)).length;for(let r=0;r=n&&this.keccak();const a=Math.min(n-this.posOut,o-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return r.default.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(r.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:n,outputLen:r,rounds:o,enableXOF:a}=this;return e||(e=new w(t,n,r,a,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=r,e.enableXOF=a,e.destroyed=this.destroyed,e}}t.Keccak=w;const E=(e,t,n)=>(0,a.wrapConstructor)((()=>new w(t,e,n)));t.sha3_224=E(6,144,28),t.sha3_256=E(6,136,32),t.sha3_384=E(6,104,48),t.sha3_512=E(6,72,64),t.keccak_224=E(1,144,28),t.keccak_256=E(1,136,32),t.keccak_384=E(1,104,48),t.keccak_512=E(1,72,64);const A=(e,t,n)=>(0,a.wrapConstructorWithOpts)(((r={})=>new w(t,e,void 0===r.dkLen?n:r.dkLen,!0)));t.shake128=A(31,168,16),t.shake256=A(31,136,32)},74574:function(e,t,n){"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 r=n(922);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);if(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 o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let n=0;n{},t.asyncLoop=async function(e,n,r){let o=Date.now();for(let a=0;a=0&&ee 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),n=new Uint8Array(t);for(let r=0,o=0;re().update(i(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(i(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(r.crypto&&"function"===typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},35883:function(){},3975:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAccount=void 0,t.parseAccount=function(e){return"string"===typeof e?{address:e,type:"json-rpc"}:e}},3417:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publicKeyToAddress=void 0;const r=n(36556),o=n(75225);t.publicKeyToAddress=function(e){const t=(0,o.keccak256)(`0x${e.substring(4)}`).substring(26);return(0,r.checksumAddress)(`0x${t}`)}},22440:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsAddress=void 0;const r=n(28669),o=n(76286),a=n(22836),i=n(47797),s=n(80475),c=n(86308),u=n(19662),l=n(77863),d=n(72126),f=n(33531);t.getEnsAddress=async function(e,{blockNumber:t,blockTag:n,coinType:h,name:p,universalResolverAddress:m}){let b=m;if(!b){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");b=(0,i.getChainContractAddress)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const i=(0,a.encodeFunctionData)({abi:r.addressResolverAbi,functionName:"addr",...null!=h?{args:[(0,l.namehash)(p),BigInt(h)]}:{args:[(0,l.namehash)(p)]}}),u=await(0,f.readContract)(e,{address:b,abi:r.universalResolverResolveAbi,functionName:"resolve",args:[(0,c.toHex)((0,d.packetToBytes)(p)),i],blockNumber:t,blockTag:n});if("0x"===u[0])return null;const m=(0,s.trim)((0,o.decodeFunctionResult)({abi:r.addressResolverAbi,args:null!=h?[(0,l.namehash)(p),BigInt(h)]:void 0,functionName:"addr",data:u[0]}));return"0x"===m||"0x00"===(0,s.trim)(m)?null:m}catch(g){if((0,u.isNullUniversalResolverError)(g,"resolve"))return null;throw g}}},32637:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsAvatar=void 0;const r=n(18467),o=n(43896);t.getEnsAvatar=async function(e,{blockNumber:t,blockTag:n,gatewayUrls:a,name:i,universalResolverAddress:s}){const c=await(0,o.getEnsText)(e,{blockNumber:t,blockTag:n,key:"avatar",name:i,universalResolverAddress:s});if(!c)return null;try{return await(0,r.parseAvatarRecord)(e,{record:c,gatewayUrls:a})}catch{return null}}},59593:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsName=void 0;const r=n(28669),o=n(47797),a=n(86308),i=n(19662),s=n(72126),c=n(33531);t.getEnsName=async function(e,{address:t,blockNumber:n,blockTag:u,universalResolverAddress:l}){let d=l;if(!d){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");d=(0,o.getChainContractAddress)({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}const f=`${t.toLowerCase().substring(2)}.addr.reverse`;try{return(await(0,c.readContract)(e,{address:d,abi:r.universalResolverReverseAbi,functionName:"reverse",args:[(0,a.toHex)((0,s.packetToBytes)(f))],blockNumber:n,blockTag:u}))[0]}catch(h){if((0,i.isNullUniversalResolverError)(h,"reverse"))return null;throw h}}},12429:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsResolver=void 0;const r=n(47797),o=n(86308),a=n(72126),i=n(33531);t.getEnsResolver=async function(e,{blockNumber:t,blockTag:n,name:s,universalResolverAddress:c}){let u=c;if(!u){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");u=(0,r.getChainContractAddress)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const[l]=await(0,i.readContract)(e,{address:u,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,o.toHex)((0,a.packetToBytes)(s))],blockNumber:t,blockTag:n});return l}},43896:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsText=void 0;const r=n(28669),o=n(76286),a=n(22836),i=n(47797),s=n(86308),c=n(19662),u=n(77863),l=n(72126),d=n(33531);t.getEnsText=async function(e,{blockNumber:t,blockTag:n,name:f,key:h,universalResolverAddress:p}){let m=p;if(!m){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");m=(0,i.getChainContractAddress)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const i=await(0,d.readContract)(e,{address:m,abi:r.universalResolverResolveAbi,functionName:"resolve",args:[(0,s.toHex)((0,l.packetToBytes)(f)),(0,a.encodeFunctionData)({abi:r.textResolverAbi,functionName:"text",args:[(0,u.namehash)(f),h]})],blockNumber:t,blockTag:n});if("0x"===i[0])return null;const c=(0,o.decodeFunctionResult)({abi:r.textResolverAbi,functionName:"text",data:i[0]});return""===c?null:c}catch(b){if((0,c.isNullUniversalResolverError)(b,"resolve"))return null;throw b}}},28690:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventParameters=t.getFunctionParameters=t.getContract=void 0;const r=n(99985),o=n(37346),a=n(33531),i=n(63747),s=n(49488),c=n(97747);function u(e){const t=e.length&&Array.isArray(e[0]);return{args:t?e[0]:[],options:(t?e[1]:e[0])??{}}}function l(e,t){let n=!1;Array.isArray(e[0])?n=!0:1===e.length?n=t.inputs.some((e=>e.indexed)):2===e.length&&(n=!0);return{args:n?e[0]:void 0,options:(n?e[1]:e[0])??{}}}t.getContract=function({abi:e,address:t,publicClient:n,walletClient:d}){const f=void 0!==n&&null!==n,h=void 0!==d&&null!==d,p={};let m=!1,b=!1,g=!1;for(const r of e)if("function"===r.type?"view"===r.stateMutability||"pure"===r.stateMutability?m=!0:b=!0:"event"===r.type&&(g=!0),m&&b&&g)break;return f&&(m&&(p.read=new Proxy({},{get:(r,o)=>(...r)=>{const{args:i,options:s}=u(r);return(0,a.readContract)(n,{abi:e,address:t,functionName:o,args:i,...s})}})),b&&(p.simulate=new Proxy({},{get:(r,o)=>(...r)=>{const{args:a,options:s}=u(r);return(0,i.simulateContract)(n,{abi:e,address:t,functionName:o,args:a,...s})}})),g&&(p.createEventFilter=new Proxy({},{get:(o,a)=>(...o)=>{const i=e.find((e=>"event"===e.type&&e.name===a)),{args:s,options:c}=l(o,i);return(0,r.createContractEventFilter)(n,{abi:e,address:t,eventName:a,args:s,...c})}}),p.watchEvent=new Proxy({},{get:(r,o)=>(...r)=>{const a=e.find((e=>"event"===e.type&&e.name===o)),{args:i,options:c}=l(r,a);return(0,s.watchContractEvent)(n,{abi:e,address:t,eventName:o,args:i,...c})}}))),h&&b&&(p.write=new Proxy({},{get:(n,r)=>(...n)=>{const{args:o,options:a}=u(n);return(0,c.writeContract)(d,{abi:e,address:t,functionName:r,args:o,...a})}})),(f||h)&&b&&(p.estimateGas=new Proxy({},{get:(r,a)=>(...r)=>{const{args:i,options:s}=u(r),c=n??d;return(0,o.estimateContractGas)(c,{abi:e,address:t,functionName:a,args:i,...s,account:s.account??d.account})}})),p.address=t,p.abi=e,p},t.getFunctionParameters=u,t.getEventParameters=l},11273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRevertErrorData=t.call=void 0;const r=n(3975),o=n(28669),a=n(83984),i=n(26456),s=n(91363),c=n(9996),u=n(76286),l=n(22836),d=n(47797),f=n(86308),h=n(10133),p=n(82320),m=n(33270),b=n(48170),g=n(5434);function y(e){if(!(e instanceof i.BaseError))return;const t=e.walk();return"object"===typeof t.data?t.data.data:t.data}t.call=async function(e,t){const{account:i,batch:v=Boolean(e.batch?.multicall),blockNumber:w,blockTag:E="latest",accessList:A,data:x,gas:P,gasPrice:C,maxFeePerGas:j,maxPriorityFeePerGas:I,nonce:O,to:T,value:S,...B}=t,k=i?(0,r.parseAccount)(i):void 0;try{(0,g.assertRequest)(t);const n=(w?(0,f.numberToHex)(w):void 0)||E,r=e.chain?.formatters?.transactionRequest?.format||m.formatTransactionRequest,i=r({...(0,p.extract)(B,{format:r}),from:k?.address,accessList:A,data:x,gas:P,gasPrice:C,maxFeePerGas:j,maxPriorityFeePerGas:I,nonce:O,to:T,value:S});if(v&&function({request:e}){const{data:t,to:n,...r}=e;return!!t&&(!t.startsWith(a.aggregate3Signature)&&(!!n&&!(Object.values(r).filter((e=>"undefined"!==typeof e)).length>0)))}({request:i}))try{return await async function(e,t){const{batchSize:n=1024,wait:r=0}="object"===typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:a,blockTag:i="latest",data:h,multicallAddress:p,to:m}=t;let g=p;if(!g){if(!e.chain)throw new s.ClientChainNotConfiguredError;g=(0,d.getChainContractAddress)({blockNumber:a,chain:e.chain,contract:"multicall3"})}const y=(a?(0,f.numberToHex)(a):void 0)||i,{schedule:v}=(0,b.createBatchScheduler)({id:`${e.uid}.${y}`,wait:r,shouldSplitBatch(e){const t=e.reduce(((e,{data:t})=>e+(t.length-2)),0);return t>2*n},fn:async t=>{const n=t.map((e=>({allowFailure:!0,callData:e.data,target:e.to}))),r=(0,l.encodeFunctionData)({abi:o.multicall3Abi,args:[n],functionName:"aggregate3"}),a=await e.request({method:"eth_call",params:[{data:r,to:g},y]});return(0,u.decodeFunctionResult)({abi:o.multicall3Abi,args:[n],functionName:"aggregate3",data:a||"0x"})}}),[{returnData:w,success:E}]=await v({data:h,to:m});if(!E)throw new c.RawContractError({data:w});return"0x"===w?{data:void 0}:{data:w}}(e,{...i,blockNumber:w,blockTag:E})}catch(_){if(!(_ instanceof s.ClientChainNotConfiguredError)&&!(_ instanceof s.ChainDoesNotSupportContract))throw _}const h=await e.request({method:"eth_call",params:n?[i,n]:[i]});return"0x"===h?{data:void 0}:{data:h}}catch(_){const r=y(_),{offchainLookup:o,offchainLookupSignature:a}=await Promise.resolve().then(n.bind(n,64045));if(r?.slice(0,10)===a&&T)return{data:await o(e,{data:r,to:T})};throw(0,h.getCallError)(_,{...t,account:k,chain:e.chain})}},t.getRevertErrorData=y},46376:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBlockFilter=void 0;const r=n(44929);t.createBlockFilter=async function(e){const t=(0,r.createFilterRequestScope)(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}},99985:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createContractEventFilter=void 0;const r=n(7534),o=n(86308),a=n(44929);t.createContractEventFilter=async function(e,{address:t,abi:n,args:i,eventName:s,fromBlock:c,strict:u,toBlock:l}){const d=(0,a.createFilterRequestScope)(e,{method:"eth_newFilter"}),f=s?(0,r.encodeEventTopics)({abi:n,args:i,eventName:s}):void 0,h=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"===typeof c?(0,o.numberToHex)(c):c,toBlock:"bigint"===typeof l?(0,o.numberToHex)(l):l,topics:f}]});return{abi:n,args:i,eventName:s,id:h,request:d(h),strict:u,type:"event"}}},3200:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEventFilter=void 0;const r=n(7534),o=n(86308),a=n(44929);t.createEventFilter=async function(e,{address:t,args:n,event:i,events:s,fromBlock:c,strict:u,toBlock:l}={}){const d=s??(i?[i]:void 0),f=(0,a.createFilterRequestScope)(e,{method:"eth_newFilter"});let h=[];d&&(h=[d.flatMap((e=>(0,r.encodeEventTopics)({abi:[e],eventName:e.name,args:n})))],i&&(h=h[0]));const p=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"===typeof c?(0,o.numberToHex)(c):c,toBlock:"bigint"===typeof l?(0,o.numberToHex)(l):l,...h.length?{topics:h}:{}}]});return{abi:d,args:n,eventName:i?i.name:void 0,fromBlock:c,id:p,request:f(p),strict:u,toBlock:l,type:"event"}}},99792:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPendingTransactionFilter=void 0;const r=n(44929);t.createPendingTransactionFilter=async function(e){const t=(0,r.createFilterRequestScope)(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}},37346:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.estimateContractGas=void 0;const r=n(3975),o=n(22836),a=n(90042),i=n(23337);t.estimateContractGas=async function(e,{abi:t,address:n,args:s,functionName:c,...u}){const l=(0,o.encodeFunctionData)({abi:t,args:s,functionName:c});try{return await(0,i.estimateGas)(e,{data:l,to:n,...u})}catch(d){const e=u.account?(0,r.parseAccount)(u.account):void 0;throw(0,a.getContractError)(d,{abi:t,address:n,args:s,docsPath:"/docs/contract/estimateContractGas",functionName:c,sender:e?.address})}}},23337:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.estimateGas=void 0;const r=n(3975),o=n(26175),a=n(86308),i=n(54141),s=n(82320),c=n(33270),u=n(5434),l=n(40623);t.estimateGas=async function(e,t){const n=t.account??e.account;if(!n)throw new o.AccountNotFoundError({docsPath:"/docs/actions/public/estimateGas"});const d=(0,r.parseAccount)(n);try{const{accessList:n,blockNumber:r,blockTag:o,data:i,gas:f,gasPrice:h,maxFeePerGas:p,maxPriorityFeePerGas:m,nonce:b,to:g,value:y,...v}="local"===d.type?await(0,l.prepareRequest)(e,t):t,w=(r?(0,a.numberToHex)(r):void 0)||o;(0,u.assertRequest)(t);const E=e.chain?.formatters?.transactionRequest?.format||c.formatTransactionRequest,A=E({...(0,s.extract)(v,{format:E}),from:d.address,accessList:n,data:i,gas:f,gasPrice:h,maxFeePerGas:p,maxPriorityFeePerGas:m,nonce:b,to:g,value:y}),x=await e.request({method:"eth_estimateGas",params:w?[A,w]:[A]});return BigInt(x)}catch(f){throw(0,i.getEstimateGasError)(f,{...t,account:d,chain:e.chain})}}},85233:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBalance=void 0;const r=n(86308);t.getBalance=async function(e,{address:t,blockNumber:n,blockTag:o="latest"}){const a=n?(0,r.numberToHex)(n):void 0,i=await e.request({method:"eth_getBalance",params:[t,a||o]});return BigInt(i)}},29086:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlock=void 0;const r=n(54907),o=n(86308),a=n(23604);t.getBlock=async function(e,{blockHash:t,blockNumber:n,blockTag:i,includeTransactions:s}={}){const c=i??"latest",u=s??!1,l=void 0!==n?(0,o.numberToHex)(n):void 0;let d=null;if(d=t?await e.request({method:"eth_getBlockByHash",params:[t,u]}):await e.request({method:"eth_getBlockByNumber",params:[l||c,u]}),!d)throw new r.BlockNotFoundError({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||a.formatBlock)(d)}},99284:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockNumber=t.getBlockNumberCache=void 0;const r=n(38447),o=e=>`blockNumber.${e}`;t.getBlockNumberCache=function(e){return(0,r.getCache)(o(e))},t.getBlockNumber=async function(e,{cacheTime:t=e.cacheTime,maxAge:n}={}){const a=await(0,r.withCache)((()=>e.request({method:"eth_blockNumber"})),{cacheKey:o(e.uid),cacheTime:n??t});return BigInt(a)}},47480:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockTransactionCount=void 0;const r=n(57114),o=n(86308);t.getBlockTransactionCount=async function(e,{blockHash:t,blockNumber:n,blockTag:a="latest"}={}){const i=void 0!==n?(0,o.numberToHex)(n):void 0;let s;return s=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[i||a]}),(0,r.hexToNumber)(s)}},88352:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBytecode=void 0;const r=n(86308);t.getBytecode=async function(e,{address:t,blockNumber:n,blockTag:o="latest"}){const a=void 0!==n?(0,r.numberToHex)(n):void 0,i=await e.request({method:"eth_getCode",params:[t,a||o]});if("0x"!==i)return i}},42659:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChainId=void 0;const r=n(57114);t.getChainId=async function(e){const t=await e.request({method:"eth_chainId"});return(0,r.hexToNumber)(t)}},6560:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeeHistory=void 0;const r=n(86308),o=n(92736);t.getFeeHistory=async function(e,{blockCount:t,blockNumber:n,blockTag:a="latest",rewardPercentiles:i}){const s=n?(0,r.numberToHex)(n):void 0,c=await e.request({method:"eth_feeHistory",params:[(0,r.numberToHex)(t),s||a,i]});return(0,o.formatFeeHistory)(c)}},36696:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterChanges=void 0;const r=n(4403),o=n(81912),a=n(80330);t.getFilterChanges=async function(e,{filter:t}){const n="strict"in t&&t.strict;return(await t.request({method:"eth_getFilterChanges",params:[t.id]})).map((e=>{if("string"===typeof e)return e;try{const{eventName:r,args:i}="abi"in t&&t.abi?(0,o.decodeEventLog)({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return(0,a.formatLog)(e,{args:i,eventName:r})}catch(i){let n,o;if(i instanceof r.DecodeLogDataMismatch||i instanceof r.DecodeLogTopicsMismatch){if("strict"in t&&t.strict)return;n=i.abiItem.name,o=i.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,a.formatLog)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}},43675:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterLogs=void 0;const r=n(4403),o=n(81912),a=n(80330);t.getFilterLogs=async function(e,{filter:t}){const n=t.strict??!1;return(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map((e=>{try{const{eventName:r,args:i}="abi"in t&&t.abi?(0,o.decodeEventLog)({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return(0,a.formatLog)(e,{args:i,eventName:r})}catch(i){let n,o;if(i instanceof r.DecodeLogDataMismatch||i instanceof r.DecodeLogTopicsMismatch){if("strict"in t&&t.strict)return;n=i.abiItem.name,o=i.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,a.formatLog)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}},89984:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGasPrice=void 0,t.getGasPrice=async function(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}},96374:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLogs=void 0;const r=n(4403),o=n(81912),a=n(7534),i=n(86308),s=n(80330);t.getLogs=async function(e,{address:t,blockHash:n,fromBlock:c,toBlock:u,event:l,events:d,args:f,strict:h}={}){const p=h??!1,m=d??(l?[l]:void 0);let b,g=[];return m&&(g=[m.flatMap((e=>(0,a.encodeEventTopics)({abi:[e],eventName:e.name,args:f})))],l&&(g=g[0])),b=n?await e.request({method:"eth_getLogs",params:[{address:t,topics:g,blockHash:n}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:g,fromBlock:"bigint"===typeof c?(0,i.numberToHex)(c):c,toBlock:"bigint"===typeof u?(0,i.numberToHex)(u):u}]}),b.map((e=>{try{const{eventName:t,args:n}=m?(0,o.decodeEventLog)({abi:m,data:e.data,topics:e.topics,strict:p}):{eventName:void 0,args:void 0};return(0,s.formatLog)(e,{args:n,eventName:t})}catch(t){let n,o;if(t instanceof r.DecodeLogDataMismatch||t instanceof r.DecodeLogTopicsMismatch){if(p)return;n=t.abiItem.name,o=t.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,s.formatLog)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}},69894:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStorageAt=void 0;const r=n(86308);t.getStorageAt=async function(e,{address:t,blockNumber:n,blockTag:o="latest",slot:a}){const i=void 0!==n?(0,r.numberToHex)(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,a,i||o]})}},37960:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransaction=void 0;const r=n(70270),o=n(86308),a=n(1982);t.getTransaction=async function(e,{blockHash:t,blockNumber:n,blockTag:i,hash:s,index:c}){const u=i||"latest",l=void 0!==n?(0,o.numberToHex)(n):void 0;let d=null;if(s?d=await e.request({method:"eth_getTransactionByHash",params:[s]}):t?d=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,o.numberToHex)(c)]}):(l||u)&&(d=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||u,(0,o.numberToHex)(c)]})),!d)throw new r.TransactionNotFoundError({blockHash:t,blockNumber:n,blockTag:u,hash:s,index:c});return(e.chain?.formatters?.transaction?.format||a.formatTransaction)(d)}},44725:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionConfirmations=void 0;const r=n(99284),o=n(37960);t.getTransactionConfirmations=async function(e,{hash:t,transactionReceipt:n}){const[a,i]=await Promise.all([(0,r.getBlockNumber)(e),t?(0,o.getTransaction)(e,{hash:t}):void 0]),s=n?.blockNumber||i?.blockNumber;return s?a-s+1n:0n}},92530:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionCount=void 0;const r=n(57114),o=n(86308);t.getTransactionCount=async function(e,{address:t,blockTag:n="latest",blockNumber:a}){const i=await e.request({method:"eth_getTransactionCount",params:[t,a?(0,o.numberToHex)(a):n]});return(0,r.hexToNumber)(i)}},60148:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionReceipt=void 0;const r=n(70270),o=n(5840);t.getTransactionReceipt=async function(e,{hash:t}){const n=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!n)throw new r.TransactionReceiptNotFoundError({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||o.formatTransactionReceipt)(n)}},46580:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicall=void 0;const r=n(28669),o=n(4403),a=n(9996),i=n(76286),s=n(22836),c=n(47797),u=n(90042),l=n(33531);t.multicall=async function(e,t){const{allowFailure:n=!0,batchSize:d,blockNumber:f,blockTag:h,contracts:p,multicallAddress:m}=t,b=d??("object"===typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),g=p;let y=m;if(!y){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");y=(0,c.getChainContractAddress)({blockNumber:f,chain:e.chain,contract:"multicall3"})}const v=[[]];let w=0,E=0;for(let r=0;r0&&E>b&&(w++,E=(n.length-2)/2,v[w]=[]),v[w]=[...v[w],{allowFailure:!0,callData:n,target:t}]}catch(A){const r=(0,u.getContractError)(A,{abi:e,address:t,args:o,docsPath:"/docs/contract/multicall",functionName:a});if(!n)throw r;v[w]=[...v[w],{allowFailure:!0,callData:"0x",target:t}]}}return(await Promise.all(v.map((t=>(0,l.readContract)(e,{abi:r.multicall3Abi,address:y,args:[t],blockNumber:f,blockTag:h,functionName:"aggregate3"}))))).flat().map((({returnData:e,success:t},r)=>{const s=v.flat(),{callData:c}=s[r],{abi:l,address:d,functionName:f,args:h}=g[r];try{if("0x"===c)throw new o.AbiDecodingZeroDataError;if(!t)throw new a.RawContractError({data:e});const r=(0,i.decodeFunctionResult)({abi:l,args:h,data:e,functionName:f});return n?{result:r,status:"success"}:r}catch(A){const t=(0,u.getContractError)(A,{abi:l,address:d,args:h,docsPath:"/docs/contract/multicall",functionName:f});if(!n)throw t;return{error:t,result:void 0,status:"failure"}}}))}},33531:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readContract=void 0;const r=n(76286),o=n(22836),a=n(90042),i=n(11273);t.readContract=async function(e,{abi:t,address:n,args:s,functionName:c,...u}){const l=(0,o.encodeFunctionData)({abi:t,args:s,functionName:c});try{const{data:o}=await(0,i.call)(e,{data:l,to:n,...u});return(0,r.decodeFunctionResult)({abi:t,args:s,functionName:c,data:o||"0x"})}catch(d){throw(0,a.getContractError)(d,{abi:t,address:n,args:s,docsPath:"/docs/contract/readContract",functionName:c})}}},63747:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.simulateContract=void 0;const r=n(3975),o=n(76286),a=n(22836),i=n(90042),s=n(11273);t.simulateContract=async function(e,{abi:t,address:n,args:c,dataSuffix:u,functionName:l,...d}){const f=d.account?(0,r.parseAccount)(d.account):void 0,h=(0,a.encodeFunctionData)({abi:t,args:c,functionName:l});try{const{data:r}=await(0,s.call)(e,{batch:!1,data:`${h}${u?u.replace("0x",""):""}`,to:n,...d});return{result:(0,o.decodeFunctionResult)({abi:t,args:c,functionName:l,data:r||"0x"}),request:{abi:t,address:n,args:c,dataSuffix:u,functionName:l,...d}}}catch(p){throw(0,i.getContractError)(p,{abi:t,address:n,args:c,docsPath:"/docs/contract/simulateContract",functionName:l,sender:f?.address})}}},28553:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uninstallFilter=void 0,t.uninstallFilter=async function(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}},8123:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyHash=void 0;const r=n(28669),o=n(41930),a=n(9996),i=n(56770),s=n(50634),c=n(11273);t.verifyHash=async function(e,{address:t,hash:n,signature:u,...l}){const d=(0,s.isHex)(u)?u:(0,s.toHex)(u);try{const{data:a}=await(0,c.call)(e,{data:(0,s.encodeDeployData)({abi:r.universalSignatureValidatorAbi,args:[t,n,d],bytecode:o.universalSignatureValidatorByteCode}),...l});return(0,i.isBytesEqual)(a??"0x0","0x1")}catch(f){if(f instanceof a.CallExecutionError)return!1;throw f}}},97859:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=void 0;const r=n(50634),o=n(8123);t.verifyMessage=async function(e,{address:t,message:n,signature:a,...i}){const s=(0,r.hashMessage)(n);return(0,o.verifyHash)(e,{address:t,hash:s,signature:a,...i})}},96273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=void 0;const r=n(70834),o=n(8123);t.verifyTypedData=async function(e,{address:t,signature:n,message:a,primaryType:i,types:s,domain:c,...u}){const l=(0,r.hashTypedData)({message:a,primaryType:i,types:s,domain:c});return(0,o.verifyHash)(e,{address:t,hash:l,signature:n,...u})}},60789:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitForTransactionReceipt=void 0;const r=n(70270),o=n(36999),a=n(89514),i=n(58),s=n(29086),c=n(37960),u=n(60148),l=n(52489);t.waitForTransactionReceipt=async function(e,{confirmations:t=1,hash:n,onReplaced:d,pollingInterval:f=e.pollingInterval,timeout:h}){const p=(0,i.stringify)(["waitForTransactionReceipt",e.uid,n]);let m,b,g,y=!1;return new Promise(((i,v)=>{h&&setTimeout((()=>v(new r.WaitForTransactionReceiptTimeoutError({hash:n}))),h);const w=(0,o.observe)(p,{onReplaced:d,resolve:i,reject:v},(o=>{const i=(0,l.watchBlockNumber)(e,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:f,async onBlockNumber(l){if(y)return;let d=l;const f=e=>{i(),e(),w()};try{if(g){if(d-g.blockNumber+1no.resolve(g)))}if(m||(y=!0,await(0,a.withRetry)((async()=>{m=await(0,c.getTransaction)(e,{hash:n}),m.blockNumber&&(d=m.blockNumber)}),{delay:({count:e})=>200*~~(1<0&&d-g.blockNumber+1no.resolve(g)))}catch(h){if(m&&(h instanceof r.TransactionNotFoundError||h instanceof r.TransactionReceiptNotFoundError)){b=m;const n=(await(0,s.getBlock)(e,{blockNumber:d,includeTransactions:!0})).transactions.find((({from:e,nonce:t})=>e===b.from&&t===b.nonce));if(!n)return;if(g=await(0,u.getTransactionReceipt)(e,{hash:n.hash}),d-g.blockNumber+1n{o.onReplaced?.({reason:r,replacedTransaction:b,transaction:n,transactionReceipt:g}),o.resolve(g)}))}else f((()=>o.reject(h)))}}})}))}))}},52489:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchBlockNumber=void 0;const r=n(57114),o=n(36999),a=n(7760),i=n(58),s=n(99284);t.watchBlockNumber=function(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:c,onError:u,poll:l,pollingInterval:d=e.pollingInterval}){let f;return("undefined"!==typeof l?l:"webSocket"!==e.transport.type)?(()=>{const r=(0,i.stringify)(["watchBlockNumber",e.uid,t,n,d]);return(0,o.observe)(r,{onBlockNumber:c,onError:u},(r=>(0,a.poll)((async()=>{try{const t=await(0,s.getBlockNumber)(e,{cacheTime:0});if(f){if(t===f)return;if(t-f>1&&n)for(let e=f+1n;ef)&&(r.onBlockNumber(t,f),f=t)}catch(t){r.onError?.(t)}}),{emitOnBegin:t,interval:d})))})():(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newHeads"],onData(e){if(!t)return;const n=(0,r.hexToBigInt)(e.result?.number);c(n,f),f=n},onError(e){u?.(e)}});n=o,t||n()}catch(o){u?.(o)}})(),n})()}},70517:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchBlocks=void 0;const r=n(23604),o=n(36999),a=n(7760),i=n(58),s=n(29086);t.watchBlocks=function(e,{blockTag:t="latest",emitMissed:n=!1,emitOnBegin:c=!1,onBlock:u,onError:l,includeTransactions:d,poll:f,pollingInterval:h=e.pollingInterval}){const p="undefined"!==typeof f?f:"webSocket"!==e.transport.type,m=d??!1;let b;return p?(()=>{const r=(0,i.stringify)(["watchBlocks",e.uid,n,c,m,h]);return(0,o.observe)(r,{onBlock:u,onError:l},(r=>(0,a.poll)((async()=>{try{const o=await(0,s.getBlock)(e,{blockTag:t,includeTransactions:m});if(o.number&&b?.number){if(o.number===b.number)return;if(o.number-b.number>1&&n)for(let t=b?.number+1n;tb.number)&&(r.onBlock(o,b),b=o)}catch(o){r.onError?.(o)}}),{emitOnBegin:c,interval:h})))})():(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newHeads"],onData(n){if(!t)return;const o=(e.chain?.formatters?.block?.format||r.formatBlock)(n.result);u(o,b),b=o},onError(e){l?.(e)}});n=o,t||n()}catch(o){l?.(o)}})(),n})()}},49488:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchContractEvent=void 0;const r=n(95481),o=n(36999),a=n(7760),i=n(58),s=n(4403),c=n(68995),u=n(99985),l=n(99284),d=n(36696),f=n(96374),h=n(28553);t.watchContractEvent=function(e,{abi:t,address:n,args:p,batch:m=!0,eventName:b,onError:g,onLogs:y,poll:v,pollingInterval:w=e.pollingInterval,strict:E}){return("undefined"!==typeof v?v:"webSocket"!==e.transport.type)?(()=>{const s=(0,i.stringify)(["watchContractEvent",n,p,m,e.uid,b,w]),v=E??!1;return(0,o.observe)(s,{onLogs:y,onError:g},(o=>{let i,s,g=!1;const y=(0,a.poll)((async()=>{if(g)try{let a;if(s)a=await(0,d.getFilterChanges)(e,{filter:s});else{const o=await(0,l.getBlockNumber)(e);a=i&&i!==o?await(0,f.getLogs)(e,{address:n,args:p,fromBlock:i+1n,toBlock:o,event:(0,r.getAbiItem)({abi:t,name:b})}):[],i=o}if(0===a.length)return;m?o.onLogs(a):a.forEach((e=>o.onLogs([e])))}catch(a){s&&a instanceof c.InvalidInputRpcError&&(g=!1),o.onError?.(a)}else{try{s=await(0,u.createContractEventFilter)(e,{abi:t,address:n,args:p,eventName:b,strict:v})}catch{}g=!0}}),{emitOnBegin:!0,interval:w});return async()=>{s&&await(0,h.uninstallFilter)(e,{filter:s}),y()}}))})():(()=>{let r=!0,o=()=>r=!1;return(async()=>{try{const a=b?(0,c.encodeEventTopics)({abi:t,eventName:b,args:p}):[],{unsubscribe:i}=await e.transport.subscribe({params:["logs",{address:n,topics:a}],onData(e){if(!r)return;const n=e.result;try{const{eventName:e,args:r}=(0,c.decodeEventLog)({abi:t,data:n.data,topics:n.topics,strict:E}),o=(0,c.formatLog)(n,{args:r,eventName:e});y([o])}catch(o){let e,t;if(o instanceof s.DecodeLogDataMismatch||o instanceof c.DecodeLogTopicsMismatch){if(E)return;e=o.abiItem.name,t=o.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const r=(0,c.formatLog)(n,{args:t?[]:{},eventName:e});y([r])}},onError(e){g?.(e)}});o=i,r||o()}catch(a){g?.(a)}})(),o})()}},63558:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchEvent=void 0;const r=n(36999),o=n(7760),a=n(58),i=n(4403),s=n(60793),c=n(50634),u=n(3200),l=n(99284),d=n(36696),f=n(96374),h=n(28553);t.watchEvent=function(e,{address:t,args:n,batch:p=!0,event:m,events:b,onError:g,onLogs:y,poll:v,pollingInterval:w=e.pollingInterval,strict:E}){const A="undefined"!==typeof v?v:"webSocket"!==e.transport.type,x=E??!1;return A?(()=>{const i=(0,a.stringify)(["watchEvent",t,n,p,e.uid,m,w]);return(0,r.observe)(i,{onLogs:y,onError:g},(r=>{let a,i,c=!1;const g=(0,o.poll)((async()=>{if(c)try{let o;if(i)o=await(0,d.getFilterChanges)(e,{filter:i});else{const r=await(0,l.getBlockNumber)(e);o=a&&a!==r?await(0,f.getLogs)(e,{address:t,args:n,event:m,events:b,fromBlock:a+1n,toBlock:r}):[],a=r}if(0===o.length)return;p?r.onLogs(o):o.forEach((e=>r.onLogs([e])))}catch(o){i&&o instanceof s.InvalidInputRpcError&&(c=!1),r.onError?.(o)}else{try{i=await(0,u.createEventFilter)(e,{address:t,args:n,event:m,events:b,strict:x})}catch{}c=!0}}),{emitOnBegin:!0,interval:w});return async()=>{i&&await(0,h.uninstallFilter)(e,{filter:i}),g()}}))})():(()=>{let r=!0,o=()=>r=!1;return(async()=>{try{const a=b??(m?[m]:void 0);let s=[];a&&(s=[a.flatMap((e=>(0,c.encodeEventTopics)({abi:[e],eventName:e.name,args:n})))],m&&(s=s[0]));const{unsubscribe:u}=await e.transport.subscribe({params:["logs",{address:t,topics:s}],onData(e){if(!r)return;const t=e.result;try{const{eventName:e,args:n}=(0,c.decodeEventLog)({abi:a,data:t.data,topics:t.topics,strict:x}),r=(0,c.formatLog)(t,{args:n,eventName:e});y([r])}catch(n){let e,r;if(n instanceof i.DecodeLogDataMismatch||n instanceof i.DecodeLogTopicsMismatch){if(E)return;e=n.abiItem.name,r=n.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const o=(0,c.formatLog)(t,{args:r?[]:{},eventName:e});y([o])}},onError(e){g?.(e)}});o=u,r||o()}catch(a){g?.(a)}})(),o})()}},52674:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchPendingTransactions=void 0;const r=n(36999),o=n(7760),a=n(58),i=n(99792),s=n(36696),c=n(28553);t.watchPendingTransactions=function(e,{batch:t=!0,onError:n,onTransactions:u,poll:l,pollingInterval:d=e.pollingInterval}){return("undefined"!==typeof l?l:"webSocket"!==e.transport.type)?(()=>{const l=(0,a.stringify)(["watchPendingTransactions",e.uid,t,d]);return(0,r.observe)(l,{onTransactions:u,onError:n},(n=>{let r;const a=(0,o.poll)((async()=>{try{if(!r)try{return void(r=await(0,i.createPendingTransactionFilter)(e))}catch(o){throw a(),o}const c=await(0,s.getFilterChanges)(e,{filter:r});if(0===c.length)return;t?n.onTransactions(c):c.forEach((e=>n.onTransactions([e])))}catch(o){n.onError?.(o)}}),{emitOnBegin:!0,interval:d});return async()=>{r&&await(0,c.uninstallFilter)(e,{filter:r}),a()}}))})():(()=>{let t=!0,r=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!t)return;const n=e.result;u([n])},onError(e){n?.(e)}});r=o,t||r()}catch(o){n?.(o)}})(),r})()}},90233:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dropTransaction=void 0,t.dropTransaction=async function(e,{hash:t}){await e.request({method:`${e.mode}_dropTransaction`,params:[t]})}},79340:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAutomine=void 0,t.getAutomine=async function(e){return"ganache"===e.mode?await e.request({method:"eth_mining"}):await e.request({method:`${e.mode}_getAutomine`})}},36822:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTxpoolContent=void 0,t.getTxpoolContent=async function(e){return await e.request({method:"txpool_content"})}},31125:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTxpoolStatus=void 0;const r=n(57114);t.getTxpoolStatus=async function(e){const{pending:t,queued:n}=await e.request({method:"txpool_status"});return{pending:(0,r.hexToNumber)(t),queued:(0,r.hexToNumber)(n)}}},48328:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.impersonateAccount=void 0,t.impersonateAccount=async function(e,{address:t}){await e.request({method:`${e.mode}_impersonateAccount`,params:[t]})}},86437:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.increaseTime=void 0;const r=n(86308);t.increaseTime=async function(e,{seconds:t}){return await e.request({method:"evm_increaseTime",params:[(0,r.numberToHex)(t)]})}},19741:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inspectTxpool=void 0,t.inspectTxpool=async function(e){return await e.request({method:"txpool_inspect"})}},564:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mine=void 0;const r=n(86308);t.mine=async function(e,{blocks:t,interval:n}){"ganache"===e.mode?await e.request({method:"evm_mine",params:[{blocks:(0,r.numberToHex)(t)}]}):await e.request({method:`${e.mode}_mine`,params:[(0,r.numberToHex)(t),(0,r.numberToHex)(n||0)]})}},86619:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeBlockTimestampInterval=void 0,t.removeBlockTimestampInterval=async function(e){await e.request({method:`${e.mode}_removeBlockTimestampInterval`})}},48702:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reset=void 0,t.reset=async function(e,{blockNumber:t,jsonRpcUrl:n}={}){await e.request({method:`${e.mode}_reset`,params:[{forking:{blockNumber:Number(t),jsonRpcUrl:n}}]})}},33921:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.revert=void 0,t.revert=async function(e,{id:t}){await e.request({method:"evm_revert",params:[t]})}},93631:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendUnsignedTransaction=void 0;const r=n(82320),o=n(33270);t.sendUnsignedTransaction=async function(e,t){const{accessList:n,data:a,from:i,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,to:f,value:h,...p}=t,m=e.chain?.formatters?.transactionRequest?.format||o.formatTransactionRequest,b=m({...(0,r.extract)(p,{format:m}),accessList:n,data:a,from:i,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,to:f,value:h});return await e.request({method:"eth_sendUnsignedTransaction",params:[b]})}},1029:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setAutomine=void 0,t.setAutomine=async function(e,t){"ganache"===e.mode?t?await e.request({method:"miner_start"}):await e.request({method:"miner_stop"}):await e.request({method:"evm_setAutomine",params:[t]})}},86128:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBalance=void 0;const r=n(86308);t.setBalance=async function(e,{address:t,value:n}){"ganache"===e.mode?await e.request({method:"evm_setAccountBalance",params:[t,(0,r.numberToHex)(n)]}):await e.request({method:`${e.mode}_setBalance`,params:[t,(0,r.numberToHex)(n)]})}},68923:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockGasLimit=void 0;const r=n(86308);t.setBlockGasLimit=async function(e,{gasLimit:t}){await e.request({method:"evm_setBlockGasLimit",params:[(0,r.numberToHex)(t)]})}},58892:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockTimestampInterval=void 0,t.setBlockTimestampInterval=async function(e,{interval:t}){await e.request({method:`${e.mode}_setBlockTimestampInterval`,params:[t]})}},18954:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setCode=void 0,t.setCode=async function(e,{address:t,bytecode:n}){await e.request({method:`${e.mode}_setCode`,params:[t,n]})}},68335:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setCoinbase=void 0,t.setCoinbase=async function(e,{address:t}){await e.request({method:`${e.mode}_setCoinbase`,params:[t]})}},3332:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setIntervalMining=void 0,t.setIntervalMining=async function(e,{interval:t}){await e.request({method:"evm_setIntervalMining",params:[t]})}},49895:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setLoggingEnabled=void 0,t.setLoggingEnabled=async function(e,t){await e.request({method:`${e.mode}_setLoggingEnabled`,params:[t]})}},82900:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setMinGasPrice=void 0;const r=n(86308);t.setMinGasPrice=async function(e,{gasPrice:t}){await e.request({method:`${e.mode}_setMinGasPrice`,params:[(0,r.numberToHex)(t)]})}},25912:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setNextBlockBaseFeePerGas=void 0;const r=n(86308);t.setNextBlockBaseFeePerGas=async function(e,{baseFeePerGas:t}){await e.request({method:`${e.mode}_setNextBlockBaseFeePerGas`,params:[(0,r.numberToHex)(t)]})}},26605:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setNextBlockTimestamp=void 0;const r=n(86308);t.setNextBlockTimestamp=async function(e,{timestamp:t}){await e.request({method:"evm_setNextBlockTimestamp",params:[(0,r.numberToHex)(t)]})}},58942:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setNonce=void 0;const r=n(86308);t.setNonce=async function(e,{address:t,nonce:n}){await e.request({method:`${e.mode}_setNonce`,params:[t,(0,r.numberToHex)(n)]})}},58499:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setRpcUrl=void 0,t.setRpcUrl=async function(e,t){await e.request({method:`${e.mode}_setRpcUrl`,params:[t]})}},65972:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setStorageAt=void 0;const r=n(86308);t.setStorageAt=async function(e,{address:t,index:n,value:o}){await e.request({method:`${e.mode}_setStorageAt`,params:[t,"number"===typeof n?(0,r.numberToHex)(n):n,o]})}},68183:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.snapshot=void 0,t.snapshot=async function(e){return await e.request({method:"evm_snapshot"})}},9619:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stopImpersonatingAccount=void 0,t.stopImpersonatingAccount=async function(e,{address:t}){await e.request({method:`${e.mode}_stopImpersonatingAccount`,params:[t]})}},86247:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addChain=void 0;const r=n(86308);t.addChain=async function(e,{chain:t}){const{id:n,name:o,nativeCurrency:a,rpcUrls:i,blockExplorers:s}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,r.numberToHex)(n),chainName:o,nativeCurrency:a,rpcUrls:i.default.http,blockExplorerUrls:s?Object.values(s).map((({url:e})=>e)):void 0}]})}},33266:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deployContract=void 0;const r=n(77833),o=n(66773);t.deployContract=function(e,{abi:t,args:n,bytecode:a,...i}){const s=(0,r.encodeDeployData)({abi:t,args:n,bytecode:a});return(0,o.sendTransaction)(e,{...i,data:s})}},42386:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddresses=void 0;const r=n(36556);t.getAddresses=async function(e){return(await e.request({method:"eth_accounts"})).map((e=>(0,r.checksumAddress)(e)))}},41978:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPermissions=void 0,t.getPermissions=async function(e){return await e.request({method:"wallet_getPermissions"})}},94265:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestAddresses=void 0;const r=n(36556);t.requestAddresses=async function(e){return(await e.request({method:"eth_requestAccounts"})).map((e=>(0,r.getAddress)(e)))}},38315:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestPermissions=void 0,t.requestPermissions=async function(e,t){return e.request({method:"wallet_requestPermissions",params:[t]})}},66773:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendTransaction=void 0;const r=n(3975),o=n(26175),a=n(47797),i=n(72533),s=n(82320),c=n(33270),u=n(5434),l=n(40623),d=n(42659);t.sendTransaction=async function(e,t){const{account:n=e.account,chain:f=e.chain,accessList:h,data:p,gas:m,gasPrice:b,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:v,to:w,value:E,...A}=t;if(!n)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const x=(0,r.parseAccount)(n);try{let n;if((0,u.assertRequest)(t),null!==f&&(n=await(0,d.getChainId)(e),(0,a.assertCurrentChain)({currentChainId:n,chain:f})),"local"===x.type){const t=await(0,l.prepareRequest)(e,{account:x,accessList:h,chain:f,data:p,gas:m,gasPrice:b,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:v,to:w,value:E,...A});n||(n=await(0,d.getChainId)(e));const r=f?.serializers?.transaction,o=await x.signTransaction({...t,chainId:n},{serializer:r});return await e.request({method:"eth_sendRawTransaction",params:[o]})}const r=f?.formatters?.transactionRequest?.format||c.formatTransactionRequest,o=r({...(0,s.extract)(A,{format:r}),accessList:h,data:p,from:x.address,gas:m,gasPrice:b,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:v,to:w,value:E});return await e.request({method:"eth_sendTransaction",params:[o]})}catch(P){throw(0,i.getTransactionError)(P,{...t,account:x,chain:t.chain||void 0})}}},73753:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signMessage=void 0;const r=n(3975),o=n(26175),a=n(86308);t.signMessage=async function(e,{account:t=e.account,message:n}){if(!t)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const i=(0,r.parseAccount)(t);if("local"===i.type)return i.signMessage({message:n});const s="string"===typeof n?(0,a.stringToHex)(n):n.raw instanceof Uint8Array?(0,a.toHex)(n.raw):n.raw;return e.request({method:"personal_sign",params:[s,i.address]})}},58070:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signTypedData=void 0;const r=n(3975),o=n(26175),a=n(77116),i=n(58),s=n(42586);t.signTypedData=async function(e,{account:t=e.account,domain:n,message:c,primaryType:u,types:l}){if(!t)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const d=(0,r.parseAccount)(t),f={EIP712Domain:["string"===typeof n?.name&&{name:"name",type:"string"},n?.version&&{name:"version",type:"string"},"number"===typeof n?.chainId&&{name:"chainId",type:"uint256"},n?.verifyingContract&&{name:"verifyingContract",type:"address"},n?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...l};if((0,s.validateTypedData)({domain:n,message:c,primaryType:u,types:f}),"local"===d.type)return d.signTypedData({domain:n,primaryType:u,types:f,message:c});const h=(0,i.stringify)({domain:n??{},primaryType:u,types:f,message:c},((e,t)=>(0,a.isHex)(t)?t.toLowerCase():t));return e.request({method:"eth_signTypedData_v4",params:[d.address,h]})}},70173:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchChain=void 0;const r=n(86308);t.switchChain=async function(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,r.numberToHex)(t)}]})}},82840:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchAsset=void 0,t.watchAsset=async function(e,t){return await e.request({method:"wallet_watchAsset",params:t})}},97747:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.writeContract=void 0;const r=n(22836),o=n(66773);t.writeContract=async function(e,{abi:t,address:n,args:a,dataSuffix:i,functionName:s,...c}){const u=(0,r.encodeFunctionData)({abi:t,args:a,functionName:s});return await(0,o.sendTransaction)(e,{data:`${u}${i?i.replace("0x",""):""}`,to:n,...c})}},23259:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createClient=void 0;const r=n(43817),o=n(41217);t.createClient=function(e){const{batch:t,cacheTime:n=e.pollingInterval??4e3,key:a="base",name:i="Base Client",pollingInterval:s=4e3,type:c="base"}=e,u=e.chain,l=e.account?(0,r.parseAccount)(e.account):void 0,{config:d,request:f,value:h}=e.transport({chain:u,pollingInterval:s}),p={account:l,batch:t,cacheTime:n,chain:u,key:a,name:i,pollingInterval:s,request:f,transport:{...d,...h},type:c,uid:(0,o.uid)()};return Object.assign(p,{extend:function e(t){return n=>{const r=n(t);for(const e in p)delete r[e];const o={...t,...r};return Object.assign(o,{extend:e(o)})}}(p)})}},86610:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPublicClient=void 0;const r=n(23259),o=n(8980);t.createPublicClient=function(e){const{key:t="public",name:n="Public Client"}=e;return(0,r.createClient)({...e,key:t,name:n,type:"publicClient"}).extend(o.publicActions)}},34223:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTestClient=void 0;const r=n(23259),o=n(49467);t.createTestClient=function(e){const{key:t="test",name:n="Test Client",mode:a}=e;return(0,r.createClient)({...e,key:t,name:n,type:"testClient"}).extend((e=>({mode:a,...(0,o.testActions)({mode:a})(e)})))}},32415:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWalletClient=void 0;const r=n(23259),o=n(47839);t.createWalletClient=function(e){const{key:t="wallet",name:n="Wallet Client",transport:a}=e;return(0,r.createClient)({...e,key:t,name:n,transport:e=>a({...e,retryCount:0}),type:"walletClient"}).extend(o.walletActions)}},8980:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publicActions=void 0;const r=n(22440),o=n(32637),a=n(59593),i=n(12429),s=n(43896),c=n(11273),u=n(46376),l=n(99985),d=n(3200),f=n(99792),h=n(37346),p=n(23337),m=n(85233),b=n(29086),g=n(99284),y=n(47480),v=n(88352),w=n(42659),E=n(6560),A=n(36696),x=n(43675),P=n(89984),C=n(96374),j=n(69894),I=n(37960),O=n(44725),T=n(92530),S=n(60148),B=n(46580),k=n(33531),_=n(63747),N=n(28553),M=n(97859),R=n(96273),F=n(60789),U=n(52489),L=n(70517),D=n(49488),q=n(63558),H=n(52674);t.publicActions=function(e){return{call:t=>(0,c.call)(e,t),createBlockFilter:()=>(0,u.createBlockFilter)(e),createContractEventFilter:t=>(0,l.createContractEventFilter)(e,t),createEventFilter:t=>(0,d.createEventFilter)(e,t),createPendingTransactionFilter:()=>(0,f.createPendingTransactionFilter)(e),estimateContractGas:t=>(0,h.estimateContractGas)(e,t),estimateGas:t=>(0,p.estimateGas)(e,t),getBalance:t=>(0,m.getBalance)(e,t),getBlock:t=>(0,b.getBlock)(e,t),getBlockNumber:t=>(0,g.getBlockNumber)(e,t),getBlockTransactionCount:t=>(0,y.getBlockTransactionCount)(e,t),getBytecode:t=>(0,v.getBytecode)(e,t),getChainId:()=>(0,w.getChainId)(e),getEnsAddress:t=>(0,r.getEnsAddress)(e,t),getEnsAvatar:t=>(0,o.getEnsAvatar)(e,t),getEnsName:t=>(0,a.getEnsName)(e,t),getEnsResolver:t=>(0,i.getEnsResolver)(e,t),getEnsText:t=>(0,s.getEnsText)(e,t),getFeeHistory:t=>(0,E.getFeeHistory)(e,t),getFilterChanges:t=>(0,A.getFilterChanges)(e,t),getFilterLogs:t=>(0,x.getFilterLogs)(e,t),getGasPrice:()=>(0,P.getGasPrice)(e),getLogs:t=>(0,C.getLogs)(e,t),getStorageAt:t=>(0,j.getStorageAt)(e,t),getTransaction:t=>(0,I.getTransaction)(e,t),getTransactionConfirmations:t=>(0,O.getTransactionConfirmations)(e,t),getTransactionCount:t=>(0,T.getTransactionCount)(e,t),getTransactionReceipt:t=>(0,S.getTransactionReceipt)(e,t),multicall:t=>(0,B.multicall)(e,t),readContract:t=>(0,k.readContract)(e,t),simulateContract:t=>(0,_.simulateContract)(e,t),verifyMessage:t=>(0,M.verifyMessage)(e,t),verifyTypedData:t=>(0,R.verifyTypedData)(e,t),uninstallFilter:t=>(0,N.uninstallFilter)(e,t),waitForTransactionReceipt:t=>(0,F.waitForTransactionReceipt)(e,t),watchBlocks:t=>(0,L.watchBlocks)(e,t),watchBlockNumber:t=>(0,U.watchBlockNumber)(e,t),watchContractEvent:t=>(0,D.watchContractEvent)(e,t),watchEvent:t=>(0,q.watchEvent)(e,t),watchPendingTransactions:t=>(0,H.watchPendingTransactions)(e,t)}}},49467:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testActions=void 0;const r=n(90233),o=n(79340),a=n(36822),i=n(31125),s=n(48328),c=n(86437),u=n(19741),l=n(564),d=n(86619),f=n(48702),h=n(33921),p=n(93631),m=n(1029),b=n(86128),g=n(68923),y=n(58892),v=n(18954),w=n(68335),E=n(3332),A=n(49895),x=n(82900),P=n(25912),C=n(26605),j=n(58942),I=n(58499),O=n(65972),T=n(68183),S=n(9619);t.testActions=function({mode:e}){return t=>{const n=t.extend((()=>({mode:e})));return{dropTransaction:e=>(0,r.dropTransaction)(n,e),getAutomine:()=>(0,o.getAutomine)(n),getTxpoolContent:()=>(0,a.getTxpoolContent)(n),getTxpoolStatus:()=>(0,i.getTxpoolStatus)(n),impersonateAccount:e=>(0,s.impersonateAccount)(n,e),increaseTime:e=>(0,c.increaseTime)(n,e),inspectTxpool:()=>(0,u.inspectTxpool)(n),mine:e=>(0,l.mine)(n,e),removeBlockTimestampInterval:()=>(0,d.removeBlockTimestampInterval)(n),reset:e=>(0,f.reset)(n,e),revert:e=>(0,h.revert)(n,e),sendUnsignedTransaction:e=>(0,p.sendUnsignedTransaction)(n,e),setAutomine:e=>(0,m.setAutomine)(n,e),setBalance:e=>(0,b.setBalance)(n,e),setBlockGasLimit:e=>(0,g.setBlockGasLimit)(n,e),setBlockTimestampInterval:e=>(0,y.setBlockTimestampInterval)(n,e),setCode:e=>(0,v.setCode)(n,e),setCoinbase:e=>(0,w.setCoinbase)(n,e),setIntervalMining:e=>(0,E.setIntervalMining)(n,e),setLoggingEnabled:e=>(0,A.setLoggingEnabled)(n,e),setMinGasPrice:e=>(0,x.setMinGasPrice)(n,e),setNextBlockBaseFeePerGas:e=>(0,P.setNextBlockBaseFeePerGas)(n,e),setNextBlockTimestamp:e=>(0,C.setNextBlockTimestamp)(n,e),setNonce:e=>(0,j.setNonce)(n,e),setRpcUrl:e=>(0,I.setRpcUrl)(n,e),setStorageAt:e=>(0,O.setStorageAt)(n,e),snapshot:()=>(0,T.snapshot)(n),stopImpersonatingAccount:e=>(0,S.stopImpersonatingAccount)(n,e)}}}},47839:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walletActions=void 0;const r=n(42659),o=n(86247),a=n(33266),i=n(42386),s=n(41978),c=n(94265),u=n(38315),l=n(66773),d=n(73753),f=n(58070),h=n(70173),p=n(82840),m=n(97747);t.walletActions=function(e){return{addChain:t=>(0,o.addChain)(e,t),deployContract:t=>(0,a.deployContract)(e,t),getAddresses:()=>(0,i.getAddresses)(e),getChainId:()=>(0,r.getChainId)(e),getPermissions:()=>(0,s.getPermissions)(e),requestAddresses:()=>(0,c.requestAddresses)(e),requestPermissions:t=>(0,u.requestPermissions)(e,t),sendTransaction:t=>(0,l.sendTransaction)(e,t),signMessage:t=>(0,d.signMessage)(e,t),signTypedData:t=>(0,f.signTypedData)(e,t),switchChain:t=>(0,h.switchChain)(e,t),watchAsset:t=>(0,p.watchAsset)(e,t),writeContract:t=>(0,m.writeContract)(e,t)}}},42255:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransport=void 0;const r=n(25056);t.createTransport=function({key:e,name:t,request:n,retryCount:o=3,retryDelay:a=150,timeout:i,type:s},c){return{config:{key:e,name:t,request:n,retryCount:o,retryDelay:a,timeout:i,type:s},request:(0,r.buildRequest)(n,{retryCount:o,retryDelay:a}),value:c}}},99161:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.custom=void 0;const r=n(42255);t.custom=function(e,t={}){const{key:n="custom",name:o="Custom Provider",retryDelay:a}=t;return({retryCount:i})=>(0,r.createTransport)({key:n,name:o,request:e.request.bind(e),retryCount:t.retryCount??i,retryDelay:a,type:"custom"})}},72826:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rankTransports=t.fallback=void 0;const r=n(25056),o=n(78967),a=n(42255);function i({chain:e,interval:t=4e3,onTransports:n,sampleCount:r=10,timeout:a=1e3,transports:i,weights:s={}}){const{stability:c=.7,latency:u=.3}=s,l=[],d=async()=>{const s=await Promise.all(i.map((async t=>{const n=t({chain:e,retryCount:0,timeout:a}),r=Date.now();let o,i;try{await n.request({method:"net_listening"}),i=1}catch{i=0}finally{o=Date.now()}return{latency:o-r,success:i}})));l.push(s),l.length>r&&l.shift();const f=Math.max(...l.map((e=>Math.max(...e.map((({latency:e})=>e)))))),h=i.map(((e,t)=>{const n=l.map((e=>e[t].latency)),r=1-n.reduce(((e,t)=>e+t),0)/n.length/f,o=l.map((e=>e[t].success)),a=o.reduce(((e,t)=>e+t),0)/o.length;return 0===a?[0,t]:[u*r+c*a,t]})).sort(((e,t)=>t[0]-e[0]));n(h.map((([,e])=>i[e]))),await(0,o.wait)(t),d()};d()}t.fallback=function(e,t={}){const{key:n="fallback",name:o="Fallback",rank:s=!1,retryCount:c,retryDelay:u}=t;return({chain:t,pollingInterval:l=4e3,timeout:d})=>{let f=e,h=()=>{};const p=(0,a.createTransport)({key:n,name:o,async request({method:e,params:n}){const o=async(a=0)=>{const i=f[a]({chain:t,retryCount:0,timeout:d});try{const t=await i.request({method:e,params:n});return h({method:e,params:n,response:t,transport:i,status:"success"}),t}catch(s){if(h({error:s,method:e,params:n,transport:i,status:"error"}),(0,r.isDeterministicError)(s))throw s;if(a===f.length-1)throw s;return o(a+1)}};return o()},retryCount:c,retryDelay:u,type:"fallback"},{onResponse:e=>h=e,transports:f.map((e=>e({chain:t,retryCount:0})))});if(s){const e="object"===typeof s?s:{};i({chain:t,interval:e.interval??l,onTransports:e=>f=e,sampleCount:e.sampleCount,timeout:e.timeout,transports:f,weights:e.weights})}return p}},t.rankTransports=i},28216:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.http=void 0;const r=n(72782),o=n(44681),a=n(48170),i=n(82530),s=n(42255);t.http=function(e,t={}){const{batch:n,fetchOptions:c,key:u="http",name:l="HTTP JSON-RPC",retryDelay:d}=t;return({chain:f,retryCount:h,timeout:p})=>{const{batchSize:m=1e3,wait:b=0}="object"===typeof n?n:{},g=t.retryCount??h,y=p??t.timeout??1e4,v=e||f?.rpcUrls.default.http[0];if(!v)throw new o.UrlRequiredError;return(0,s.createTransport)({key:u,name:l,async request({method:t,params:o}){const s={method:t,params:o},{schedule:u}=(0,a.createBatchScheduler)({id:`${e}`,wait:b,shouldSplitBatch:e=>e.length>m,fn:e=>i.rpc.http(v,{body:e,fetchOptions:c,timeout:y})}),[{error:l,result:d}]=await(async e=>n?u(e):[await i.rpc.http(v,{body:e,fetchOptions:c,timeout:y})])(s);if(l)throw new r.RpcRequestError({body:s,error:l,url:v});return d},retryCount:g,retryDelay:d,timeout:y,type:"http"},{url:e})}}},37003:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.webSocket=void 0;const r=n(72782),o=n(44681),a=n(82530),i=n(42255);t.webSocket=function(e,t={}){const{key:n="webSocket",name:s="WebSocket JSON-RPC",retryDelay:c}=t;return({chain:u,retryCount:l,timeout:d})=>{const f=t.retryCount??l,h=d??t.timeout??1e4,p=e||u?.rpcUrls.default.webSocket?.[0];if(!p)throw new o.UrlRequiredError;return(0,i.createTransport)({key:n,name:s,async request({method:e,params:t}){const n={method:e,params:t},o=await(0,a.getSocket)(p),{error:i,result:s}=await a.rpc.webSocketAsync(o,{body:n,timeout:h});if(i)throw new r.RpcRequestError({body:n,error:i,url:p});return s},retryCount:f,retryDelay:c,timeout:h,type:"webSocket"},{getSocket:()=>(0,a.getSocket)(p),async subscribe({params:e,onData:t,onError:n}){const r=await(0,a.getSocket)(p),{result:o}=await new Promise(((o,i)=>a.rpc.webSocket(r,{body:{method:"eth_subscribe",params:e},onResponse(e){if(e.error)return i(e.error),void n?.(e.error);"number"!==typeof e.id?"eth_subscription"===e.method&&t(e.params):o(e)}})));return{subscriptionId:o,unsubscribe:async()=>new Promise((e=>a.rpc.webSocket(r,{body:{method:"eth_unsubscribe",params:[o]},onResponse:e})))}}})}}},28669:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.universalSignatureValidatorAbi=t.smartAccountAbi=t.addressResolverAbi=t.textResolverAbi=t.universalResolverReverseAbi=t.universalResolverResolveAbi=t.multicall3Abi=void 0,t.multicall3Abi=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}];const n=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}];t.universalResolverResolveAbi=[...n,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],t.universalResolverReverseAbi=[...n,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],t.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],t.addressResolverAbi=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],t.smartAccountAbi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],t.universalSignatureValidatorAbi=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},77243:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroAddress=void 0,t.zeroAddress="0x0000000000000000000000000000000000000000"},83984:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregate3Signature=void 0,t.aggregate3Signature="0x82ad56cb"},41930:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.universalSignatureValidatorByteCode=void 0,t.universalSignatureValidatorByteCode="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"},84387:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.minInt144=t.minInt136=t.minInt128=t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=t.maxInt8=void 0,t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=void 0,t.maxInt8=2n**(8n-1n),t.maxInt16=2n**(16n-1n),t.maxInt24=2n**(24n-1n),t.maxInt32=2n**(32n-1n),t.maxInt40=2n**(40n-1n),t.maxInt48=2n**(48n-1n),t.maxInt56=2n**(56n-1n),t.maxInt64=2n**(64n-1n),t.maxInt72=2n**(72n-1n),t.maxInt80=2n**(80n-1n),t.maxInt88=2n**(88n-1n),t.maxInt96=2n**(96n-1n),t.maxInt104=2n**(104n-1n),t.maxInt112=2n**(112n-1n),t.maxInt120=2n**(120n-1n),t.maxInt128=2n**(128n-1n),t.maxInt136=2n**(136n-1n),t.maxInt144=2n**(144n-1n),t.maxInt152=2n**(152n-1n),t.maxInt160=2n**(160n-1n),t.maxInt168=2n**(168n-1n),t.maxInt176=2n**(176n-1n),t.maxInt184=2n**(184n-1n),t.maxInt192=2n**(192n-1n),t.maxInt200=2n**(200n-1n),t.maxInt208=2n**(208n-1n),t.maxInt216=2n**(216n-1n),t.maxInt224=2n**(224n-1n),t.maxInt232=2n**(232n-1n),t.maxInt240=2n**(240n-1n),t.maxInt248=2n**(248n-1n),t.maxInt256=2n**(256n-1n),t.minInt8=-(2n**8n),t.minInt16=-(2n**16n),t.minInt24=-(2n**24n),t.minInt32=-(2n**32n),t.minInt40=-(2n**40n),t.minInt48=-(2n**48n),t.minInt56=-(2n**56n),t.minInt64=-(2n**64n),t.minInt72=-(2n**72n),t.minInt80=-(2n**80n),t.minInt88=-(2n**88n),t.minInt96=-(2n**96n),t.minInt104=-(2n**104n),t.minInt112=-(2n**112n),t.minInt120=-(2n**120n),t.minInt128=-(2n**128n),t.minInt136=-(2n**136n),t.minInt144=-(2n**144n),t.minInt152=-(2n**152n),t.minInt160=-(2n**160n),t.minInt168=-(2n**168n),t.minInt176=-(2n**176n),t.minInt184=-(2n**184n),t.minInt192=-(2n**192n),t.minInt200=-(2n**200n),t.minInt208=-(2n**208n),t.minInt216=-(2n**216n),t.minInt224=-(2n**224n),t.minInt232=-(2n**232n),t.minInt240=-(2n**240n),t.minInt248=-(2n**248n),t.minInt256=-(2n**256n),t.maxUint8=2n**8n,t.maxUint16=2n**16n,t.maxUint24=2n**24n,t.maxUint32=2n**32n,t.maxUint40=2n**40n,t.maxUint48=2n**48n,t.maxUint56=2n**56n,t.maxUint64=2n**64n,t.maxUint72=2n**72n,t.maxUint80=2n**80n,t.maxUint88=2n**88n,t.maxUint96=2n**96n,t.maxUint104=2n**104n,t.maxUint112=2n**112n,t.maxUint120=2n**120n,t.maxUint128=2n**128n,t.maxUint136=2n**136n,t.maxUint144=2n**144n,t.maxUint152=2n**152n,t.maxUint160=2n**160n,t.maxUint168=2n**168n,t.maxUint176=2n**176n,t.maxUint184=2n**184n,t.maxUint192=2n**192n,t.maxUint200=2n**200n,t.maxUint208=2n**208n,t.maxUint216=2n**216n,t.maxUint224=2n**224n,t.maxUint232=2n**232n,t.maxUint240=2n**240n,t.maxUint248=2n**248n,t.maxUint256=2n**256n},6049:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.solidityPanic=t.solidityError=t.panicReasons=void 0,t.panicReasons={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},t.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},t.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},99225:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.weiUnits=t.gweiUnits=t.etherUnits=void 0,t.etherUnits={gwei:9,wei:18},t.gweiUnits={ether:-9,wei:9},t.weiUnits={ether:-18,gwei:-9}},4403:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedPackedAbiType=t.InvalidDefinitionTypeError=t.InvalidArrayError=t.InvalidAbiDecodingTypeError=t.InvalidAbiEncodingTypeError=t.DecodeLogTopicsMismatch=t.DecodeLogDataMismatch=t.BytesSizeMismatchError=t.AbiFunctionSignatureNotFoundError=t.AbiFunctionOutputsNotFoundError=t.AbiFunctionNotFoundError=t.AbiEventNotFoundError=t.AbiEventSignatureNotFoundError=t.AbiEventSignatureEmptyTopicsError=t.AbiErrorSignatureNotFoundError=t.AbiErrorNotFoundError=t.AbiErrorInputsNotFoundError=t.AbiEncodingLengthMismatchError=t.AbiEncodingBytesSizeMismatchError=t.AbiEncodingArrayLengthMismatchError=t.AbiDecodingZeroDataError=t.AbiDecodingDataSizeTooSmallError=t.AbiDecodingDataSizeInvalidError=t.AbiConstructorParamsNotFoundError=t.AbiConstructorNotFoundError=void 0;const r=n(16759),o=n(66859),a=n(26456);class i extends a.BaseError{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}t.AbiConstructorNotFoundError=i;class s extends a.BaseError{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}t.AbiConstructorParamsNotFoundError=s;class c extends a.BaseError{constructor({data:e,size:t}){super([`Data size of ${t} bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join("\n"),{metaMessages:[`Data: ${e} (${t} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeInvalidError"})}}t.AbiDecodingDataSizeInvalidError=c;class u extends a.BaseError{constructor({data:e,params:t,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join("\n"),{metaMessages:[`Params: (${(0,r.formatAbiParams)(t,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=n}}t.AbiDecodingDataSizeTooSmallError=u;class l extends a.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}t.AbiDecodingZeroDataError=l;class d extends a.BaseError{constructor({expectedLength:e,givenLength:t,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}t.AbiEncodingArrayLengthMismatchError=d;class f extends a.BaseError{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,o.size)(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}t.AbiEncodingBytesSizeMismatchError=f;class h extends a.BaseError{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}t.AbiEncodingLengthMismatchError=h;class p extends a.BaseError{constructor(e,{docsPath:t}){super([`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorInputsNotFoundError"})}}t.AbiErrorInputsNotFoundError=p;class m extends a.BaseError{constructor(e,{docsPath:t}={}){super([`Error ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorNotFoundError"})}}t.AbiErrorNotFoundError=m;class b extends a.BaseError{constructor(e,{docsPath:t}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}t.AbiErrorSignatureNotFoundError=b;class g extends a.BaseError{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}t.AbiEventSignatureEmptyTopicsError=g;class y extends a.BaseError{constructor(e,{docsPath:t}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}t.AbiEventSignatureNotFoundError=y;class v extends a.BaseError{constructor(e,{docsPath:t}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}t.AbiEventNotFoundError=v;class w extends a.BaseError{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}t.AbiFunctionNotFoundError=w;class E extends a.BaseError{constructor(e,{docsPath:t}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}t.AbiFunctionOutputsNotFoundError=E;class A extends a.BaseError{constructor(e,{docsPath:t}){super([`Encoded function signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionSignatureNotFoundError"})}}t.AbiFunctionSignatureNotFoundError=A;class x extends a.BaseError{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}t.BytesSizeMismatchError=x;class P extends a.BaseError{constructor({abiItem:e,data:t,params:n,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join("\n"),{metaMessages:[`Params: (${(0,r.formatAbiParams)(n,{includeName:!0})})`,`Data: ${t} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=n,this.size=o}}t.DecodeLogDataMismatch=P;class C extends a.BaseError{constructor({abiItem:e,param:t}){super([`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,r.formatAbiItem)(e,{includeName:!0})}".`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}t.DecodeLogTopicsMismatch=C;class j extends a.BaseError{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}t.InvalidAbiEncodingTypeError=j;class I extends a.BaseError{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}t.InvalidAbiDecodingTypeError=I;class O extends a.BaseError{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}t.InvalidArrayError=O;class T extends a.BaseError{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}t.InvalidDefinitionTypeError=T;class S extends a.BaseError{constructor(e){super(`Type "${e}" is not supported for packed encoding.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedPackedAbiType"})}}t.UnsupportedPackedAbiType=S},26175:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountNotFoundError=void 0;const r=n(26456);class o extends r.BaseError{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join("\n"),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}t.AccountNotFoundError=o},56293:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAddressError=void 0;const r=n(26456);class o extends r.BaseError{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}t.InvalidAddressError=o},26456:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0;const r=n(54834);class o extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,r.getVersion)()});const n=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof o&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: https://viem.sh${a}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return a(this,e)}}function a(e,t){return t?.(e)?e:e&&"object"===typeof e&&"cause"in e?a(e.cause,t):t?null:e}t.BaseError=o},54907:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockNotFoundError=void 0;const r=n(26456);class o extends r.BaseError{constructor({blockHash:e,blockNumber:t}){let n="Block";e&&(n=`Block at hash "${e}"`),t&&(n=`Block at number "${t}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}t.BlockNotFoundError=o},67409:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OffchainLookupSenderMismatchError=t.OffchainLookupResponseMalformedError=t.OffchainLookupError=void 0;const r=n(58),o=n(26456),a=n(54834);class i extends o.BaseError{constructor({callbackSelector:e,cause:t,data:n,extraData:r,sender:o,urls:i}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",i&&[" Gateway URL(s):",...i.map((e=>` ${(0,a.getUrl)(e)}`))],` Sender: ${o}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${r}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}t.OffchainLookupError=i;class s extends o.BaseError{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,a.getUrl)(t)}`,`Response: ${(0,r.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}t.OffchainLookupResponseMalformedError=s;class c extends o.BaseError{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}t.OffchainLookupSenderMismatchError=c},91363:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidChainIdError=t.ClientChainNotConfiguredError=t.ChainNotFoundError=t.ChainMismatchError=t.ChainDoesNotSupportContract=void 0;const r=n(26456);class o extends r.BaseError{constructor({blockNumber:e,chain:t,contract:n}){super(`Chain "${t.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}t.ChainDoesNotSupportContract=o;class a extends r.BaseError{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} \u2013 ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} \u2013 ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}t.ChainMismatchError=a;class i extends r.BaseError{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}t.ChainNotFoundError=i;class s extends r.BaseError{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}t.ClientChainNotConfiguredError=s;class c extends r.BaseError{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}t.InvalidChainIdError=c},9996:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawContractError=t.ContractFunctionZeroDataError=t.ContractFunctionRevertedError=t.ContractFunctionExecutionError=t.CallExecutionError=void 0;const r=n(3975),o=n(6049),a=n(31293),i=n(16759),s=n(87541),c=n(95481),u=n(90686),l=n(22386),d=n(4403),f=n(26456),h=n(70270),p=n(54834);class m extends f.BaseError{constructor(e,{account:t,docsPath:n,chain:o,data:a,gas:i,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:d,nonce:f,to:p,value:m}){const b=t?(0,r.parseAccount)(t):void 0,g=(0,h.prettyPrint)({from:b?.address,to:p,value:"undefined"!==typeof m&&`${(0,u.formatEther)(m)} ${o?.nativeCurrency.symbol||"ETH"}`,data:a,gas:i,gasPrice:"undefined"!==typeof s&&`${(0,l.formatGwei)(s)} gwei`,maxFeePerGas:"undefined"!==typeof c&&`${(0,l.formatGwei)(c)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,l.formatGwei)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",g].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}t.CallExecutionError=m;class b extends f.BaseError{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:o,functionName:a,sender:u}){const l=(0,c.getAbiItem)({abi:t,args:n,name:a}),d=l?(0,s.formatAbiItemWithArgs)({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=l?(0,i.formatAbiItem)(l,{includeName:!0}):void 0,m=(0,h.prettyPrint)({address:r&&(0,p.getContractAddress)(r),function:f,args:d&&"()"!==d&&`${[...Array(a?.length??0).keys()].map((()=>" ")).join("")}${d}`,sender:u});super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",m].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=n,this.cause=e,this.contractAddress=r,this.functionName=a,this.sender=u}}t.ContractFunctionExecutionError=b;class g extends f.BaseError{constructor({abi:e,data:t,functionName:n,message:r}){let c,u,l,f,h;if(t&&"0x"!==t)try{u=(0,a.decodeErrorResult)({abi:e,data:t});const{abiItem:n,errorName:r,args:c}=u;if("Error"===r)f=c[0];else if("Panic"===r){const[e]=c;f=o.panicReasons[e]}else{const e=n?(0,i.formatAbiItem)(n,{includeName:!0}):void 0,t=n&&c?(0,s.formatAbiItemWithArgs)({abiItem:n,args:c,includeFunctionName:!1,includeName:!1}):void 0;l=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(r?.length??0).keys()].map((()=>" ")).join("")}${t}`:""]}}catch(p){c=p}else r&&(f=r);c instanceof d.AbiErrorSignatureNotFoundError&&(h=c.signature,l=[`Unable to decode signature "${h}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${h}.`]),super(f&&"execution reverted"!==f||h?[`The contract function "${n}" reverted with the following ${h?"signature":"reason"}:`,f||h].join("\n"):`The contract function "${n}" reverted.`,{cause:c,metaMessages:l}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=u,this.reason=f,this.signature=h}}t.ContractFunctionRevertedError=g;class y extends f.BaseError{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}t.ContractFunctionZeroDataError=y;class v extends f.BaseError{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}t.RawContractError=v},68377:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeExceedsPaddingSizeError=t.SliceOffsetOutOfBoundsError=void 0;const r=n(26456);class o extends r.BaseError{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}t.SliceOffsetOutOfBoundsError=o;class a extends r.BaseError{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}t.SizeExceedsPaddingSizeError=a},26425:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeOverflowError=t.OffsetOutOfBoundsError=t.InvalidHexValueError=t.InvalidHexBooleanError=t.InvalidBytesBooleanError=t.IntegerOutOfRangeError=t.DataLengthTooShortError=t.DataLengthTooLongError=void 0;const r=n(26456);class o extends r.BaseError{constructor({consumed:e,length:t}){super(`Consumed bytes (${e}) is shorter than data length (${t-1}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DataLengthTooLongError"})}}t.DataLengthTooLongError=o;class a extends r.BaseError{constructor({length:e,dataLength:t}){super(`Data length (${t-1}) is shorter than prefix length (${e-1}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DataLengthTooShortError"})}}t.DataLengthTooShortError=a;class i extends r.BaseError{constructor({max:e,min:t,signed:n,size:r,value:o}){super(`Number "${o}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}t.IntegerOutOfRangeError=i;class s extends r.BaseError{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesBooleanError"})}}t.InvalidBytesBooleanError=s;class c extends r.BaseError{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}t.InvalidHexBooleanError=c;class u extends r.BaseError{constructor(e){super(`Hex value "${e}" is an odd length (${e.length}). It must be an even length.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexValueError"})}}t.InvalidHexValueError=u;class l extends r.BaseError{constructor({nextOffset:e,offset:t}){super(`Next offset (${e}) is greater than previous offset + consumed bytes (${t})`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffsetOutOfBoundsError"})}}t.OffsetOutOfBoundsError=l;class d extends r.BaseError{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}t.SizeOverflowError=d},80733:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnsAvatarUnsupportedNamespaceError=t.EnsAvatarUriResolutionError=t.EnsAvatarInvalidNftUriError=t.EnsAvatarInvalidMetadataError=void 0;const r=n(26456);class o extends r.BaseError{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}t.EnsAvatarInvalidMetadataError=o;class a extends r.BaseError{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}t.EnsAvatarInvalidNftUriError=a;class i extends r.BaseError{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}t.EnsAvatarUriResolutionError=i;class s extends r.BaseError{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}t.EnsAvatarUnsupportedNamespaceError=s},78966:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EstimateGasExecutionError=void 0;const r=n(90686),o=n(22386),a=n(26456),i=n(70270);class s extends a.BaseError{constructor(e,{account:t,docsPath:n,chain:a,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){const m=(0,i.prettyPrint)({from:t?.address,to:h,value:"undefined"!==typeof p&&`${(0,r.formatEther)(p)} ${a?.nativeCurrency.symbol||"ETH"}`,data:s,gas:c,gasPrice:"undefined"!==typeof u&&`${(0,o.formatGwei)(u)} gwei`,maxFeePerGas:"undefined"!==typeof l&&`${(0,o.formatGwei)(l)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,o.formatGwei)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}t.EstimateGasExecutionError=s},79189:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilterTypeNotSupportedError=void 0;const r=n(26456);class o extends r.BaseError{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}t.FilterTypeNotSupportedError=o},72695:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownNodeError=t.TipAboveFeeCapError=t.TransactionTypeNotSupportedError=t.IntrinsicGasTooLowError=t.IntrinsicGasTooHighError=t.InsufficientFundsError=t.NonceMaxValueError=t.NonceTooLowError=t.NonceTooHighError=t.FeeCapTooLowError=t.FeeCapTooHighError=t.ExecutionRevertedError=void 0;const r=n(22386),o=n(26456);class a extends o.BaseError{constructor({cause:e,message:t}={}){const n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/}),t.ExecutionRevertedError=a;class i extends o.BaseError{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.formatGwei)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/}),t.FeeCapTooHighError=i;class s extends o.BaseError{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.formatGwei)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/}),t.FeeCapTooLowError=s;class c extends o.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/}),t.NonceTooHighError=c;class u extends o.BaseError{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/}),t.NonceTooLowError=u;class l extends o.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/}),t.NonceMaxValueError=l;class d extends o.BaseError{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/}),t.InsufficientFundsError=d;class f extends o.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/}),t.IntrinsicGasTooHighError=f;class h extends o.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/}),t.IntrinsicGasTooLowError=h;class p extends o.BaseError{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/}),t.TransactionTypeNotSupportedError=p;class m extends o.BaseError{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,r.formatGwei)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${(0,r.formatGwei)(n)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/}),t.TipAboveFeeCapError=m;class b extends o.BaseError{constructor({cause:e}){super(`An error occurred while executing: ${e?.message}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}t.UnknownNodeError=b},72782:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=t.RpcRequestError=t.WebSocketRequestError=t.HttpRequestError=void 0;const r=n(58),o=n(26456),a=n(54834);class i extends o.BaseError{constructor({body:e,details:t,headers:n,status:o,url:i}){super("HTTP request failed.",{details:t,metaMessages:[o&&`Status: ${o}`,`URL: ${(0,a.getUrl)(i)}`,e&&`Request body: ${(0,r.stringify)(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=o,this.url=i}}t.HttpRequestError=i;class s extends o.BaseError{constructor({body:e,details:t,url:n}){super("WebSocket request failed.",{details:t,metaMessages:[`URL: ${(0,a.getUrl)(n)}`,`Request body: ${(0,r.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}t.WebSocketRequestError=s;class c extends o.BaseError{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,a.getUrl)(n)}`,`Request body: ${(0,r.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}t.RpcRequestError=c;class u extends o.BaseError{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,a.getUrl)(t)}`,`Request body: ${(0,r.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}t.TimeoutError=u},60793:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownRpcError=t.SwitchChainError=t.ChainDisconnectedError=t.ProviderDisconnectedError=t.UnsupportedProviderMethodError=t.UnauthorizedProviderError=t.UserRejectedRequestError=t.JsonRpcVersionUnsupportedError=t.LimitExceededRpcError=t.MethodNotSupportedRpcError=t.TransactionRejectedRpcError=t.ResourceUnavailableRpcError=t.ResourceNotFoundRpcError=t.InvalidInputRpcError=t.InternalRpcError=t.InvalidParamsRpcError=t.MethodNotFoundRpcError=t.InvalidRequestRpcError=t.ParseRpcError=t.ProviderRpcError=t.RpcError=void 0;const r=n(26456),o=n(72782);class a extends r.BaseError{constructor(e,{code:t,docsPath:n,metaMessages:r,shortMessage:a}){super(a,{cause:e,docsPath:n,metaMessages:r||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof o.RpcRequestError?e.code:t??-1}}t.RpcError=a;class i extends a{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}t.ProviderRpcError=i;class s extends a{constructor(e){super(e,{code:s.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700}),t.ParseRpcError=s;class c extends a{constructor(e){super(e,{code:c.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600}),t.InvalidRequestRpcError=c;class u extends a{constructor(e){super(e,{code:u.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601}),t.MethodNotFoundRpcError=u;class l extends a{constructor(e){super(e,{code:l.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602}),t.InvalidParamsRpcError=l;class d extends a{constructor(e){super(e,{code:d.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603}),t.InternalRpcError=d;class f extends a{constructor(e){super(e,{code:f.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3}),t.InvalidInputRpcError=f;class h extends a{constructor(e){super(e,{code:h.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001}),t.ResourceNotFoundRpcError=h;class p extends a{constructor(e){super(e,{code:p.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002}),t.ResourceUnavailableRpcError=p;class m extends a{constructor(e){super(e,{code:m.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003}),t.TransactionRejectedRpcError=m;class b extends a{constructor(e){super(e,{code:b.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004}),t.MethodNotSupportedRpcError=b;class g extends a{constructor(e){super(e,{code:g.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005}),t.LimitExceededRpcError=g;class y extends a{constructor(e){super(e,{code:y.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006}),t.JsonRpcVersionUnsupportedError=y;class v extends i{constructor(e){super(e,{code:v.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001}),t.UserRejectedRequestError=v;class w extends i{constructor(e){super(e,{code:w.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100}),t.UnauthorizedProviderError=w;class E extends i{constructor(e){super(e,{code:E.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200}),t.UnsupportedProviderMethodError=E;class A extends i{constructor(e){super(e,{code:A.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900}),t.ProviderDisconnectedError=A;class x extends i{constructor(e){super(e,{code:x.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901}),t.ChainDisconnectedError=x;class P extends i{constructor(e){super(e,{code:P.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902}),t.SwitchChainError=P;t.UnknownRpcError=class extends a{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}},70270:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WaitForTransactionReceiptTimeoutError=t.TransactionReceiptNotFoundError=t.TransactionNotFoundError=t.TransactionExecutionError=t.InvalidStorageKeySizeError=t.InvalidSerializedTransactionError=t.InvalidSerializedTransactionTypeError=t.InvalidSerializableTransactionError=t.InvalidLegacyVError=t.FeeConflictError=t.prettyPrint=void 0;const r=n(90686),o=n(22386),a=n(26456);function i(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),n=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`)).join("\n")}t.prettyPrint=i;class s extends a.BaseError{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}t.FeeConflictError=s;class c extends a.BaseError{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}t.InvalidLegacyVError=c;class u extends a.BaseError{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",i(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}t.InvalidSerializableTransactionError=u;class l extends a.BaseError{constructor({serializedType:e}){super(`Serialized transaction type "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=e}}t.InvalidSerializedTransactionTypeError=l;class d extends a.BaseError{constructor({attributes:e,serializedTransaction:t,type:n}){const r=Object.entries(e).map((([e,t])=>"undefined"===typeof t?e:void 0)).filter(Boolean);super(`Invalid serialized transaction of type "${n}" was provided.`,{metaMessages:[`Serialized Transaction: "${t}"`,r.length>0?`Missing Attributes: ${r.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=t,this.type=n}}t.InvalidSerializedTransactionError=d;class f extends a.BaseError{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}t.InvalidStorageKeySizeError=f;class h extends a.BaseError{constructor(e,{account:t,docsPath:n,chain:a,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){const m=i({chain:a&&`${a?.name} (id: ${a?.id})`,from:t?.address,to:h,value:"undefined"!==typeof p&&`${(0,r.formatEther)(p)} ${a?.nativeCurrency.symbol||"ETH"}`,data:s,gas:c,gasPrice:"undefined"!==typeof u&&`${(0,o.formatGwei)(u)} gwei`,maxFeePerGas:"undefined"!==typeof l&&`${(0,o.formatGwei)(l)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,o.formatGwei)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}t.TransactionExecutionError=h;class p extends a.BaseError{constructor({blockHash:e,blockNumber:t,blockTag:n,hash:r,index:o}){let a="Transaction";n&&void 0!==o&&(a=`Transaction at block time "${n}" at index "${o}"`),e&&void 0!==o&&(a=`Transaction at block hash "${e}" at index "${o}"`),t&&void 0!==o&&(a=`Transaction at block number "${t}" at index "${o}"`),r&&(a=`Transaction with hash "${r}"`),super(`${a} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}t.TransactionNotFoundError=p;class m extends a.BaseError{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}t.TransactionReceiptNotFoundError=m;class b extends a.BaseError{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}t.WaitForTransactionReceiptTimeoutError=b},44681:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlRequiredError=void 0;const r=n(26456);class o extends r.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}t.UrlRequiredError=o},54834:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVersion=t.getUrl=t.getContractAddress=void 0;const r=n(59477);t.getContractAddress=e=>e;t.getUrl=e=>e;t.getVersion=()=>`viem@${r.version}`},59477:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="1.5.4"},68995:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=t.maxInt8=t.weiUnits=t.gweiUnits=t.etherUnits=t.zeroAddress=t.multicall3Abi=t.webSocket=t.createWalletClient=t.createTransport=t.walletActions=t.testActions=t.publicActions=t.createTestClient=t.createPublicClient=t.http=t.fallback=t.custom=t.createClient=t.getContract=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.UnknownSignatureError=t.UnknownTypeError=t.SolidityProtectedKeywordError=t.InvalidStructSignatureError=t.InvalidSignatureError=t.InvalidParenthesisError=t.InvalidParameterError=t.InvalidModifierError=t.InvalidFunctionModifierError=t.InvalidAbiTypeParameterError=t.InvalidAbiItemError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=t.CircularReferenceError=void 0,t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=void 0,t.InvalidAbiEncodingTypeError=t.InvalidAbiDecodingTypeError=t.DecodeLogTopicsMismatch=t.AbiFunctionSignatureNotFoundError=t.AbiFunctionOutputsNotFoundError=t.AbiFunctionNotFoundError=t.AbiEventSignatureNotFoundError=t.AbiEventSignatureEmptyTopicsError=t.AbiEventNotFoundError=t.AbiErrorSignatureNotFoundError=t.AbiErrorNotFoundError=t.AbiErrorInputsNotFoundError=t.AbiEncodingLengthMismatchError=t.AbiEncodingArrayLengthMismatchError=t.AbiDecodingZeroDataError=t.AbiDecodingDataSizeInvalidError=t.AbiConstructorParamsNotFoundError=t.AbiConstructorNotFoundError=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=t.minInt144=t.minInt136=t.minInt128=t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=void 0,t.NonceTooLowError=t.NonceTooHighError=t.NonceMaxValueError=t.IntrinsicGasTooLowError=t.IntrinsicGasTooHighError=t.InsufficientFundsError=t.FeeCapTooLowError=t.FeeCapTooHighError=t.ExecutionRevertedError=t.EstimateGasExecutionError=t.EnsAvatarUriResolutionError=t.OffsetOutOfBoundsError=t.InvalidHexValueError=t.InvalidHexBooleanError=t.InvalidBytesBooleanError=t.DataLengthTooShortError=t.DataLengthTooLongError=t.InvalidChainIdError=t.ClientChainNotConfiguredError=t.ChainDoesNotSupportContract=t.UserRejectedRequestError=t.UnsupportedProviderMethodError=t.UnknownRpcError=t.UnauthorizedProviderError=t.SwitchChainError=t.TransactionRejectedRpcError=t.RpcError=t.ResourceUnavailableRpcError=t.ResourceNotFoundRpcError=t.ProviderRpcError=t.ProviderDisconnectedError=t.ParseRpcError=t.MethodNotSupportedRpcError=t.MethodNotFoundRpcError=t.LimitExceededRpcError=t.JsonRpcVersionUnsupportedError=t.InvalidRequestRpcError=t.InvalidParamsRpcError=t.InvalidInputRpcError=t.InternalRpcError=t.ChainDisconnectedError=t.RawContractError=t.ContractFunctionZeroDataError=t.ContractFunctionRevertedError=t.ContractFunctionExecutionError=t.CallExecutionError=t.BlockNotFoundError=t.BaseError=t.InvalidDefinitionTypeError=t.InvalidArrayError=void 0,t.recoverPublicKey=t.recoverMessageAddress=t.recoverAddress=t.hexToSignature=t.hashTypedData=t.getTransactionType=t.getSerializedTransactionType=t.getCreateAddress=t.getCreate2Address=t.getContractAddress=t.getAbiItem=t.formatTransactionRequest=t.defineTransactionRequest=t.defineTransactionReceipt=t.transactionType=t.formatTransaction=t.defineTransaction=t.encodeFunctionResult=t.encodeFunctionData=t.encodeEventTopics=t.encodeErrorResult=t.encodeDeployData=t.encodeAbiParameters=t.decodeFunctionResult=t.decodeFunctionData=t.decodeEventLog=t.decodeErrorResult=t.decodeDeployData=t.decodeAbiParameters=t.formatLog=t.formatBlock=t.defineBlock=t.namehash=t.labelhash=t.UrlRequiredError=t.SizeExceedsPaddingSizeError=t.WaitForTransactionReceiptTimeoutError=t.TransactionReceiptNotFoundError=t.TransactionNotFoundError=t.TransactionExecutionError=t.InvalidLegacyVError=t.InvalidAddressError=t.WebSocketRequestError=t.TimeoutError=t.RpcRequestError=t.HttpRequestError=t.FilterTypeNotSupportedError=t.UnknownNodeError=t.TransactionTypeNotSupportedError=t.TipAboveFeeCapError=void 0,t.isAddressEqual=t.isAddress=t.hashMessage=t.getFunctionSelector=t.getEventSelector=t.getContractError=t.getAddress=t.fromRlp=t.hexToString=t.hexToNumber=t.hexToBool=t.hexToBigInt=t.fromHex=t.formatUnits=t.formatGwei=t.formatEther=t.encodePacked=t.defineChain=t.assertCurrentChain=t.concatHex=t.concatBytes=t.concat=t.offchainLookupSignature=t.offchainLookupAbiItem=t.offchainLookup=t.ccipFetch=t.fromBytes=t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigint=t.toHex=t.stringToHex=t.numberToHex=t.bytesToHex=t.boolToHex=t.toBytes=t.stringToBytes=t.numberToBytes=t.hexToBytes=t.boolToBytes=t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=t.assertRequest=t.verifyTypedData=t.verifyMessage=t.toRlp=t.signatureToHex=t.recoverTypedDataAddress=void 0,t.validateTypedData=t.trim=t.stringify=t.sliceHex=t.sliceBytes=t.slice=t.size=t.serializeTransaction=t.serializeAccessList=t.prepareRequest=t.parseUnits=t.parseTransaction=t.parseGwei=t.parseEther=t.padHex=t.padBytes=t.pad=t.keccak256=t.isHex=t.isHash=t.isBytes=void 0;var r=n(48661);Object.defineProperty(t,"CircularReferenceError",{enumerable:!0,get:function(){return r.CircularReferenceError}}),Object.defineProperty(t,"InvalidAbiParameterError",{enumerable:!0,get:function(){return r.InvalidAbiParameterError}}),Object.defineProperty(t,"InvalidAbiParametersError",{enumerable:!0,get:function(){return r.InvalidAbiParametersError}}),Object.defineProperty(t,"InvalidAbiItemError",{enumerable:!0,get:function(){return r.InvalidAbiItemError}}),Object.defineProperty(t,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return r.InvalidAbiTypeParameterError}}),Object.defineProperty(t,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return r.InvalidFunctionModifierError}}),Object.defineProperty(t,"InvalidModifierError",{enumerable:!0,get:function(){return r.InvalidModifierError}}),Object.defineProperty(t,"InvalidParameterError",{enumerable:!0,get:function(){return r.InvalidParameterError}}),Object.defineProperty(t,"InvalidParenthesisError",{enumerable:!0,get:function(){return r.InvalidParenthesisError}}),Object.defineProperty(t,"InvalidSignatureError",{enumerable:!0,get:function(){return r.InvalidSignatureError}}),Object.defineProperty(t,"InvalidStructSignatureError",{enumerable:!0,get:function(){return r.InvalidStructSignatureError}}),Object.defineProperty(t,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return r.SolidityProtectedKeywordError}}),Object.defineProperty(t,"UnknownTypeError",{enumerable:!0,get:function(){return r.UnknownTypeError}}),Object.defineProperty(t,"UnknownSignatureError",{enumerable:!0,get:function(){return r.UnknownSignatureError}}),Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return r.parseAbi}}),Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return r.parseAbiItem}}),Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return r.parseAbiParameter}}),Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return r.parseAbiParameters}});var o=n(28690);Object.defineProperty(t,"getContract",{enumerable:!0,get:function(){return o.getContract}});var a=n(23259);Object.defineProperty(t,"createClient",{enumerable:!0,get:function(){return a.createClient}});var i=n(99161);Object.defineProperty(t,"custom",{enumerable:!0,get:function(){return i.custom}});var s=n(72826);Object.defineProperty(t,"fallback",{enumerable:!0,get:function(){return s.fallback}});var c=n(28216);Object.defineProperty(t,"http",{enumerable:!0,get:function(){return c.http}});var u=n(86610);Object.defineProperty(t,"createPublicClient",{enumerable:!0,get:function(){return u.createPublicClient}});var l=n(34223);Object.defineProperty(t,"createTestClient",{enumerable:!0,get:function(){return l.createTestClient}});var d=n(8980);Object.defineProperty(t,"publicActions",{enumerable:!0,get:function(){return d.publicActions}});var f=n(49467);Object.defineProperty(t,"testActions",{enumerable:!0,get:function(){return f.testActions}});var h=n(47839);Object.defineProperty(t,"walletActions",{enumerable:!0,get:function(){return h.walletActions}});var p=n(42255);Object.defineProperty(t,"createTransport",{enumerable:!0,get:function(){return p.createTransport}});var m=n(32415);Object.defineProperty(t,"createWalletClient",{enumerable:!0,get:function(){return m.createWalletClient}});var b=n(37003);Object.defineProperty(t,"webSocket",{enumerable:!0,get:function(){return b.webSocket}});var g=n(28669);Object.defineProperty(t,"multicall3Abi",{enumerable:!0,get:function(){return g.multicall3Abi}});var y=n(77243);Object.defineProperty(t,"zeroAddress",{enumerable:!0,get:function(){return y.zeroAddress}});var v=n(99225);Object.defineProperty(t,"etherUnits",{enumerable:!0,get:function(){return v.etherUnits}}),Object.defineProperty(t,"gweiUnits",{enumerable:!0,get:function(){return v.gweiUnits}}),Object.defineProperty(t,"weiUnits",{enumerable:!0,get:function(){return v.weiUnits}});var w=n(84387);Object.defineProperty(t,"maxInt8",{enumerable:!0,get:function(){return w.maxInt8}}),Object.defineProperty(t,"maxInt16",{enumerable:!0,get:function(){return w.maxInt16}}),Object.defineProperty(t,"maxInt24",{enumerable:!0,get:function(){return w.maxInt24}}),Object.defineProperty(t,"maxInt32",{enumerable:!0,get:function(){return w.maxInt32}}),Object.defineProperty(t,"maxInt40",{enumerable:!0,get:function(){return w.maxInt40}}),Object.defineProperty(t,"maxInt48",{enumerable:!0,get:function(){return w.maxInt48}}),Object.defineProperty(t,"maxInt56",{enumerable:!0,get:function(){return w.maxInt56}}),Object.defineProperty(t,"maxInt64",{enumerable:!0,get:function(){return w.maxInt64}}),Object.defineProperty(t,"maxInt72",{enumerable:!0,get:function(){return w.maxInt72}}),Object.defineProperty(t,"maxInt80",{enumerable:!0,get:function(){return w.maxInt80}}),Object.defineProperty(t,"maxInt88",{enumerable:!0,get:function(){return w.maxInt88}}),Object.defineProperty(t,"maxInt96",{enumerable:!0,get:function(){return w.maxInt96}}),Object.defineProperty(t,"maxInt104",{enumerable:!0,get:function(){return w.maxInt104}}),Object.defineProperty(t,"maxInt112",{enumerable:!0,get:function(){return w.maxInt112}}),Object.defineProperty(t,"maxInt120",{enumerable:!0,get:function(){return w.maxInt120}}),Object.defineProperty(t,"maxInt128",{enumerable:!0,get:function(){return w.maxInt128}}),Object.defineProperty(t,"maxInt136",{enumerable:!0,get:function(){return w.maxInt136}}),Object.defineProperty(t,"maxInt144",{enumerable:!0,get:function(){return w.maxInt144}}),Object.defineProperty(t,"maxInt152",{enumerable:!0,get:function(){return w.maxInt152}}),Object.defineProperty(t,"maxInt160",{enumerable:!0,get:function(){return w.maxInt160}}),Object.defineProperty(t,"maxInt168",{enumerable:!0,get:function(){return w.maxInt168}}),Object.defineProperty(t,"maxInt176",{enumerable:!0,get:function(){return w.maxInt176}}),Object.defineProperty(t,"maxInt184",{enumerable:!0,get:function(){return w.maxInt184}}),Object.defineProperty(t,"maxInt192",{enumerable:!0,get:function(){return w.maxInt192}}),Object.defineProperty(t,"maxInt200",{enumerable:!0,get:function(){return w.maxInt200}}),Object.defineProperty(t,"maxInt208",{enumerable:!0,get:function(){return w.maxInt208}}),Object.defineProperty(t,"maxInt216",{enumerable:!0,get:function(){return w.maxInt216}}),Object.defineProperty(t,"maxInt224",{enumerable:!0,get:function(){return w.maxInt224}}),Object.defineProperty(t,"maxInt232",{enumerable:!0,get:function(){return w.maxInt232}}),Object.defineProperty(t,"maxInt240",{enumerable:!0,get:function(){return w.maxInt240}}),Object.defineProperty(t,"maxInt248",{enumerable:!0,get:function(){return w.maxInt248}}),Object.defineProperty(t,"maxInt256",{enumerable:!0,get:function(){return w.maxInt256}}),Object.defineProperty(t,"maxUint8",{enumerable:!0,get:function(){return w.maxUint8}}),Object.defineProperty(t,"maxUint16",{enumerable:!0,get:function(){return w.maxUint16}}),Object.defineProperty(t,"maxUint24",{enumerable:!0,get:function(){return w.maxUint24}}),Object.defineProperty(t,"maxUint32",{enumerable:!0,get:function(){return w.maxUint32}}),Object.defineProperty(t,"maxUint40",{enumerable:!0,get:function(){return w.maxUint40}}),Object.defineProperty(t,"maxUint48",{enumerable:!0,get:function(){return w.maxUint48}}),Object.defineProperty(t,"maxUint56",{enumerable:!0,get:function(){return w.maxUint56}}),Object.defineProperty(t,"maxUint64",{enumerable:!0,get:function(){return w.maxUint64}}),Object.defineProperty(t,"maxUint72",{enumerable:!0,get:function(){return w.maxUint72}}),Object.defineProperty(t,"maxUint80",{enumerable:!0,get:function(){return w.maxUint80}}),Object.defineProperty(t,"maxUint88",{enumerable:!0,get:function(){return w.maxUint88}}),Object.defineProperty(t,"maxUint96",{enumerable:!0,get:function(){return w.maxUint96}}),Object.defineProperty(t,"maxUint104",{enumerable:!0,get:function(){return w.maxUint104}}),Object.defineProperty(t,"maxUint112",{enumerable:!0,get:function(){return w.maxUint112}}),Object.defineProperty(t,"maxUint120",{enumerable:!0,get:function(){return w.maxUint120}}),Object.defineProperty(t,"maxUint128",{enumerable:!0,get:function(){return w.maxUint128}}),Object.defineProperty(t,"maxUint136",{enumerable:!0,get:function(){return w.maxUint136}}),Object.defineProperty(t,"maxUint144",{enumerable:!0,get:function(){return w.maxUint144}}),Object.defineProperty(t,"maxUint152",{enumerable:!0,get:function(){return w.maxUint152}}),Object.defineProperty(t,"maxUint160",{enumerable:!0,get:function(){return w.maxUint160}}),Object.defineProperty(t,"maxUint168",{enumerable:!0,get:function(){return w.maxUint168}}),Object.defineProperty(t,"maxUint176",{enumerable:!0,get:function(){return w.maxUint176}}),Object.defineProperty(t,"maxUint184",{enumerable:!0,get:function(){return w.maxUint184}}),Object.defineProperty(t,"maxUint192",{enumerable:!0,get:function(){return w.maxUint192}}),Object.defineProperty(t,"maxUint200",{enumerable:!0,get:function(){return w.maxUint200}}),Object.defineProperty(t,"maxUint208",{enumerable:!0,get:function(){return w.maxUint208}}),Object.defineProperty(t,"maxUint216",{enumerable:!0,get:function(){return w.maxUint216}}),Object.defineProperty(t,"maxUint224",{enumerable:!0,get:function(){return w.maxUint224}}),Object.defineProperty(t,"maxUint232",{enumerable:!0,get:function(){return w.maxUint232}}),Object.defineProperty(t,"maxUint240",{enumerable:!0,get:function(){return w.maxUint240}}),Object.defineProperty(t,"maxUint248",{enumerable:!0,get:function(){return w.maxUint248}}),Object.defineProperty(t,"maxUint256",{enumerable:!0,get:function(){return w.maxUint256}}),Object.defineProperty(t,"minInt8",{enumerable:!0,get:function(){return w.minInt8}}),Object.defineProperty(t,"minInt16",{enumerable:!0,get:function(){return w.minInt16}}),Object.defineProperty(t,"minInt24",{enumerable:!0,get:function(){return w.minInt24}}),Object.defineProperty(t,"minInt32",{enumerable:!0,get:function(){return w.minInt32}}),Object.defineProperty(t,"minInt40",{enumerable:!0,get:function(){return w.minInt40}}),Object.defineProperty(t,"minInt48",{enumerable:!0,get:function(){return w.minInt48}}),Object.defineProperty(t,"minInt56",{enumerable:!0,get:function(){return w.minInt56}}),Object.defineProperty(t,"minInt64",{enumerable:!0,get:function(){return w.minInt64}}),Object.defineProperty(t,"minInt72",{enumerable:!0,get:function(){return w.minInt72}}),Object.defineProperty(t,"minInt80",{enumerable:!0,get:function(){return w.minInt80}}),Object.defineProperty(t,"minInt88",{enumerable:!0,get:function(){return w.minInt88}}),Object.defineProperty(t,"minInt96",{enumerable:!0,get:function(){return w.minInt96}}),Object.defineProperty(t,"minInt104",{enumerable:!0,get:function(){return w.minInt104}}),Object.defineProperty(t,"minInt112",{enumerable:!0,get:function(){return w.minInt112}}),Object.defineProperty(t,"minInt120",{enumerable:!0,get:function(){return w.minInt120}}),Object.defineProperty(t,"minInt128",{enumerable:!0,get:function(){return w.minInt128}}),Object.defineProperty(t,"minInt136",{enumerable:!0,get:function(){return w.minInt136}}),Object.defineProperty(t,"minInt144",{enumerable:!0,get:function(){return w.minInt144}}),Object.defineProperty(t,"minInt152",{enumerable:!0,get:function(){return w.minInt152}}),Object.defineProperty(t,"minInt160",{enumerable:!0,get:function(){return w.minInt160}}),Object.defineProperty(t,"minInt168",{enumerable:!0,get:function(){return w.minInt168}}),Object.defineProperty(t,"minInt176",{enumerable:!0,get:function(){return w.minInt176}}),Object.defineProperty(t,"minInt184",{enumerable:!0,get:function(){return w.minInt184}}),Object.defineProperty(t,"minInt192",{enumerable:!0,get:function(){return w.minInt192}}),Object.defineProperty(t,"minInt200",{enumerable:!0,get:function(){return w.minInt200}}),Object.defineProperty(t,"minInt208",{enumerable:!0,get:function(){return w.minInt208}}),Object.defineProperty(t,"minInt216",{enumerable:!0,get:function(){return w.minInt216}}),Object.defineProperty(t,"minInt224",{enumerable:!0,get:function(){return w.minInt224}}),Object.defineProperty(t,"minInt232",{enumerable:!0,get:function(){return w.minInt232}}),Object.defineProperty(t,"minInt240",{enumerable:!0,get:function(){return w.minInt240}}),Object.defineProperty(t,"minInt248",{enumerable:!0,get:function(){return w.minInt248}}),Object.defineProperty(t,"minInt256",{enumerable:!0,get:function(){return w.minInt256}});var E=n(4403);Object.defineProperty(t,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return E.AbiConstructorNotFoundError}}),Object.defineProperty(t,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return E.AbiConstructorParamsNotFoundError}}),Object.defineProperty(t,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return E.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(t,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return E.AbiDecodingZeroDataError}}),Object.defineProperty(t,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return E.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(t,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return E.AbiEncodingLengthMismatchError}}),Object.defineProperty(t,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return E.AbiErrorInputsNotFoundError}}),Object.defineProperty(t,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return E.AbiErrorNotFoundError}}),Object.defineProperty(t,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return E.AbiErrorSignatureNotFoundError}}),Object.defineProperty(t,"AbiEventNotFoundError",{enumerable:!0,get:function(){return E.AbiEventNotFoundError}}),Object.defineProperty(t,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return E.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(t,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return E.AbiEventSignatureNotFoundError}}),Object.defineProperty(t,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return E.AbiFunctionNotFoundError}}),Object.defineProperty(t,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return E.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(t,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return E.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(t,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return E.DecodeLogTopicsMismatch}}),Object.defineProperty(t,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return E.InvalidAbiDecodingTypeError}}),Object.defineProperty(t,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return E.InvalidAbiEncodingTypeError}}),Object.defineProperty(t,"InvalidArrayError",{enumerable:!0,get:function(){return E.InvalidArrayError}}),Object.defineProperty(t,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return E.InvalidDefinitionTypeError}});var A=n(26456);Object.defineProperty(t,"BaseError",{enumerable:!0,get:function(){return A.BaseError}});var x=n(54907);Object.defineProperty(t,"BlockNotFoundError",{enumerable:!0,get:function(){return x.BlockNotFoundError}});var P=n(9996);Object.defineProperty(t,"CallExecutionError",{enumerable:!0,get:function(){return P.CallExecutionError}}),Object.defineProperty(t,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return P.ContractFunctionExecutionError}}),Object.defineProperty(t,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return P.ContractFunctionRevertedError}}),Object.defineProperty(t,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return P.ContractFunctionZeroDataError}}),Object.defineProperty(t,"RawContractError",{enumerable:!0,get:function(){return P.RawContractError}});var C=n(60793);Object.defineProperty(t,"ChainDisconnectedError",{enumerable:!0,get:function(){return C.ChainDisconnectedError}}),Object.defineProperty(t,"InternalRpcError",{enumerable:!0,get:function(){return C.InternalRpcError}}),Object.defineProperty(t,"InvalidInputRpcError",{enumerable:!0,get:function(){return C.InvalidInputRpcError}}),Object.defineProperty(t,"InvalidParamsRpcError",{enumerable:!0,get:function(){return C.InvalidParamsRpcError}}),Object.defineProperty(t,"InvalidRequestRpcError",{enumerable:!0,get:function(){return C.InvalidRequestRpcError}}),Object.defineProperty(t,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return C.JsonRpcVersionUnsupportedError}}),Object.defineProperty(t,"LimitExceededRpcError",{enumerable:!0,get:function(){return C.LimitExceededRpcError}}),Object.defineProperty(t,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return C.MethodNotFoundRpcError}}),Object.defineProperty(t,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return C.MethodNotSupportedRpcError}}),Object.defineProperty(t,"ParseRpcError",{enumerable:!0,get:function(){return C.ParseRpcError}}),Object.defineProperty(t,"ProviderDisconnectedError",{enumerable:!0,get:function(){return C.ProviderDisconnectedError}}),Object.defineProperty(t,"ProviderRpcError",{enumerable:!0,get:function(){return C.ProviderRpcError}}),Object.defineProperty(t,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return C.ResourceNotFoundRpcError}}),Object.defineProperty(t,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return C.ResourceUnavailableRpcError}}),Object.defineProperty(t,"RpcError",{enumerable:!0,get:function(){return C.RpcError}}),Object.defineProperty(t,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return C.TransactionRejectedRpcError}}),Object.defineProperty(t,"SwitchChainError",{enumerable:!0,get:function(){return C.SwitchChainError}}),Object.defineProperty(t,"UnauthorizedProviderError",{enumerable:!0,get:function(){return C.UnauthorizedProviderError}}),Object.defineProperty(t,"UnknownRpcError",{enumerable:!0,get:function(){return C.UnknownRpcError}}),Object.defineProperty(t,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return C.UnsupportedProviderMethodError}}),Object.defineProperty(t,"UserRejectedRequestError",{enumerable:!0,get:function(){return C.UserRejectedRequestError}});var j=n(91363);Object.defineProperty(t,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return j.ChainDoesNotSupportContract}}),Object.defineProperty(t,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return j.ClientChainNotConfiguredError}}),Object.defineProperty(t,"InvalidChainIdError",{enumerable:!0,get:function(){return j.InvalidChainIdError}});var I=n(26425);Object.defineProperty(t,"DataLengthTooLongError",{enumerable:!0,get:function(){return I.DataLengthTooLongError}}),Object.defineProperty(t,"DataLengthTooShortError",{enumerable:!0,get:function(){return I.DataLengthTooShortError}}),Object.defineProperty(t,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return I.InvalidBytesBooleanError}}),Object.defineProperty(t,"InvalidHexBooleanError",{enumerable:!0,get:function(){return I.InvalidHexBooleanError}}),Object.defineProperty(t,"InvalidHexValueError",{enumerable:!0,get:function(){return I.InvalidHexValueError}}),Object.defineProperty(t,"OffsetOutOfBoundsError",{enumerable:!0,get:function(){return I.OffsetOutOfBoundsError}});var O=n(80733);Object.defineProperty(t,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return O.EnsAvatarUriResolutionError}});var T=n(78966);Object.defineProperty(t,"EstimateGasExecutionError",{enumerable:!0,get:function(){return T.EstimateGasExecutionError}});var S=n(72695);Object.defineProperty(t,"ExecutionRevertedError",{enumerable:!0,get:function(){return S.ExecutionRevertedError}}),Object.defineProperty(t,"FeeCapTooHighError",{enumerable:!0,get:function(){return S.FeeCapTooHighError}}),Object.defineProperty(t,"FeeCapTooLowError",{enumerable:!0,get:function(){return S.FeeCapTooLowError}}),Object.defineProperty(t,"InsufficientFundsError",{enumerable:!0,get:function(){return S.InsufficientFundsError}}),Object.defineProperty(t,"IntrinsicGasTooHighError",{enumerable:!0,get:function(){return S.IntrinsicGasTooHighError}}),Object.defineProperty(t,"IntrinsicGasTooLowError",{enumerable:!0,get:function(){return S.IntrinsicGasTooLowError}}),Object.defineProperty(t,"NonceMaxValueError",{enumerable:!0,get:function(){return S.NonceMaxValueError}}),Object.defineProperty(t,"NonceTooHighError",{enumerable:!0,get:function(){return S.NonceTooHighError}}),Object.defineProperty(t,"NonceTooLowError",{enumerable:!0,get:function(){return S.NonceTooLowError}}),Object.defineProperty(t,"TipAboveFeeCapError",{enumerable:!0,get:function(){return S.TipAboveFeeCapError}}),Object.defineProperty(t,"TransactionTypeNotSupportedError",{enumerable:!0,get:function(){return S.TransactionTypeNotSupportedError}}),Object.defineProperty(t,"UnknownNodeError",{enumerable:!0,get:function(){return S.UnknownNodeError}});var B=n(79189);Object.defineProperty(t,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return B.FilterTypeNotSupportedError}});var k=n(72782);Object.defineProperty(t,"HttpRequestError",{enumerable:!0,get:function(){return k.HttpRequestError}}),Object.defineProperty(t,"RpcRequestError",{enumerable:!0,get:function(){return k.RpcRequestError}}),Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return k.TimeoutError}}),Object.defineProperty(t,"WebSocketRequestError",{enumerable:!0,get:function(){return k.WebSocketRequestError}});var _=n(56293);Object.defineProperty(t,"InvalidAddressError",{enumerable:!0,get:function(){return _.InvalidAddressError}});var N=n(70270);Object.defineProperty(t,"InvalidLegacyVError",{enumerable:!0,get:function(){return N.InvalidLegacyVError}}),Object.defineProperty(t,"TransactionExecutionError",{enumerable:!0,get:function(){return N.TransactionExecutionError}}),Object.defineProperty(t,"TransactionNotFoundError",{enumerable:!0,get:function(){return N.TransactionNotFoundError}}),Object.defineProperty(t,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return N.TransactionReceiptNotFoundError}}),Object.defineProperty(t,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return N.WaitForTransactionReceiptTimeoutError}});var M=n(68377);Object.defineProperty(t,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return M.SizeExceedsPaddingSizeError}});var R=n(44681);Object.defineProperty(t,"UrlRequiredError",{enumerable:!0,get:function(){return R.UrlRequiredError}});var F=n(41311);Object.defineProperty(t,"labelhash",{enumerable:!0,get:function(){return F.labelhash}});var U=n(77863);Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return U.namehash}});var L=n(23604);Object.defineProperty(t,"defineBlock",{enumerable:!0,get:function(){return L.defineBlock}}),Object.defineProperty(t,"formatBlock",{enumerable:!0,get:function(){return L.formatBlock}});var D=n(80330);Object.defineProperty(t,"formatLog",{enumerable:!0,get:function(){return D.formatLog}});var q=n(14722);Object.defineProperty(t,"decodeAbiParameters",{enumerable:!0,get:function(){return q.decodeAbiParameters}});var H=n(9385);Object.defineProperty(t,"decodeDeployData",{enumerable:!0,get:function(){return H.decodeDeployData}});var z=n(31293);Object.defineProperty(t,"decodeErrorResult",{enumerable:!0,get:function(){return z.decodeErrorResult}});var G=n(81912);Object.defineProperty(t,"decodeEventLog",{enumerable:!0,get:function(){return G.decodeEventLog}});var $=n(14338);Object.defineProperty(t,"decodeFunctionData",{enumerable:!0,get:function(){return $.decodeFunctionData}});var W=n(76286);Object.defineProperty(t,"decodeFunctionResult",{enumerable:!0,get:function(){return W.decodeFunctionResult}});var K=n(24837);Object.defineProperty(t,"encodeAbiParameters",{enumerable:!0,get:function(){return K.encodeAbiParameters}});var Q=n(77833);Object.defineProperty(t,"encodeDeployData",{enumerable:!0,get:function(){return Q.encodeDeployData}});var V=n(59094);Object.defineProperty(t,"encodeErrorResult",{enumerable:!0,get:function(){return V.encodeErrorResult}});var J=n(7534);Object.defineProperty(t,"encodeEventTopics",{enumerable:!0,get:function(){return J.encodeEventTopics}});var Y=n(22836);Object.defineProperty(t,"encodeFunctionData",{enumerable:!0,get:function(){return Y.encodeFunctionData}});var Z=n(72097);Object.defineProperty(t,"encodeFunctionResult",{enumerable:!0,get:function(){return Z.encodeFunctionResult}});var X=n(1982);Object.defineProperty(t,"defineTransaction",{enumerable:!0,get:function(){return X.defineTransaction}}),Object.defineProperty(t,"formatTransaction",{enumerable:!0,get:function(){return X.formatTransaction}}),Object.defineProperty(t,"transactionType",{enumerable:!0,get:function(){return X.transactionType}});var ee=n(5840);Object.defineProperty(t,"defineTransactionReceipt",{enumerable:!0,get:function(){return ee.defineTransactionReceipt}});var te=n(33270);Object.defineProperty(t,"defineTransactionRequest",{enumerable:!0,get:function(){return te.defineTransactionRequest}}),Object.defineProperty(t,"formatTransactionRequest",{enumerable:!0,get:function(){return te.formatTransactionRequest}});var ne=n(95481);Object.defineProperty(t,"getAbiItem",{enumerable:!0,get:function(){return ne.getAbiItem}});var re=n(82668);Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return re.getContractAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return re.getCreate2Address}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return re.getCreateAddress}});var oe=n(19768);Object.defineProperty(t,"getSerializedTransactionType",{enumerable:!0,get:function(){return oe.getSerializedTransactionType}});var ae=n(76547);Object.defineProperty(t,"getTransactionType",{enumerable:!0,get:function(){return ae.getTransactionType}});var ie=n(70834);Object.defineProperty(t,"hashTypedData",{enumerable:!0,get:function(){return ie.hashTypedData}});var se=n(91281);Object.defineProperty(t,"hexToSignature",{enumerable:!0,get:function(){return se.hexToSignature}});var ce=n(34159);Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return ce.recoverAddress}});var ue=n(77753);Object.defineProperty(t,"recoverMessageAddress",{enumerable:!0,get:function(){return ue.recoverMessageAddress}});var le=n(57275);Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return le.recoverPublicKey}});var de=n(80206);Object.defineProperty(t,"recoverTypedDataAddress",{enumerable:!0,get:function(){return de.recoverTypedDataAddress}});var fe=n(24366);Object.defineProperty(t,"signatureToHex",{enumerable:!0,get:function(){return fe.signatureToHex}});var he=n(28913);Object.defineProperty(t,"toRlp",{enumerable:!0,get:function(){return he.toRlp}});var pe=n(19338);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return pe.verifyMessage}});var me=n(92774);Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return me.verifyTypedData}});var be=n(5434);Object.defineProperty(t,"assertRequest",{enumerable:!0,get:function(){return be.assertRequest}});var ge=n(26825);Object.defineProperty(t,"assertTransactionEIP1559",{enumerable:!0,get:function(){return ge.assertTransactionEIP1559}}),Object.defineProperty(t,"assertTransactionEIP2930",{enumerable:!0,get:function(){return ge.assertTransactionEIP2930}}),Object.defineProperty(t,"assertTransactionLegacy",{enumerable:!0,get:function(){return ge.assertTransactionLegacy}});var ye=n(52387);Object.defineProperty(t,"boolToBytes",{enumerable:!0,get:function(){return ye.boolToBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return ye.hexToBytes}}),Object.defineProperty(t,"numberToBytes",{enumerable:!0,get:function(){return ye.numberToBytes}}),Object.defineProperty(t,"stringToBytes",{enumerable:!0,get:function(){return ye.stringToBytes}}),Object.defineProperty(t,"toBytes",{enumerable:!0,get:function(){return ye.toBytes}});var ve=n(86308);Object.defineProperty(t,"boolToHex",{enumerable:!0,get:function(){return ve.boolToHex}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return ve.bytesToHex}}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return ve.numberToHex}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return ve.stringToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return ve.toHex}});var we=n(54328);Object.defineProperty(t,"bytesToBigint",{enumerable:!0,get:function(){return we.bytesToBigint}}),Object.defineProperty(t,"bytesToBool",{enumerable:!0,get:function(){return we.bytesToBool}}),Object.defineProperty(t,"bytesToNumber",{enumerable:!0,get:function(){return we.bytesToNumber}}),Object.defineProperty(t,"bytesToString",{enumerable:!0,get:function(){return we.bytesToString}}),Object.defineProperty(t,"fromBytes",{enumerable:!0,get:function(){return we.fromBytes}});var Ee=n(64045);Object.defineProperty(t,"ccipFetch",{enumerable:!0,get:function(){return Ee.ccipFetch}}),Object.defineProperty(t,"offchainLookup",{enumerable:!0,get:function(){return Ee.offchainLookup}}),Object.defineProperty(t,"offchainLookupAbiItem",{enumerable:!0,get:function(){return Ee.offchainLookupAbiItem}}),Object.defineProperty(t,"offchainLookupSignature",{enumerable:!0,get:function(){return Ee.offchainLookupSignature}});var Ae=n(1501);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return Ae.concat}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return Ae.concatBytes}}),Object.defineProperty(t,"concatHex",{enumerable:!0,get:function(){return Ae.concatHex}});var xe=n(47797);Object.defineProperty(t,"assertCurrentChain",{enumerable:!0,get:function(){return xe.assertCurrentChain}}),Object.defineProperty(t,"defineChain",{enumerable:!0,get:function(){return xe.defineChain}});var Pe=n(33362);Object.defineProperty(t,"encodePacked",{enumerable:!0,get:function(){return Pe.encodePacked}});var Ce=n(90686);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return Ce.formatEther}});var je=n(22386);Object.defineProperty(t,"formatGwei",{enumerable:!0,get:function(){return je.formatGwei}});var Ie=n(88162);Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return Ie.formatUnits}});var Oe=n(57114);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return Oe.fromHex}}),Object.defineProperty(t,"hexToBigInt",{enumerable:!0,get:function(){return Oe.hexToBigInt}}),Object.defineProperty(t,"hexToBool",{enumerable:!0,get:function(){return Oe.hexToBool}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return Oe.hexToNumber}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return Oe.hexToString}});var Te=n(92237);Object.defineProperty(t,"fromRlp",{enumerable:!0,get:function(){return Te.fromRlp}});var Se=n(36556);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return Se.getAddress}});var Be=n(90042);Object.defineProperty(t,"getContractError",{enumerable:!0,get:function(){return Be.getContractError}});var ke=n(79148);Object.defineProperty(t,"getEventSelector",{enumerable:!0,get:function(){return ke.getEventSelector}});var _e=n(18546);Object.defineProperty(t,"getFunctionSelector",{enumerable:!0,get:function(){return _e.getFunctionSelector}});var Ne=n(67475);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return Ne.hashMessage}});var Me=n(21041);Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return Me.isAddress}});var Re=n(13711);Object.defineProperty(t,"isAddressEqual",{enumerable:!0,get:function(){return Re.isAddressEqual}});var Fe=n(43848);Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return Fe.isBytes}});var Ue=n(95056);Object.defineProperty(t,"isHash",{enumerable:!0,get:function(){return Ue.isHash}});var Le=n(77116);Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return Le.isHex}});var De=n(75225);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return De.keccak256}});var qe=n(54405);Object.defineProperty(t,"pad",{enumerable:!0,get:function(){return qe.pad}}),Object.defineProperty(t,"padBytes",{enumerable:!0,get:function(){return qe.padBytes}}),Object.defineProperty(t,"padHex",{enumerable:!0,get:function(){return qe.padHex}});var He=n(39118);Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return He.parseEther}});var ze=n(31187);Object.defineProperty(t,"parseGwei",{enumerable:!0,get:function(){return ze.parseGwei}});var Ge=n(53858);Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return Ge.parseTransaction}});var $e=n(73956);Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return $e.parseUnits}});var We=n(40623);Object.defineProperty(t,"prepareRequest",{enumerable:!0,get:function(){return We.prepareRequest}});var Ke=n(99435);Object.defineProperty(t,"serializeAccessList",{enumerable:!0,get:function(){return Ke.serializeAccessList}});var Qe=n(52932);Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return Qe.serializeTransaction}});var Ve=n(66859);Object.defineProperty(t,"size",{enumerable:!0,get:function(){return Ve.size}});var Je=n(53462);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return Je.slice}}),Object.defineProperty(t,"sliceBytes",{enumerable:!0,get:function(){return Je.sliceBytes}}),Object.defineProperty(t,"sliceHex",{enumerable:!0,get:function(){return Je.sliceHex}});var Ye=n(58);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return Ye.stringify}});var Ze=n(80475);Object.defineProperty(t,"trim",{enumerable:!0,get:function(){return Ze.trim}});var Xe=n(42586);Object.defineProperty(t,"validateTypedData",{enumerable:!0,get:function(){return Xe.validateTypedData}})},14722:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeAbiParameters=void 0;const r=n(4403),o=n(36556),a=n(66859),i=n(53462),s=n(80475),c=n(57114),u=n(24837);function l({data:e,param:t,position:n}){const a=(0,u.getArrayComponents)(t.type);if(a){const[r,o]=a;return function(e,{param:t,length:n,position:r}){if(!n){const n=(0,c.hexToNumber)((0,i.slice)(e,r,r+32,{strict:!0})),o=(0,c.hexToNumber)((0,i.slice)(e,n,n+32,{strict:!0}));let a=0;const s=[];for(let r=0;r!e)),o=r?[]:{};let a=0;if(d(t)){const s=(0,c.hexToNumber)((0,i.slice)(e,n,n+32,{strict:!0}));for(let n=0;n48?(0,c.hexToBigInt)(e,{signed:n}):(0,c.hexToNumber)(e,{signed:n})}}(f,{param:t});if("address"===t.type)return function(e){return{consumed:32,value:(0,o.checksumAddress)((0,i.slice)(e,-20))}}(f);if("bool"===t.type)return function(e){return{consumed:32,value:(0,c.hexToBool)(e)}}(f);throw new r.InvalidAbiDecodingTypeError(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function d(e){const{type:t}=e;if("string"===t)return!0;if("bytes"===t)return!0;if(t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(d);const n=(0,u.getArrayComponents)(e.type);return!(!n||!d({...e,type:n[1]}))}t.decodeAbiParameters=function(e,t){if("0x"===t&&e.length>0)throw new r.AbiDecodingZeroDataError;if((0,a.size)(t)&&(0,a.size)(t)<32)throw new r.AbiDecodingDataSizeTooSmallError({data:t,params:e,size:(0,a.size)(t)});return function({data:e,params:t}){const n=[];let o=0;for(let i=0;i=(0,a.size)(e))throw new r.AbiDecodingDataSizeTooSmallError({data:e,params:t,size:(0,a.size)(e)});const s=t[i],{consumed:c,value:u}=l({data:e,param:s,position:o});n.push(u),o+=c}return n}({data:t,params:e})}},9385:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeDeployData=void 0;const r=n(4403),o=n(14722),a="/docs/contract/decodeDeployData";t.decodeDeployData=function({abi:e,bytecode:t,data:n}){if(n===t)return{bytecode:t};const i=e.find((e=>"type"in e&&"constructor"===e.type));if(!i)throw new r.AbiConstructorNotFoundError({docsPath:a});if(!("inputs"in i))throw new r.AbiConstructorParamsNotFoundError({docsPath:a});if(!i.inputs||0===i.inputs.length)throw new r.AbiConstructorParamsNotFoundError({docsPath:a});return{args:(0,o.decodeAbiParameters)(i.inputs,`0x${n.replace(t,"")}`),bytecode:t}}},31293:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeErrorResult=void 0;const r=n(6049),o=n(4403),a=n(53462),i=n(18546),s=n(14722),c=n(16759);t.decodeErrorResult=function({abi:e,data:t}){const n=(0,a.slice)(t,0,4);if("0x"===n)throw new o.AbiDecodingZeroDataError;const u=[...e||[],r.solidityError,r.solidityPanic].find((e=>"error"===e.type&&n===(0,i.getFunctionSelector)((0,c.formatAbiItem)(e))));if(!u)throw new o.AbiErrorSignatureNotFoundError(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?(0,s.decodeAbiParameters)(u.inputs,(0,a.slice)(t,4)):void 0,errorName:u.name}}},81912:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeEventLog=void 0;const r=n(4403),o=n(79148),a=n(14722),i=n(16759),s="/docs/contract/decodeEventLog";function c({param:e,value:t}){if("string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))return t;return((0,a.decodeAbiParameters)([e],t)||[])[0]}t.decodeEventLog=function({abi:e,data:t,strict:n,topics:u}){const l=n??!0,[d,...f]=u;if(!d)throw new r.AbiEventSignatureEmptyTopicsError({docsPath:s});const h=e.find((e=>"event"===e.type&&d===(0,o.getEventSelector)((0,i.formatAbiItem)(e))));if(!h||!("name"in h)||"event"!==h.type)throw new r.AbiEventSignatureNotFoundError(d,{docsPath:s});const{name:p,inputs:m}=h,b=m?.some((e=>!("name"in e&&e.name)));let g=b?[]:{};const y=m.filter((e=>"indexed"in e&&e.indexed));if(f.length>0)for(let o=0;o!("indexed"in e&&e.indexed)));if(v.length>0)if(t&&"0x"!==t)try{const e=(0,a.decodeAbiParameters)(v,t);if(e)if(b)g=[...g,...e];else for(let t=0;t0?g:void 0}}},14338:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeFunctionData=void 0;const r=n(4403),o=n(53462),a=n(18546),i=n(14722),s=n(16759);t.decodeFunctionData=function({abi:e,data:t}){const n=(0,o.slice)(t,0,4),c=e.find((e=>"function"===e.type&&n===(0,a.getFunctionSelector)((0,s.formatAbiItem)(e))));if(!c)throw new r.AbiFunctionSignatureNotFoundError(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:c.name,args:"inputs"in c&&c.inputs&&c.inputs.length>0?(0,i.decodeAbiParameters)(c.inputs,(0,o.slice)(t,4)):void 0}}},76286:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeFunctionResult=void 0;const r=n(4403),o=n(14722),a=n(95481),i="/docs/contract/decodeFunctionResult";t.decodeFunctionResult=function({abi:e,args:t,functionName:n,data:s}){let c=e[0];if(n&&(c=(0,a.getAbiItem)({abi:e,args:t,name:n}),!c))throw new r.AbiFunctionNotFoundError(n,{docsPath:i});if("function"!==c.type)throw new r.AbiFunctionNotFoundError(void 0,{docsPath:i});if(!c.outputs)throw new r.AbiFunctionOutputsNotFoundError(c.name,{docsPath:i});const u=(0,o.decodeAbiParameters)(c.outputs,s);return u&&u.length>1?u:u&&1===u.length?u[0]:void 0}},24837:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getArrayComponents=t.encodeAbiParameters=void 0;const r=n(4403),o=n(56293),a=n(21041),i=n(1501),s=n(54405),c=n(66859),u=n(53462),l=n(86308);function d({param:e,value:t}){const n=h(e.type);if(n){const[o,a]=n;return function(e,{length:t,param:n}){const o=null===t;if(!Array.isArray(e))throw new r.InvalidArrayError(e);if(!o&&e.length!==t)throw new r.AbiEncodingArrayLengthMismatchError({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let a=!1;const s=[];for(let r=0;r0?(0,i.concat)([t,e]):t}}if(a)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,i.concat)(s.map((({encoded:e})=>e)))}}(t,{length:o,param:{...e,type:a}})}if("tuple"===e.type)return function(e,{param:t}){let n=!1;const r=[];for(let o=0;oe)))}}(t,{param:e});if("address"===e.type)return function(e){if(!(0,a.isAddress)(e))throw new o.InvalidAddressError({address:e});return{dynamic:!1,encoded:(0,s.padHex)(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){return{dynamic:!1,encoded:(0,s.padHex)((0,l.boolToHex)(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){return function(e,{signed:t}){return{dynamic:!1,encoded:(0,l.numberToHex)(e,{size:32,signed:t})}}(t,{signed:e.type.startsWith("int")})}if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,n]=t.type.split("bytes"),o=(0,c.size)(e);if(!n){let t=e;return o%32!==0&&(t=(0,s.padHex)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,i.concat)([(0,s.padHex)((0,l.numberToHex)(o,{size:32})),t])}}if(o!==parseInt(n))throw new r.AbiEncodingBytesSizeMismatchError({expectedSize:parseInt(n),value:e});return{dynamic:!1,encoded:(0,s.padHex)(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=(0,l.stringToHex)(e),n=Math.ceil((0,c.size)(t)/32),r=[];for(let o=0;o"type"in e&&"constructor"===e.type));if(!s)throw new r.AbiConstructorNotFoundError({docsPath:i});if(!("inputs"in s))throw new r.AbiConstructorParamsNotFoundError({docsPath:i});if(!s.inputs||0===s.inputs.length)throw new r.AbiConstructorParamsNotFoundError({docsPath:i});const c=(0,a.encodeAbiParameters)(s.inputs,t);return(0,o.concatHex)([n,c])}},59094:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeErrorResult=void 0;const r=n(4403),o=n(1501),a=n(18546),i=n(24837),s=n(16759),c=n(95481),u="/docs/contract/encodeErrorResult";t.encodeErrorResult=function({abi:e,errorName:t,args:n}){let l=e[0];if(t&&(l=(0,c.getAbiItem)({abi:e,args:n,name:t}),!l))throw new r.AbiErrorNotFoundError(t,{docsPath:u});if("error"!==l.type)throw new r.AbiErrorNotFoundError(void 0,{docsPath:u});const d=(0,s.formatAbiItem)(l),f=(0,a.getFunctionSelector)(d);let h="0x";if(n&&n.length>0){if(!l.inputs)throw new r.AbiErrorInputsNotFoundError(l.name,{docsPath:u});h=(0,i.encodeAbiParameters)(l.inputs,n)}return(0,o.concatHex)([f,h])}},7534:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeEventTopics=void 0;const r=n(4403),o=n(79189),a=n(52387),i=n(79148),s=n(75225),c=n(24837),u=n(16759),l=n(95481);function d({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,s.keccak256)((0,a.toBytes)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new o.FilterTypeNotSupportedError(e.type);return(0,c.encodeAbiParameters)([e],[t])}t.encodeEventTopics=function({abi:e,eventName:t,args:n}){let o=e[0];if(t&&(o=(0,l.getAbiItem)({abi:e,args:n,name:t}),!o))throw new r.AbiEventNotFoundError(t,{docsPath:"/docs/contract/encodeEventTopics"});if("event"!==o.type)throw new r.AbiEventNotFoundError(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const a=(0,u.formatAbiItem)(o),s=(0,i.getEventSelector)(a);let c=[];if(n&&"inputs"in o){const e=o.inputs?.filter((e=>"indexed"in e&&e.indexed)),t=Array.isArray(n)?n:Object.values(n).length>0?e?.map((e=>n[e.name]))??[]:[];t.length>0&&(c=e?.map(((e,n)=>Array.isArray(t[n])?t[n].map(((r,o)=>d({param:e,value:t[n][o]}))):t[n]?d({param:e,value:t[n]}):null))??[])}return[s,...c]}},22836:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFunctionData=void 0;const r=n(4403),o=n(1501),a=n(18546),i=n(24837),s=n(16759),c=n(95481);t.encodeFunctionData=function({abi:e,args:t,functionName:n}){let u=e[0];if(n&&(u=(0,c.getAbiItem)({abi:e,args:t,name:n}),!u))throw new r.AbiFunctionNotFoundError(n,{docsPath:"/docs/contract/encodeFunctionData"});if("function"!==u.type)throw new r.AbiFunctionNotFoundError(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const l=(0,s.formatAbiItem)(u),d=(0,a.getFunctionSelector)(l),f="inputs"in u&&u.inputs?(0,i.encodeAbiParameters)(u.inputs,t??[]):void 0;return(0,o.concatHex)([d,f??"0x"])}},72097:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFunctionResult=void 0;const r=n(4403),o=n(24837),a=n(95481);t.encodeFunctionResult=function({abi:e,functionName:t,result:n}){let i=e[0];if(t&&(i=(0,a.getAbiItem)({abi:e,name:t}),!i))throw new r.AbiFunctionNotFoundError(t,{docsPath:"/docs/contract/encodeFunctionResult"});if("function"!==i.type)throw new r.AbiFunctionNotFoundError(void 0,{docsPath:"/docs/contract/encodeFunctionResult"});if(!i.outputs)throw new r.AbiFunctionOutputsNotFoundError(i.name,{docsPath:"/docs/contract/encodeFunctionResult"});let s=Array.isArray(n)?n:[n];return 0!==i.outputs.length||s[0]||(s=[]),(0,o.encodeAbiParameters)(i.outputs,s)}},33362:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodePacked=void 0;const r=n(4403),o=n(56293),a=n(21041),i=n(1501),s=n(54405),c=n(86308),u=n(27678);function l(e,t,n=!1){if("address"===e){const e=t;if(!(0,a.isAddress)(e))throw new o.InvalidAddressError({address:e});return(0,s.pad)(e.toLowerCase(),{size:n?32:null})}if("string"===e)return(0,c.stringToHex)(t);if("bytes"===e)return t;if("bool"===e)return(0,s.pad)((0,c.boolToHex)(t),{size:n?32:1});const d=e.match(u.integerRegex);if(d){const[e,r,o="256"]=d,a=parseInt(o)/8;return(0,c.numberToHex)(t,{size:n?32:a,signed:"int"===r})}const f=e.match(u.bytesRegex);if(f){const[e,o]=f;if(parseInt(o)!==(t.length-2)/2)throw new r.BytesSizeMismatchError({expectedSize:parseInt(o),givenSize:(t.length-2)/2});return(0,s.pad)(t,{dir:"right",size:n?32:null})}const h=e.match(u.arrayRegex);if(h&&Array.isArray(t)){const[e,n]=h,r=[];for(let o=0;ofunction(e,{includeName:t}){if(e.type.startsWith("tuple"))return`(${o(e.components,{includeName:t})})${e.type.slice("tuple".length)}`;return e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t}))).join(t?", ":","):""}t.formatAbiItem=function(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new r.InvalidDefinitionTypeError(e.type);return`${e.name}(${o(e.inputs,{includeName:t})})`},t.formatAbiParams=o},87541:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiItemWithArgs=void 0;const r=n(58);t.formatAbiItemWithArgs=function({abiItem:e,args:t,includeFunctionName:n=!0,includeName:o=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map(((e,n)=>`${o&&e.name?`${e.name}: `:""}${"object"===typeof t[n]?(0,r.stringify)(t[n]):t[n]}`)).join(", ")})`}},95481:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArgOfType=t.getAbiItem=void 0;const r=n(21041);function o(e,t){const n=typeof e,a=t.type;switch(a){case"address":return(0,r.isAddress)(e);case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:return"tuple"===a&&"components"in t?Object.values(t.components).every(((t,n)=>o(Object.values(e)[n],t))):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(a)?"number"===n||"bigint"===n:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(a)?"string"===n||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(a)&&(Array.isArray(e)&&e.every((e=>o(e,{...t,type:a.replace(/(\[[0-9]{0,}\])$/,"")}))))}}t.getAbiItem=function({abi:e,args:t=[],name:n}){const r=e.filter((e=>"name"in e&&e.name===n));if(0!==r.length){if(1===r.length)return r[0];for(const e of r){if(!("inputs"in e))continue;if(!t||0===t.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(!e.inputs)continue;if(0===e.inputs.length)continue;if(e.inputs.length!==t.length)continue;if(t.every(((t,n)=>{const r="inputs"in e&&e.inputs[n];return!!r&&o(t,r)})))return e}return r[0]}},t.isArgOfType=o},43817:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publicKeyToAddress=t.parseAccount=void 0;var r=n(3975);Object.defineProperty(t,"parseAccount",{enumerable:!0,get:function(){return r.parseAccount}});var o=n(3417);Object.defineProperty(t,"publicKeyToAddress",{enumerable:!0,get:function(){return o.publicKeyToAddress}})},36556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddress=t.checksumAddress=void 0;const r=n(56293),o=n(52387),a=n(75225),i=n(21041);function s(e,t){const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=(0,a.keccak256)((0,o.stringToBytes)(n),"bytes"),i=(t?n.substring(`${t}0x`.length):n).split("");for(let o=0;o<40;o+=2)r[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(15&r[o>>1])>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());return`0x${i.join("")}`}t.checksumAddress=s,t.getAddress=function(e,t){if(!(0,i.isAddress)(e))throw new r.InvalidAddressError({address:e});return s(e,t)}},82668:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCreate2Address=t.getCreateAddress=t.getContractAddress=void 0;const r=n(1501),o=n(43848),a=n(54405),i=n(53462),s=n(52387),c=n(28913),u=n(75225),l=n(36556);function d(e){const t=(0,s.toBytes)((0,l.getAddress)(e.from));let n=(0,s.toBytes)(e.nonce);return 0===n[0]&&(n=new Uint8Array([])),(0,l.getAddress)(`0x${(0,u.keccak256)((0,c.toRlp)([t,n],"bytes")).slice(26)}`)}function f(e){const t=(0,s.toBytes)((0,l.getAddress)(e.from)),n=(0,a.pad)((0,o.isBytes)(e.salt)?e.salt:(0,s.toBytes)(e.salt),{size:32}),c=(0,s.toBytes)((0,u.keccak256)((0,o.isBytes)(e.bytecode)?e.bytecode:(0,s.toBytes)(e.bytecode)));return(0,l.getAddress)((0,i.slice)((0,u.keccak256)((0,r.concat)([(0,s.toBytes)("0xff"),t,n,c])),12))}t.getContractAddress=function(e){return"CREATE2"===e.opcode?f(e):d(e)},t.getCreateAddress=d,t.getCreate2Address=f},21041:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddress=void 0;const n=/^0x[a-fA-F0-9]{40}$/;t.isAddress=function(e){return n.test(e)}},13711:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddressEqual=void 0;const r=n(56293),o=n(21041);t.isAddressEqual=function(e,t){if(!(0,o.isAddress)(e))throw new r.InvalidAddressError({address:e});if(!(0,o.isAddress)(t))throw new r.InvalidAddressError({address:t});return e.toLowerCase()===t.toLowerCase()}},25056:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildRequest=t.isDeterministicError=void 0;const r=n(26456),o=n(72782),a=n(60793),i=n(89514);t.isDeterministicError=e=>"code"in e?-1!==e.code&&-32004!==e.code&&-32005!==e.code&&-32042!==e.code&&-32603!==e.code:!!(e instanceof o.HttpRequestError&&e.status)&&(403!==e.status&&408!==e.status&&413!==e.status&&429!==e.status&&500!==e.status&&502!==e.status&&503!==e.status&&504!==e.status),t.buildRequest=function(e,{retryDelay:n=150,retryCount:s=3}={}){return async c=>(0,i.withRetry)((async()=>{try{return await e(c)}catch(t){const e=t;switch(e.code){case a.ParseRpcError.code:throw new a.ParseRpcError(e);case a.InvalidRequestRpcError.code:throw new a.InvalidRequestRpcError(e);case a.MethodNotFoundRpcError.code:throw new a.MethodNotFoundRpcError(e);case a.InvalidParamsRpcError.code:throw new a.InvalidParamsRpcError(e);case a.InternalRpcError.code:throw new a.InternalRpcError(e);case a.InvalidInputRpcError.code:throw new a.InvalidInputRpcError(e);case a.ResourceNotFoundRpcError.code:throw new a.ResourceNotFoundRpcError(e);case a.ResourceUnavailableRpcError.code:throw new a.ResourceUnavailableRpcError(e);case a.TransactionRejectedRpcError.code:throw new a.TransactionRejectedRpcError(e);case a.MethodNotSupportedRpcError.code:throw new a.MethodNotSupportedRpcError(e);case a.LimitExceededRpcError.code:throw new a.LimitExceededRpcError(e);case a.JsonRpcVersionUnsupportedError.code:throw new a.JsonRpcVersionUnsupportedError(e);case a.UserRejectedRequestError.code:throw new a.UserRejectedRequestError(e);case a.UnauthorizedProviderError.code:throw new a.UnauthorizedProviderError(e);case a.UnsupportedProviderMethodError.code:throw new a.UnsupportedProviderMethodError(e);case a.ProviderDisconnectedError.code:throw new a.ProviderDisconnectedError(e);case a.ChainDisconnectedError.code:throw new a.ChainDisconnectedError(e);case a.SwitchChainError.code:throw new a.SwitchChainError(e);default:if(t instanceof r.BaseError)throw t;throw new a.UnknownRpcError(e)}}}),{delay:({count:e,error:t})=>{if(t&&t instanceof o.HttpRequestError){const e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<!(0,t.isDeterministicError)(e)})}},64045:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ccipFetch=t.offchainLookup=t.offchainLookupAbiItem=t.offchainLookupSignature=void 0;const r=n(11273),o=n(67409),a=n(72782),i=n(31293),s=n(24837),c=n(13711),u=n(1501),l=n(77116),d=n(58);async function f({data:e,sender:t,urls:n}){let r=new Error("An unknown error occurred.");for(let s=0;se)throw new r.ChainDoesNotSupportContract({blockNumber:e,chain:t,contract:{name:n,blockCreated:o.blockCreated}});return o.address}},35914:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractFunctionType=t.extractFunctionParams=t.extractFunctionName=t.extractFunctionParts=void 0;const n=/((function|event)\s)?(.*)(\((.*)\))/;function r(e){const t=e.match(n),r=t?.[2]||void 0,o=t?.[3];return{type:r,name:o,params:t?.[5]||void 0}}t.extractFunctionParts=r,t.extractFunctionName=function(e){return r(e).name},t.extractFunctionParams=function(e){const t=r(e).params?.split(",").map((e=>e.trim().split(" ")));return t?.map((e=>({type:e[0],name:"indexed"===e[1]?e[2]:e[1],..."indexed"===e[1]?{indexed:!0}:{}})))},t.extractFunctionType=function(e){return r(e).type}},1501:function(e,t){"use strict";function n(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function r(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.concatHex=t.concatBytes=t.concat=void 0,t.concat=function(e){return"string"===typeof e[0]?r(e):n(e)},t.concatBytes=n,t.concatHex=r},43848:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBytes=void 0,t.isBytes=function(e){return!!e&&("object"===typeof e&&("BYTES_PER_ELEMENT"in e&&(1===e.BYTES_PER_ELEMENT&&"Uint8Array"===e.constructor.name)))}},56770:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBytesEqual=void 0;const r=n(68995),o=n(41830);t.isBytesEqual=function(e,t){const n=(0,r.isHex)(e)?(0,r.toBytes)(e):e,a=(0,r.isHex)(t)?(0,r.toBytes)(t):t;return(0,o.equalBytes)(n,a)}},77116:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHex=void 0,t.isHex=function(e,{strict:t=!0}={}){return!!e&&("string"===typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")))}},54405:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.padBytes=t.padHex=t.pad=void 0;const r=n(68377);function o(e,{dir:t,size:n=32}={}){if(null===n)return e;const o=e.replace("0x","");if(o.length>2*n)throw new r.SizeExceedsPaddingSizeError({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o["right"===t?"padEnd":"padStart"](2*n,"0")}`}function a(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new r.SizeExceedsPaddingSizeError({size:e.length,targetSize:n,type:"bytes"});const o=new Uint8Array(n);for(let r=0;r0&&t>(0,a.size)(e)-1)throw new r.SliceOffsetOutOfBoundsError({offset:t,position:"start",size:(0,a.size)(e)})}function s(e,t,n){if("number"===typeof t&&"number"===typeof n&&(0,a.size)(e)!==n-t)throw new r.SliceOffsetOutOfBoundsError({offset:n,position:"end",size:(0,a.size)(e)})}function c(e,t,n,{strict:r}={}){i(e,t);const o=e.slice(t,n);return r&&s(o,t,n),o}function u(e,t,n,{strict:r}={}){i(e,t);const o=`0x${e.replace("0x","").slice(2*(t??0),2*(n??e.length))}`;return r&&s(o,t,n),o}t.slice=function(e,t,n,{strict:r}={}){return(0,o.isHex)(e,{strict:!1})?u(e,t,n,{strict:r}):c(e,t,n,{strict:r})},t.sliceBytes=c,t.sliceHex=u},80475:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trim=void 0,t.trim=function(e,{dir:t="left"}={}){let n="string"===typeof e?e.replace("0x",""):e,r=0;for(let o=0;o1||n[0]>1)throw new r.InvalidBytesBooleanError(n);return Boolean(n[0])}function u(e,t={}){"undefined"!==typeof t.size&&(0,a.assertSize)(e,{size:t.size});const n=(0,i.bytesToHex)(e,t);return(0,a.hexToNumber)(n)}function l(e,t={}){let n=e;return"undefined"!==typeof t.size&&((0,a.assertSize)(n,{size:t.size}),n=(0,o.trim)(n,{dir:"right"})),(new TextDecoder).decode(n)}t.fromBytes=function(e,t){const n="string"===typeof t?{to:t}:t,r=n.to;return"number"===r?u(e,n):"bigint"===r?s(e,n):"boolean"===r?c(e,n):"string"===r?l(e,n):(0,i.bytesToHex)(e,n)},t.bytesToBigint=s,t.bytesToBool=c,t.bytesToNumber=u,t.bytesToString=l},57114:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToString=t.hexToNumber=t.hexToBool=t.hexToBigInt=t.fromHex=t.assertSize=void 0;const r=n(26425),o=n(66859),a=n(80475),i=n(52387);function s(e,{size:t}){if((0,o.size)(e)>t)throw new r.SizeOverflowError({givenSize:(0,o.size)(e),maxSize:t})}function c(e,t={}){const{signed:n}=t;t.size&&s(e,{size:t.size});const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2;return r<=(1n<<8n*BigInt(o)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*o,"f")}`)-1n}function u(e,t={}){let n=e;if(t.size&&(s(n,{size:t.size}),n=(0,a.trim)(n)),"0x00"===(0,a.trim)(n))return!1;if("0x01"===(0,a.trim)(n))return!0;throw new r.InvalidHexBooleanError(n)}function l(e,t={}){return Number(c(e,t))}function d(e,t={}){let n=(0,i.hexToBytes)(e);return t.size&&(s(n,{size:t.size}),n=(0,a.trim)(n,{dir:"right"})),(new TextDecoder).decode(n)}t.assertSize=s,t.fromHex=function(e,t){const n="string"===typeof t?{to:t}:t,r=n.to;return"number"===r?l(e,n):"bigint"===r?c(e,n):"string"===r?d(e,n):"boolean"===r?u(e,n):(0,i.hexToBytes)(e,n)},t.hexToBigInt=c,t.hexToBool=u,t.hexToNumber=l,t.hexToString=d},92237:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromRlp=void 0;const r=n(26425),o=n(54328),a=n(52387),i=n(86308);function s(e,t){return Array.isArray(e)?e.map((e=>s(e,t))):"hex"===t?(0,i.bytesToHex)(e):e}function c(e,t=0){if(0===e.length)return[new Uint8Array([]),0];const n=e[t];if(n<=127)return[new Uint8Array([e[t]]),1];if(n<=183){const o=n-128,a=t+1;if(a+o>e.length)throw new r.DataLengthTooShortError({length:a+o,dataLength:e.length});return[e.slice(a,a+o),1+o]}if(n<=191){const a=n-183,i=t+1,s=(0,o.bytesToNumber)(e.slice(i,i+a));if(i+a+s>e.length)throw new r.DataLengthTooShortError({length:a+s,dataLength:e.length-a});return[e.slice(i+a,i+a+s),1+a+s]}let a=0,i=n-192;n>247&&(a=n-247,i=(0,o.bytesToNumber)(e.slice(t+1,t+1+a)));let s=t+1+a;if(s>e.length)throw new r.DataLengthTooShortError({length:s,dataLength:e.length});const u=1+a+i,l=[];for(;st+u)throw new r.OffsetOutOfBoundsError({nextOffset:s,offset:t+u})}return[l,u]}t.fromRlp=function(e,t){const n=function(e){if("string"===typeof e){if(e.length>3&&e.length%2!==0)throw new r.InvalidHexValueError(e);return(0,a.hexToBytes)(e)}return e}(e),[o,i]=c(n);if(it.toString(16).padStart(2,"0")));function s(e,t={}){const n=`0x${Number(e)}`;return"number"===typeof t.size?((0,a.assertSize)(n,{size:t.size}),(0,o.pad)(n,{size:t.size})):n}function c(e,t={}){let n="";for(let o=0;os||ihttps?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,i=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,s=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,c=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function u(e){try{const t=await fetch(e,{method:"HEAD"});if(200===t.status){return t.headers.get("content-type")?.startsWith("image/")}return!1}catch(t){return("object"!==typeof t||"undefined"===typeof t.response)&&(!!globalThis.hasOwnProperty("Image")&&new Promise((t=>{const n=new Image;n.onload=()=>{t(!0)},n.onerror=()=>{t(!1)},n.src=e})))}}function l(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function d({uri:e,gatewayUrls:t}){const n=s.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=l(t?.ipfs,"https://ipfs.io"),u=l(t?.arweave,"https://arweave.net"),d=e.match(a),{protocol:f,subpath:h,target:p,subtarget:m=""}=d?.groups||{},b="ipns:/"===f||"ipns/"===h,g="ipfs:/"===f||"ipfs/"===h||i.test(e);if(e.startsWith("http")&&!b&&!g){let n=e;return t?.arweave&&(n=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:n,isOnChain:!1,isEncoded:!1}}if((b||g)&&p)return{uri:`${r}/${b?"ipns":"ipfs"}/${p}${m}`,isOnChain:!1,isEncoded:!1};if("ar:/"===f&&p)return{uri:`${u}/${p}${m||""}`,isOnChain:!1,isEncoded:!1};let y=e.replace(c,"");if(y.startsWith("e.json()));return await h({gatewayUrls:e,uri:f(n)})}catch{throw new o.EnsAvatarUriResolutionError({uri:t})}},t.parseAvatarUri=h,t.parseNftUri=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,a]=t.split("/"),[i,s]=n.split(":"),[c,u]=r.split(":");if(!i||"eip155"!==i.toLowerCase())throw new o.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!s)throw new o.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!u)throw new o.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!a)throw new o.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!c)throw new o.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:parseInt(s),namespace:c.toLowerCase(),contractAddress:u,tokenID:a}},t.getNftTokenUri=async function(e,{nft:t}){if("erc721"===t.namespace)return(0,r.readContract)(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return(0,r.readContract)(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new o.EnsAvatarUnsupportedNamespaceError({namespace:t.namespace})}},17398:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeLabelhash=void 0,t.encodeLabelhash=function(e){return`[${e.slice(2)}]`}},7367:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodedLabelToLabelhash=void 0;const r=n(50634);t.encodedLabelToLabelhash=function(e){if(66!==e.length)return null;if(0!==e.indexOf("["))return null;if(65!==e.indexOf("]"))return null;const t=`0x${e.slice(1,65)}`;return(0,r.isHex)(t)?t:null}},19662:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNullUniversalResolverError=void 0;const r=n(6049),o=n(26456),a=n(9996);t.isNullUniversalResolverError=function(e,t){if(!(e instanceof o.BaseError))return!1;const n=e.walk((e=>e instanceof a.ContractFunctionRevertedError));return n instanceof a.ContractFunctionRevertedError&&("ResolverNotFound"===n.data?.errorName||("ResolverWildcardNotSupported"===n.data?.errorName||(!!n.reason?.includes("Wildcard on non-extended resolvers is not supported")||"reverse"===t&&n.reason===r.panicReasons[50])))}},41311:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.labelhash=void 0;const r=n(52387),o=n(86308),a=n(75225),i=n(7367);t.labelhash=function(e){const t=new Uint8Array(32).fill(0);return e?(0,i.encodedLabelToLabelhash)(e)||(0,a.keccak256)((0,r.stringToBytes)(e)):(0,o.bytesToHex)(t)}},77863:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namehash=void 0;const r=n(1501),o=n(52387),a=n(86308),i=n(75225),s=n(7367);t.namehash=function(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,a.bytesToHex)(t);const n=e.split(".");for(let a=n.length-1;a>=0;a-=1){const e=(0,s.encodedLabelToLabelhash)(n[a]),c=e?(0,o.toBytes)(e):(0,i.keccak256)((0,o.stringToBytes)(n[a]),"bytes");t=(0,i.keccak256)((0,r.concat)([t,c]),"bytes")}return(0,a.bytesToHex)(t)}},72126:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packetToBytes=void 0;const r=n(52387),o=n(17398),a=n(41311);t.packetToBytes=function(e){const t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);const n=new Uint8Array((0,r.stringToBytes)(t).byteLength+2);let i=0;const s=t.split(".");for(let c=0;c255&&(e=(0,r.stringToBytes)((0,o.encodeLabelhash)((0,a.labelhash)(s[c])))),n[i]=e.length,n.set(e,i+1),i+=e.length+1}return n.byteLength!==i+1?n.slice(0,i+1):n}},10133:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCallError=void 0;const r=n(9996),o=n(53951);t.getCallError=function(e,{docsPath:t,...n}){let a=e;return(0,o.containsNodeError)(e)&&(a=(0,o.getNodeError)(e,n)),new r.CallExecutionError(a,{docsPath:t,...n})}},90042:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContractError=void 0;const r=n(4403),o=n(26456),a=n(9996);t.getContractError=function(e,{abi:t,address:n,args:i,docsPath:s,functionName:c,sender:u}){const{code:l,data:d,message:f,shortMessage:h}=e instanceof a.RawContractError?e:e instanceof o.BaseError?e.walk((e=>"data"in e))||e.walk():{};let p=e;return e instanceof r.AbiDecodingZeroDataError?p=new a.ContractFunctionZeroDataError({functionName:c}):3===l&&(d||f||h)&&(p=new a.ContractFunctionRevertedError({abi:t,data:"object"===typeof d?d.data:d,functionName:c,message:h??f})),new a.ContractFunctionExecutionError(p,{abi:t,args:i,contractAddress:n,docsPath:s,functionName:c,sender:u})}},54141:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEstimateGasError=void 0;const r=n(78966),o=n(53951);t.getEstimateGasError=function(e,{docsPath:t,...n}){let a=e;return(0,o.containsNodeError)(e)&&(a=(0,o.getNodeError)(e,n)),new r.EstimateGasExecutionError(a,{docsPath:t,...n})}},53951:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeError=t.containsNodeError=void 0;const r=n(72695),o=n(72782),a=n(60793);t.containsNodeError=function(e){return e instanceof a.TransactionRejectedRpcError||e instanceof a.InvalidInputRpcError||e instanceof o.RpcRequestError&&e.code===r.ExecutionRevertedError.code},t.getNodeError=function(e,t){const n=e.details.toLowerCase();return r.FeeCapTooHighError.nodeMessage.test(n)?new r.FeeCapTooHighError({cause:e,maxFeePerGas:t?.maxFeePerGas}):r.FeeCapTooLowError.nodeMessage.test(n)?new r.FeeCapTooLowError({cause:e,maxFeePerGas:t?.maxFeePerGas}):r.NonceTooHighError.nodeMessage.test(n)?new r.NonceTooHighError({cause:e,nonce:t?.nonce}):r.NonceTooLowError.nodeMessage.test(n)?new r.NonceTooLowError({cause:e,nonce:t?.nonce}):r.NonceMaxValueError.nodeMessage.test(n)?new r.NonceMaxValueError({cause:e,nonce:t?.nonce}):r.InsufficientFundsError.nodeMessage.test(n)?new r.InsufficientFundsError({cause:e}):r.IntrinsicGasTooHighError.nodeMessage.test(n)?new r.IntrinsicGasTooHighError({cause:e,gas:t?.gas}):r.IntrinsicGasTooLowError.nodeMessage.test(n)?new r.IntrinsicGasTooLowError({cause:e,gas:t?.gas}):r.TransactionTypeNotSupportedError.nodeMessage.test(n)?new r.TransactionTypeNotSupportedError({cause:e}):r.TipAboveFeeCapError.nodeMessage.test(n)?new r.TipAboveFeeCapError({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):n.match(r.ExecutionRevertedError.nodeMessage)||"code"in e.cause&&e.cause?.code===r.ExecutionRevertedError.code?new r.ExecutionRevertedError({cause:e,message:e.cause.details||e.details}):new r.UnknownNodeError({cause:e.cause.cause})}},72533:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionError=void 0;const r=n(70270),o=n(53951);t.getTransactionError=function(e,{docsPath:t,...n}){let a=e;return(0,o.containsNodeError)(e)&&(a=(0,o.getNodeError)(e,n)),new r.TransactionExecutionError(a,{docsPath:t,...n})}},44929:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFilterRequestScope=void 0,t.createFilterRequestScope=function(e,{method:t}){const n={};return"fallback"===e.transport.type&&e.transport.onResponse?.((({method:e,response:r,status:o,transport:a})=>{"success"===o&&t===e&&(n[r]=a.request)})),t=>n[t]||e.request}},23604:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineBlock=t.formatBlock=void 0;const r=n(74373),o=n(1982);function a(e){const t=e.transactions?.map((e=>"string"===typeof e?e:(0,o.formatTransaction)(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}t.formatBlock=a,t.defineBlock=(0,r.defineFormatter)("block",a)},82320:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extract=void 0,t.extract=function(e,{format:t}){return t?Object.keys(t({})).reduce(((t,n)=>(e?.hasOwnProperty(n)&&(t[n]=e[n]),t)),{}):{}}},92736:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatFeeHistory=void 0,t.formatFeeHistory=function(e){return{baseFeePerGas:e.baseFeePerGas.map((e=>BigInt(e))),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map((e=>e.map((e=>BigInt(e)))))}}},74373:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineFormatter=void 0,t.defineFormatter=function(e,t){return({exclude:n,format:r})=>({exclude:n,format:e=>{const o=t(e);if(n)for(const t of n)delete o[t];return{...o,...r(e)}},type:e})}},80330:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLog=void 0,t.formatLog=function(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}},1982:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransaction=t.formatTransaction=t.transactionType=void 0;const r=n(57114),o=n(74373);function a(e){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.hexToNumber)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,r.hexToNumber)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?t.transactionType[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return"legacy"===n.type&&(delete n.accessList,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),"eip2930"===n.type&&(delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n}t.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"},t.formatTransaction=a,t.defineTransaction=(0,o.defineFormatter)("transaction",a)},5840:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransactionReceipt=t.formatTransactionReceipt=void 0;const r=n(57114),o=n(74373),a=n(80330),i=n(1982),s={"0x0":"reverted","0x1":"success"};function c(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>(0,a.formatLog)(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.hexToNumber)(e.transactionIndex):null,status:e.status?s[e.status]:null,type:e.type?i.transactionType[e.type]||e.type:null}}t.formatTransactionReceipt=c,t.defineTransactionReceipt=(0,o.defineFormatter)("transactionReceipt",c)},33270:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransactionRequest=t.formatTransactionRequest=void 0;const r=n(86308),o=n(74373);function a(e){return{...e,gas:"undefined"!==typeof e.gas?(0,r.numberToHex)(e.gas):void 0,gasPrice:"undefined"!==typeof e.gasPrice?(0,r.numberToHex)(e.gasPrice):void 0,maxFeePerGas:"undefined"!==typeof e.maxFeePerGas?(0,r.numberToHex)(e.maxFeePerGas):void 0,maxPriorityFeePerGas:"undefined"!==typeof e.maxPriorityFeePerGas?(0,r.numberToHex)(e.maxPriorityFeePerGas):void 0,nonce:"undefined"!==typeof e.nonce?(0,r.numberToHex)(e.nonce):void 0,value:"undefined"!==typeof e.value?(0,r.numberToHex)(e.value):void 0}}t.formatTransactionRequest=a,t.defineTransactionRequest=(0,o.defineFormatter)("transactionRequest",a)},79148:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventSelector=void 0;const r=n(81887);t.getEventSelector=e=>"string"===typeof e?(0,r.hashFunction)(e):(0,r.hashAbiItem)(e)},18546:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionSelector=void 0;const r=n(53462),o=n(81887);t.getFunctionSelector=e=>"string"===typeof e?(0,r.slice)((0,o.hashFunction)(e),0,4):(0,r.slice)((0,o.hashAbiItem)(e),0,4)},81887:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashAbiItem=t.hashFunction=void 0;const r=n(16759),o=n(35914),a=n(52387),i=n(75225),s=e=>(0,i.keccak256)((0,a.toBytes)(e));t.hashFunction=function(e){const t=(0,o.extractFunctionName)(e),n=(0,o.extractFunctionParams)(e)||[];return s(`${t}(${n.map((({type:e})=>e)).join(",")})`)},t.hashAbiItem=function(e){return s((0,r.formatAbiItem)(e))}},95056:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHash=void 0;const r=n(77116),o=n(66859);t.isHash=function(e){return(0,r.isHex)(e)&&32===(0,o.size)(e)}},75225:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=void 0;const r=n(7217),o=n(77116),a=n(52387),i=n(86308);t.keccak256=function(e,t){const n=t||"hex",s=(0,r.keccak_256)((0,o.isHex)(e,{strict:!1})?(0,a.toBytes)(e):e);return"bytes"===n?s:(0,i.toHex)(s)}},50634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatHex=t.concatBytes=t.concat=t.extractFunctionParts=t.extractFunctionType=t.extractFunctionParams=t.extractFunctionName=t.isAddressEqual=t.isAddress=t.getAddress=t.getCreate2Address=t.getCreateAddress=t.getContractAddress=t.publicKeyToAddress=t.parseAccount=t.formatAbiParams=t.formatAbiItem=t.formatAbiItemWithArgs=t.encodePacked=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.getAbiItem=t.encodeFunctionResult=t.encodeFunctionData=t.encodeEventTopics=t.encodeErrorResult=t.encodeDeployData=t.encodeAbiParameters=t.decodeFunctionResult=t.decodeFunctionData=t.decodeEventLog=t.decodeErrorResult=t.decodeAbiParameters=t.validateTypedData=t.stringify=t.rpc=t.getSocket=t.integerRegex=t.bytesRegex=t.arrayRegex=t.getChainContractAddress=t.defineChain=t.assertCurrentChain=t.offchainLookupSignature=t.offchainLookupAbiItem=t.offchainLookup=t.ccipFetch=t.buildRequest=void 0,t.getEventSelector=t.defineFormatter=t.getTransactionError=t.getEstimateGasError=t.getContractError=t.getCallError=t.getNodeError=t.containsNodeError=t.fromRlp=t.hexToString=t.hexToNumber=t.hexToBigInt=t.hexToBool=t.fromHex=t.fromBytes=t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigint=t.stringToHex=t.numberToHex=t.toHex=t.bytesToHex=t.boolToHex=t.stringToBytes=t.numberToBytes=t.hexToBytes=t.toBytes=t.boolToBytes=t.toRlp=t.extract=t.formatTransactionRequest=t.defineTransactionRequest=t.defineTransactionReceipt=t.formatLog=t.transactionType=t.formatTransaction=t.defineTransaction=t.formatBlock=t.defineBlock=t.trim=t.sliceHex=t.sliceBytes=t.slice=t.size=t.padHex=t.padBytes=t.pad=t.isHex=t.isBytes=void 0,t.parseGwei=t.parseEther=t.parseUnits=t.formatUnits=t.formatGwei=t.formatEther=t.serializeAccessList=t.serializeTransaction=t.prepareRequest=t.parseTransaction=t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=t.assertRequest=t.getTransactionType=t.getSerializedTransactionType=t.hashMessage=t.verifyTypedData=t.verifyMessage=t.recoverTypedDataAddress=t.recoverPublicKey=t.recoverMessageAddress=t.recoverAddress=t.hashTypedData=t.keccak256=t.isHash=t.getFunctionSelector=void 0;var r=n(25056);Object.defineProperty(t,"buildRequest",{enumerable:!0,get:function(){return r.buildRequest}});var o=n(64045);Object.defineProperty(t,"ccipFetch",{enumerable:!0,get:function(){return o.ccipFetch}}),Object.defineProperty(t,"offchainLookup",{enumerable:!0,get:function(){return o.offchainLookup}}),Object.defineProperty(t,"offchainLookupAbiItem",{enumerable:!0,get:function(){return o.offchainLookupAbiItem}}),Object.defineProperty(t,"offchainLookupSignature",{enumerable:!0,get:function(){return o.offchainLookupSignature}});var a=n(47797);Object.defineProperty(t,"assertCurrentChain",{enumerable:!0,get:function(){return a.assertCurrentChain}}),Object.defineProperty(t,"defineChain",{enumerable:!0,get:function(){return a.defineChain}}),Object.defineProperty(t,"getChainContractAddress",{enumerable:!0,get:function(){return a.getChainContractAddress}});var i=n(27678);Object.defineProperty(t,"arrayRegex",{enumerable:!0,get:function(){return i.arrayRegex}}),Object.defineProperty(t,"bytesRegex",{enumerable:!0,get:function(){return i.bytesRegex}}),Object.defineProperty(t,"integerRegex",{enumerable:!0,get:function(){return i.integerRegex}});var s=n(82530);Object.defineProperty(t,"getSocket",{enumerable:!0,get:function(){return s.getSocket}}),Object.defineProperty(t,"rpc",{enumerable:!0,get:function(){return s.rpc}});var c=n(58);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}});var u=n(42586);Object.defineProperty(t,"validateTypedData",{enumerable:!0,get:function(){return u.validateTypedData}});var l=n(14722);Object.defineProperty(t,"decodeAbiParameters",{enumerable:!0,get:function(){return l.decodeAbiParameters}});var d=n(31293);Object.defineProperty(t,"decodeErrorResult",{enumerable:!0,get:function(){return d.decodeErrorResult}});var f=n(81912);Object.defineProperty(t,"decodeEventLog",{enumerable:!0,get:function(){return f.decodeEventLog}});var h=n(14338);Object.defineProperty(t,"decodeFunctionData",{enumerable:!0,get:function(){return h.decodeFunctionData}});var p=n(76286);Object.defineProperty(t,"decodeFunctionResult",{enumerable:!0,get:function(){return p.decodeFunctionResult}});var m=n(24837);Object.defineProperty(t,"encodeAbiParameters",{enumerable:!0,get:function(){return m.encodeAbiParameters}});var b=n(77833);Object.defineProperty(t,"encodeDeployData",{enumerable:!0,get:function(){return b.encodeDeployData}});var g=n(59094);Object.defineProperty(t,"encodeErrorResult",{enumerable:!0,get:function(){return g.encodeErrorResult}});var y=n(7534);Object.defineProperty(t,"encodeEventTopics",{enumerable:!0,get:function(){return y.encodeEventTopics}});var v=n(22836);Object.defineProperty(t,"encodeFunctionData",{enumerable:!0,get:function(){return v.encodeFunctionData}});var w=n(72097);Object.defineProperty(t,"encodeFunctionResult",{enumerable:!0,get:function(){return w.encodeFunctionResult}});var E=n(95481);Object.defineProperty(t,"getAbiItem",{enumerable:!0,get:function(){return E.getAbiItem}});var A=n(48661);Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return A.parseAbi}}),Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return A.parseAbiItem}}),Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return A.parseAbiParameter}}),Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return A.parseAbiParameters}});var x=n(33362);Object.defineProperty(t,"encodePacked",{enumerable:!0,get:function(){return x.encodePacked}});var P=n(87541);Object.defineProperty(t,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return P.formatAbiItemWithArgs}});var C=n(16759);Object.defineProperty(t,"formatAbiItem",{enumerable:!0,get:function(){return C.formatAbiItem}}),Object.defineProperty(t,"formatAbiParams",{enumerable:!0,get:function(){return C.formatAbiParams}});var j=n(3975);Object.defineProperty(t,"parseAccount",{enumerable:!0,get:function(){return j.parseAccount}});var I=n(3417);Object.defineProperty(t,"publicKeyToAddress",{enumerable:!0,get:function(){return I.publicKeyToAddress}});var O=n(82668);Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return O.getContractAddress}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return O.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return O.getCreate2Address}});var T=n(36556);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return T.getAddress}});var S=n(21041);Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return S.isAddress}});var B=n(13711);Object.defineProperty(t,"isAddressEqual",{enumerable:!0,get:function(){return B.isAddressEqual}});var k=n(35914);Object.defineProperty(t,"extractFunctionName",{enumerable:!0,get:function(){return k.extractFunctionName}}),Object.defineProperty(t,"extractFunctionParams",{enumerable:!0,get:function(){return k.extractFunctionParams}}),Object.defineProperty(t,"extractFunctionType",{enumerable:!0,get:function(){return k.extractFunctionType}}),Object.defineProperty(t,"extractFunctionParts",{enumerable:!0,get:function(){return k.extractFunctionParts}});var _=n(1501);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return _.concat}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return _.concatBytes}}),Object.defineProperty(t,"concatHex",{enumerable:!0,get:function(){return _.concatHex}});var N=n(43848);Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return N.isBytes}});var M=n(77116);Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return M.isHex}});var R=n(54405);Object.defineProperty(t,"pad",{enumerable:!0,get:function(){return R.pad}}),Object.defineProperty(t,"padBytes",{enumerable:!0,get:function(){return R.padBytes}}),Object.defineProperty(t,"padHex",{enumerable:!0,get:function(){return R.padHex}});var F=n(66859);Object.defineProperty(t,"size",{enumerable:!0,get:function(){return F.size}});var U=n(53462);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return U.slice}}),Object.defineProperty(t,"sliceBytes",{enumerable:!0,get:function(){return U.sliceBytes}}),Object.defineProperty(t,"sliceHex",{enumerable:!0,get:function(){return U.sliceHex}});var L=n(80475);Object.defineProperty(t,"trim",{enumerable:!0,get:function(){return L.trim}});var D=n(23604);Object.defineProperty(t,"defineBlock",{enumerable:!0,get:function(){return D.defineBlock}}),Object.defineProperty(t,"formatBlock",{enumerable:!0,get:function(){return D.formatBlock}});var q=n(1982);Object.defineProperty(t,"defineTransaction",{enumerable:!0,get:function(){return q.defineTransaction}}),Object.defineProperty(t,"formatTransaction",{enumerable:!0,get:function(){return q.formatTransaction}}),Object.defineProperty(t,"transactionType",{enumerable:!0,get:function(){return q.transactionType}});var H=n(80330);Object.defineProperty(t,"formatLog",{enumerable:!0,get:function(){return H.formatLog}});var z=n(5840);Object.defineProperty(t,"defineTransactionReceipt",{enumerable:!0,get:function(){return z.defineTransactionReceipt}});var G=n(33270);Object.defineProperty(t,"defineTransactionRequest",{enumerable:!0,get:function(){return G.defineTransactionRequest}}),Object.defineProperty(t,"formatTransactionRequest",{enumerable:!0,get:function(){return G.formatTransactionRequest}});var $=n(82320);Object.defineProperty(t,"extract",{enumerable:!0,get:function(){return $.extract}});var W=n(28913);Object.defineProperty(t,"toRlp",{enumerable:!0,get:function(){return W.toRlp}});var K=n(52387);Object.defineProperty(t,"boolToBytes",{enumerable:!0,get:function(){return K.boolToBytes}}),Object.defineProperty(t,"toBytes",{enumerable:!0,get:function(){return K.toBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return K.hexToBytes}}),Object.defineProperty(t,"numberToBytes",{enumerable:!0,get:function(){return K.numberToBytes}}),Object.defineProperty(t,"stringToBytes",{enumerable:!0,get:function(){return K.stringToBytes}});var Q=n(86308);Object.defineProperty(t,"boolToHex",{enumerable:!0,get:function(){return Q.boolToHex}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return Q.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return Q.toHex}}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return Q.numberToHex}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return Q.stringToHex}});var V=n(54328);Object.defineProperty(t,"bytesToBigint",{enumerable:!0,get:function(){return V.bytesToBigint}}),Object.defineProperty(t,"bytesToBool",{enumerable:!0,get:function(){return V.bytesToBool}}),Object.defineProperty(t,"bytesToNumber",{enumerable:!0,get:function(){return V.bytesToNumber}}),Object.defineProperty(t,"bytesToString",{enumerable:!0,get:function(){return V.bytesToString}}),Object.defineProperty(t,"fromBytes",{enumerable:!0,get:function(){return V.fromBytes}});var J=n(57114);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return J.fromHex}}),Object.defineProperty(t,"hexToBool",{enumerable:!0,get:function(){return J.hexToBool}}),Object.defineProperty(t,"hexToBigInt",{enumerable:!0,get:function(){return J.hexToBigInt}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return J.hexToNumber}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return J.hexToString}});var Y=n(92237);Object.defineProperty(t,"fromRlp",{enumerable:!0,get:function(){return Y.fromRlp}});var Z=n(53951);Object.defineProperty(t,"containsNodeError",{enumerable:!0,get:function(){return Z.containsNodeError}}),Object.defineProperty(t,"getNodeError",{enumerable:!0,get:function(){return Z.getNodeError}});var X=n(10133);Object.defineProperty(t,"getCallError",{enumerable:!0,get:function(){return X.getCallError}});var ee=n(90042);Object.defineProperty(t,"getContractError",{enumerable:!0,get:function(){return ee.getContractError}});var te=n(54141);Object.defineProperty(t,"getEstimateGasError",{enumerable:!0,get:function(){return te.getEstimateGasError}});var ne=n(72533);Object.defineProperty(t,"getTransactionError",{enumerable:!0,get:function(){return ne.getTransactionError}});var re=n(74373);Object.defineProperty(t,"defineFormatter",{enumerable:!0,get:function(){return re.defineFormatter}});var oe=n(79148);Object.defineProperty(t,"getEventSelector",{enumerable:!0,get:function(){return oe.getEventSelector}});var ae=n(18546);Object.defineProperty(t,"getFunctionSelector",{enumerable:!0,get:function(){return ae.getFunctionSelector}});var ie=n(95056);Object.defineProperty(t,"isHash",{enumerable:!0,get:function(){return ie.isHash}});var se=n(75225);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return se.keccak256}});var ce=n(70834);Object.defineProperty(t,"hashTypedData",{enumerable:!0,get:function(){return ce.hashTypedData}});var ue=n(34159);Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return ue.recoverAddress}});var le=n(77753);Object.defineProperty(t,"recoverMessageAddress",{enumerable:!0,get:function(){return le.recoverMessageAddress}});var de=n(57275);Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return de.recoverPublicKey}});var fe=n(80206);Object.defineProperty(t,"recoverTypedDataAddress",{enumerable:!0,get:function(){return fe.recoverTypedDataAddress}});var he=n(19338);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return he.verifyMessage}});var pe=n(92774);Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return pe.verifyTypedData}});var me=n(67475);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return me.hashMessage}});var be=n(19768);Object.defineProperty(t,"getSerializedTransactionType",{enumerable:!0,get:function(){return be.getSerializedTransactionType}});var ge=n(76547);Object.defineProperty(t,"getTransactionType",{enumerable:!0,get:function(){return ge.getTransactionType}});var ye=n(5434);Object.defineProperty(t,"assertRequest",{enumerable:!0,get:function(){return ye.assertRequest}});var ve=n(26825);Object.defineProperty(t,"assertTransactionEIP1559",{enumerable:!0,get:function(){return ve.assertTransactionEIP1559}}),Object.defineProperty(t,"assertTransactionEIP2930",{enumerable:!0,get:function(){return ve.assertTransactionEIP2930}}),Object.defineProperty(t,"assertTransactionLegacy",{enumerable:!0,get:function(){return ve.assertTransactionLegacy}});var we=n(53858);Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return we.parseTransaction}});var Ee=n(40623);Object.defineProperty(t,"prepareRequest",{enumerable:!0,get:function(){return Ee.prepareRequest}});var Ae=n(52932);Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return Ae.serializeTransaction}});var xe=n(99435);Object.defineProperty(t,"serializeAccessList",{enumerable:!0,get:function(){return xe.serializeAccessList}});var Pe=n(90686);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return Pe.formatEther}});var Ce=n(22386);Object.defineProperty(t,"formatGwei",{enumerable:!0,get:function(){return Ce.formatGwei}});var je=n(88162);Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return je.formatUnits}});var Ie=n(73956);Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return Ie.parseUnits}});var Oe=n(39118);Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return Oe.parseEther}});var Te=n(31187);Object.defineProperty(t,"parseGwei",{enumerable:!0,get:function(){return Te.parseGwei}})},36999:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observe=t.cleanupCache=t.listenersCache=void 0,t.listenersCache=new Map,t.cleanupCache=new Map;let n=0;t.observe=function(e,r,o){const a=++n,i=()=>t.listenersCache.get(e)||[],s=()=>{const n=t.cleanupCache.get(e);1===i().length&&n&&n(),(()=>{const n=i();t.listenersCache.set(e,n.filter((e=>e.id!==a)))})()},c=i();if(t.listenersCache.set(e,[...c,{id:a,fns:r}]),c&&c.length>0)return s;const u={};for(const t in r)u[t]=(...e)=>{const n=i();0!==n.length&&n.forEach((n=>n.fns[t]?.(...e)))};const l=o(u);return"function"===typeof l&&t.cleanupCache.set(e,l),s}},7760:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.poll=void 0;const r=n(78967);t.poll=function(e,{emitOnBegin:t,initialWaitTime:n,interval:o}){let a=!0;const i=()=>a=!1;return(async()=>{let s;t&&(s=await e({unpoll:i}));const c=await(n?.(s))??o;await(0,r.wait)(c);const u=async()=>{a&&(await e({unpoll:i}),await(0,r.wait)(o),u())};u()})(),i}},48170:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBatchScheduler=void 0;const n=new Map;t.createBatchScheduler=function({fn:e,id:t,shouldSplitBatch:r,wait:o=0}){const a=async()=>{const t=s();i();const n=t.map((({args:e})=>e));0!==n.length&&e(n).then((e=>{t.forEach((({pendingPromise:t},n)=>t.resolve?.([e[n],e])))})).catch((e=>{t.forEach((({pendingPromise:t})=>t.reject?.(e)))}))},i=()=>n.delete(t),s=()=>n.get(t)||[],c=e=>n.set(t,[...s(),e]);return{flush:i,async schedule(e){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n})),i=r?.([...s().map((({args:e})=>e)),e]);i&&a();return s().length>0?(c({args:e,pendingPromise:t}),n):(c({args:e,pendingPromise:t}),setTimeout(a,o),n)}}}},38447:function(e,t){"use strict";function n(e){const n=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:n=>t.set(e,n)}),r=n(e,t.promiseCache),o=n(e,t.responseCache);return{clear:()=>{r.clear(),o.clear()},promise:r,response:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.withCache=t.getCache=t.responseCache=t.promiseCache=void 0,t.promiseCache=new Map,t.responseCache=new Map,t.getCache=n,t.withCache=async function(e,{cacheKey:t,cacheTime:r=1/0}){const o=n(t),a=o.response.get();if(a&&r>0){if((new Date).getTime()-a.created.getTime()!0)}={}){return new Promise(((a,i)=>{const s=async({count:c=0}={})=>{try{const t=await e();a(t)}catch(u){if(c{const n="function"===typeof t?t({count:c,error:e}):t;n&&await(0,r.wait)(n),s({count:c+1})})({error:u});i(u)}};s()}))}},64290:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withTimeout=void 0,t.withTimeout=function(e,{errorInstance:t,timeout:n,signal:r}){return new Promise(((o,a)=>{(async()=>{let i;try{const s=new AbortController;n>0&&(i=setTimeout((()=>{r?s.abort():a(t)}),n)),o(await e({signal:s?.signal}))}catch(s){"AbortError"===s.name&&a(t),a(s)}finally{clearTimeout(i)}})()}))}},27678:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.integerRegex=t.bytesRegex=t.arrayRegex=void 0,t.arrayRegex=/^(.*)\[([0-9]*)\]$/,t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/},82530:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rpc=t.getSocket=void 0;const r=n(72782),o=n(48170),a=n(64290),i=n(58);let s=0;const c=new Map;t.getSocket=async function(e){const t=new URL(e),r=t.toString();let a=c.get(r);if(a)return a;const{schedule:i}=(0,o.createBatchScheduler)({id:r,fn:async()=>{let e=await n.e(5289).then(n.bind(n,55289));e=e.default?.constructor?e.default:e.WebSocket;const o=new e(t),i=new Map,s=new Map,u=({data:e})=>{const t=JSON.parse(e),n="eth_subscription"===t.method,r=n?t.params.subscription:t.id,o=n?s:i,a=o.get(r);a&&a({data:e}),n||o.delete(r)},l=()=>{c.delete(r),o.removeEventListener("close",l),o.removeEventListener("message",u)};return o.addEventListener("close",l),o.addEventListener("message",u),o.readyState===e.CONNECTING&&await new Promise(((e,t)=>{o&&(o.onopen=e,o.onerror=t)})),a=Object.assign(o,{requests:i,subscriptions:s}),c.set(r,a),[a]}}),[s,[u]]=await i();return u},t.rpc={http:async function(e,{body:t,fetchOptions:n={},timeout:o=1e4}){const{headers:c,method:u,signal:l}=n;try{const d=await(0,a.withTimeout)((async({signal:r})=>await fetch(e,{...n,body:Array.isArray(t)?(0,i.stringify)(t.map((e=>({jsonrpc:"2.0",id:s++,...e})))):(0,i.stringify)({jsonrpc:"2.0",id:s++,...t}),headers:{...c,"Content-Type":"application/json"},method:u||"POST",signal:l||(o>0?r:void 0)})),{errorInstance:new r.TimeoutError({body:t,url:e}),timeout:o,signal:!0});let f;if(f=d.headers.get("Content-Type")?.startsWith("application/json")?await d.json():await d.text(),!d.ok)throw new r.HttpRequestError({body:t,details:(0,i.stringify)(f.error)||d.statusText,headers:d.headers,status:d.status,url:e});return f}catch(d){if(d instanceof r.HttpRequestError)throw d;if(d instanceof r.TimeoutError)throw d;throw new r.HttpRequestError({body:t,details:d.message,url:e})}},webSocket:function(e,{body:t,onResponse:n}){if(e.readyState===e.CLOSED||e.readyState===e.CLOSING)throw new r.WebSocketRequestError({body:t,url:e.url,details:"Socket is closed."});const o=s++,a=({data:r})=>{const i=JSON.parse(r);"number"===typeof i.id&&o!==i.id||(n?.(i),"eth_subscribe"===t.method&&"string"===typeof i.result&&e.subscriptions.set(i.result,a),"eth_unsubscribe"===t.method&&e.subscriptions.delete(t.params?.[0]))};return e.requests.set(o,a),e.send(JSON.stringify({jsonrpc:"2.0",...t,id:o})),e},webSocketAsync:async function(e,{body:n,timeout:o=1e4}){return(0,a.withTimeout)((()=>new Promise((r=>t.rpc.webSocket(e,{body:n,onResponse:r})))),{errorInstance:new r.TimeoutError({body:n,url:e.url}),timeout:o})}}},67475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashMessage=void 0;const r=n(1501),o=n(52387),a=n(75225);t.hashMessage=function(e,t){const n="string"===typeof e?(0,o.stringToBytes)(e):e.raw instanceof Uint8Array?e.raw:(0,o.toBytes)(e.raw),i=(0,o.stringToBytes)(`\x19Ethereum Signed Message:\n${n.length}`);return(0,a.keccak256)((0,r.concat)([i,n]),t)}},70834:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashTypedData=void 0;const r=n(24837),o=n(1501),a=n(86308),i=n(75225),s=n(42586);function c({data:e,primaryType:t,types:n}){const r=u({data:e,primaryType:t,types:n});return(0,i.keccak256)(r)}function u({data:e,primaryType:t,types:n}){const o=[{type:"bytes32"}],a=[l({primaryType:t,types:n})];for(const r of n[t]){const[t,i]=f({types:n,name:r.name,type:r.type,value:e[r.name]});o.push(t),a.push(i)}return(0,r.encodeAbiParameters)(o,a)}function l({primaryType:e,types:t}){const n=(0,a.toHex)(function({primaryType:e,types:t}){let n="";const r=d({primaryType:e,types:t});r.delete(e);const o=[e,...Array.from(r).sort()];for(const a of o)n+=`${a}(${t[a].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`;return n}({primaryType:e,types:t}));return(0,i.keccak256)(n)}function d({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u)?.[0];if(n.has(r)||void 0===t[r])return n;n.add(r);for(const o of t[r])d({primaryType:o.type,types:t},n);return n}function f({types:e,name:t,type:n,value:o}){if(void 0!==e[n])return[{type:"bytes32"},(0,i.keccak256)(u({data:o,primaryType:n,types:e}))];if("bytes"===n){return o=`0x${(o.length%2?"0":"")+o.slice(2)}`,[{type:"bytes32"},(0,i.keccak256)(o)]}if("string"===n)return[{type:"bytes32"},(0,i.keccak256)((0,a.toHex)(o))];if(n.lastIndexOf("]")===n.length-1){const a=n.slice(0,n.lastIndexOf("[")),s=o.map((n=>f({name:t,type:a,types:e,value:n})));return[{type:"bytes32"},(0,i.keccak256)((0,r.encodeAbiParameters)(s.map((([e])=>e)),s.map((([,e])=>e))))]}return[{type:n},o]}t.hashTypedData=function({domain:e,message:t,primaryType:n,types:r}){const a="undefined"===typeof e?{}:e,u={EIP712Domain:["string"===typeof a?.name&&{name:"name",type:"string"},a?.version&&{name:"version",type:"string"},"number"===typeof a?.chainId&&{name:"chainId",type:"uint256"},a?.verifyingContract&&{name:"verifyingContract",type:"address"},a?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...r};(0,s.validateTypedData)({domain:a,message:t,primaryType:n,types:u});const l=["0x1901"];return a&&l.push(function({domain:e,types:t}){return c({data:e,primaryType:"EIP712Domain",types:t})}({domain:a,types:u})),"EIP712Domain"!==n&&l.push(c({data:t,primaryType:n,types:u})),(0,i.keccak256)((0,o.concat)(l))}},91281:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToSignature=void 0;const r=n(20050),o=n(86308);t.hexToSignature=function(e){const{r:t,s:n}=r.secp256k1.Signature.fromCompact(e.slice(2,130)),a=BigInt(`0x${e.slice(130)}`);return{r:(0,o.numberToHex)(t),s:(0,o.numberToHex)(n),v:a}}},34159:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAddress=void 0;const r=n(3417),o=n(57275);t.recoverAddress=async function({hash:e,signature:t}){return(0,r.publicKeyToAddress)(await(0,o.recoverPublicKey)({hash:e,signature:t}))}},77753:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverMessageAddress=void 0;const r=n(67475),o=n(34159);t.recoverMessageAddress=async function({message:e,signature:t}){return(0,o.recoverAddress)({hash:(0,r.hashMessage)(e),signature:t})}},57275:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverPublicKey=void 0;const r=n(77116),o=n(57114),a=n(86308);t.recoverPublicKey=async function({hash:e,signature:t}){const i=(0,r.isHex)(t)?t:(0,a.toHex)(t),s=(0,r.isHex)(e)?e:(0,a.toHex)(e);let c=(0,o.hexToNumber)(`0x${i.slice(130)}`);0!==c&&1!==c||(c+=27);const{secp256k1:u}=await n.e(8824).then(n.bind(n,78824));return`0x${u.Signature.fromCompact(i.substring(2,130)).addRecoveryBit(c-27).recoverPublicKey(s.substring(2)).toHex(!1)}`}},80206:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedDataAddress=void 0;const r=n(70834),o=n(34159);t.recoverTypedDataAddress=async function({domain:e,message:t,primaryType:n,signature:a,types:i}){return(0,o.recoverAddress)({hash:(0,r.hashTypedData)({domain:e,message:t,primaryType:n,types:i}),signature:a})}},24366:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signatureToHex=void 0;const r=n(20050),o=n(57114),a=n(86308);t.signatureToHex=function({r:e,s:t,v:n}){return`0x${new r.secp256k1.Signature((0,o.hexToBigInt)(e),(0,o.hexToBigInt)(t)).toCompactHex()}${(0,a.toHex)(n).slice(2)}`}},19338:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=void 0;const r=n(36556),o=n(13711),a=n(77753);t.verifyMessage=async function({address:e,message:t,signature:n}){return(0,o.isAddressEqual)((0,r.getAddress)(e),await(0,a.recoverMessageAddress)({message:t,signature:n}))}},92774:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=void 0;const r=n(36556),o=n(13711),a=n(80206);t.verifyTypedData=async function({address:e,domain:t,message:n,primaryType:i,signature:s,types:c}){return(0,o.isAddressEqual)((0,r.getAddress)(e),await(0,a.recoverTypedDataAddress)({domain:t,message:n,primaryType:i,signature:s,types:c}))}},58:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0;t.stringify=(e,t,n)=>JSON.stringify(e,((e,n)=>{const r="bigint"===typeof n?n.toString():n;return"function"===typeof t?t(e,r):r}),n)},5434:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertRequest=void 0;const r=n(3975),o=n(56293),a=n(72695),i=n(70270),s=n(21041);t.assertRequest=function(e){const{account:t,gasPrice:n,maxFeePerGas:c,maxPriorityFeePerGas:u,to:l}=e,d=t?(0,r.parseAccount)(t):void 0;if(d&&!(0,s.isAddress)(d.address))throw new o.InvalidAddressError({address:d.address});if(l&&!(0,s.isAddress)(l))throw new o.InvalidAddressError({address:l});if("undefined"!==typeof n&&("undefined"!==typeof c||"undefined"!==typeof u))throw new i.FeeConflictError;if(c&&c>2n**256n-1n)throw new a.FeeCapTooHighError({maxFeePerGas:c});if(u&&c&&u>c)throw new a.TipAboveFeeCapError({maxFeePerGas:c,maxPriorityFeePerGas:u})}},26825:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=void 0;const r=n(56293),o=n(26456),a=n(91363),i=n(72695),s=n(21041);t.assertTransactionEIP1559=function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:c,maxFeePerGas:u,to:l}=e;if(t<=0)throw new a.InvalidChainIdError({chainId:t});if(l&&!(0,s.isAddress)(l))throw new r.InvalidAddressError({address:l});if(c)throw new o.BaseError("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(u&&u>2n**256n-1n)throw new i.FeeCapTooHighError({maxFeePerGas:u});if(n&&u&&n>u)throw new i.TipAboveFeeCapError({maxFeePerGas:u,maxPriorityFeePerGas:n})},t.assertTransactionEIP2930=function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:c,maxFeePerGas:u,to:l}=e;if(t<=0)throw new a.InvalidChainIdError({chainId:t});if(l&&!(0,s.isAddress)(l))throw new r.InvalidAddressError({address:l});if(n||u)throw new o.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(c&&c>2n**256n-1n)throw new i.FeeCapTooHighError({maxFeePerGas:c})},t.assertTransactionLegacy=function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:c,maxFeePerGas:u,to:l,accessList:d}=e;if(l&&!(0,s.isAddress)(l))throw new r.InvalidAddressError({address:l});if("undefined"!==typeof t&&t<=0)throw new a.InvalidChainIdError({chainId:t});if(n||u)throw new o.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(c&&c>2n**256n-1n)throw new i.FeeCapTooHighError({maxFeePerGas:c});if(d)throw new o.BaseError("`accessList` is not a valid Legacy Transaction attribute.")}},19768:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSerializedTransactionType=void 0;const r=n(70270),o=n(53462),a=n(57114);t.getSerializedTransactionType=function(e){const t=(0,o.sliceHex)(e,0,1);if("0x02"===t)return"eip1559";if("0x01"===t)return"eip2930";if("0x"!==t&&(0,a.hexToNumber)(t)>=192)return"legacy";throw new r.InvalidSerializedTransactionTypeError({serializedType:t})}},76547:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionType=void 0;const r=n(70270);t.getTransactionType=function(e){if(e.type)return e.type;if("undefined"!==typeof e.maxFeePerGas||"undefined"!==typeof e.maxPriorityFeePerGas)return"eip1559";if("undefined"!==typeof e.gasPrice)return"undefined"!==typeof e.accessList?"eip2930":"legacy";throw new r.InvalidSerializableTransactionError({transaction:e})}},53858:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTransaction=void 0;const r=n(56293),o=n(70270),a=n(21041),i=n(77116),s=n(54405),c=n(80475),u=n(57114),l=n(92237),d=n(95056),f=n(26825),h=n(19768);function p(e){const t=[];for(let n=0;n(0,d.isHash)(e)?e:(0,c.trim)(e)))})}return t}function m(e){const t=e.slice(-3),n="0x"===t[0]||0n===(0,u.hexToBigInt)(t[0])?27n:28n;return{r:(0,s.padHex)(t[1],{size:32}),s:(0,s.padHex)(t[2],{size:32}),v:n,yParity:27n===n?0:1}}t.parseTransaction=function(e){const t=(0,h.getSerializedTransactionType)(e);return"eip1559"===t?function(e){const t=(0,l.fromRlp)(`0x${e.slice(4)}`,"hex"),[n,r,a,s,c,d,h,b,g,y,v,w]=t;if(9!==t.length&&12!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{chainId:n,nonce:r,maxPriorityFeePerGas:a,maxFeePerGas:s,gas:c,to:d,value:h,data:b,accessList:g,...t.length>9?{v:y,r:v,s:w}:{}},serializedTransaction:e,type:"eip1559"});const E={chainId:(0,u.hexToNumber)(n),type:"eip1559"};(0,i.isHex)(d)&&"0x"!==d&&(E.to=d);(0,i.isHex)(c)&&"0x"!==c&&(E.gas=(0,u.hexToBigInt)(c));(0,i.isHex)(b)&&"0x"!==b&&(E.data=b);(0,i.isHex)(r)&&"0x"!==r&&(E.nonce=(0,u.hexToNumber)(r));(0,i.isHex)(h)&&"0x"!==h&&(E.value=(0,u.hexToBigInt)(h));(0,i.isHex)(s)&&"0x"!==s&&(E.maxFeePerGas=(0,u.hexToBigInt)(s));(0,i.isHex)(a)&&"0x"!==a&&(E.maxPriorityFeePerGas=(0,u.hexToBigInt)(a));0!==g.length&&"0x"!==g&&(E.accessList=p(g));(0,f.assertTransactionEIP1559)(E);return{...12===t.length?m(t):void 0,...E}}(e):"eip2930"===t?function(e){const t=(0,l.fromRlp)(`0x${e.slice(4)}`,"hex"),[n,r,a,s,c,d,h,b,g,y,v]=t;if(8!==t.length&&11!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{chainId:n,nonce:r,gasPrice:a,gas:s,to:c,value:d,data:h,accessList:b,...t.length>8?{v:g,r:y,s:v}:{}},serializedTransaction:e,type:"eip2930"});const w={chainId:(0,u.hexToNumber)(n),type:"eip2930"};(0,i.isHex)(c)&&"0x"!==c&&(w.to=c);(0,i.isHex)(s)&&"0x"!==s&&(w.gas=(0,u.hexToBigInt)(s));(0,i.isHex)(h)&&"0x"!==h&&(w.data=h);(0,i.isHex)(r)&&"0x"!==r&&(w.nonce=(0,u.hexToNumber)(r));(0,i.isHex)(d)&&"0x"!==d&&(w.value=(0,u.hexToBigInt)(d));(0,i.isHex)(a)&&"0x"!==a&&(w.gasPrice=(0,u.hexToBigInt)(a));0!==b.length&&"0x"!==b&&(w.accessList=p(b));(0,f.assertTransactionEIP2930)(w);return{...11===t.length?m(t):void 0,...w}}(e):function(e){const t=(0,l.fromRlp)(e,"hex"),[n,r,a,s,c,d,h,p,m]=t;if(6!==t.length&&9!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{nonce:n,gasPrice:r,gas:a,to:s,value:c,data:d,...t.length>6?{v:h,r:p,s:m}:{}},serializedTransaction:e,type:"legacy"});const b={type:"legacy"};(0,i.isHex)(s)&&"0x"!==s&&(b.to=s);(0,i.isHex)(a)&&"0x"!==a&&(b.gas=(0,u.hexToBigInt)(a));(0,i.isHex)(d)&&"0x"!==d&&(b.data=d);(0,i.isHex)(n)&&"0x"!==n&&(b.nonce=(0,u.hexToNumber)(n));(0,i.isHex)(c)&&"0x"!==c&&(b.value=(0,u.hexToBigInt)(c));(0,i.isHex)(r)&&"0x"!==r&&(b.gasPrice=(0,u.hexToBigInt)(r));if((0,f.assertTransactionLegacy)(b),6===t.length)return b;const g=(0,i.isHex)(h)&&"0x"!==h?(0,u.hexToBigInt)(h):0n;if("0x"===m&&"0x"===p)return g>0&&(b.chainId=Number(g)),b;const y=g,v=Number((y-35n)/2n);if(v>0)b.chainId=v;else if(27n!==y&&28n!==y)throw new o.InvalidLegacyVError({v:y});return b.v=y,b.s=m,b.r=p,b}(e)}},40623:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareRequest=void 0;const r=n(3975),o=n(23337),a=n(29086),i=n(89984),s=n(92530),c=n(26175),u=n(26456),l=n(5434);t.prepareRequest=async function(e,t){const{account:n,chain:d=e.chain,gas:f,gasPrice:h,maxFeePerGas:p,maxPriorityFeePerGas:m,nonce:b}=t;if(!n)throw new c.AccountNotFoundError;const g=(0,r.parseAccount)(n),y=await(0,a.getBlock)(e,{blockTag:"latest"}),v={...t,from:g.address};if("undefined"===typeof b&&(v.nonce=await(0,s.getTransactionCount)(e,{address:g.address,blockTag:"pending"})),"bigint"===typeof y.baseFeePerGas&&"undefined"===typeof h){let e=1500000000n;if("undefined"!==typeof d?.fees?.defaultPriorityFee&&(e="bigint"===typeof d.fees.defaultPriorityFee?d.fees.defaultPriorityFee:await d.fees.defaultPriorityFee({block:y,request:v})),"undefined"===typeof p)v.maxPriorityFeePerGas=m??e,v.maxFeePerGas=120n*y.baseFeePerGas/100n+v.maxPriorityFeePerGas;else{if("undefined"===typeof m&&p0)e=BigInt(2*n)+BigInt(35n+t.v-27n);else if(t.v!==e)throw new r.InvalidLegacyVError({v:t.v});h=[...h,(0,i.toHex)(e),t.r,t.s]}else n>0&&(h=[...h,(0,i.toHex)(n),"0x","0x"]);return(0,s.toRlp)(h)}(e,t)}},42586:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTypedData=void 0;const r=n(4403),o=n(56293),a=n(21041),i=n(66859),s=n(86308),c=n(27678);t.validateTypedData=function({domain:e,message:t,primaryType:n,types:u}){const l=u,d=(e,t)=>{for(const n of e){const{name:e,type:u}=n,f=u,h=t[e],p=f.match(c.integerRegex);if(p&&("number"===typeof h||"bigint"===typeof h)){const[e,t,n]=p;(0,s.numberToHex)(h,{signed:"int"===t,size:parseInt(n)/8})}if("address"===f&&"string"===typeof h&&!(0,a.isAddress)(h))throw new o.InvalidAddressError({address:h});const m=f.match(c.bytesRegex);if(m){const[e,t]=m;if(t&&(0,i.size)(h)!==parseInt(t))throw new r.BytesSizeMismatchError({expectedSize:parseInt(t),givenSize:(0,i.size)(h)})}const b=l[f];b&&d(b,h)}};if(l.EIP712Domain&&e&&d(l.EIP712Domain,e),"EIP712Domain"!==n){const e=l[n];d(e,t)}}},41217:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uid=void 0;let n,r=256;t.uid=function(e=11){if(!n||r+e>512){n="",r=0;for(let e=0;e<256;e++)n+=(256+256*Math.random()|0).toString(16).substring(1)}return n.substring(r,r+++e)}},90686:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatEther=void 0;const r=n(99225),o=n(88162);t.formatEther=function(e,t="wei"){return(0,o.formatUnits)(e,r.etherUnits[t])}},22386:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatGwei=void 0;const r=n(99225),o=n(88162);t.formatGwei=function(e,t="wei"){return(0,o.formatUnits)(e,r.gweiUnits[t])}},88162:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUnits=void 0,t.formatUnits=function(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${a?`.${a}`:""}`}},39118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEther=void 0;const r=n(99225),o=n(73956);t.parseEther=function(e,t="wei"){return(0,o.parseUnits)(e,r.etherUnits[t])}},31187:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseGwei=void 0;const r=n(99225),o=n(73956);t.parseGwei=function(e,t="wei"){return(0,o.parseUnits)(e,r.gweiUnits[t])}},73956:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUnits=void 0,t.parseUnits=function(e,t){let[n,r="0"]=e.split(".");const o=n.startsWith("-");if(o&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${r}`))&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>t){const[e,o,a]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],i=Math.round(Number(`${o}.${a}`));r=i>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${i}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${o?"-":""}${n}${r}`)}},78967:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wait=void 0,t.wait=async function(e){return new Promise((t=>setTimeout(t,e)))}},25611:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0;const r=n(20691);class o extends Error{constructor(e,t={}){const n=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof o&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: https://abitype.dev${a}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${r.version}`].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}}t.BaseError=o},2149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownSolidityTypeError=t.UnknownTypeError=t.InvalidAbiItemError=void 0;const r=n(25611);class o extends r.BaseError{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}t.InvalidAbiItemError=o;class a extends r.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}t.UnknownTypeError=a;class i extends r.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}t.UnknownSolidityTypeError=i},93669:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAbiTypeParameterError=t.InvalidFunctionModifierError=t.InvalidModifierError=t.SolidityProtectedKeywordError=t.InvalidParameterError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=void 0;const r=n(25611);class o extends r.BaseError{constructor({param:e}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}t.InvalidAbiParameterError=o;class a extends r.BaseError{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}t.InvalidAbiParametersError=a;class i extends r.BaseError{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}t.InvalidParameterError=i;class s extends r.BaseError{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}t.SolidityProtectedKeywordError=s;class c extends r.BaseError{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}t.InvalidModifierError=c;class u extends r.BaseError{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}t.InvalidFunctionModifierError=u;class l extends r.BaseError{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}t.InvalidAbiTypeParameterError=l},53584:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStructSignatureError=t.UnknownSignatureError=t.InvalidSignatureError=void 0;const r=n(25611);class o extends r.BaseError{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}t.InvalidSignatureError=o;class a extends r.BaseError{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}t.UnknownSignatureError=a;class i extends r.BaseError{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}t.InvalidStructSignatureError=i},71808:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidParenthesisError=void 0;const r=n(25611);class o extends r.BaseError{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}t.InvalidParenthesisError=o},98738:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CircularReferenceError=void 0;const r=n(25611);class o extends r.BaseError{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}t.CircularReferenceError=o},97601:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbi=void 0;const r=n(30717);t.formatAbi=function(e){const t=[],n=e.length;for(let o=0;o(\[(\d*)\])*)$/;t.formatAbiParameter=function e(t){let n=t.type;if(o.test(t.type)&&"components"in t){n="(";const a=t.components.length;for(let r=0;r[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;t.isErrorSignature=function(e){return o.test(e)},t.execErrorSignature=function(e){return(0,r.execTyped)(o,e)};const a=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;t.isEventSignature=function(e){return a.test(e)},t.execEventSignature=function(e){return(0,r.execTyped)(a,e)};const i=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;t.isFunctionSignature=function(e){return i.test(e)},t.execFunctionSignature=function(e){return(0,r.execTyped)(i,e)};const s=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;t.isStructSignature=function(e){return s.test(e)},t.execStructSignature=function(e){return(0,r.execTyped)(s,e)};const c=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;t.isConstructorSignature=function(e){return c.test(e)},t.execConstructorSignature=function(e){return(0,r.execTyped)(c,e)};const u=/^fallback\(\)$/;t.isFallbackSignature=function(e){return u.test(e)};const l=/^receive\(\) external payable$/;t.isReceiveSignature=function(e){return l.test(e)},t.modifiers=new Set(["memory","indexed","storage","calldata"]),t.eventModifiers=new Set(["indexed"]),t.functionModifiers=new Set(["calldata","memory","storage"])},21518:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseStructs=void 0;const r=n(11575),o=n(2149),a=n(93669),i=n(53584),s=n(98738),c=n(97677),u=n(30123);t.parseStructs=function(e){const t={},n=e.length;for(let s=0;s[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/;function d(e,t,n=new Set){const i=[],c=e.length;for(let f=0;f[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,d=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,f=/^u?int$/;function h(e,t){const n=(0,c.getParameterCacheKey)(e,t?.type);if(c.parameterCache.has(n))return c.parameterCache.get(n);const i=r.isTupleRegex.test(e),s=(0,r.execTyped)(i?d:l,e);if(!s)throw new a.InvalidParameterError({param:e});if(s.name&&g(s.name))throw new a.SolidityProtectedKeywordError({param:e,name:s.name});const b=s.name?{name:s.name}:{},v="indexed"===s.modifier?{indexed:!0}:{},w=t?.structs??{};let E,A={};if(i){E="tuple";const e=p(s.type),t=[],n=e.length;for(let r=0;r({blurs:{modalOverlay:i[n].modalOverlay},fonts:{body:o[t]},radii:{actionButton:a[e].actionButton,connectButton:a[e].connectButton,menuButton:a[e].connectButton,modal:a[e].modal,modalMobile:a[e].modalMobile}}),c={blue:{accentColor:"#0E76FD",accentColorForeground:"#FFF"},green:{accentColor:"#1DB847",accentColorForeground:"#FFF"},orange:{accentColor:"#FF801F",accentColorForeground:"#FFF"},pink:{accentColor:"#FF5CA0",accentColorForeground:"#FFF"},purple:{accentColor:"#5F5AFA",accentColorForeground:"#FFF"},red:{accentColor:"#FA423C",accentColorForeground:"#FFF"}},u=c.blue,l=({accentColor:e=u.accentColor,accentColorForeground:t=u.accentColorForeground,...n}={})=>({...s(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(0, 0, 0, 0.04)",actionButtonBorderMobile:"rgba(0, 0, 0, 0.06)",actionButtonSecondaryBackground:"rgba(0, 0, 0, 0.06)",closeButton:"rgba(60, 66, 66, 0.8)",closeButtonBackground:"rgba(0, 0, 0, 0.06)",connectButtonBackground:"#FFF",connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06))",connectButtonText:"#25292E",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(255, 255, 255, 0) 9.49%, rgba(171, 171, 171, 0.04) 71.04%), #FFFFFF",downloadTopCardBackground:"linear-gradient(126deg, rgba(171, 171, 171, 0.2) 9.49%, rgba(255, 255, 255, 0) 71.04%), #FFFFFF",error:"#FF494A",generalBorder:"rgba(0, 0, 0, 0.06)",generalBorderDim:"rgba(0, 0, 0, 0.03)",menuItemBackground:"rgba(60, 66, 66, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.3)",modalBackground:"#FFF",modalBorder:"transparent",modalText:"#25292E",modalTextDim:"rgba(60, 66, 66, 0.3)",modalTextSecondary:"rgba(60, 66, 66, 0.6)",profileAction:"#FFF",profileActionHover:"rgba(255, 255, 255, 0.5)",profileForeground:"rgba(60, 66, 66, 0.06)",selectedOptionBorder:"rgba(60, 66, 66, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.12)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});l.accentColors=c;var d=n(67294);var f=function(e,t){return Object.defineProperty(e,"__recipe__",{value:t,writable:!1}),e};function h(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");return f((function(e){if("string"===typeof e||"number"===typeof e||"boolean"===typeof e){if(!t.defaultCondition)throw new Error("No default condition");return{[t.defaultCondition]:e}}if(Array.isArray(e)){if(!("responsiveArray"in t))throw new Error("Responsive arrays are not supported");var n={};for(var r in t.responsiveArray)null!=e[r]&&(n[t.responsiveArray[r]]=e[r]);return n}return e}),{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createNormalizeValueFn",args:[{conditions:e.conditions}]})}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;tfunction(){for(var t=arguments.length,n=new Array(t),r=0;re.styles))),a=Object.keys(o),i=a.filter((e=>"mappings"in o[e])),s=t=>{var n=[],r={},a=b({},t),s=!1;for(var c of i){var u=t[c];if(null!=u){var l=o[c];for(var d of(s=!0,l.mappings))r[d]=u,null==a[d]&&delete a[d]}}var f=s?b(b({},r),a):t;for(var h in f){var p=f[h],m=o[h];try{if(m.mappings)continue;if("string"===typeof p||"number"===typeof p)n.push(m.values[p].defaultClass);else if(Array.isArray(p))for(var g=0;ge,v=function(){return g(y)(...arguments)},w=n(35133),E=n(86010),A=n(13105),x=n(73935),P=n(97582),C="right-scroll-bar-position",j="width-before-scroll-bar";function I(e,t){return function(e,t){var n=(0,d.useState)((function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}}))[0];return n.callback=t,n.facade}(t||null,(function(t){return e.forEach((function(e){return function(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}(e,t)}))}))}function O(e){return e}function T(e,t){void 0===t&&(t=O);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}var S=function(e){void 0===e&&(e={});var t=T(null);return t.options=(0,P.__assign)({async:!0,ssr:!1},e),t}(),B=function(){},k=d.forwardRef((function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:B,onWheelCapture:B,onTouchMoveCapture:B}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,l=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,b=e.allowPinchZoom,g=e.as,y=void 0===g?"div":g,v=(0,P.__rest)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=h,E=I([n,t]),A=(0,P.__assign)((0,P.__assign)({},v),o);return d.createElement(d.Fragment,null,l&&d.createElement(w,{sideCar:S,removeScrollBar:u,shards:f,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!b,lockRef:n}),i?d.cloneElement(d.Children.only(s),(0,P.__assign)((0,P.__assign)({},A),{ref:E})):d.createElement(y,(0,P.__assign)({},A,{className:c,ref:E}),s))}));k.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},k.classNames={fullWidth:j,zeroRight:C};var _,N=function(e){var t=e.sideCar,n=(0,P.__rest)(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,(0,P.__assign)({},n))};N.isSideCarExport=!0;function M(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_||n.nc;return t&&e.setAttribute("nonce",t),e}var R=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=M())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F=function(){var e=function(){var e=R();return function(t,n){d.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])}}();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},U={left:0,top:0,right:0,gap:0},L=function(e){return parseInt(e||"",10)||0},D=function(e){if(void 0===e&&(e="margin"),"undefined"===typeof window)return U;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[L(n),L(r),L(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},q=F(),H=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(C," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(j," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(C," .").concat(C," {\n right: 0 ").concat(r,";\n }\n \n .").concat(j," .").concat(j," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},z=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r,a=d.useMemo((function(){return D(o)}),[o]);return d.createElement(q,{styles:H(a,!t,o,n?"":"!important")})},G=!1;if("undefined"!==typeof window)try{var $=Object.defineProperty({},"passive",{get:function(){return G=!0,!0}});window.addEventListener("test",$,$),window.removeEventListener("test",$,$)}catch(pr){G=!1}var W=!!G&&{passive:!1},K=function(e,t){var n=t;do{if("undefined"!==typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Q(e,n)){var r=V(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Q=function(e,t){return"v"===e?function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)}(t):function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)}(t)},V=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Y=function(e){return[e.deltaX,e.deltaY]},Z=function(e){return e&&"current"in e?e.current:e},X=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ee=0,te=[];var ne,re=(ne=function(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(ee++)[0],a=d.useState((function(){return F()}))[0],i=d.useRef(e);d.useEffect((function(){i.current=e}),[e]),d.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(0,P.__spreadArray)([e.lockRef.current],(e.shards||[]).map(Z),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!i.current.allowPinchZoom;var o,a=J(e),s=n.current,c="deltaX"in e?e.deltaX:s[0]-a[0],u="deltaY"in e?e.deltaY:s[1]-a[1],l=e.target,d=Math.abs(c)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=K(d,l);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=K(d,l)),!f)return!1;if(!r.current&&"changedTouches"in e&&(c||u)&&(r.current=o),!o)return!0;var h=r.current||o;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,c=t.contains(s),u=!1,l=i>0,d=0,f=0;do{var h=V(e,s),p=h[0],m=h[1]-h[2]-a*p;(p||m)&&Q(e,s)&&(d+=m,f+=p),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(l&&(o&&0===d||!o&&i>d)||!l&&(o&&0===f||!o&&-i>f))&&(u=!0),u}(h,t,e,"h"===h?c:u,!0)}),[]),c=d.useCallback((function(e){var n=e;if(te.length&&te[te.length-1]===a){var r="deltaY"in n?Y(n):J(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.preventDefault();else if(!o){var c=(i.current.shards||[]).map(Z).filter(Boolean).filter((function(e){return e.contains(n.target)}));(c.length>0?s(n,c[0]):!i.current.noIsolation)&&n.preventDefault()}}}),[]),u=d.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),l=d.useCallback((function(e){n.current=J(e),r.current=void 0}),[]),f=d.useCallback((function(t){u(t.type,Y(t),t.target,s(t,e.lockRef.current))}),[]),h=d.useCallback((function(t){u(t.type,J(t),t.target,s(t,e.lockRef.current))}),[]);d.useEffect((function(){return te.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,W),document.addEventListener("touchmove",c,W),document.addEventListener("touchstart",l,W),function(){te=te.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,W),document.removeEventListener("touchmove",c,W),document.removeEventListener("touchstart",l,W)}}),[]);var p=e.removeScrollBar,m=e.inert;return d.createElement(d.Fragment,null,m?d.createElement(a,{styles:X(o)}):null,p?d.createElement(z,{gapMode:"margin"}):null)},S.useMedium(ne),N),oe=d.forwardRef((function(e,t){return d.createElement(k,(0,P.__assign)({},e,{ref:t,sideCar:re}))}));oe.classNames=k.classNames;var ae=oe;function ie(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function se(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=e.constructor();for(var o in e){var a=e[o],i=[...n,o];"string"===typeof a||"number"===typeof a||null==a?r[o]=t(a,i):"object"!==typeof a||Array.isArray(a)?console.warn('Skipping invalid key "'.concat(i.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(a)?"Array":typeof a,'"')):r[o]=se(a,t,i)}return r}function ce(e,t){var n={};if("object"===typeof t){var r=e;se(t,((e,t)=>{var o=function(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}(r,t);n[ie(o)]=String(e)}))}else{var o=e;for(var a in o)n[ie(a)]=o[a]}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map((e=>"".concat(e,":").concat(this[e]))).join(";")},writable:!1}),n}var ue=n(42455),le=n(92592),de=function(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");var n=h(e);return f((function(e,r){if("string"===typeof e||"number"===typeof e||"boolean"===typeof e){if(!t.defaultCondition)throw new Error("No default condition");return r(e,t.defaultCondition)}var o=Array.isArray(e)?n(e):e,a={};for(var i in o)null!=o[i]&&(a[i]=r(o[i],i));return a}),{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createMapValueFn",args:[{conditions:e.conditions}]})}({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),fe=h({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),he=v({conditions:{defaultCondition:"base",conditionNames:["base","hover","active"],responsiveArray:void 0},styles:{background:{values:{accentColor:{conditions:{base:"ju367v9c",hover:"ju367v9d",active:"ju367v9e"},defaultClass:"ju367v9c"},accentColorForeground:{conditions:{base:"ju367v9f",hover:"ju367v9g",active:"ju367v9h"},defaultClass:"ju367v9f"},actionButtonBorder:{conditions:{base:"ju367v9i",hover:"ju367v9j",active:"ju367v9k"},defaultClass:"ju367v9i"},actionButtonBorderMobile:{conditions:{base:"ju367v9l",hover:"ju367v9m",active:"ju367v9n"},defaultClass:"ju367v9l"},actionButtonSecondaryBackground:{conditions:{base:"ju367v9o",hover:"ju367v9p",active:"ju367v9q"},defaultClass:"ju367v9o"},closeButton:{conditions:{base:"ju367v9r",hover:"ju367v9s",active:"ju367v9t"},defaultClass:"ju367v9r"},closeButtonBackground:{conditions:{base:"ju367v9u",hover:"ju367v9v",active:"ju367v9w"},defaultClass:"ju367v9u"},connectButtonBackground:{conditions:{base:"ju367v9x",hover:"ju367v9y",active:"ju367v9z"},defaultClass:"ju367v9x"},connectButtonBackgroundError:{conditions:{base:"ju367va0",hover:"ju367va1",active:"ju367va2"},defaultClass:"ju367va0"},connectButtonInnerBackground:{conditions:{base:"ju367va3",hover:"ju367va4",active:"ju367va5"},defaultClass:"ju367va3"},connectButtonText:{conditions:{base:"ju367va6",hover:"ju367va7",active:"ju367va8"},defaultClass:"ju367va6"},connectButtonTextError:{conditions:{base:"ju367va9",hover:"ju367vaa",active:"ju367vab"},defaultClass:"ju367va9"},connectionIndicator:{conditions:{base:"ju367vac",hover:"ju367vad",active:"ju367vae"},defaultClass:"ju367vac"},downloadBottomCardBackground:{conditions:{base:"ju367vaf",hover:"ju367vag",active:"ju367vah"},defaultClass:"ju367vaf"},downloadTopCardBackground:{conditions:{base:"ju367vai",hover:"ju367vaj",active:"ju367vak"},defaultClass:"ju367vai"},error:{conditions:{base:"ju367val",hover:"ju367vam",active:"ju367van"},defaultClass:"ju367val"},generalBorder:{conditions:{base:"ju367vao",hover:"ju367vap",active:"ju367vaq"},defaultClass:"ju367vao"},generalBorderDim:{conditions:{base:"ju367var",hover:"ju367vas",active:"ju367vat"},defaultClass:"ju367var"},menuItemBackground:{conditions:{base:"ju367vau",hover:"ju367vav",active:"ju367vaw"},defaultClass:"ju367vau"},modalBackdrop:{conditions:{base:"ju367vax",hover:"ju367vay",active:"ju367vaz"},defaultClass:"ju367vax"},modalBackground:{conditions:{base:"ju367vb0",hover:"ju367vb1",active:"ju367vb2"},defaultClass:"ju367vb0"},modalBorder:{conditions:{base:"ju367vb3",hover:"ju367vb4",active:"ju367vb5"},defaultClass:"ju367vb3"},modalText:{conditions:{base:"ju367vb6",hover:"ju367vb7",active:"ju367vb8"},defaultClass:"ju367vb6"},modalTextDim:{conditions:{base:"ju367vb9",hover:"ju367vba",active:"ju367vbb"},defaultClass:"ju367vb9"},modalTextSecondary:{conditions:{base:"ju367vbc",hover:"ju367vbd",active:"ju367vbe"},defaultClass:"ju367vbc"},profileAction:{conditions:{base:"ju367vbf",hover:"ju367vbg",active:"ju367vbh"},defaultClass:"ju367vbf"},profileActionHover:{conditions:{base:"ju367vbi",hover:"ju367vbj",active:"ju367vbk"},defaultClass:"ju367vbi"},profileForeground:{conditions:{base:"ju367vbl",hover:"ju367vbm",active:"ju367vbn"},defaultClass:"ju367vbl"},selectedOptionBorder:{conditions:{base:"ju367vbo",hover:"ju367vbp",active:"ju367vbq"},defaultClass:"ju367vbo"},standby:{conditions:{base:"ju367vbr",hover:"ju367vbs",active:"ju367vbt"},defaultClass:"ju367vbr"}}},borderColor:{values:{accentColor:{conditions:{base:"ju367vbu",hover:"ju367vbv",active:"ju367vbw"},defaultClass:"ju367vbu"},accentColorForeground:{conditions:{base:"ju367vbx",hover:"ju367vby",active:"ju367vbz"},defaultClass:"ju367vbx"},actionButtonBorder:{conditions:{base:"ju367vc0",hover:"ju367vc1",active:"ju367vc2"},defaultClass:"ju367vc0"},actionButtonBorderMobile:{conditions:{base:"ju367vc3",hover:"ju367vc4",active:"ju367vc5"},defaultClass:"ju367vc3"},actionButtonSecondaryBackground:{conditions:{base:"ju367vc6",hover:"ju367vc7",active:"ju367vc8"},defaultClass:"ju367vc6"},closeButton:{conditions:{base:"ju367vc9",hover:"ju367vca",active:"ju367vcb"},defaultClass:"ju367vc9"},closeButtonBackground:{conditions:{base:"ju367vcc",hover:"ju367vcd",active:"ju367vce"},defaultClass:"ju367vcc"},connectButtonBackground:{conditions:{base:"ju367vcf",hover:"ju367vcg",active:"ju367vch"},defaultClass:"ju367vcf"},connectButtonBackgroundError:{conditions:{base:"ju367vci",hover:"ju367vcj",active:"ju367vck"},defaultClass:"ju367vci"},connectButtonInnerBackground:{conditions:{base:"ju367vcl",hover:"ju367vcm",active:"ju367vcn"},defaultClass:"ju367vcl"},connectButtonText:{conditions:{base:"ju367vco",hover:"ju367vcp",active:"ju367vcq"},defaultClass:"ju367vco"},connectButtonTextError:{conditions:{base:"ju367vcr",hover:"ju367vcs",active:"ju367vct"},defaultClass:"ju367vcr"},connectionIndicator:{conditions:{base:"ju367vcu",hover:"ju367vcv",active:"ju367vcw"},defaultClass:"ju367vcu"},downloadBottomCardBackground:{conditions:{base:"ju367vcx",hover:"ju367vcy",active:"ju367vcz"},defaultClass:"ju367vcx"},downloadTopCardBackground:{conditions:{base:"ju367vd0",hover:"ju367vd1",active:"ju367vd2"},defaultClass:"ju367vd0"},error:{conditions:{base:"ju367vd3",hover:"ju367vd4",active:"ju367vd5"},defaultClass:"ju367vd3"},generalBorder:{conditions:{base:"ju367vd6",hover:"ju367vd7",active:"ju367vd8"},defaultClass:"ju367vd6"},generalBorderDim:{conditions:{base:"ju367vd9",hover:"ju367vda",active:"ju367vdb"},defaultClass:"ju367vd9"},menuItemBackground:{conditions:{base:"ju367vdc",hover:"ju367vdd",active:"ju367vde"},defaultClass:"ju367vdc"},modalBackdrop:{conditions:{base:"ju367vdf",hover:"ju367vdg",active:"ju367vdh"},defaultClass:"ju367vdf"},modalBackground:{conditions:{base:"ju367vdi",hover:"ju367vdj",active:"ju367vdk"},defaultClass:"ju367vdi"},modalBorder:{conditions:{base:"ju367vdl",hover:"ju367vdm",active:"ju367vdn"},defaultClass:"ju367vdl"},modalText:{conditions:{base:"ju367vdo",hover:"ju367vdp",active:"ju367vdq"},defaultClass:"ju367vdo"},modalTextDim:{conditions:{base:"ju367vdr",hover:"ju367vds",active:"ju367vdt"},defaultClass:"ju367vdr"},modalTextSecondary:{conditions:{base:"ju367vdu",hover:"ju367vdv",active:"ju367vdw"},defaultClass:"ju367vdu"},profileAction:{conditions:{base:"ju367vdx",hover:"ju367vdy",active:"ju367vdz"},defaultClass:"ju367vdx"},profileActionHover:{conditions:{base:"ju367ve0",hover:"ju367ve1",active:"ju367ve2"},defaultClass:"ju367ve0"},profileForeground:{conditions:{base:"ju367ve3",hover:"ju367ve4",active:"ju367ve5"},defaultClass:"ju367ve3"},selectedOptionBorder:{conditions:{base:"ju367ve6",hover:"ju367ve7",active:"ju367ve8"},defaultClass:"ju367ve6"},standby:{conditions:{base:"ju367ve9",hover:"ju367vea",active:"ju367veb"},defaultClass:"ju367ve9"}}},boxShadow:{values:{connectButton:{conditions:{base:"ju367vec",hover:"ju367ved",active:"ju367vee"},defaultClass:"ju367vec"},dialog:{conditions:{base:"ju367vef",hover:"ju367veg",active:"ju367veh"},defaultClass:"ju367vef"},profileDetailsAction:{conditions:{base:"ju367vei",hover:"ju367vej",active:"ju367vek"},defaultClass:"ju367vei"},selectedOption:{conditions:{base:"ju367vel",hover:"ju367vem",active:"ju367ven"},defaultClass:"ju367vel"},selectedWallet:{conditions:{base:"ju367veo",hover:"ju367vep",active:"ju367veq"},defaultClass:"ju367veo"},walletLogo:{conditions:{base:"ju367ver",hover:"ju367ves",active:"ju367vet"},defaultClass:"ju367ver"}}},color:{values:{accentColor:{conditions:{base:"ju367veu",hover:"ju367vev",active:"ju367vew"},defaultClass:"ju367veu"},accentColorForeground:{conditions:{base:"ju367vex",hover:"ju367vey",active:"ju367vez"},defaultClass:"ju367vex"},actionButtonBorder:{conditions:{base:"ju367vf0",hover:"ju367vf1",active:"ju367vf2"},defaultClass:"ju367vf0"},actionButtonBorderMobile:{conditions:{base:"ju367vf3",hover:"ju367vf4",active:"ju367vf5"},defaultClass:"ju367vf3"},actionButtonSecondaryBackground:{conditions:{base:"ju367vf6",hover:"ju367vf7",active:"ju367vf8"},defaultClass:"ju367vf6"},closeButton:{conditions:{base:"ju367vf9",hover:"ju367vfa",active:"ju367vfb"},defaultClass:"ju367vf9"},closeButtonBackground:{conditions:{base:"ju367vfc",hover:"ju367vfd",active:"ju367vfe"},defaultClass:"ju367vfc"},connectButtonBackground:{conditions:{base:"ju367vff",hover:"ju367vfg",active:"ju367vfh"},defaultClass:"ju367vff"},connectButtonBackgroundError:{conditions:{base:"ju367vfi",hover:"ju367vfj",active:"ju367vfk"},defaultClass:"ju367vfi"},connectButtonInnerBackground:{conditions:{base:"ju367vfl",hover:"ju367vfm",active:"ju367vfn"},defaultClass:"ju367vfl"},connectButtonText:{conditions:{base:"ju367vfo",hover:"ju367vfp",active:"ju367vfq"},defaultClass:"ju367vfo"},connectButtonTextError:{conditions:{base:"ju367vfr",hover:"ju367vfs",active:"ju367vft"},defaultClass:"ju367vfr"},connectionIndicator:{conditions:{base:"ju367vfu",hover:"ju367vfv",active:"ju367vfw"},defaultClass:"ju367vfu"},downloadBottomCardBackground:{conditions:{base:"ju367vfx",hover:"ju367vfy",active:"ju367vfz"},defaultClass:"ju367vfx"},downloadTopCardBackground:{conditions:{base:"ju367vg0",hover:"ju367vg1",active:"ju367vg2"},defaultClass:"ju367vg0"},error:{conditions:{base:"ju367vg3",hover:"ju367vg4",active:"ju367vg5"},defaultClass:"ju367vg3"},generalBorder:{conditions:{base:"ju367vg6",hover:"ju367vg7",active:"ju367vg8"},defaultClass:"ju367vg6"},generalBorderDim:{conditions:{base:"ju367vg9",hover:"ju367vga",active:"ju367vgb"},defaultClass:"ju367vg9"},menuItemBackground:{conditions:{base:"ju367vgc",hover:"ju367vgd",active:"ju367vge"},defaultClass:"ju367vgc"},modalBackdrop:{conditions:{base:"ju367vgf",hover:"ju367vgg",active:"ju367vgh"},defaultClass:"ju367vgf"},modalBackground:{conditions:{base:"ju367vgi",hover:"ju367vgj",active:"ju367vgk"},defaultClass:"ju367vgi"},modalBorder:{conditions:{base:"ju367vgl",hover:"ju367vgm",active:"ju367vgn"},defaultClass:"ju367vgl"},modalText:{conditions:{base:"ju367vgo",hover:"ju367vgp",active:"ju367vgq"},defaultClass:"ju367vgo"},modalTextDim:{conditions:{base:"ju367vgr",hover:"ju367vgs",active:"ju367vgt"},defaultClass:"ju367vgr"},modalTextSecondary:{conditions:{base:"ju367vgu",hover:"ju367vgv",active:"ju367vgw"},defaultClass:"ju367vgu"},profileAction:{conditions:{base:"ju367vgx",hover:"ju367vgy",active:"ju367vgz"},defaultClass:"ju367vgx"},profileActionHover:{conditions:{base:"ju367vh0",hover:"ju367vh1",active:"ju367vh2"},defaultClass:"ju367vh0"},profileForeground:{conditions:{base:"ju367vh3",hover:"ju367vh4",active:"ju367vh5"},defaultClass:"ju367vh3"},selectedOptionBorder:{conditions:{base:"ju367vh6",hover:"ju367vh7",active:"ju367vh8"},defaultClass:"ju367vh6"},standby:{conditions:{base:"ju367vh9",hover:"ju367vha",active:"ju367vhb"},defaultClass:"ju367vh9"}}}}},{conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0},styles:{alignItems:{values:{"flex-start":{conditions:{smallScreen:"ju367v0",largeScreen:"ju367v1"},defaultClass:"ju367v0"},"flex-end":{conditions:{smallScreen:"ju367v2",largeScreen:"ju367v3"},defaultClass:"ju367v2"},center:{conditions:{smallScreen:"ju367v4",largeScreen:"ju367v5"},defaultClass:"ju367v4"}}},display:{values:{none:{conditions:{smallScreen:"ju367v6",largeScreen:"ju367v7"},defaultClass:"ju367v6"},block:{conditions:{smallScreen:"ju367v8",largeScreen:"ju367v9"},defaultClass:"ju367v8"},flex:{conditions:{smallScreen:"ju367va",largeScreen:"ju367vb"},defaultClass:"ju367va"},inline:{conditions:{smallScreen:"ju367vc",largeScreen:"ju367vd"},defaultClass:"ju367vc"}}}}},{conditions:void 0,styles:{margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},alignSelf:{values:{"flex-start":{defaultClass:"ju367ve"},"flex-end":{defaultClass:"ju367vf"},center:{defaultClass:"ju367vg"}}},backgroundSize:{values:{cover:{defaultClass:"ju367vh"}}},borderRadius:{values:{1:{defaultClass:"ju367vi"},6:{defaultClass:"ju367vj"},10:{defaultClass:"ju367vk"},13:{defaultClass:"ju367vl"},actionButton:{defaultClass:"ju367vm"},connectButton:{defaultClass:"ju367vn"},menuButton:{defaultClass:"ju367vo"},modal:{defaultClass:"ju367vp"},modalMobile:{defaultClass:"ju367vq"},"25%":{defaultClass:"ju367vr"},full:{defaultClass:"ju367vs"}}},borderStyle:{values:{solid:{defaultClass:"ju367vt"}}},borderWidth:{values:{0:{defaultClass:"ju367vu"},1:{defaultClass:"ju367vv"},2:{defaultClass:"ju367vw"},4:{defaultClass:"ju367vx"}}},cursor:{values:{pointer:{defaultClass:"ju367vy"}}},flexDirection:{values:{row:{defaultClass:"ju367vz"},column:{defaultClass:"ju367v10"}}},fontFamily:{values:{body:{defaultClass:"ju367v11"}}},fontSize:{values:{12:{defaultClass:"ju367v12"},13:{defaultClass:"ju367v13"},14:{defaultClass:"ju367v14"},16:{defaultClass:"ju367v15"},18:{defaultClass:"ju367v16"},20:{defaultClass:"ju367v17"},23:{defaultClass:"ju367v18"}}},fontWeight:{values:{regular:{defaultClass:"ju367v19"},medium:{defaultClass:"ju367v1a"},semibold:{defaultClass:"ju367v1b"},bold:{defaultClass:"ju367v1c"},heavy:{defaultClass:"ju367v1d"}}},gap:{values:{0:{defaultClass:"ju367v1e"},1:{defaultClass:"ju367v1f"},2:{defaultClass:"ju367v1g"},3:{defaultClass:"ju367v1h"},4:{defaultClass:"ju367v1i"},5:{defaultClass:"ju367v1j"},6:{defaultClass:"ju367v1k"},8:{defaultClass:"ju367v1l"},10:{defaultClass:"ju367v1m"},12:{defaultClass:"ju367v1n"},14:{defaultClass:"ju367v1o"},16:{defaultClass:"ju367v1p"},18:{defaultClass:"ju367v1q"},20:{defaultClass:"ju367v1r"},24:{defaultClass:"ju367v1s"},28:{defaultClass:"ju367v1t"},32:{defaultClass:"ju367v1u"},36:{defaultClass:"ju367v1v"},44:{defaultClass:"ju367v1w"},64:{defaultClass:"ju367v1x"},"-1":{defaultClass:"ju367v1y"}}},height:{values:{1:{defaultClass:"ju367v1z"},2:{defaultClass:"ju367v20"},4:{defaultClass:"ju367v21"},8:{defaultClass:"ju367v22"},12:{defaultClass:"ju367v23"},20:{defaultClass:"ju367v24"},24:{defaultClass:"ju367v25"},28:{defaultClass:"ju367v26"},30:{defaultClass:"ju367v27"},32:{defaultClass:"ju367v28"},34:{defaultClass:"ju367v29"},36:{defaultClass:"ju367v2a"},40:{defaultClass:"ju367v2b"},44:{defaultClass:"ju367v2c"},48:{defaultClass:"ju367v2d"},54:{defaultClass:"ju367v2e"},60:{defaultClass:"ju367v2f"},200:{defaultClass:"ju367v2g"},full:{defaultClass:"ju367v2h"},max:{defaultClass:"ju367v2i"}}},justifyContent:{values:{"flex-start":{defaultClass:"ju367v2j"},"flex-end":{defaultClass:"ju367v2k"},center:{defaultClass:"ju367v2l"},"space-between":{defaultClass:"ju367v2m"},"space-around":{defaultClass:"ju367v2n"}}},textAlign:{values:{left:{defaultClass:"ju367v2o"},center:{defaultClass:"ju367v2p"},inherit:{defaultClass:"ju367v2q"}}},marginBottom:{values:{0:{defaultClass:"ju367v2r"},1:{defaultClass:"ju367v2s"},2:{defaultClass:"ju367v2t"},3:{defaultClass:"ju367v2u"},4:{defaultClass:"ju367v2v"},5:{defaultClass:"ju367v2w"},6:{defaultClass:"ju367v2x"},8:{defaultClass:"ju367v2y"},10:{defaultClass:"ju367v2z"},12:{defaultClass:"ju367v30"},14:{defaultClass:"ju367v31"},16:{defaultClass:"ju367v32"},18:{defaultClass:"ju367v33"},20:{defaultClass:"ju367v34"},24:{defaultClass:"ju367v35"},28:{defaultClass:"ju367v36"},32:{defaultClass:"ju367v37"},36:{defaultClass:"ju367v38"},44:{defaultClass:"ju367v39"},64:{defaultClass:"ju367v3a"},"-1":{defaultClass:"ju367v3b"}}},marginLeft:{values:{0:{defaultClass:"ju367v3c"},1:{defaultClass:"ju367v3d"},2:{defaultClass:"ju367v3e"},3:{defaultClass:"ju367v3f"},4:{defaultClass:"ju367v3g"},5:{defaultClass:"ju367v3h"},6:{defaultClass:"ju367v3i"},8:{defaultClass:"ju367v3j"},10:{defaultClass:"ju367v3k"},12:{defaultClass:"ju367v3l"},14:{defaultClass:"ju367v3m"},16:{defaultClass:"ju367v3n"},18:{defaultClass:"ju367v3o"},20:{defaultClass:"ju367v3p"},24:{defaultClass:"ju367v3q"},28:{defaultClass:"ju367v3r"},32:{defaultClass:"ju367v3s"},36:{defaultClass:"ju367v3t"},44:{defaultClass:"ju367v3u"},64:{defaultClass:"ju367v3v"},"-1":{defaultClass:"ju367v3w"}}},marginRight:{values:{0:{defaultClass:"ju367v3x"},1:{defaultClass:"ju367v3y"},2:{defaultClass:"ju367v3z"},3:{defaultClass:"ju367v40"},4:{defaultClass:"ju367v41"},5:{defaultClass:"ju367v42"},6:{defaultClass:"ju367v43"},8:{defaultClass:"ju367v44"},10:{defaultClass:"ju367v45"},12:{defaultClass:"ju367v46"},14:{defaultClass:"ju367v47"},16:{defaultClass:"ju367v48"},18:{defaultClass:"ju367v49"},20:{defaultClass:"ju367v4a"},24:{defaultClass:"ju367v4b"},28:{defaultClass:"ju367v4c"},32:{defaultClass:"ju367v4d"},36:{defaultClass:"ju367v4e"},44:{defaultClass:"ju367v4f"},64:{defaultClass:"ju367v4g"},"-1":{defaultClass:"ju367v4h"}}},marginTop:{values:{0:{defaultClass:"ju367v4i"},1:{defaultClass:"ju367v4j"},2:{defaultClass:"ju367v4k"},3:{defaultClass:"ju367v4l"},4:{defaultClass:"ju367v4m"},5:{defaultClass:"ju367v4n"},6:{defaultClass:"ju367v4o"},8:{defaultClass:"ju367v4p"},10:{defaultClass:"ju367v4q"},12:{defaultClass:"ju367v4r"},14:{defaultClass:"ju367v4s"},16:{defaultClass:"ju367v4t"},18:{defaultClass:"ju367v4u"},20:{defaultClass:"ju367v4v"},24:{defaultClass:"ju367v4w"},28:{defaultClass:"ju367v4x"},32:{defaultClass:"ju367v4y"},36:{defaultClass:"ju367v4z"},44:{defaultClass:"ju367v50"},64:{defaultClass:"ju367v51"},"-1":{defaultClass:"ju367v52"}}},maxWidth:{values:{1:{defaultClass:"ju367v53"},2:{defaultClass:"ju367v54"},4:{defaultClass:"ju367v55"},8:{defaultClass:"ju367v56"},12:{defaultClass:"ju367v57"},20:{defaultClass:"ju367v58"},24:{defaultClass:"ju367v59"},28:{defaultClass:"ju367v5a"},30:{defaultClass:"ju367v5b"},32:{defaultClass:"ju367v5c"},34:{defaultClass:"ju367v5d"},36:{defaultClass:"ju367v5e"},40:{defaultClass:"ju367v5f"},44:{defaultClass:"ju367v5g"},48:{defaultClass:"ju367v5h"},54:{defaultClass:"ju367v5i"},60:{defaultClass:"ju367v5j"},200:{defaultClass:"ju367v5k"},full:{defaultClass:"ju367v5l"},max:{defaultClass:"ju367v5m"}}},minWidth:{values:{1:{defaultClass:"ju367v5n"},2:{defaultClass:"ju367v5o"},4:{defaultClass:"ju367v5p"},8:{defaultClass:"ju367v5q"},12:{defaultClass:"ju367v5r"},20:{defaultClass:"ju367v5s"},24:{defaultClass:"ju367v5t"},28:{defaultClass:"ju367v5u"},30:{defaultClass:"ju367v5v"},32:{defaultClass:"ju367v5w"},34:{defaultClass:"ju367v5x"},36:{defaultClass:"ju367v5y"},40:{defaultClass:"ju367v5z"},44:{defaultClass:"ju367v60"},48:{defaultClass:"ju367v61"},54:{defaultClass:"ju367v62"},60:{defaultClass:"ju367v63"},200:{defaultClass:"ju367v64"},full:{defaultClass:"ju367v65"},max:{defaultClass:"ju367v66"}}},overflow:{values:{hidden:{defaultClass:"ju367v67"}}},paddingBottom:{values:{0:{defaultClass:"ju367v68"},1:{defaultClass:"ju367v69"},2:{defaultClass:"ju367v6a"},3:{defaultClass:"ju367v6b"},4:{defaultClass:"ju367v6c"},5:{defaultClass:"ju367v6d"},6:{defaultClass:"ju367v6e"},8:{defaultClass:"ju367v6f"},10:{defaultClass:"ju367v6g"},12:{defaultClass:"ju367v6h"},14:{defaultClass:"ju367v6i"},16:{defaultClass:"ju367v6j"},18:{defaultClass:"ju367v6k"},20:{defaultClass:"ju367v6l"},24:{defaultClass:"ju367v6m"},28:{defaultClass:"ju367v6n"},32:{defaultClass:"ju367v6o"},36:{defaultClass:"ju367v6p"},44:{defaultClass:"ju367v6q"},64:{defaultClass:"ju367v6r"},"-1":{defaultClass:"ju367v6s"}}},paddingLeft:{values:{0:{defaultClass:"ju367v6t"},1:{defaultClass:"ju367v6u"},2:{defaultClass:"ju367v6v"},3:{defaultClass:"ju367v6w"},4:{defaultClass:"ju367v6x"},5:{defaultClass:"ju367v6y"},6:{defaultClass:"ju367v6z"},8:{defaultClass:"ju367v70"},10:{defaultClass:"ju367v71"},12:{defaultClass:"ju367v72"},14:{defaultClass:"ju367v73"},16:{defaultClass:"ju367v74"},18:{defaultClass:"ju367v75"},20:{defaultClass:"ju367v76"},24:{defaultClass:"ju367v77"},28:{defaultClass:"ju367v78"},32:{defaultClass:"ju367v79"},36:{defaultClass:"ju367v7a"},44:{defaultClass:"ju367v7b"},64:{defaultClass:"ju367v7c"},"-1":{defaultClass:"ju367v7d"}}},paddingRight:{values:{0:{defaultClass:"ju367v7e"},1:{defaultClass:"ju367v7f"},2:{defaultClass:"ju367v7g"},3:{defaultClass:"ju367v7h"},4:{defaultClass:"ju367v7i"},5:{defaultClass:"ju367v7j"},6:{defaultClass:"ju367v7k"},8:{defaultClass:"ju367v7l"},10:{defaultClass:"ju367v7m"},12:{defaultClass:"ju367v7n"},14:{defaultClass:"ju367v7o"},16:{defaultClass:"ju367v7p"},18:{defaultClass:"ju367v7q"},20:{defaultClass:"ju367v7r"},24:{defaultClass:"ju367v7s"},28:{defaultClass:"ju367v7t"},32:{defaultClass:"ju367v7u"},36:{defaultClass:"ju367v7v"},44:{defaultClass:"ju367v7w"},64:{defaultClass:"ju367v7x"},"-1":{defaultClass:"ju367v7y"}}},paddingTop:{values:{0:{defaultClass:"ju367v7z"},1:{defaultClass:"ju367v80"},2:{defaultClass:"ju367v81"},3:{defaultClass:"ju367v82"},4:{defaultClass:"ju367v83"},5:{defaultClass:"ju367v84"},6:{defaultClass:"ju367v85"},8:{defaultClass:"ju367v86"},10:{defaultClass:"ju367v87"},12:{defaultClass:"ju367v88"},14:{defaultClass:"ju367v89"},16:{defaultClass:"ju367v8a"},18:{defaultClass:"ju367v8b"},20:{defaultClass:"ju367v8c"},24:{defaultClass:"ju367v8d"},28:{defaultClass:"ju367v8e"},32:{defaultClass:"ju367v8f"},36:{defaultClass:"ju367v8g"},44:{defaultClass:"ju367v8h"},64:{defaultClass:"ju367v8i"},"-1":{defaultClass:"ju367v8j"}}},position:{values:{absolute:{defaultClass:"ju367v8k"},fixed:{defaultClass:"ju367v8l"},relative:{defaultClass:"ju367v8m"}}},right:{values:{0:{defaultClass:"ju367v8n"}}},transition:{values:{default:{defaultClass:"ju367v8o"},transform:{defaultClass:"ju367v8p"}}},userSelect:{values:{none:{defaultClass:"ju367v8q"}}},width:{values:{1:{defaultClass:"ju367v8r"},2:{defaultClass:"ju367v8s"},4:{defaultClass:"ju367v8t"},8:{defaultClass:"ju367v8u"},12:{defaultClass:"ju367v8v"},20:{defaultClass:"ju367v8w"},24:{defaultClass:"ju367v8x"},28:{defaultClass:"ju367v8y"},30:{defaultClass:"ju367v8z"},32:{defaultClass:"ju367v90"},34:{defaultClass:"ju367v91"},36:{defaultClass:"ju367v92"},40:{defaultClass:"ju367v93"},44:{defaultClass:"ju367v94"},48:{defaultClass:"ju367v95"},54:{defaultClass:"ju367v96"},60:{defaultClass:"ju367v97"},200:{defaultClass:"ju367v98"},full:{defaultClass:"ju367v99"},max:{defaultClass:"ju367v9a"}}},backdropFilter:{values:{modalOverlay:{defaultClass:"ju367v9b"}}}}}),pe={colors:{accentColor:"var(--rk-colors-accentColor)",accentColorForeground:"var(--rk-colors-accentColorForeground)",actionButtonBorder:"var(--rk-colors-actionButtonBorder)",actionButtonBorderMobile:"var(--rk-colors-actionButtonBorderMobile)",actionButtonSecondaryBackground:"var(--rk-colors-actionButtonSecondaryBackground)",closeButton:"var(--rk-colors-closeButton)",closeButtonBackground:"var(--rk-colors-closeButtonBackground)",connectButtonBackground:"var(--rk-colors-connectButtonBackground)",connectButtonBackgroundError:"var(--rk-colors-connectButtonBackgroundError)",connectButtonInnerBackground:"var(--rk-colors-connectButtonInnerBackground)",connectButtonText:"var(--rk-colors-connectButtonText)",connectButtonTextError:"var(--rk-colors-connectButtonTextError)",connectionIndicator:"var(--rk-colors-connectionIndicator)",downloadBottomCardBackground:"var(--rk-colors-downloadBottomCardBackground)",downloadTopCardBackground:"var(--rk-colors-downloadTopCardBackground)",error:"var(--rk-colors-error)",generalBorder:"var(--rk-colors-generalBorder)",generalBorderDim:"var(--rk-colors-generalBorderDim)",menuItemBackground:"var(--rk-colors-menuItemBackground)",modalBackdrop:"var(--rk-colors-modalBackdrop)",modalBackground:"var(--rk-colors-modalBackground)",modalBorder:"var(--rk-colors-modalBorder)",modalText:"var(--rk-colors-modalText)",modalTextDim:"var(--rk-colors-modalTextDim)",modalTextSecondary:"var(--rk-colors-modalTextSecondary)",profileAction:"var(--rk-colors-profileAction)",profileActionHover:"var(--rk-colors-profileActionHover)",profileForeground:"var(--rk-colors-profileForeground)",selectedOptionBorder:"var(--rk-colors-selectedOptionBorder)",standby:"var(--rk-colors-standby)"},fonts:{body:"var(--rk-fonts-body)"},radii:{actionButton:"var(--rk-radii-actionButton)",connectButton:"var(--rk-radii-connectButton)",menuButton:"var(--rk-radii-menuButton)",modal:"var(--rk-radii-modal)",modalMobile:"var(--rk-radii-modalMobile)"},shadows:{connectButton:"var(--rk-shadows-connectButton)",dialog:"var(--rk-shadows-dialog)",profileDetailsAction:"var(--rk-shadows-profileDetailsAction)",selectedOption:"var(--rk-shadows-selectedOption)",selectedWallet:"var(--rk-shadows-selectedWallet)",walletLogo:"var(--rk-shadows-walletLogo)"},blurs:{modalOverlay:"var(--rk-blurs-modalOverlay)"}},me={shrink:"_12cbo8i6",shrinkSm:"_12cbo8i7"},be={grow:"_12cbo8i4",growLg:"_12cbo8i5"};function ge({active:e,hover:t}){return["_12cbo8i3 ju367v8m",t&&be[t],me[e]]}var ye=(0,d.createContext)(null);function ve(){var e;const t=(0,d.useContext)(ye);return null!=(e=null==t?void 0:t.status)?e:null}function we(){const e=ve(),{isConnected:t}=(0,w.mA)();return t?e&&("loading"===e||"unauthenticated"===e)?e:"connected":"disconnected"}function Ee(){return"undefined"!==typeof navigator&&/android/i.test(navigator.userAgent)}function Ae(){return"undefined"!==typeof navigator&&/iPhone|iPod/.test(navigator.userAgent)||"undefined"!==typeof navigator&&(/iPad/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)}function xe(){return Ee()||Ae()}var Pe={a:"iekbcca",blockquote:"iekbcc2",button:"iekbcc9",input:"iekbcc8 iekbcc5 iekbcc4",mark:"iekbcc6",ol:"iekbcc1",q:"iekbcc2",select:"iekbcc7 iekbcc5 iekbcc4",table:"iekbcc3",textarea:"iekbcc5 iekbcc4",ul:"iekbcc1"},Ce=d.forwardRef((({as:e="div",className:t,testId:n,...r},o)=>{const a={},i={};for(const c in r)he.properties.has(c)?a[c]=r[c]:i[c]=r[c];const s=(({reset:e,...t})=>{if(!e)return he(t);const n=Pe[e],r=he(t);return(0,E.default)("iekbcc0",n,r)})({reset:"string"===typeof e?e:"div",...a});return d.createElement(e,{className:(0,E.default)(s,t),...i,"data-testid":n?`rk-${n.replace(/^rk-/,"")}`:void 0,ref:o})}));Ce.displayName="Box";var je=new Map,Ie=new Map;async function Oe(e){const t=Ie.get(e);if(t)return t;const n=async()=>e().then((async t=>(je.set(e,t),t))),r=n().catch((t=>n().catch((t=>{Ie.delete(e)}))));return Ie.set(e,r),r}async function Te(...e){return await Promise.all(e.map((e=>"function"===typeof e?Oe(e):e)))}function Se(e){const t="function"===typeof e?je.get(e):void 0,n=function(){const[,e]=(0,d.useReducer)((e=>e+1),0);return e}();return(0,d.useEffect)((()=>{"function"!==typeof e||t||Oe(e).then(n)}),[e,t,n]),"function"===typeof e?t:e}function Be({alt:e,background:t,borderColor:n,borderRadius:r,boxShadow:o,height:a,src:i,width:s}){const c=Se(i),u=c&&/^http/.test(c),[l,f]=(0,d.useReducer)((()=>!0),!1);return d.createElement(Ce,{"aria-label":e,borderRadius:r,boxShadow:o,height:"string"===typeof a?a:void 0,overflow:"hidden",position:"relative",role:"img",style:{background:t,height:"number"===typeof a?a:void 0,width:"number"===typeof s?s:void 0},width:"string"===typeof s?s:void 0},d.createElement(Ce,{...u?{"aria-hidden":!0,as:"img",onLoad:f,src:c}:{backgroundSize:"cover"},height:"full",position:"absolute",style:{touchCallout:"none",transition:"opacity .15s linear",userSelect:"none",...u?{opacity:l?1:0}:{backgroundImage:c?`url(${c})`:void 0,backgroundRepeat:"no-repeat",opacity:c?1:0}},width:"full"}),n?d.createElement(Ce,{..."object"===typeof n&&"custom"in n?{style:{borderColor:n.custom}}:{borderColor:n},borderRadius:r,borderStyle:"solid",borderWidth:"1",height:"full",position:"relative",width:"full"}):null)}var ke=({height:e=21,width:t=21})=>{const n=(r="spinner",(0,d.useMemo)((()=>`${r}_${Math.round(1e9*Math.random())}`),[r]));var r;return d.createElement("svg",{className:"_1luule42",fill:"none",height:e,viewBox:"0 0 21 21",width:t,xmlns:"http://www.w3.org/2000/svg"},d.createElement("clipPath",{id:n},d.createElement("path",{d:"M10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C11.3284 18 12 18.6716 12 19.5C12 20.3284 11.3284 21 10.5 21C4.70101 21 0 16.299 0 10.5C0 4.70101 4.70101 0 10.5 0C16.299 0 21 4.70101 21 10.5C21 11.3284 20.3284 12 19.5 12C18.6716 12 18 11.3284 18 10.5C18 6.35786 14.6421 3 10.5 3Z"})),d.createElement("foreignObject",{clipPath:`url(#${n})`,height:"21",width:"21",x:"0",y:"0"},d.createElement("div",{className:"_1luule43"})))},_e=["#FC5C54","#FFD95A","#E95D72","#6A87C8","#5FD0F3","#75C06B","#FFDD86","#5FC6D4","#FF949A","#FF8024","#9BA1A4","#EC66FF","#FF8CBC","#FF9A23","#C5DADB","#A8CE63","#71ABFF","#FFE279","#B6B1B6","#FF6780","#A575FF","#4D82FF","#FFB35A"],Ne=[{color:_e[0],emoji:"\ud83c\udf36"},{color:_e[1],emoji:"\ud83e\udd11"},{color:_e[2],emoji:"\ud83d\udc19"},{color:_e[3],emoji:"\ud83e\uded0"},{color:_e[4],emoji:"\ud83d\udc33"},{color:_e[0],emoji:"\ud83e\udd36"},{color:_e[5],emoji:"\ud83c\udf32"},{color:_e[6],emoji:"\ud83c\udf1e"},{color:_e[7],emoji:"\ud83d\udc12"},{color:_e[8],emoji:"\ud83d\udc35"},{color:_e[9],emoji:"\ud83e\udd8a"},{color:_e[10],emoji:"\ud83d\udc3c"},{color:_e[11],emoji:"\ud83e\udd84"},{color:_e[12],emoji:"\ud83d\udc37"},{color:_e[13],emoji:"\ud83d\udc27"},{color:_e[8],emoji:"\ud83e\udda9"},{color:_e[14],emoji:"\ud83d\udc7d"},{color:_e[0],emoji:"\ud83c\udf88"},{color:_e[8],emoji:"\ud83c\udf49"},{color:_e[1],emoji:"\ud83c\udf89"},{color:_e[15],emoji:"\ud83d\udc32"},{color:_e[16],emoji:"\ud83c\udf0e"},{color:_e[17],emoji:"\ud83c\udf4a"},{color:_e[18],emoji:"\ud83d\udc2d"},{color:_e[19],emoji:"\ud83c\udf63"},{color:_e[1],emoji:"\ud83d\udc25"},{color:_e[20],emoji:"\ud83d\udc7e"},{color:_e[15],emoji:"\ud83e\udd66"},{color:_e[0],emoji:"\ud83d\udc79"},{color:_e[17],emoji:"\ud83d\ude40"},{color:_e[4],emoji:"\u26f1"},{color:_e[21],emoji:"\u26f5\ufe0f"},{color:_e[17],emoji:"\ud83e\udd73"},{color:_e[8],emoji:"\ud83e\udd2f"},{color:_e[22],emoji:"\ud83e\udd20"}];var Me=({address:e,ensImage:t,size:n})=>{const[r,o]=(0,d.useState)(!1);(0,d.useEffect)((()=>{if(t){const e=new Image;e.src=t,e.onload=()=>o(!0)}}),[t]);const{color:a,emoji:i}=(0,d.useMemo)((()=>function(e){const t="string"===typeof e?e:"",n=Math.abs(function(e){let t=0;if(0===e.length)return t;for(let n=0;nd.createElement("svg",{fill:"none",height:"7",width:"14",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M12.75 1.54001L8.51647 5.0038C7.77974 5.60658 6.72026 5.60658 5.98352 5.0038L1.75 1.54001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",xmlns:"http://www.w3.org/2000/svg"}));function Le(e){return null!=e}var De={iconBackground:"#96bedc",iconUrl:async()=>(await n.e(1727).then(n.bind(n,1727))).default},qe={iconBackground:"#e84141",iconUrl:async()=>(await n.e(6237).then(n.bind(n,36237))).default},He={iconBackground:"#0052ff",iconUrl:async()=>(await n.e(1711).then(n.bind(n,41711))).default},ze={iconBackground:"#ebac0e",iconUrl:async()=>(await n.e(4253).then(n.bind(n,84253))).default},Ge={iconBackground:"#002D74",iconUrl:async()=>(await n.e(5939).then(n.bind(n,95939))).default},$e={iconBackground:"#484c50",iconUrl:async()=>(await n.e(5488).then(n.bind(n,85488))).default},We={iconBackground:"#f9f7ec",iconUrl:async()=>(await n.e(6253).then(n.bind(n,26253))).default},Ke={iconBackground:"#ff5a57",iconUrl:async()=>(await n.e(704).then(n.bind(n,60704))).default},Qe={iconBackground:"#9f71ec",iconUrl:async()=>(await n.e(8881).then(n.bind(n,48881))).default},Ve={iconBackground:"#000000",iconUrl:async()=>(await n.e(5119).then(n.bind(n,65119))).default},Je={arbitrum:{chainId:42161,name:"Arbitrum",...De},arbitrumGoerli:{chainId:421613,...De},avalanche:{chainId:43114,...qe},avalancheFuji:{chainId:43113,...qe},base:{chainId:8453,...He},baseGoerli:{chainId:84531,...He},bsc:{chainId:56,name:"BSC",...ze},bscTestnet:{chainId:97,...ze},cronos:{chainId:25,...Ge},cronosTestnet:{chainId:338,...Ge},goerli:{chainId:5,...$e},hardhat:{chainId:31337,...We},kovan:{chainId:42,...$e},localhost:{chainId:1337,...$e},mainnet:{chainId:1,...$e},optimism:{chainId:10,name:"Optimism",...Ke},optimismGoerli:{chainId:420,...Ke},optimismKovan:{chainId:69,...Ke},polygon:{chainId:137,...Qe},polygonMumbai:{chainId:80001,...Qe},rinkeby:{chainId:4,...$e},ropsten:{chainId:3,...$e},sepolia:{chainId:11155111,...$e},zora:{chainId:7777777,...Ve},zoraTestnet:{chainId:999,...Ve}},Ye=Object.fromEntries(Object.values(Je).filter(Le).map((({chainId:e,...t})=>[e,t]))),Ze=e=>e.map((e=>{var t;return{...e,...null!=(t=Ye[e.id])?t:{}}})),Xe=(0,d.createContext)({chains:[]});function et({chains:e,children:t,initialChain:n}){return d.createElement(Xe.Provider,{value:(0,d.useMemo)((()=>({chains:Ze(e),initialChainId:"number"===typeof n?n:null==n?void 0:n.id})),[e,n])},t)}var tt=()=>(0,d.useContext)(Xe).chains;function nt(){const e=A.RJ.id,t=(0,w.t_)(),n=Array.isArray(t.chains)?t.chains:[],r=null==n?void 0:n.some((t=>(null==t?void 0:t.id)===e));return{chainId:e,enabled:r}}function rt(e){const{chainId:t,enabled:n}=nt(),{data:r}=(0,w.c9)({chainId:t,enabled:n,name:e});return r}function ot(e){const{chainId:t,enabled:n}=nt(),{data:r}=(0,w.F6)({address:e,chainId:t,enabled:n});return r}function at(){var e;const{chain:t}=(0,w.LN)();return null!=(e=null==t?void 0:t.id)?e:null}var it="rk-transactions";function st(){return function(e){try{const t=e?JSON.parse(e):{};return"object"===typeof t?t:{}}catch(pr){return{}}}("undefined"!==typeof localStorage?localStorage.getItem(it):null)}var ct,ut=/^0x([A-Fa-f0-9]{64})$/;function lt({provider:e}){let t=st(),n=e;const r=new Set,o=new Map;function a(e,n){var r,o;return null!=(o=null==(r=t[e])?void 0:r[n])?o:[]}async function i(e,t){await Promise.all(a(e,t).filter((e=>"pending"===e.status)).map((async r=>{const{confirmations:a,hash:i}=r,c=o.get(i);if(c)return await c;const u=n.waitForTransactionReceipt({confirmations:a,hash:i}).then((({status:n})=>{o.delete(i),void 0!==n&&function(e,t,n,r){s(e,t,(e=>e.map((e=>e.hash===n?{...e,status:r}:e))))}(e,t,i,0===n||"reverted"===n?"failed":"confirmed")}));return o.set(i,u),await u})))}function s(e,n,o){var a,s;t=st(),t[e]=null!=(a=t[e])?a:{};let c=0;const u=o(null!=(s=t[e][n])?s:[]).filter((({status:e})=>"pending"===e||c++<=10));t[e][n]=u.length>0?u:void 0,localStorage.setItem(it,JSON.stringify(t)),r.forEach((e=>e())),i(e,n)}return{addTransaction:function(e,t,n){const r=function(e){const t=[];return ut.test(e.hash)||t.push("Invalid transaction hash"),"string"!==typeof e.description&&t.push("Transaction must have a description"),"undefined"!==typeof e.confirmations&&(!Number.isInteger(e.confirmations)||e.confirmations<1)&&t.push("Transaction confirmations must be a positiver integer"),t}(n);if(r.length>0)throw new Error(["Unable to add transaction",...r].join("\n"));s(e,t,(e=>[{...n,status:"pending"},...e.filter((({hash:e})=>e!==n.hash))]))},clearTransactions:function(e,t){s(e,t,(()=>[]))},getTransactions:a,onChange:function(e){return r.add(e),()=>{r.delete(e)}},setProvider:function(e){n=e},waitForPendingTransactions:i}}var dt=(0,d.createContext)(null);function ft({children:e}){const t=(0,w.t_)(),{address:n}=(0,w.mA)(),r=at(),[o]=(0,d.useState)((()=>null!=ct?ct:ct=lt({provider:t})));return(0,d.useEffect)((()=>{o.setProvider(t)}),[o,t]),(0,d.useEffect)((()=>{n&&r&&o.waitForPendingTransactions(n,r)}),[o,n,r]),d.createElement(dt.Provider,{value:o},e)}function ht(){const e=(0,d.useContext)(dt);if(!e)throw new Error("Transaction hooks must be used within RainbowKitProvider");return e}function pt(){const e=ht(),{address:t}=(0,w.mA)(),n=at(),[r,o]=(0,d.useState)((()=>e&&t&&n?e.getTransactions(t,n):[]));return(0,d.useEffect)((()=>{if(e&&t&&n)return o(e.getTransactions(t,n)),e.onChange((()=>{o(e.getTransactions(t,n))}))}),[e,t,n]),r}var mt=e=>"function"===typeof e?e():e;function bt(e,t={}){return Object.entries(function(e,{extends:t}={}){const n={...ce(pe,mt(e))};if(!t)return n;const r=ce(pe,mt(t));return Object.fromEntries(Object.entries(n).filter((([e,t])=>t!==r[e])))}(e,t)).map((([e,t])=>`${e}:${t.replace(/[:;{}]/g,"")};`)).join("")}var gt=()=>{const[e,t]=(0,d.useState)({height:void 0,width:void 0});return(0,d.useEffect)((()=>{function e(){t({height:window.innerHeight,width:window.innerWidth})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)}),[]),e},yt={appName:void 0,disclaimer:void 0,learnMoreUrl:"https://learn.rainbow.me/understanding-web3?utm_source=rainbowkit&utm_campaign=learnmore"},vt=(0,d.createContext)(yt),wt=(0,d.createContext)(!1),Et="compact",At="wide",xt=(0,d.createContext)(At),Pt=(0,d.createContext)(!1);function Ct(){return"undefined"!==typeof navigator&&/Version\/([0-9._]+).*Safari/.test(navigator.userAgent)}function jt(){var e;if("undefined"===typeof navigator)return"Browser";const t=navigator.userAgent.toLowerCase();return(null==(e=navigator.brave)?void 0:e.isBrave)?"Brave":t.indexOf("edg/")>-1?"Edge":t.indexOf("op")>-1?"Opera":"undefined"!==typeof document&&""!==getComputedStyle(document.body).getPropertyValue("--arc-palette-focus")?"Arc":t.indexOf("chrome")>-1?"Chrome":t.indexOf("firefox")>-1?"Firefox":Ct()?"Safari":"Browser"}var It=e=>{var t,n,r,o,a,i,s,c,u,l,d,f;const h=jt();return null!=(f={Arc:null==(t=null==e?void 0:e.downloadUrls)?void 0:t.chrome,Brave:null==(n=null==e?void 0:e.downloadUrls)?void 0:n.chrome,Chrome:null==(r=null==e?void 0:e.downloadUrls)?void 0:r.chrome,Edge:(null==(o=null==e?void 0:e.downloadUrls)?void 0:o.edge)||(null==(a=null==e?void 0:e.downloadUrls)?void 0:a.chrome),Firefox:null==(i=null==e?void 0:e.downloadUrls)?void 0:i.firefox,Opera:(null==(s=null==e?void 0:e.downloadUrls)?void 0:s.opera)||(null==(c=null==e?void 0:e.downloadUrls)?void 0:c.chrome),Safari:null==(u=null==e?void 0:e.downloadUrls)?void 0:u.safari,Browser:null==(l=null==e?void 0:e.downloadUrls)?void 0:l.browserExtension}[h])?f:null==(d=null==e?void 0:e.downloadUrls)?void 0:d.browserExtension},Ot=e=>{var t,n,r,o;return null!=(o=Ae()?null==(t=null==e?void 0:e.downloadUrls)?void 0:t.ios:null==(n=null==e?void 0:e.downloadUrls)?void 0:n.android)?o:null==(r=null==e?void 0:e.downloadUrls)?void 0:r.mobile},Tt="rk-recent";function St(){return"undefined"!==typeof localStorage?function(e){try{const t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch(pr){return[]}}(localStorage.getItem(Tt)):[]}function Bt(e){const t=(n=[e,...St()],[...new Set(n)]);var n;localStorage.setItem(Tt,JSON.stringify(t))}function kt(){const e=tt(),t=(0,d.useContext)(Xe).initialChainId,{connectAsync:n,connectors:r}=(0,w.$4)();async function o(r,o){var a,i,s;const c=await o.getChainId(),u=await n({chainId:null!=(s=null!=t?t:null==(a=e.find((({id:e})=>e===c)))?void 0:a.id)?s:null==(i=e[0])?void 0:i.id,connector:o});return u&&Bt(r),u}async function a(e,t){try{return await o(e,t)}catch(pr){if(!("UserRejectedRequestError"===pr.name||"Connection request reset. Please try again"===pr.message))throw pr}}const i=function(e){const t=[];for(const n of e)t.push(...n);return t}(r.map((e=>{var t;return null!=(t=e._wallets)?t:[]}))).sort(((e,t)=>e.index-t.index)),s=function(e,t){const n={};return e.forEach((e=>{const r=t(e);r&&(n[r]=e)})),n}(i,(e=>e.id)),c=St().map((e=>s[e])).filter(Le).slice(0,3),u=[...c,...i.filter((e=>!c.includes(e)))],l=[];return u.forEach((e=>{var t;if(!e)return;const n=c.includes(e);l.push({...e,connect:()=>e.connector.showQrModal?a(e.id,e.connector):o(e.id,e.connector),extensionDownloadUrl:It(e),groupName:e.groupName,mobileDownloadUrl:Ot(e),onConnecting:t=>e.connector.on("message",(({type:e})=>"connecting"===e?t():void 0)),ready:(null==(t=e.installed)||t)&&e.connector.ready,recent:n,showWalletConnectModal:e.walletConnectModalConnector?()=>a(e.id,e.walletConnectModalConnector):void 0})})),l}var _t=async()=>(await n.e(794).then(n.bind(n,20794))).default,Nt=()=>d.createElement(Be,{background:"#d0d5de",borderRadius:"10",height:"48",src:_t,width:"48"}),Mt=async()=>(await n.e(3200).then(n.bind(n,26936))).default,Rt=()=>d.createElement(Be,{background:"#d0d5de",borderRadius:"10",height:"48",src:Mt,width:"48"}),Ft=d.forwardRef((({as:e="div",children:t,className:n,color:r,display:o,font:a="body",id:i,size:s="16",style:c,tabIndex:u,textAlign:l="inherit",weight:f="regular"},h)=>d.createElement(Ce,{as:e,className:n,color:r,display:o,fontFamily:a,fontSize:s,fontWeight:f,id:i,ref:h,style:c,tabIndex:u,textAlign:l},t)));Ft.displayName="Text";var Ut={large:{fontSize:"16",paddingX:"24",paddingY:"10"},medium:{fontSize:"14",height:"28",paddingX:"12",paddingY:"4"},small:{fontSize:"14",paddingX:"10",paddingY:"5"}};function Lt({disabled:e=!1,href:t,label:n,onClick:r,rel:o="noreferrer noopener",size:a="medium",target:i="_blank",testId:s,type:c="primary"}){const u="primary"===c,l="large"!==a,f=xe(),h=e?"actionButtonSecondaryBackground":u?"accentColor":l?"actionButtonSecondaryBackground":null,{fontSize:p,height:m,paddingX:b,paddingY:g}=Ut[a],y=!f||!l;return d.createElement(Ce,{...t?e?{}:{as:"a",href:t,rel:o,target:i}:{as:"button",type:"button"},onClick:e?void 0:r,...y?{borderColor:!f||l||u?"actionButtonBorder":"actionButtonBorderMobile",borderStyle:"solid",borderWidth:"1"}:{},borderRadius:"actionButton",className:!e&&ge({active:"shrinkSm",hover:"grow"}),display:"block",paddingX:b,paddingY:g,style:{willChange:"transform"},testId:s,textAlign:"center",transition:"transform",...h?{background:h}:{},...m?{height:m}:{}},d.createElement(Ft,{color:e?"modalTextSecondary":u?"accentColorForeground":"accentColor",size:p,weight:"bold"},n))}var Dt=()=>xe()?d.createElement("svg",{"aria-hidden":!0,fill:"none",height:"11.5",viewBox:"0 0 11.5 11.5",width:"11.5",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M2.13388 0.366117C1.64573 -0.122039 0.854272 -0.122039 0.366117 0.366117C-0.122039 0.854272 -0.122039 1.64573 0.366117 2.13388L3.98223 5.75L0.366117 9.36612C-0.122039 9.85427 -0.122039 10.6457 0.366117 11.1339C0.854272 11.622 1.64573 11.622 2.13388 11.1339L5.75 7.51777L9.36612 11.1339C9.85427 11.622 10.6457 11.622 11.1339 11.1339C11.622 10.6457 11.622 9.85427 11.1339 9.36612L7.51777 5.75L11.1339 2.13388C11.622 1.64573 11.622 0.854272 11.1339 0.366117C10.6457 -0.122039 9.85427 -0.122039 9.36612 0.366117L5.75 3.98223L2.13388 0.366117Z",fill:"currentColor"})):d.createElement("svg",{"aria-hidden":!0,fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L3.58579 5L0.292893 8.29289C-0.0976311 8.68342 -0.0976311 9.31658 0.292893 9.70711C0.683417 10.0976 1.31658 10.0976 1.70711 9.70711L5 6.41421L8.29289 9.70711C8.68342 10.0976 9.31658 10.0976 9.70711 9.70711C10.0976 9.31658 10.0976 8.68342 9.70711 8.29289L6.41421 5L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L5 3.58579L1.70711 0.292893Z",fill:"currentColor"})),qt=({"aria-label":e="Close",onClose:t})=>{const n=xe();return d.createElement(Ce,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:ge({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},d.createElement(Dt,null))},Ht=async()=>(await n.e(2898).then(n.bind(n,92898))).default;function zt({onClose:e}){const[{status:t,...n},r]=d.useState({status:"idle"}),o=function(){var e;const{adapter:t}=null!=(e=(0,d.useContext)(ye))?e:{};if(!t)throw new Error("No authentication adapter found");return t}(),a=(0,d.useCallback)((async()=>{try{const e=await o.getNonce();r((t=>({...t,nonce:e})))}catch(e){r((e=>({...e,errorMessage:"Error preparing message, please retry!",status:"idle"})))}}),[o]),i=(0,d.useRef)(!1);d.useEffect((()=>{i.current||(i.current=!0,a())}),[a]);const s=xe(),{address:c}=(0,w.mA)(),{chain:u}=(0,w.LN)(),{signMessageAsync:l}=(0,w.QW)(),{disconnect:f}=(0,w.qL)(),h=()=>f();return d.createElement(Ce,{position:"relative"},d.createElement(Ce,{display:"flex",paddingRight:"16",paddingTop:"16",position:"absolute",right:"0"},d.createElement(qt,{onClose:e})),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:s?"32":"24",padding:"24",paddingX:"18",style:{paddingTop:s?"60px":"36px"}},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:s?"6":"4",style:{maxWidth:s?320:280}},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:s?"32":"16"},d.createElement(Be,{height:40,src:Ht,width:40}),d.createElement(Ft,{color:"modalText",size:s?"20":"18",textAlign:"center",weight:"heavy"},"Verify your account")),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:s?"16":"12"},d.createElement(Ft,{color:"modalTextSecondary",size:s?"16":"14",textAlign:"center"},"To finish connecting, you must sign a message in your wallet to verify that you are the owner of this account"),"idle"===t&&n.errorMessage?d.createElement(Ft,{color:"error",size:s?"16":"14",textAlign:"center",weight:"bold"},n.errorMessage):null)),d.createElement(Ce,{alignItems:s?void 0:"center",display:"flex",flexDirection:"column",gap:"8",width:"full"},d.createElement(Lt,{disabled:!n.nonce||"signing"===t||"verifying"===t,label:n.nonce?"signing"===t?"Waiting for signature...":"verifying"===t?"Verifying signature...":"Send message":"Preparing message...",onClick:async()=>{try{const t=null==u?void 0:u.id,{nonce:a}=n;if(!c||!t||!a)return;r((e=>({...e,errorMessage:void 0,status:"signing"})));const i=o.createMessage({address:c,chainId:t,nonce:a});let s;try{s=await l({message:o.getMessageBody({message:i})})}catch(e){return e instanceof ue.ab?r((e=>({...e,status:"idle"}))):r((e=>({...e,errorMessage:"Error signing message, please retry!",status:"idle"})))}r((e=>({...e,status:"verifying"})));try{if(await o.verify({message:i,signature:s}))return;throw new Error}catch(e){return r((e=>({...e,errorMessage:"Error verifying signature, please retry!",status:"idle"})))}}catch(e){r({errorMessage:"Oops, something went wrong!",status:"idle"})}},size:s?"large":"medium",testId:"auth-message-button"}),s?d.createElement(Lt,{label:"Cancel",onClick:h,size:"large",type:"secondary"}):d.createElement(Ce,{as:"button",borderRadius:"full",className:ge({active:"shrink",hover:"grow"}),display:"block",onClick:h,paddingX:"10",paddingY:"5",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},d.createElement(Ft,{color:"closeButton",size:s?"16":"14",weight:"bold"},"Cancel")))))}function Gt(){const e=tt(),t=kt(),n="unauthenticated"===ve(),r=(0,d.useCallback)((()=>{Te(...t.map((e=>e.iconUrl)),...e.map((e=>e.iconUrl)).filter(Le)),xe()||(Te(_t),Te(Mt)),n&&Te(Ht)}),[t,e,n]);(0,d.useEffect)((()=>{r()}),[r])}var $t="WALLETCONNECT_DEEPLINK_CHOICE";function Wt(){localStorage.removeItem($t)}var Kt=(0,d.createContext)(void 0),Qt="data-rk",Vt=e=>({[Qt]:e||""}),Jt=l();function Yt({appInfo:e,avatar:t,chains:n,children:r,coolMode:o=!1,id:a,initialChain:i,modalSize:s=At,showRecentTransactions:c=!1,theme:u=Jt}){if(Gt(),(0,w.mA)({onDisconnect:Wt}),"function"===typeof u)throw new Error('A theme function was provided to the "theme" prop instead of a theme object. You must execute this function to get the resulting theme object.');const l=(e=>{if(e&&!/^[a-zA-Z0-9_]+$/.test(e))throw new Error(`Invalid ID: ${e}`);return e?`[data-rk="${e}"]`:"[data-rk]"})(a),f={...yt,...e},h=null!=t?t:Me,{width:p}=gt(),m=p&&p<768;return d.createElement(et,{chains:n,initialChain:i},d.createElement(wt.Provider,{value:o},d.createElement(xt.Provider,{value:m?Et:s},d.createElement(Pt.Provider,{value:c},d.createElement(ft,null,d.createElement(Re.Provider,{value:h},d.createElement(vt.Provider,{value:f},d.createElement(Kt.Provider,{value:a},d.createElement(ur,null,u?d.createElement("div",{...Vt(a)},d.createElement("style",{dangerouslySetInnerHTML:{__html:[`${l}{${bt("lightMode"in u?u.lightMode:u)}}`,"darkMode"in u?`@media(prefers-color-scheme:dark){${l}{${bt(u.darkMode,{extends:u.lightMode})}}}`:null].join("")}}),r):r)))))))))}var Zt=(e,t)=>{const n=e.querySelectorAll("button:not(:disabled), a[href]");0!==n.length&&n["end"===t?n.length-1:0].focus()};function Xt(e){const t=(0,d.useRef)(null);return(0,d.useEffect)((()=>{const e=document.activeElement;return()=>{var t;null==(t=e.focus)||t.call(e)}}),[]),(0,d.useEffect)((()=>{if(t.current){const e=t.current.querySelector("[data-auto-focus]");e?e.focus():t.current.focus()}}),[t]),d.createElement(d.Fragment,null,d.createElement("div",{onFocus:(0,d.useCallback)((()=>t.current&&Zt(t.current,"end")),[]),tabIndex:0}),d.createElement("div",{ref:t,style:{outline:"none"},tabIndex:-1,...e}),d.createElement("div",{onFocus:(0,d.useCallback)((()=>t.current&&Zt(t.current,"start")),[]),tabIndex:0}))}var en=e=>e.stopPropagation();function tn({children:e,onClose:t,open:n,titleId:r}){(0,d.useEffect)((()=>{const e=e=>n&&"Escape"===e.key&&t();return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n,t]);const[o,a]=(0,d.useState)(!0);(0,d.useEffect)((()=>{a("hidden"!==getComputedStyle(window.document.body).overflow)}),[]);const i=(0,d.useCallback)((()=>t()),[t]),s=(()=>{const e=(0,d.useContext)(Kt);return Vt(e)})(),c=xe();return d.createElement(d.Fragment,null,n?(0,x.createPortal)(d.createElement(ae,{enabled:o},d.createElement(Ce,{...s},d.createElement(Ce,{...s,alignItems:c?"flex-end":"center","aria-labelledby":r,"aria-modal":!0,className:"_9pm4ki3 ju367v9b ju367vax ju367va ju367v2l ju367v8l",onClick:i,position:"fixed",role:"dialog"},d.createElement(Xt,{className:"_9pm4ki5 ju367va ju367v10 ju367v8m",onClick:en,role:"document"},e)))),document.body):null)}var nn="_1ckjpok1 ju367vb0 ju367vdl ju367vp ju367vt ju367vv ju367vef ju367va ju367v10 ju367v67 ju367v8m",rn="_1ckjpok6 ju367vq";function on({bottomSheetOnMobile:e=!1,children:t,marginTop:n,padding:r="16",wide:o=!1}){const a=xe(),i=(0,d.useContext)(xt)===Et;return d.createElement(Ce,{marginTop:n},d.createElement(Ce,{className:[o?a?"_1ckjpok2 _1ckjpok1 ju367vb0 ju367vdl ju367vp ju367vt ju367vv ju367vef ju367va ju367v10 ju367v67 ju367v8m":i?"_1ckjpok4 _1ckjpok1 ju367vb0 ju367vdl ju367vp ju367vt ju367vv ju367vef ju367va ju367v10 ju367v67 ju367v8m":"_1ckjpok3 _1ckjpok1 ju367vb0 ju367vdl ju367vp ju367vt ju367vv ju367vef ju367va ju367v10 ju367v67 ju367v8m":nn,a?rn:null,a&&e?"_1ckjpok7":null].join(" ")},d.createElement(Ce,{padding:r},t)))}var an=["k","m","b","t"];function sn(e,t=1){return e.toString().replace(new RegExp(`(.+\\.\\d{${t}})\\d+`),"$1").replace(/(\.[1-9]*)0+$/,"$1").replace(/\.$/,"")}function cn(e){if(e<1)return sn(e,3);if(e<100)return sn(e,2);if(e<1e4)return(new Intl.NumberFormat).format(parseFloat(sn(e,1)));let t=String(e);for(let n=an.length-1;n>=0;n--){const r=10**(3*(n+1));if(r<=e){t=sn(e=10*e/r/10,1)+an[n];break}}return t}function un(e){return e.length<8?e:`${e.substring(0,4)}...${e.substring(e.length-4)}`}function ln(e){const t=e.split("."),n=t.pop();return t.join(".").length>24?`${t.join(".").substring(0,24)}...`:`${t.join(".")}.${n}`}var dn=()=>d.createElement("svg",{fill:"none",height:"13",viewBox:"0 0 13 13",width:"13",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M4.94568 12.2646C5.41052 12.2646 5.77283 12.0869 6.01892 11.7109L12.39 1.96973C12.5677 1.69629 12.6429 1.44336 12.6429 1.2041C12.6429 0.561523 12.1644 0.0966797 11.5082 0.0966797C11.057 0.0966797 10.7767 0.260742 10.5033 0.691406L4.9115 9.50977L2.07458 5.98926C1.82166 5.68848 1.54822 5.55176 1.16541 5.55176C0.502319 5.55176 0.0238037 6.02344 0.0238037 6.66602C0.0238037 6.95312 0.112671 7.20605 0.358765 7.48633L3.88611 11.7588C4.18005 12.1074 4.50818 12.2646 4.94568 12.2646Z",fill:"currentColor"})),fn=()=>d.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 17 16",width:"17",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027ZM3.23376 10.5391C2.68689 10.5391 2.39294 10.2656 2.39294 9.68457V3.06055C2.39294 2.47949 2.68689 2.21289 3.23376 2.21289H9.8783C10.4252 2.21289 10.7191 2.47949 10.7191 3.06055V3.84668H6.59705C5.03845 3.84668 4.18396 4.69434 4.18396 6.24609V10.5391H3.23376ZM6.78845 13.9365C6.24158 13.9365 5.94763 13.6699 5.94763 13.0889V6.45801C5.94763 5.87695 6.24158 5.61035 6.78845 5.61035H13.433C13.9799 5.61035 14.2738 5.87695 14.2738 6.45801V13.0889C14.2738 13.6699 13.9799 13.9365 13.433 13.9365H6.78845Z",fill:"currentColor"})),hn=()=>d.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 18 16",width:"18",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M2.67834 15.5908H9.99963C11.5514 15.5908 12.399 14.7432 12.399 13.1777V10.2656H10.6354V12.9863C10.6354 13.5332 10.3688 13.8271 9.78772 13.8271H2.89026C2.3092 13.8271 2.0426 13.5332 2.0426 12.9863V3.15625C2.0426 2.60254 2.3092 2.30859 2.89026 2.30859H9.78772C10.3688 2.30859 10.6354 2.60254 10.6354 3.15625V5.89746H12.399V2.95801C12.399 1.39941 11.5514 0.544922 9.99963 0.544922H2.67834C1.12659 0.544922 0.278931 1.39941 0.278931 2.95801V13.1777C0.278931 14.7432 1.12659 15.5908 2.67834 15.5908ZM7.43616 8.85059H14.0875L15.0924 8.78906L14.566 9.14453L13.6842 9.96484C13.5406 10.1016 13.4586 10.2861 13.4586 10.4844C13.4586 10.8398 13.7321 11.168 14.1217 11.168C14.3199 11.168 14.4635 11.0928 14.6002 10.9561L16.7809 8.68652C16.986 8.48145 17.0543 8.27637 17.0543 8.06445C17.0543 7.85254 16.986 7.64746 16.7809 7.43555L14.6002 5.17285C14.4635 5.03613 14.3199 4.9541 14.1217 4.9541C13.7321 4.9541 13.4586 5.27539 13.4586 5.6377C13.4586 5.83594 13.5406 6.02734 13.6842 6.15723L14.566 6.98438L15.0924 7.33984L14.0875 7.27148H7.43616C7.01917 7.27148 6.65686 7.62012 6.65686 8.06445C6.65686 8.50195 7.01917 8.85059 7.43616 8.85059Z",fill:"currentColor"}));var pn=e=>{var t,n;return null==(n=null==(t=null==e?void 0:e.blockExplorers)?void 0:t.default)?void 0:n.url},mn=()=>d.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM12.7158 12.1416C13.2432 12.1416 13.5684 11.7549 13.5684 11.1836V7.19336C13.5684 6.44629 13.1377 6.05957 12.417 6.05957H8.40918C7.8291 6.05957 7.45117 6.38477 7.45117 6.91211C7.45117 7.43945 7.8291 7.77344 8.40918 7.77344H9.69238L10.7207 7.63281L9.53418 8.67871L6.73047 11.4912C6.53711 11.6758 6.41406 11.9395 6.41406 12.2031C6.41406 12.7832 6.85352 13.1699 7.39844 13.1699C7.68848 13.1699 7.92578 13.0732 8.1543 12.8623L10.9316 10.0762L11.9775 8.89844L11.8545 9.98828V11.1836C11.8545 11.7725 12.1885 12.1416 12.7158 12.1416Z",fill:"currentColor"})),bn=()=>d.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM7.29297 13.3018C7.58301 13.3018 7.81152 13.2139 7.99609 13.0205L10 11.0166L12.0127 13.0205C12.1973 13.2051 12.4258 13.3018 12.707 13.3018C13.2432 13.3018 13.6562 12.8887 13.6562 12.3525C13.6562 12.0977 13.5508 11.8691 13.3662 11.6934L11.3535 9.67188L13.375 7.6416C13.5596 7.44824 13.6562 7.22852 13.6562 6.98242C13.6562 6.44629 13.2432 6.0332 12.7158 6.0332C12.4346 6.0332 12.2148 6.12109 12.0215 6.31445L10 8.32715L7.9873 6.32324C7.80273 6.12988 7.58301 6.04199 7.29297 6.04199C6.76562 6.04199 6.35254 6.45508 6.35254 6.99121C6.35254 7.2373 6.44922 7.46582 6.63379 7.6416L8.65527 9.67188L6.63379 11.6934C6.44922 11.8691 6.35254 12.1064 6.35254 12.3525C6.35254 12.8887 6.76562 13.3018 7.29297 13.3018Z",fill:"currentColor"})),gn=()=>d.createElement("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M10 19.4443C15.0977 19.4443 19.2812 15.252 19.2812 10.1543C19.2812 5.06543 15.0889 0.873047 10 0.873047C4.90234 0.873047 0.71875 5.06543 0.71875 10.1543C0.71875 15.252 4.91113 19.4443 10 19.4443ZM10 17.1328C6.1416 17.1328 3.03906 14.0215 3.03906 10.1543C3.03906 6.2959 6.13281 3.18457 10 3.18457C13.8584 3.18457 16.9697 6.2959 16.9697 10.1543C16.9785 14.0215 13.8672 17.1328 10 17.1328ZM9.07715 14.3379C9.4375 14.3379 9.7627 14.1533 9.97363 13.8369L13.7441 8.00977C13.8848 7.79883 13.9814 7.5791 13.9814 7.36816C13.9814 6.84961 13.5244 6.48926 13.0322 6.48926C12.707 6.48926 12.4258 6.66504 12.2148 7.0166L9.05957 12.0967L7.5918 10.2949C7.37207 10.0225 7.13477 9.9082 6.84473 9.9082C6.33496 9.9082 5.92188 10.3125 5.92188 10.8223C5.92188 11.0684 6.00098 11.2793 6.18555 11.5078L8.1543 13.8545C8.40918 14.1709 8.70801 14.3379 9.07715 14.3379Z",fill:"currentColor"}));function yn({tx:e}){const t=xe(),n=(e=>{switch(e){case"pending":default:return ke;case"confirmed":return gn;case"failed":return bn}})(e.status),r="failed"===e.status?"error":"accentColor",{chain:o}=(0,w.LN)(),a="confirmed"===e.status?"Confirmed":"failed"===e.status?"Failed":"Pending",i=pn(o);return d.createElement(d.Fragment,null,d.createElement(Ce,{...i?{as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:ge({active:"shrink"}),href:`${i}/tx/${e.hash}`,rel:"noreferrer noopener",target:"_blank",transition:"default"}:{},color:"modalText",display:"flex",flexDirection:"row",justifyContent:"space-between",padding:"8",width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:t?"16":"14"},d.createElement(Ce,{color:r},d.createElement(n,null)),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:t?"3":"1"},d.createElement(Ce,null,d.createElement(Ft,{color:"modalText",font:"body",size:t?"16":"14",weight:"bold"},null==e?void 0:e.description)),d.createElement(Ce,null,d.createElement(Ft,{color:"pending"===e.status?"modalTextSecondary":r,font:"body",size:"14",weight:t?"medium":"regular"},a)))),i&&d.createElement(Ce,{alignItems:"center",color:"modalTextDim",display:"flex"},d.createElement(mn,null))))}function vn({address:e}){const t=pt(),n=function(){const e=ht(),{address:t}=(0,w.mA)(),n=at();return(0,d.useCallback)((()=>{if(!t||!n)throw new Error("No address or chain ID found");e.clearTransactions(t,n)}),[e,t,n])}(),{chain:r}=(0,w.LN)(),o=pn(r),a=t.slice(0,3),i=a.length>0,s=xe(),{appName:c}=(0,d.useContext)(vt);return d.createElement(d.Fragment,null,d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"10",paddingBottom:"2",paddingTop:"16",paddingX:s?"8":"18"},i&&d.createElement(Ce,{paddingBottom:s?"4":"0",paddingTop:"8",paddingX:s?"12":"6"},d.createElement(Ce,{display:"flex",justifyContent:"space-between"},d.createElement(Ft,{color:"modalTextSecondary",size:s?"16":"14",weight:"bold"},"Recent Transactions"),d.createElement(Ce,{style:{marginBottom:-6,marginLeft:-10,marginRight:-10,marginTop:-6}},d.createElement(Ce,{as:"button",background:{hover:"profileForeground"},borderRadius:"actionButton",className:ge({active:"shrink"}),onClick:n,paddingX:s?"8":"12",paddingY:s?"4":"5",transition:"default",type:"button"},d.createElement(Ft,{color:"modalTextSecondary",size:s?"16":"14",weight:"bold"},"Clear All"))))),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},i?a.map((e=>d.createElement(yn,{key:e.hash,tx:e}))):d.createElement(d.Fragment,null,d.createElement(Ce,{padding:s?"12":"8"},d.createElement(Ft,{color:"modalTextDim",size:s?"16":"14",weight:s?"medium":"bold"},null!=c?c:"Your"," transactions will appear here...")),s&&d.createElement(Ce,{background:"generalBorderDim",height:"1",marginX:"12",marginY:"8"})))),o&&d.createElement(Ce,{paddingBottom:"18",paddingX:s?"8":"18"},d.createElement(Ce,{alignItems:"center",as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:ge({active:"shrink"}),color:"modalTextDim",display:"flex",flexDirection:"row",href:`${o}/address/${e}`,justifyContent:"space-between",paddingX:"8",paddingY:"12",rel:"noreferrer noopener",style:{willChange:"transform"},target:"_blank",transition:"default",width:"full",...s?{paddingLeft:"12"}:{}},d.createElement(Ft,{color:"modalText",font:"body",size:s?"16":"14",weight:s?"semibold":"bold"},"View more on Explorer"),d.createElement(mn,null))))}function wn({action:e,icon:t,label:n,testId:r,url:o}){const a=xe();return d.createElement(Ce,{...o?{as:"a",href:o,rel:"noreferrer noopener",target:"_blank"}:{as:"button",type:"button"},background:{base:"profileAction",...a?{}:{hover:"profileActionHover"}},borderRadius:"menuButton",boxShadow:"profileDetailsAction",className:ge({active:"shrinkSm",hover:a?void 0:"grow"}),display:"flex",onClick:e,padding:a?"6":"8",style:{willChange:"transform"},testId:r,transition:"default",width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"1",justifyContent:"center",paddingTop:"2",width:"full"},d.createElement(Ce,{color:"modalText",height:"max"},t),d.createElement(Ce,null,d.createElement(Ft,{color:"modalText",size:a?"12":"13",weight:"bold"},n))))}function En({address:e,balanceData:t,ensAvatar:n,ensName:r,onClose:o,onDisconnect:a}){const i=(0,d.useContext)(Pt),[s,c]=(0,d.useState)(!1),u=(0,d.useCallback)((()=>{e&&(navigator.clipboard.writeText(e),c(!0))}),[e]);if((0,d.useEffect)((()=>{if(s){const e=setTimeout((()=>{c(!1)}),1500);return()=>clearTimeout(e)}}),[s]),!e)return null;const l=r?ln(r):un(e),f=null==t?void 0:t.formatted,h=f?cn(parseFloat(f)):void 0,p="rk_profile_title",m=xe();return d.createElement(d.Fragment,null,d.createElement(Ce,{display:"flex",flexDirection:"column"},d.createElement(Ce,{background:"profileForeground",padding:"16"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:m?"16":"12",justifyContent:"center",margin:"8",style:{textAlign:"center"}},d.createElement(Ce,{style:{position:"absolute",right:16,top:16,willChange:"transform"}},d.createElement(qt,{onClose:o}))," ",d.createElement(Ce,{marginTop:m?"24":"0"},d.createElement(Fe,{address:e,imageUrl:n,size:m?82:74})),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:m?"4":"0",textAlign:"center"},d.createElement(Ce,{textAlign:"center"},d.createElement(Ft,{as:"h2",color:"modalText",id:p,size:m?"20":"18",weight:"heavy"},l)),t&&d.createElement(Ce,{textAlign:"center"},d.createElement(Ft,{as:"h2",color:"modalTextSecondary",id:p,size:m?"16":"14",weight:"bold"},h," ",t.symbol)))),d.createElement(Ce,{display:"flex",flexDirection:"row",gap:"8",margin:"2",marginTop:"16"},d.createElement(wn,{action:u,icon:s?d.createElement(dn,null):d.createElement(fn,null),label:s?"Copied!":"Copy Address"}),d.createElement(wn,{action:a,icon:d.createElement(hn,null),label:"Disconnect",testId:"disconnect-button"}))),i&&d.createElement(d.Fragment,null,d.createElement(Ce,{background:"generalBorder",height:"1",marginTop:"-1"}),d.createElement(Ce,null,d.createElement(vn,{address:e})))))}function An({onClose:e,open:t}){const{address:n}=(0,w.mA)(),{data:r}=(0,w.KQ)({address:n}),o=ot(n),a=rt(o),{disconnect:i}=(0,w.qL)();if(!n)return null;return d.createElement(d.Fragment,null,n&&d.createElement(tn,{onClose:e,open:t,titleId:"rk_account_modal_title"},d.createElement(on,{bottomSheetOnMobile:!0,padding:"0"},d.createElement(En,{address:n,balanceData:r,ensAvatar:a,ensName:o,onClose:e,onDisconnect:i}))))}var xn=({size:e})=>d.createElement("svg",{fill:"none",height:e,viewBox:"0 0 28 28",width:e,xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M6.742 22.195h8.367c1.774 0 2.743-.968 2.743-2.758V16.11h-2.016v3.11c0 .625-.305.96-.969.96H6.984c-.664 0-.968-.335-.968-.96V7.984c0-.632.304-.968.968-.968h7.883c.664 0 .969.336.969.968v3.133h2.016v-3.36c0-1.78-.97-2.757-2.743-2.757H6.742C4.97 5 4 5.977 4 7.758v11.68c0 1.789.969 2.757 2.742 2.757Zm5.438-7.703h7.601l1.149-.07-.602.406-1.008.938a.816.816 0 0 0-.258.593c0 .407.313.782.758.782.227 0 .39-.086.547-.243l2.492-2.593c.235-.235.313-.47.313-.711 0-.242-.078-.477-.313-.719l-2.492-2.586c-.156-.156-.32-.25-.547-.25-.445 0-.758.367-.758.781 0 .227.094.446.258.594l1.008.945.602.407-1.149-.079H12.18a.904.904 0 0 0 0 1.805Z",fill:"currentColor"})),Pn=d.forwardRef((({children:e,currentlySelected:t=!1,onClick:n,testId:r,...o},a)=>{const i=xe();return d.createElement(Ce,{as:"button",borderRadius:"menuButton",disabled:t,display:"flex",onClick:n,ref:a,testId:r,type:"button"},d.createElement(Ce,{borderRadius:"menuButton",className:[i?"v9horb0":void 0,!t&&ge({active:"shrink"})],padding:i?"8":"6",transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",borderStyle:"solid",borderWidth:"1",boxShadow:"selectedOption",color:"accentColorForeground"}:{background:{hover:"menuItemBackground"},color:"modalText",transition:"default"},...o},e))}));function Cn({onClose:e,open:t}){var n;const{chain:r}=(0,w.LN)(),{chains:o,pendingChainId:a,reset:i,switchNetwork:s}=(0,w.g0)({onSettled:()=>{i(),e()}}),{disconnect:c}=(0,w.qL)(),u="rk_chain_modal_title",l=xe(),f=null!=(n=null==r?void 0:r.unsupported)&&n,h=l?"36":"28",{appName:p}=(0,d.useContext)(vt),m=tt();return r&&(null==r?void 0:r.id)?d.createElement(tn,{onClose:e,open:t,titleId:u},d.createElement(on,{bottomSheetOnMobile:!0},d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"14"},d.createElement(Ce,{display:"flex",flexDirection:"row",justifyContent:"space-between"},l&&d.createElement(Ce,{width:"30"}),d.createElement(Ce,{paddingBottom:"0",paddingLeft:"8",paddingTop:"4"},d.createElement(Ft,{as:"h1",color:"modalText",id:u,size:l?"20":"18",weight:"heavy"},"Switch Networks")),d.createElement(qt,{onClose:e})),f&&d.createElement(Ce,{marginX:"8",textAlign:l?"center":"left"},d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},"Wrong network detected, switch or disconnect to continue")),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4",padding:"2"},s?m.map((({iconBackground:e,iconUrl:t,id:n,name:i},c)=>{const u=o.find((e=>e.id===n));if(!u)return null;const f=u.id===(null==r?void 0:r.id),p=!f&&u.id===a;return d.createElement(d.Fragment,{key:u.id},d.createElement(Pn,{currentlySelected:f,onClick:f?void 0:()=>s(u.id),testId:`chain-option-${u.id}`},d.createElement(Ce,{fontFamily:"body",fontSize:"16",fontWeight:"bold"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:h},t&&d.createElement(Ce,{height:"full",marginRight:"8"},d.createElement(Be,{alt:null!=i?i:u.name,background:e,borderRadius:"full",height:h,src:t,width:h})),d.createElement("div",null,null!=i?i:u.name)),f&&d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},d.createElement(Ft,{color:"accentColorForeground",size:"14",weight:"bold"},"Connected"),d.createElement(Ce,{background:"connectionIndicator",borderColor:"selectedOptionBorder",borderRadius:"full",borderStyle:"solid",borderWidth:"1",height:"8",marginLeft:"8",width:"8"})),p&&d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},d.createElement(Ft,{color:"modalText",size:"14",weight:"bold"},"Confirm in Wallet"),d.createElement(Ce,{background:"standby",borderRadius:"full",height:"8",marginLeft:"8",width:"8"}))))),l&&cc(),testId:"chain-option-disconnect"},d.createElement(Ce,{color:"error",fontFamily:"body",fontSize:"16",fontWeight:"bold"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:h},d.createElement(Ce,{alignItems:"center",color:"error",height:h,justifyContent:"center",marginRight:"8"},d.createElement(xn,{size:Number(h)})),d.createElement("div",null,"Disconnect")))))))))):null}Pn.displayName="MenuButton";var jn=({children:e,href:t})=>d.createElement(Ce,{as:"a",color:"accentColor",href:t,rel:"noreferrer",target:"_blank"},e),In=({children:e})=>d.createElement(Ft,{color:"modalTextSecondary",size:"12",weight:"bold"},e);function On({compactModeEnabled:e=!1,getWallet:t}){const{disclaimer:n,learnMoreUrl:r}=(0,d.useContext)(vt);return d.createElement(d.Fragment,null,d.createElement(Ce,{alignItems:"center",color:"accentColor",display:"flex",flexDirection:"column",height:"full",justifyContent:"space-around"},d.createElement(Ce,{marginBottom:"10"},!e&&d.createElement(Ft,{color:"modalText",size:"23",weight:"heavy"},"NameSys")),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"32",justifyContent:"center",marginY:"20",style:{maxWidth:312}},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},d.createElement(Ce,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},d.createElement(Nt,null)),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},d.createElement(Ft,{color:"modalText",size:"16",weight:"bold"},"ENS Off-Chain Records Manager"),d.createElement(Ft,{color:"modalTextSecondary",size:"12",weight:"bold"},"Set your Records on Secure and Decentralised IPFS storage"))),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},d.createElement(Ce,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},d.createElement(Rt,null)),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},d.createElement(Ft,{color:"modalText",size:"16",weight:"bold"},"No More Gas Fees"),d.createElement(Ft,{color:"modalTextSecondary",size:"12",weight:"bold"},"Set your ENS Records for Free without worrying about Gas")))),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",margin:"10"},d.createElement(Lt,{label:"Get a Wallet",onClick:t}),d.createElement(Ce,{as:"a",className:ge({active:"shrink",hover:"grow"}),display:"block",href:r,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},d.createElement(Ft,{color:"accentColor",size:"14",weight:"bold"},"Learn More"))),n&&!e&&d.createElement(Ce,{marginBottom:"8",marginTop:"12",textAlign:"center"},d.createElement(n,{Link:jn,Text:In}))))}var Tn=()=>d.createElement("svg",{fill:"none",height:"17",viewBox:"0 0 11 17",width:"11",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M0.99707 8.6543C0.99707 9.08496 1.15527 9.44531 1.51562 9.79688L8.16016 16.3096C8.43262 16.5732 8.74902 16.7051 9.13574 16.7051C9.90918 16.7051 10.5508 16.0811 10.5508 15.3076C10.5508 14.9121 10.3838 14.5605 10.0938 14.2705L4.30176 8.64551L10.0938 3.0293C10.3838 2.74805 10.5508 2.3877 10.5508 2.00098C10.5508 1.23633 9.90918 0.603516 9.13574 0.603516C8.74902 0.603516 8.43262 0.735352 8.16016 0.999023L1.51562 7.51172C1.15527 7.85449 1.00586 8.21484 0.99707 8.6543Z",fill:"currentColor"})),Sn=()=>d.createElement("svg",{fill:"none",height:"12",viewBox:"0 0 8 12",width:"8",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M3.64258 7.99609C4.19336 7.99609 4.5625 7.73828 4.68555 7.24609C4.69141 7.21094 4.70312 7.16406 4.70898 7.13477C4.80859 6.60742 5.05469 6.35547 6.04492 5.76367C7.14648 5.10156 7.67969 4.3457 7.67969 3.24414C7.67969 1.39844 6.17383 0.255859 3.95898 0.255859C2.32422 0.255859 1.05859 0.894531 0.548828 1.86719C0.396484 2.14844 0.320312 2.44727 0.320312 2.74023C0.314453 3.37305 0.742188 3.79492 1.42188 3.79492C1.91406 3.79492 2.33594 3.54883 2.53516 3.11523C2.78711 2.47656 3.23242 2.21289 3.83594 2.21289C4.55664 2.21289 5.10742 2.65234 5.10742 3.29102C5.10742 3.9707 4.7793 4.29883 3.81836 4.87891C3.02148 5.36523 2.50586 5.92773 2.50586 6.76562V6.90039C2.50586 7.55664 2.96289 7.99609 3.64258 7.99609ZM3.67188 11.4473C4.42773 11.4473 5.04297 10.8672 5.04297 10.1406C5.04297 9.41406 4.42773 8.83984 3.67188 8.83984C2.91602 8.83984 2.30664 9.41406 2.30664 10.1406C2.30664 10.8672 2.91602 11.4473 3.67188 11.4473Z",fill:"currentColor"})),Bn=({"aria-label":e="Info",onClick:t})=>{const n=xe();return d.createElement(Ce,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:ge({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},d.createElement(Sn,null))},kn=e=>{const t=(0,d.useRef)(null),n=(0,d.useContext)(wt),r=Se(e);return(0,d.useEffect)((()=>{if(n&&t.current&&r)return function(e,t){_n++;const n=[15,20,25,35,45],r=35;let o=[],a=!1,i=0,s=0;const c=(()=>{const e="_rk_coolMode",t=document.getElementById(e);if(t)return t;const n=document.createElement("div");return n.setAttribute("id",e),n.setAttribute("style",["overflow:hidden","position:fixed","height:100%","top:0","left:0","right:0","bottom:0","pointer-events:none","z-index:2147483647"].join(";")),document.body.appendChild(n),n})();function u(){const e=n[Math.floor(Math.random()*n.length)],r=10*Math.random(),a=25*Math.random(),u=360*Math.random(),l=35*Math.random()*(Math.random()<=.5?-1:1),d=s-e/2,f=i-e/2,h=Math.random()<=.5?-1:1,p=document.createElement("div");p.innerHTML=``,p.setAttribute("style",["position:absolute","will-change:transform",`top:${d}px`,`left:${f}px`,`transform:rotate(${u}deg)`].join(";")),c.appendChild(p),o.push({direction:h,element:p,left:f,size:e,speedHorz:r,speedUp:a,spinSpeed:l,spinVal:u,top:d})}function l(){o.forEach((e=>{e.left=e.left-e.speedHorz*e.direction,e.top=e.top-e.speedUp,e.speedUp=Math.min(e.size,e.speedUp-1),e.spinVal=e.spinVal+e.spinSpeed,e.top>=Math.max(window.innerHeight,document.body.clientHeight)+e.size&&(o=o.filter((t=>t!==e)),e.element.remove()),e.element.setAttribute("style",["position:absolute","will-change:transform",`top:${e.top}px`,`left:${e.left}px`,`transform:rotate(${e.spinVal}deg)`].join(";"))}))}let d;function f(){a&&o.length{var t,n;"touches"in e?(i=null==(t=e.touches)?void 0:t[0].clientX,s=null==(n=e.touches)?void 0:n[0].clientY):(i=e.clientX,s=e.clientY)},y=e=>{g(e),a=!0},v=()=>{a=!1};return e.addEventListener(b,g,{passive:!1}),e.addEventListener(p,y),e.addEventListener(m,v),e.addEventListener("mouseleave",v),()=>{e.removeEventListener(b,g),e.removeEventListener(p,y),e.removeEventListener(m,v),e.removeEventListener("mouseleave",v);let t=setInterval((()=>{d&&0===o.length&&(cancelAnimationFrame(d),clearInterval(t),0===--_n&&c.remove())}),500)}}(t.current,r)}),[n,r]),t},_n=0;var Nn=({as:e="button",currentlySelected:t=!1,iconBackground:n,iconUrl:r,name:o,onClick:a,ready:i,recent:s,testId:c,...u})=>{const l=kn(r),[f,h]=(0,d.useState)(!1);return d.createElement(Ce,{display:"flex",flexDirection:"column",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),ref:l},d.createElement(Ce,{as:e,borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:t?void 0:["g5kl0l0",ge({active:"shrink"})],disabled:t,onClick:a,padding:"5",style:{willChange:"transform"},testId:c,transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",boxShadow:"selectedWallet"}:{background:{hover:"menuItemBackground"}},...u},d.createElement(Ce,{color:t?"accentColorForeground":"modalText",disabled:!i,fontFamily:"body",fontSize:"16",fontWeight:"bold",transition:"default"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"12"},d.createElement(Be,{background:n,...f?{}:{borderColor:"actionButtonBorder"},borderRadius:"6",height:"28",src:r,width:"28"}),d.createElement(Ce,null,d.createElement(Ce,{style:{marginTop:s?-2:void 0}},o),s&&d.createElement(Ft,{color:t?"accentColorForeground":"accentColor",size:"12",style:{lineHeight:1,marginTop:-1},weight:"bold"},"Recent"))))))};Nn.displayName="ModalSelection";var Mn=(e,t=1)=>{let n=e.replace("#","");3===n.length&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);return t>1&&t<=100&&(t/=100),`rgba(${parseInt(n.substring(0,2),16)},${parseInt(n.substring(2,4),16)},${parseInt(n.substring(4,6),16)},${t})`},Rn=e=>/^#([0-9a-f]{3}){1,2}$/i.test(e),Fn=async()=>(await n.e(8137).then(n.bind(n,68137))).default,Un=()=>Te(Fn),Ln=()=>d.createElement(Be,{background:"#e3a5e8",borderColor:"generalBorder",borderRadius:"10",height:"48",src:Fn,width:"48"}),Dn=async()=>(await n.e(1748).then(n.bind(n,31748))).default,qn=()=>d.createElement(Be,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:Dn,width:"48"}),Hn=async()=>(await n.e(5806).then(n.bind(n,75806))).default,zn=()=>Te(Hn),Gn=()=>d.createElement(Be,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:Hn,width:"48"});function $n({ecl:e="M",logoBackground:t,logoMargin:n=10,logoSize:r=50,logoUrl:o,size:a=200,uri:i}){const s=a-2*parseInt("20",10),c=(0,d.useMemo)((()=>{const t=[],n=((e,t)=>{const n=Array.prototype.slice.call(le.create(e,{errorCorrectionLevel:t}).modules.data,0),r=Math.sqrt(n.length);return n.reduce(((e,t,n)=>(n%r===0?e.push([t]):e[e.length-1].push(t))&&e),[])})(i,e),o=s/n.length;[{x:0,y:0},{x:1,y:0},{x:0,y:1}].forEach((({x:e,y:r})=>{const a=(n.length-7)*o*e,i=(n.length-7)*o*r;for(let n=0;n<3;n++)t.push(d.createElement("rect",{fill:n%2!==0?"white":"black",height:o*(7-2*n),key:`${n}-${e}-${r}`,rx:-5*(n-2)+(0===n?2:0),ry:-5*(n-2)+(0===n?2:0),width:o*(7-2*n),x:a+o*n,y:i+o*n}))}));const a=Math.floor((r+25)/o),c=n.length/2-a/2,u=n.length/2+a/2-1;return n.forEach(((e,r)=>{e.forEach(((e,a)=>{n[r][a]&&(r<7&&a<7||r>n.length-8&&a<7||r<7&&a>n.length-8||r>c&&rc&&a{switch(jt()){case"Arc":return(await n.e(6328).then(n.bind(n,76328))).default;case"Brave":return(await n.e(6551).then(n.bind(n,86551))).default;case"Chrome":return(await n.e(7682).then(n.bind(n,57682))).default;case"Edge":return(await n.e(934).then(n.bind(n,60934))).default;case"Firefox":return(await n.e(9223).then(n.bind(n,99223))).default;case"Opera":return(await n.e(9941).then(n.bind(n,89941))).default;case"Safari":return(await n.e(2604).then(n.bind(n,62604))).default;default:return(await n.e(2746).then(n.bind(n,92746))).default}};function Kn({getWalletDownload:e}){const t=kt().splice(0,5);return d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginTop:"18",width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"28",height:"full",width:"full"},null==t?void 0:t.filter((e=>{var t;return e.extensionDownloadUrl||e.qrCode&&(null==(t=e.downloadUrls)?void 0:t.qrCode)})).map((t=>{const{downloadUrls:n,iconBackground:r,iconUrl:o,id:a,name:i,qrCode:s}=t,c=(null==n?void 0:n.qrCode)&&s,u=!!t.extensionDownloadUrl,l=(null==n?void 0:n.qrCode)&&u;return d.createElement(Ce,{alignItems:"center",display:"flex",gap:"16",justifyContent:"space-between",key:t.id,width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},d.createElement(Be,{background:r,borderColor:"actionButtonBorder",borderRadius:"10",height:"48",src:o,width:"48"}),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"2"},d.createElement(Ft,{color:"modalText",size:"16",weight:"bold"},i),d.createElement(Ft,{color:"modalTextSecondary",size:"12",weight:"bold"},l?"Mobile Wallet and Extension":c?"Mobile Wallet":u?"Browser Extension":null))),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},d.createElement(Lt,{label:"GET",onClick:()=>e(a),type:"secondary"})))}))),d.createElement(Ce,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"column",gap:"8",justifyContent:"space-between",marginBottom:"4",paddingY:"8",style:{maxWidth:275,textAlign:"center"}},d.createElement(Ft,{color:"modalText",size:"14",weight:"bold"},"Not what you\u2019re looking for?"),d.createElement(Ft,{color:"modalTextSecondary",size:"12",weight:"bold"},"Select a wallet on the left to get started with a different wallet provider")))}var Qn="44";function Vn({changeWalletStep:e,compactModeEnabled:t,connectionError:n,onClose:r,qrCodeUri:o,reconnect:a,wallet:i}){var s;const{downloadUrls:c,iconBackground:u,iconUrl:l,name:f,qrCode:h,ready:p,showWalletConnectModal:m}=i,b=null==(s=i.desktop)?void 0:s.getUri,g=Ct(),y=!!i.extensionDownloadUrl,v=(null==c?void 0:c.qrCode)&&y,w=h&&o,E=m?{description:"Open WalletConnect modal",label:"OPEN",onClick:()=>{r(),m()}}:w?{description:`Get the ${f} app`,label:"GET",onClick:()=>e(v?"DOWNLOAD_OPTIONS":"DOWNLOAD")}:null,{width:A}=gt(),x=A&&A<768;return(0,d.useEffect)((()=>{Te(Wn)}),[]),d.createElement(Ce,{display:"flex",flexDirection:"column",height:"full",width:"full"},w?d.createElement(Ce,{alignItems:"center",display:"flex",height:"full",justifyContent:"center"},d.createElement($n,{logoBackground:u,logoSize:t?60:72,logoUrl:l,size:t?318:x?Math.max(280,Math.min(A-308,382)):382,uri:o})):d.createElement(Ce,{alignItems:"center",display:"flex",justifyContent:"center",style:{flexGrow:1}},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8"},d.createElement(Ce,{borderRadius:"10",height:Qn,overflow:"hidden"},d.createElement(Be,{height:Qn,src:l,width:Qn})),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"4",paddingX:"32",style:{textAlign:"center"}},d.createElement(Ft,{color:"modalText",size:"18",weight:"bold"},p?`Opening ${f}...`:y?`${f} is not installed`:`${f} is not available`),!p&&y?d.createElement(Ce,{paddingTop:"20"},d.createElement(Lt,{href:i.extensionDownloadUrl,label:"INSTALL",type:"secondary"})):null,p&&!w&&d.createElement(d.Fragment,null,d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},d.createElement(Ft,{color:"modalTextSecondary",size:"14",textAlign:"center",weight:"bold"},"Confirm connection in the extension")),d.createElement(Ce,{alignItems:"center",color:"modalText",display:"flex",flexDirection:"row",height:"32",marginTop:"8"},n?d.createElement(Lt,{label:"RETRY",onClick:b?async()=>{const e=await b();window.open(e,g?"_blank":"_self")}:()=>{a(i)}}):d.createElement(Ce,{color:"modalTextSecondary"},d.createElement(ke,null))))))),d.createElement(Ce,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"28",justifyContent:"space-between",marginTop:"12"},p&&E&&d.createElement(d.Fragment,null,d.createElement(Ft,{size:"14",weight:"bold",color:"modalText"},E.description),d.createElement(Lt,{label:E.label,onClick:E.onClick,type:"secondary"}))))}var Jn=({actionLabel:e,description:t,iconAccent:n,iconBackground:r,iconUrl:o,isCompact:a,onAction:i,title:s,url:c,variant:u})=>{const l="browser"===u,f=!l&&n&&((h=n)?[Mn(h,.2),Mn(h,.14),Mn(h,.1)]:null);var h;return d.createElement(Ce,{alignItems:"center",borderRadius:"13",display:"flex",justifyContent:"center",overflow:"hidden",paddingX:a?"18":"44",position:"relative",style:{flex:1,isolation:"isolate"},width:"full"},d.createElement(Ce,{borderColor:"actionButtonBorder",borderRadius:"13",borderStyle:"solid",borderWidth:"1",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0",zIndex:1}}),l&&d.createElement(Ce,{background:"downloadTopCardBackground",height:"full",position:"absolute",style:{zIndex:0},width:"full"},d.createElement(Ce,{display:"flex",flexDirection:"row",justifyContent:"space-between",style:{bottom:"0",filter:"blur(20px)",left:"0",position:"absolute",right:"0",top:"0",transform:"translate3d(0, 0, 0)"}},d.createElement(Ce,{style:{filter:"blur(100px)",marginLeft:-27,marginTop:-20,opacity:.6,transform:"translate3d(0, 0, 0)"}},d.createElement(Be,{borderRadius:"full",height:"200",src:o,width:"200"})),d.createElement(Ce,{style:{filter:"blur(100px)",marginRight:0,marginTop:105,opacity:.6,overflow:"auto",transform:"translate3d(0, 0, 0)"}},d.createElement(Be,{borderRadius:"full",height:"200",src:o,width:"200"})))),!l&&f&&d.createElement(Ce,{background:"downloadBottomCardBackground",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0"}},d.createElement(Ce,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${f[0]} 0%, ${f[1]} 25%, rgba(0,0,0,0) 100%)`,height:564,left:-215,top:-197,transform:"translate3d(0, 0, 0)",width:564}}),d.createElement(Ce,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${f[2]} 0%, rgba(0, 0, 0, 0) 100%)`,height:564,left:-1,top:-76,transform:"translate3d(0, 0, 0)",width:564}})),d.createElement(Ce,{alignItems:"flex-start",display:"flex",flexDirection:"row",gap:"24",height:"max",justifyContent:"center",style:{zIndex:1}},d.createElement(Ce,null,d.createElement(Be,{height:"60",src:o,width:"60",...r?{background:r,borderColor:"generalBorder",borderRadius:"10"}:null})),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4",style:{flex:1},width:"full"},d.createElement(Ft,{color:"modalText",size:"14",weight:"bold"},s),d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},t),d.createElement(Ce,{marginTop:"14",width:"max"},d.createElement(Lt,{href:c,label:e,onClick:i,size:"medium"})))))};function Yn({changeWalletStep:e,wallet:t}){const n=jt(),r="compact"===(0,d.useContext)(xt),{extension:o,extensionDownloadUrl:a,mobileDownloadUrl:i}=t;return(0,d.useEffect)((()=>{Un(),zn(),Te(Dn)}),[]),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",marginBottom:"8",marginTop:"4",width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8",height:"full",justifyContent:"center",width:"full"},a&&d.createElement(Jn,{actionLabel:`Add to ${n}`,description:"Access your wallet right from your favorite web browser",iconUrl:Wn,isCompact:r,onAction:()=>e((null==o?void 0:o.instructions)?"INSTRUCTIONS_EXTENSION":"CONNECT"),title:`${t.name} for ${n}`,url:a,variant:"browser"}),i&&d.createElement(Jn,{actionLabel:"Get the app",description:"Use the mobile wallet to explore the world of Ethereum",iconAccent:t.iconAccent,iconBackground:t.iconBackground,iconUrl:t.iconUrl,isCompact:r,onAction:()=>{e("DOWNLOAD")},title:`${t.name} for Mobile`,variant:"app"})))}function Zn({changeWalletStep:e,wallet:t}){const{downloadUrls:n,qrCode:r}=t;return(0,d.useEffect)((()=>{Un(),zn()}),[]),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",width:"full"},d.createElement(Ce,{style:{maxWidth:220,textAlign:"center"}},d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},"Scan with your phone to download on iOS or Android")),d.createElement(Ce,{height:"full"},(null==n?void 0:n.qrCode)?d.createElement($n,{logoSize:0,size:268,uri:n.qrCode}):null),d.createElement(Ce,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"34",justifyContent:"space-between",marginBottom:"12",paddingY:"8"},d.createElement(Lt,{label:"Continue",onClick:()=>e((null==r?void 0:r.instructions)?"INSTRUCTIONS_MOBILE":"CONNECT")})))}var Xn={create:()=>d.createElement(Ln,null),install:e=>d.createElement(Be,{background:e.iconBackground,borderColor:"generalBorder",borderRadius:"10",height:"48",src:e.iconUrl,width:"48"}),refresh:()=>d.createElement(qn,null),scan:()=>d.createElement(Gn,null)};function er({connectWallet:e,wallet:t}){var n,r,o,a;return d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},null==(r=null==(n=null==t?void 0:t.qrCode)?void 0:n.instructions)?void 0:r.steps.map(((e,n)=>{var r;return d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:n},d.createElement(Ce,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},null==(r=Xn[e.step])?void 0:r.call(Xn,t)),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},d.createElement(Ft,{color:"modalText",size:"16",weight:"bold"},e.title),d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},e.description)))}))),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},d.createElement(Lt,{label:"Connect",onClick:()=>e(t)}),d.createElement(Ce,{as:"a",className:ge({active:"shrink",hover:"grow"}),display:"block",href:null==(a=null==(o=null==t?void 0:t.qrCode)?void 0:o.instructions)?void 0:a.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},d.createElement(Ft,{color:"accentColor",size:"14",weight:"bold"},"Learn More"))))}function tr({wallet:e}){var t,n,r,o;return d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},null==(n=null==(t=null==e?void 0:e.extension)?void 0:t.instructions)?void 0:n.steps.map(((t,n)=>{var r;return d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:n},d.createElement(Ce,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},null==(r=Xn[t.step])?void 0:r.call(Xn,e)),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},d.createElement(Ft,{color:"modalText",size:"16",weight:"bold"},t.title),d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},t.description)))}))),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},d.createElement(Lt,{label:"Refresh",onClick:window.location.reload.bind(window.location)}),d.createElement(Ce,{as:"a",className:ge({active:"shrink",hover:"grow"}),display:"block",href:null==(o=null==(r=null==e?void 0:e.extension)?void 0:r.instructions)?void 0:o.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},d.createElement(Ft,{color:"accentColor",size:"14",weight:"bold"},"Learn More"))))}function nr({onClose:e}){const t=Ct(),[n,r]=(0,d.useState)(),[o,a]=(0,d.useState)(),[i,s]=(0,d.useState)(),c=!!(null==o?void 0:o.qrCode)&&i,[u,l]=(0,d.useState)(!1),f=(0,d.useContext)(xt)===Et,{disclaimer:h}=(0,d.useContext)(vt),p=kt().filter((e=>e.ready||!!e.extensionDownloadUrl)).sort(((e,t)=>e.groupIndex-t.groupIndex)),m=function(e,t){const n={};return e.forEach((e=>{const r=t(e);r&&(n[r]||(n[r]=[]),n[r].push(e))})),n}(p,(e=>e.groupName)),b=e=>{var n,r,o;if(l(!1),e.ready){null==(r=null==(n=null==e?void 0:e.connect)?void 0:n.call(e))||r.catch((()=>{l(!0)}));const a=null==(o=e.desktop)?void 0:o.getUri;a&&setTimeout((async()=>{const e=await a();window.open(e,t?"_blank":"_self")}),0)}},g=e=>{var t;if(b(e),r(e.id),e.ready){let n=!1;null==(t=null==e?void 0:e.onConnecting)||t.call(e,(async()=>{var t,r;if(n)return;n=!0;const o=p.find((t=>e.id===t.id)),i=await(null==(t=null==o?void 0:o.qrCode)?void 0:t.getUri());s(i),setTimeout((()=>{a(o),w("CONNECT")}),i?0:50);const c=await(null==o?void 0:o.connector.getProvider()),u=null==(r=null==c?void 0:c.signer)?void 0:r.connection;if((null==u?void 0:u.on)&&(null==u?void 0:u.off)){const t=()=>{n(),g(e)},n=()=>{u.off("close",t),u.off("open",n)};u.on("close",t),u.on("open",n)}}))}else a(e),w((null==e?void 0:e.extensionDownloadUrl)?"DOWNLOAD_OPTIONS":"CONNECT")},y=e=>{var t;r(e);const n=p.find((t=>e===t.id)),o=null==(t=null==n?void 0:n.downloadUrls)?void 0:t.qrCode,i=!!(null==n?void 0:n.extensionDownloadUrl);a(n),w(o&&i?"DOWNLOAD_OPTIONS":o?"DOWNLOAD":"INSTRUCTIONS_EXTENSION")},v=()=>{r(void 0),a(void 0),s(void 0)},w=(e,t=!1)=>{t&&"GET"===e&&"GET"===E?v():t||"GET"!==e?t||"CONNECT"!==e||A("CONNECT"):A("GET"),P(e)},[E,A]=(0,d.useState)("NONE"),[x,P]=(0,d.useState)("NONE");let C,j=null,I=null,O=null;(0,d.useEffect)((()=>{l(!1)}),[x,o]);const T=!(!!!(null==o?void 0:o.extensionDownloadUrl)||!(null==o?void 0:o.mobileDownloadUrl));switch(x){case"NONE":j=d.createElement(On,{getWallet:()=>w("GET")});break;case"LEARN_COMPACT":j=d.createElement(On,{compactModeEnabled:f,getWallet:()=>w("GET")}),I="What is a Wallet?",O="NONE";break;case"GET":j=d.createElement(Kn,{getWalletDownload:y}),I="Get a Wallet",O=f?"LEARN_COMPACT":"NONE";break;case"CONNECT":j=o&&d.createElement(Vn,{changeWalletStep:w,compactModeEnabled:f,connectionError:u,onClose:e,qrCodeUri:i,reconnect:b,wallet:o}),I=c&&`Scan with ${"walletConnect"===o.id?"your phone":o.name}`,O=f?"NONE":null,C=f?v:()=>{};break;case"DOWNLOAD_OPTIONS":j=o&&d.createElement(Yn,{changeWalletStep:w,wallet:o}),I=o&&`Get ${o.name}`,O=T?E:null;break;case"DOWNLOAD":j=o&&d.createElement(Zn,{changeWalletStep:w,wallet:o}),I=o&&`Install ${o.name}`,O=T?"DOWNLOAD_OPTIONS":E;break;case"INSTRUCTIONS_MOBILE":j=o&&d.createElement(er,{connectWallet:g,wallet:o}),I=o&&`Get started with ${f&&o.shortName||o.name}`,O="DOWNLOAD";break;case"INSTRUCTIONS_EXTENSION":j=o&&d.createElement(tr,{wallet:o}),I=o&&`Get started with ${f&&o.shortName||o.name}`,O="DOWNLOAD_OPTIONS"}return d.createElement(Ce,{display:"flex",flexDirection:"row",style:{maxHeight:f?468:504}},(!f||"NONE"===x)&&d.createElement(Ce,{className:f?"_1vwt0cg4":"_1vwt0cg3",display:"flex",flexDirection:"column",marginTop:"16"},d.createElement(Ce,{display:"flex",justifyContent:"space-between"},f&&h&&d.createElement(Ce,{marginLeft:"16",width:"28"},d.createElement(Bn,{onClick:()=>w("LEARN_COMPACT")})),f&&!h&&d.createElement(Ce,{marginLeft:"16",width:"28"}),d.createElement(Ce,{marginLeft:f?"0":"6",paddingBottom:"8",paddingTop:"2",paddingX:"18"},d.createElement(Ft,{as:"h1",color:"modalText",id:"rk_connect_title",size:"16",weight:"heavy"},"Connect a Wallet")),f&&d.createElement(Ce,{marginRight:"16"},d.createElement(qt,{onClose:e}))),d.createElement(Ce,{className:"_1vwt0cg2 ju367v75 ju367v7q",paddingBottom:"18"},Object.entries(m).map((([e,t],r)=>t.length>0&&d.createElement(d.Fragment,{key:r},e?d.createElement(Ce,{marginBottom:"8",marginTop:"16",marginX:"6"},d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},e)):null,d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},t.map((e=>d.createElement(Nn,{currentlySelected:e.id===n,iconBackground:e.iconBackground,iconUrl:e.iconUrl,key:e.id,name:e.name,onClick:()=>g(e),ready:e.ready,recent:e.recent,testId:`wallet-option-${e.id}`})))))))),f&&d.createElement(d.Fragment,null,d.createElement(Ce,{background:"generalBorder",height:"1",marginTop:"-1"}),h?d.createElement(Ce,{paddingX:"24",paddingY:"16",textAlign:"center"},d.createElement(h,{Link:jn,Text:In})):d.createElement(Ce,{alignItems:"center",display:"flex",justifyContent:"space-between",paddingX:"24",paddingY:"16"},d.createElement(Ce,{paddingY:"4"},d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},"New to Ethereum wallets?")),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",justifyContent:"center"},d.createElement(Ce,{className:ge({active:"shrink",hover:"grow"}),cursor:"pointer",onClick:()=>w("LEARN_COMPACT"),paddingY:"4",style:{willChange:"transform"},transition:"default"},d.createElement(Ft,{color:"accentColor",size:"14",weight:"bold"},"Learn More")))))),(!f||"NONE"!==x)&&d.createElement(d.Fragment,null,!f&&d.createElement(Ce,{background:"generalBorder",minWidth:"1",width:"1"}),d.createElement(Ce,{display:"flex",flexDirection:"column",margin:"16",style:{flexGrow:1}},d.createElement(Ce,{alignItems:"center",display:"flex",justifyContent:"space-between",marginBottom:"12"},d.createElement(Ce,{width:"28"},O&&d.createElement(Ce,{as:"button",className:ge({active:"shrinkSm",hover:"growLg"}),color:"accentColor",onClick:()=>{O&&w(O,!0),null==C||C()},paddingX:"8",paddingY:"4",style:{boxSizing:"content-box",height:17,willChange:"transform"},transition:"default",type:"button"},d.createElement(Tn,null))),d.createElement(Ce,{display:"flex",justifyContent:"center",style:{flexGrow:1}},I&&d.createElement(Ft,{color:"modalText",size:"16",textAlign:"center",weight:"heavy"},I)),d.createElement(qt,{onClose:e})),d.createElement(Ce,{display:"flex",flexDirection:"column",style:{minHeight:f?396:432}},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"6",height:"full",justifyContent:"center",marginX:"8"},j)))))}function rr({onClose:e,wallet:t}){const{connect:n,connector:r,iconBackground:o,iconUrl:a,id:i,mobile:s,name:c,onConnecting:u,ready:l,shortName:f}=t,h=null==s?void 0:s.getUri,p=kn(a);return d.createElement(Ce,{as:"button",color:l?"modalText":"modalTextSecondary",disabled:!l,fontFamily:"body",key:i,onClick:(0,d.useCallback)((async()=>{"walletConnect"===i&&(null==e||e()),null==n||n();let t=!1;null==u||u((async()=>{if(!t&&(t=!0,h)){const e=await h();if("walletConnect"!==r.id&&"walletConnectLegacy"!==r.id||function({mobileUri:e,name:t}){localStorage.setItem($t,JSON.stringify({href:e.split("?")[0],name:t}))}({mobileUri:e,name:c}),e.startsWith("http")){const t=document.createElement("a");t.href=e,t.target="_blank",t.rel="noreferrer noopener",t.click()}else window.location.href=e}}))}),[r,n,h,u,e,c,i]),ref:p,style:{overflow:"visible",textAlign:"center"},testId:`wallet-option-${i}`,type:"button",width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},d.createElement(Ce,{paddingBottom:"8",paddingTop:"10"},d.createElement(Be,{background:o,borderRadius:"13",boxShadow:"walletLogo",height:"60",src:a,width:"60"})),d.createElement(Ce,{display:"flex",flexDirection:"column",textAlign:"center"},d.createElement(Ft,{as:"h2",color:t.ready?"modalText":"modalTextSecondary",size:"13",weight:"bold"},d.createElement(Ce,{as:"span",position:"relative"},null!=f?f:c,!t.ready&&" (unsupported)")),t.recent&&d.createElement(Ft,{color:"accentColor",size:"12",weight:"bold"},"Recent"))))}function or({onClose:e}){var t;const n=kt(),{disclaimer:r,learnMoreUrl:o}=(0,d.useContext)(vt);let a=null,i=null,s=!1,c=null;const[u,l]=(0,d.useState)("CONNECT"),f=Ae();switch(u){case"CONNECT":a="Connect a Wallet",s=!0,i=d.createElement(Ce,null,d.createElement(Ce,{background:"profileForeground",className:"_1am14410",display:"flex",paddingBottom:"20",paddingTop:"6"},d.createElement(Ce,{display:"flex",style:{margin:"0 auto"}},n.filter((e=>e.ready)).map((t=>d.createElement(Ce,{key:t.id,paddingX:"20"},d.createElement(Ce,{width:"60"},d.createElement(rr,{onClose:e,wallet:t}))))))),d.createElement(Ce,{background:"generalBorder",height:"1",marginBottom:"32",marginTop:"-1"}),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"32",paddingX:"32",style:{textAlign:"center"}},d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"8",textAlign:"center"},d.createElement(Ft,{color:"modalText",size:"23",weight:"bold"},"NameSys"),d.createElement(Ft,{color:"modalTextSecondary",size:"18",weight:"bold"},"ENS Off-Chain Records Manager"))),d.createElement(Ce,{paddingTop:"32",paddingX:"20"},d.createElement(Ce,{display:"flex",gap:"14",justifyContent:"center"},d.createElement(Lt,{label:"Get a Wallet",onClick:()=>l("GET"),size:"medium",type:"secondary"}),d.createElement(Lt,{href:o,label:"Learn More",size:"medium",type:"secondary"}))),r&&d.createElement(Ce,{marginTop:"28",marginX:"32",textAlign:"center"},d.createElement(r,{Link:jn,Text:In})));break;case"GET":{a="Get a Wallet",c="CONNECT";const e=null==(t=null==n?void 0:n.filter((e=>{var t,n,r;return(null==(t=e.downloadUrls)?void 0:t.ios)||(null==(n=e.downloadUrls)?void 0:n.android)||(null==(r=e.downloadUrls)?void 0:r.mobile)})))?void 0:t.splice(0,3);i=d.createElement(Ce,null,d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginBottom:"36",marginTop:"5",paddingTop:"12",width:"full"},e.map(((t,n)=>{const{downloadUrls:r,iconBackground:o,iconUrl:a,name:i}=t;return(null==r?void 0:r.ios)||(null==r?void 0:r.android)||(null==r?void 0:r.mobile)?d.createElement(Ce,{display:"flex",gap:"16",key:t.id,paddingX:"20",width:"full"},d.createElement(Ce,{style:{minHeight:48,minWidth:48}},d.createElement(Be,{background:o,borderColor:"generalBorder",borderRadius:"10",height:"48",src:a,width:"48"})),d.createElement(Ce,{display:"flex",flexDirection:"column",width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",height:"48"},d.createElement(Ce,{width:"full"},d.createElement(Ft,{color:"modalText",size:"18",weight:"bold"},i)),d.createElement(Lt,{href:(f?null==r?void 0:r.ios:null==r?void 0:r.android)||(null==r?void 0:r.mobile),label:"GET",size:"small",type:"secondary"})),nl(c),padding:"16",style:{height:17,willChange:"transform"},transition:"default",type:"button"},d.createElement(Tn,null))),d.createElement(Ce,{marginTop:"4",textAlign:"center",width:"full"},d.createElement(Ft,{as:"h1",color:"modalText",id:"rk_connect_title",size:"16",weight:"bold"},a)),d.createElement(Ce,{alignItems:"center",display:"flex",height:"32",paddingRight:"14",position:"absolute",right:"0"},d.createElement(Ce,{style:{marginBottom:-20,marginTop:-20}},d.createElement(qt,{onClose:e}))))),d.createElement(Ce,{display:"flex",flexDirection:"column"},i))}function ar({onClose:e}){return xe()?d.createElement(or,{onClose:e}):d.createElement(nr,{onClose:e})}function ir({onClose:e,open:t}){const n="rk_connect_title",r=we();return"disconnected"===r?d.createElement(tn,{onClose:e,open:t,titleId:n},d.createElement(on,{bottomSheetOnMobile:!0,padding:"0",wide:!0},d.createElement(ar,{onClose:e}))):"unauthenticated"===r?d.createElement(tn,{onClose:e,open:t,titleId:n},d.createElement(on,{bottomSheetOnMobile:!0,padding:"0"},d.createElement(zt,{onClose:e}))):null}function sr(){const[e,t]=(0,d.useState)(!1);return{closeModal:(0,d.useCallback)((()=>t(!1)),[]),isModalOpen:e,openModal:(0,d.useCallback)((()=>t(!0)),[])}}var cr=(0,d.createContext)({accountModalOpen:!1,chainModalOpen:!1,connectModalOpen:!1});function ur({children:e}){const{closeModal:t,isModalOpen:n,openModal:r}=sr(),{closeModal:o,isModalOpen:a,openModal:i}=sr(),{closeModal:s,isModalOpen:c,openModal:u}=sr(),l=we(),{chain:f}=(0,w.LN)(),h=!(null==f?void 0:f.unsupported);function p({keepConnectModalOpen:e=!1}={}){e||t(),o(),s()}const m="unauthenticated"===ve();return(0,w.mA)({onConnect:()=>p({keepConnectModalOpen:m}),onDisconnect:()=>p()}),d.createElement(cr.Provider,{value:(0,d.useMemo)((()=>({accountModalOpen:a,chainModalOpen:c,connectModalOpen:n,openAccountModal:h&&"connected"===l?i:void 0,openChainModal:"connected"===l?u:void 0,openConnectModal:"disconnected"===l||"unauthenticated"===l?r:void 0})),[l,h,a,c,n,i,u,r])},e,d.createElement(ir,{onClose:t,open:n}),d.createElement(An,{onClose:o,open:a}),d.createElement(Cn,{onClose:s,open:c}))}var lr=()=>{};function dr({children:e}){var t,n,r,o;const a=(()=>{const[e,t]=(0,d.useReducer)((()=>!0),!1);return(0,d.useEffect)(t,[t]),e})(),{address:i}=(0,w.mA)(),s=ot(i),c=rt(s),{data:u}=(0,w.KQ)({address:i}),{chain:l}=(0,w.LN)(),f=(()=>{const e=tt();return(0,d.useMemo)((()=>{const t={};return e.forEach((e=>{t[e.id]=e})),t}),[e])})(),h=null!=(t=ve())?t:void 0,p=l?f[l.id]:void 0,m=null!=(n=null==p?void 0:p.name)?n:void 0,b=null!=(r=null==p?void 0:p.iconUrl)?r:void 0,g=null!=(o=null==p?void 0:p.iconBackground)?o:void 0,y=Se(b),v=(0,d.useContext)(Pt),E=pt().some((({status:e})=>"pending"===e))&&v,A=u?`${cn(parseFloat(u.formatted))} ${u.symbol}`:void 0,{openConnectModal:x}=function(){const{connectModalOpen:e,openConnectModal:t}=(0,d.useContext)(cr);return{connectModalOpen:e,openConnectModal:t}}(),{openChainModal:P}=function(){const{chainModalOpen:e,openChainModal:t}=(0,d.useContext)(cr);return{chainModalOpen:e,openChainModal:t}}(),{openAccountModal:C}=function(){const{accountModalOpen:e,openAccountModal:t}=(0,d.useContext)(cr);return{accountModalOpen:e,openAccountModal:t}}(),{accountModalOpen:j,chainModalOpen:I,connectModalOpen:O}=function(){const{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}=(0,d.useContext)(cr);return{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}}();return d.createElement(d.Fragment,null,e({account:i?{address:i,balanceDecimals:null==u?void 0:u.decimals,balanceFormatted:null==u?void 0:u.formatted,balanceSymbol:null==u?void 0:u.symbol,displayBalance:A,displayName:s?ln(s):un(i),ensAvatar:null!=c?c:void 0,ensName:null!=s?s:void 0,hasPendingTransactions:E}:void 0,accountModalOpen:j,authenticationStatus:h,chain:l?{hasIcon:Boolean(b),iconBackground:g,iconUrl:y,id:l.id,name:null!=m?m:l.name,unsupported:l.unsupported}:void 0,chainModalOpen:I,connectModalOpen:O,mounted:a,openAccountModal:null!=C?C:lr,openChainModal:null!=P?P:lr,openConnectModal:null!=x?x:lr}))}dr.displayName="ConnectButton.Custom";var fr={accountStatus:"full",chainStatus:{largeScreen:"full",smallScreen:"icon"},label:"Connect Wallet",showBalance:{largeScreen:!0,smallScreen:!1}};function hr({accountStatus:e=fr.accountStatus,chainStatus:t=fr.chainStatus,label:n=fr.label,showBalance:r=fr.showBalance}){const o=tt(),a=we();return d.createElement(dr,null,(({account:i,chain:s,mounted:c,openAccountModal:u,openChainModal:l,openConnectModal:f})=>{var h,p,m;const b=c&&"loading"!==a,g=null!=(h=null==s?void 0:s.unsupported)&&h;return d.createElement(Ce,{display:"flex",gap:"12",...!b&&{"aria-hidden":!0,style:{opacity:0,pointerEvents:"none",userSelect:"none"}}},b&&i&&"connected"===a?d.createElement(d.Fragment,null,s&&(o.length>1||g)&&d.createElement(Ce,{alignItems:"center","aria-label":"Chain Selector",as:"button",background:g?"connectButtonBackgroundError":"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:ge({active:"shrink",hover:"grow"}),color:g?"connectButtonTextError":"connectButtonText",display:de(t,(e=>"none"===e?"none":"flex")),fontFamily:"body",fontWeight:"bold",gap:"6",key:g?"unsupported":"supported",onClick:l,paddingX:"10",paddingY:"8",testId:g?"wrong-network-button":"chain-button",transition:"default",type:"button"},g?d.createElement(Ce,{alignItems:"center",display:"flex",height:"24",paddingX:"4",fontFamily:"body"},"Wrong network"):d.createElement(Ce,{alignItems:"center",display:"flex",gap:"6"},s.hasIcon?d.createElement(Ce,{display:de(t,(e=>"full"===e||"icon"===e?"block":"none")),height:"24",width:"24"},d.createElement(Be,{alt:null!=(p=s.name)?p:"Chain icon",background:s.iconBackground,borderRadius:"full",height:"24",src:s.iconUrl,width:"24"})):null,d.createElement(Ce,{display:de(t,(e=>"icon"!==e||s.iconUrl?"full"===e||"name"===e?"block":"none":"block"))},null!=(m=s.name)?m:s.id)),d.createElement(Ue,null)),!g&&d.createElement(Ce,{alignItems:"center",as:"button",background:"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:ge({active:"shrink",hover:"grow"}),color:"connectButtonText",display:"flex",fontFamily:"body",fontWeight:"bold",onClick:u,testId:"account-button",transition:"default",type:"button"},i.displayBalance&&d.createElement(Ce,{display:de(r,(e=>e?"block":"none")),padding:"8",paddingLeft:"12"},i.displayBalance),d.createElement(Ce,{background:fe(r)[xe()?"smallScreen":"largeScreen"]?"connectButtonInnerBackground":"connectButtonBackground",borderColor:"connectButtonBackground",borderRadius:"connectButton",borderStyle:"solid",borderWidth:"2",color:"connectButtonText",fontFamily:"body",fontWeight:"bold",paddingX:"8",paddingY:"6",transition:"default"},d.createElement(Ce,{alignItems:"center",display:"flex",gap:"6",height:"24"},d.createElement(Ce,{display:de(e,(e=>"full"===e||"avatar"===e?"block":"none"))},d.createElement(Fe,{address:i.address,imageUrl:i.ensAvatar,loading:i.hasPendingTransactions,size:24})),d.createElement(Ce,{alignItems:"center",display:"flex",gap:"6"},d.createElement(Ce,{display:de(e,(e=>"full"===e||"address"===e?"block":"none"))},i.displayName),d.createElement(Ue,null)))))):d.createElement(Ce,{as:"button",background:"accentColor",borderRadius:"connectButton",boxShadow:"connectButton",className:ge({active:"shrink",hover:"grow"}),color:"accentColorForeground",fontFamily:"body",fontWeight:"bold",height:"40",key:"connect",onClick:f,paddingX:"14",testId:"connect-button",transition:"default",type:"button",fontSize:16},n))}))}hr.__defaultProps=fr,hr.Custom=dr},94077:function(e,t,n){"use strict";n.d(t,{QB:function(){return Un},$j:function(){return cr},_g:function(){return ir},o6:function(){return Xn},vZ:function(){return Gn},zP:function(){return ur},EG:function(){return Ar},RQ:function(){return Br},w6:function(){return Tr},Lk:function(){return Sr},jS:function(){return kr},D0:function(){return xr},Hy:function(){return Pr},uV:function(){return fr},gY:function(){return Kn},xz:function(){return hr},jr:function(){return pr},wp:function(){return Zn},uw:function(){return _r},a4:function(){return vr},T7:function(){return Nr},l:function(){return Cr},If:function(){return jr},Mn:function(){return Mr},uH:function(){return Ir},QC:function(){return Or},pC:function(){return mr},Tb:function(){return br},fq:function(){return gr},n9:function(){return Er}});var r=n(64546),o=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},a=(e,t,n)=>(o(e,t,"read from private field"),n?n.call(e):t.get(e)),i=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},s=(e,t,n,r)=>(o(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),c=n(48439),u=n(1920),l=n(31826),d=n(96606),f=n(61786),h=n(26873),p=n(46872),m=n(35554),b=n(69977),g=n(90722);function y(e,t){if(!(e instanceof b.G))return!1;const n=e.walk((e=>e instanceof g.Lu));return n instanceof g.Lu&&("ResolverNotFound"===n.data?.errorName||("ResolverWildcardNotSupported"===n.data?.errorName||(!!n.reason?.includes("Wildcard on non-extended resolvers is not supported")||"reverse"===t&&n.reason===m.$[50])))}var v=n(9040),w=n(41327),E=n(90707),A=n(25493);function x(e){if(66!==e.length)return null;if(0!==e.indexOf("["))return null;if(65!==e.indexOf("]"))return null;const t=`0x${e.slice(1,65)}`;return(0,A.v)(t)?t:null}function P(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,p.ci)(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const e=x(n[r]),o=e?(0,w.O0)(e):(0,E.w)((0,w.qX)(n[r]),"bytes");t=(0,E.w)((0,v.zo)([t,o]),"bytes")}return(0,p.ci)(t)}function C(e){const t=new Uint8Array(32).fill(0);return e?x(e)||(0,E.w)((0,w.qX)(e)):(0,p.ci)(t)}function j(e){const t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);const n=new Uint8Array((0,w.qX)(t).byteLength+2);let r=0;const o=t.split(".");for(let a=0;a255&&(e=(0,w.qX)(`[${C(o[a]).slice(2)}]`)),n[r]=e.length,n.set(e,r+1),r+=e.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}var I=n(5555);function O(e,{abi:t,address:n,args:r,docsPath:o,functionName:a,sender:i}){const{code:s,data:c,message:u,shortMessage:l}=e instanceof g.VQ?e:e instanceof b.G?e.walk((e=>"data"in e))||e.walk():{};let d=e;return e instanceof I.wb?d=new g.Dk({functionName:a}):3===s&&(c||u||l)&&(d=new g.Lu({abi:t,data:"object"===typeof c?c.data:c,functionName:a,message:l??u})),new g.uq(d,{abi:t,args:r,contractAddress:n,docsPath:o,functionName:a,sender:i})}var T=n(83161);async function S(e,{abi:t,address:n,args:r,functionName:o,...a}){const i=(0,d.R)({abi:t,args:r,functionName:o});try{const{data:s}=await(0,T.R)(e,{data:i,to:n,...a});return(0,l.k)({abi:t,args:r,functionName:o,data:s||"0x"})}catch(s){throw O(s,{abi:t,address:n,args:r,docsPath:"/docs/contract/readContract",functionName:o})}}class B extends b.G{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class k extends b.G{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class _ extends b.G{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class N extends b.G{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const M=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,R=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,F=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,U=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;function L(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function D({uri:e,gatewayUrls:t}){const n=F.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=L(t?.ipfs,"https://ipfs.io"),o=L(t?.arweave,"https://arweave.net"),a=e.match(M),{protocol:i,subpath:s,target:c,subtarget:u=""}=a?.groups||{},l="ipns:/"===i||"ipns/"===s,d="ipfs:/"===i||"ipfs/"===s||R.test(e);if(e.startsWith("http")&&!l&&!d){let n=e;return t?.arweave&&(n=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:n,isOnChain:!1,isEncoded:!1}}if((l||d)&&c)return{uri:`${r}/${l?"ipns":"ipfs"}/${c}${u}`,isOnChain:!1,isEncoded:!1};if("ar:/"===i&&c)return{uri:`${o}/${c}${u||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(U,"");if(f.startsWith("{const n=new Image;n.onload=()=>{t(!0)},n.onerror=()=>{t(!1)},n.src=e}))}}(n);if(o)return n;throw new _({uri:t})}async function z(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?async function(e,{gatewayUrls:t,record:n}){const r=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,o]=t.split("/"),[a,i]=n.split(":"),[s,c]=r.split(":");if(!a||"eip155"!==a.toLowerCase())throw new k({reason:"Only EIP-155 supported"});if(!i)throw new k({reason:"Chain ID not found"});if(!c)throw new k({reason:"Contract address not found"});if(!o)throw new k({reason:"Token ID not found"});if(!s)throw new k({reason:"ERC namespace not found"});return{chainID:parseInt(i),namespace:s.toLowerCase(),contractAddress:c,tokenID:o}}(n),o=await async function(e,{nft:t}){if("erc721"===t.namespace)return S(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return S(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new N({namespace:t.namespace})}(e,{nft:r}),{uri:a,isOnChain:i,isEncoded:s}=D({uri:o,gatewayUrls:t});if(i&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){const e=s?atob(a.replace("data:application/json;base64,","")):a;return H({uri:q(JSON.parse(e)),gatewayUrls:t})}let c=r.tokenID;"erc1155"===r.namespace&&(c=c.replace("0x","").padStart(64,"0"));return async function({gatewayUrls:e,uri:t}){try{const n=await fetch(t).then((e=>e.json()));return await H({gatewayUrls:e,uri:q(n)})}catch{throw new _({uri:t})}}({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,c)})}(e,{gatewayUrls:t,record:n}):H({uri:n,gatewayUrls:t})}async function G(e,{blockNumber:t,blockTag:n,name:r,key:o,universalResolverAddress:a}){let i=a;if(!i){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=(0,f.LI)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const a=await S(e,{address:i,abi:u.k3,functionName:"resolve",args:[(0,p.NC)(j(r)),(0,d.R)({abi:u.nZ,functionName:"text",args:[P(r),o]})],blockNumber:t,blockTag:n});if("0x"===a[0])return null;const s=(0,l.k)({abi:u.nZ,functionName:"text",data:a[0]});return""===s?null:s}catch(s){if(y(s,"resolve"))return null;throw s}}function $(e,{method:t}){const n={};return"fallback"===e.transport.type&&e.transport.onResponse?.((({method:e,response:r,status:o,transport:a})=>{"success"===o&&t===e&&(n[r]=a.request)})),t=>n[t]||e.request}class W extends b.G{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}var K=n(56143);const Q=e=>"string"===typeof e?(0,K.F)(e):(0,K.J)(e);var V=n(62546),J=n(21494),Y=n(28604);function Z({abi:e,eventName:t,args:n}){let r=e[0];if(t&&(r=(0,Y.m)({abi:e,args:n,name:t}),!r))throw new I.mv(t,{docsPath:"/docs/contract/encodeEventTopics"});if("event"!==r.type)throw new I.mv(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const o=(0,J.t)(r),a=Q(o);let i=[];if(n&&"inputs"in r){const e=r.inputs?.filter((e=>"indexed"in e&&e.indexed)),t=Array.isArray(n)?n:Object.values(n).length>0?e?.map((e=>n[e.name]))??[]:[];t.length>0&&(i=e?.map(((e,n)=>Array.isArray(t[n])?t[n].map(((r,o)=>X({param:e,value:t[n][o]}))):t[n]?X({param:e,value:t[n]}):null))??[])}return[a,...i]}function X({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,E.w)((0,w.O0)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new W(e.type);return(0,V.E)([e],[t])}async function ee(e,{address:t,abi:n,args:r,eventName:o,fromBlock:a,strict:i,toBlock:s}){const c=$(e,{method:"eth_newFilter"}),u=o?Z({abi:n,args:r,eventName:o}):void 0,l=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"===typeof a?(0,p.eC)(a):a,toBlock:"bigint"===typeof s?(0,p.eC)(s):s,topics:u}]});return{abi:n,args:r,eventName:o,id:l,request:c(l),strict:i,type:"event"}}async function te(e,{address:t,args:n,event:r,events:o,fromBlock:a,strict:i,toBlock:s}={}){const c=o??(r?[r]:void 0),u=$(e,{method:"eth_newFilter"});let l=[];c&&(l=[c.flatMap((e=>Z({abi:[e],eventName:e.name,args:n})))],r&&(l=l[0]));const d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"===typeof a?(0,p.eC)(a):a,toBlock:"bigint"===typeof s?(0,p.eC)(s):s,...l.length?{topics:l}:{}}]});return{abi:c,args:n,eventName:r?r.name:void 0,fromBlock:a,id:d,request:u(d),strict:i,toBlock:s,type:"event"}}async function ne(e){const t=$(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}var re=n(21431),oe=n(14828);var ae=n(33910);const ie=new Map,se=new Map;async function ce(e,{cacheKey:t,cacheTime:n=1/0}){const r=function(e){const t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:n=>t.set(e,n)}),n=t(e,ie),r=t(e,se);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}(t),o=r.response.get();if(o&&n>0){if((new Date).getTime()-o.created.getTime()`blockNumber.${e}`;async function le(e,{cacheTime:t=e.cacheTime,maxAge:n}={}){const r=await ce((()=>e.request({method:"eth_blockNumber"})),{cacheKey:ue(e.uid),cacheTime:n??t});return BigInt(r)}var de=n(90169);var fe=n(29251);async function he(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:o}){const a=n?(0,p.eC)(n):void 0;return function(e){return{baseFeePerGas:e.baseFeePerGas.map((e=>BigInt(e))),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map((e=>e.map((e=>BigInt(e)))))}}(await e.request({method:"eth_feeHistory",params:[(0,p.eC)(t),a||r,o]}))}var pe=n(70558);const me="/docs/contract/decodeEventLog";function be({abi:e,data:t,strict:n,topics:r}){const o=n??!0,[a,...i]=r;if(!a)throw new I.FM({docsPath:me});const s=e.find((e=>"event"===e.type&&a===Q((0,J.t)(e))));if(!s||!("name"in s)||"event"!==s.type)throw new I.lC(a,{docsPath:me});const{name:c,inputs:u}=s,l=u?.some((e=>!("name"in e&&e.name)));let d=l?[]:{};const f=u.filter((e=>"indexed"in e&&e.indexed));if(i.length>0)for(let m=0;m!("indexed"in e&&e.indexed)));if(h.length>0)if(t&&"0x"!==t)try{const e=(0,pe.r)(h,t);if(e)if(l)d=[...d,...e];else for(let t=0;t0?d:void 0}}function ge({param:e,value:t}){if("string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))return t;return((0,pe.r)([e],t)||[])[0]}var ye=n(18829);async function ve(e,{filter:t}){const n="strict"in t&&t.strict;return(await t.request({method:"eth_getFilterChanges",params:[t.id]})).map((e=>{if("string"===typeof e)return e;try{const{eventName:r,args:o}="abi"in t&&t.abi?be({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return(0,ye.U)(e,{args:o,eventName:r})}catch(r){let n,o;if(r instanceof I.SM||r instanceof I.Gy){if("strict"in t&&t.strict)return;n=r.abiItem.name,o=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,ye.U)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}var we=n(48671);async function Ee(e,{address:t,blockHash:n,fromBlock:r,toBlock:o,event:a,events:i,args:s,strict:c}={}){const u=c??!1,l=i??(a?[a]:void 0);let d,f=[];return l&&(f=[l.flatMap((e=>Z({abi:[e],eventName:e.name,args:s})))],a&&(f=f[0])),d=n?await e.request({method:"eth_getLogs",params:[{address:t,topics:f,blockHash:n}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:f,fromBlock:"bigint"===typeof r?(0,p.eC)(r):r,toBlock:"bigint"===typeof o?(0,p.eC)(o):o}]}),d.map((e=>{try{const{eventName:t,args:n}=l?be({abi:l,data:e.data,topics:e.topics,strict:u}):{eventName:void 0,args:void 0};return(0,ye.U)(e,{args:n,eventName:t})}catch(t){let n,r;if(t instanceof I.SM||t instanceof I.Gy){if(u)return;n=t.abiItem.name,r=t.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,ye.U)(e,{args:r?[]:{},eventName:n})}})).filter(Boolean)}var Ae=n(54574),xe=n(94216);async function Pe(e,{blockHash:t,blockNumber:n,blockTag:r,hash:o,index:a}){const i=r||"latest",s=void 0!==n?(0,p.eC)(n):void 0;let c=null;if(o?c=await e.request({method:"eth_getTransactionByHash",params:[o]}):t?c=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,p.eC)(a)]}):(s||i)&&(c=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[s||i,(0,p.eC)(a)]})),!c)throw new Ae.Bh({blockHash:t,blockNumber:n,blockTag:i,hash:o,index:a});return(e.chain?.formatters?.transaction?.format||xe.Tr)(c)}var Ce=n(89784),je=n(4656);async function Ie(e,{hash:t}){const n=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!n)throw new Ae.Yb({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||je.f)(n)}async function Oe(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}var Te=n(90696);var Se=n(99353);async function Be(e,{address:t,hash:n,signature:r,...o}){const a=(0,A.v)(r)?r:(0,p.NC)(r);try{const{data:r}=await(0,T.R)(e,{data:(0,Se.w)({abi:u.$o,args:[t,n,a],bytecode:"0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"}),...o});return function(e,t){const n=(0,A.v)(e)?(0,w.O0)(e):e,r=(0,A.v)(t)?(0,w.O0)(t):t;return(0,Te.equalBytes)(n,r)}(r??"0x0","0x1")}catch(i){if(i instanceof g.cg)return!1;throw i}}async function ke(e,{address:t,message:n,signature:r,...o}){const a=function(e,t){const n="string"===typeof e?(0,w.qX)(e):e.raw instanceof Uint8Array?e.raw:(0,w.O0)(e.raw),r=(0,w.qX)(`\x19Ethereum Signed Message:\n${n.length}`);return(0,E.w)((0,v.zo)([r,n]),t)}(n);return Be(e,{address:t,hash:a,signature:r,...o})}var _e=n(61539);function Ne({domain:e,message:t,primaryType:n,types:r}){const o="undefined"===typeof e?{}:e,a={EIP712Domain:["string"===typeof o?.name&&{name:"name",type:"string"},o?.version&&{name:"version",type:"string"},"number"===typeof o?.chainId&&{name:"chainId",type:"uint256"},o?.verifyingContract&&{name:"verifyingContract",type:"address"},o?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...r};(0,_e.i)({domain:o,message:t,primaryType:n,types:a});const i=["0x1901"];return o&&i.push(function({domain:e,types:t}){return Me({data:e,primaryType:"EIP712Domain",types:t})}({domain:o,types:a})),"EIP712Domain"!==n&&i.push(Me({data:t,primaryType:n,types:a})),(0,E.w)((0,v.zo)(i))}function Me({data:e,primaryType:t,types:n}){const r=Re({data:e,primaryType:t,types:n});return(0,E.w)(r)}function Re({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],o=[Fe({primaryType:t,types:n})];for(const a of n[t]){const[t,i]=Le({types:n,name:a.name,type:a.type,value:e[a.name]});r.push(t),o.push(i)}return(0,V.E)(r,o)}function Fe({primaryType:e,types:t}){const n=(0,p.NC)(function({primaryType:e,types:t}){let n="";const r=Ue({primaryType:e,types:t});r.delete(e);const o=[e,...Array.from(r).sort()];for(const a of o)n+=`${a}(${t[a].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`;return n}({primaryType:e,types:t}));return(0,E.w)(n)}function Ue({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u)?.[0];if(n.has(r)||void 0===t[r])return n;n.add(r);for(const o of t[r])Ue({primaryType:o.type,types:t},n);return n}function Le({types:e,name:t,type:n,value:r}){if(void 0!==e[n])return[{type:"bytes32"},(0,E.w)(Re({data:r,primaryType:n,types:e}))];if("bytes"===n){return r=`0x${(r.length%2?"0":"")+r.slice(2)}`,[{type:"bytes32"},(0,E.w)(r)]}if("string"===n)return[{type:"bytes32"},(0,E.w)((0,p.NC)(r))];if(n.lastIndexOf("]")===n.length-1){const o=n.slice(0,n.lastIndexOf("[")),a=r.map((n=>Le({name:t,type:o,types:e,value:n})));return[{type:"bytes32"},(0,E.w)((0,V.E)(a.map((([e])=>e)),a.map((([,e])=>e))))]}return[{type:n},r]}const De=new Map,qe=new Map;let He=0;function ze(e,t,n){const r=++He,o=()=>De.get(e)||[],a=()=>{const t=qe.get(e);1===o().length&&t&&t(),(()=>{const t=o();De.set(e,t.filter((e=>e.id!==r)))})()},i=o();if(De.set(e,[...i,{id:r,fns:t}]),i&&i.length>0)return a;const s={};for(const u in t)s[u]=(...e)=>{const t=o();0!==t.length&&t.forEach((t=>t.fns[u]?.(...e)))};const c=n(s);return"function"===typeof c&&qe.set(e,c),a}var Ge=n(11941),$e=n(61344),We=n(40482);function Ke(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let o=!0;const a=()=>o=!1;return(async()=>{let i;t&&(i=await e({unpoll:a}));const s=await(n?.(i))??r;await(0,We.D)(s);const c=async()=>{o&&(await e({unpoll:a}),await(0,We.D)(r),c())};c()})(),a}function Qe(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:o,poll:a,pollingInterval:i=e.pollingInterval}){let s;return("undefined"!==typeof a?a:"webSocket"!==e.transport.type)?ze((0,$e.P)(["watchBlockNumber",e.uid,t,n,i]),{onBlockNumber:r,onError:o},(r=>Ke((async()=>{try{const t=await le(e,{cacheTime:0});if(s){if(t===s)return;if(t-s>1&&n)for(let e=s+1n;es)&&(r.onBlockNumber(t,s),s=t)}catch(t){r.onError?.(t)}}),{emitOnBegin:t,interval:i}))):(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:a}=await e.transport.subscribe({params:["newHeads"],onData(e){if(!t)return;const n=(0,de.y_)(e.result?.number);r(n,s),s=n},onError(e){o?.(e)}});n=a,t||n()}catch(a){o?.(a)}})(),n})()}var Ve=n(86101);var Je=n(42455);function Ye(e){return{call:t=>(0,T.R)(e,t),createBlockFilter:()=>async function(e){const t=$(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}(e),createContractEventFilter:t=>ee(e,t),createEventFilter:t=>te(e,t),createPendingTransactionFilter:()=>ne(e),estimateContractGas:t=>async function(e,{abi:t,address:n,args:r,functionName:o,...a}){const i=(0,d.R)({abi:t,args:r,functionName:o});try{return await(0,oe.Q)(e,{data:i,to:n,...a})}catch(s){throw O(s,{abi:t,address:n,args:r,docsPath:"/docs/contract/estimateContractGas",functionName:o,sender:(a.account?(0,re.T)(a.account):void 0)?.address})}}(e,t),estimateGas:t=>(0,oe.Q)(e,t),getBalance:t=>async function(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=n?(0,p.eC)(n):void 0,a=await e.request({method:"eth_getBalance",params:[t,o||r]});return BigInt(a)}(e,t),getBlock:t=>(0,ae.Q)(e,t),getBlockNumber:t=>le(e,t),getBlockTransactionCount:t=>async function(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const o=void 0!==n?(0,p.eC)(n):void 0;let a;return a=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||r]}),(0,de.ly)(a)}(e,t),getBytecode:t=>async function(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=void 0!==n?(0,p.eC)(n):void 0,a=await e.request({method:"eth_getCode",params:[t,o||r]});if("0x"!==a)return a}(e,t),getChainId:()=>(0,fe.L)(e),getEnsAddress:t=>async function(e,{blockNumber:t,blockTag:n,coinType:r,name:o,universalResolverAddress:a}){let i=a;if(!i){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=(0,f.LI)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const a=(0,d.R)({abi:u.X$,functionName:"addr",...null!=r?{args:[P(o),BigInt(r)]}:{args:[P(o)]}}),s=await S(e,{address:i,abi:u.k3,functionName:"resolve",args:[(0,p.NC)(j(o)),a],blockNumber:t,blockTag:n});if("0x"===s[0])return null;const c=(0,h.f)((0,l.k)({abi:u.X$,args:null!=r?[P(o),BigInt(r)]:void 0,functionName:"addr",data:s[0]}));return"0x"===c||"0x00"===(0,h.f)(c)?null:c}catch(s){if(y(s,"resolve"))return null;throw s}}(e,t),getEnsAvatar:t=>async function(e,{blockNumber:t,blockTag:n,gatewayUrls:r,name:o,universalResolverAddress:a}){const i=await G(e,{blockNumber:t,blockTag:n,key:"avatar",name:o,universalResolverAddress:a});if(!i)return null;try{return await z(e,{record:i,gatewayUrls:r})}catch{return null}}(e,t),getEnsName:t=>async function(e,{address:t,blockNumber:n,blockTag:r,universalResolverAddress:o}){let a=o;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=(0,f.LI)({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}const i=`${t.toLowerCase().substring(2)}.addr.reverse`;try{return(await S(e,{address:a,abi:u.du,functionName:"reverse",args:[(0,p.NC)(j(i))],blockNumber:n,blockTag:r}))[0]}catch(s){if(y(s,"reverse"))return null;throw s}}(e,t),getEnsResolver:t=>async function(e,{blockNumber:t,blockTag:n,name:r,universalResolverAddress:o}){let a=o;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=(0,f.LI)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const[i]=await S(e,{address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,p.NC)(j(r))],blockNumber:t,blockTag:n});return i}(e,t),getEnsText:t=>G(e,t),getFeeHistory:t=>he(e,t),getFilterChanges:e=>ve(0,e),getFilterLogs:e=>async function(e,{filter:t}){const n=t.strict??!1;return(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map((e=>{try{const{eventName:r,args:o}="abi"in t&&t.abi?be({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return(0,ye.U)(e,{args:o,eventName:r})}catch(r){let n,o;if(r instanceof I.SM||r instanceof I.Gy){if("strict"in t&&t.strict)return;n=r.abiItem.name,o=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,ye.U)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}(0,e),getGasPrice:()=>(0,we.o)(e),getLogs:t=>Ee(e,t),getStorageAt:t=>async function(e,{address:t,blockNumber:n,blockTag:r="latest",slot:o}){const a=void 0!==n?(0,p.eC)(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,o,a||r]})}(e,t),getTransaction:t=>Pe(e,t),getTransactionConfirmations:t=>async function(e,{hash:t,transactionReceipt:n}){const[r,o]=await Promise.all([le(e),t?Pe(e,{hash:t}):void 0]),a=n?.blockNumber||o?.blockNumber;return a?r-a+1n:0n}(e,t),getTransactionCount:t=>(0,Ce.K)(e,t),getTransactionReceipt:t=>Ie(e,t),multicall:t=>async function(e,t){const{allowFailure:n=!0,batchSize:r,blockNumber:o,blockTag:a,contracts:i,multicallAddress:s}=t,c=r??("object"===typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),h=i;let p=s;if(!p){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");p=(0,f.LI)({blockNumber:o,chain:e.chain,contract:"multicall3"})}const m=[[]];let b=0,y=0;for(let u=0;u0&&y>c&&(b++,y=(n.length-2)/2,m[b]=[]),m[b]=[...m[b],{allowFailure:!0,callData:n,target:t}]}catch(v){const a=O(v,{abi:e,address:t,args:r,docsPath:"/docs/contract/multicall",functionName:o});if(!n)throw a;m[b]=[...m[b],{allowFailure:!0,callData:"0x",target:t}]}}return(await Promise.all(m.map((t=>S(e,{abi:u.F8,address:p,args:[t],blockNumber:o,blockTag:a,functionName:"aggregate3"}))))).flat().map((({returnData:e,success:t},r)=>{const o=m.flat(),{callData:a}=o[r],{abi:i,address:s,functionName:c,args:u}=h[r];try{if("0x"===a)throw new I.wb;if(!t)throw new g.VQ({data:e});const r=(0,l.k)({abi:i,args:u,data:e,functionName:c});return n?{result:r,status:"success"}:r}catch(v){const t=O(v,{abi:i,address:s,args:u,docsPath:"/docs/contract/multicall",functionName:c});if(!n)throw t;return{error:t,result:void 0,status:"failure"}}}))}(e,t),readContract:t=>S(e,t),simulateContract:t=>async function(e,{abi:t,address:n,args:r,dataSuffix:o,functionName:a,...i}){const s=i.account?(0,re.T)(i.account):void 0,c=(0,d.R)({abi:t,args:r,functionName:a});try{const{data:s}=await(0,T.R)(e,{batch:!1,data:`${c}${o?o.replace("0x",""):""}`,to:n,...i});return{result:(0,l.k)({abi:t,args:r,functionName:a,data:s||"0x"}),request:{abi:t,address:n,args:r,dataSuffix:o,functionName:a,...i}}}catch(u){throw O(u,{abi:t,address:n,args:r,docsPath:"/docs/contract/simulateContract",functionName:a,sender:s?.address})}}(e,t),verifyMessage:t=>ke(e,t),verifyTypedData:t=>async function(e,{address:t,signature:n,message:r,primaryType:o,types:a,domain:i,...s}){return Be(e,{address:t,hash:Ne({message:r,primaryType:o,types:a,domain:i}),signature:n,...s})}(e,t),uninstallFilter:e=>Oe(0,e),waitForTransactionReceipt:t=>async function(e,{confirmations:t=1,hash:n,onReplaced:r,pollingInterval:o=e.pollingInterval,timeout:a}){const i=(0,$e.P)(["waitForTransactionReceipt",e.uid,n]);let s,c,u,l=!1;return new Promise(((d,f)=>{a&&setTimeout((()=>f(new Ae.mc({hash:n}))),a);const h=ze(i,{onReplaced:r,resolve:d,reject:f},(r=>{const a=Qe(e,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:o,async onBlockNumber(o){if(l)return;let i=o;const d=e=>{a(),e(),h()};try{if(u){if(i-u.blockNumber+1nr.resolve(u)))}if(s||(l=!0,await(0,Ge.J)((async()=>{s=await Pe(e,{hash:n}),s.blockNumber&&(i=s.blockNumber)}),{delay:({count:e})=>200*~~(1<0&&i-u.blockNumber+1nr.resolve(u)))}catch(f){if(s&&(f instanceof Ae.Bh||f instanceof Ae.Yb)){c=s;const n=(await(0,ae.Q)(e,{blockNumber:i,includeTransactions:!0})).transactions.find((({from:e,nonce:t})=>e===c.from&&t===c.nonce));if(!n)return;if(u=await Ie(e,{hash:n.hash}),i-u.blockNumber+1n{r.onReplaced?.({reason:o,replacedTransaction:c,transaction:n,transactionReceipt:u}),r.resolve(u)}))}else d((()=>r.reject(f)))}}})}))}))}(e,t),watchBlocks:t=>function(e,{blockTag:t="latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:o,onError:a,includeTransactions:i,poll:s,pollingInterval:c=e.pollingInterval}){const u="undefined"!==typeof s?s:"webSocket"!==e.transport.type,l=i??!1;let d;return u?ze((0,$e.P)(["watchBlocks",e.uid,n,r,l,c]),{onBlock:o,onError:a},(o=>Ke((async()=>{try{const r=await(0,ae.Q)(e,{blockTag:t,includeTransactions:l});if(r.number&&d?.number){if(r.number===d.number)return;if(r.number-d.number>1&&n)for(let t=d?.number+1n;td.number)&&(o.onBlock(r,d),d=r)}catch(r){o.onError?.(r)}}),{emitOnBegin:r,interval:c}))):(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:r}=await e.transport.subscribe({params:["newHeads"],onData(n){if(!t)return;const r=(e.chain?.formatters?.block?.format||Ve.Z)(n.result);o(r,d),d=r},onError(e){a?.(e)}});n=r,t||n()}catch(r){a?.(r)}})(),n})()}(e,t),watchBlockNumber:t=>Qe(e,t),watchContractEvent:t=>function(e,{abi:t,address:n,args:r,batch:o=!0,eventName:a,onError:i,onLogs:s,poll:c,pollingInterval:u=e.pollingInterval,strict:l}){return("undefined"!==typeof c?c:"webSocket"!==e.transport.type)?(()=>{const c=(0,$e.P)(["watchContractEvent",n,r,o,e.uid,a,u]),d=l??!1;return ze(c,{onLogs:s,onError:i},(i=>{let s,c,l=!1;const f=Ke((async()=>{if(l)try{let u;if(c)u=await ve(0,{filter:c});else{const o=await le(e);u=s&&s!==o?await Ee(e,{address:n,args:r,fromBlock:s+1n,toBlock:o,event:(0,Y.m)({abi:t,name:a})}):[],s=o}if(0===u.length)return;o?i.onLogs(u):u.forEach((e=>i.onLogs([e])))}catch(u){c&&u instanceof Je.yR&&(l=!1),i.onError?.(u)}else{try{c=await ee(e,{abi:t,address:n,args:r,eventName:a,strict:d})}catch{}l=!0}}),{emitOnBegin:!0,interval:u});return async()=>{c&&await Oe(0,{filter:c}),f()}}))})():(()=>{let o=!0,c=()=>o=!1;return(async()=>{try{const u=a?Z({abi:t,eventName:a,args:r}):[],{unsubscribe:d}=await e.transport.subscribe({params:["logs",{address:n,topics:u}],onData(e){if(!o)return;const n=e.result;try{const{eventName:e,args:r}=be({abi:t,data:n.data,topics:n.topics,strict:l}),o=(0,ye.U)(n,{args:r,eventName:e});s([o])}catch(r){let e,t;if(r instanceof I.SM||r instanceof I.Gy){if(l)return;e=r.abiItem.name,t=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const o=(0,ye.U)(n,{args:t?[]:{},eventName:e});s([o])}},onError(e){i?.(e)}});c=d,o||c()}catch(u){i?.(u)}})(),c})()}(e,t),watchEvent:t=>function(e,{address:t,args:n,batch:r=!0,event:o,events:a,onError:i,onLogs:s,poll:c,pollingInterval:u=e.pollingInterval,strict:l}){const d="undefined"!==typeof c?c:"webSocket"!==e.transport.type,f=l??!1;return d?ze((0,$e.P)(["watchEvent",t,n,r,e.uid,o,u]),{onLogs:s,onError:i},(i=>{let s,c,l=!1;const d=Ke((async()=>{if(l)try{let u;if(c)u=await ve(0,{filter:c});else{const r=await le(e);u=s&&s!==r?await Ee(e,{address:t,args:n,event:o,events:a,fromBlock:s+1n,toBlock:r}):[],s=r}if(0===u.length)return;r?i.onLogs(u):u.forEach((e=>i.onLogs([e])))}catch(u){c&&u instanceof Je.yR&&(l=!1),i.onError?.(u)}else{try{c=await te(e,{address:t,args:n,event:o,events:a,strict:f})}catch{}l=!0}}),{emitOnBegin:!0,interval:u});return async()=>{c&&await Oe(0,{filter:c}),d()}})):(()=>{let r=!0,c=()=>r=!1;return(async()=>{try{const u=a??(o?[o]:void 0);let d=[];u&&(d=[u.flatMap((e=>Z({abi:[e],eventName:e.name,args:n})))],o&&(d=d[0]));const{unsubscribe:h}=await e.transport.subscribe({params:["logs",{address:t,topics:d}],onData(e){if(!r)return;const t=e.result;try{const{eventName:e,args:n}=be({abi:u,data:t.data,topics:t.topics,strict:f}),r=(0,ye.U)(t,{args:n,eventName:e});s([r])}catch(n){let e,r;if(n instanceof I.SM||n instanceof I.Gy){if(l)return;e=n.abiItem.name,r=n.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const o=(0,ye.U)(t,{args:r?[]:{},eventName:e});s([o])}},onError(e){i?.(e)}});c=h,r||c()}catch(u){i?.(u)}})(),c})()}(e,t),watchPendingTransactions:t=>function(e,{batch:t=!0,onError:n,onTransactions:r,poll:o,pollingInterval:a=e.pollingInterval}){return("undefined"!==typeof o?o:"webSocket"!==e.transport.type)?ze((0,$e.P)(["watchPendingTransactions",e.uid,t,a]),{onTransactions:r,onError:n},(n=>{let r;const o=Ke((async()=>{try{if(!r)try{return void(r=await ne(e))}catch(a){throw o(),a}const i=await ve(0,{filter:r});if(0===i.length)return;t?n.onTransactions(i):i.forEach((e=>n.onTransactions([e])))}catch(a){n.onError?.(a)}}),{emitOnBegin:!0,interval:a});return async()=>{r&&await Oe(0,{filter:r}),o()}})):(()=>{let t=!0,o=()=>t=!1;return(async()=>{try{const{unsubscribe:a}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!t)return;const n=e.result;r([n])},onError(e){n?.(e)}});o=a,t||o()}catch(a){n?.(a)}})(),o})()}(e,t)}}function Ze(e){const{key:t="public",name:n="Public Client"}=e;return(0,c.e)({...e,key:t,name:n,type:"publicClient"}).extend(Ye)}var Xe=n(62635),et=n(14160);function tt(e,t={}){const{key:n="fallback",name:r="Fallback",rank:o=!1,retryCount:a,retryDelay:i}=t;return({chain:t,pollingInterval:s=4e3,timeout:c})=>{let u=e,l=()=>{};const d=(0,et.q)({key:n,name:r,async request({method:e,params:n}){const r=async(o=0)=>{const a=u[o]({chain:t,retryCount:0,timeout:c});try{const t=await a.request({method:e,params:n});return l({method:e,params:n,response:t,transport:a,status:"success"}),t}catch(i){if(l({error:i,method:e,params:n,transport:a,status:"error"}),(0,Xe.y)(i))throw i;if(o===u.length-1)throw i;return r(o+1)}};return r()},retryCount:a,retryDelay:i,type:"fallback"},{onResponse:e=>l=e,transports:u.map((e=>e({chain:t,retryCount:0})))});if(o){const e="object"===typeof o?o:{};!function({chain:e,interval:t=4e3,onTransports:n,sampleCount:r=10,timeout:o=1e3,transports:a,weights:i={}}){const{stability:s=.7,latency:c=.3}=i,u=[],l=async()=>{const i=await Promise.all(a.map((async t=>{const n=t({chain:e,retryCount:0,timeout:o}),r=Date.now();let a,i;try{await n.request({method:"net_listening"}),i=1}catch{i=0}finally{a=Date.now()}return{latency:a-r,success:i}})));u.push(i),u.length>r&&u.shift();const d=Math.max(...u.map((e=>Math.max(...e.map((({latency:e})=>e)))))),f=a.map(((e,t)=>{const n=u.map((e=>e[t].latency)),r=1-n.reduce(((e,t)=>e+t),0)/n.length/d,o=u.map((e=>e[t].success)),a=o.reduce(((e,t)=>e+t),0)/o.length;return 0===a?[0,t]:[c*r+s*a,t]})).sort(((e,t)=>t[0]-e[0]));n(f.map((([,e])=>a[e]))),await(0,We.D)(t),l()};l()}({chain:t,interval:e.interval??s,onTransports:e=>u=e,sampleCount:e.sampleCount,timeout:e.timeout,transports:u,weights:e.weights})}return d}}var nt=n(88822);class rt extends b.G{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var ot=n(68583);function at(e,{errorInstance:t,timeout:n,signal:r}){return new Promise(((o,a)=>{(async()=>{let i;try{const s=new AbortController;n>0&&(i=setTimeout((()=>{r?s.abort():a(t)}),n)),o(await e({signal:s?.signal}))}catch(s){"AbortError"===s.name&&a(t),a(s)}finally{clearTimeout(i)}})()}))}let it=0;const st=new Map;async function ct(e){const t=new URL(e),r=t.toString();let o=st.get(r);if(o)return o;const{schedule:a}=(0,ot.S)({id:r,fn:async()=>{let e=await n.e(5289).then(n.bind(n,55289));e=e.default?.constructor?e.default:e.WebSocket;const a=new e(t),i=new Map,s=new Map,c=({data:e})=>{const t=JSON.parse(e),n="eth_subscription"===t.method,r=n?t.params.subscription:t.id,o=n?s:i,a=o.get(r);a&&a({data:e}),n||o.delete(r)},u=()=>{st.delete(r),a.removeEventListener("close",u),a.removeEventListener("message",c)};return a.addEventListener("close",u),a.addEventListener("message",c),a.readyState===e.CONNECTING&&await new Promise(((e,t)=>{a&&(a.onopen=e,a.onerror=t)})),o=Object.assign(a,{requests:i,subscriptions:s}),st.set(r,o),[o]}}),[i,[s]]=await a();return s}const ut={http:async function(e,{body:t,fetchOptions:n={},timeout:r=1e4}){const{headers:o,method:a,signal:i}=n;try{const s=await at((async({signal:s})=>await fetch(e,{...n,body:Array.isArray(t)?(0,$e.P)(t.map((e=>({jsonrpc:"2.0",id:it++,...e})))):(0,$e.P)({jsonrpc:"2.0",id:it++,...t}),headers:{...o,"Content-Type":"application/json"},method:a||"POST",signal:i||(r>0?s:void 0)})),{errorInstance:new nt.W5({body:t,url:e}),timeout:r,signal:!0});let c;if(c=s.headers.get("Content-Type")?.startsWith("application/json")?await s.json():await s.text(),!s.ok)throw new nt.Gg({body:t,details:(0,$e.P)(c.error)||s.statusText,headers:s.headers,status:s.status,url:e});return c}catch(s){if(s instanceof nt.Gg)throw s;if(s instanceof nt.W5)throw s;throw new nt.Gg({body:t,details:s.message,url:e})}},webSocket:function(e,{body:t,onResponse:n}){if(e.readyState===e.CLOSED||e.readyState===e.CLOSING)throw new nt.c9({body:t,url:e.url,details:"Socket is closed."});const r=it++,o=({data:a})=>{const i=JSON.parse(a);"number"===typeof i.id&&r!==i.id||(n?.(i),"eth_subscribe"===t.method&&"string"===typeof i.result&&e.subscriptions.set(i.result,o),"eth_unsubscribe"===t.method&&e.subscriptions.delete(t.params?.[0]))};return e.requests.set(r,o),e.send(JSON.stringify({jsonrpc:"2.0",...t,id:r})),e},webSocketAsync:async function(e,{body:t,timeout:n=1e4}){return at((()=>new Promise((n=>ut.webSocket(e,{body:t,onResponse:n})))),{errorInstance:new nt.W5({body:t,url:e.url}),timeout:n})}};var lt=n(57292),dt=n(58617);const ft=e=>(t,n,r)=>{const o=r.subscribe;r.subscribe=(e,t,n)=>{let a=e;if(t){const o=(null==n?void 0:n.equalityFn)||Object.is;let i=e(r.getState());a=n=>{const r=e(n);if(!o(i,r)){const e=i;t(i=r,e)}},(null==n?void 0:n.fireImmediately)&&t(i,i)}return o(a)};return e(t,n,r)};function ht(e,t){let n;try{n=e()}catch(r){return}return{getItem:e=>{var r;const o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),a=null!=(r=n.getItem(e))?r:null;return a instanceof Promise?a.then(o):o(a)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}const pt=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>pt(e)(n),catch(e){return this}}}catch(n){return{then(e){return this},catch:e=>pt(e)(n)}}},mt=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),((e,t)=>(n,r,o)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},i=!1;const s=new Set,c=new Set;let u;try{u=a.getStorage()}catch(b){}if(!u)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)}),r,o);const l=pt(a.serialize),d=()=>{const e=a.partialize({...r()});let t;const n=l({state:e,version:a.version}).then((e=>u.setItem(a.name,e))).catch((e=>{t=e}));if(t)throw t;return n},f=o.setState;o.setState=(e,t)=>{f(e,t),d()};const h=e(((...e)=>{n(...e),d()}),r,o);let p;const m=()=>{var e;if(!u)return;i=!1,s.forEach((e=>e(r())));const t=(null==(e=a.onRehydrateStorage)?void 0:e.call(a,r()))||void 0;return pt(u.getItem.bind(u))(a.name).then((e=>{if(e)return a.deserialize(e)})).then((e=>{if(e){if("number"!==typeof e.version||e.version===a.version)return e.state;if(a.migrate)return a.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return p=a.merge(e,null!=(t=r())?t:h),n(p,!0),d()})).then((()=>{null==t||t(p,void 0),i=!0,c.forEach((e=>e(p)))})).catch((e=>{null==t||t(void 0,e)}))};return o.persist={setOptions:e=>{a={...a,...e},e.getStorage&&(u=e.getStorage())},clearStorage:()=>{null==u||u.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>i,onHydrate:e=>(s.add(e),()=>{s.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),p||h})(e,t)):((e,t)=>(n,r,o)=>{let a={storage:ht((()=>localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},i=!1;const s=new Set,c=new Set;let u=a.storage;if(!u)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)}),r,o);const l=()=>{const e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},d=o.setState;o.setState=(e,t)=>{d(e,t),l()};const f=e(((...e)=>{n(...e),l()}),r,o);let h;const p=()=>{var e,t;if(!u)return;i=!1,s.forEach((e=>{var t;return e(null!=(t=r())?t:f)}));const o=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=r())?e:f))||void 0;return pt(u.getItem.bind(u))(a.name).then((e=>{if(e){if("number"!==typeof e.version||e.version===a.version)return e.state;if(a.migrate)return a.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return h=a.merge(e,null!=(t=r())?t:f),n(h,!0),l()})).then((()=>{null==o||o(h,void 0),h=r(),i=!0,c.forEach((e=>e(h)))})).catch((e=>{null==o||o(void 0,e)}))};return o.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{null==u||u.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>p(),hasHydrated:()=>i,onHydrate:e=>(s.add(e),()=>{s.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},a.skipHydration||p(),h||f})(e,t),bt=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"===typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!==typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,a={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,a),a},gt=e=>e?bt(e):bt;var yt=n(60263);function vt(e,t){if(Object.is(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;re[t++]}(function(e){let t=0;function n(){return e[t++]<<8|e[t++]}let r=n(),o=1,a=[0,1];for(let v=1;v>--c&1}const d=2**31,f=d>>>1,h=d-1;let p=0;for(let v=0;v<31;v++)p=p<<1|l();let m=[],b=0,g=d;for(;;){let e=Math.floor(((p-b+1)*o-1)/g),t=0,n=r;for(;n-t>1;){let r=t+n>>>1;e>>1|l(),i=i<<1^f,s=(s^f)<<1|f|1;b=i,g=1+s-i}let y=r-4;return m.map((t=>{switch(t-y){case 3:return y+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return y+256+(e[s++]<<8|e[s++]);case 1:return y+e[s++];default:return t-1}}))}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,n)=>t[e.charCodeAt(0)]=n));let n=e.length,r=new Uint8Array(6*n>>3);for(let o=0,a=0,i=0,s=0;o=8&&(r[a++]=s>>(i-=8));return r}(e)))}function At(e){return 1&e?~e>>1:e>>1}function xt(e,t){let n=Array(e);for(let r=0,o=0;r{let t=Pt(e);if(t.length)return t}))}function jt(e){let t=[];for(;;){let n=e();if(0==n)break;t.push(Tt(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push(St(n,e))}return t.flat()}function It(e){let t=[];for(;;){let n=e(t.length);if(!n)break;t.push(n)}return t}function Ot(e,t,n){let r=Array(e).fill().map((()=>[]));for(let o=0;or[t].push(e)));return r}function Tt(e,t){let n=1+t(),r=t(),o=It(t);return Ot(o.length,1+e,t).flatMap(((e,t)=>{let[a,...i]=e;return Array(o[t]).fill().map(((e,t)=>{let o=t*r;return[a+t*n,i.map((e=>e+o))]}))}))}function St(e,t){return Ot(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}var Bt=Et("AEgSbwjEDVYByQKaAQsBOQDpATQAngDUAHsAoABoANQAagCNAEQAhABMAHIAOwA9ACsANgAmAGIAHgAvACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGAAeABMAFwAXAA0ADgAWAA8AFAAVBFsF1QEXE0o3xAXUALIArkABaACmAgPGAK6AMDAwMAE/qAYK7P4HQAblMgVYBVkAPSw5Afa3EgfJwgAPA8meNALGCjACjqIChtk/j2+KAsXMAoPzASDgCgDyrgFCAi6OCkCQAOQA4woWABjVuskNDD6eBBx4AP4COhi+D+wKBirqBgSCaA0cBy4ArABqku+mnIAAXAaUJAbqABwAPAyUFvyp/Mo8INAIvCoDshQ8APcubKQAon4ZABgEJtgXAR4AuhnOBPsKIE04CZgJiR8cVlpM5INDABQADQAWAA9sVQAiAA8ASO8W2T30OVnKluYvChEeX05ZPe0AFAANABYAD2wgXUCYAMPsABwAOgzGFryp/AHauQVcBeMC0KACxLEKTR2kZhR0Gm5M9gC8DmgC4gAMLjSKF8qSAoF8ARMcAL4OaALiAAwuAUlQJpJMCwMt/AUpCthqGK4B2EQAciwSeAIyFiIDKCi6OGwAOuIB9iYAyA7MtgEcZIIAsgYABgCK1EoFHNZsGACoKNIBogAAAAAAKy4DnABoAQoaPu43dQQZGACrAcgCIgDgLBJ0OvRQsTOiKDVJBfsoBVoFWbC5BWo7XkITO1hCmHuUZmCh+QwUA8YIJvJ4JASkTAJUVAJ2HKwoAZCkpjZcA0YYBIRiCgDSBqxAMCQHKgI6XgBsAWIgcgCEHhoAlgFKuAAoahgBsMYDOC4iRFQBcFoGZgJmAPJKGAMqAgYASkIArABeAHQALLYGCPTwGo6AAAAKIgAqALQcSAHSAdwIDDKXeYHpAAsAEgA1AD4AOTR3etTBEGAQXQJNCkxtOxUMAq0PpwvmERYM0irM09kANKoH7ANUB+wDVANUB+wH7ANUB+wDVANUA1QDVBwL8BvUwRBgD0kEbgWPBYwE1wiEJkoRggcpCNNUDnQfHEgDRgD9IyZJHTuUMwwlQ0wNTQQH/TZDbKh9OQNIMaxU9pCjA8wyUDltAh5yEqEAKw90HTW2Tn96SHGhCkxPr7WASWNOaAK/Oqk/+QoiCZRvvHdPBj4QGCeiEPQMMAGyATgN6kvVBO4GOATGH3oZFg/KlZkIoi3aDOom4C6egFcj8iqABepL8TzaC0pRZQ9WC2IJ4DpggUsDHgEKIogK2g02CGoQ8ArGaA3iEUIHNgPSSZcAogb+Cw4dMhWyJg1iqQsGOXQG+BrzC4wmrBMmevkF0BoeBkoBJhr8AMwu5IWtWi5cGU9cBgALIiPEFKVQHQ0iQLR4RRoYBxIlpgKOQ21KhFEzHpAh8zw6DWMuEFF5B/I8AhlMC348m0aoRQsRzz6KPUUiRkwpBDJ8LCwniAnMD4IMtnxvAVYJHgmuDG4TLhEUN8IINgcWKpchJxIIHkaSYJcE9JwD8BPOAwgFPAk+BxADshwqEysVJgUKgSHUAvA20i6wAoxWfQEUBcgPIh/cEE1H3Q7mCJgCYgOAJegAKhUeABQimAhAYABcj9VTAi7ICMRqaSNxA2QU5F4RcAeODlQHpBwwFbwc3nDFXgiGBSigrAlYAXIJlgFcBOAIBjVYjJ0gPmdQi1UYmCBeQTxd+QIuDGIVnES6h3UCiA9oEhgBMgFwBzYM/gJ0EeoRaBCSCOiGATWyM/U6IgRMIYAgDgokA0xsywskJvYM9WYBoBJfAwk0OnfrZ6hgsyEX+gcWMsJBXSHuC49PygyZGr4YP1QrGeEHvAPwGvAn50FUBfwDoAAQOkoz6wS6C2YIiAk8AEYOoBQH1BhnCm6MzQEuiAG0lgNUjoACbIwGNAcIAGQIhAV24gAaAqQIoAACAMwDVAA2AqoHmgAWAII+AToDJCwBHuICjAOQCC7IAZIsAfAmBBjADBIA9DRuRwLDrgKAZ2afBdpVAosCRjIBSiIEAktETgOsbt4A2ABIBhDcRAESqEfIF+BAAdxsKADEAPgAAjIHAj4BygHwagC0AVwLLgmfsLIBSuYmAIAAEmgB1AKGANoAMgB87gFQAEoFVvYF0AJMRgEOLhUoVF4BuAMcATABCgB2BsiKosYEHARqB9ACEBgV3gLvKweyAyLcE8pCwgK921IAMhMKNQqkCqNgWF0wAy5vPU0ACx+lPsQ/SwVOO1A7VTtQO1U7UDtVO1A7VTtQO1UDlLzfvN8KaV9CYegMow3RRMU6RhPYYE5gLxPFLbQUvhXLJVMZOhq5JwIl4VUGDwEt0GYtCCk0che5ADwpZYM+Y4MeLQpIHORTjlT1LRgArkufM6wNqRsSRD0FRHXqYicWCwofAmR+AmI/WEqsWDcdAqH0AmiVAmYGAp+BOBgIAmY4AmYjBGsEfAN/EAN+jzkDOXQUOX86ICACbBoCMjM4BwJtxAJtq+yHMGRCKAFkANsA3gBHAgeVDIoA+wi/AAqyAncsAnafPAJ5SEACeLcaWdhFq0bwAnw8AnrFAn0GAnztR/1IemAhACgSSVVKWBIUSskC0P4C0MlLJAOITAOH40TCkS8C8p5dAAMDq0vLTCoiAMxNSU2sAos8AorVvhgEGkBkArQCjjQCjlk9lH4CjtYCjll1UbFTMgdS0VSCApP4ApMJAOYAGVUbVaxVzQMsGCmSgzLeeGNFODYCl5wC769YHqUAViIClowClnmZAKZZqVoGfkoAOAKWsgKWS1xBXM4CmcgCmWFcx10EFgKcmDm/OpoCnBMCn5gCnrWHABoMLicMAp3uAp6PALI6YTFh7AKe0AKgawGmAp6cHAKeS6JjxWQkIigCJ6wCJnsCoPgCoEnUAqYsAqXLAqf8AHoCp+9oeWiuAABGahlqzgKs4AKsqwKtZAKs/wJXGgJV2QKx3tQDH0tslAKyugoCsuUUbN1tYG1FXAMlygK2WTg8bo0DKUICuFsCuUQSArkndHAzcN4CvRYDLa8DMg4CvoVx/wMzbgK+F3Mfc0wCw8gCwwFzf3RIMkJ03QM8pAM8lwM9vALFeQLGRALGDYYCyGZOAshBAslMAskrAmSaAt3PeHZeeKt5IkvNAxigZv8CYfEZ8JUhewhej164DgLPaALPaSxIUM/wEJwAw6oCz3ABJucDTg9+SAIC3CQC24cC0kwDUlkDU1wA/gNViYCGPMgT6l1CcoLLg4oC2sQC2duEDYRGpzkDhqIALANkC4ZuVvYAUgLfYgLetXB0AuIs7REB8y0kAfSYAfLPhALr8ALpbXYC6vYC6uEA9kQBtgLuhgLrmZanlwAC7jwDhd2YdnDdcZ4C8wAAZgOOE5mQAvcQA5FrA5KEAveVAvnWAvhjmhmaqLg0mxsDnYAC/vcBGAA2nxmfsAMFigOmZwOm1gDOwgMGZ6GFogIGAwxGAQwBHAdqBl62ZAIAuARovA6IHrAKABRyNgAgAzASSgOGfAFgJB4AjOwAHgDmoAScjgi0BhygwgCoBRK86h4+PxZ5BWk4P0EsQiJCtV9yEl+9AJbGBTMAkE0am7o7J2AzErrQDjAYxxiKyfcFWAVZBVgFWQVkBVkFWAVZBVgFWQVYBVkFWAVZRxYI2IZoAwMDCmVe6iwEygOyBjC8vAC8BKi8AOhBKhazBUc+aj5xQkBCt192OF/pAFgSM6wAjP/MbMv9puhGez4nJAUsFyg3Nn5u32vB8hnDLGoBbNdvMRgFYAVrycLJuQjQSlwBAQEKfV5+jL8AND+CAAQW0gbmriQGAIzEDAMCDgDlZh4+JSBLQrJCvUI5JF8oYDcoOSQJwj4KRT9EPnk+gj5xPnICikK9SkM8X8xPUGtOCy1sVTBrDG8gX+E0OxwJaJwKYyQsPR4nQqxCvSzMAsv9X8oPIC8KCQoAACN+nt9rOy5LGMmsya0JZsLMzQphQWAP5hCkEgCTjh5GQiYbqm06zjkKND9EPnFCQBwICx5NSG1cLS5a4rwTCn7uHixCQBxeCUsKDzRVREM4BTtEnC0KghwuQkAb9glUIyQZMTIBBo9i8F8KcmTKYAxgLiRvAERgGjoDHB9gtAcDbBFmT2BOEgIAZOhgFmCWYH5gtGBMYJJpFhgGtg/cVqq8WwtDF6wBvCzOwgMgFgEdBB8BegJtMDGWU4EBiwq5SBsA5SR0jwvLDqdN6wGcAoidUAVBYAD4AD4LATUXWHsMpg0lILuwSABQDTUAFhO4NVUC0wxLZhEcANlPBnYECx9bADIAtwKbKAsWcKwzOaAaAVwBhwn9A9ruEAarBksGugAey1aqWwq7YhOKCy1ADrwBvAEjA0hbKSkpIR8gIi0TJwciDY4AVQJvWJFKlgJvIA9ySAHUdRDPUiEaqrFN6wcSBU1gAPgAPgsBewAHJW0LiAymOTEuyLBXDgwAYL0MAGRKaFAiIhzAADIAtwKbKC08D88CkRh8ULxYyXRzjtilnA72mhU+G+0S2hIHDxwByAk7EJQGESwNNwwAPAC0zwEDAKUA4gCbizAAFQBcG8cvbXcrDsIRAzwlRNTiHR8MG34CfATCC6vxbQA4Oi4Opzkuz6IdB7wKABA7Ls8SGgB9rNsdD7wbSBzOoncfAT4qYB0C7KAJBE3z5R9mDL0M+wg9Cj8ABcELPgJMDbwIvQ09CT0KvS7PoisOvAaYAhwPjBriBBwLvBY8AKELPBC8BRihe90AO2wMPQACpwm9BRzR9QYFB2/LBnwAB7wSXBISvQECAOsCAAB1FVwHFswV/HAXvBg8AC68AuyovAAevAJWISuAAAG8AALkFT0VvCvso7zJqDwEAp8nTAACXADn3hm8CaVcD7/FAPUafAiiBQv/cQDfvKe8GNwavKOMeXMG/KmchAASvAcbDAADlABtvAcAC7ynPAIaPLsIopzLDvwHwak8AOF8L7dtvwNJAAPsABW8AAb8AAm8AGmMABq8AA68Axi8jmoV/AABXAAObAAuTB8ABrwAF7wIIgANSwC6vCcAA7wADpwq7ACyWwAcHAAbvAAB7AqiAAXHCxYV3AAHnABCvAEDAGm8AAt8AB28AAi8CaIABcsAbqAZ1gCSCCIABcsAATwAB9wAHZwIIgAGmwAJfAAbLABtHADmvIEACFwACDwAFLwAaPwJIgAGywDjjAAJPAuiDsX7YAAHPABunUBJAEgACrwFAAM8AAmuAzgABxwAGXwAAgym/AAKHAAKPAAJ/KfsBrwACRwAAwwAEDwBABQ8ABFsAA+MAA3sAA28ABkMBxYcABU8AG6cFrQBvAC7ABM8BABpLAsA4UwAAjwABFMAF3wFHAAG0QAYvB8BfClTADpGALAJBw4McwApK3EBpQYIXwJtJA0ACghwTG1gK4oggRVjLjcDogq1AALZABcC/ARvAXdzSFMVIgNQAhY/AS0GBHRHvnxTe0EAKgAyAvwAVAvcAHyRLQEsAHfmDhIzRwJLAFgGAAJRAQiLzQB5PAQhpgBbANcWAJZpOCCMAM5ssgDQ1RcJw3Z0HBlXHgrSAYmRrCNUVE5JEz3DivoAgB04QSos4RKYUABzASosMSlDGhADMVYE+MbvAExm3QBrAnICQBF7Osh4LzXWBhETIAUVCK6v/xPNACYAAQIbAIYAiQCONgDjALQA1QCdPQC7AKsApgChAOcAnwDTAJwA4AEBAPwAwAB6AFsAywDNAPwA1wDrAIkAogEqAOMA2ADVBAIIKzTT09PTtb/bzM/NQjEWAUsBVS5GAVMBYgFhAVQBRUpCRGcMAUwUBgkEMzcMBwAgDSQmKCs3OTk8PDw9Pg0/HVBQUFBSUlFSKFNUVlVVHFxgYF9hYCNlZ29ucXFxcXFxc3Nzc3Nzc3Nzc3N1dXZ1dFsAPesAQgCTAHEAKwBf8QCHAFAAUAAwAm/oAIT+8fEAXQCM6wCYAEgAWwBd+PipAH4AfgBiAE8AqgAdAK8AfAI5AjwA9QDgAPcA9wDhAPgA4gDiAOEA3wAoAnQBSgE5ATcBTQE3ATcBNwEyATEBMQExARUBURAAKgkBAEwYCxcEFhcPAIcAjwCfAEoAYxkCKgBvAGgAkAMOAyArAxpCP0gqAIoCSADAAlACnQC5Ao8CjwKPAo8CjwKPAoQCjwKPAo8CjwKPAo8CjgKOApECmQKQAo8CjwKNAo0CjQKNAosCjgJuAc0CkAKYAo8CjwKOF3oMAPcGA5gCWgIzGAFNETYC2xILLBQBRzgUTpIBdKU9AWJaAP4DOkgA/wCSKh4ZkGsAKmEAagAvAIoDlcyM8K+FWwa7LA/DEgKe1nUrCwQkWwGzAN5/gYB/gX+Cg4N/hIeFf4aJh4GIg4mDin+Lf4x/jYuOf49/kIORf5J/k3+Uf5WElomXg5h/AIMloQCEBDwEOQQ7BD4EPARCBD8EOgRABEIEQQQ9BD8EQgCkA4gAylIA0AINAPdbAPcBGgD3APUA9QD2APXVhSRmvwD3APUA9QD2APUdAIpbAPcAigEaAPcAigLtAPcAitWFJGa/HQD4WwEaAPcA9wD1APUA9gD1APgA9QD1APYA9dWFJGa/HQCKWwEaAPcAigD3AIoC7QD3AIrVhSRmvx0CRAE3AksBOgJMwgOfAu0Dn9WFJGa/HQCKWwEaA58AigOfAIoC7QOfAIrVhSRmvx0EMQCKBDIAigeOMm4hLQCKAT9vBCQA/gDHWwMAVVv/FDMDAIoDPtkASgMAigMAl2dBtv/TrfLzakaPh3aztmIuZQrR3ER2n5Yo+qNR2jK/aP/V04UK1njIJXLgkab9PjOxyJDVbIN3R/FZLoZVl2kYFQIZ7V6LpRqGDt9OdDohnJKp5yX/HLj0voPpLrneDaN11t5W3sSM4ALscgSw8fyWLVkKa/cNcQmjYOgTLZUgOLi2F05g4TR0RfgZ4PBdntxdV3qvdxQt8DeaMMgjJMgwUxYN3tUNpUNx21AvwADDAIa0+raTWaoBXmShAl5AThpMi282o+WzOKMlxjHj7a+DI6AM6VI9w+xyh3Eyg/1XvPmbqjeg2MGXugHt8wW03DQMRTd5iqqOhjLvyOCcKtViGwAHVLyl86KqvxVX7MxSW8HLq6KCrLpB8SspAOHO9IuOwCh9poLoMEha9CHCxlRAXJNDobducWjqhFHqCkzjTM2V9CHslwq4iU19IxqhIFZMve15lDTiMVZIPdADXGxTqzSTv0dDWyk1ht430yvaYCy9qY0MQ3cC5c1uw4mHcTGkMHTAGC99TkNXFAiLQgw9ZWhwKJjGCe+J5FIaMpYhhyUnEgfrF3zEtzn40DdgCIJUJfZ0mo3eXsDwneJ8AYCr7Vx2eHFnt2H6ZEyAHs9JoQ4Lzh5zBoGOGwAz37NOPuqSNmZf51hBEovtpm2T1wI79OBWDyvCFYkONqAKGVYgIL0F+uxTcMLSPtFbiNDbBPFgip8MGDmLLHbSyGXdCMO6f7teiW9EEmorZ+75KzanZwvUySgjoUQBTfHlOIerJs6Y9wLlgDw18AB1ne0tZRNgGjcrqHbtubSUooEpy4hWpDzTSrmvqw0H9AoXQLolMt9eOM+l9RitBB1OBnrdC1XL4yLFyXqZSgZhv7FnnDEXLUeffb4nVDqYTLY6X7gHVaK4ZZlepja2Oe6OhLDI/Ve5SQTCmJdH3HJeb14cw99XsBQAlDy5s5kil2sGezZA3tFok2IsNja7QuFgM30Hff3NGSsSVFYZLOcTBOvlPx8vLhjJrSI7xrNMA/BOzpBIJrdR1+v+zw4RZ7ry6aq4/tFfvPQxQCPDsXlcRvIZYl+E5g3kJ+zLMZon0yElBvEOQTh6SaAdIO6BwdqJqfvgU+e8Y65FQhdiHkZMVt9/39N2jGd26J6cNjq8cQIyp6RonRPgVn2fl89uRDcQ27GacaN0MPrcNyRlbUWelKfDfyrNVVGBG5sjd3jXzTx06ywyzuWn5jbvEfPPCTbpClkgEu9oPLKICxU5HuDe3jA1XnvU85IYYhaEtOU1YVWYhEFsa4/TQj3rHdsU2da2eVbF8YjSI0m619/8bLMZu3xildwqM7zf1cjn4Whx0PSYXcY5bR7wEQfGC7CTOXwZdmsdTO8q3uGm7Rh/RfCWwpzBHCAaVfjxgibL5vUeL0pH6bzDmI9yCXKC/okkmbc28OJvI87L/bjFzpq0DHepw4kT1Od+fL7cyuFaRgfaUWB2++TCFvz11J0leEtrGkpccfX9z2LY39sph4PBHCjNOOkd0ybUm+ZzS8GkFbqMpq8uiX2yHpa0jllTLfGTDBMYR6FT5FWLLDPMkYxt1Q0eyMvxJWztDjy0m6VvZPvamrFXjHmPpU6WxrZqH6WW//I37RwvqPQhPz8I3RPuXAk1C94ZprQWm9iGM/KgiGDO6SV9sjp+Jmk4TBajMNJ5zzWZ1k1jrteQQBp9C2dOvmbIeeEME8y573Q8TgGe+ZCzutM45gYLBzYm2LNvgq2kebAbMpHRDSyh6dQ27GbsAAdCqQVVXWC1C+zpwBM2Lr4eqtobmmu1vJEDlIQR1iN8CUWpztq50z7FFQBn3SKViX6wSqzVQCoYvAjByjeSa+h1PRnYWvBinTDB9cHt4eqDsPS4jcD3FwXJKT0RQsl8EvslI2SFaz2OtmYLFV8FwgvWroZ3fKmh7btewX9tfL2upXsrsqpLJzpzNGyNlnuZyetg7DIOxQTMBR7dqlrTlZ6FWi1g4j1NSjA2j1Yd7fzTH6k9LxCyUCneAKYCU581bnvKih6KJTeTeCX4Zhme/QIz7w2o+AdSgtLAkdrLS9nfweYEqrMLsrGGSWXtgWamAWp6+x6GM/Z8jNw3BqPNQ39hrzYLECn3tPvh/LqKbRSCiDGauDKBBj/kGbpnM1Bb/my8hv4NWStclkwjfl57y4oNDgw1JAG9VOti3QVVoSziMEsSdfEjaCPIDb7SgpLXykQsM+nbqbt97I0mIlzWv0uqFobLMAq8Rd9pszUBKxFhBPwOjf//gVOz2r7URJ2OnpviCXv9iz3a4X/YLBYbXoYwxBv/Kq0a5s4utQHzoTerJ7PmFW/no/ZAsid/hRIV82tD+Qabh5F1ssIM8Ri3chu0PuPD3sSJRMjDoxLAbwUbroiPAz/V52e8s3DIixxlO7OrvhMj3qfzA0kKxzwicr5wJmZwJxTXgrwYsqhRvpgC2Nfdyd+TYYxJSZgk+gk2g9KyHSlwQVAyPtWWgvVGyVBqsU2LpDlLNosSAtolC1uBKt5pQZLhAxTjeGCWIC/HVpagc5rRwkgpCHKEsjA8d+scp8aiMewwQBhp5dYTV5t/Nvl+HbDMu8F3S0psPyZb1bSnqlHPFUnMQeQqSqwDBT23fJO9gO3aVaa1icrXU0PKwlMM5K+iL3ATcVq2fFWKk0irCTF4LDVDG4gUpkyplq6efcZS+WDR1woApjD18x+2JQR9oOXzuA7uy4b+/91WsJd/tSd1QcAH8PVPXApieA37B7YXPhDPH1azP3PKR+HfHmOoDYLeuKsIi/ssSsdYs62qJo14Hw1P2N/6zpr8F3FTWmJ4ysAVcl84Iv/tl///Z8FaAWbBQbyMNDZjrZ2JwdRjtd1jOeNumSodFtr4/Zf45iRJf/8HSW+KIB/+GlKu8Rv1BPLr/4duoL+kFPRqrstEr41gfJupoJRf4hcYDWX93FOcfEBiIivxtjtV8g7mvOReiamYWKE7vfPbv3v2L9Kwq3cIDFGLyhyfOGuf/9vA5muH6Pjg7B4SUj2ydDXra9fSBI+DrsNHA6l51wfHssJb+11TfNk7B8OleUe3Y+ZmHboMFHdv7FFP2cfISFyeAQR0sk/Xv62HBTdW4HmnGSLFk/cqyWVVFJkdIIa+4hos3JRHcqLoRKM5h2Qtk1RZtzISMtlXTfTqIc77YsCCgQD0r61jtxskCctwJOtjE/pL8wC4LBD4AZFjh2wzzFCrT/PNqW0/DeBbkfMfzVm9yy06WiF+1mTdNNEAytVtohBKg3brWd2VQa+aF+cQ0mW5CvbwOlWCT07liX226PjiVLwFCRs/Ax2/u+ZNPjrNFIWIPf5GjHyUKp60OeXe9F01f7IaPf/SDTvyDAf7LSWWejtiZcsqtWZjrdn6A2MqBwnSeKhrZOlUMmgMionmiCIvXqKZfmhGZ1MwD3uMF4n9KJcfWLA3cL5pq48tm5NDYNh3SS/TKUtmFSlQR89MR4+kxcqJgpGbhm9gXneDELkyqAN5nitmIzTscKeJRXqd64RiaOALR2d295NWwbjHRNG2AU5oR9OS2oJg/5CY6BFPc1JvD2Mxdhp2/MZdI8dLePxiP4KRIp8VXmqfg+jqd/RNG7GNuq1U2SiI4735Bdc0MVFx6mH5UOWEa5HuhYykd6t4M1gYLVS8m1B+9bUqi5DziQq7qT8d94cxB6AB4WqMCOF/zPPtRSZUUaMSsvHOWxGASufywTX8ogy6HgUf9p+Z30wUEosl8qgmwm6o2AV6nO9HKQjRHpN6SUegI5pvR61RLnUJ1lqCtmfcsRQutEizVpAaPXN7xMp5UQ5OSZK6tniCK9CpyMd7LjR6+MxfoMEDPpWdf2p2m5N3KO4QMxf+V7vGdYjemQczQ+m2MGIkFNYDMf0Yop2eSx81sP36WHUczqEhKysp2iJSYAvfgJjinKwToPvRKb+HBi+7cJ96S5ngfLOXaHAFRLkulo4TnXTFO51gX0TCCo4ZUHdbpdgkMEwUZAPjh6M+hA8DzycbtxAgH3uD6i0nN1aTiIuQ4BYCE9dEHHwAmINU+4YEWx4EC3OZwFGfYZMPLScVlb+BAAJeARUh+gdWA3/gRqCrf1jecgqeFf1MdzrrP4SVlGm5mMihSP+zYYksAB7O+SBPwNQqSNMiLnkviY/klwgcRmvqtCqeWeA0gjuir4CMZqmw/ntP6M+l0pdN8/P9xI53aP7x/zavJbbKOz8VzO/nXxIr1tjparMnqd6iWdByHKw4lF4p/u57Yv07WeZPDnRl7wgmDVZZ44fQsjdYO/gmXQ+940PRGst8UMQApFC4OOV22e4N+lVOPyFLAOj4t8R3PFw/FjbSWy0ELuAFReNkee8ORcBOT2NPDcs7OfpUmzvn/F9Czk9o9naMyVYy/j8I5qVFmQDFcptBp65J/+sJA3w/j6y/eqUkKxTsf0CZjtNdRSBEmJ2tmfgmJbqpcsSagk+Ul9qdyV+NnqFBIJZFCB1XwPvWGDBOjVUmpWGHsWA5uDuMgLUNKZ4vlq5qfzY1LnRhCc/mh5/EX+hzuGdDy5aYYx4BAdwTTeZHcZpl3X0YyuxZFWNE6wFNppYs3LcFJePOyfKZ8KYb7dmRyvDOcORLPH0sytC6mH1US3JVj6paYM1GEr+CUmyHRnabHPqLlh6Kl0/BWd3ebziDfvpRQpPoR7N+LkUeYWtQ6Rn5v5+NtNeBPs2+DKDlzEVR5aYbTVPrZekJsZ9UC9qtVcP99thVIt1GREnN8zXP8mBfzS+wKYym8fcW6KqrE702Zco+hFQAEIR7qimo7dd7wO8B7R+QZPTuCWm1UAwblDTyURSbd85P4Pz+wBpQyGPeEpsEvxxIZkKsyfSOUcfE3UqzMFwZKYijb7sOkzpou+tC4bPXey5GI1GUAg9c3vLwIwAhcdPHRsYvpAfzkZHWY20vWxxJO0lvKfj6sG2g/pJ1vd/X2EBZkyEjLN4nUZOpOO7MewyHCrxQK8d5aF7rCeQlFX+XksK6l6z971BPuJqwdjj68ULOj9ZTDdOLopMdOLL0PFSS792SXE/EC9EDnIXZGYhr52aQb+9b2zEdBSnpkxAdBUkwJDqGCpZk/HkRidjdp0zKv/Cm52EenmfeKX6HkLUJgMbTTxxIZkIeL/6xuAaAAHbA7mONVduTHNX/UJj1nJEaI7f3HlUyiqKn7VfBE+bdb4HWln1HPJx001Ulq1tOxFf8WZEARvq5Da1+pE7fPVxLntGACz3nkoLsKcPdUqdCwwiyWkmXTd5+bv3j7HaReRt3ESn783Ew3SWsvkEjKtbocNksbrLmV+GVZn1+Uneo35MT1/4r8fngQX5/ptORfgmWfF6KSB/ssJmUSijXxQqUpzkANEkSkYgYj560OOjJr6uqckFuO15TRNgABEwNDjus1V3q2huLPYERMCLXUNmJJpbMrUQsSO7Qnxta55TvPWL6gWmMOvFknqETzqzFVO8SVkovEdYatypLGmDy9VWfgAc0KyIChiOhbd7UlbAeVLPZyEDp4POXKBwN/KP5pT6Cyqs6yaI00vXMn1ubk9OWT9Q/O2t/C25qlnO/zO0xcBzpMBCAB8vsdsh3U8fnPX1XlPEWfaYJxKVaTUgfCESWl4CCkIyjE6iQ5JFcwU6S4/IH0/Agacp8d5Gzq2+GzPnJ7+sqk40mfFQpKrDbAKwLlr3ONEati2k/ycLMSUu7V/7BBkDlNyXoN9tvqXCbbMc4SSQXgC/DBUY9QjtrCtQ+susEomCq8xcNJNNMWCH31GtlTw2BdCXkJBjT+/QNWlBWwQ5SWCh1LdQ99QVii/DyTxjSR6rmdap3l3L3aiplQpPYlrzNm9er88fXd2+ao+YdUNjtqmxiVxmyYPzJxl67OokDcTezEGqldkGgPbRdXA+fGcuZVkembZByo7J1dMnkGNjwwCny+FNcVcWvWYL9mg8oF7jACVWI3bA64EXpdM8bSIEVIAs5JJH+LHXgnCsgcMGPZyAAVBncvbLiexzg9YozcytjPXVlAbQAC7Tc4S0C8QN4LlAGjj4pQAVWrwkaDoUYGxxvkCWKRRHkdzJB5zpREleBDL1oDKEvAqmkDibVC4kTqF89YO6laUjgtJPebBfzr16tg4t10GmN1sJ5vezk2sUOq8blCn5mPZyT3ltaDcddKupQjqusNM9wtFVD0ABzv17fZDn7GPT1nkCtdcgYejcK1qOcTGtPxnCX1rErEjVWCnEJv5HaOAUjgpiKQjUKkQi64D5g2COgwas8FcgIl0Pw95H9dWxE3QG0VbMNffh6BPlAojLDf4es2/5Xfq7hw5NGcON2g8Qsy2UQm94KddKyy3kdJxWgpNaEc15xcylbLC3vnT26u8qS90qc2MU8LdOJc5VPF5KnSpXIhnj1eJJ/jszjZ01oR6JDFJRoeTPO/wh4IPFbdG9KljuSzeuI92p8JF/bpgDE8wG86/W2EBKgPrmzdLijxssQn8mM44ky/KLGOJcrSwXIpZa/Z3v7W6HCRk7ewds99LTsUW1LbeJytw8Q/BFZVZyfO9BUHOCe2suuEkO8DU4fLX0IQSQ2TdOkKXDtPf3sNV9tYhYFueuPRhfQlEEy+aYM/MCz7diDNmFSswYYlZZPmKr2Q5AxLsSVEqqBtn6hVl1BCFOFExnqnIsmyY/NA8jXnDaNzr7Zv3hu+I1Mf/PJjk0gALN2G8ABzdf9FNvWHvZHhv6xIoDCXf964MxG92vGZtx/LYU5PeZqgly8tT5tGeQGeJzMMsJc5p+a5Rn2PtEhiRzo/5Owjy1n0Lzx3ev8GHQmeWb8vagG6O5Qk5nrZuQTiKODI4UqL0LLAusS2Ve7j1Ivdxquu1BR9Rc4QkOiUPwQXJv6du2E8i5pDhVoQpUhyMWGUT2O2YODIhjAfI71gxep5r5zAY7GBUZpy51hAw0pcCCrhOmU8Wp6ujQTdZQsCjtq6SHX8QAMNiPCIIkoxhHEZPgsBcOlP4aErJZPhF7qvx6gHrn8hEwPwYbx8YmT/n7lbcmTip1v8kgsrIjFTAlvLY4Nuil0KDmgz3svYs0ZJ3O3Is/vSx4xpxF1e2VAtZE8dJxGYEIhCSuPvCjP54l/NSNDnwlKvAW8mG+AQkgp7a87Igh26uKMFGD0PoPHTSvoWxiHuk+su8XkQiHIjeYKl/RdcOHpxhQH3zHCNE3aARm83Bl6zGxU/vMltlVPQhubcqhW4RYkl6uXk5JdP/QpzaKFpw2M8zvysv2qj7xaQECuu2akM0Cssj/uB9+wDR7uA6XOnLNaoczalHoMj33eiiu+DRaFsUmlmUZuh9bjDY4INMNSSAivSh03uJvny4Gj+D+neudoa7iJi7c4VFlZ/J5gUR82308zSNAt/ZroBXDWw0fV3eVPAn3aX0mtJabF6RsUZmL+Ehn+wn51/4QipMjD+6y64t7bjL6bjENan2prQ4h7++hBJ9NXvX8CUocJqMC937IasLzm5K0qwXeFMAimMHkEIQIQI2LrQ9sLBfXuyp66zWvlsh74GPv7Xpabj993pRNNDuFud5oIcn/92isbADXdpRPbjmbCNOrwRbxGZx2XmYNGMiV5kjF4IKyxCBvKier9U4uVoheCdmk83rp5G0PihAm2fAtczI4b9BWqX+nrZTrJX5kSwQddi93NQrXG+Cl3eBGNkM77VBsMpEolhXex1MVvMkZN9fG59GGbciH11FEXaY1MxrArovaSjE/lUUqBg2cZBNmiWbvzCHCPJ4RVGFK2dTbObM1m+gJyEX53fa7u3+TZpm74mNEzWbkVL4vjNwfL9uzRCu1cgbrNx5Yv5dDruNrIOgwIk+UZWwJfdbu/WHul6PMmRflVCIzd7B37Pgm/Up/NuCiQW7RXyafevN3AL6ycciCc4ZPlTRzEu+aURGlUBOJbUEsheX7PPyrrhdUt5JAG12EEEZpY/N3Vhbl5uLAfT0CbC2XmpnryFkxZmBTs5prvEeuf0bn73i3O82WTiQtJWEPLsBXnQmdnKhB06NbbhLtlTZYJMxDMJpFeajSNRDB2v61BMUHqXggUwRJ19m6p5zl51v11q34T74lTXdJURuV6+bg2D6qpfGnLy7KGLuLZngobM4pIouz4+n0/UzFKxDgLM4h+fUwKZozQ9UGrHjcif51Ruonz7oIVZ56xWtZS8z7u5zay6J2LD4gCYh2RXoBRLDKsUlZ80R8kmoxlJiL8aZCy2wCAonnucFxCLT1HKoMhbPKt34D97EXPPh0joO93iJVF1Uruew61Qoy3ZUVNX9uIJDt9AQWKLLo+mSzmTibyLHq0D6hhzpvgUgI6ekyVEL3FD+Fi5R3A8MRHPXspN1VyKkfRlC+OGiNgPC4NREZpFETgVmdXrQ2TxChuS3aY+Ndc7CiYv5+CmzfiqeZrWIQJW/C4RvjbGUoJFf1K6ZdR2xL/bG4kVq1+I4jQWX+26YUijpp+lpN7o5c6ZodXJCF56UkFGsqz44sIg8jrdWvbjRCxi2Bk0iyM3a7ecAV93zB6h1Ei38c0s6+8nrbkopArccGP8vntQe1bFeEh2nJIFOHX/k3/UHb5PtKGpnzbkmnRETMX+9X/QduLZWw/feklW/kH/JnzToJe9Kgu9Hct1UGbH5BPCLo4OOtQnZonW0xnyCcdtKyPQ/sbLiSTYJdSx4sJqWLMnfn6fIqPB3WAgk00J+fCOkomPHqtS67pf0mFmKoItYZUlJu6BihSZ8qve8+/X+LX1MhQXF95AshfUleCtmdn6l6QFXzLg2sgLn1oyVFuZecv7fzsIHzoRlAGp0gwYDOn1S4qabWvB5xUaE+Svw4KmjWtxdnuQbI32dw87D4N95u8qQRJTSQg0wLxOLkxSrPMLEn1UIhNKjAa9VLs3WLaXGrtCIt8bKY2AQP/ZdyRU6zT/E8qP2ltyBE2CCZPgWgEYDoJJO4n92y61ylNaSFXKohJhLjkfvYWm592539sIpmBNLlDo1bExFBfmHJJ0lFEiC/fj8v42OoMC9Mo3whIoWvyHfq6Uacqq55mzFf/EGC+NP/gHjhd6urc6R0hES27VXux7UY8CGKPohplWIZtTrFSaPWslCWy78E22Pw8fvReSUZx/txqLtHrFqg1DY/Eus6Iq1heZdrdcqE0/c971Bz1HW/XNXHsXpUIbI4kHdOfCc6T5zHZzvzQJB0ggMFL6IGPAilU9bj/ASdPk6fNvNtZqPuwEDhMBtBnhCexo6D6VAGIOPvJPPV523Y8R8a9vCqZbswSZKzOT1291BsUbmUWehtbb1fdRX9hiJKXvwr1QX6GjnZMgyMvnwOo2Dr24amr7FqEAbVeJAjRNOceM2EQ1Mna9fInqPJ5mh5X8CzT1aDOv08An0blz0fF5Gq4mS2cwq5glwIOlY5nznE8X4j/UdZ3FJsVIXte1JH0A7iibuPfazStM5O/Vo3KXIpXBeGORV0M9XDXFvsYZUHGvFCUubWzTw248EHE0cpQM2zNg6rjavreq3NHCAWsoZ7wvVy7l5gvtKRmIj1MnvfWEm0yFnGcuOq192350a5WefpfKCcX3Sn+AgHU+qnpstNtddbdVebagJU390lq9ko4aI9rqdaWXYG8tv5O/ZQHSqDRYHC6zfH10l5z++opso7aOSaIczlQ13iAzXvLdEu0V7kwNUZ1c8Y8aq7SeIEe5p902FlNkW8DnwHyueHchbK8vVFJfmr9mz7P8nUSccl1ULaoWMRSI1ls32kvlK0h46h3J25Yd9AzfcJbp9qYF/SEt3H5j69mMdcsNxZcAzT/A89ov3tglTX54y/EwjMfuoDoxPwLJDm5I7q6F9Kp469yNy1zSxz0N4HbRRBj9xFFuogvBspv7DXUNIsGxTINEQfmctb42XImWAODgARNo7dfcTqFKq6aTfivmvunLmzP9f8yLsJvXD3JbcPcDGNriMAcjzeDTNr65t8YB5tsnFDFLa0Uwmd2OvUdkLMX9TsAUYUfooSv47sw5J88j7CpahRjjO3/UhOXjTS39W5YZAel2KTbQd1h7INOw9P23GW7GDAe4agIUFHP48MZr7ubq0efFmmtwYMyk7D0r1oeG/CGOODgb9Ur+JMHxkwzPbtCX2ZnENQuI0RN5SyTIZuoY4XS9Rd/tPe3vNAZGSHM/YYwqs9xkkENx0O+eC2YVW1cwOJ3ckE890nbQeHLKlW15L0P0W2VliyYrfNr0nrIYddoRyGaCtj4OYd2MT7ebApqZOAQIaSHJM4mphhfjNjtnjg6YRyx9qM2FT3xOiYIMqXPFWdzhSgFF8ItocqVV09CmIoO8k6U/oJB7++wSX/YksxfPXHyjSgAGZOj1aKEq9fSvXBqtp2wu8/FxEf5AxapAD06pPGuLVUYLdgEzHR8wqRGYEwiUO9MyYbgswstuLYhwYFpSVKOdzAihZ9LuHtD598EGhINU9xc9xhL+QgTLAstmPIvvm2xyRw/WTUPXkP3ZHu6GyPmj5xFH9/QGpkglKXRVUBgVmLOJx8uZO2AstxQYocZH2JhORlxawj66BAXUEs7K/gPxINIRAFyK3WLuyq9oBTF9wEbnmCot82WjIg7CPNwYK3KrZMrKAz5yFszg4wCVLJVnIL8+OYA0xRDH8cHQjQUiQ2i1mr/be32k/3Xej9sdf3iuGvZHyLFSJvPSqz/wltnxumTJYKZsrWXtx/Rmu39jjV9lFaJttfFn57/No2h/unsJmMHbrnZ8csxkp5HQ4xR1s0HH+t3Iz82a3iQWTUDGq/+l2W3TUYLE8zNdL8Y+5oXaIH/Y2UUcX67cXeN4WvENZjz4+8q7vjhowOI3rSjFhGZ6KzwmU7+5nFV+kGWAZ5z2UWvzq0TK0pk1hPwAN4jbw//1CApRvIaIjhSGhioY6TUmsToek9cF9XjJdHvLPcyyCV3lbR5Jiz/ts46ay2F820VjTXvllElwrGzKcNSyvQlWDXdwrUINXmHorAM3fE19ngLZmgeUaCJLsSITf2VcfAOuWwX7mTPdP8Zb/04KqRniufCpwnDUk7sP0RX6cud/sanFMagnzKInSRVey0YzlVSOtA/AjrofmSH6RYbJQ8b4NDeTkIGc6247+Mnbez/qhJ9GAv9fGNFercPnnrf285Qgs+UqThLRgflcAKFuqWhLzZaR4QqvSwa3xe0LPkqj9xJWub195r7NrrR0e78FR+0mRBNMPsraqZctAUVAJfYKehTDV1MGGQSeDsOK9J3sbUuKRIS/WilX/64CBms9jCZocBlsBSZaIAjWm/SUZ8daWL2a/cJFyUOFqE3Epc2RWbtjNyPwOGpWtzu32kUooUqsJud7IV4E8rstUBXM7tGEtBx99x60g1duhyvxeKJSl8s5E34HTMmADT0836aEdg5Dv9rVyCz8i2REOmiz6wtIVFN0HsjAoN37SrY0bV1Ms8CRUILhvZvvRaDzoVCaSI0u8EPuTe4b7OPowgRGODl22UBBmHSTUY8e4DyL+Bc7bngo+2T8HtNvzyATSL5iJZgFPKpmUyZv54vVL90+/RQGATUmNKnrIvcJMYON9fl83naW5sf6hRkbbTC9RUEE6XADwjgA46wWfUQ+QWZl0J4PVTWAln/YfAz/SV3q3J9+yCYDleruoN5uoc/wT2f4YONGTb6zTGq3V+3JqzmCOjwebKln+fExVLN7sqtqfMnsKVXWbb2Ai5m3D/fCTgX7oKYzTZvj+m28XnDqPbXuP4MyWdmPezcesdrh7rCzA7BWdObiuyDEKjjzBbQ0qnuwjliz+b+j7aPMKlkXyIznV3tGzAfYwIbzGGt098oh4eq3ruDjdgHtjxfFCjHrjjRbHajoz/YOY4raojPFQ910GIlBV7hq47UDgpyajBxQUmD8NctiLV1rTSLAEsQDLTeRKcmPBMVMFF0SPBBhZ5oXoxtD3lMhuAQXmA+57OcciczVW9e9zwSIAHS+FJmvfXMJGF1dMBsIUMaPjvgaVqUc3p32qVCMQYFEiRLzlVSOGMCmv/HJIxAHe3mL/XnoZ1IkWLeRZfgyByjnDbbeRK5KL7bYHSVJZ9UFq+yCiNKeRUaYjgbC3hVUvfJAhy/QNl/JqLKVvGMk9ZcfyGidNeo/VTxK9vUpodzfQI9Z2eAre4nmrkzgxKSnT5IJ1D69oHuUS5hp7pK9IAWuNrAOtOH0mAuwCrY8mXAtVXUeaNK3OXr6PRvmWg4VQqFSy+a1GZfFYgdsJELG8N0kvqmzvwZ02Plf5fH9QTy6br0oY/IDsEA+GBf9pEVWCIuBCjsup3LDSDqI+5+0IKSUFr7A96A2f0FbcU9fqljdqvsd8sG55KcKloHIFZem2Wb6pCLXybnVSB0sjCXzdS8IKvE");const kt=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]);function _t(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function Nt(e){let t=[];for(let n=0,r=e.length;n>24&255}function Ut(e){return 16777215&e}const Lt=new Map(Ct(Rt).flatMap(((e,t)=>e.map((e=>[e,t+1<<24]))))),Dt=new Set(Pt(Rt)),qt=new Map,Ht=new Map;for(let[Fr,Ur]of jt(Rt)){if(!Dt.has(Fr)&&2==Ur.length){let[e,t]=Ur,n=Ht.get(e);n||(n=new Map,Ht.set(e,n)),n.set(t,Fr)}qt.set(Fr,Ur.reverse())}const zt=44032,Gt=4352,$t=4449,Wt=4519,Kt=28,Qt=588;function Vt(e){return e>=zt&&e<55204}function Jt(e,t){if(e>=Gt&&e<4371&&t>=$t&&t<4470)return zt+(e-Gt)*Qt+(t-$t)*Kt;if(Vt(e)&&t>Wt&&t<4547&&(e-zt)%Kt==0)return e+(t-Wt);{let n=Ht.get(e);return n&&(n=n.get(t),n)?n:-1}}function Yt(e){let t=[],n=[],r=!1;function o(e){let n=Lt.get(e);n&&(r=!0,e|=n),t.push(e)}for(let a of e)for(;;){if(a<128)t.push(a);else if(Vt(a)){let e=a-zt,t=e%Qt/Kt|0,n=e%Kt;o(Gt+(e/Qt|0)),o($t+t),n>0&&o(Wt+n)}else{let e=qt.get(a);e?n.push(...e):o(a)}if(!n.length)break;a=n.pop()}if(r&&t.length>1){let e=Ft(t[0]);for(let n=1;n0&&o>=e)0==e?(t.push(r,...n),n.length=0,r=i):n.push(i),o=e;else{let a=Jt(r,i);a>=0?r=a:0==o&&0==e?(t.push(r),r=i):(n.push(i),o=e)}}return r>=0&&t.push(r,...n),t}(Yt(e))}const en=65039,tn=".";function nn(){return new Set(Pt(Bt))}const rn=new Map(jt(Bt)),on=nn(),an=nn(),sn=new Set(Pt(Bt).map((function(e){return this[e]}),[...an])),cn=nn(),un=(nn(),Ct(Bt));function ln(){return new Set([Pt(Bt).map((e=>un[e])),Pt(Bt)].flat(2))}const dn=Bt(),fn=It((e=>{let t=It(Bt).map((e=>e+96));if(t.length){let n=e>=dn;t[0]-=32,t=Mt(t),n&&(t=`Restricted[${t}]`);let r=ln(),o=ln(),a=[...r,...o].sort(((e,t)=>e-t));return{N:t,P:r,M:!Bt(),R:n,V:new Set(a)}}})),hn=nn(),pn=new Map;[...hn,...nn()].sort(((e,t)=>e-t)).map(((e,t,n)=>{let r=Bt(),o=n[t]=r?n[t-r]:{V:[],M:new Map};o.V.push(e),hn.has(e)||pn.set(e,o)}));for(let{V:Fr,M:Ur}of new Set(pn.values())){let e=[];for(let n of Fr){let t=fn.filter((e=>e.V.has(n))),r=e.find((({G:e})=>t.some((t=>e.has(t)))));r||(r={G:new Set,V:[]},e.push(r)),r.V.push(n),t.forEach((e=>r.G.add(e)))}let t=e.flatMap((({G:e})=>[...e]));for(let{G:n,V:r}of e){let e=new Set(t.filter((e=>!n.has(e))));for(let t of r)Ur.set(t,e)}}let mn=new Set,bn=new Set;for(let Fr of fn)for(let e of Fr.V)(mn.has(e)?bn:mn).add(e);for(let Fr of mn)pn.has(Fr)||bn.has(Fr)||pn.set(Fr,1);const gn=new Set([...mn,...Zt(mn)]),yn=Pt(Bt),vn=function e(t){let n=It((()=>{let t=Pt(Bt).map((e=>yn[e]));if(t.length)return e(t)})).sort(((e,t)=>t.Q.size-e.Q.size)),r=Bt(),o=r%3;r=r/3|0;let a=1&r;return r>>=1,{B:n,V:o,F:a,S:1&r,C:2&r,Q:new Set(t)}}([]);class wn extends Array{get is_emoji(){return!0}}function En(e,t=_t){let n=[];var r;r=e[0],an.has(r)&&n.push("\u25cc");let o=0,a=e.length;for(let i=0;i0;)if(95!==e[--t])throw new Error("underscore allowed only at start")}function Cn(e){return cn.has(e)}function jn(e,t){let n=0;return e.split(tn).map((e=>{let r,o=Nt(e),a={input:o,offset:n};n+=o.length+1;try{let e,n=a.tokens=Bn(o,Xt),i=n.length;if(!i)throw new Error("empty label");{let o=n[0],s=i>1||o.is_emoji;if(!s&&o.every((e=>e<128)))r=o,Pn(r),function(e){if(e.length>=4&&45==e[2]&&45==e[3])throw new Error("invalid label extension")}(r),e="ASCII";else if(s&&(a.emoji=!0,o=n.flatMap((e=>e.is_emoji?[]:e))),r=n.flatMap((e=>!t&&e.is_emoji?kn(e):e)),Pn(r),o.length){if(an.has(r[0]))throw Sn("leading combining mark");for(let e=1;ee.V.has(n)));if(!e.length)throw t===fn?On(n):Tn(t[0],n);if(t=e,1==e.length)break}return t}(t);!function(e,t){let{V:n,M:r}=e;for(let o of t)if(!n.has(o))throw Tn(e,o);if(r){let e=Zt(t);for(let t=1,n=e.length;t4)throw new Error(`non-spacing marks: too many ${xn(En(e.slice(t-1,o)))} (${o-t}/4)`);t=o}}}(a,o),function(e,t){let n,r=[];for(let o of t){let e=pn.get(o);if(1===e)return;if(e){let t=e.M.get(o);if(n=n?n.filter((e=>t.has(e))):[...t],!n.length)return}else r.push(o)}if(n)for(let o of n)if(r.every((e=>o.V.has(e))))throw new Error(`whole-script confusable: ${e.N}/${o.N}`)}(a,t),e=a.N}else e="Emoji"}a.type=e}catch(i){a.error=i}return a.output=r,a}))}function In(e){return e.map((({input:t,error:n,output:r})=>{if(n){let r=n.message;throw new Error(1==e.length?r:`Invalid label ${xn(En(t))}: ${r}`)}return Mt(r)})).join(tn)}function On(e){return new Error(`disallowed character: ${An(e)}`)}function Tn(e,t){let n=An(t),r=fn.find((e=>e.P.has(t)));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${e.N} + ${n}`)}function Sn(e){return new Error(`illegal placement: ${e}`)}function Bn(e,t){let n=[],r=[];for(e=e.slice().reverse();e.length;){let o=_n(e);if(o)r.length&&(n.push(t(r)),r=[]),n.push(o);else{let t=e.pop();if(gn.has(t))r.push(t);else{let e=rn.get(t);if(e)r.push(...e);else if(!on.has(t))throw On(t)}}}return r.length&&n.push(t(r)),n}function kn(e){return e.filter((e=>e!=en))}function _n(e,t){let n,r,o=vn,a=[],i=e.length;for(t&&(t.length=0);i;){let s=e[--i];if(o=o.B.find((e=>e.Q.has(s))),!o)break;if(o.S)r=s;else if(o.C&&s===r)break;a.push(s),o.F&&(a.push(en),i>0&&e[i-1]==en&&i--),o.V&&(n=Nn(a,o),t&&t.push(...e.slice(i).reverse()),e.length=i)}return n}function Nn(e,t){let n=wn.from(e);return 2==t.V&&n.splice(1,1),n}function Mn(e){return function(e){return In(jn(e))}(e)}var Rn=n(22852);var Fn=n(97451);function Un(e,t,{batch:n={multicall:{wait:32}},pollingInterval:r=4e3,rank:o,retryCount:a,retryDelay:i,stallTimeout:s}={}){if(!e.length)throw new Error("must have at least one chain");let c=[];const u={},l={};for(const d of e){let e=!1;for(const n of t){const t=n(d);t&&(e=!0,c.some((({id:e})=>e===d.id))||(c=[...c,t.chain]),u[d.id]=[...u[d.id]||[],...t.rpcUrls.http],t.rpcUrls.webSocket&&(l[d.id]=[...l[d.id]||[],...t.rpcUrls.webSocket]))}if(!e)throw new Error([`Could not find valid provider configuration for chain "${d.name}".\n`,"You may need to add `jsonRpcProvider` to `configureChains` with the chain's RPC URLs.","Read more: https://wagmi.sh/core/providers/jsonRpc"].join("\n"))}return{chains:c,publicClient:({chainId:t})=>{const l=c.find((e=>e.id===t))??e[0],d=u[l.id];if(!d||!d[0])throw new Error(`No providers configured for chain "${l.id}"`);const f=Ze({batch:n,chain:l,transport:tt(d.map((e=>function(e,t={}){const{batch:n,fetchOptions:r,key:o="http",name:a="HTTP JSON-RPC",retryDelay:i}=t;return({chain:s,retryCount:c,timeout:u})=>{const{batchSize:l=1e3,wait:d=0}="object"===typeof n?n:{},f=t.retryCount??c,h=u??t.timeout??1e4,p=e||s?.rpcUrls.default.http[0];if(!p)throw new rt;return(0,et.q)({key:o,name:a,async request({method:t,params:o}){const a={method:t,params:o},{schedule:i}=(0,ot.S)({id:`${e}`,wait:d,shouldSplitBatch:e=>e.length>l,fn:e=>ut.http(p,{body:e,fetchOptions:r,timeout:h})}),[{error:s,result:c}]=await(async e=>n?i(e):[await ut.http(p,{body:e,fetchOptions:r,timeout:h})])(a);if(s)throw new nt.bs({body:a,error:s,url:p});return c},retryCount:f,retryDelay:i,timeout:h,type:"http"},{url:e})}}(e,{timeout:s}))),{rank:o,retryCount:a,retryDelay:i}),pollingInterval:r});return Object.assign(f,{chains:c})},webSocketPublicClient:({chainId:t})=>{const u=c.find((e=>e.id===t))??e[0],d=l[u.id];if(!d||!d[0])return;const f=Ze({batch:n,chain:u,transport:tt(d.map((e=>function(e,t={}){const{key:n="webSocket",name:r="WebSocket JSON-RPC",retryDelay:o}=t;return({chain:a,retryCount:i,timeout:s})=>{const c=t.retryCount??i,u=s??t.timeout??1e4,l=e||a?.rpcUrls.default.webSocket?.[0];if(!l)throw new rt;return(0,et.q)({key:n,name:r,async request({method:e,params:t}){const n={method:e,params:t},r=await ct(l),{error:o,result:a}=await ut.webSocketAsync(r,{body:n,timeout:u});if(o)throw new nt.bs({body:n,error:o,url:l});return a},retryCount:c,retryDelay:o,timeout:u,type:"webSocket"},{getSocket:()=>ct(l),async subscribe({params:e,onData:t,onError:n}){const r=await ct(l),{result:o}=await new Promise(((o,a)=>ut.webSocket(r,{body:{method:"eth_subscribe",params:e},onResponse(e){if(e.error)return a(e.error),void n?.(e.error);"number"!==typeof e.id?"eth_subscription"===e.method&&t(e.params):o(e)}})));return{subscriptionId:o,unsubscribe:async()=>new Promise((e=>ut.webSocket(r,{body:{method:"eth_unsubscribe",params:[o]},onResponse:e})))}}})}}(e,{timeout:s}))),{rank:o,retryCount:a,retryDelay:i}),pollingInterval:r});return Object.assign(f,{chains:c})}}}var Ln=class extends Error{constructor({activeChain:e,targetChain:t}){super(`Chain mismatch: Expected "${t}", received "${e}".`),this.name="ChainMismatchError"}},Dn=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured${t?` for connector "${t}"`:""}.`),this.name="ChainNotConfigured"}},qn=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},Hn=class extends Error{constructor(){super(...arguments),this.name="ConfigChainsNotFound",this.message="No chains were found on the wagmi config. Some functions that require a chain may not work."}},zn=class extends Error{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}};function Gn(e,t){if(e===t)return!0;if(e&&t&&"object"===typeof e&&"object"===typeof t){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)&&Array.isArray(t)){if(n=e.length,n!=t.length)return!1;for(r=n;0!==r--;)if(!Gn(e[r],t[r]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const o=Object.keys(e);if(n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(n&&!Gn(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}var $n=(e,{find:t,replace:n})=>e&&t(e)?n(e):"object"!==typeof e?e:Array.isArray(e)?e.map((e=>$n(e,{find:t,replace:n}))):e instanceof Object?Object.entries(e).reduce(((e,[r,o])=>({...e,[r]:$n(o,{find:t,replace:n})})),{}):e;function Wn(e){const t=JSON.parse(e);return $n(t,{find:e=>"string"===typeof e&&e.startsWith("#bigint."),replace:e=>BigInt(e.replace("#bigint.",""))})}function Kn(e){return{accessList:e.accessList,account:e.account,data:e.data,gas:e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce,to:e.to,value:e.value}}function Qn(e){return"number"===typeof e?e:"wei"===e?0:Math.abs(dt.Bd[e])}function Vn(e,t){return e.slice(0,t).join(".")||"."}function Jn(e,t){const{length:n}=e;for(let r=0;r{const r="bigint"===typeof n?`#bigint.${n.toString()}`:n;return t?.(e,r)||r}),r),n??void 0)}var Zn={getItem:e=>"",setItem:(e,t)=>null,removeItem:e=>null};function Xn({deserialize:e=Wn,key:t="wagmi",serialize:n=Yn,storage:r}){return{...r,getItem:(n,o=null)=>{const a=r.getItem(`${t}.${n}`);try{return a?e(a):o}catch(i){return console.warn(i),o}},setItem:(e,o)=>{if(null===o)r.removeItem(`${t}.${e}`);else try{r.setItem(`${t}.${e}`,n(o))}catch(a){console.error(a)}},removeItem:e=>r.removeItem(`${t}.${e}`)}}var er,tr,nr,rr,or,ar="store";function ir(e){const t=new class{constructor({autoConnect:e=!1,connectors:t=[new r._],publicClient:n,storage:a=Xn({storage:"undefined"!==typeof window?window.localStorage:Zn}),logger:c={warn:console.warn},webSocketPublicClient:u}){i(this,nr),this.publicClients=new Map,this.webSocketPublicClients=new Map,i(this,er,void 0),i(this,tr,void 0),this.args={autoConnect:e,connectors:t,logger:c,publicClient:n,storage:a,webSocketPublicClient:u};let l,d="disconnected";if(e)try{const e=a.getItem(ar)?.state?.data;d=e?.account?"reconnecting":"connecting",l=e?.chain?.id}catch(b){}const f="function"===typeof t?t():t;var h,p,m;f.forEach((e=>e.setStorage(a))),this.store=gt(ft(mt((()=>({connectors:f,publicClient:this.getPublicClient({chainId:l}),status:d,webSocketPublicClient:this.getWebSocketPublicClient({chainId:l})})),{name:ar,storage:a,partialize:t=>({...e&&{data:{account:t?.data?.account,chain:t?.data?.chain}},chains:t?.chains}),version:2}))),this.storage=a,s(this,tr,a?.getItem("wallet")),(h=this,p=nr,m=rr,o(h,p,"access private method"),m).call(this),e&&"undefined"!==typeof window&&setTimeout((async()=>await this.autoConnect()),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){return this.data?.chain?.id}get publicClient(){return this.store.getState().publicClient}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketPublicClient(){return this.store.getState().webSocketPublicClient}setState(e){const t="function"===typeof e?e(this.store.getState()):e;this.store.setState(t,!0)}clearState(){this.setState((e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"})))}async destroy(){this.connector&&await(this.connector.disconnect?.()),s(this,er,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(a(this,er))return;s(this,er,!0),this.setState((e=>({...e,status:e.data?.account?"reconnecting":"connecting"})));const e=a(this,tr)?[...this.connectors].sort((e=>e.id===a(this,tr)?-1:1)):this.connectors;let t=!1;for(const n of e){if(!n.ready||!n.isAuthorized)continue;if(!(await n.isAuthorized()))continue;const e=await n.connect();this.setState((t=>({...t,connector:n,chains:n?.chains,data:e,status:"connected"}))),t=!0;break}return t||this.setState((e=>({...e,data:void 0,status:"disconnected"}))),s(this,er,!1),this.data}setConnectors(e){this.args={...this.args,connectors:e};const t="function"===typeof e?e():e;t.forEach((e=>e.setStorage(this.args.storage))),this.setState((e=>({...e,connectors:t})))}getPublicClient({chainId:e}={}){let t=this.publicClients.get(-1);if(t&&t?.chain.id===e)return t;if(t=this.publicClients.get(e??-1),t)return t;const{publicClient:n}=this.args;return t="function"===typeof n?n({chainId:e}):n,this.publicClients.set(e??-1,t),t}setPublicClient(e){const t=this.data?.chain?.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState((e=>({...e,publicClient:this.getPublicClient({chainId:t})})))}getWebSocketPublicClient({chainId:e}={}){let t=this.webSocketPublicClients.get(-1);if(t&&t?.chain.id===e)return t;if(t=this.webSocketPublicClients.get(e??-1),t)return t;const{webSocketPublicClient:n}=this.args;return t="function"===typeof n?n({chainId:e}):n,t&&this.webSocketPublicClients.set(e??-1,t),t}setWebSocketPublicClient(e){const t=this.data?.chain?.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState((e=>({...e,webSocketPublicClient:this.getWebSocketPublicClient({chainId:t})})))}setLastUsedConnector(e=null){this.storage?.setItem("wallet",e)}}(e);return or=t,t}function sr(){if(!or)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return or}async function cr({chainId:e,connector:t}){const n=sr(),r=n.connector;if(r&&t.id===r.id)throw new qn;try{n.setState((e=>({...e,status:"connecting"})));const r=await t.connect({chainId:e});return n.setLastUsedConnector(t.id),n.setState((e=>({...e,connector:t,chains:t?.chains,data:r,status:"connected"}))),n.storage.setItem("connected",!0),{...r,connector:t}}catch(o){throw n.setState((e=>({...e,status:e.connector?"connected":"disconnected"}))),o}}async function ur(){const e=sr();e.connector&&await e.connector.disconnect(),e.clearState(),e.storage.removeItem("connected")}er=new WeakMap,tr=new WeakMap,nr=new WeakSet,rr=function(){const e=e=>{this.setState((t=>({...t,data:{...t.data,...e}})))},t=()=>{this.clearState()},n=e=>{this.setState((t=>({...t,error:e})))};this.store.subscribe((({connector:e})=>e),((r,o)=>{o?.off?.("change",e),o?.off?.("disconnect",t),o?.off?.("error",n),r&&(r.on?.("change",e),r.on?.("disconnect",t),r.on?.("error",n))}));const{publicClient:r,webSocketPublicClient:o}=this.args;("function"===typeof r||"function"===typeof o)&&this.store.subscribe((({data:e})=>e?.chain?.id),(e=>{this.setState((t=>({...t,publicClient:this.getPublicClient({chainId:e}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:e})})))}))};var lr=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],dr=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function fr({chainId:e}={}){const t=sr();return e&&t.getPublicClient({chainId:e})||t.publicClient}async function hr({chainId:e}={}){const t=sr();return await(t.connector?.getWalletClient?.({chainId:e}))||null}function pr({chainId:e}={}){const t=sr();return e&&t.getWebSocketPublicClient({chainId:e})||t.webSocketPublicClient}function mr(e,t){return sr().subscribe((({publicClient:e})=>e),(async()=>t(fr(e))))}function br({chainId:e},t){return sr().subscribe((({data:e,connector:t})=>({account:e?.account,chainId:e?.chain?.id,connector:t})),(async({chainId:n})=>{if(e&&n&&e!==n)return;const r=await hr({chainId:e});return sr().connector?t(r):t(null)}),{equalityFn:vt})}function gr(e,t){return sr().subscribe((({webSocketPublicClient:e})=>e),(async()=>t(pr(e))))}async function yr({chainId:e,contracts:t,blockNumber:n,blockTag:r,...o}){const a=fr({chainId:e});if(!a.chains)throw new Hn;if(e&&a.chain.id!==e)throw new Dn({chainId:e});return a.multicall({allowFailure:o.allowFailure??!0,blockNumber:n,blockTag:r,contracts:t})}async function vr({address:e,account:t,chainId:n,abi:r,args:o,functionName:a,blockNumber:i,blockTag:s}){return fr({chainId:n}).readContract({abi:r,address:e,account:t,functionName:a,args:o,blockNumber:i,blockTag:s})}async function wr({contracts:e,blockNumber:t,blockTag:n,...r}){const{allowFailure:o=!0}=r;try{const r=fr(),a=e.reduce(((e,t,n)=>{const o=t.chainId??r.chain.id;return{...e,[o]:[...e[o]||[],{contract:t,index:n}]}}),{}),i=()=>Object.entries(a).map((([e,r])=>yr({allowFailure:o,chainId:parseInt(e),contracts:r.map((({contract:e})=>e)),blockNumber:t,blockTag:n}))),s=(await Promise.all(i())).flat(),c=Object.values(a).flatMap((e=>e.map((({index:e})=>e))));return s.reduce(((e,t,n)=>(e&&(e[c[n]]=t),e)),[])}catch(a){if(a instanceof g.uq)throw a;const r=()=>e.map((e=>vr({...e,blockNumber:t,blockTag:n})));return o?(await Promise.allSettled(r())).map((e=>"fulfilled"===e.status?{result:e.value,status:"success"}:{error:e.reason,result:void 0,status:"failure"})):await Promise.all(r())}}async function Er(e){const t=await hr({chainId:e.chainId});if(!t)throw new lt.N;let n;if(e.chainId&&Rr({chainId:e.chainId}),"prepared"===e.mode)n=e.request;else{const{chainId:t,mode:r,...o}=e,a=await async function({abi:e,address:t,args:n,chainId:r,functionName:o,walletClient:a,...i}){const s=fr({chainId:r}),c=a??await hr({chainId:r});if(!c)throw new lt.N;r&&Rr({chainId:r});const{account:u,accessList:l,blockNumber:d,blockTag:f,gas:h,gasPrice:p,maxFeePerGas:m,maxPriorityFeePerGas:b,nonce:g,value:y}=function(e){return{accessList:e.accessList,account:e.account,blockNumber:e.blockNumber,blockTag:e.blockTag,data:e.data,gas:e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce,to:e.to,value:e.value}}(i),{result:v,request:w}=await s.simulateContract({abi:e,address:t,functionName:o,args:n,account:u||c.account,accessList:l,blockNumber:d,blockTag:f,gas:h,gasPrice:p,maxFeePerGas:m,maxPriorityFeePerGas:b,nonce:g,value:y});return{mode:"prepared",request:{...w,abi:e.filter((e=>"name"in e&&e.name===o)),chainId:r},result:v}}(o);n=a.request}return{hash:await t.writeContract({...n,chain:null})}}async function Ar({address:e,chainId:t,formatUnits:n,token:r}){const o=sr(),a=fr({chainId:t});if(r){const o=async({abi:o})=>{const a={abi:o,address:r,chainId:t},[i,s,c]=await wr({allowFailure:!1,contracts:[{...a,functionName:"balanceOf",args:[e]},{...a,functionName:"decimals"},{...a,functionName:"symbol"}]});return{decimals:s,formatted:(0,yt.b)(i??"0",Qn(n??s)),symbol:c,value:i}};try{return await o({abi:lr})}catch(u){if(u instanceof g.uq){const{symbol:e,...t}=await o({abi:dr});return{symbol:(0,de.rR)((0,h.f)(e,{dir:"right"})),...t}}throw u}}const i=[...o.publicClient.chains||[],...o.chains??[]],s=await a.getBalance({address:e}),c=i.find((e=>e.id===a.chain.id));return{decimals:c?.nativeCurrency.decimals??18,formatted:(0,yt.b)(s??"0",Qn(n??18)),symbol:c?.nativeCurrency.symbol??"ETH",value:s}}function xr(){const{data:e,connector:t,status:n}=sr();switch(n){case"connected":return{address:e?.account,connector:t,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:n};case"reconnecting":return{address:e?.account,connector:t,isConnected:!!e?.account,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:n};case"connecting":return{address:e?.account,connector:t,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:n};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:n}}}function Pr(){const e=sr(),t=e.data?.chain?.id,n=e.chains??[],r=[...e.publicClient?.chains||[],...n].find((e=>e.id===t))??{id:t,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:t?{...r,...e.data?.chain,id:t}:void 0,chains:n}}async function Cr(e){const t=await hr();if(!t)throw new lt.N;return await t.signMessage({message:e.message})}async function jr({chainId:e}){const{connector:t}=sr();if(!t)throw new lt.N;if(!t.switchChain)throw new zn({connector:t});return t.switchChain(e)}function Ir(e,{selector:t=(e=>e)}={}){return sr().subscribe((({data:e,connector:n,status:r})=>t({address:e?.account,connector:n,status:r})),(()=>e(xr())),{equalityFn:vt})}function Or(e,{selector:t=(e=>e)}={}){return sr().subscribe((({data:e,chains:n})=>t({chainId:e?.chain?.id,chains:n})),(()=>e(Pr())),{equalityFn:vt})}async function Tr({name:e,chainId:t}){const n=fr({chainId:t});return await n.getEnsAvatar({name:Mn(e)})}async function Sr({address:e,chainId:t}){return fr({chainId:t}).getEnsName({address:(0,wt.K)(e)})}async function Br({chainId:e}={}){const t=fr({chainId:e});return await t.getBlockNumber()}async function kr({chainId:e,formatUnits:t="gwei"}={}){const n=fr({chainId:e}),r=await n.getBlock();let o=null;try{o=await n.getGasPrice()}catch{}let a=null,i=null,s=null;r?.baseFeePerGas&&(a=r.baseFeePerGas,s=function(e,t="wei"){return(0,Rn.v)(e,dt.Zn[t])}("1"),i=2n*r.baseFeePerGas+s);const c=Qn(t);return{lastBaseFeePerGas:a,gasPrice:o,maxFeePerGas:i,maxPriorityFeePerGas:s,formatted:{gasPrice:o?(0,yt.b)(o,c):null,maxFeePerGas:i?(0,yt.b)(i,c):null,maxPriorityFeePerGas:s?(0,yt.b)(s,c):null}}}async function _r({accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,nonce:c,to:u,value:l,walletClient:d}){const f=fr({chainId:n}),h=d??await hr({chainId:n});if(!h)throw new lt.N;n&&Rr({chainId:n});const p=(u&&!(0,Fn.U)(u)?await async function({chainId:e,name:t}){const n=fr({chainId:e}),r=await n.getEnsAddress({name:Mn(t)});try{return"0x0000000000000000000000000000000000000000"===r?null:r?(0,wt.K)(r):null}catch(o){return null}}({name:u}):u)||void 0;if(p&&!(0,Fn.U)(p))throw new Error("Invalid address");return{accessList:e,account:t,data:r,gas:"undefined"===typeof o?await f.estimateGas({accessList:e,account:h.account,data:r,gas:o??void 0,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,nonce:c,to:p,value:l}):o||void 0,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:"prepared",nonce:c,to:p,value:l,...n?{chainId:n}:{}}}async function Nr({accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,to:l,value:d}){const f=await hr({chainId:n});if(!f)throw new lt.N;let h;n&&Rr({chainId:n}),h="prepared"===c?{account:t,accessList:e,chain:null,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,nonce:u,to:l,value:d}:await _r({accessList:e,account:t,chainId:n,data:r,gas:o||null,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,nonce:u,to:l,value:d});return{hash:await f.sendTransaction({...h,chain:null})}}async function Mr({chainId:e,confirmations:t=1,hash:n,onReplaced:r,timeout:o=0}){const a=fr({chainId:e}),i=await a.waitForTransactionReceipt({hash:n,confirmations:t,onReplaced:r,timeout:o});if("reverted"===i.status){const e=await a.getTransaction({hash:i.transactionHash}),t=await a.call({...e,gasPrice:"eip1559"!==e.type?e.gasPrice:void 0,maxFeePerGas:"eip1559"===e.type?e.maxFeePerGas:void 0,maxPriorityFeePerGas:"eip1559"===e.type?e.maxPriorityFeePerGas:void 0}),n=(0,de.rR)(`0x${t.substring(138)}`);throw new Error(n)}return i}function Rr({chainId:e}){const{chain:t,chains:n}=Pr(),r=t?.id;if(r&&e!==r)throw new Ln({activeChain:n.find((e=>e.id===r))?.name??`Chain ${r}`,targetChain:n.find((t=>t.id===e))?.name??`Chain ${e}`})}},13105:function(e,t,n){"use strict";n.d(t,{RJ:function(){return o},ws:function(){return r}});var r={id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0},o={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}},38039:function(e,t,n){"use strict";function r(e){return"string"===typeof e?Number.parseInt(e,"0x"===e.trim().substring(0,2)?16:10):"bigint"===typeof e?Number(e):e}n.d(t,{J:function(){return r}})},37096:function(e,t,n){"use strict";n.d(t,{wR:function(){return b},Ko:function(){return h},ac:function(){return f},U9:function(){return m},qx:function(){return p},ov:function(){return l}});var r=n(24143),o={id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0},a={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},i=n(61786);n(90169),n(46872),n(86101),n(94216),n(4656),n(23822);n(92960),n(69977),n(21973),n(66054),n(97451),n(9040),n(26873),n(41327);n(54574);const s=(0,i.ax)(o),c=(0,i.ax)(a);var u=Object.defineProperty,l=(e,t,n)=>(((e,t,n)=>{t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!==typeof t?t+"":t,n),n),d=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},f=(e,t,n)=>(d(e,t,"read from private field"),n?n.call(e):t.get(e)),h=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},p=(e,t,n,r)=>(d(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),m=(e,t,n)=>(d(e,t,"access private method"),n),b=class extends r{constructor({chains:e=[c,s],options:t}){super(),l(this,"chains"),l(this,"options"),l(this,"storage"),this.chains=e,this.options=t}getBlockExplorerUrls(e){const{default:t,...n}=e.blockExplorers??{};if(t)return[t.url,...Object.values(n).map((e=>e.url))]}isChainUnsupported(e){return!this.chains.some((t=>t.id===e))}setStorage(e){this.storage=e}}},64546:function(e,t,n){"use strict";n.d(t,{_:function(){return f}});var r,o=n(57292),a=n(38039),i=n(37096),s=n(92221),c=n(42455),u=n(67629),l=n(19575),d=n(46872);var f=class extends i.wR{constructor({chains:e,options:t}={}){const n={shimDisconnect:!0,getProvider(){if("undefined"===typeof window)return;const e=window.ethereum;return e?.providers?e.providers[0]:e},...t};super({chains:e,options:n}),(0,i.ov)(this,"id","injected"),(0,i.ov)(this,"name"),(0,i.ov)(this,"ready"),(0,i.Ko)(this,r,void 0),(0,i.ov)(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),(0,i.ov)(this,"onAccountsChanged",(e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,s.K)(e[0])})})),(0,i.ov)(this,"onChainChanged",(e=>{const t=(0,a.J)(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})})),(0,i.ov)(this,"onDisconnect",(async e=>{if(1013===e.code){if(await this.getProvider()){if(await this.getAccount())return}}this.emit("disconnect"),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey)}));const o=n.getProvider();if("string"===typeof n.name)this.name=n.name;else if(o){const e=function(e){if(!e)return"Injected";const t=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOpera?"Opera":e.isPhantom?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0;if(e.providers?.length){const n=new Set;let r=1;for(const a of e.providers){let e=t(a);e||(e=`Unknown Wallet #${r}`,r+=1),n.add(e)}const o=[...n];return o.length?o:o[0]??"Injected"}return t(e)??"Injected"}(o);n.name?this.name=n.name(e):this.name="string"===typeof e?e:e[0]}else this.name="Injected";this.ready=!!o}async connect({chainId:e}={}){try{const t=await this.getProvider();if(!t)throw new o.N;t.on&&(t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const n=await t.request({method:"eth_requestAccounts"}),r=(0,s.K)(n[0]);let a=await this.getChainId(),i=this.isChainUnsupported(a);if(e&&a!==e){a=(await this.switchChain(e)).id,i=this.isChainUnsupported(a)}return this.options.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:r,chain:{id:a,unsupported:i}}}catch(t){if(this.isUserRejectedRequestError(t))throw new c.ab(t);if(-32002===t.code)throw new c.pT(t);throw t}}async disconnect(){const e=await this.getProvider();e?.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))}async getAccount(){const e=await this.getProvider();if(!e)throw new o.N;const t=await e.request({method:"eth_accounts"});return(0,s.K)(t[0])}async getChainId(){const e=await this.getProvider();if(!e)throw new o.N;return e.request({method:"eth_chainId"}).then(a.J)}async getProvider(){const e=this.options.getProvider();return e&&(0,i.qx)(this,r,e),(0,i.ac)(this,r)}async getWalletClient({chainId:e}={}){const[t,n]=await Promise.all([this.getProvider(),this.getAccount()]),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,u.K)({account:n,chain:r,transport:(0,l.P)(t)})}async isAuthorized(){try{if(this.options.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey))return!1;if(!(await this.getProvider()))throw new o.N;return!!(await this.getAccount())}catch{return!1}}async switchChain(e){const t=await this.getProvider();if(!t)throw new o.N;const n=(0,d.eC)(e);try{return await Promise.all([t.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]}),new Promise((t=>this.on("change",(({chain:n})=>{n?.id===e&&t()}))))]),this.chains.find((t=>t.id===e))??{id:e,name:`Chain ${n}`,network:`${n}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(r){const i=this.chains.find((t=>t.id===e));if(!i)throw new o.B({chainId:e,connectorId:this.id});if(4902===r.code||4902===r?.data?.originalError?.code)try{await t.request({method:"wallet_addEthereumChain",params:[{chainId:n,chainName:i.name,nativeCurrency:i.nativeCurrency,rpcUrls:[i.rpcUrls.public?.http[0]??""],blockExplorerUrls:this.getBlockExplorerUrls(i)}]});if(await this.getChainId()!==e)throw new c.ab(new Error("User rejected switch after adding network."));return i}catch(a){throw new c.ab(a)}if(this.isUserRejectedRequestError(r))throw new c.ab(r);throw new c.x3(r)}}async watchAsset({address:e,decimals:t=18,image:n,symbol:r}){const a=await this.getProvider();if(!a)throw new o.N;return a.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:t,image:n,symbol:r}}})}isUserRejectedRequestError(e){return 4001===e.code}};r=new WeakMap},57292:function(e,t,n){"use strict";n.d(t,{B:function(){return o},N:function(){return a}});var r=n(37096),o=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured for connector "${t}".`),(0,r.ov)(this,"name","ChainNotConfiguredForConnectorError")}},a=class extends Error{constructor(){super(...arguments),(0,r.ov)(this,"name","ConnectorNotFoundError"),(0,r.ov)(this,"message","Connector not found")}}},59499:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return r}})},97582:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return a},__asyncDelegator:function(){return C},__asyncGenerator:function(){return P},__asyncValues:function(){return j},__await:function(){return x},__awaiter:function(){return p},__classPrivateFieldGet:function(){return B},__classPrivateFieldIn:function(){return _},__classPrivateFieldSet:function(){return k},__createBinding:function(){return b},__decorate:function(){return s},__esDecorate:function(){return u},__exportStar:function(){return g},__extends:function(){return o},__generator:function(){return m},__importDefault:function(){return S},__importStar:function(){return T},__makeTemplateObject:function(){return I},__metadata:function(){return h},__param:function(){return c},__propKey:function(){return d},__read:function(){return v},__rest:function(){return i},__runInitializers:function(){return l},__setFunctionName:function(){return f},__spread:function(){return w},__spreadArray:function(){return A},__spreadArrays:function(){return E},__values:function(){return y}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,o,a){function i(e){if(void 0!==e&&"function"!==typeof e)throw new TypeError("Function expected");return e}for(var s,c=r.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?r.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),f=!1,h=n.length-1;h>=0;h--){var p={};for(var m in r)p[m]="access"===m?{}:r[m];for(var m in r.access)p.access[m]=r.access[m];p.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var b=(0,n[h])("accessor"===c?{get:d.get,set:d.set}:d[u],p);if("accessor"===c){if(void 0===b)continue;if(null===b||"object"!==typeof b)throw new TypeError("Object expected");(s=i(b.get))&&(d.get=s),(s=i(b.set))&&(d.set=s),(s=i(b.init))&&o.unshift(s)}else(s=i(b))&&("field"===c?o.unshift(s):d[u]=s)}l&&Object.defineProperty(l,r.name,d),f=!0}function l(e,t,n){for(var r=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function w(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof x?Promise.resolve(n.value.v).then(c,u):l(a[0][2],n)}catch(r){l(a[0][3],r)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function C(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:x(e[r](t)),done:!1}:o?o(t):t}:o}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var O=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&b(t,e,n);return O(t,e),t}function S(e){return e&&e.__esModule?e:{default:e}}function B(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function k(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function _(e,t){if(null===t||"object"!==typeof t&&"function"!==typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"===typeof e?t===e:e.has(t)}t.default={__extends:o,__assign:a,__rest:i,__decorate:s,__param:c,__metadata:h,__awaiter:p,__generator:m,__createBinding:b,__exportStar:g,__values:y,__read:v,__spread:w,__spreadArrays:E,__spreadArray:A,__await:x,__asyncGenerator:P,__asyncDelegator:C,__asyncValues:j,__makeTemplateObject:I,__importStar:T,__importDefault:S,__classPrivateFieldGet:B,__classPrivateFieldSet:k,__classPrivateFieldIn:_}},53160:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(16867);function o(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?(0,r.P)(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}},20605:function(e,t,n){"use strict";n.r(t),n.d(t,{concat:function(){return a}});var r=n(53160),o=n(16867);function a(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=(0,r.E)(t);let a=0;for(const r of e)n.set(r,a),a+=r.length;return(0,o.P)(n)}},52217:function(e,t,n){"use strict";n.r(t),n.d(t,{fromString:function(){return a}});var r=n(5370),o=n(16867);function a(e,t="utf8"){const n=r.Z[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):(0,o.P)(globalThis.Buffer.from(e,"utf-8"))}},37466:function(e,t,n){"use strict";n.d(t,{BB:function(){return a.toString},mL:function(){return o.fromString},zo:function(){return r.concat}});var r=n(20605),o=n(52217),a=n(92263)},92263:function(e,t,n){"use strict";n.r(t),n.d(t,{toString:function(){return o}});var r=n(5370);function o(e,t="utf8"){const n=r.Z[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}},16867:function(e,t,n){"use strict";function r(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}n.d(t,{P:function(){return r}})},5370:function(e,t,n){"use strict";n.d(t,{Z:function(){return De}});var r={};n.r(r),n.d(r,{identity:function(){return O}});var o={};n.r(o),n.d(o,{base2:function(){return T}});var a={};n.r(a),n.d(a,{base8:function(){return S}});var i={};n.r(i),n.d(i,{base10:function(){return B}});var s={};n.r(s),n.d(s,{base16:function(){return k},base16upper:function(){return _}});var c={};n.r(c),n.d(c,{base32:function(){return N},base32hex:function(){return U},base32hexpad:function(){return D},base32hexpadupper:function(){return q},base32hexupper:function(){return L},base32pad:function(){return R},base32padupper:function(){return F},base32upper:function(){return M},base32z:function(){return H}});var u={};n.r(u),n.d(u,{base36:function(){return z},base36upper:function(){return G}});var l={};n.r(l),n.d(l,{base58btc:function(){return $},base58flickr:function(){return W}});var d={};n.r(d),n.d(d,{base64:function(){return K},base64pad:function(){return Q},base64url:function(){return V},base64urlpad:function(){return J}});var f={};n.r(f),n.d(f,{base256emoji:function(){return ee}});var h={};n.r(h),n.d(h,{sha256:function(){return Ee},sha512:function(){return Ae}});var p={};n.r(p),n.d(p,{identity:function(){return Pe}});var m={};n.r(m),n.d(m,{code:function(){return je},decode:function(){return Oe},encode:function(){return Ie},name:function(){return Ce}});var b={};n.r(b),n.d(b,{code:function(){return ke},decode:function(){return Ne},encode:function(){return _e},name:function(){return Be}});var g=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r>>0,i=new Uint8Array(a);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=a-1;(0!==l||d>>0,i[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");o=d,t++}if(" "!==e[t]){for(var h=a-o;h!==a&&0===i[h];)h++;for(var p=new Uint8Array(r+(a-h)),m=r;h!==a;)p[m++]=i[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 n=0,r=0,o=0,a=t.length;o!==a&&0===t[o];)o++,n++;for(var i=(a-o)*l+1>>>0,u=new Uint8Array(i);o!==a;){for(var d=t[o],f=0,h=i-1;(0!==d||f>>0,u[h]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,o++}for(var p=i-r;p!==i&&0===u[p];)p++;for(var m=c.repeat(n);p{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class w{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class E{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"===typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return x(this,e)}}class A{constructor(e){this.decoders=e}or(e){return x(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const x=(e,t)=>new A({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class P{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new w(e,t,n),this.decoder=new E(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const C=({name:e,prefix:t,encode:n,decode:r})=>new P(e,t,n,r),j=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:o}=y(n,t);return C({prefix:e,name:t,encode:r,decode:e=>v(o(e))})},I=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>C({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],o=(1<n;)i-=n,a+=t[o&s>>i];if(i&&(a+=t[o&s<((e,t,n,r)=>{const o={};for(let l=0;l=8&&(s-=8,i[u++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return i})(t,r,n,e)}),O=C({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),T=I({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),S=I({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),B=j({prefix:"9",name:"base10",alphabet:"0123456789"}),k=I({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),_=I({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),N=I({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),M=I({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),R=I({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),F=I({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),U=I({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),L=I({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),D=I({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),q=I({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),H=I({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),z=j({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),G=j({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),$=j({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),W=j({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),K=I({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Q=I({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),V=I({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),J=I({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Y=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),Z=Y.reduce(((e,t,n)=>(e[n]=t,e)),[]),X=Y.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const ee=C({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Z[t]),"")},decode:function(e){const t=[];for(const n of e){const e=X[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var te=function e(t,n,r){n=n||[];var o=r=r||0;for(;t>=ne;)n[r++]=255&t|128,t/=128;for(;-128&t;)n[r++]=255&t|128,t>>>=7;return n[r]=0|t,e.bytes=r-o+1,n},ne=Math.pow(2,31);var re=function e(t,n){var r,o=0,a=0,i=n=n||0,s=t.length;do{if(i>=s)throw e.bytes=0,new RangeError("Could not decode varint");r=t[i++],o+=a<28?(127&r)<=128);return e.bytes=i-n,o};var oe=Math.pow(2,7),ae=Math.pow(2,14),ie=Math.pow(2,21),se=Math.pow(2,28),ce=Math.pow(2,35),ue=Math.pow(2,42),le=Math.pow(2,49),de=Math.pow(2,56),fe=Math.pow(2,63),he={encode:te,decode:re,encodingLength:function(e){return e(he.encode(e,t,n),t),me=e=>he.encodingLength(e),be=(e,t)=>{const n=t.byteLength,r=me(e),o=r+me(n),a=new Uint8Array(o+n);return pe(e,a,0),pe(n,a,r),a.set(t,o),new ge(e,n,t,a)};class ge{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const ye=({name:e,code:t,encode:n})=>new ve(e,t,n);class ve{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?be(this.code,t):t.then((e=>be(this.code,e)))}throw Error("Unknown type, must be binary type")}}const we=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Ee=ye({name:"sha2-256",code:18,encode:we("SHA-256")}),Ae=ye({name:"sha2-512",code:19,encode:we("SHA-512")}),xe=v,Pe={code:0,name:"identity",encode:xe,digest:e=>be(0,xe(e))},Ce="raw",je=85,Ie=e=>v(e),Oe=e=>v(e),Te=new TextEncoder,Se=new TextDecoder,Be="json",ke=512,_e=e=>Te.encode(JSON.stringify(e)),Ne=e=>JSON.parse(Se.decode(e));Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom");Symbol.for("@ipld/js-cid/CID");const Me={...r,...o,...a,...i,...s,...c,...u,...l,...d,...f};var Re=n(53160);function Fe(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const Ue=Fe("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Le=Fe("ascii","a",(e=>{let t="a";for(let n=0;n{e=e.substring(1);const t=(0,Re.E)(e.length);for(let n=0;n"undefined"!==typeof e)).length>0)))}({request:i}))try{return await async function(e,t){const{batchSize:n=1024,wait:r=0}="object"===typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:a,blockTag:i="latest",data:h,multicallAddress:p,to:m}=t;let g=p;if(!g){if(!e.chain)throw new s.pZ;g=(0,d.LI)({blockNumber:a,chain:e.chain,contract:"multicall3"})}const y=(a?(0,f.eC)(a):void 0)||i,{schedule:v}=(0,b.S)({id:`${e.uid}.${y}`,wait:r,shouldSplitBatch(e){const t=e.reduce(((e,{data:t})=>e+(t.length-2)),0);return t>2*n},fn:async t=>{const n=t.map((e=>({allowFailure:!0,callData:e.data,target:e.to}))),r=(0,l.R)({abi:o.F8,args:[n],functionName:"aggregate3"}),a=await e.request({method:"eth_call",params:[{data:r,to:g},y]});return(0,u.k)({abi:o.F8,args:[n],functionName:"aggregate3",data:a||"0x"})}}),[{returnData:w,success:E}]=await v({data:h,to:m});if(!E)throw new c.VQ({data:w});return"0x"===w?{data:void 0}:{data:w}}(e,{...i,blockNumber:w,blockTag:E})}catch(_){if(!(_ instanceof s.pZ)&&!(_ instanceof s.mm))throw _}const h=await e.request({method:"eth_call",params:n?[i,n]:[i]});return"0x"===h?{data:void 0}:{data:h}}catch(_){const r=function(e){if(!(e instanceof i.G))return;const t=e.walk();return"object"===typeof t.data?t.data.data:t.data}(_),{offchainLookup:o,offchainLookupSignature:a}=await n.e(3646).then(n.bind(n,33646));if(r?.slice(0,10)===a&&T)return{data:await o(e,{data:r,to:T})};throw function(e,{docsPath:t,...n}){let r=e;return(0,h.B)(e)&&(r=(0,h.k)(e,n)),new c.cg(r,{docsPath:t,...n})}(_,{...t,account:k,chain:e.chain})}}},14828:function(e,t,n){"use strict";n.d(t,{Q:function(){return b}});var r=n(21431),o=n(25071),a=n(46872),i=n(6665),s=n(56283),c=n(69977),u=n(54574);class l extends c.G{constructor(e,{account:t,docsPath:n,chain:r,data:o,gas:a,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){const m=(0,u.xr)({from:t?.address,to:h,value:"undefined"!==typeof p&&`${(0,i.d)(p)} ${r?.nativeCurrency.symbol||"ETH"}`,data:o,gas:a,gasPrice:"undefined"!==typeof c&&`${(0,s.o)(c)} gwei`,maxFeePerGas:"undefined"!==typeof l&&`${(0,s.o)(l)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,s.o)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}var d=n(90968);var f=n(91019),h=n(23822),p=n(13134),m=n(59920);async function b(e,t){const n=t.account??e.account;if(!n)throw new o.o({docsPath:"/docs/actions/public/estimateGas"});const i=(0,r.T)(n);try{const{accessList:n,blockNumber:r,blockTag:o,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:b,to:g,value:y,...v}="local"===i.type?await(0,m.h)(e,t):t,w=(r?(0,a.eC)(r):void 0)||o;(0,p.F)(t);const E=e.chain?.formatters?.transactionRequest?.format||h.t,A=E({...(0,f.K)(v,{format:E}),from:i.address,accessList:n,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:b,to:g,value:y}),x=await e.request({method:"eth_estimateGas",params:w?[A,w]:[A]});return BigInt(x)}catch(s){throw function(e,{docsPath:t,...n}){let r=e;return(0,d.B)(e)&&(r=(0,d.k)(e,n)),new l(r,{docsPath:t,...n})}(s,{...t,account:i,chain:e.chain})}}},33910:function(e,t,n){"use strict";n.d(t,{Q:function(){return s}});var r=n(69977);class o extends r.G{constructor({blockHash:e,blockNumber:t}){let n="Block";e&&(n=`Block at hash "${e}"`),t&&(n=`Block at number "${t}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}var a=n(46872),i=n(86101);async function s(e,{blockHash:t,blockNumber:n,blockTag:r,includeTransactions:s}={}){const c=r??"latest",u=s??!1,l=void 0!==n?(0,a.eC)(n):void 0;let d=null;if(d=t?await e.request({method:"eth_getBlockByHash",params:[t,u]}):await e.request({method:"eth_getBlockByNumber",params:[l||c,u]}),!d)throw new o({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||i.Z)(d)}},29251:function(e,t,n){"use strict";n.d(t,{L:function(){return o}});var r=n(90169);async function o(e){const t=await e.request({method:"eth_chainId"});return(0,r.ly)(t)}},48671:function(e,t,n){"use strict";async function r(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}n.d(t,{o:function(){return r}})},89784:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(90169),o=n(46872);async function a(e,{address:t,blockTag:n="latest",blockNumber:a}){const i=await e.request({method:"eth_getTransactionCount",params:[t,a?(0,o.eC)(a):n]});return(0,r.ly)(i)}},48439:function(e,t,n){"use strict";n.d(t,{e:function(){return s}});var r=n(21431);let o,a=256;function i(e=11){if(!o||a+e>512){o="",a=0;for(let e=0;e<256;e++)o+=(256+256*Math.random()|0).toString(16).substring(1)}return o.substring(a,a+++e)}function s(e){const{batch:t,cacheTime:n=e.pollingInterval??4e3,key:o="base",name:a="Base Client",pollingInterval:s=4e3,type:c="base"}=e,u=e.chain,l=e.account?(0,r.T)(e.account):void 0,{config:d,request:f,value:h}=e.transport({chain:u,pollingInterval:s}),p={account:l,batch:t,cacheTime:n,chain:u,key:o,name:a,pollingInterval:s,request:f,transport:{...d,...h},type:c,uid:i()};return Object.assign(p,{extend:function e(t){return n=>{const r=n(t);for(const e in p)delete r[e];const o={...t,...r};return Object.assign(o,{extend:e(o)})}}(p)})}},67629:function(e,t,n){"use strict";n.d(t,{K:function(){return x}});var r=n(48439),o=n(29251),a=n(46872);var i=n(99353),s=n(21431),c=n(25071),u=n(61786),l=n(54574),d=n(90968);var f=n(91019),h=n(23822),p=n(13134),m=n(59920);async function b(e,t){const{account:n=e.account,chain:r=e.chain,accessList:a,data:i,gas:b,gasPrice:g,maxFeePerGas:y,maxPriorityFeePerGas:v,nonce:w,to:E,value:A,...x}=t;if(!n)throw new c.o({docsPath:"/docs/actions/wallet/sendTransaction"});const P=(0,s.T)(n);try{let n;if((0,p.F)(t),null!==r&&(n=await(0,o.L)(e),(0,u.qg)({currentChainId:n,chain:r})),"local"===P.type){const t=await(0,m.h)(e,{account:P,accessList:a,chain:r,data:i,gas:b,gasPrice:g,maxFeePerGas:y,maxPriorityFeePerGas:v,nonce:w,to:E,value:A,...x});n||(n=await(0,o.L)(e));const s=r?.serializers?.transaction,c=await P.signTransaction({...t,chainId:n},{serializer:s});return await e.request({method:"eth_sendRawTransaction",params:[c]})}const s=r?.formatters?.transactionRequest?.format||h.t,c=s({...(0,f.K)(x,{format:s}),accessList:a,data:i,from:P.address,gas:b,gasPrice:g,maxFeePerGas:y,maxPriorityFeePerGas:v,nonce:w,to:E,value:A});return await e.request({method:"eth_sendTransaction",params:[c]})}catch(C){throw function(e,{docsPath:t,...n}){let r=e;return(0,d.B)(e)&&(r=(0,d.k)(e,n)),new l.mk(r,{docsPath:t,...n})}(C,{...t,account:P,chain:t.chain||void 0})}}var g=n(92221);var y=n(25493),v=n(61344),w=n(61539);var E=n(96606);function A(e){return{addChain:t=>async function(e,{chain:t}){const{id:n,name:r,nativeCurrency:o,rpcUrls:i,blockExplorers:s}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,a.eC)(n),chainName:r,nativeCurrency:o,rpcUrls:i.default.http,blockExplorerUrls:s?Object.values(s).map((({url:e})=>e)):void 0}]})}(e,t),deployContract:t=>function(e,{abi:t,args:n,bytecode:r,...o}){return b(e,{...o,data:(0,i.w)({abi:t,args:n,bytecode:r})})}(e,t),getAddresses:()=>async function(e){return(await e.request({method:"eth_accounts"})).map((e=>(0,g.x)(e)))}(e),getChainId:()=>(0,o.L)(e),getPermissions:()=>async function(e){return await e.request({method:"wallet_getPermissions"})}(e),requestAddresses:()=>async function(e){return(await e.request({method:"eth_requestAccounts"})).map((e=>(0,g.K)(e)))}(e),requestPermissions:t=>async function(e,t){return e.request({method:"wallet_requestPermissions",params:[t]})}(e,t),sendTransaction:t=>b(e,t),signMessage:t=>async function(e,{account:t=e.account,message:n}){if(!t)throw new c.o({docsPath:"/docs/actions/wallet/signMessage"});const r=(0,s.T)(t);if("local"===r.type)return r.signMessage({message:n});const o="string"===typeof n?(0,a.$G)(n):n.raw instanceof Uint8Array?(0,a.NC)(n.raw):n.raw;return e.request({method:"personal_sign",params:[o,r.address]})}(e,t),signTypedData:t=>async function(e,{account:t=e.account,domain:n,message:r,primaryType:o,types:a}){if(!t)throw new c.o({docsPath:"/docs/actions/wallet/signTypedData"});const i=(0,s.T)(t),u={EIP712Domain:["string"===typeof n?.name&&{name:"name",type:"string"},n?.version&&{name:"version",type:"string"},"number"===typeof n?.chainId&&{name:"chainId",type:"uint256"},n?.verifyingContract&&{name:"verifyingContract",type:"address"},n?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...a};if((0,w.i)({domain:n,message:r,primaryType:o,types:u}),"local"===i.type)return i.signTypedData({domain:n,primaryType:o,types:u,message:r});const l=(0,v.P)({domain:n??{},primaryType:o,types:u,message:r},((e,t)=>(0,y.v)(t)?t.toLowerCase():t));return e.request({method:"eth_signTypedData_v4",params:[i.address,l]})}(e,t),switchChain:t=>async function(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,a.eC)(t)}]})}(e,t),watchAsset:t=>async function(e,t){return await e.request({method:"wallet_watchAsset",params:t})}(e,t),writeContract:t=>async function(e,{abi:t,address:n,args:r,dataSuffix:o,functionName:a,...i}){const s=(0,E.R)({abi:t,args:r,functionName:a});return await b(e,{data:`${s}${o?o.replace("0x",""):""}`,to:n,...i})}(e,t)}}function x(e){const{key:t="wallet",name:n="Wallet Client",transport:o}=e;return(0,r.e)({...e,key:t,name:n,transport:e=>o({...e,retryCount:0}),type:"walletClient"}).extend(A)}},14160:function(e,t,n){"use strict";n.d(t,{q:function(){return o}});var r=n(62635);function o({key:e,name:t,request:n,retryCount:o=3,retryDelay:a=150,timeout:i,type:s},c){return{config:{key:e,name:t,request:n,retryCount:o,retryDelay:a,timeout:i,type:s},request:(0,r.n)(n,{retryCount:o,retryDelay:a}),value:c}}},19575:function(e,t,n){"use strict";n.d(t,{P:function(){return o}});var r=n(14160);function o(e,t={}){const{key:n="custom",name:o="Custom Provider",retryDelay:a}=t;return({retryCount:i})=>(0,r.q)({key:n,name:o,request:e.request.bind(e),retryCount:t.retryCount??i,retryDelay:a,type:"custom"})}},1920:function(e,t,n){"use strict";n.d(t,{$o:function(){return u},F8:function(){return r},X$:function(){return c},du:function(){return i},k3:function(){return a},nZ:function(){return s}});const r=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],o=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],a=[...o,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],i=[...o,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],s=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],c=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],u=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},35554:function(e,t,n){"use strict";n.d(t,{$:function(){return r},Up:function(){return o},hZ:function(){return a}});const r={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},o={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},a={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},58617:function(e,t,n){"use strict";n.d(t,{Bd:function(){return a},Zn:function(){return o},ez:function(){return r}});const r={gwei:9,wei:18},o={ether:-9,wei:9},a={ether:-18,gwei:-9}},5555:function(e,t,n){"use strict";n.d(t,{CI:function(){return x},FM:function(){return p},Gy:function(){return E},KY:function(){return v},M4:function(){return d},MX:function(){return y},SM:function(){return w},cO:function(){return s},dh:function(){return A},fM:function(){return i},fs:function(){return f},gr:function(){return l},hn:function(){return P},lC:function(){return m},mv:function(){return b},wM:function(){return C},wb:function(){return u},xB:function(){return c},xL:function(){return g},yP:function(){return h}});var r=n(21494),o=n(51756),a=n(69977);class i extends a.G{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class s extends a.G{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class c extends a.G{constructor({data:e,params:t,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join("\n"),{metaMessages:[`Params: (${(0,r.h)(t,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=n}}class u extends a.G{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class l extends a.G{constructor({expectedLength:e,givenLength:t,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class d extends a.G{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,o.d)(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class f extends a.G{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class h extends a.G{constructor(e,{docsPath:t}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class p extends a.G{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class m extends a.G{constructor(e,{docsPath:t}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class b extends a.G{constructor(e,{docsPath:t}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class g extends a.G{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class y extends a.G{constructor(e,{docsPath:t}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class v extends a.G{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class w extends a.G{constructor({abiItem:e,data:t,params:n,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join("\n"),{metaMessages:[`Params: (${(0,r.h)(n,{includeName:!0})})`,`Data: ${t} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=n,this.size=o}}class E extends a.G{constructor({abiItem:e,param:t}){super([`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,r.t)(e,{includeName:!0})}".`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class A extends a.G{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class x extends a.G{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class P extends a.G{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class C extends a.G{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}},25071:function(e,t,n){"use strict";n.d(t,{o:function(){return o}});var r=n(69977);class o extends r.G{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join("\n"),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}},92960:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});var r=n(69977);class o extends r.G{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}},69977:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var r=n(20966);class o extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,r.bo)()});const n=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof o&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: https://viem.sh${a}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return a(this,e)}}function a(e,t){return t?.(e)?e:e&&"object"===typeof e&&"cause"in e?a(e.cause,t):t?null:e}},21973:function(e,t,n){"use strict";n.d(t,{Bk:function(){return i},Yl:function(){return a},hJ:function(){return c},mm:function(){return o},pZ:function(){return s}});var r=n(69977);class o extends r.G{constructor({blockNumber:e,chain:t,contract:n}){super(`Chain "${t.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class a extends r.G{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} \u2013 ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} \u2013 ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class i extends r.G{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class s extends r.G{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}class c extends r.G{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}},90722:function(e,t,n){"use strict";n.d(t,{cg:function(){return b},uq:function(){return g},Lu:function(){return y},Dk:function(){return v},VQ:function(){return w}});var r=n(21431),o=n(35554),a=n(11856),i=n(21494),s=n(61344);function c({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map(((e,n)=>`${r&&e.name?`${e.name}: `:""}${"object"===typeof t[n]?(0,s.P)(t[n]):t[n]}`)).join(", ")})`}var u=n(28604),l=n(6665),d=n(56283),f=n(5555),h=n(69977),p=n(54574),m=n(20966);class b extends h.G{constructor(e,{account:t,docsPath:n,chain:o,data:a,gas:i,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:h,value:m}){const b=t?(0,r.T)(t):void 0,g=(0,p.xr)({from:b?.address,to:h,value:"undefined"!==typeof m&&`${(0,l.d)(m)} ${o?.nativeCurrency.symbol||"ETH"}`,data:a,gas:i,gasPrice:"undefined"!==typeof s&&`${(0,d.o)(s)} gwei`,maxFeePerGas:"undefined"!==typeof c&&`${(0,d.o)(c)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof u&&`${(0,d.o)(u)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",g].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class g extends h.G{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:o,functionName:a,sender:s}){const l=(0,u.m)({abi:t,args:n,name:a}),d=l?c({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=l?(0,i.t)(l,{includeName:!0}):void 0,h=(0,p.xr)({address:r&&(0,m.CR)(r),function:f,args:d&&"()"!==d&&`${[...Array(a?.length??0).keys()].map((()=>" ")).join("")}${d}`,sender:s});super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",h].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=n,this.cause=e,this.contractAddress=r,this.functionName=a,this.sender=s}}class y extends h.G{constructor({abi:e,data:t,functionName:n,message:r}){let s,u,l,d,h;if(t&&"0x"!==t)try{u=(0,a.p)({abi:e,data:t});const{abiItem:n,errorName:r,args:s}=u;if("Error"===r)d=s[0];else if("Panic"===r){const[e]=s;d=o.$[e]}else{const e=n?(0,i.t)(n,{includeName:!0}):void 0,t=n&&s?c({abiItem:n,args:s,includeFunctionName:!1,includeName:!1}):void 0;l=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(r?.length??0).keys()].map((()=>" ")).join("")}${t}`:""]}}catch(p){s=p}else r&&(d=r);s instanceof f.yP&&(h=s.signature,l=[`Unable to decode signature "${h}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${h}.`]),super(d&&"execution reverted"!==d||h?[`The contract function "${n}" reverted with the following ${h?"signature":"reason"}:`,d||h].join("\n"):`The contract function "${n}" reverted.`,{cause:s,metaMessages:l}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=u,this.reason=d,this.signature=h}}class v extends h.G{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class w extends h.G{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},98309:function(e,t,n){"use strict";n.d(t,{$:function(){return a},m:function(){return o}});var r=n(69977);class o extends r.G{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class a extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}},89466:function(e,t,n){"use strict";n.d(t,{Cd:function(){return a},J5:function(){return o},M6:function(){return i}});var r=n(69977);class o extends r.G{constructor({max:e,min:t,signed:n,size:r,value:o}){super(`Number "${o}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class a extends r.G{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class i extends r.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}},66054:function(e,t,n){"use strict";n.d(t,{C_:function(){return d},G$:function(){return s},Hh:function(){return i},M_:function(){return a},WF:function(){return f},ZI:function(){return c},cj:function(){return b},cs:function(){return m},dR:function(){return h},pZ:function(){return p},se:function(){return l},vU:function(){return u}});var r=n(56283),o=n(69977);class a extends o.G{constructor({cause:e,message:t}={}){const n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class i extends o.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class s extends o.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class c extends o.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class u extends o.G{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class l extends o.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends o.G{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class f extends o.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class h extends o.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class p extends o.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends o.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${(0,r.o)(n)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class b extends o.G{constructor({cause:e}){super(`An error occurred while executing: ${e?.message}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}},88822:function(e,t,n){"use strict";n.d(t,{Gg:function(){return i},W5:function(){return u},bs:function(){return c},c9:function(){return s}});var r=n(61344),o=n(69977),a=n(20966);class i extends o.G{constructor({body:e,details:t,headers:n,status:o,url:i}){super("HTTP request failed.",{details:t,metaMessages:[o&&`Status: ${o}`,`URL: ${(0,a.Gr)(i)}`,e&&`Request body: ${(0,r.P)(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=o,this.url=i}}class s extends o.G{constructor({body:e,details:t,url:n}){super("WebSocket request failed.",{details:t,metaMessages:[`URL: ${(0,a.Gr)(n)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class c extends o.G{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,a.Gr)(n)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class u extends o.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,a.Gr)(t)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}},42455:function(e,t,n){"use strict";n.d(t,{B:function(){return c},GD:function(){return y},I0:function(){return x},KB:function(){return m},LX:function(){return u},Og:function(){return h},PE:function(){return w},Pv:function(){return g},Ts:function(){return E},XS:function(){return d},ab:function(){return v},gS:function(){return b},ir:function(){return C},nY:function(){return l},pT:function(){return p},s7:function(){return s},u5:function(){return A},x3:function(){return P},yR:function(){return f}});var r=n(69977),o=n(88822);class a extends r.G{constructor(e,{code:t,docsPath:n,metaMessages:r,shortMessage:a}){super(a,{cause:e,docsPath:n,metaMessages:r||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof o.bs?e.code:t??-1}}class i extends a{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class s extends a{constructor(e){super(e,{code:s.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends a{constructor(e){super(e,{code:c.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class u extends a{constructor(e){super(e,{code:u.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class l extends a{constructor(e){super(e,{code:l.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends a{constructor(e){super(e,{code:d.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class f extends a{constructor(e){super(e,{code:f.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class h extends a{constructor(e){super(e,{code:h.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class p extends a{constructor(e){super(e,{code:p.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class m extends a{constructor(e){super(e,{code:m.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class b extends a{constructor(e){super(e,{code:b.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class g extends a{constructor(e){super(e,{code:g.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class y extends a{constructor(e){super(e,{code:y.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends i{constructor(e){super(e,{code:v.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends i{constructor(e){super(e,{code:w.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class E extends i{constructor(e){super(e,{code:E.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class A extends i{constructor(e){super(e,{code:A.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class x extends i{constructor(e){super(e,{code:x.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class P extends i{constructor(e){super(e,{code:P.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class C extends a{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}},54574:function(e,t,n){"use strict";n.d(t,{Bh:function(){return f},JC:function(){return l},Yb:function(){return h},j3:function(){return u},mc:function(){return p},mk:function(){return d},vl:function(){return c},xY:function(){return s},xr:function(){return i}});var r=n(6665),o=n(56283),a=n(69977);function i(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),n=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`)).join("\n")}class s extends a.G{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class c extends a.G{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class u extends a.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",i(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class l extends a.G{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}class d extends a.G{constructor(e,{account:t,docsPath:n,chain:a,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){const m=i({chain:a&&`${a?.name} (id: ${a?.id})`,from:t?.address,to:h,value:"undefined"!==typeof p&&`${(0,r.d)(p)} ${a?.nativeCurrency.symbol||"ETH"}`,data:s,gas:c,gasPrice:"undefined"!==typeof u&&`${(0,o.o)(u)} gwei`,maxFeePerGas:"undefined"!==typeof l&&`${(0,o.o)(l)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,o.o)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class f extends a.G{constructor({blockHash:e,blockNumber:t,blockTag:n,hash:r,index:o}){let a="Transaction";n&&void 0!==o&&(a=`Transaction at block time "${n}" at index "${o}"`),e&&void 0!==o&&(a=`Transaction at block hash "${e}" at index "${o}"`),t&&void 0!==o&&(a=`Transaction at block number "${t}" at index "${o}"`),r&&(a=`Transaction with hash "${r}"`),super(`${a} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class h extends a.G{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class p extends a.G{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}},20966:function(e,t,n){"use strict";n.d(t,{CR:function(){return r},Gr:function(){return o},bo:function(){return a}});const r=e=>e,o=e=>e,a=()=>"viem@1.5.4"},70558:function(e,t,n){"use strict";n.d(t,{r:function(){return l}});var r=n(5555),o=n(92221),a=n(51756),i=n(33283),s=n(26873),c=n(90169),u=n(62546);function l(e,t){if("0x"===t&&e.length>0)throw new r.wb;if((0,a.d)(t)&&(0,a.d)(t)<32)throw new r.xB({data:t,params:e,size:(0,a.d)(t)});return function({data:e,params:t}){const n=[];let o=0;for(let i=0;i=(0,a.d)(e))throw new r.xB({data:e,params:t,size:(0,a.d)(e)});const s=t[i],{consumed:c,value:u}=d({data:e,param:s,position:o});n.push(u),o+=c}return n}({data:t,params:e})}function d({data:e,param:t,position:n}){const a=(0,u.S)(t.type);if(a){const[r,o]=a;return function(e,{param:t,length:n,position:r}){if(!n){const n=(0,c.ly)((0,i.tP)(e,r,r+32,{strict:!0})),o=(0,c.ly)((0,i.tP)(e,n,n+32,{strict:!0}));let a=0;const s=[];for(let r=0;r!e)),o=r?[]:{};let a=0;if(f(t)){const s=(0,c.ly)((0,i.tP)(e,n,n+32,{strict:!0}));for(let n=0;n48?(0,c.y_)(e,{signed:n}):(0,c.ly)(e,{signed:n})}}(l,{param:t});if("address"===t.type)return function(e){return{consumed:32,value:(0,o.x)((0,i.tP)(e,-20))}}(l);if("bool"===t.type)return function(e){return{consumed:32,value:(0,c.XA)(e)}}(l);throw new r.CI(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function f(e){const{type:t}=e;if("string"===t)return!0;if("bytes"===t)return!0;if(t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(f);const n=(0,u.S)(e.type);return!(!n||!f({...e,type:n[1]}))}},11856:function(e,t,n){"use strict";n.d(t,{p:function(){return u}});var r=n(35554),o=n(5555),a=n(33283),i=n(80507),s=n(70558),c=n(21494);function u({abi:e,data:t}){const n=(0,a.tP)(t,0,4);if("0x"===n)throw new o.wb;const u=[...e||[],r.Up,r.hZ].find((e=>"error"===e.type&&n===(0,i.o)((0,c.t)(e))));if(!u)throw new o.yP(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?(0,s.r)(u.inputs,(0,a.tP)(t,4)):void 0,errorName:u.name}}},31826:function(e,t,n){"use strict";n.d(t,{k:function(){return s}});var r=n(5555),o=n(70558),a=n(28604);const i="/docs/contract/decodeFunctionResult";function s({abi:e,args:t,functionName:n,data:s}){let c=e[0];if(n&&(c=(0,a.m)({abi:e,args:t,name:n}),!c))throw new r.xL(n,{docsPath:i});if("function"!==c.type)throw new r.xL(void 0,{docsPath:i});if(!c.outputs)throw new r.MX(c.name,{docsPath:i});const u=(0,o.r)(c.outputs,s);return u&&u.length>1?u:u&&1===u.length?u[0]:void 0}},62546:function(e,t,n){"use strict";n.d(t,{E:function(){return d},S:function(){return p}});var r=n(5555),o=n(92960),a=n(97451),i=n(9040),s=n(28795),c=n(51756),u=n(33283),l=n(46872);function d(e,t){if(e.length!==t.length)throw new r.fs({expectedLength:e.length,givenLength:t.length});const n=function({params:e,values:t}){const n=[];for(let r=0;r0?(0,i.zo)([t,e]):t}}if(a)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,i.zo)(s.map((({encoded:e})=>e)))}}(t,{length:o,param:{...e,type:a}})}if("tuple"===e.type)return function(e,{param:t}){let n=!1;const r=[];for(let o=0;oe)))}}(t,{param:e});if("address"===e.type)return function(e){if(!(0,a.U)(e))throw new o.b({address:e});return{dynamic:!1,encoded:(0,s.gc)(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){return{dynamic:!1,encoded:(0,s.gc)((0,l.C4)(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){return function(e,{signed:t}){return{dynamic:!1,encoded:(0,l.eC)(e,{size:32,signed:t})}}(t,{signed:e.type.startsWith("int")})}if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,n]=t.type.split("bytes"),o=(0,c.d)(e);if(!n){let t=e;return o%32!==0&&(t=(0,s.gc)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,i.zo)([(0,s.gc)((0,l.eC)(o,{size:32})),t])}}if(o!==parseInt(n))throw new r.M4({expectedSize:parseInt(n),value:e});return{dynamic:!1,encoded:(0,s.gc)(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=(0,l.$G)(e),n=Math.ceil((0,c.d)(t)/32),r=[];for(let o=0;o"type"in e&&"constructor"===e.type));if(!s)throw new r.fM({docsPath:i});if(!("inputs"in s))throw new r.cO({docsPath:i});if(!s.inputs||0===s.inputs.length)throw new r.cO({docsPath:i});const c=(0,a.E)(s.inputs,t);return(0,o.SM)([n,c])}},96606:function(e,t,n){"use strict";n.d(t,{R:function(){return u}});var r=n(5555),o=n(9040),a=n(80507),i=n(62546),s=n(21494),c=n(28604);function u({abi:e,args:t,functionName:n}){let u=e[0];if(n&&(u=(0,c.m)({abi:e,args:t,name:n}),!u))throw new r.xL(n,{docsPath:"/docs/contract/encodeFunctionData"});if("function"!==u.type)throw new r.xL(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const l=(0,s.t)(u),d=(0,a.o)(l),f="inputs"in u&&u.inputs?(0,i.E)(u.inputs,t??[]):void 0;return(0,o.SM)([d,f??"0x"])}},21494:function(e,t,n){"use strict";n.d(t,{h:function(){return a},t:function(){return o}});var r=n(5555);function o(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new r.wM(e.type);return`${e.name}(${a(e.inputs,{includeName:t})})`}function a(e,{includeName:t=!1}={}){return e?e.map((e=>function(e,{includeName:t}){if(e.type.startsWith("tuple"))return`(${a(e.components,{includeName:t})})${e.type.slice("tuple".length)}`;return e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t}))).join(t?", ":","):""}},28604:function(e,t,n){"use strict";n.d(t,{m:function(){return o}});var r=n(97451);function o({abi:e,args:t=[],name:n}){const r=e.filter((e=>"name"in e&&e.name===n));if(0!==r.length){if(1===r.length)return r[0];for(const e of r){if(!("inputs"in e))continue;if(!t||0===t.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(!e.inputs)continue;if(0===e.inputs.length)continue;if(e.inputs.length!==t.length)continue;if(t.every(((t,n)=>{const r="inputs"in e&&e.inputs[n];return!!r&&a(t,r)})))return e}return r[0]}}function a(e,t){const n=typeof e,o=t.type;switch(o){case"address":return(0,r.U)(e);case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:return"tuple"===o&&"components"in t?Object.values(t.components).every(((t,n)=>a(Object.values(e)[n],t))):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?"number"===n||"bigint"===n:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?"string"===n||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)&&(Array.isArray(e)&&e.every((e=>a(e,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")}))))}}},92221:function(e,t,n){"use strict";n.d(t,{K:function(){return c},x:function(){return s}});var r=n(92960),o=n(41327),a=n(90707),i=n(97451);function s(e,t){const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=(0,a.w)((0,o.qX)(n),"bytes"),i=(t?n.substring(`${t}0x`.length):n).split("");for(let o=0;o<40;o+=2)r[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(15&r[o>>1])>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());return`0x${i.join("")}`}function c(e,t){if(!(0,i.U)(e))throw new r.b({address:e});return s(e,t)}},97451:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});const r=/^0x[a-fA-F0-9]{40}$/;function o(e){return r.test(e)}},62635:function(e,t,n){"use strict";n.d(t,{n:function(){return c},y:function(){return s}});var r=n(69977),o=n(88822),a=n(42455),i=n(11941);const s=e=>"code"in e?-1!==e.code&&-32004!==e.code&&-32005!==e.code&&-32042!==e.code&&-32603!==e.code:!!(e instanceof o.Gg&&e.status)&&(403!==e.status&&408!==e.status&&413!==e.status&&429!==e.status&&500!==e.status&&502!==e.status&&503!==e.status&&504!==e.status);function c(e,{retryDelay:t=150,retryCount:n=3}={}){return async c=>(0,i.J)((async()=>{try{return await e(c)}catch(t){const e=t;switch(e.code){case a.s7.code:throw new a.s7(e);case a.B.code:throw new a.B(e);case a.LX.code:throw new a.LX(e);case a.nY.code:throw new a.nY(e);case a.XS.code:throw new a.XS(e);case a.yR.code:throw new a.yR(e);case a.Og.code:throw new a.Og(e);case a.pT.code:throw new a.pT(e);case a.KB.code:throw new a.KB(e);case a.gS.code:throw new a.gS(e);case a.Pv.code:throw new a.Pv(e);case a.GD.code:throw new a.GD(e);case a.ab.code:throw new a.ab(e);case a.PE.code:throw new a.PE(e);case a.Ts.code:throw new a.Ts(e);case a.u5.code:throw new a.u5(e);case a.I0.code:throw new a.I0(e);case a.x3.code:throw new a.x3(e);default:if(t instanceof r.G)throw t;throw new a.ir(e)}}}),{delay:({count:e,error:n})=>{if(n&&n instanceof o.Gg){const e=n?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<!s(e)})}},61786:function(e,t,n){"use strict";n.d(t,{LI:function(){return i},ax:function(){return a},qg:function(){return o}});var r=n(21973);function o({chain:e,currentChainId:t}){if(!e)throw new r.Bk;if(t!==e.id)throw new r.Yl({chain:e,currentChainId:t})}function a(e,t={}){const{fees:n=e.fees,formatters:r=e.formatters,serializers:o=e.serializers}=t;return{...e,fees:n,formatters:r,serializers:o}}function i({blockNumber:e,chain:t,contract:n}){const o=t?.contracts?.[n];if(!o)throw new r.mm({chain:t,contract:{name:n}});if(e&&o.blockCreated&&o.blockCreated>e)throw new r.mm({blockNumber:e,chain:t,contract:{name:n,blockCreated:o.blockCreated}});return o.address}},9040:function(e,t,n){"use strict";function r(e){return"string"===typeof e[0]?o(e):function(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}(e)}function o(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}n.d(t,{SM:function(){return o},zo:function(){return r}})},25493:function(e,t,n){"use strict";function r(e,{strict:t=!0}={}){return!!e&&("string"===typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")))}n.d(t,{v:function(){return r}})},28795:function(e,t,n){"use strict";n.d(t,{gc:function(){return a},vk:function(){return o}});var r=n(98309);function o(e,{dir:t,size:n=32}={}){return"string"===typeof e?a(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new r.$({size:e.length,targetSize:n,type:"bytes"});const o=new Uint8Array(n);for(let r=0;r2*n)throw new r.$({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o["right"===t?"padEnd":"padStart"](2*n,"0")}`}},51756:function(e,t,n){"use strict";n.d(t,{d:function(){return o}});var r=n(25493);function o(e){return(0,r.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},33283:function(e,t,n){"use strict";n.d(t,{tP:function(){return i}});var r=n(98309),o=n(25493),a=n(51756);function i(e,t,n,{strict:r}={}){return(0,o.v)(e,{strict:!1})?function(e,t,n,{strict:r}={}){s(e,t);const o=`0x${e.replace("0x","").slice(2*(t??0),2*(n??e.length))}`;r&&c(o,t,n);return o}(e,t,n,{strict:r}):function(e,t,n,{strict:r}={}){s(e,t);const o=e.slice(t,n);r&&c(o,t,n);return o}(e,t,n,{strict:r})}function s(e,t){if("number"===typeof t&&t>0&&t>(0,a.d)(e)-1)throw new r.m({offset:t,position:"start",size:(0,a.d)(e)})}function c(e,t,n){if("number"===typeof t&&"number"===typeof n&&(0,a.d)(e)!==n-t)throw new r.m({offset:n,position:"end",size:(0,a.d)(e)})}},26873:function(e,t,n){"use strict";function r(e,{dir:t="left"}={}){let n="string"===typeof e?e.replace("0x",""):e,r=0;for(let o=0;ot)throw new r.M6({givenSize:(0,o.d)(e),maxSize:t})}function c(e,t={}){const{signed:n}=t;t.size&&s(e,{size:t.size});const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2;return r<=(1n<<8n*BigInt(o)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*o,"f")}`)-1n}function u(e,t={}){let n=e;if(t.size&&(s(n,{size:t.size}),n=(0,a.f)(n)),"0x00"===(0,a.f)(n))return!1;if("0x01"===(0,a.f)(n))return!0;throw new r.Cd(n)}function l(e,t={}){return Number(c(e,t))}function d(e,t={}){let n=(0,i.nr)(e);return t.size&&(s(n,{size:t.size}),n=(0,a.f)(n,{dir:"right"})),(new TextDecoder).decode(n)}},41327:function(e,t,n){"use strict";n.d(t,{O0:function(){return u},nr:function(){return l},qX:function(){return d}});var r=n(69977),o=n(25493),a=n(28795),i=n(90169),s=n(46872);const c=new TextEncoder;function u(e,t={}){return"number"===typeof e||"bigint"===typeof e?function(e,t){return l((0,s.eC)(e,t))}(e,t):"boolean"===typeof e?function(e,t={}){const n=new Uint8Array(1);if(n[0]=Number(e),"number"===typeof t.size)return(0,i.Yf)(n,{size:t.size}),(0,a.vk)(n,{size:t.size});return n}(e,t):(0,o.v)(e)?l(e,t):d(e,t)}function l(e,t={}){let n=e;t.size&&((0,i.Yf)(n,{size:t.size}),n=(0,a.vk)(n,{dir:"right",size:t.size}));let o=n.slice(2);o.length%2&&(o=`0${o}`);const s=new Uint8Array(o.length/2);for(let a=0;at.toString(16).padStart(2,"0")));function s(e,t={}){return"number"===typeof e||"bigint"===typeof e?l(e,t):"string"===typeof e?f(e,t):"boolean"===typeof e?c(e,t):u(e,t)}function c(e,t={}){const n=`0x${Number(e)}`;return"number"===typeof t.size?((0,a.Yf)(n,{size:t.size}),(0,o.vk)(n,{size:t.size})):n}function u(e,t={}){let n="";for(let o=0;os||i"string"===typeof e?e:(0,o.Tr)(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const i=(0,r.$)("block",a)},91019:function(e,t,n){"use strict";function r(e,{format:t}){if(!t)return{};return Object.keys(t({})).reduce(((t,n)=>(e?.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})}n.d(t,{K:function(){return r}})},75491:function(e,t,n){"use strict";function r(e,t){return({exclude:n,format:r})=>({exclude:n,format:e=>{const o=t(e);if(n)for(const t of n)delete o[t];return{...o,...r(e)}},type:e})}n.d(t,{$:function(){return r}})},18829:function(e,t,n){"use strict";function r(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}n.d(t,{U:function(){return r}})},94216:function(e,t,n){"use strict";n.d(t,{Tr:function(){return i},c8:function(){return a},y_:function(){return s}});var r=n(90169),o=n(75491);const a={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function i(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,r.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?a[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip2930"===t.type&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}const s=(0,o.$)("transaction",i)},4656:function(e,t,n){"use strict";n.d(t,{d:function(){return u},f:function(){return c}});var r=n(90169),o=n(75491),a=n(18829),i=n(94216);const s={"0x0":"reverted","0x1":"success"};function c(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>(0,a.U)(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.ly)(e.transactionIndex):null,status:e.status?s[e.status]:null,type:e.type?i.c8[e.type]||e.type:null}}const u=(0,o.$)("transactionReceipt",c)},23822:function(e,t,n){"use strict";n.d(t,{i:function(){return a},t:function(){return o}});var r=n(46872);function o(e){return{...e,gas:"undefined"!==typeof e.gas?(0,r.eC)(e.gas):void 0,gasPrice:"undefined"!==typeof e.gasPrice?(0,r.eC)(e.gasPrice):void 0,maxFeePerGas:"undefined"!==typeof e.maxFeePerGas?(0,r.eC)(e.maxFeePerGas):void 0,maxPriorityFeePerGas:"undefined"!==typeof e.maxPriorityFeePerGas?(0,r.eC)(e.maxPriorityFeePerGas):void 0,nonce:"undefined"!==typeof e.nonce?(0,r.eC)(e.nonce):void 0,value:"undefined"!==typeof e.value?(0,r.eC)(e.value):void 0}}const a=(0,n(75491).$)("transactionRequest",o)},80507:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(33283),o=n(56143);const a=e=>"string"===typeof e?(0,r.tP)((0,o.F)(e),0,4):(0,r.tP)((0,o.J)(e),0,4)},56143:function(e,t,n){"use strict";n.d(t,{J:function(){return l},F:function(){return u}});var r=n(21494);const o=/((function|event)\s)?(.*)(\((.*)\))/;function a(e){const t=e.match(o),n=t?.[2]||void 0,r=t?.[3];return{type:n,name:r,params:t?.[5]||void 0}}var i=n(41327),s=n(90707);const c=e=>(0,s.w)((0,i.O0)(e));function u(e){const t=function(e){return a(e).name}(e),n=function(e){const t=a(e).params?.split(",").map((e=>e.trim().split(" ")));return t?.map((e=>({type:e[0],name:"indexed"===e[1]?e[2]:e[1],..."indexed"===e[1]?{indexed:!0}:{}})))}(e)||[];return c(`${t}(${n.map((({type:e})=>e)).join(",")})`)}function l(e){return c((0,r.t)(e))}},90707:function(e,t,n){"use strict";function r(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}`)}n.d(t,{w:function(){return k}});const a={number:r,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");r(e.outputLen),r(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 n=t.outputLen;if(e.length>c&s)}:{h:0|Number(e>>c&s),l:0|Number(e&s)}}var l={fromBig:u,split:function(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0),shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:(e,t,n)=>e<>>32-n,rotlSL:(e,t,n)=>t<>>32-n,rotlBH:(e,t,n)=>t<>>64-n,rotlBL:(e,t,n)=>e<>>64-n,add:function(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,add5H:(e,t,n,r,o,a)=>t+n+r+o+a+(e/2**32|0)|0,add5L:(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0)};"object"===typeof globalThis&&"crypto"in globalThis&&globalThis.crypto;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function d(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}const[f,h,p]=[[],[],[]],m=BigInt(0),b=BigInt(1),g=BigInt(2),y=BigInt(7),v=BigInt(256),w=BigInt(113);for(let _=0,N=b,M=1,R=0;_<24;_++){[M,R]=[R,(2*M+3*R)%5],f.push(2*(5*R+M)),h.push((_+1)*(_+2)/2%64);let e=m;for(let t=0;t<7;t++)N=(N<>y)*w)%v,N&g&&(e^=b<<(b<n>32?l.rotlBH(e,t,n):l.rotlSH(e,t,n),P=(e,t,n)=>n>32?l.rotlBL(e,t,n):l.rotlSL(e,t,n);class C extends class{clone(){return this._cloneInto()}}{constructor(e,t,n,r=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,i.number(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var a;this.state=new Uint8Array(200),this.state32=(a=this.state,new Uint32Array(a.buffer,a.byteOffset,Math.floor(a.byteLength/4)))}keccak(){!function(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,o=(r+2)%10,a=n[o],i=n[o+1],s=x(a,i,1)^n[t],c=P(a,i,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=s,e[r+n+1]^=c}let t=e[2],o=e[3];for(let n=0;n<24;n++){const r=h[n],a=x(t,o,r),i=P(t,o,r),s=f[n];t=e[s],o=e[s+1],e[s]=a,e[s+1]=i}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=E[r],e[1]^=A[r]}n.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){i.exists(this);const{blockLen:t,state:n}=this,r=(e=d(e)).length;for(let o=0;o=n&&this.keccak();const a=Math.min(n-this.posOut,o-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return i.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(i.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:n,outputLen:r,rounds:o,enableXOF:a}=this;return e||(e=new C(t,n,r,a,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=r,e.enableXOF=a,e.destroyed=this.destroyed,e}}const j=(e,t,n)=>function(e){const t=t=>e().update(d(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}((()=>new C(t,e,n))),I=(j(6,144,28),j(6,136,32),j(6,104,48),j(6,72,64),j(1,144,28),j(1,136,32)),O=(j(1,104,48),j(1,72,64),(e,t,n)=>function(e){const t=(t,n)=>e(n).update(d(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}(((r={})=>new C(t,e,void 0===r.dkLen?n:r.dkLen,!0))));O(31,168,16),O(31,136,32);var T=n(25493),S=n(41327),B=n(46872);function k(e,t){const n=t||"hex",r=I((0,T.v)(e,{strict:!1})?(0,S.O0)(e):e);return"bytes"===n?r:(0,B.NC)(r)}},68583:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});const r=new Map;function o({fn:e,id:t,shouldSplitBatch:n,wait:o=0}){const a=async()=>{const t=s();i();const n=t.map((({args:e})=>e));0!==n.length&&e(n).then((e=>{t.forEach((({pendingPromise:t},n)=>t.resolve?.([e[n],e])))})).catch((e=>{t.forEach((({pendingPromise:t})=>t.reject?.(e)))}))},i=()=>r.delete(t),s=()=>r.get(t)||[],c=e=>r.set(t,[...s(),e]);return{flush:i,async schedule(e){const t={},r=new Promise(((e,n)=>{t.resolve=e,t.reject=n})),i=n?.([...s().map((({args:e})=>e)),e]);i&&a();return s().length>0?(c({args:e,pendingPromise:t}),r):(c({args:e,pendingPromise:t}),setTimeout(a,o),r)}}}},11941:function(e,t,n){"use strict";n.d(t,{J:function(){return o}});var r=n(40482);function o(e,{delay:t=100,retryCount:n=2,shouldRetry:o=(()=>!0)}={}){return new Promise(((a,i)=>{const s=async({count:c=0}={})=>{try{const t=await e();a(t)}catch(u){if(c{const n="function"===typeof t?t({count:c,error:e}):t;n&&await(0,r.D)(n),s({count:c+1})})({error:u});i(u)}};s()}))}},61344:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});const r=(e,t,n)=>JSON.stringify(e,((e,n)=>{const r="bigint"===typeof n?n.toString():n;return"function"===typeof t?t(e,r):r}),n)},13134:function(e,t,n){"use strict";n.d(t,{F:function(){return c}});var r=n(21431),o=n(92960),a=n(66054),i=n(54574),s=n(97451);function c(e){const{account:t,gasPrice:n,maxFeePerGas:c,maxPriorityFeePerGas:u,to:l}=e,d=t?(0,r.T)(t):void 0;if(d&&!(0,s.U)(d.address))throw new o.b({address:d.address});if(l&&!(0,s.U)(l))throw new o.b({address:l});if("undefined"!==typeof n&&("undefined"!==typeof c||"undefined"!==typeof u))throw new i.xY;if(c&&c>2n**256n-1n)throw new a.Hh({maxFeePerGas:c});if(u&&c&&u>c)throw new a.cs({maxFeePerGas:c,maxPriorityFeePerGas:u})}},59920:function(e,t,n){"use strict";n.d(t,{h:function(){return d}});var r=n(21431),o=n(14828),a=n(33910),i=n(48671),s=n(89784),c=n(25071),u=n(69977),l=n(13134);async function d(e,t){const{account:n,chain:d=e.chain,gas:f,gasPrice:h,maxFeePerGas:p,maxPriorityFeePerGas:m,nonce:b}=t;if(!n)throw new c.o;const g=(0,r.T)(n),y=await(0,a.Q)(e,{blockTag:"latest"}),v={...t,from:g.address};if("undefined"===typeof b&&(v.nonce=await(0,s.K)(e,{address:g.address,blockTag:"pending"})),"bigint"===typeof y.baseFeePerGas&&"undefined"===typeof h){let e=1500000000n;if("undefined"!==typeof d?.fees?.defaultPriorityFee&&(e="bigint"===typeof d.fees.defaultPriorityFee?d.fees.defaultPriorityFee:await d.fees.defaultPriorityFee({block:y,request:v})),"undefined"===typeof p)v.maxPriorityFeePerGas=m??e,v.maxFeePerGas=120n*y.baseFeePerGas/100n+v.maxPriorityFeePerGas;else{if("undefined"===typeof m&&p{for(const n of e){const{name:e,type:l}=n,h=l,p=t[e],m=h.match(u);if(m&&("number"===typeof p||"bigint"===typeof p)){const[e,t,n]=m;(0,s.eC)(p,{signed:"int"===t,size:parseInt(n)/8})}if("address"===h&&"string"===typeof p&&!(0,a.U)(p))throw new o.b({address:p});const b=h.match(c);if(b){const[e,t]=b;if(t&&(0,i.d)(p)!==parseInt(t))throw new r.KY({expectedSize:parseInt(t),givenSize:(0,i.d)(p)})}const g=d[h];g&&f(g,p)}};if(d.EIP712Domain&&e&&f(d.EIP712Domain,e),"EIP712Domain"!==n){const e=d[n];f(e,t)}}},6665:function(e,t,n){"use strict";n.d(t,{d:function(){return a}});var r=n(58617),o=n(60263);function a(e,t="wei"){return(0,o.b)(e,r.ez[t])}},56283:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(58617),o=n(60263);function a(e,t="wei"){return(0,o.b)(e,r.Zn[t])}},60263:function(e,t,n){"use strict";function r(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${a?`.${a}`:""}`}n.d(t,{b:function(){return r}})},22852:function(e,t,n){"use strict";function r(e,t){let[n,r="0"]=e.split(".");const o=n.startsWith("-");if(o&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${r}`))&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>t){const[e,o,a]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],i=Math.round(Number(`${o}.${a}`));r=i>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${i}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${o?"-":""}${n}${r}`)}n.d(t,{v:function(){return r}})},40482:function(e,t,n){"use strict";async function r(e){return new Promise((t=>setTimeout(t,e)))}n.d(t,{D:function(){return r}})},90696:function(e,t,n){"use strict";n.r(t),n.d(t,{bitGet:function(){return A},bitLen:function(){return E},bitMask:function(){return P},bitSet:function(){return x},bytesToHex:function(){return c},bytesToNumberBE:function(){return f},bytesToNumberLE:function(){return h},concatBytes:function(){return y},createHmacDrbg:function(){return I},ensureBytes:function(){return g},equalBytes:function(){return v},hexToBytes:function(){return d},hexToNumber:function(){return l},numberToBytesBE:function(){return p},numberToBytesLE:function(){return m},numberToHexUnpadded:function(){return u},numberToVarBytesBE:function(){return b},utf8ToBytes:function(){return w},validateObject:function(){return T}});const r=BigInt(0),o=BigInt(1),a=BigInt(2),i=e=>e instanceof Uint8Array,s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function c(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let n=0;ne+t.length),0));let n=0;return e.forEach((e=>{if(!i(e))throw new Error("Uint8Array expected");t.set(e,n),n+=e.length})),t}function v(e,t){if(e.length!==t.length)return!1;for(let n=0;nr;e>>=o,t+=1);return t}function A(e,t){return e>>BigInt(t)&o}const x=(e,t,n)=>e|(n?o:r)<(a<new Uint8Array(e),j=e=>Uint8Array.from(e);function I(e,t,n){if("number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!==typeof n)throw new Error("hmacFn must be a function");let r=C(e),o=C(e),a=0;const i=()=>{r.fill(1),o.fill(0),a=0},s=(...e)=>n(o,r,...e),c=(e=C())=>{o=s(j([0]),e),r=s(),0!==e.length&&(o=s(j([1]),e),r=s())},u=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e{let n;for(i(),c(e);!(n=t(u()));)c();return i(),n}}const O={bigint:e=>"bigint"===typeof e,function:e=>"function"===typeof e,boolean:e=>"boolean"===typeof e,string:e=>"string"===typeof e,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"===typeof e&&Number.isSafeInteger(e.outputLen)};function T(e,t,n={}){const r=(t,n,r)=>{const o=O[n];if("function"!==typeof o)throw new Error(`Invalid validator "${n}", expected function`);const a=e[t];if((!r||void 0!==a)&&!o(a,e))throw new Error(`Invalid param ${String(t)}=${a} (${typeof a}), expected ${n}`)};for(const[o,a]of Object.entries(t))r(o,a,!1);for(const[o,a]of Object.entries(n))r(o,a,!0);return e}},35133:function(e,t,n){"use strict";function r({storage:e,key:t="REACT_QUERY_OFFLINE_CACHE",throttleTime:n=1e3,serialize:r=JSON.stringify,deserialize:i=JSON.parse,retry:s}){if(e){const a=n=>{try{return void e.setItem(t,r(n))}catch(o){return o}};return{persistClient:o((e=>{let t=e,n=a(t),r=0;for(;n&&t;)r++,t=null==s?void 0:s({persistedClient:t,error:n,errorCount:r}),t&&(n=a(t))}),n),restoreClient:()=>{const n=e.getItem(t);if(n)return i(n)},removeClient:()=>{e.removeItem(t)}}}return{persistClient:a,restoreClient:()=>{},removeClient:a}}function o(e,t=100){let n,r=null;return function(...o){n=o,null===r&&(r=setTimeout((()=>{e(...n),r=null}),t))}}function a(){}n.d(t,{eM:function(){return Ce},_g:function(){return Ae},mA:function(){return Je},KQ:function(){return Ze},$4:function(){return et},do:function(){return ut},GG:function(){return dt},qL:function(){return rt},c9:function(){return ht},F6:function(){return mt},LK:function(){return We},LN:function(){return ot},M5:function(){return bt},t_:function(){return Re},pQ:function(){return yt},QW:function(){return it},g0:function(){return ct},BX:function(){return vt}});const i="undefined"===typeof window||"Deno"in window;function s(){}function c(e){return"number"===typeof e&&e>=0&&e!==1/0}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t,n){return P(e)?"function"===typeof t?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function d(e,t,n){return P(e)?"function"===typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"===typeof e?{...t,mutationFn:e}:{...e}}function f(e,t,n){return P(e)?[{...t,queryKey:e},n]:[e||{},t]}function h(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:a,queryKey:i,stale:s}=e;if(P(i))if(r){if(t.queryHash!==m(i,t.options))return!1}else if(!g(t.queryKey,i))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!==typeof s||t.isStale()===s)&&(("undefined"===typeof o||o===t.state.fetchStatus)&&!(a&&!a(t)))}function p(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:a}=e;if(P(a)){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(a))return!1}else if(!g(t.options.mutationKey,a))return!1}return("boolean"!==typeof r||"loading"===t.state.status===r)&&!(o&&!o(t))}function m(e,t){return((null==t?void 0:t.queryKeyHashFn)||b)(e)}function b(e){return JSON.stringify(e,((e,t)=>A(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function g(e,t){return y(e,t)}function y(e,t){return e===t||typeof e===typeof t&&(!(!e||!t||"object"!==typeof e||"object"!==typeof t)&&!Object.keys(t).some((n=>!y(e[n],t[n]))))}function v(e,t){if(e===t)return e;const n=E(e)&&E(t);if(n||A(e)&&A(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),a=o.length,i=n?[]:{};let s=0;for(let c=0;c{setTimeout(t,e)}))}function j(e){C(0).then(e)}function I(e,t,n){return null!=n.isDataEqual&&n.isDataEqual(e,t)?e:"function"===typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?v(e,t):t}const O=console;const T=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()};const o=r=>{t?e.push(r):j((()=>{n(r)}))},a=()=>{const t=e;e=[],t.length&&j((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||a()}return n},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e}}}();class S{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const B=new class extends S{constructor(){super(),this.setup=e=>{if(!i&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"===typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach((({listener:e})=>{e()}))}isFocused(){return"boolean"===typeof this.focused?this.focused:"undefined"===typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}},k=["online","offline"];const _=new class extends S{constructor(){super(),this.setup=e=>{if(!i&&window.addEventListener){const t=()=>e();return k.forEach((e=>{window.addEventListener(e,t,!1)})),()=>{k.forEach((e=>{window.removeEventListener(e,t)}))}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"===typeof e?this.setOnline(e):this.onOnline()}))}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach((({listener:e})=>{e()}))}isOnline(){return"boolean"===typeof this.online?this.online:"undefined"===typeof navigator||"undefined"===typeof navigator.onLine||navigator.onLine}};function N(e){return Math.min(1e3*2**e,3e4)}function M(e){return"online"!==(null!=e?e:"online")||_.isOnline()}class R{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function F(e){return e instanceof R}function U(e){let t,n,r,o=!1,a=0,i=!1;const s=new Promise(((e,t)=>{n=e,r=t})),c=()=>!B.isFocused()||"always"!==e.networkMode&&!_.isOnline(),u=r=>{i||(i=!0,null==e.onSuccess||e.onSuccess(r),null==t||t(),n(r))},l=n=>{i||(i=!0,null==e.onError||e.onError(n),null==t||t(),r(n))},d=()=>new Promise((n=>{t=e=>{const t=i||!c();return t&&n(e),t},null==e.onPause||e.onPause()})).then((()=>{t=void 0,i||null==e.onContinue||e.onContinue()})),f=()=>{if(i)return;let t;try{t=e.fn()}catch(n){t=Promise.reject(n)}Promise.resolve(t).then(u).catch((t=>{var n,r;if(i)return;const s=null!=(n=e.retry)?n:3,u=null!=(r=e.retryDelay)?r:N,h="function"===typeof u?u(a,t):u,p=!0===s||"number"===typeof s&&a{if(c())return d()})).then((()=>{o?l(t):f()}))):l(t)}))};return M(e.networkMode)?f():d().then(f),{promise:s,cancel:t=>{i||(l(new R(t)),null==e.abort||e.abort())},continue:()=>(null==t?void 0:t())?s:Promise.resolve(),cancelRetry:()=>{o=!0},continueRetry:()=>{o=!1}}}class L{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),c(this.cacheTime)&&(this.gcTimeout=setTimeout((()=>{this.optionalRemove()}),this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:i?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class D extends L{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||O,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){const t="function"===typeof e.initialData?e.initialData():e.initialData,n="undefined"!==typeof t,r=n?"function"===typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){const n=I(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;const n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(s).catch(s):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some((e=>!1!==e.options.enabled))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((e=>e.getCurrentResult().isStale))}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!u(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var n,r;if("idle"!==this.state.fetchStatus)if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return null==(o=this.retryer)||o.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}Array.isArray(this.options.queryKey);const a=function(){if("function"===typeof AbortController)return new AbortController}(),i={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};s(i);const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(i)):Promise.reject("Missing queryFn")};var u;(s(c),null==(n=this.options.behavior)||n.onFetch(c),this.revertState=this.state,"idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(r=c.fetchOptions)?void 0:r.meta))&&this.dispatch({type:"fetch",meta:null==(u=c.fetchOptions)?void 0:u.meta});const l=e=>{var t,n,r,o;(F(e)&&e.silent||this.dispatch({type:"error",error:e}),F(e))||(null==(t=(n=this.cache.config).onError)||t.call(n,e,this),null==(r=(o=this.cache.config).onSettled)||r.call(o,this.state.data,e,this));this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=U({fn:c.fetchFn,abort:null==a?void 0:a.abort.bind(a),onSuccess:e=>{var t,n,r,o;"undefined"!==typeof e?(this.setData(e),null==(t=(n=this.cache.config).onSuccess)||t.call(n,e,this),null==(r=(o=this.cache.config).onSettled)||r.call(o,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):l(new Error(this.queryHash+" data is undefined"))},onError:l,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var n,r;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(n=e.meta)?n:null,fetchStatus:M(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(r=e.dataUpdatedAt)?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return F(o)&&o.revert&&this.revertState?{...this.revertState}:{...t,error:o,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),T.batch((()=>{this.observers.forEach((t=>{t.onQueryUpdate(e)})),this.cache.notify({query:this,type:"updated",action:e})}))}}class q extends S{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,n){var r;const o=t.queryKey,a=null!=(r=t.queryHash)?r:m(o,t);let i=this.get(a);return i||(i=new D({cache:this,logger:e.getLogger(),queryKey:o,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(i)),i}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((t=>t!==e)),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){T.batch((()=>{this.queries.forEach((e=>{this.remove(e)}))}))}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){const[n]=f(e,t);return"undefined"===typeof n.exact&&(n.exact=!0),this.queries.find((e=>h(n,e)))}findAll(e,t){const[n]=f(e,t);return Object.keys(n).length>0?this.queries.filter((e=>h(n,e))):this.queries}notify(e){T.batch((()=>{this.listeners.forEach((({listener:t})=>{t(e)}))}))}onFocus(){T.batch((()=>{this.queries.forEach((e=>{e.onFocus()}))}))}onOnline(){T.batch((()=>{this.queries.forEach((e=>{e.onOnline()}))}))}}class H extends L{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||O,this.observers=[],this.state=e.state||z(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter((t=>t!==e)),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){const e=()=>{var e;return this.retryer=U({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},t="loading"===this.state.status;try{var n,r,o,a,i,s,c,u;if(!t){var l,d,f,h;this.dispatch({type:"loading",variables:this.options.variables}),await(null==(l=(d=this.mutationCache.config).onMutate)?void 0:l.call(d,this.state.variables,this));const e=await(null==(f=(h=this.options).onMutate)?void 0:f.call(h,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}const p=await e();return await(null==(n=(r=this.mutationCache.config).onSuccess)?void 0:n.call(r,p,this.state.variables,this.state.context,this)),await(null==(o=(a=this.options).onSuccess)?void 0:o.call(a,p,this.state.variables,this.state.context)),await(null==(i=(s=this.mutationCache.config).onSettled)?void 0:i.call(s,p,null,this.state.variables,this.state.context,this)),await(null==(c=(u=this.options).onSettled)?void 0:c.call(u,p,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:p}),p}catch(A){try{var p,m,b,g,y,v,w,E;throw await(null==(p=(m=this.mutationCache.config).onError)?void 0:p.call(m,A,this.state.variables,this.state.context,this)),await(null==(b=(g=this.options).onError)?void 0:b.call(g,A,this.state.variables,this.state.context)),await(null==(y=(v=this.mutationCache.config).onSettled)?void 0:y.call(v,void 0,A,this.state.variables,this.state.context,this)),await(null==(w=(E=this.options).onSettled)?void 0:w.call(E,void 0,A,this.state.variables,this.state.context)),A}finally{this.dispatch({type:"error",error:A})}}}dispatch(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!M(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...t,...e.state}}})(this.state),T.batch((()=>{this.observers.forEach((t=>{t.onMutationUpdate(e)})),this.mutationCache.notify({mutation:this,type:"updated",action:e})}))}}function z(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class G extends S{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,n){const r=new H({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(r),r}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter((t=>t!==e)),this.notify({type:"removed",mutation:e})}clear(){T.batch((()=>{this.mutations.forEach((e=>{this.remove(e)}))}))}getAll(){return this.mutations}find(e){return"undefined"===typeof e.exact&&(e.exact=!0),this.mutations.find((t=>p(e,t)))}findAll(e){return this.mutations.filter((t=>p(e,t)))}notify(e){T.batch((()=>{this.listeners.forEach((({listener:t})=>{t(e)}))}))}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then((()=>{const e=this.mutations.filter((e=>e.state.isPaused));return T.batch((()=>e.reduce(((e,t)=>e.then((()=>t.continue().catch(s)))),Promise.resolve())))})).then((()=>{this.resuming=void 0})),this.resuming}}function $(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,a,i;const s=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,c=null==(r=e.fetchOptions)||null==(o=r.meta)?void 0:o.fetchMore,u=null==c?void 0:c.pageParam,l="forward"===(null==c?void 0:c.direction),d="backward"===(null==c?void 0:c.direction),f=(null==(a=e.state.data)?void 0:a.pages)||[],h=(null==(i=e.state.data)?void 0:i.pageParams)||[];let p=h,m=!1;const b=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),g=(e,t,n,r)=>(p=r?[t,...p]:[...p,t],r?[n,...e]:[...e,n]),y=(t,n,r,o)=>{if(m)return Promise.reject("Cancelled");if("undefined"===typeof r&&!n&&t.length)return Promise.resolve(t);const a={queryKey:e.queryKey,pageParam:r,meta:e.options.meta};var i;i=a,Object.defineProperty(i,"signal",{enumerable:!0,get:()=>{var t,n;return null!=(t=e.signal)&&t.aborted?m=!0:null==(n=e.signal)||n.addEventListener("abort",(()=>{m=!0})),e.signal}});const s=b(a);return Promise.resolve(s).then((e=>g(t,r,e,o)))};let v;if(f.length)if(l){const t="undefined"!==typeof u,n=t?u:W(e.options,f);v=y(f,t,n)}else if(d){const t="undefined"!==typeof u,n=t?u:K(e.options,f);v=y(f,t,n,!0)}else{p=[];const t="undefined"===typeof e.options.getNextPageParam;v=!s||!f[0]||s(f[0],0,f)?y([],t,h[0]):Promise.resolve(g([],h[0],f[0]));for(let n=1;n{if(!s||!f[n]||s(f[n],n,f)){const o=t?h[n]:W(e.options,r);return y(r,t,o)}return Promise.resolve(g(r,h[n],f[n]))}))}else v=y([]);return v.then((e=>({pages:e,pageParams:p})))}}}}function W(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function K(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}class Q{constructor(e={}){this.queryCache=e.queryCache||new q,this.mutationCache=e.mutationCache||new G,this.logger=e.logger||O,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=B.subscribe((()=>{B.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())})),this.unsubscribeOnline=_.subscribe((()=>{_.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())})))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=f(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const r=l(e,t,n),o=this.getQueryData(r.queryKey);return o?Promise.resolve(o):this.fetchQuery(r)}getQueriesData(e){return this.getQueryCache().findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.queryCache.find(e),o=function(e,t){return"function"===typeof e?e(t):e}(t,null==r?void 0:r.state.data);if("undefined"===typeof o)return;const a=l(e),i=this.defaultQueryOptions(a);return this.queryCache.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return T.batch((()=>this.getQueryCache().findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){const[n]=f(e,t),r=this.queryCache;T.batch((()=>{r.findAll(n).forEach((e=>{r.remove(e)}))}))}resetQueries(e,t,n){const[r,o]=f(e,t,n),a=this.queryCache,i={type:"active",...r};return T.batch((()=>(a.findAll(r).forEach((e=>{e.reset()})),this.refetchQueries(i,o))))}cancelQueries(e,t,n){const[r,o={}]=f(e,t,n);"undefined"===typeof o.revert&&(o.revert=!0);const a=T.batch((()=>this.queryCache.findAll(r).map((e=>e.cancel(o)))));return Promise.all(a).then(s).catch(s)}invalidateQueries(e,t,n){const[r,o]=f(e,t,n);return T.batch((()=>{var e,t;if(this.queryCache.findAll(r).forEach((e=>{e.invalidate()})),"none"===r.refetchType)return Promise.resolve();const n={...r,type:null!=(e=null!=(t=r.refetchType)?t:r.type)?e:"active"};return this.refetchQueries(n,o)}))}refetchQueries(e,t,n){const[r,o]=f(e,t,n),a=T.batch((()=>this.queryCache.findAll(r).filter((e=>!e.isDisabled())).map((e=>{var t;return e.fetch(void 0,{...o,cancelRefetch:null==(t=null==o?void 0:o.cancelRefetch)||t,meta:{refetchPage:r.refetchPage}})}))));let i=Promise.all(a).then(s);return null!=o&&o.throwOnError||(i=i.catch(s)),i}fetchQuery(e,t,n){const r=l(e,t,n),o=this.defaultQueryOptions(r);"undefined"===typeof o.retry&&(o.retry=!1);const a=this.queryCache.build(this,o);return a.isStaleByTime(o.staleTime)?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(s).catch(s)}fetchInfiniteQuery(e,t,n){const r=l(e,t,n);return r.behavior=$(),this.fetchQuery(r)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(s).catch(s)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find((t=>b(e)===b(t.queryKey)));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find((t=>g(e,t.queryKey)));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find((t=>b(e)===b(t.mutationKey)));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find((t=>g(e,t.mutationKey)));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=m(t.queryKey,t)),"undefined"===typeof t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),"undefined"===typeof t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}function V(e){return e.state.isPaused}function J(e){return"success"===e.state.status}function Y(e,t={}){const n=[],r=[];if(!1!==t.dehydrateMutations){const r=t.shouldDehydrateMutation||V;e.getMutationCache().getAll().forEach((e=>{r(e)&&n.push(function(e){return{mutationKey:e.options.mutationKey,state:e.state}}(e))}))}if(!1!==t.dehydrateQueries){const n=t.shouldDehydrateQuery||J;e.getQueryCache().getAll().forEach((e=>{n(e)&&r.push(function(e){return{state:e.state,queryKey:e.queryKey,queryHash:e.queryHash}}(e))}))}return{mutations:n,queries:r}}const Z=["added","removed","updated"];function X(e){return Z.includes(e)}async function ee({queryClient:e,persister:t,buster:n="",dehydrateOptions:r}){const o={buster:n,timestamp:Date.now(),clientState:Y(e,r)};await t.persistClient(o)}function te(e){let t,n=!1;const r=async function({queryClient:e,persister:t,maxAge:n=864e5,buster:r="",hydrateOptions:o}){try{const a=await t.restoreClient();if(a)if(a.timestamp){const i=Date.now()-a.timestamp>n,s=a.buster!==r;i||s?t.removeClient():function(e,t,n){if("object"!==typeof t||null===t)return;const r=e.getMutationCache(),o=e.getQueryCache(),a=t.mutations||[],i=t.queries||[];a.forEach((t=>{var o;r.build(e,{...null==n||null==(o=n.defaultOptions)?void 0:o.mutations,mutationKey:t.mutationKey},t.state)})),i.forEach((t=>{var r;const a=o.get(t.queryHash),i={...t.state,fetchStatus:"idle"};a?a.state.dataUpdatedAt{n||(t=function(e){const t=e.queryClient.getQueryCache().subscribe((t=>{X(t.type)&&ee(e)})),n=e.queryClient.getMutationCache().subscribe((t=>{X(t.type)&&ee(e)}));return()=>{t(),n()}}(e))}));return[()=>{n=!0,null==t||t()},r]}var ne=n(94077),re=n(67294);const oe=re.createContext(void 0),ae=re.createContext(!1);function ie(e,t){return e||(t&&"undefined"!==typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=oe),window.ReactQueryClientContext):oe)}const se=({context:e}={})=>{const t=re.useContext(ie(e,re.useContext(ae)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ce=({client:e,children:t,context:n,contextSharing:r=!1})=>{re.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]);const o=ie(n,r);return re.createElement(ae.Provider,{value:!n&&r},re.createElement(o.Provider,{value:e},t))},ue=re.createContext(!1);ue.Provider;function le(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const de=re.createContext(le());var fe=n(61688);const he=fe.useSyncExternalStore;class pe extends S{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=this.client.defaultMutationOptions(e),w(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.currentMutation)||e.removeObserver(this))}onMutationUpdate(e){this.updateResult();const t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:"undefined"!==typeof e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0},t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){T.batch((()=>{var t,n,r,o;if(this.mutateOptions&&this.hasListeners())if(e.onSuccess)null==(t=(n=this.mutateOptions).onSuccess)||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(r=(o=this.mutateOptions).onSettled)||r.call(o,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context);else if(e.onError){var a,i,s,c;null==(a=(i=this.mutateOptions).onError)||a.call(i,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(s=(c=this.mutateOptions).onSettled)||s.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}e.listeners&&this.listeners.forEach((({listener:e})=>{e(this.currentResult)}))}))}}function me(){}class be extends S{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),ge(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ye(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ye(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),w(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),"undefined"!==typeof this.options.enabled&&"boolean"!==typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const o=this.hasListeners();o&&ve(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();const a=this.computeRefetchInterval();!o||this.currentQuery===r&&this.options.enabled===n.enabled&&a===this.currentRefetchInterval||this.updateRefetchInterval(a)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e);return this.createResult(t,e)}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach((n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})})),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,t);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,t)))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then((()=>(this.updateResult(),this.currentResult)))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(s)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),i||this.currentResult.isStale||!c(this.options.staleTime))return;const e=u(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((()=>{this.currentResult.isStale||this.updateResult()}),e)}computeRefetchInterval(){var e;return"function"===typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!i&&!1!==this.options.enabled&&c(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((()=>{(this.options.refetchIntervalInBackground||B.isFocused())&&this.executeFetch()}),this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const n=this.currentQuery,r=this.options,o=this.currentResult,a=this.currentResultState,i=this.currentResultOptions,s=e!==n,c=s?e.state:this.currentQueryInitialState,u=s?this.currentResult:this.previousQueryResult,{state:l}=e;let d,{dataUpdatedAt:f,error:h,errorUpdatedAt:p,fetchStatus:m,status:b}=l,g=!1,y=!1;if(t._optimisticResults){const o=this.hasListeners(),a=!o&&ge(e,t),i=o&&ve(e,n,t,r);(a||i)&&(m=M(e.options.networkMode)?"fetching":"paused",f||(b="loading")),"isRestoring"===t._optimisticResults&&(m="idle")}if(t.keepPreviousData&&!l.dataUpdatedAt&&null!=u&&u.isSuccess&&"error"!==b)d=u.data,f=u.dataUpdatedAt,b=u.status,g=!0;else if(t.select&&"undefined"!==typeof l.data)if(o&&l.data===(null==a?void 0:a.data)&&t.select===this.selectFn)d=this.selectResult;else try{this.selectFn=t.select,d=t.select(l.data),d=I(null==o?void 0:o.data,d,t),this.selectResult=d,this.selectError=null}catch(A){0,this.selectError=A}else d=l.data;if("undefined"!==typeof t.placeholderData&&"undefined"===typeof d&&"loading"===b){let e;if(null!=o&&o.isPlaceholderData&&t.placeholderData===(null==i?void 0:i.placeholderData))e=o.data;else if(e="function"===typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&"undefined"!==typeof e)try{e=t.select(e),this.selectError=null}catch(A){0,this.selectError=A}"undefined"!==typeof e&&(b="success",d=I(null==o?void 0:o.data,e,t),y=!0)}this.selectError&&(h=this.selectError,d=this.selectResult,p=Date.now(),b="error");const v="fetching"===m,w="loading"===b,E="error"===b;return{status:b,fetchStatus:m,isLoading:w,isSuccess:"success"===b,isError:E,isInitialLoading:w&&v,data:d,dataUpdatedAt:f,error:h,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>c.dataUpdateCount||l.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!w,isLoadingError:E&&0===l.dataUpdatedAt,isPaused:"paused"===m,isPlaceholderData:y,isPreviousData:g,isRefetchError:E&&0!==l.dataUpdatedAt,isStale:we(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,w(n,t))return;this.currentResult=n;const r={cache:!0};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options;if("all"===e||!e&&!this.trackedProps.size)return!0;const n=new Set(null!=e?e:this.trackedProps);return this.options.useErrorBoundary&&n.add("error"),Object.keys(this.currentResult).some((e=>{const r=e;return this.currentResult[r]!==t[r]&&n.has(r)}))})()&&(r.listeners=!0),this.notify({...r,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};"success"===e.type?t.onSuccess=!e.manual:"error"!==e.type||F(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){T.batch((()=>{var t,n,r,o;if(e.onSuccess)null==(t=(n=this.options).onSuccess)||t.call(n,this.currentResult.data),null==(r=(o=this.options).onSettled)||r.call(o,this.currentResult.data,null);else if(e.onError){var a,i,s,c;null==(a=(i=this.options).onError)||a.call(i,this.currentResult.error),null==(s=(c=this.options).onSettled)||s.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach((({listener:e})=>{e(this.currentResult)})),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})}))}}function ge(e,t){return function(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&ye(e,t,t.refetchOnMount)}function ye(e,t,n){if(!1!==t.enabled){const r="function"===typeof n?n(e):n;return"always"===r||!1!==r&&we(e,t)}return!1}function ve(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&we(e,n)}function we(e,t){return e.isStaleByTime(t.staleTime)}var Ee=n(52798);function Ae({queryClient:e=new Q({defaultOptions:{queries:{cacheTime:864e5,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),storage:t=(0,ne.o6)({storage:"undefined"!==typeof window&&window.localStorage?window.localStorage:ne.wp}),persister:n=("undefined"!==typeof window?r({key:"cache",storage:t,serialize:e=>e,deserialize:e=>e}):void 0),...o}){const a=(0,ne._g)({...o,storage:t});return n&&te({queryClient:e,persister:n,dehydrateOptions:{shouldDehydrateQuery:e=>0!==e.cacheTime&&!1!==e.queryKey[0].persist}}),Object.assign(a,{queryClient:e})}var xe=re.createContext(void 0),Pe=re.createContext(void 0);function Ce({children:e,config:t}){return re.createElement(xe.Provider,{children:re.createElement(ce,{children:e,client:t.queryClient,context:Pe}),value:t})}function je(){const e=re.useContext(xe);if(!e)throw new Error(["`useConfig` must be used within `WagmiConfig`.\n","Read more: https://wagmi.sh/react/WagmiConfig"].join("\n"));return e}var Ie=fe.useSyncExternalStore;function Oe(e){return"[object Object]"===Object.prototype.toString.call(e)}function Te(e,t,n){return r=e,Array.isArray(r)?"function"===typeof t?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e;var r}function Se(e){return JSON.stringify(e,((e,t)=>function(e){if(!Oe(e))return!1;const t=e.constructor;if("undefined"===typeof t)return!0;const n=t.prototype;return!!Oe(n)&&!!n.hasOwnProperty("isPrototypeOf")}(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):"bigint"===typeof t?t.toString():t))}function Be(e,t){const n={};return Object.keys(e).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(t.trackedProps.add(r),e[r])})})),n}function ke(e,t){const n=se({context:e.context}),r=re.useContext(ue),o=re.useContext(de),a=n.defaultQueryOptions({...e,queryKeyHashFn:Se});a._optimisticResults=r?"isRestoring":"optimistic",a.onError&&(a.onError=T.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=T.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=T.batchCalls(a.onSettled)),a.suspense&&"number"!==typeof a.staleTime&&(a.staleTime=1e3),(a.suspense||a.useErrorBoundary)&&(o.isReset()||(a.retryOnMount=!1));const[i]=re.useState((()=>new t(n,a))),s=i.getOptimisticResult(a);if(Ie(re.useCallback((e=>r?()=>{}:i.subscribe(T.batchCalls(e))),[i,r]),(()=>i.getCurrentResult()),(()=>i.getCurrentResult())),re.useEffect((()=>{o.clearReset()}),[o]),re.useEffect((()=>{i.setOptions(a,{listeners:!1})}),[a,i]),a.suspense&&s.isLoading&&s.isFetching&&!r)throw i.fetchOptimistic(a).then((({data:e})=>{a.onSuccess?.(e),a.onSettled?.(e,null)})).catch((e=>{o.clearReset(),a.onError?.(e),a.onSettled?.(void 0,e)}));if(s.isError&&!o.isReset()&&!s.isFetching&&(c=a.useErrorBoundary,u=[s.error,i.getCurrentQuery()],"function"===typeof c?c(...u):c))throw s.error;var c,u;const l="loading"===s.status&&"idle"===s.fetchStatus?"idle":s.status,d="idle"===l,f="loading"===l&&"fetching"===s.fetchStatus;return{...s,defaultedOptions:a,isIdle:d,isLoading:f,observer:i,status:l}}function _e(e,t,n){const r=d(e,t,n);return function(e,t,n){const r=d(e,t,n),o=se({context:r.context}),[a]=re.useState((()=>new pe(o,r)));re.useEffect((()=>{a.setOptions(r)}),[a,r]);const i=he(re.useCallback((e=>a.subscribe(T.batchCalls(e))),[a]),(()=>a.getCurrentResult()),(()=>a.getCurrentResult())),s=re.useCallback(((e,t)=>{a.mutate(e,t).catch(me)}),[a]);if(i.error&&(c=a.options.useErrorBoundary,u=[i.error],"function"===typeof c?c(...u):c))throw i.error;var c,u;return{...i,mutate:s,mutateAsync:i.mutate}}({context:Pe,...r})}function Ne(e,t,n){const r=Te(e,t,n),o=ke({context:Pe,...r},be),a={data:o.data,error:o.error,fetchStatus:o.fetchStatus,isError:o.isError,isFetched:o.isFetched,isFetchedAfterMount:o.isFetchedAfterMount,isFetching:o.isFetching,isIdle:o.isIdle,isLoading:o.isLoading,isRefetching:o.isRefetching,isSuccess:o.isSuccess,refetch:o.refetch,status:o.status,internal:{dataUpdatedAt:o.dataUpdatedAt,errorUpdatedAt:o.errorUpdatedAt,failureCount:o.failureCount,isFetchedAfterMount:o.isFetchedAfterMount,isLoadingError:o.isLoadingError,isPaused:o.isPaused,isPlaceholderData:o.isPlaceholderData,isPreviousData:o.isPreviousData,isRefetchError:o.isRefetchError,isStale:o.isStale,remove:o.remove}};return o.defaultedOptions.notifyOnChangeProps?a:Be(a,o.observer)}var Me=()=>se({context:Pe});function Re({chainId:e}={}){return(0,Ee.useSyncExternalStoreWithSelector)((t=>(0,ne.pC)({chainId:e},t)),(()=>(0,ne.uV)({chainId:e})),(()=>(0,ne.uV)({chainId:e})),(e=>e),((e,t)=>e.uid===t.uid))}function Fe({chainId:e}){return[{entity:"walletClient",chainId:e,persist:!1}]}function Ue({queryKey:[{chainId:e}]}){return(0,ne.xz)({chainId:e})}function Le({chainId:e,suspense:t,onError:n,onSettled:r,onSuccess:o}={}){const{connector:a}=Je(),i=qe({chainId:e}),s=Ne(Fe({chainId:i}),Ue,{cacheTime:0,enabled:Boolean(a),staleTime:1/0,suspense:t,onError:n,onSettled:r,onSuccess:o}),c=Me();return re.useEffect((()=>(0,ne.Tb)({chainId:i},(e=>{e?c.invalidateQueries(Fe({chainId:i})):c.removeQueries(Fe({chainId:i}))}))),[c,i]),s}function De({chainId:e}={}){return(0,Ee.useSyncExternalStoreWithSelector)((t=>(0,ne.fq)({chainId:e},t)),(()=>(0,ne.jr)({chainId:e})),(()=>(0,ne.jr)({chainId:e})),(e=>e),((e,t)=>e?.uid===t?.uid))}function qe({chainId:e}={}){return Re({chainId:e}).chain.id}function He({chainId:e,scopeKey:t}){return[{entity:"blockNumber",chainId:e,scopeKey:t}]}function ze({queryKey:[{chainId:e}]}){return(0,ne.RQ)({chainId:e})}function Ge({cacheTime:e=0,chainId:t,enabled:n=!0,scopeKey:r,staleTime:o,suspense:a,watch:i=!1,onBlock:s,onError:c,onSettled:u,onSuccess:l}={}){const d=qe({chainId:t}),f=Re({chainId:d}),h=De({chainId:d}),p=Me();return re.useEffect((()=>{if(!n)return;if(!i&&!s)return;return(h??f).watchBlockNumber({onBlockNumber:e=>{i&&p.setQueryData(He({chainId:d,scopeKey:r}),e),s&&s(e)},emitOnBegin:!0})}),[d,r,s,f,p,i,h,n]),Ne(He({scopeKey:r,chainId:d}),ze,{cacheTime:e,enabled:n,staleTime:o,suspense:a,onError:c,onSettled:u,onSuccess:l})}function $e({queryKey:[{chainId:e,formatUnits:t}]}){return(0,ne.jS)({chainId:e,formatUnits:t})}function We({cacheTime:e,chainId:t,enabled:n=!0,formatUnits:r="gwei",scopeKey:o,staleTime:a,suspense:i,watch:s,onError:c,onSettled:u,onSuccess:l}={}){const d=qe({chainId:t}),f=re.useMemo((()=>function({chainId:e,formatUnits:t,scopeKey:n}){return[{entity:"feeData",chainId:e,formatUnits:t,scopeKey:n}]}({chainId:d,formatUnits:r,scopeKey:o})),[d,r,o]),h=Ne(f,$e,{cacheTime:e,enabled:n,staleTime:a,suspense:i,onError:c,onSettled:u,onSuccess:l});return Ke({chainId:d,enabled:Boolean(n&&s),queryKey:f}),h}function Ke({chainId:e,enabled:t,queryKey:n}){const r=Me(),o=re.useCallback((()=>r.invalidateQueries({queryKey:n},{cancelRefetch:!1})),[r,n]);Ge({chainId:e,enabled:t,onBlock:t?o:void 0,scopeKey:t?void 0:"idle"})}var Qe=e=>"object"===typeof e&&!Array.isArray(e);function Ve(e,t,n=t,r=ne.vZ){const o=re.useRef([]),a=(0,Ee.useSyncExternalStoreWithSelector)(e,t,n,(e=>e),((e,t)=>{if(Qe(e)&&Qe(t)&&o.current.length){for(const n of o.current){if(!r(e[n],t[n]))return!1}return!0}return r(e,t)}));if(Qe(a)){const e={...a};return Object.defineProperties(e,Object.entries(e).reduce(((e,[t,n])=>({...e,[t]:{configurable:!1,enumerable:!0,get:()=>(o.current.includes(t)||o.current.push(t),n)}})),{})),e}return a}function Je({onConnect:e,onDisconnect:t}={}){const n=je(),r=Ve(re.useCallback((e=>(0,ne.uH)(e)),[n]),ne.D0),o=re.useRef(),a=o.current;return re.useEffect((()=>{"connected"!==a?.status&&"connected"===r.status&&e?.({address:r.address,connector:r.connector,isReconnected:"reconnecting"===a?.status||void 0===a?.status}),"connected"===a?.status&&"disconnected"===r.status&&t?.(),o.current=r}),[e,t,a,r]),r}function Ye({queryKey:[{address:e,chainId:t,formatUnits:n,token:r}]}){if(!e)throw new Error("address is required");return(0,ne.EG)({address:e,chainId:t,formatUnits:n,token:r})}function Ze({address:e,cacheTime:t,chainId:n,enabled:r=!0,formatUnits:o,scopeKey:a,staleTime:i,suspense:s,token:c,watch:u,onError:l,onSettled:d,onSuccess:f}={}){const h=qe({chainId:n}),p=re.useMemo((()=>function({address:e,chainId:t,formatUnits:n,scopeKey:r,token:o}){return[{entity:"balance",address:e,chainId:t,formatUnits:n,scopeKey:r,token:o}]}({address:e,chainId:h,formatUnits:o,scopeKey:a,token:c})),[e,h,o,a,c]),m=Ne(p,Ye,{cacheTime:t,enabled:Boolean(r&&e),staleTime:i,suspense:s,onError:l,onSettled:d,onSuccess:f});return Ke({chainId:h,enabled:Boolean(r&&u&&e),queryKey:p}),m}var Xe=e=>{const{connector:t,chainId:n}=e;if(!t)throw new Error("connector is required");return(0,ne.$j)({connector:t,chainId:n})};function et({chainId:e,connector:t,onError:n,onMutate:r,onSettled:o,onSuccess:a}={}){const i=je(),{data:s,error:c,isError:u,isIdle:l,isLoading:d,isSuccess:f,mutate:h,mutateAsync:p,reset:m,status:b,variables:g}=_e((y={connector:t,chainId:e},[{entity:"connect",...y}]),Xe,{onError:n,onMutate:r,onSettled:o,onSuccess:a});var y;const v=re.useCallback((n=>h({chainId:n?.chainId??e,connector:n?.connector??t})),[e,t,h]),w=re.useCallback((n=>p({chainId:n?.chainId??e,connector:n?.connector??t})),[e,t,p]);return{connect:v,connectAsync:w,connectors:i.connectors,data:s,error:c,isError:u,isIdle:l,isLoading:d,isSuccess:f,pendingConnector:g?.connector,reset:m,status:b,variables:g}}var tt=[{entity:"disconnect"}],nt=()=>(0,ne.zP)();function rt({onError:e,onMutate:t,onSettled:n,onSuccess:r}={}){const{error:o,isError:a,isIdle:i,isLoading:s,isSuccess:c,mutate:u,mutateAsync:l,reset:d,status:f}=_e(tt,nt,{...e?{onError(t,n,r){e(t,r)}}:{},onMutate:t,...n?{onSettled(e,t,r,o){n(t,o)}}:{},...r?{onSuccess(e,t,n){r(n)}}:{}});return{disconnect:u,disconnectAsync:l,error:o,isError:a,isIdle:i,isLoading:s,isSuccess:c,reset:d,status:f}}function ot(){const e=je();return Ve((0,re.useCallback)((e=>(0,ne.QC)(e)),[e]),ne.Hy)}var at=e=>{const{message:t}=e;if(!t)throw new Error("message is required");return(0,ne.l)({message:t})};function it({message:e,onError:t,onMutate:n,onSettled:r,onSuccess:o}={}){const{data:a,error:i,isError:s,isIdle:c,isLoading:u,isSuccess:l,mutate:d,mutateAsync:f,reset:h,status:p,variables:m}=_e((b={message:e},[{entity:"signMessage",...b}]),at,{onError:t,onMutate:n,onSettled:r,onSuccess:o});var b;const g=re.useCallback((t=>d(t||{message:e})),[e,d]),y=re.useCallback((t=>f(t||{message:e})),[e,f]);return{data:a,error:i,isError:s,isIdle:c,isLoading:u,isSuccess:l,reset:h,signMessage:g,signMessageAsync:y,status:p,variables:m}}var st=e=>{const{chainId:t}=e;if(!t)throw new Error("chainId is required");return(0,ne.If)({chainId:t})};function ct({chainId:e,throwForSwitchChainNotSupported:t,onError:n,onMutate:r,onSettled:o,onSuccess:a}={}){const i=je(),s=function(){const[,e]=re.useReducer((e=>e+1),0);return e}(),{data:c,error:u,isError:l,isIdle:d,isLoading:f,isSuccess:h,mutate:p,mutateAsync:m,reset:b,status:g,variables:y}=_e((v={chainId:e},[{entity:"switchNetwork",...v}]),st,{onError:n,onMutate:r,onSettled:o,onSuccess:a});var v;const w=re.useCallback((t=>p({chainId:t??e})),[e,p]),E=re.useCallback((t=>m({chainId:t??e})),[e,m]);let A,x;re.useEffect((()=>i.subscribe((({chains:e,connector:t})=>({chains:e,connector:t})),s)),[i,s]);const P=!!i.connector?.switchChain;return(t||P)&&(A=w,x=E),{chains:i.chains??[],data:c,error:u,isError:l,isIdle:d,isLoading:f,isSuccess:h,pendingChainId:y?.chainId,reset:b,status:g,switchNetwork:A,switchNetworkAsync:x,variables:y}}function ut({abi:e,address:t,account:n,args:r,blockNumber:o,blockTag:a,cacheOnBlock:i=!1,cacheTime:s,chainId:c,enabled:u=!0,functionName:l,isDataEqual:d,keepPreviousData:f,onError:h,onSettled:p,onSuccess:m,scopeKey:b,select:g,staleTime:y,structuralSharing:w=((e,t)=>(0,ne.vZ)(e,t)?e:v(e,t)),suspense:E,watch:A}={}){const x=qe({chainId:c}),{data:P}=Ge({chainId:x,enabled:A||i,scopeKey:A||i?void 0:"idle",watch:A}),C=o??P,j=re.useMemo((()=>function({account:e,address:t,args:n,blockNumber:r,blockTag:o,chainId:a,functionName:i,scopeKey:s}){return[{entity:"readContract",account:e,address:t,args:n,blockNumber:r,blockTag:o,chainId:a,functionName:i,scopeKey:s}]}({account:n,address:t,args:r,blockNumber:i?C:void 0,blockTag:a,chainId:x,functionName:l,scopeKey:b})),[n,t,r,C,a,i,x,l,b]),I=re.useMemo((()=>{let n=Boolean(u&&e&&t&&l);return i&&(n=Boolean(n&&C)),n}),[e,t,C,i,u,l]);return Ke({chainId:x,enabled:Boolean(I&&A&&!i),queryKey:j}),Ne(j,function({abi:e}){return async({queryKey:[{account:t,address:n,args:r,blockNumber:o,blockTag:a,chainId:i,functionName:s}]})=>{if(!e)throw new Error("abi is required");if(!n)throw new Error("address is required");return await(0,ne.a4)({account:t,address:n,args:r,blockNumber:o,blockTag:a,chainId:i,abi:e,functionName:s})??null}}({abi:e}),{cacheTime:s,enabled:I,isDataEqual:d,keepPreviousData:f,select:g,staleTime:y,structuralSharing:w,suspense:E,onError:h,onSettled:p,onSuccess:m})}function lt(e){if("prepared"===e.mode){if(!e.request)throw new Error("request is required");return(0,ne.n9)({mode:"prepared",request:e.request})}if(!e.address)throw new Error("address is required");if(!e.abi)throw new Error("abi is required");if(!e.functionName)throw new Error("functionName is required");return(0,ne.n9)({address:e.address,args:e.args,chainId:e.chainId,abi:e.abi,functionName:e.functionName,accessList:e.accessList,account:e.account,gas:e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce,value:e.value})}function dt(e){const{address:t,abi:n,args:r,chainId:o,functionName:a,mode:i,request:s}=e,{accessList:c,account:u,gas:l,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:h,nonce:p,value:m}=(0,ne.gY)(e),{data:b,error:g,isError:y,isIdle:v,isLoading:w,isSuccess:E,mutate:A,mutateAsync:x,reset:P,status:C,variables:j}=_e(function({address:e,abi:t,functionName:n,...r}){const{args:o,accessList:a,account:i,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,request:f,value:h}=r;return[{entity:"writeContract",address:e,args:o,abi:t,accessList:a,account:i,functionName:n,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,request:f,value:h}]}({address:t,abi:n,functionName:a,chainId:o,mode:i,args:r,accessList:c,account:u,gas:l,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:h,nonce:p,request:s,value:m}),lt,{onError:e.onError,onMutate:e.onMutate,onSettled:e.onSettled,onSuccess:e.onSuccess});return{data:b,error:g,isError:y,isIdle:v,isLoading:w,isSuccess:E,reset:P,status:C,variables:j,write:re.useMemo((()=>{if("prepared"===e.mode){if(!s)return;return()=>A({mode:"prepared",request:e.request,chainId:e.chainId})}return e=>A({address:t,args:r,abi:n,functionName:a,chainId:o,accessList:c,account:u,gas:l,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:h,nonce:p,value:m,...e})}),[c,u,n,t,r,o,e.chainId,e.mode,e.request,a,l,d,f,h,A,p,s,m]),writeAsync:re.useMemo((()=>{if("prepared"===e.mode){if(!s)return;return()=>x({mode:"prepared",request:e.request})}return e=>x({address:t,args:r,abi:n,chainId:o,functionName:a,accessList:c,account:u,gas:l,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:h,nonce:p,value:m,...e})}),[c,u,n,t,r,o,e.mode,e.request,a,l,d,f,h,x,p,s,m])}}function ft({queryKey:[{name:e,chainId:t}]}){if(!e)throw new Error("name is required");return(0,ne.w6)({name:e,chainId:t})}function ht({cacheTime:e,chainId:t,enabled:n=!0,name:r,scopeKey:o,staleTime:a=864e5,suspense:i,onError:s,onSettled:c,onSuccess:u}={}){const l=qe({chainId:t});return Ne(function({name:e,chainId:t,scopeKey:n}){return[{entity:"ensAvatar",name:e,chainId:t,scopeKey:n}]}({name:r,chainId:l,scopeKey:o}),ft,{cacheTime:e,enabled:Boolean(n&&r&&l),staleTime:a,suspense:i,onError:s,onSettled:c,onSuccess:u})}function pt({queryKey:[{address:e,chainId:t}]}){if(!e)throw new Error("address is required");return(0,ne.Lk)({address:e,chainId:t})}function mt({address:e,cacheTime:t,chainId:n,enabled:r=!0,scopeKey:o,staleTime:a=864e5,suspense:i,onError:s,onSettled:c,onSuccess:u}={}){const l=qe({chainId:n});return Ne(function({address:e,chainId:t,scopeKey:n}){return[{entity:"ensName",address:e,chainId:t,scopeKey:n}]}({address:e,chainId:l,scopeKey:o}),pt,{cacheTime:t,enabled:Boolean(r&&e&&l),staleTime:a,suspense:i,onError:s,onSettled:c,onSuccess:u})}function bt({accessList:e,account:t,chainId:n,cacheTime:r,data:o,enabled:a=!0,gas:i,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:l,scopeKey:d,staleTime:f,suspense:h,to:p,value:m,onError:b,onSettled:g,onSuccess:y}={}){const{chain:v}=ot(),{data:w}=Le({chainId:n}),E=Ne(function({accessList:e,account:t,activeChainId:n,chainId:r,data:o,gas:a,gasPrice:i,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:d,scopeKey:f,walletClientAddress:h}){return[{entity:"prepareSendTransaction",activeChainId:n,accessList:e,account:t,chainId:r,data:o,gas:a,gasPrice:i,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:d,scopeKey:f,walletClientAddress:h}]}({accessList:e,activeChainId:v?.id,account:t,chainId:n,data:o,gas:i,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:l,scopeKey:d,to:p,value:m,walletClientAddress:w?.account.address}),function({walletClient:e}){return({queryKey:[{accessList:t,account:n,chainId:r,data:o,gas:a,gasPrice:i,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:d}]})=>{if(!l)throw new Error("to is required");return(0,ne.uw)({accessList:t,account:n,chainId:r,data:o,gas:a,gasPrice:i,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:d,walletClient:e})}}({walletClient:w}),{cacheTime:r,enabled:Boolean(a&&w&&p),staleTime:f,suspense:h,onError:b,onSettled:g,onSuccess:y});return Object.assign(E,{config:{mode:"prepared",...E.isSuccess?E.data:void 0}})}var gt=({accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,to:l,value:d})=>{if(!l)throw new Error("to is required.");return(0,ne.T7)({accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,to:l,value:d})};function yt({accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,to:l,value:d,onError:f,onMutate:h,onSettled:p,onSuccess:m}={}){const{data:b,error:g,isError:y,isIdle:v,isLoading:w,isSuccess:E,mutate:A,mutateAsync:x,reset:P,status:C,variables:j}=_e((I={accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,to:l,value:d},[{entity:"sendTransaction",...I}]),gt,{onError:f,onMutate:h,onSettled:p,onSuccess:m});var I;const O=re.useCallback((f=>A({chainId:n,mode:c,...f||{accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,value:d,to:l}})),[e,t,n,r,o,a,i,s,c,A,u,l,d]),T=re.useCallback((f=>x({chainId:n,mode:c,...f||{accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,value:d,to:l}})),[e,t,n,r,o,a,i,s,c,x,u,l,d]);return{data:b,error:g,isError:y,isIdle:v,isLoading:w,isSuccess:E,reset:P,sendTransaction:"prepared"!==c||l?O:void 0,sendTransactionAsync:"prepared"!==c||l?T:void 0,status:C,variables:j}}function vt({chainId:e,confirmations:t,hash:n,timeout:r,cacheTime:o,enabled:a=!0,scopeKey:i,staleTime:s,suspense:c,onError:u,onReplaced:l,onSettled:d,onSuccess:f}={}){return Ne(function({confirmations:e,chainId:t,hash:n,scopeKey:r,timeout:o}){return[{entity:"waitForTransaction",confirmations:e,chainId:t,hash:n,scopeKey:r,timeout:o}]}({chainId:qe({chainId:e}),confirmations:t,hash:n,scopeKey:i,timeout:r}),function({onReplaced:e}){return({queryKey:[{chainId:t,confirmations:n,hash:r,timeout:o}]})=>{if(!r)throw new Error("hash is required");return(0,ne.Mn)({chainId:t,confirmations:n,hash:r,onReplaced:e,timeout:o})}}({onReplaced:l}),{cacheTime:o,enabled:Boolean(a&&n),staleTime:s,suspense:c,onError:u,onSettled:d,onSuccess:f})}},64122:function(e){"use strict";e.exports=JSON.parse('{"name":"@safe-global/safe-apps-sdk","version":"8.1.0","description":"SDK developed to integrate third-party apps with Safe app.","main":"dist/src/index.js","typings":"dist/src/index.d.ts","_files":["dist/**/*","src/**/*","CHANGELOG.md","README.md"],"sideEffects":false,"keywords":["Safe","sdk","apps"],"scripts":{"test":"jest","format-dist":"sed -i \'\' \'s/\\"files\\":/\\"_files\\":/\' dist/package.json","build":"yarn rimraf dist && tsc && yarn format-dist"},"author":"Safe (https://safe.global)","license":"MIT","dependencies":{"@safe-global/safe-gateway-typescript-sdk":"^3.5.3","viem":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/safe-global/safe-apps-sdk.git"},"bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","publishConfig":{"access":"public"}}')}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],(function(){return t(6840),t(61587)}));var n=e.O();_N_E=n}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{1074:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_BASE_URL=void 0,t.DEFAULT_BASE_URL="https://safe-client.safe.global"},76287:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEndpoint=t.postEndpoint=void 0;const r=n(59136);function o(e,t,n,o){return`${e}${(0,r.insertParams)(t,n)}${(0,r.stringifyQuery)(o)}`}t.postEndpoint=function(e,t,n){const a=o(e,t,null===n||void 0===n?void 0:n.path,null===n||void 0===n?void 0:n.query);return(0,r.fetchData)(a,null===n||void 0===n?void 0:n.body)},t.getEndpoint=function(e,t,n,a){if(a)return(0,r.fetchData)(a);const i=o(e,t,null===n||void 0===n?void 0:n.path,null===n||void 0===n?void 0:n.query);return(0,r.fetchData)(i)}},18831:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.confirmSafeMessage=t.proposeSafeMessage=t.getSafeMessage=t.getSafeMessages=t.getDecodedData=t.getMasterCopies=t.getSafeApps=t.getChainConfig=t.getChainsConfig=t.proposeTransaction=t.postSafeGasEstimation=t.getTransactionDetails=t.getTransactionQueue=t.getTransactionHistory=t.getCollectiblesPage=t.getCollectibles=t.getOwnedSafes=t.getFiatCurrencies=t.getBalances=t.getMultisigTransactions=t.getModuleTransactions=t.getIncomingTransfers=t.getSafeInfo=t.setBaseUrl=void 0;const a=n(76287),i=n(1074);o(n(32733),t),o(n(22394),t),o(n(17584),t),o(n(28996),t),o(n(23075),t),o(n(80247),t),o(n(83571),t),o(n(43150),t);let s=i.DEFAULT_BASE_URL;t.setBaseUrl=e=>{s=e},t.getSafeInfo=function(e,t){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:e,address:t}})},t.getIncomingTransfers=function(e,t,n,r){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:e,address:t},query:n},r)},t.getModuleTransactions=function(e,t,n,r){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:e,address:t},query:n},r)},t.getMultisigTransactions=function(e,t,n,r){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:e,address:t},query:n},r)},t.getBalances=function(e,t,n="usd",r={}){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:e,address:t,currency:n},query:r})},t.getFiatCurrencies=function(){return(0,a.getEndpoint)(s,"/v1/balances/supported-fiat-codes")},t.getOwnedSafes=function(e,t){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:e,address:t}})},t.getCollectibles=function(e,t,n={}){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:n})},t.getCollectiblesPage=function(e,t,n={},r){return(0,a.getEndpoint)(s,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:n},r)},t.getTransactionHistory=function(e,t,n){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:e,safe_address:t},query:{}},n)},t.getTransactionQueue=function(e,t,n,r){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:e,safe_address:t},query:{trusted:r}},n)},t.getTransactionDetails=function(e,t){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:e,transactionId:t}})},t.postSafeGasEstimation=function(e,t,n){return(0,a.postEndpoint)(s,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:e,safe_address:t},body:n})},t.proposeTransaction=function(e,t,n){return(0,a.postEndpoint)(s,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:e,safe_address:t},body:n})},t.getChainsConfig=function(e){return(0,a.getEndpoint)(s,"/v1/chains",{query:e})},t.getChainConfig=function(e){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}",{path:{chainId:e}})},t.getSafeApps=function(e,t={}){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safe-apps",{path:{chainId:e},query:t})},t.getMasterCopies=function(e){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:e}})},t.getDecodedData=function(e,t){return(0,a.postEndpoint)(s,"/v1/chains/{chainId}/data-decoder",{path:{chainId:e},body:{data:t}})},t.getSafeMessages=function(e,t,n){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},query:{}},n)},t.getSafeMessage=function(e,t){return(0,a.getEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:e,message_hash:t}})},t.proposeSafeMessage=function(e,t,n){return(0,a.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},body:n})},t.confirmSafeMessage=function(e,t,n){return(0,a.postEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:e,message_hash:t},body:n})}},28996:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FEATURES=t.GAS_PRICE_TYPE=t.RPC_AUTHENTICATION=void 0,function(e){e.API_KEY_PATH="API_KEY_PATH",e.NO_AUTHENTICATION="NO_AUTHENTICATION",e.UNKNOWN="UNKNOWN"}(t.RPC_AUTHENTICATION||(t.RPC_AUTHENTICATION={})),function(e){e.ORACLE="ORACLE",e.FIXED="FIXED",e.UNKNOWN="UNKNOWN"}(t.GAS_PRICE_TYPE||(t.GAS_PRICE_TYPE={})),function(e){e.ERC721="ERC721",e.SAFE_APPS="SAFE_APPS",e.CONTRACT_INTERACTION="CONTRACT_INTERACTION",e.DOMAIN_LOOKUP="DOMAIN_LOOKUP",e.SPENDING_LIMIT="SPENDING_LIMIT",e.EIP1559="EIP1559",e.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",e.TX_SIMULATION="TX_SIMULATION",e.EIP1271="EIP1271"}(t.FEATURES||(t.FEATURES={}))},23075:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenType=void 0,function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_TOKEN="NATIVE_TOKEN"}(t.TokenType||(t.TokenType={}))},83571:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},80247:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22394:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeAppSocialPlatforms=t.SafeAppFeatures=t.SafeAppAccessPolicyTypes=void 0,function(e){e.NoRestrictions="NO_RESTRICTIONS",e.DomainAllowlist="DOMAIN_ALLOWLIST"}(t.SafeAppAccessPolicyTypes||(t.SafeAppAccessPolicyTypes={})),function(e){e.BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS"}(t.SafeAppFeatures||(t.SafeAppFeatures={})),function(e){e.TWITTER="TWITTER",e.GITHUB="GITHUB",e.DISCORD="DISCORD"}(t.SafeAppSocialPlatforms||(t.SafeAppSocialPlatforms={}))},32733:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationVersionState=void 0,function(e){e.UP_TO_DATE="UP_TO_DATE",e.OUTDATED="OUTDATED",e.UNKNOWN="UNKNOWN"}(t.ImplementationVersionState||(t.ImplementationVersionState={}))},43150:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeMessageStatus=t.SafeMessageListItemType=void 0,function(e){e.DATE_LABEL="DATE_LABEL",e.MESSAGE="MESSAGE"}(t.SafeMessageListItemType||(t.SafeMessageListItemType={})),function(e){e.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",e.CONFIRMED="CONFIRMED"}(t.SafeMessageStatus||(t.SafeMessageStatus={}))},17584:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LabelValue=t.DetailedExecutionInfoType=t.TransactionListItemType=t.ConflictType=t.TransactionInfoType=t.SettingsInfoType=t.TransactionTokenType=t.TransferDirection=t.TransactionStatus=t.Operation=void 0,function(e){e[e.CALL=0]="CALL",e[e.DELEGATE=1]="DELEGATE"}(t.Operation||(t.Operation={})),function(e){e.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",e.AWAITING_EXECUTION="AWAITING_EXECUTION",e.CANCELLED="CANCELLED",e.FAILED="FAILED",e.SUCCESS="SUCCESS"}(t.TransactionStatus||(t.TransactionStatus={})),function(e){e.INCOMING="INCOMING",e.OUTGOING="OUTGOING",e.UNKNOWN="UNKNOWN"}(t.TransferDirection||(t.TransferDirection={})),function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_COIN="NATIVE_COIN"}(t.TransactionTokenType||(t.TransactionTokenType={})),function(e){e.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",e.ADD_OWNER="ADD_OWNER",e.REMOVE_OWNER="REMOVE_OWNER",e.SWAP_OWNER="SWAP_OWNER",e.CHANGE_THRESHOLD="CHANGE_THRESHOLD",e.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",e.ENABLE_MODULE="ENABLE_MODULE",e.DISABLE_MODULE="DISABLE_MODULE",e.SET_GUARD="SET_GUARD",e.DELETE_GUARD="DELETE_GUARD"}(t.SettingsInfoType||(t.SettingsInfoType={})),function(e){e.TRANSFER="Transfer",e.SETTINGS_CHANGE="SettingsChange",e.CUSTOM="Custom",e.CREATION="Creation"}(t.TransactionInfoType||(t.TransactionInfoType={})),function(e){e.NONE="None",e.HAS_NEXT="HasNext",e.END="End"}(t.ConflictType||(t.ConflictType={})),function(e){e.TRANSACTION="TRANSACTION",e.LABEL="LABEL",e.CONFLICT_HEADER="CONFLICT_HEADER",e.DATE_LABEL="DATE_LABEL"}(t.TransactionListItemType||(t.TransactionListItemType={})),function(e){e.MULTISIG="MULTISIG",e.MODULE="MODULE"}(t.DetailedExecutionInfoType||(t.DetailedExecutionInfoType={})),function(e){e.Queued="Queued",e.Next="Next"}(t.LabelValue||(t.LabelValue={}))},59136:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchData=t.stringifyQuery=t.insertParams=void 0;const a=o(n(54098));t.insertParams=function(e,t){return t?Object.keys(t).reduce(((e,n)=>function(e,t,n){return e.replace(new RegExp(`\\{${t}\\}`,"g"),n)}(e,n,String(t[n]))),e):e},t.stringifyQuery=function(e){if(!e)return"";const t=new URLSearchParams;Object.keys(e).forEach((n=>{null!=e[n]&&t.append(n,String(e[n]))}));const n=t.toString();return n?`?${n}`:""},t.fetchData=function(e,t){return r(this,void 0,void 0,(function*(){let n;null!=t&&(n={method:"POST",body:"string"===typeof t?t:JSON.stringify(t),headers:{"Content-Type":"application/json"}});const r=yield(0,a.default)(e,n);let o;try{o=yield r.json()}catch(s){if(r.headers&&"0"!==r.headers.get("content-length"))throw new Error(`Invalid response content: ${r.statusText}`)}if(!r.ok){const e="object"===typeof(i=o)&&null!==i&&"code"in i&&"message"in i?`${o.code}: ${o.message}`:r.statusText;throw new Error(e)}var i;return o}))}},98099:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(97117);function o(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function a(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function i(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function s(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function c(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function u(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function l(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function d(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function f(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),l(e/4294967296>>>0,t,n),l(e>>>0,t,n+4),t}function h(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),d(e>>>0,t,n),d(e/4294967296>>>0,t,n+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=o,t.writeInt16BE=o,t.writeUint16LE=a,t.writeInt16LE=a,t.readInt32BE=i,t.readUint32BE=s,t.readInt32LE=c,t.readUint32LE=u,t.writeUint32BE=l,t.writeInt32BE=l,t.writeUint32LE=d,t.writeInt32LE=d,t.readInt64BE=function(e,t){void 0===t&&(t=0);var n=i(e,t),r=i(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*s(e,t)+s(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var n=c(e,t);return 4294967296*c(e,t+4)+n-4294967296*(n>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var n=u(e,t);return 4294967296*u(e,t+4)+n},t.writeUint64BE=f,t.writeInt64BE=f,t.writeUint64LE=h,t.writeInt64LE=h,t.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,o=1,a=e/8+n-1;a>=n;a--)r+=t[a]*o,o*=256;return r},t.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,o=1,a=n;a=o;i--)n[i]=t/a&255,a*=256;return n},t.writeUintLE=function(e,t,n,o){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===o&&(o=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!r.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var a=1,i=o;i>>16|k<<16)|0)>>>20|P<<12,C=(C^=T=T+(_=(_^=E=E+C|0)>>>16|_<<16)|0)>>>20|C<<12,j=(j^=S=S+(N=(N^=A=A+j|0)>>>16|N<<16)|0)>>>20|j<<12,I=(I^=B=B+(M=(M^=x=x+I|0)>>>16|M<<16)|0)>>>20|I<<12,j=(j^=S=S+(N=(N^=A=A+j|0)>>>24|N<<8)|0)>>>25|j<<7,I=(I^=B=B+(M=(M^=x=x+I|0)>>>24|M<<8)|0)>>>25|I<<7,C=(C^=T=T+(_=(_^=E=E+C|0)>>>24|_<<8)|0)>>>25|C<<7,P=(P^=O=O+(k=(k^=w=w+P|0)>>>24|k<<8)|0)>>>25|P<<7,C=(C^=S=S+(M=(M^=w=w+C|0)>>>16|M<<16)|0)>>>20|C<<12,j=(j^=B=B+(k=(k^=E=E+j|0)>>>16|k<<16)|0)>>>20|j<<12,I=(I^=O=O+(_=(_^=A=A+I|0)>>>16|_<<16)|0)>>>20|I<<12,P=(P^=T=T+(N=(N^=x=x+P|0)>>>16|N<<16)|0)>>>20|P<<12,I=(I^=O=O+(_=(_^=A=A+I|0)>>>24|_<<8)|0)>>>25|I<<7,P=(P^=T=T+(N=(N^=x=x+P|0)>>>24|N<<8)|0)>>>25|P<<7,j=(j^=B=B+(k=(k^=E=E+j|0)>>>24|k<<8)|0)>>>25|j<<7,C=(C^=S=S+(M=(M^=w=w+C|0)>>>24|M<<8)|0)>>>25|C<<7;r.writeUint32LE(w+o|0,e,0),r.writeUint32LE(E+a|0,e,4),r.writeUint32LE(A+i|0,e,8),r.writeUint32LE(x+s|0,e,12),r.writeUint32LE(P+c|0,e,16),r.writeUint32LE(C+u|0,e,20),r.writeUint32LE(j+l|0,e,24),r.writeUint32LE(I+d|0,e,28),r.writeUint32LE(O+f|0,e,32),r.writeUint32LE(T+h|0,e,36),r.writeUint32LE(S+p|0,e,40),r.writeUint32LE(B+m|0,e,44),r.writeUint32LE(k+b|0,e,48),r.writeUint32LE(_+g|0,e,52),r.writeUint32LE(N+y|0,e,56),r.writeUint32LE(M+v|0,e,60)}function i(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=i,t.stream=function(e,t,n,r){return void 0===r&&(r=0),o.wipe(n),i(e,t,n,n,r)}},15501:function(e,t,n){"use strict";var r=n(25439),o=n(63027),a=n(17309),i=n(98099),s=n(4153);t.Cv=32,t.WH=12,t.pg=16;var c=new Uint8Array(16),u=function(){function e(e){if(this.nonceLength=t.WH,this.tagLength=t.pg,e.length!==t.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,n,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var i=new Uint8Array(16);i.set(e,i.length-e.length);var s=new Uint8Array(32);r.stream(this._key,i,s,4);var c,u=t.length+this.tagLength;if(o){if(o.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=o}else c=new Uint8Array(u);return r.streamXOR(this._key,i,t,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),s,c.subarray(0,c.length-this.tagLength),n),a.wipe(i),c},e.prototype.open=function(e,t,n,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length0&&s.update(c.subarray(r.length%16))),s.update(n),n.length%16>0&&s.update(c.subarray(n.length%16));var u=new Uint8Array(8);r&&i.writeUint64LE(r.length,u),s.update(u),i.writeUint64LE(n.length,u),s.update(u);for(var l=s.digest(),d=0;d>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,n){return~(e-1)&t|e-1&n},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=n,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==n(e,t)}},79984:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return"undefined"!==typeof e.saveState&&"undefined"!==typeof e.restoreState&&"undefined"!==typeof e.cleanSavedState}},512:function(e,t,n){"use strict";var r=n(25629),o=n(17309),a=function(){function e(e,t,n,o){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=o;var a=r.hmac(this._hash,n,t);this._hmac=new r.HMAC(e,a),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;nthis.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var o=0;o>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},63027:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4153),o=n(17309);t.DIGEST_LENGTH=16;var a=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=e[0]|e[1]<<8;this._r[0]=8191&n;var r=e[2]|e[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var o=e[4]|e[5]<<8;this._r[2]=7939&(r>>>10|o<<6);var a=e[6]|e[7]<<8;this._r[3]=8191&(o>>>7|a<<9);var i=e[8]|e[9]<<8;this._r[4]=255&(a>>>4|i<<12),this._r[5]=i>>>1&8190;var s=e[10]|e[11]<<8;this._r[6]=8191&(i>>>14|s<<2);var c=e[12]|e[13]<<8;this._r[7]=8065&(s>>>11|c<<5);var u=e[14]|e[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,o=this._h[0],a=this._h[1],i=this._h[2],s=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],d=this._h[7],f=this._h[8],h=this._h[9],p=this._r[0],m=this._r[1],b=this._r[2],g=this._r[3],y=this._r[4],v=this._r[5],w=this._r[6],E=this._r[7],A=this._r[8],x=this._r[9];n>=16;){var P=e[t+0]|e[t+1]<<8;o+=8191&P;var C=e[t+2]|e[t+3]<<8;a+=8191&(P>>>13|C<<3);var j=e[t+4]|e[t+5]<<8;i+=8191&(C>>>10|j<<6);var I=e[t+6]|e[t+7]<<8;s+=8191&(j>>>7|I<<9);var O=e[t+8]|e[t+9]<<8;c+=8191&(I>>>4|O<<12),u+=O>>>1&8191;var T=e[t+10]|e[t+11]<<8;l+=8191&(O>>>14|T<<2);var S=e[t+12]|e[t+13]<<8;d+=8191&(T>>>11|S<<5);var B=e[t+14]|e[t+15]<<8,k=0,_=k;_+=o*p,_+=a*(5*x),_+=i*(5*A),_+=s*(5*E),k=(_+=c*(5*w))>>>13,_&=8191,_+=u*(5*v),_+=l*(5*y),_+=d*(5*g),_+=(f+=8191&(S>>>8|B<<8))*(5*b);var N=k+=(_+=(h+=B>>>5|r)*(5*m))>>>13;N+=o*m,N+=a*p,N+=i*(5*x),N+=s*(5*A),k=(N+=c*(5*E))>>>13,N&=8191,N+=u*(5*w),N+=l*(5*v),N+=d*(5*y),N+=f*(5*g),k+=(N+=h*(5*b))>>>13,N&=8191;var M=k;M+=o*b,M+=a*m,M+=i*p,M+=s*(5*x),k=(M+=c*(5*A))>>>13,M&=8191,M+=u*(5*E),M+=l*(5*w),M+=d*(5*v),M+=f*(5*y);var R=k+=(M+=h*(5*g))>>>13;R+=o*g,R+=a*b,R+=i*m,R+=s*p,k=(R+=c*(5*x))>>>13,R&=8191,R+=u*(5*A),R+=l*(5*E),R+=d*(5*w),R+=f*(5*v);var F=k+=(R+=h*(5*y))>>>13;F+=o*y,F+=a*g,F+=i*b,F+=s*m,k=(F+=c*p)>>>13,F&=8191,F+=u*(5*x),F+=l*(5*A),F+=d*(5*E),F+=f*(5*w);var U=k+=(F+=h*(5*v))>>>13;U+=o*v,U+=a*y,U+=i*g,U+=s*b,k=(U+=c*m)>>>13,U&=8191,U+=u*p,U+=l*(5*x),U+=d*(5*A),U+=f*(5*E);var L=k+=(U+=h*(5*w))>>>13;L+=o*w,L+=a*v,L+=i*y,L+=s*g,k=(L+=c*b)>>>13,L&=8191,L+=u*m,L+=l*p,L+=d*(5*x),L+=f*(5*A);var D=k+=(L+=h*(5*E))>>>13;D+=o*E,D+=a*w,D+=i*v,D+=s*y,k=(D+=c*g)>>>13,D&=8191,D+=u*b,D+=l*m,D+=d*p,D+=f*(5*x);var q=k+=(D+=h*(5*A))>>>13;q+=o*A,q+=a*E,q+=i*w,q+=s*v,k=(q+=c*y)>>>13,q&=8191,q+=u*g,q+=l*b,q+=d*m,q+=f*p;var H=k+=(q+=h*(5*x))>>>13;H+=o*x,H+=a*A,H+=i*E,H+=s*w,k=(H+=c*v)>>>13,H&=8191,H+=u*y,H+=l*g,H+=d*b,H+=f*m,o=_=8191&(k=(k=((k+=(H+=h*p)>>>13)<<2)+k|0)+(_&=8191)|0),a=N+=k>>>=13,i=M&=8191,s=R&=8191,c=F&=8191,u=U&=8191,l=L&=8191,d=D&=8191,f=q&=8191,h=H&=8191,t+=16,n-=16}this._h[0]=o,this._h[1]=a,this._h[2]=i,this._h[3]=s,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=d,this._h[8]=f,this._h[9]=h},e.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,o,a,i=new Uint16Array(10);if(this._leftover){for(a=this._leftover,this._buffer[a++]=1;a<16;a++)this._buffer[a]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,a=2;a<10;a++)this._h[a]+=n,n=this._h[a]>>>13,this._h[a]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,i[0]=this._h[0]+5,n=i[0]>>>13,i[0]&=8191,a=1;a<10;a++)i[a]=this._h[a]+n,n=i[a]>>>13,i[a]&=8191;for(i[9]-=8192,r=(1^n)-1,a=0;a<10;a++)i[a]&=r;for(r=~r,a=0;a<10;a++)this._h[a]=this._h[a]&r|i[a];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),o=this._h[0]+this._pad[0],this._h[0]=65535&o,a=1;a<8;a++)o=(this._h[a]+this._pad[a]|0)+(o>>>16)|0,this._h[a]=65535&o;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var o=0;o=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(o=0;o256)throw new Error("randomString charset is too long");let o="";const c=n.length,u=256-256%c;for(;e>0;){const t=i(Math.ceil(256*e/u),r);for(let r=0;r0;r++){const a=t[r];a0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=s(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,n=this._bufferLength,o=t/536870912|0,a=t<<3,i=t%64<56?64:128;this._buffer[n]=128;for(var c=n+1;c0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){o.wipe(e.state),e.buffer&&o.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.mE=a;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function s(e,t,n,o,a){for(;a>=64;){for(var s=t[0],c=t[1],u=t[2],l=t[3],d=t[4],f=t[5],h=t[6],p=t[7],m=0;m<16;m++){var b=o+4*m;e[m]=r.readUint32BE(n,b)}for(m=16;m<64;m++){var g=e[m-2],y=(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10,v=((g=e[m-15])>>>7|g<<25)^(g>>>18|g<<14)^g>>>3;e[m]=(y+e[m-7]|0)+(v+e[m-16]|0)}for(m=0;m<64;m++){y=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&f^~d&h)|0)+(p+(i[m]+e[m]|0)|0)|0,v=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&c^s&u^c&u)|0;p=h,h=f,f=d,d=l+y|0,l=u,u=c,c=s,s=y+v|0}t[0]+=s,t[1]+=c,t[2]+=u,t[3]+=l,t[4]+=d,t[5]+=f,t[6]+=h,t[7]+=p,o+=64,a-=64}return o}t.vp=function(e){var t=new a;t.update(e);var n=t.digest();return t.clean(),n}},17309:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t=0;--a){const e=n[a>>>3]>>>(7&a)&1;u(o,i,e),u(p,m,e),l(b,o,p),d(o,o,p),l(p,i,m),d(i,i,m),h(m,b),h(g,o),f(o,p,o),f(p,i,b),l(b,o,p),d(o,o,p),h(i,o),d(p,m,g),f(o,p,s),l(o,o,m),f(p,p,o),f(o,m,g),f(m,i,r),h(i,b),u(o,i,e),u(p,m,e)}for(let a=0;a<16;a++)r[a+16]=o[a],r[a+32]=p[a],r[a+48]=i[a],r[a+64]=m[a];const y=r.subarray(32),v=r.subarray(16);!function(e,t){const n=a();for(let r=0;r<16;r++)n[r]=t[r];for(let r=253;r>=0;r--)h(n,n),2!==r&&4!==r&&f(n,n,t);for(let r=0;r<16;r++)e[r]=n[r]}(y,y),f(v,v,y);const w=new Uint8Array(32);return function(e,t){const n=a(),r=a();for(let o=0;o<16;o++)r[o]=t[o];c(r),c(r),c(r);for(let o=0;o<2;o++){n[0]=r[0]-65517;for(let t=1;t<15;t++)n[t]=r[t]-65535-(n[t-1]>>16&1),n[t-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,u(r,n,1-e)}for(let o=0;o<16;o++)e[2*o]=255&r[o],e[2*o+1]=r[o]>>8}(w,v),w}function m(e){return p(e,i)}function b(e){if(e.length!==t.KS)throw new Error(`x25519: seed must be ${t.KS} bytes`);const n=new Uint8Array(e);return{publicKey:m(n),secretKey:n}}t.Au=function(e){const t=(0,r.randomBytes)(32,e),n=b(t);return(0,o.wipe)(t),n},t.gi=function(e,n,r=!1){if(e.length!==t.kz)throw new Error("X25519: incorrect secret key length");if(n.length!==t.kz)throw new Error("X25519: incorrect public key length");const o=p(e,n);if(r){let e=0;for(let t=0;t(e&&(e.hash=n[0]),e)));case"eth_getTransactionReceipt":{let e=n[0];try{e=(await this.sdk.txs.getBySafeTxHash(e)).txHash||e}catch(r){}return this.sdk.eth.getTransactionReceipt([e]).then((e=>(e&&(e.transactionHash=n[0]),e)))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(n[0]);case"eth_call":return this.sdk.eth.call([n[0],n[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([n[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(n[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([n[0]]);default:throw Error(`"${e.method}" not implemented`)}}send(e,t){e||t("Undefined request"),this.request(e).then((n=>t(null,{jsonrpc:"2.0",id:e.id,result:n}))).catch((e=>t(e,null)))}}t.SafeAppProvider=a},63045:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLowerCase=void 0,t.getLowerCase=function(e){return e?e.toLowerCase():e}},74372:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0});const a=n(76995);t.default=class{constructor(e=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer="undefined"===typeof window,this.isValidMessage=({origin:e,data:t,source:n})=>{const r=!t,o=!this.isServer&&n===window.parent,a=("undefined"!==typeof t.version&&parseInt(t.version.split(".")[0]))>=1;let i=!0;return Array.isArray(this.allowedOrigins)&&(i=void 0!==this.allowedOrigins.find((t=>t.test(e)))),!r&&o&&a&&i},this.logIncomingMessage=e=>{console.info(`Safe Apps SDK v1: A message was received from origin ${e.origin}. `,e.data)},this.onParentMessage=e=>{this.isValidMessage(e)&&(this.debugMode&&this.logIncomingMessage(e),this.handleIncomingMessage(e.data))},this.handleIncomingMessage=e=>{const{id:t}=e,n=this.callbacks.get(t);n&&(n(e),this.callbacks.delete(t))},this.send=(e,t)=>{const n=a.MessageFormatter.makeRequest(e,t);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(n,"*"),new Promise(((e,t)=>{this.callbacks.set(n.id,(n=>{n.success?e(n):t(new Error(n.error))}))}))},this.allowedOrigins=e,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}},o(n(39972),t)},76995:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFormatter=void 0;const r=n(27899),o=n(22451);class a{}t.MessageFormatter=a,a.makeRequest=(e,t)=>({id:(0,o.generateRequestId)(),method:e,params:t,env:{sdkVersion:(0,r.getSDKVersion)()}}),a.makeResponse=(e,t,n)=>({id:e,success:!0,version:n,data:t}),a.makeErrorResponse=(e,t,n)=>({id:e,success:!1,error:t,version:n})},39972:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RestrictedMethods=t.Methods=void 0,function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage",e.signTypedMessage="signTypedMessage",e.getEnvironmentInfo="getEnvironmentInfo",e.getOffChainSignature="getOffChainSignature",e.requestAddressBook="requestAddressBook",e.wallet_getPermissions="wallet_getPermissions",e.wallet_requestPermissions="wallet_requestPermissions"}(t.Methods||(t.Methods={})),function(e){e.requestAddressBook="requestAddressBook"}(t.RestrictedMethods||(t.RestrictedMethods={}))},22451:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRequestId=void 0;const n=e=>e.toString(16).padStart(2,"0");t.generateRequestId=()=>"undefined"!==typeof window?(e=>{const t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,n).join("")})(10):(new Date).getTime().toString(36)},86444:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(97071),o=n(98443),a=(e,t)=>t.some((t=>t.parentCapability===e));t.default=()=>(e,t,n)=>{const i=n.value;return n.value=async function(){const e=new r.Wallet(this.communicator);let n=await e.getPermissions();if(a(t,n)||(n=await e.requestPermissions([{[t]:{}}])),!a(t,n))throw new o.PermissionsError("Permissions rejected",o.PERMISSIONS_REQUEST_REJECTED);return i.apply(this)},n}},68193:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPC_CALLS=void 0,t.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"}},14204:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eth=void 0;const r=n(68193),o=n(39972),a={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};t.Eth=class{constructor(e){this.communicator=e,this.call=this.buildRequest({call:r.RPC_CALLS.eth_call,formatters:[null,a.defaultBlockParam]}),this.getBalance=this.buildRequest({call:r.RPC_CALLS.eth_getBalance,formatters:[null,a.defaultBlockParam]}),this.getCode=this.buildRequest({call:r.RPC_CALLS.eth_getCode,formatters:[null,a.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:r.RPC_CALLS.eth_getStorageAt,formatters:[null,a.blockNumberToHex,a.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:r.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:r.RPC_CALLS.eth_getBlockByHash,formatters:[null,a.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:r.RPC_CALLS.eth_getBlockByNumber,formatters:[a.blockNumberToHex,a.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:r.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:r.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:r.RPC_CALLS.eth_getTransactionCount,formatters:[null,a.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:r.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=e=>this.buildRequest({call:r.RPC_CALLS.eth_estimateGas})([e]),this.setSafeSettings=this.buildRequest({call:r.RPC_CALLS.safe_setSettings})}buildRequest(e){const{call:t,formatters:n}=e;return async e=>{n&&Array.isArray(e)&&n.forEach(((t,n)=>{t&&(e[n]=t(e[n]))}));const r={call:t,params:e||[]};return(await this.communicator.send(o.Methods.rpcCall,r)).data}}}},42691:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;const i=a(n(78697));t.default=i.default,o(n(78697),t),o(n(43416),t),o(n(39972),t),o(n(76995),t);var s=n(27899);Object.defineProperty(t,"getSDKVersion",{enumerable:!0,get:function(){return s.getSDKVersion}})},68996:function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Safe=void 0;const a=n(68995),i=n(4994),s=n(39972),c=n(68193),u=n(43416),l=o(n(86444));class d{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(s.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(s.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(s.Methods.getSafeBalances,{currency:e})).data}async check1271Signature(e,t="0x"){const n=await this.getInfo(),r=(0,a.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,t]}),o={call:c.RPC_CALLS.eth_call,params:[{to:n.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(s.Methods.rpcCall,o)).data.slice(0,10).toLowerCase()===i.MAGIC_VALUE}catch(u){return!1}}async check1271SignatureBytes(e,t="0x"){const n=await this.getInfo(),r=(0,a.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,t]}),o={call:c.RPC_CALLS.eth_call,params:[{to:n.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(s.Methods.rpcCall,o)).data.slice(0,10).toLowerCase()===i.MAGIC_VALUE_BYTES}catch(u){return!1}}calculateMessageHash(e){return(0,a.hashMessage)(e)}calculateTypedMessageHash(e){const t="object"===typeof e.domain.chainId?e.domain.chainId.toNumber():Number(e.domain.chainId);let n=e.primaryType;if(!n){const t=Object.values(e.types),r=Object.keys(e.types).filter((e=>t.every((t=>t.every((({type:t})=>t.replace("[","").replace("]","")!==e))))));if(0===r.length||r.length>1)throw new Error("Please specify primaryType");n=r[0]}return(0,a.hashTypedData)({message:e.message,domain:Object.assign(Object.assign({},e.domain),{chainId:t,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt}),types:e.types,primaryType:n})}async getOffChainSignature(e){return(await this.communicator.send(s.Methods.getOffChainSignature,e)).data}async isMessageSigned(e,t="0x"){let n;if("string"===typeof e&&(n=async()=>{const n=this.calculateMessageHash(e);return await this.isMessageHashSigned(n,t)}),(0,u.isObjectEIP712TypedData)(e)&&(n=async()=>{const n=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(n,t)}),n){return await n()}throw new Error("Invalid message type")}async isMessageHashSigned(e,t="0x"){const n=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const r of n){if(await r(e,t))return!0}return!1}async getEnvironmentInfo(){return(await this.communicator.send(s.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(s.Methods.requestAddressBook,void 0)).data}}r([(0,l.default)()],d.prototype,"requestAddressBook",null),t.Safe=d},4994:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAGIC_VALUE_BYTES=t.MAGIC_VALUE=void 0;t.MAGIC_VALUE="0x1626ba7e";t.MAGIC_VALUE_BYTES="0x20c13b0b"},78697:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(74372)),a=n(18097),i=n(14204),s=n(68996),c=n(97071);t.default=class{constructor(e={}){const{allowedDomains:t=null,debug:n=!1}=e;this.communicator=new o.default(t,n),this.eth=new i.Eth(this.communicator),this.txs=new a.TXs(this.communicator),this.safe=new s.Safe(this.communicator),this.wallet=new c.Wallet(this.communicator)}}},18097:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TXs=void 0;const r=n(39972),o=n(43416);t.TXs=class{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(r.Methods.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const t={message:e};return(await this.communicator.send(r.Methods.signMessage,t)).data}async signTypedMessage(e){if(!(0,o.isObjectEIP712TypedData)(e))throw new Error("Invalid typed data");return(await this.communicator.send(r.Methods.signTypedMessage,{typedData:e})).data}async send({txs:e,params:t}){if(!e||!e.length)throw new Error("No transactions were passed");const n={txs:e,params:t};return(await this.communicator.send(r.Methods.sendTransactions,n)).data}}},31418:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransferDirection=t.TransactionStatus=t.TokenType=t.Operation=void 0;var r=n(18831);Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return r.Operation}}),Object.defineProperty(t,"TokenType",{enumerable:!0,get:function(){return r.TokenType}}),Object.defineProperty(t,"TransactionStatus",{enumerable:!0,get:function(){return r.TransactionStatus}}),Object.defineProperty(t,"TransferDirection",{enumerable:!0,get:function(){return r.TransferDirection}})},43416:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(27806),t),o(n(4806),t),o(n(31418),t),o(n(52310),t)},52310:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(39972)},98443:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionsError=t.PERMISSIONS_REQUEST_REJECTED=void 0,t.PERMISSIONS_REQUEST_REJECTED=4001;class n extends Error{constructor(e,t,r){super(e),this.code=t,this.data=r,Object.setPrototypeOf(this,n.prototype)}}t.PermissionsError=n},4806:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27806:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObjectEIP712TypedData=void 0;t.isObjectEIP712TypedData=e=>"object"===typeof e&&null!=e&&"domain"in e&&"types"in e&&"message"in e},27899:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;const o=r(n(64122));t.getSDKVersion=()=>o.default.version.split("-")[0]},97071:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;const r=n(39972),o=n(98443);t.Wallet=class{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(r.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new o.PermissionsError("Permissions request is invalid",o.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(r.Methods.wallet_requestPermissions,e)).data}catch(t){throw new o.PermissionsError("Permissions rejected",o.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(e){return e.every((e=>"object"===typeof e&&Object.keys(e).every((e=>!!Object.values(r.RestrictedMethods).includes(e)))))}}},16987:function(e,t,n){"use strict";n.d(t,{AW:function(){return B},rV:function(){return N},gn:function(){return we},H1:function(){return pe},hF:function(){return me},WG:function(){return D},pe:function(){return H},m$:function(){return F},vB:function(){return z},HI:function(){return q},E0:function(){return Ae},Gq:function(){return ye},$0:function(){return le},Z4:function(){return ge},Bv:function(){return Me},Au:function(){return M},jd:function(){return R},gu:function(){return O},D:function(){return ce},Z7:function(){return Ze},cO:function(){return je},_H:function(){return Ce},fc:function(){return We},D6:function(){return Xe},Hh:function(){return Pe},Ym:function(){return U},rj:function(){return L},jU:function(){return ie},gp:function(){return Ke},rF:function(){return Ot},Bw:function(){return Ee},UG:function(){return oe},xW:function(){return ct},b$:function(){return ae},Ih:function(){return at},h1:function(){return ut},Q8:function(){return W},o8:function(){return nt},qt:function(){return et},Dd:function(){return lt},$t:function(){return Et},nf:function(){return Pt},Q0:function(){return vt},in:function(){return bt},p8:function(){return Ct},sI:function(){return It},al:function(){return jt},L5:function(){return tt},EJ:function(){return wt},Z2:function(){return gt},PM:function(){return yt},hH:function(){return At},ON:function(){return St},n:function(){return mt},JT:function(){return xt},M_:function(){return rt},jv:function(){return st},KC:function(){return fe},eG:function(){return xe},fK:function(){return Ve},IP:function(){return he},iP:function(){return ve},M:function(){return Qe},he:function(){return _e},Ll:function(){return G},EN:function(){return $}});var r=n(15501),o=n(512),a=n(31416),i=n(73294),s=n(57664),c=n(37466),u=n(34155),l=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o{if(t.length&&!t.includes(r))return;const o=e[r];n.push(...o.accounts)})),n}function T(e,t){return e.includes(":")?[e]:t.chains||[]}const S="base10",B="base16",k="base64pad",_="utf8",N=1;function M(){const e=s.Au();return{privateKey:(0,c.BB)(e.secretKey,B),publicKey:(0,c.BB)(e.publicKey,B)}}function R(){const e=(0,a.randomBytes)(32);return(0,c.BB)(e,B)}function F(e,t){const n=s.gi((0,c.mL)(e,B),(0,c.mL)(t,B)),r=new o.t(i.mE,n).expand(32);return(0,c.BB)(r,B)}function U(e){const t=(0,i.vp)((0,c.mL)(e,B));return(0,c.BB)(t,B)}function L(e){const t=(0,i.vp)((0,c.mL)(e,_));return(0,c.BB)(t,B)}function D(e){return Number((0,c.BB)(e,S))}function q(e){const t=function(e){return(0,c.mL)(`${e}`,S)}(typeof e.type<"u"?e.type:0);if(D(t)===N&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?(0,c.mL)(e.senderPublicKey,B):void 0,o=typeof e.iv<"u"?(0,c.mL)(e.iv,B):(0,a.randomBytes)(12);return function(e){if(D(e.type)===N){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return(0,c.BB)((0,c.zo)([e.type,e.senderPublicKey,e.iv,e.sealed]),k)}return(0,c.BB)((0,c.zo)([e.type,e.iv,e.sealed]),k)}({type:t,sealed:new r.OK((0,c.mL)(e.symKey,B)).seal(o,(0,c.mL)(e.message,_)),iv:o,senderPublicKey:n})}function H(e){const t=new r.OK((0,c.mL)(e.symKey,B)),{sealed:n,iv:o}=z(e.encoded),a=t.open(o,n);if(null===a)throw new Error("Failed to decrypt");return(0,c.BB)(a,_)}function z(e){const t=(0,c.mL)(e,k),n=t.slice(0,1);if(D(n)===N){const e=33,r=e+12,o=t.slice(1,e),a=t.slice(e,r);return{type:n,sealed:t.slice(r),iv:a,senderPublicKey:o}}const r=t.slice(1,13);return{type:n,sealed:t.slice(13),iv:r}}function G(e,t){const n=z(e);return $({type:D(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?(0,c.BB)(n.senderPublicKey,B):void 0,receiverPublicKey:t?.receiverPublicKey})}function $(e){const t=e?.type||0;if(t===N){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function W(e){return e.type===N&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var K=Object.defineProperty,Q=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,Y=(e,t,n)=>t in e?K(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z=(e,t)=>{for(var n in t||(t={}))V.call(t,n)&&Y(e,n,t[n]);if(Q)for(var n of Q(t))J.call(t,n)&&Y(e,n,t[n]);return e};const X="react-native",ee="node",te="browser",ne="unknown",re="js";function oe(){return typeof I<"u"&&typeof I.versions<"u"&&typeof I.versions.node<"u"}function ae(){return!(0,x.getDocument)()&&!!(0,x.getNavigator)()&&"ReactNative"===navigator.product}function ie(){return!oe()&&!!(0,x.getNavigator)()}function se(){return ae()?X:oe()?ee:ie()?te:ne}function ce(){return(0,P.D)()||{name:"",description:"",url:"",icons:[""]}}function ue(e,t,r){const o=function(){if(se()===X&&typeof n.g<"u"&&typeof(null==n.g?void 0:n.g.Platform)<"u"){const{OS:e,Version:t}=n.g.Platform;return[e,t].join("-")}const e=v();if(null===e)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}(),a=function(){var e;const t=se();return t===te?[t,(null==(e=(0,x.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[re,r].join("-"),o,a].join("/")}function le({protocol:e,version:t,relayUrl:n,sdkVersion:r,auth:o,projectId:a,useOnCloseEvent:i}){const s=n.split("?"),c={auth:o,ua:ue(e,t,r),projectId:a,useOnCloseEvent:i||void 0},u=function(e,t){let n=C.parse(e);return n=Z(Z({},n),t),C.stringify(n)}(s[1]||"",c);return s[0]+"?"+u}function de(e,t){return e.filter((e=>t.includes(e))).length===e.length}function fe(e){return Object.fromEntries(e.entries())}function he(e){return new Map(Object.entries(e))}function pe(e=A.FIVE_MINUTES,t){const n=(0,A.toMiliseconds)(e||A.FIVE_MINUTES);let r,o,a;return{resolve:e=>{a&&r&&(clearTimeout(a),r(e))},reject:e=>{a&&o&&(clearTimeout(a),o(e))},done:()=>new Promise(((e,i)=>{a=setTimeout((()=>{i(new Error(t))}),n),r=e,o=i}))}}function me(e,t,n){return new Promise((async(r,o)=>{const a=setTimeout((()=>o(new Error(n))),t);try{r(await e)}catch(i){o(i)}clearTimeout(a)}))}function be(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function ge(e){return be("topic",e)}function ye(e){return be("id",e)}function ve(e){const[t,n]=e.split(":"),r={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof n)r.topic=n;else{if("id"!==t||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${n}`);r.id=Number(n)}return r}function we(e,t){return(0,A.fromMiliseconds)((t||Date.now())+(0,A.toMiliseconds)(e))}function Ee(e){return Date.now()>=(0,A.toMiliseconds)(e)}function Ae(e,t){return`${e}${t?`:${t}`:""}`}function xe(e=[],t=[]){return[...new Set([...e,...t])]}async function Pe({id:e,topic:t,wcDeepLink:r}){try{if(!r)return;let o=("string"==typeof r?JSON.parse(r):r)?.href;if("string"!=typeof o)return;o.endsWith("/")&&(o=o.slice(0,-1));const a=`${o}/wc?requestId=${e}&sessionTopic=${t}`,i=se();i===te?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):i===X&&typeof(null==n.g?void 0:n.g.Linking)<"u"&&await n.g.Linking.openURL(a)}catch(o){console.error(o)}}function Ce(e){return e?.relay||{protocol:"irn"}}function je(e){const t=j[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var Ie=Object.defineProperty,Oe=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,Be=(e,t,n)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function ke(e,t="-"){const n={},r="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(r)){const o=t.replace(r,""),a=e[t];n[o]=a}})),n}function _e(e){const t=e.indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t),o=e.substring(t+1,n).split("@"),a=typeof n<"u"?e.substring(n):"",i=C.parse(a);return{protocol:r,topic:Ne(o[0]),version:parseInt(o[1],10),symKey:i.symKey,relay:ke(i)}}function Ne(e){return e.startsWith("//")?e.substring(2):e}function Me(e){return`${e.protocol}:${e.topic}@${e.version}?`+C.stringify(((e,t)=>{for(var n in t||(t={}))Te.call(t,n)&&Be(e,n,t[n]);if(Oe)for(var n of Oe(t))Se.call(t,n)&&Be(e,n,t[n]);return e})({symKey:e.symKey},function(e,t="-"){const n={};return Object.keys(e).forEach((r=>{const o="relay"+t+r;e[r]&&(n[o]=e[r])})),n}(e.relay)))}var Re=Object.defineProperty,Fe=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,He=(e,t,n)=>t in e?Re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ze=(e,t)=>{for(var n in t||(t={}))De.call(t,n)&&He(e,n,t[n]);if(Le)for(var n of Le(t))qe.call(t,n)&&He(e,n,t[n]);return e},Ge=(e,t)=>Fe(e,Ue(t));function $e(e){const t=[];return e.forEach((e=>{const[n,r]=e.split(":");t.push(`${n}:${r}`)})),t}function We(e,t){const n=bt(e,t);if(n)throw new Error(n.message);const r={};for(const[o,a]of Object.entries(e))r[o]={methods:a.methods,events:a.events,chains:a.accounts.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))};return r}function Ke(e){return e.includes(":")}function Qe(e){return Ke(e)?e.split(":")[0]:e}function Ve(e){var t,n,r;const o={};if(!tt(e))return o;for(const[a,i]of Object.entries(e)){const e=Ke(a)?[a]:i.chains,s=i.methods||[],c=i.events||[],u=Qe(a);o[u]=Ge(ze({},o[u]),{chains:xe(e,null==(t=o[u])?void 0:t.chains),methods:xe(s,null==(n=o[u])?void 0:n.methods),events:xe(c,null==(r=o[u])?void 0:r.events)})}return o}const Je={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Ye={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Ze(e,t){const{message:n,code:r}=Ye[e];return{message:t?`${n} ${t}`:n,code:r}}function Xe(e,t){const{message:n,code:r}=Je[e];return{message:t?`${n} ${t}`:n,code:r}}function et(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function tt(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function nt(e){return typeof e>"u"}function rt(e,t){return!(!t||!nt(e))||"string"==typeof e&&!!e.trim().length}function ot(e,t){return!(!t||!nt(e))||"number"==typeof e&&!isNaN(e)}function at(e,t){const{requiredNamespaces:n}=t,r=Object.keys(e.namespaces),o=Object.keys(n);let a=!0;return!!de(o,r)&&(r.forEach((t=>{const{accounts:r,methods:o,events:i}=e.namespaces[t],s=$e(r),c=n[t];(!de(T(t,c),s)||!de(c.methods,o)||!de(c.events,i))&&(a=!1)})),a)}function it(e){return!(!rt(e,!1)||!e.includes(":"))&&2===e.split(":").length}function st(e){if(rt(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function ct(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}function ut(e){return e?.topic}function lt(e,t){let n=null;return rt(e?.publicKey,!1)||(n=Ze("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}function dt(e){let t=!0;return et(e)?e.length&&(t=e.every((e=>rt(e,!1)))):t=!1,t}function ft(e,t,n){let r=null;return Object.entries(e).forEach((([e,o])=>{if(r)return;const a=function(e,t,n){let r=null;return et(t)&&t.length?t.forEach((e=>{r||it(e)||(r=Xe("UNSUPPORTED_CHAINS",`${n}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):it(e)||(r=Xe("UNSUPPORTED_CHAINS",`${n}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),r}(e,T(e,o),`${t} ${n}`);a&&(r=a)})),r}function ht(e,t){let n=null;return et(e)?e.forEach((e=>{n||function(e){if(rt(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&it(e)}}return!1}(e)||(n=Xe("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):n=Xe("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function pt(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=function(e,t){let n=null;return dt(e?.methods)?dt(e?.events)||(n=Xe("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=Xe("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),n}(e,`${t}, namespace`);r&&(n=r)})),n}function mt(e,t,n){let r=null;if(e&&tt(e)){const o=pt(e,t);o&&(r=o);const a=ft(e,t,n);a&&(r=a)}else r=Ze("MISSING_OR_INVALID",`${t}, ${n} should be an object with data`);return r}function bt(e,t){let n=null;if(e&&tt(e)){const r=pt(e,t);r&&(n=r);const o=function(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=ht(e?.accounts,`${t} namespace`);r&&(n=r)})),n}(e,t);o&&(n=o)}else n=Ze("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function gt(e){return rt(e.protocol,!0)}function yt(e,t){let n=!1;return t&&!e?n=!0:e&&et(e)&&e.length&&e.forEach((e=>{n=gt(e)})),n}function vt(e){return"number"==typeof e}function wt(e){return typeof e<"u"&&null!==typeof e}function Et(e){return!(!e||"object"!=typeof e||!e.code||!ot(e.code,!1)||!e.message||!rt(e.message,!1))}function At(e){return!(nt(e)||!rt(e.method,!1))}function xt(e){return!(nt(e)||nt(e.result)&&nt(e.error)||!ot(e.id,!1)||!rt(e.jsonrpc,!1))}function Pt(e){return!(nt(e)||!rt(e.name,!1))}function Ct(e,t){return!(!it(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...$e(e.accounts))})),t}(e).includes(t))}function jt(e,t,n){return!!rt(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{$e(e.accounts).includes(t)&&n.push(...e.methods)})),n}(e,t).includes(n)}function It(e,t,n){return!!rt(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{$e(e.accounts).includes(t)&&n.push(...e.events)})),n}(e,t).includes(n)}function Ot(e,t,n){let r=null;const o=function(e){const t={};return Object.keys(e).forEach((n=>{var r;n.includes(":")?t[n]=e[n]:null==(r=e[n].chains)||r.forEach((r=>{t[r]={methods:e[n].methods,events:e[n].events}}))})),t}(e),a=function(e){const t={};return Object.keys(e).forEach((n=>{if(n.includes(":"))t[n]=e[n];else{$e(e[n].accounts)?.forEach((r=>{t[r]={accounts:e[n].accounts.filter((e=>e.includes(`${r}:`))),methods:e[n].methods,events:e[n].events}}))}})),t}(t),i=Object.keys(o),s=Object.keys(a),c=Tt(Object.keys(e)),u=Tt(Object.keys(t)),l=c.filter((e=>!u.includes(e)));return l.length&&(r=Ze("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${l.toString()}\n Received: ${Object.keys(t).toString()}`)),de(i,s)||(r=Ze("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${i.toString()}\n Approved: ${s.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||r)return;const o=$e(t[e].accounts);o.includes(e)||(r=Ze("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${o.toString()}`))})),i.forEach((e=>{r||(de(o[e].methods,a[e].methods)?de(o[e].events,a[e].events)||(r=Ze("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=Ze("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))})),r}function Tt(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function St(e,t){return ot(e,!1)&&e<=t.max&&e>=t.min}},81029:function(e,t){"use strict";function n(e){let t;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(t=window[e]),t}function r(e){const t=n(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=n,t.getFromWindowOrThrow=r,t.getDocumentOrThrow=function(){return r("document")},t.getDocument=function(){return n("document")},t.getNavigatorOrThrow=function(){return r("navigator")},t.getNavigator=function(){return n("navigator")},t.getLocationOrThrow=function(){return r("location")},t.getLocation=function(){return n("location")},t.getCryptoOrThrow=function(){return r("crypto")},t.getCrypto=function(){return n("crypto")},t.getLocalStorageOrThrow=function(){return r("localStorage")},t.getLocalStorage=function(){return n("localStorage")}},55680:function(e,t,n){"use strict";t.D=void 0;const r=n(81029);t.D=function(){let e,t;try{e=r.getDocumentOrThrow(),t=r.getLocationOrThrow()}catch(a){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;er.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(o.length&&o){const e=r.getAttribute("content");if(e)return e}}return""}const o=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:n("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e-1){const e=o.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop();n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}(),name:o}}},24143:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,i){if("function"!==typeof r)throw new TypeError("The listener must be a function");var s=new o(r,a||e,i),c=n?n+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 i(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,a=r.length,i=new Array(a);oNumber(e)-Number(t))).map((t=>e[t])):e}function f(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function h(e){const t=(e=f(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function m(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const o="string"===typeof n&&n.includes(e.arrayFormatSeparator),a="string"===typeof n&&!o&&l(n,e).includes(e.arrayFormatSeparator);n=a?l(n,e):n;const i=o||a?n.split(e.arrayFormatSeparator).map((t=>l(t,e))):null===n?n:l(n,e);r[t]=i};case"bracket-separator":return(t,n,r)=>{const o=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!o)return void(r[t]=n?l(n,e):n);const a=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>l(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],a):r[t]=a};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const o of e.split("&")){if(""===o)continue;let[e,i]=a(t.decode?o.replace(/\+/g," "):o,"=");i=void 0===i?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?i:l(i,t),n(l(e,t),i,r)}for(const o of Object.keys(r)){const e=r[o];if("object"===typeof e&&null!==e)for(const n of Object.keys(e))e[n]=p(e[n],t);else r[o]=p(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const n=r[t];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?e[t]=d(n):e[t]=n,e}),Object.create(null))}t.extract=h,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>{return t.skipNull&&(null===(r=e[n])||void 0===r)||t.skipEmptyString&&""===e[n];var r},r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const o=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[u(t,e),"[",o,"]"].join("")]:[...n,[u(t,e),"[",u(o,e),"]=",u(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[u(t,e),"[]"].join("")]:[...n,[u(t,e),"[]=",u(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[u(t,e),":list="].join("")]:[...n,[u(t,e),":list=",u(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,o)=>void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?r:(o=null===o?"":o,0===r.length?[[u(n,e),t,u(o,e)].join("")]:[[r,u(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,u(t,e)]:[...n,[u(t,e),"=",u(r,e)].join("")]}}(t),o={};for(const i of Object.keys(e))n(i)||(o[i]=e[i]);const a=Object.keys(o);return!1!==t.sort&&a.sort(t.sort),a.map((n=>{const o=e[n];return void 0===o?"":null===o?u(n,t):Array.isArray(o)?0===o.length&&"bracket-separator"===t.arrayFormat?u(n,t)+"[]":o.reduce(r(n),[]).join("&"):u(n,t)+"="+u(o,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=a(e,"#");return Object.assign({url:n.split("?")[0]||"",query:m(h(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:l(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0,[s]:!0},n);const r=f(e.url).split("?")[0]||"",o=t.extract(e.url),a=t.parse(o,{sort:!1}),i=Object.assign(a,e.query);let c=t.stringify(i,n);c&&(c=`?${c}`);let l=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(l=`#${n[s]?u(e.fragmentIdentifier,n):e.fragmentIdentifier}`),`${r}${c}${l}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[s]:!1},r);const{url:o,query:a,fragmentIdentifier:c}=t.parseUrl(e,r);return t.stringifyUrl({url:o,query:i(a,n),fragmentIdentifier:c},r)},t.exclude=(e,n,r)=>{const o=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,o,r)}},61882:function(){},36900:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(30004);r.__exportStar(n(46869),t),r.__exportStar(n(88033),t)},46869:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},88033:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},66736:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(30004);r.__exportStar(n(44273),t),r.__exportStar(n(47001),t),r.__exportStar(n(52939),t),r.__exportStar(n(36900),t)},52939:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(30004).__exportStar(n(88766),t)},88766:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;t.IWatch=class{}},83207:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const r=n(36900);t.toMiliseconds=function(e){return e*r.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/r.ONE_THOUSAND)}},83873:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}},44273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(30004);r.__exportStar(n(83873),t),r.__exportStar(n(83207),t)},47001:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class n{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if("undefined"!==typeof t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){const t=this.timestamps.get(e);if("undefined"===typeof t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=n,t.default=n},30004:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return a},__asyncDelegator:function(){return w},__asyncGenerator:function(){return v},__asyncValues:function(){return E},__await:function(){return y},__awaiter:function(){return l},__classPrivateFieldGet:function(){return C},__classPrivateFieldSet:function(){return j},__createBinding:function(){return f},__decorate:function(){return s},__exportStar:function(){return h},__extends:function(){return o},__generator:function(){return d},__importDefault:function(){return P},__importStar:function(){return x},__makeTemplateObject:function(){return A},__metadata:function(){return u},__param:function(){return c},__read:function(){return m},__rest:function(){return i},__spread:function(){return b},__spreadArrays:function(){return g},__values:function(){return p}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function b(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof y?Promise.resolve(n.value.v).then(c,u):l(a[0][2],n)}catch(r){l(a[0][3],r)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function A(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function j(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},86010:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"===typeof e||"number"===typeof e)o+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t-1};function u(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!==typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():i&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=p(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function E(e){var t=new f;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t}function A(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},g.call(v.prototype),g.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},A.error=function(){var e=new A(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];A.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new A(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(C){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function P(e,n){return new Promise((function(r,a){var i=new v(e,n);if(i.signal&&i.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:E(s.getAllResponseHeaders()||"")};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var t="response"in s?s.response:s.responseText;r(new A(t,e))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(i.method,i.url,!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&o&&(s.responseType="blob"),i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",c)}),s.send("undefined"===typeof i._bodyInit?null:i._bodyInit)}))}P.polyfill=!0,e.fetch||(e.fetch=P,e.Headers=f,e.Request=v,e.Response=A),t.Headers=f,t.Request=v,t.Response=A,t.fetch=P,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},44020:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp("("+t+")|([^%]+?)","gi"),r=new RegExp("("+t+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch(a){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function a(e){try{return decodeURIComponent(e)}catch(a){for(var t=e.match(n)||[],r=1;rd)&&(a[c]=d,h.push(c,d),o[c]=s));if("undefined"!==typeof r&&"undefined"===typeof a[r]){var p=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(p)}return o},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var o=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,o={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=e.sorter||r.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},62378:function(e){"use strict";e.exports=function(e){for(var t=[],n=e.length,r=0;r=55296&&o<=56319&&n>r+1){var a=e.charCodeAt(r+1);a>=56320&&a<=57343&&(o=1024*(o-55296)+a-56320+65536,r+=1)}o<128?t.push(o):o<2048?(t.push(o>>6|192),t.push(63&o|128)):o<55296||o>=57344&&o<65536?(t.push(o>>12|224),t.push(o>>6&63|128),t.push(63&o|128)):o>=65536&&o<=1114111?(t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},17187:function(e){"use strict";var t,n="object"===typeof Reflect?Reflect:null,r=n&&"function"===typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!==e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,a),r(n)}function a(){"function"===typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}m(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"===typeof e.on&&m(e,"error",t,n)}(e,o,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var i=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?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var o,a,i,u;if(s(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),i=a[t]),void 0===i)i=a[t]=n,++e._eventsCount;else if("function"===typeof i?i=a[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(o=c(e))>0&&i.length>o&&!i.warned){i.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=i.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 d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=l.bind(r);return o.listener=n,r.wrapFn=o,o}function f(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"===typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var c=a[e];if(void 0===c)return!1;if("function"===typeof c)r(c,this,t);else{var u=c.length,l=p(c,u);for(n=0;n=0;a--)if(n[a]===t||n[a].listener===t){i=n[a].listener,o=a;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},92806:function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),o=Array.isArray(t),a=0;a{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,I.K)(e[0])})})),(0,C.ov)(this,"onChainChanged",(e=>{const t=Number(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})})),(0,C.ov)(this,"onDisconnect",(()=>{(0,C.U9)(this,m,b).call(this,[]),this.emit("disconnect")})),(0,C.ov)(this,"onDisplayUri",(e=>{this.emit("message",{type:"display_uri",data:e})})),(0,C.ov)(this,"onConnect",(()=>{this.emit("connect",{})})),(0,C.U9)(this,a,i).call(this)}async connect({chainId:e,pairingTopic:t}={}){try{let n=e;if(!n){const e=this.storage?.getItem("store"),t=e?.state?.data?.chain?.id;n=t&&!this.isChainUnsupported(t)?t:this.chains[0]?.id}if(!n)throw new Error("No chains found on connector.");const r=await this.getProvider();(0,C.U9)(this,d,f).call(this);const o=(0,C.U9)(this,u,l).call(this);if(r.session&&o&&await r.disconnect(),!r.session||o){const e=this.chains.filter((e=>e.id!==n)).map((e=>e.id));this.emit("message",{type:"connecting"}),await r.connect({pairingTopic:t,chains:[n],optionalChains:e.length?e:void 0}),(0,C.U9)(this,m,b).call(this,this.chains.map((({id:e})=>e)))}const a=await r.enable(),i=(0,I.K)(a[0]),s=await this.getChainId();return{account:i,chain:{id:s,unsupported:this.isChainUnsupported(s)}}}catch(n){if(/user rejected/i.test(n?.message))throw new O.ab(n);throw n}}async disconnect(){const e=await this.getProvider();try{await e.disconnect()}catch(t){if(!/No matching key/i.test(t.message))throw t}finally{(0,C.U9)(this,h,p).call(this),(0,C.U9)(this,m,b).call(this,[])}}async getAccount(){const{accounts:e}=await this.getProvider();return(0,I.K)(e[0])}async getChainId(){const{chainId:e}=await this.getProvider();return e}async getProvider({chainId:e}={}){return(0,C.ac)(this,r)||await(0,C.U9)(this,a,i).call(this),e&&await this.switchChain(e),(0,C.ac)(this,r)}async getWalletClient({chainId:e}={}){const[t,n]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,T.K)({account:n,chain:r,transport:(0,S.P)(t)})}async isAuthorized(){try{const[e,t]=await Promise.all([this.getAccount(),this.getProvider()]),n=(0,C.U9)(this,u,l).call(this);if(!e)return!1;if(n&&t.session){try{await t.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(e){const t=this.chains.find((t=>t.id===e));if(!t)throw new O.x3(new Error("chain not found on connector."));try{const n=await this.getProvider(),r=(0,C.U9)(this,v,w).call(this),o=(0,C.U9)(this,E,A).call(this);if(!r.includes(e)&&o.includes(_)){await n.request({method:_,params:[{chainId:(0,B.eC)(t.id),blockExplorerUrls:[t.blockExplorers?.default?.url],chainName:t.name,nativeCurrency:t.nativeCurrency,rpcUrls:[...t.rpcUrls.default.http]}]});const r=(0,C.U9)(this,g,y).call(this);r.push(e),(0,C.U9)(this,m,b).call(this,r)}return await n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,B.eC)(e)}]}),t}catch(n){if(/user rejected request/i.test("string"===typeof n?n:n?.message))throw new O.ab(n);throw new O.x3(n)}}};r=new WeakMap,o=new WeakMap,a=new WeakSet,i=async function(){return(0,C.ac)(this,o)||"undefined"===typeof window||(0,C.qx)(this,o,(0,C.U9)(this,s,c).call(this)),(0,C.ac)(this,o)},s=new WeakSet,c=async function(){const{EthereumProvider:e,OPTIONAL_EVENTS:t,OPTIONAL_METHODS:o}=await Promise.all([n.e(1894),n.e(5023)]).then(n.bind(n,35023)),[a,...i]=this.chains.map((({id:e})=>e));if(a){const{projectId:n,showQrModal:s=!0,qrModalOptions:c,metadata:u,relayUrl:l}=this.options;(0,C.qx)(this,r,await e.init({showQrModal:s,qrModalOptions:c,projectId:n,optionalMethods:o,optionalEvents:t,chains:[a],optionalChains:i.length?i:void 0,rpcMap:Object.fromEntries(this.chains.map((e=>[e.id,e.rpcUrls.default.http[0]]))),metadata:u,relayUrl:l}))}},u=new WeakSet,l=function(){if((0,C.U9)(this,E,A).call(this).includes(_))return!1;if(!this.options.isNewChainsStale)return!1;const e=(0,C.U9)(this,g,y).call(this),t=this.chains.map((({id:e})=>e)),n=(0,C.U9)(this,v,w).call(this);return!(n.length&&!n.some((e=>t.includes(e))))&&!t.every((t=>e.includes(t)))},d=new WeakSet,f=function(){(0,C.ac)(this,r)&&((0,C.U9)(this,h,p).call(this),(0,C.ac)(this,r).on("accountsChanged",this.onAccountsChanged),(0,C.ac)(this,r).on("chainChanged",this.onChainChanged),(0,C.ac)(this,r).on("disconnect",this.onDisconnect),(0,C.ac)(this,r).on("session_delete",this.onDisconnect),(0,C.ac)(this,r).on("display_uri",this.onDisplayUri),(0,C.ac)(this,r).on("connect",this.onConnect))},h=new WeakSet,p=function(){(0,C.ac)(this,r)&&((0,C.ac)(this,r).removeListener("accountsChanged",this.onAccountsChanged),(0,C.ac)(this,r).removeListener("chainChanged",this.onChainChanged),(0,C.ac)(this,r).removeListener("disconnect",this.onDisconnect),(0,C.ac)(this,r).removeListener("session_delete",this.onDisconnect),(0,C.ac)(this,r).removeListener("display_uri",this.onDisplayUri),(0,C.ac)(this,r).removeListener("connect",this.onConnect))},m=new WeakSet,b=function(e){this.storage?.setItem(k,e)},g=new WeakSet,y=function(){return this.storage?.getItem(k)??[]},v=new WeakSet,w=function(){if(!(0,C.ac)(this,r))return[];const e=(0,C.ac)(this,r).session?.namespaces;if(!e)return[];const t=(0,j.fK)(e).eip155?.chains?.map((e=>parseInt(e.split(":")[1]||"")));return t??[]},E=new WeakSet,A=function(){if(!(0,C.ac)(this,r))return[];const e=(0,C.ac)(this,r).session?.namespaces;if(!e)return[];const t=(0,j.fK)(e).eip155?.methods;return t??[]};var M,R,F,U=n(64546),L=n(57292),D=n(38039),q=class extends C.wR{constructor({chains:e,options:t}){super({chains:e,options:{reloadOnDisconnect:!1,...t}}),(0,C.ov)(this,"id","coinbaseWallet"),(0,C.ov)(this,"name","Coinbase Wallet"),(0,C.ov)(this,"ready",!0),(0,C.Ko)(this,M,void 0),(0,C.Ko)(this,R,void 0),(0,C.ov)(this,"onAccountsChanged",(e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,I.K)(e[0])})})),(0,C.ov)(this,"onChainChanged",(e=>{const t=(0,D.J)(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})})),(0,C.ov)(this,"onDisconnect",(()=>{this.emit("disconnect")}))}async connect({chainId:e}={}){try{const t=await this.getProvider();t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect),this.emit("message",{type:"connecting"});const n=await t.enable(),r=(0,I.K)(n[0]);let o=await this.getChainId(),a=this.isChainUnsupported(o);if(e&&o!==e){o=(await this.switchChain(e)).id,a=this.isChainUnsupported(o)}return{account:r,chain:{id:o,unsupported:a}}}catch(t){if(/(user closed modal|accounts received is empty)/i.test(t.message))throw new O.ab(t);throw t}}async disconnect(){if(!(0,C.ac)(this,R))return;const e=await this.getProvider();e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),e.disconnect(),e.close()}async getAccount(){const e=await this.getProvider(),t=await e.request({method:"eth_accounts"});return(0,I.K)(t[0])}async getChainId(){const e=await this.getProvider();return(0,D.J)(e.chainId)}async getProvider(){if(!(0,C.ac)(this,R)){let e=(await Promise.all([n.e(8764),n.e(8109),n.e(5811),n.e(2027)]).then(n.t.bind(n,45811,19))).default;"function"!==typeof e&&"function"===typeof e.default&&(e=e.default),(0,C.qx)(this,M,new e(this.options));const t=(0,C.ac)(this,M).walletExtension?.getChainId(),r=this.chains.find((e=>this.options.chainId?e.id===this.options.chainId:e.id===t))||this.chains[0],o=this.options.chainId||r?.id,a=this.options.jsonRpcUrl||r?.rpcUrls.default.http[0];(0,C.qx)(this,R,(0,C.ac)(this,M).makeWeb3Provider(a,o))}return(0,C.ac)(this,R)}async getWalletClient({chainId:e}={}){const[t,n]=await Promise.all([this.getProvider(),this.getAccount()]),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,T.K)({account:n,chain:r,transport:(0,S.P)(t)})}async isAuthorized(){try{return!!(await this.getAccount())}catch{return!1}}async switchChain(e){const t=await this.getProvider(),n=(0,B.eC)(e);try{return await t.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]}),this.chains.find((t=>t.id===e))??{id:e,name:`Chain ${n}`,network:`${n}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(r){const a=this.chains.find((t=>t.id===e));if(!a)throw new L.B({chainId:e,connectorId:this.id});if(4902===r.code)try{return await t.request({method:"wallet_addEthereumChain",params:[{chainId:n,chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:[a.rpcUrls.public?.http[0]??""],blockExplorerUrls:this.getBlockExplorerUrls(a)}]}),a}catch(o){throw new O.ab(o)}throw new O.x3(r)}}async watchAsset({address:e,decimals:t=18,image:n,symbol:r}){return(await this.getProvider()).request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:t,image:n,symbol:r}}})}};M=new WeakMap,R=new WeakMap;var H=class extends U._{constructor({chains:e,options:t}={}){const n={name:"MetaMask",shimDisconnect:!0,getProvider(){function e(e){if(!!e?.isMetaMask&&(!e.isBraveWallet||e._events||e._state)&&!e.isApexWallet&&!e.isAvalanche&&!e.isBitKeep&&!e.isBlockWallet&&!e.isCoin98&&!e.isFordefi&&!e.isMathWallet&&!e.isOkxWallet&&!e.isOKExWallet&&!e.isOneInchIOSWallet&&!e.isOneInchAndroidWallet&&!e.isOpera&&!e.isPortal&&!e.isRabby&&!e.isDefiant&&!e.isTokenPocket&&!e.isTokenary&&!e.isZerion)return e}if("undefined"===typeof window)return;const t=window.ethereum;return t?.providers?t.providers.find(e):e(t)},...t};super({chains:e,options:n}),(0,C.ov)(this,"id","metaMask"),(0,C.ov)(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),(0,C.Ko)(this,F,void 0),(0,C.qx)(this,F,n.UNSTABLE_shimOnConnectSelectAccount)}async connect({chainId:e}={}){try{const n=await this.getProvider();if(!n)throw new L.N;n.on&&(n.on("accountsChanged",this.onAccountsChanged),n.on("chainChanged",this.onChainChanged),n.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let r=null;if((0,C.ac)(this,F)&&this.options?.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey)){r=await this.getAccount().catch((()=>null));if(!!r)try{await n.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),r=await this.getAccount()}catch(t){if(this.isUserRejectedRequestError(t))throw new O.ab(t);if(t.code===new O.pT(t).code)throw t}}if(!r){const e=await n.request({method:"eth_requestAccounts"});r=(0,I.K)(e[0])}let o=await this.getChainId(),a=this.isChainUnsupported(o);if(e&&o!==e){o=(await this.switchChain(e)).id,a=this.isChainUnsupported(o)}return this.options?.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:r,chain:{id:o,unsupported:a},provider:n}}catch(t){if(this.isUserRejectedRequestError(t))throw new O.ab(t);if(-32002===t.code)throw new O.pT(t);throw t}}};F=new WeakMap;var z,G,$,W=/(imtoken|metamask|rainbow|trust wallet|uniswap wallet|ledger)/i,K=class extends C.wR{constructor(){super(...arguments),(0,C.Ko)(this,G),(0,C.ov)(this,"id","walletConnectLegacy"),(0,C.ov)(this,"name","WalletConnectLegacy"),(0,C.ov)(this,"ready",!0),(0,C.Ko)(this,z,void 0),(0,C.ov)(this,"onAccountsChanged",(e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,I.K)(e[0])})})),(0,C.ov)(this,"onChainChanged",(e=>{const t=(0,D.J)(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})})),(0,C.ov)(this,"onDisconnect",(()=>{this.emit("disconnect")}))}async connect({chainId:e}={}){try{let t=e;if(!t){const e=this.storage?.getItem("store"),n=e?.state?.data?.chain?.id;n&&!this.isChainUnsupported(n)&&(t=n)}const n=await this.getProvider({chainId:t,create:!0});n.on("accountsChanged",this.onAccountsChanged),n.on("chainChanged",this.onChainChanged),n.on("disconnect",this.onDisconnect),setTimeout((()=>this.emit("message",{type:"connecting"})),0);const r=await n.enable(),o=(0,I.K)(r[0]),a=await this.getChainId(),i=this.isChainUnsupported(a),s=n.connector?.peerMeta?.name??"";return W.test(s)&&(this.switchChain=(0,C.U9)(this,G,$)),{account:o,chain:{id:a,unsupported:i}}}catch(t){if(/user closed modal/i.test(t.message))throw new O.ab(t);throw t}}async disconnect(){const e=await this.getProvider();await e.disconnect(),e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),"undefined"!==typeof localStorage&&localStorage.removeItem("walletconnect")}async getAccount(){const e=(await this.getProvider()).accounts;return(0,I.K)(e[0])}async getChainId(){const e=await this.getProvider();return(0,D.J)(e.chainId)}async getProvider({chainId:e,create:t}={}){if(!(0,C.ac)(this,z)||e||t){const t=this.options?.infuraId?{}:this.chains.reduce(((e,t)=>({...e,[t.id]:t.rpcUrls.default.http[0]})),{}),r=(await Promise.all([n.e(8764),n.e(1894),n.e(7749)]).then(n.bind(n,67749))).default;(0,C.qx)(this,z,new r({...this.options,chainId:e,rpc:{...t,...this.options?.rpc}})),(0,C.ac)(this,z).http=await(0,C.ac)(this,z).setHttpProvider(e)}return(0,C.ac)(this,z)}async getWalletClient({chainId:e}={}){const[t,n]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,T.K)({account:n,chain:r,transport:(0,S.P)(t)})}async isAuthorized(){try{return!!(await this.getAccount())}catch{return!1}}};z=new WeakMap,G=new WeakSet,$=async function(e){const t=await this.getProvider(),n=(0,B.eC)(e);try{return await Promise.race([t.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]}),new Promise((t=>this.on("change",(({chain:n})=>{n?.id===e&&t(e)}))))]),this.chains.find((t=>t.id===e))??{id:e,name:`Chain ${n}`,network:`${n}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(r){if(/user rejected request/i.test("string"===typeof r?r:r?.message))throw new O.ab(r);throw new O.x3(r)}};var Q,V,J=n(65378),Y=n(42691),Z=class extends C.wR{constructor({chains:e,options:t}){const n={shimDisconnect:!1,...t};super({chains:e,options:n}),(0,C.ov)(this,"id","safe"),(0,C.ov)(this,"name","Safe"),(0,C.ov)(this,"ready",!("undefined"===typeof window)&&window?.parent!==window),(0,C.Ko)(this,Q,void 0),(0,C.Ko)(this,V,void 0),(0,C.ov)(this,"shimDisconnectKey",`${this.id}.shimDisconnect`);let r=Y;"function"!==typeof Y&&"function"===typeof Y.default&&(r=Y.default),(0,C.qx)(this,V,new r(n))}async connect(){const e=await this.getProvider();if(!e)throw new L.N;e.on&&(e.on("accountsChanged",this.onAccountsChanged),e.on("chainChanged",this.onChainChanged),e.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const t=await this.getAccount(),n=await this.getChainId();return this.options.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:t,chain:{id:n,unsupported:this.isChainUnsupported(n)}}}async disconnect(){const e=await this.getProvider();e?.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))}async getAccount(){const e=await this.getProvider();if(!e)throw new L.N;const t=await e.request({method:"eth_accounts"});return(0,I.K)(t[0])}async getChainId(){const e=await this.getProvider();if(!e)throw new L.N;return(0,D.J)(e.chainId)}async getProvider(){if(!(0,C.ac)(this,Q)){const e=await(0,C.ac)(this,V).safe.getInfo();if(!e)throw new Error("Could not load Safe information");(0,C.qx)(this,Q,new J.N(e,(0,C.ac)(this,V)))}return(0,C.ac)(this,Q)}async getWalletClient({chainId:e}={}){const t=await this.getProvider(),n=await this.getAccount(),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,T.K)({account:n,chain:r,transport:(0,S.P)(t)})}async isAuthorized(){try{if(this.options.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey))return!1;return!!(await this.getAccount())}catch{return!1}}onAccountsChanged(e){}onChainChanged(e){}onDisconnect(){this.emit("disconnect")}};Q=new WeakMap,V=new WeakMap;var X=e=>()=>{let t=-1;const n=[],r=[],o=[],a=[];e.forEach((({groupName:e,wallets:n},a)=>{n.forEach((n=>{if(t++,(null==n?void 0:n.iconAccent)&&!(0,P.A7)(null==n?void 0:n.iconAccent))throw new Error(`Property \`iconAccent\` is not a hex value for wallet: ${n.name}`);const i={...n,groupIndex:a,groupName:e,index:t};"function"===typeof n.hidden?o.push(i):r.push(i)}))}));return[...r,...o].forEach((({createConnector:e,groupIndex:t,groupName:r,hidden:o,index:i,...s})=>{if("function"===typeof o){if(o({wallets:[...a.map((({connector:e,id:t,installed:n,name:r})=>({connector:e,id:t,installed:n,name:r})))]}))return}const{connector:c,...u}=(l=e(),Object.fromEntries(Object.entries(l).filter((([e,t])=>void 0!==t))));var l;let d;if("walletConnect"===s.id&&u.qrCode&&!(0,P.tq)()){const{chains:e,options:t}=c;d=new N({chains:e,options:{...t,showQrModal:!0}}),n.push(d)}const f={connector:c,groupIndex:t,groupName:r,index:i,walletConnectModalConnector:d,...s,...u};a.push(f),n.includes(c)||(n.push(c),c._wallets=[]),c._wallets.push(f)})),n},ee=({chains:e,...t})=>{var r;return{id:"brave",name:"Brave Wallet",iconUrl:async()=>(await n.e(6847).then(n.bind(n,86847))).default,iconBackground:"#fff",installed:"undefined"!==typeof window&&!0===(null==(r=window.ethereum)?void 0:r.isBraveWallet),downloadUrls:{},createConnector:()=>({connector:new U._({chains:e,options:t})})}},te=({appName:e,chains:t,...r})=>{var o;return{id:"coinbase",name:"Coinbase Wallet",shortName:"Coinbase",iconUrl:async()=>(await n.e(1950).then(n.bind(n,41950))).default,iconAccent:"#2c5ff6",iconBackground:"#2c5ff6",installed:"undefined"!==typeof window&&!0===(null==(o=window.ethereum)?void 0:o.isCoinbaseWallet)||void 0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=org.toshi",ios:"https://apps.apple.com/us/app/coinbase-wallet-store-crypto/id1278383455",mobile:"https://coinbase.com/wallet/downloads",qrCode:"https://coinbase-wallet.onelink.me/q5Sx/fdb9b250",chrome:"https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad",browserExtension:"https://coinbase.com/wallet"},createConnector:()=>{const n=(0,P.gn)(),o=new q({chains:t,options:{appName:e,headlessMode:!0,...r}});return{connector:o,...n?{}:{qrCode:{getUri:async()=>(await o.getProvider()).qrUrl,instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-mobile",steps:[{description:"We recommend putting Coinbase Wallet on your home screen for quicker access.",step:"install",title:"Open the Coinbase Wallet app"},{description:"You can easily backup your wallet using the cloud backup feature.",step:"create",title:"Create or Import a Wallet"},{description:"After you scan, a connection prompt will appear for you to connect your wallet.",step:"scan",title:"Tap the scan button"}]}},extension:{instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-extension",steps:[{description:"We recommend pinning Coinbase Wallet to your taskbar for quicker access to your wallet.",step:"install",title:"Install the Coinbase Wallet extension"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",step:"refresh",title:"Refresh your browser"}]}}}}}}},ne=({chains:e,...t})=>({id:"injected",name:"Browser Wallet",iconUrl:async()=>(await n.e(1088).then(n.bind(n,81088))).default,iconBackground:"#fff",hidden:({wallets:e})=>e.some((e=>e.installed&&e.name===e.connector.name&&(e.connector instanceof U._||"coinbase"===e.id))),createConnector:()=>({connector:new U._({chains:e,options:t})})});async function re(e,t){const n=await e.getProvider();return"2"===t?new Promise((e=>n.once("display_uri",e))):n.connector.uri}var oe=new Map;function ae({chains:e,options:t={},projectId:n,version:r="2"}){const o="21fef48091f12692cad574a6f7753643";if("2"===r){if(!n||""===n)throw new Error("No projectId found. Every dApp must now provide a WalletConnect Cloud projectId to enable WalletConnect v2 https://www.rainbowkit.com/docs/installation#configure");"YOUR_PROJECT_ID"!==n&&n!==o||console.warn("Invalid projectId. Please create a unique WalletConnect Cloud projectId for your dApp https://www.rainbowkit.com/docs/installation#configure")}const a={chains:e,options:"1"===r?{qrcode:!1,...t}:{projectId:"YOUR_PROJECT_ID"===n?o:n,showQrModal:!1,...t}},i=JSON.stringify(a),s=oe.get(i);return null!=s?s:function(e,t){const n="1"===e?new K(t):new N(t);return oe.set(JSON.stringify(t),n),n}(r,a)}function ie(e){return!!(null==e?void 0:e.isMetaMask)&&(!(e.isBraveWallet&&!e._events&&!e._state)&&(!e.isApexWallet&&(!e.isAvalanche&&(!e.isBackpack&&(!e.isBifrost&&(!e.isBitKeep&&(!e.isBitski&&(!e.isBlockWallet&&(!e.isCoinbaseWallet&&(!e.isDawn&&(!e.isEnkrypt&&(!e.isExodus&&(!e.isFrame&&(!e.isFrontier&&(!e.isGamestop&&(!e.isHyperPay&&(!e.isImToken&&(!e.isKuCoinWallet&&(!e.isMathWallet&&(!e.isOkxWallet&&!e.isOKExWallet&&(!e.isOneInchIOSWallet&&!e.isOneInchAndroidWallet&&(!e.isOpera&&(!e.isPhantom&&(!e.isPortal&&(!e.isRabby&&(!e.isRainbow&&(!e.isStatus&&(!e.isTalisman&&(!e.isTally&&(!e.isTokenPocket&&(!e.isTokenary&&(!e.isTrust&&!e.isTrustWallet&&(!e.isXDEFI&&!e.isZerion)))))))))))))))))))))))))))))))))}var se=({chains:e,projectId:t,walletConnectOptions:r,walletConnectVersion:o="2",...a})=>{var i,s;const c="undefined"!==typeof window&&(null==(i=window.ethereum)?void 0:i.providers),u="undefined"!==typeof window&&"undefined"!==typeof window.ethereum&&((null==(s=window.ethereum.providers)?void 0:s.some(ie))||window.ethereum.isMetaMask),l=!u;return{id:"metaMask",name:"MetaMask",iconUrl:async()=>(await n.e(4419).then(n.bind(n,84419))).default,iconAccent:"#f6851a",iconBackground:"#fff",installed:l?void 0:u,downloadUrls:{android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/us/app/metamask/id1438144202",mobile:"https://metamask.io/download",qrCode:"https://metamask.io/download",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask",opera:"https://addons.opera.com/extensions/details/metamask-10",browserExtension:"https://metamask.io/download"},createConnector:()=>{const n=l?ae({projectId:t,chains:e,version:o,options:r}):new H({chains:e,options:{getProvider:()=>c?c.find(ie):"undefined"!==typeof window?window.ethereum:void 0,...a}}),i=async()=>{const e=await re(n,o);return(0,P.Dt)()?e:(0,P.gn)()?`metamask://wc?uri=${encodeURIComponent(e)}`:`https://metamask.app.link/wc?uri=${encodeURIComponent(e)}`};return{connector:n,mobile:{getUri:l?i:void 0},qrCode:l?{getUri:i,instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"We recommend putting MetaMask on your home screen for quicker access.",step:"install",title:"Open the MetaMask app"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"After you scan, a connection prompt will appear for you to connect your wallet.",step:"scan",title:"Tap the scan button"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"We recommend pinning MetaMask to your taskbar for quicker access to your wallet.",step:"install",title:"Install the MetaMask extension"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",step:"refresh",title:"Refresh your browser"}]}}}}}};var ce=({chains:e,projectId:t,walletConnectOptions:r,walletConnectVersion:o="2",...a})=>{const i="undefined"!==typeof window&&"undefined"!==typeof window.ethereum&&(s=window.ethereum,!!Boolean(s.isRainbow));var s;const c=!i;return{id:"rainbow",name:"Rainbow",iconUrl:async()=>(await n.e(1608).then(n.bind(n,31608))).default,iconBackground:"#0c2f78",installed:c?void 0:i,downloadUrls:{android:"https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",ios:"https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",mobile:"https://rainbow.download?utm_source=rainbowkit",qrCode:"https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",browserExtension:"https://rainbow.me/extension?utm_source=rainbowkit"},createConnector:()=>{const n=c?ae({projectId:t,chains:e,version:o,options:r}):new U._({chains:e,options:a}),i=async()=>{const e=await re(n,o);return(0,P.Dt)()?e:(0,P.gn)()?`rainbow://wc?uri=${encodeURIComponent(e)}&connector=rainbowkit`:`https://rnbwapp.com/wc?uri=${encodeURIComponent(e)}&connector=rainbowkit`};return{connector:n,mobile:{getUri:c?i:void 0},qrCode:c?{getUri:i,instructions:{learnMoreUrl:"https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",steps:[{description:"We recommend putting Rainbow on your home screen for faster access to your wallet.",step:"install",title:"Open the Rainbow app"},{description:"You can easily backup your wallet using our backup feature on your phone.",step:"create",title:"Create or Import a Wallet"},{description:"After you scan, a connection prompt will appear for you to connect your wallet.",step:"scan",title:"Tap the scan button"}]}}:void 0}}}},ue=({chains:e,...t})=>({id:"safe",name:"Safe",iconAccent:"#12ff80",iconBackground:"#fff",iconUrl:async()=>(await n.e(514).then(n.bind(n,60514))).default,installed:!("undefined"===typeof window)&&(null==window?void 0:window.parent)!==window,downloadUrls:{},createConnector:()=>({connector:new Z({chains:e,options:t})})}),le=({chains:e,options:t,projectId:r,version:o="2"})=>({id:"walletConnect",name:"Wallet Connect",iconUrl:async()=>(await n.e(3525).then(n.bind(n,33525))).default,iconBackground:"#3b99fc",createConnector:()=>{const n=(0,P.gn)(),a=ae("1"===o?{version:"1",chains:e,options:{qrcode:n,...t}}:{version:"2",chains:e,projectId:r,options:{showQrModal:n,...t}}),i=async()=>re(a,o);return{connector:a,...n?{}:{mobile:{getUri:i},qrCode:{getUri:i}}}}});P.xZ,P.Bg,P.VQ,P.UG;var de=n(13105),fe=n(35133),he=n(94077),pe=n(85518),me=n(85893);function be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t{const r=[{groupName:"Popular",wallets:[ne({chains:t}),ue({chains:t}),ce({chains:t,projectId:n}),te({appName:e,chains:t}),se({chains:t,projectId:n}),le({chains:t,projectId:n}),ee({chains:t})]}];return{connectors:X(r),wallets:r}})({appName:"NameSys",projectId:"58107e13d36d52fd554cd1ece3258891",chains:Ee}),Pe=xe.connectors,Ce={appName:"NameSys: Off-Chain ENS Records Manager"},je=(0,fe._g)({autoConnect:!0,connectors:Pe,publicClient:Ae});var Ie=function(e){var t=e.Component,n=e.pageProps;return(0,me.jsx)(fe.eM,{config:je,children:(0,me.jsx)(P.pj,{modalSize:pe.tq?"compact":"wide",appInfo:Ce,chains:Ee,theme:ve,children:(0,me.jsx)(t,ge({},n))})})}},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(18164)}])},41159:function(){},38401:function(){},34155:function(e){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"===typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var s,c=[],u=!1,l=-1;function d(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&f())}function f(){if(!u){var e=i(d);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l1)for(var n=1;n>>7-e%8&1)},put:function(e,t){for(let n=0;n>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},73280:function(e){function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,r){const o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},43424:function(e,t,n){const r=n(62378),o=n(76910);function a(e){this.mode=o.BYTE,this.data=new Uint8Array(r(e))}a.getBitsLength=function(e){return 8*e},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){for(let t=0,n=this.data.length;t=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(r){return n}}},76526:function(e,t,n){const r=n(10242).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},61642:function(e,t,n){const r=n(10242),o=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let a=n<<10;for(;r.getBCHDigit(a)-o>=0;)a^=1335<=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=a},27126:function(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,r=3,o=40,a=10;function i(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return r%3===0;case t.Patterns.PATTERN011:return(n+r)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2===0;case t.Patterns.PATTERN101:return n*r%2+n*r%3===0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2===0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,o=0,a=0,i=null,s=null;for(let c=0;c=5&&(r+=n+(o-5)),i=t,o=1),t=e.get(u,c),t===s?a++:(a>=5&&(r+=n+(a-5)),s=t,a=1)}o>=5&&(r+=n+(o-5)),a>=5&&(r+=n+(a-5))}return r},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r=10&&(1488===r||93===r)&&n++,a=a<<1&2047|e.get(i,o),i>=10&&(1488===a||93===a)&&n++}return n*o},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(r){return n}}},41085:function(e,t,n){const r=n(76910);function o(e){this.mode=r.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const o=this.data.length-t;o>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*o+1))},e.exports=o},26143:function(e,t,n){const r=n(69729);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let o=0;o=0;){const e=n[0];for(let a=0;a>a&1),a<6?e.set(a,8,i,!0):a<8?e.set(a+1,8,i,!0):e.set(r-15+a,8,i,!0),a<8?e.set(8,r-a-1,i,!0):a<9?e.set(8,15-a-1+1,i,!0):e.set(8,15-a-1,i,!0);e.set(r-8,8,1,!0)}function g(e,t,n){const o=new a;n.forEach((function(t){o.put(t.mode.bit,4),o.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(o)}));const i=8*(r.getSymbolTotalCodewords(e)-l.getTotalCodewordsCount(e,t));for(o.getLengthInBits()+4<=i&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const s=(i-o.getLengthInBits())/8;for(let r=0;r=0&&r<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===r||6===r)||r>=2&&r<=4&&o>=2&&o<=4?e.set(t+r,a+o,!0,!0):e.set(t+r,a+o,!1,!0))}}(p,t),function(e){const t=e.size;for(let n=8;n=7&&function(e,t){const n=e.size,r=f.getEncodedBits(t);let o,a,i;for(let s=0;s<18;s++)o=Math.floor(s/3),a=s%3+n-8-3,i=1===(r>>s&1),e.set(o,a,i,!0),e.set(a,o,i,!0)}(p,t),function(e,t){const n=e.size;let r=-1,o=n-1,a=7,i=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(o,s-n)){let r=!1;i>>a&1)),e.set(o,s-n,r),a--,-1===a&&(i++,a=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(p,d),isNaN(o)&&(o=u.getBestMask(p,b.bind(null,p,n))),u.applyMask(o,p),b(p,n,o),{modules:p,version:t,errorCorrectionLevel:n,maskPattern:o,segments:a}}t.create=function(e,t){if("undefined"===typeof e||""===e)throw new Error("No input text");let n,a,i=o.M;return"undefined"!==typeof t&&(i=o.from(t.errorCorrectionLevel,o.M),n=f.from(t.version),a=u.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),y(e,n,i,a)}},52882:function(e,t,n){const r=n(26143);function o(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),o=this.degree-n.length;if(o>0){const e=new Uint8Array(this.degree);return e.set(n,o),e}return n},e.exports=o},7007:function(e,t){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(o,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const a=new RegExp("^"+r+"$"),i=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return a.test(e)},t.testNumeric=function(e){return i.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},16130:function(e,t,n){const r=n(76910),o=n(41085),a=n(8260),i=n(43424),s=n(35442),c=n(7007),u=n(10242),l=n(65987);function d(e){return unescape(encodeURIComponent(e)).length}function f(e,t,n){const r=[];let o;for(;null!==(o=e.exec(n));)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function h(e){const t=f(c.NUMERIC,r.NUMERIC,e),n=f(c.ALPHANUMERIC,r.ALPHANUMERIC,e);let o,a;u.isKanjiModeEnabled()?(o=f(c.BYTE,r.BYTE,e),a=f(c.KANJI,r.KANJI,e)):(o=f(c.BYTE_KANJI,r.BYTE,e),a=[]);return t.concat(n,o,a).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function p(e,t){switch(t){case r.NUMERIC:return o.getBitsLength(e);case r.ALPHANUMERIC:return a.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return i.getBitsLength(e)}}function m(e,t){let n;const c=r.getBestModeForData(e);if(n=r.from(t,c),n!==r.BYTE&&n.bit=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(s))},t.rawSplit=function(e){return t.fromArray(h(e,u.isKanjiModeEnabled()))}},10242:function(e,t){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!==typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return"undefined"!==typeof n},t.toSJIS=function(e){return n(e)}},43114:function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},23103:function(e,t,n){const r=n(10242),o=n(35393),a=n(64908),i=n(76910),s=n(43114),c=r.getBCHDigit(7973);function u(e,t){return i.getCharCountIndicator(e,t)+4}function l(e,t){let n=0;return e.forEach((function(e){const r=u(e.mode,t);n+=r+e.getBitsLength()})),n}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!s.isValid(e))throw new Error("Invalid QR Code version");"undefined"===typeof n&&(n=i.BYTE);const a=8*(r.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t));if(n===i.MIXED)return a;const c=a-u(n,e);switch(n){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let r;const o=a.from(n,a.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(l(e,r)<=t.getCapacity(r,n,i.MIXED))return r}(e,o);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(r.mode,r.getLength(),o)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-c>=0;)t^=7973<':"",d="0&&u>0&&e[c-1]||(r+=i?a("M",u+n,.5+l+n):a("m",o,0),o=0,i=!1),u+1',f='viewBox="0 0 '+u+" "+u+'"',h=''+l+d+"\n";return"function"===typeof n&&n(null,h),h}},89653:function(e,t){function n(e){if("number"===typeof e&&(e=e.toString()),"string"!==typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t="undefined"===typeof e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:r,scale:r?4:o,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,a=n.modules.data,i=t.getScale(o,r),s=Math.floor((o+2*r.margin)*i),c=r.margin*i,u=[r.color.light,r.color.dark];for(let t=0;t=c&&n>=c&&t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(c){s=!0,o=c}finally{try{i||null==n.return||n.return()}finally{if(s)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"none";return e||t},L=function(){return!("undefined"===typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},D=function(e){var t=L();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},q=function(e,t,n,r){return function(e){for(var t=1;t1)&&!window.MSStream},Ce=function(){return D("iPad")},je=function(){return D("iPhone")},Ie=function(){return D("iPod")},Oe=function(e){return U(e)};function Te(e){var t=e||b,n=t.device,r=t.browser,o=t.os,a=t.engine,i=t.ua;return{isSmartTV:$(n),isConsole:Q(n),isWearable:K(n),isEmbedded:V(n),isMobileSafari:fe(r)||Ce(),isChromium:ce(r),isMobile:G(n)||Ce(),isMobileOnly:H(n),isTablet:z(n)||Ce(),isBrowser:W(n),isDesktop:W(n),isAndroid:X(o),isWinPhone:ne(o),isIOS:re(o)||Ce(),isChrome:ie(r),isFirefox:se(r),isSafari:de(r),isOpera:he(r),isIE:pe(r),osVersion:oe(o),osName:ae(o),fullBrowserVersion:ge(r),browserVersion:ye(r),browserName:ve(r),mobileVendor:J(n),mobileModel:Y(n),engineName:we(a),engineVersion:Ee(a),getUA:Oe(i),isEdge:ue(r)||xe(i),isYandex:le(r),deviceType:Z(n),isIOS13:Pe(),isIPad13:Ce(),isIPhone13:je(),isIPod13:Ie(),isElectron:Ae(),isEdgeChromium:xe(i),isLegacyEdge:ue(r)&&!xe(i),isWindows:ee(o),isMacOs:te(o),isMIUI:me(r),isSamsungBrowser:be(r)}}var Se=$(l),Be=Q(l),ke=K(l),_e=V(l),Ne=fe(c)||Ce(),Me=ce(c),Re=G(l)||Ce(),Fe=H(l),Ue=z(l)||Ce(),Le=W(l),De=W(l),qe=X(f),He=ne(f),ze=re(f)||Ce(),Ge=ie(c),$e=se(c),We=de(c),Ke=he(c),Qe=pe(c),Ve=oe(f),Je=ae(f),Ye=ge(c),Ze=ye(c),Xe=ve(c),et=J(l),tt=Y(l),nt=we(d),rt=Ee(d),ot=Oe(h),at=ue(c)||xe(h),it=le(c),st=Z(l),ct=Pe(),ut=Ce(),lt=je(),dt=Ie(),ft=Ae(),ht=xe(h),pt=ue(c)&&!xe(h),mt=ee(f),bt=te(f),gt=me(c),yt=be(c);function vt(e){var t=e||window.navigator.userAgent;return m(t)}t.tq=Re},80500:function(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 n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},70610:function(e){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},23451:function(e,t,n){var r;!function(o,a){"use strict";var i="function",s="undefined",c="object",u="string",l="major",d="model",f="name",h="type",p="vendor",m="version",b="architecture",g="console",y="mobile",v="tablet",w="smarttv",E="wearable",A="embedded",x="Amazon",P="Apple",C="ASUS",j="BlackBerry",I="Firefox",O="Google",T="Huawei",S="LG",B="Microsoft",k="Motorola",_="Opera",N="Samsung",M="Sharp",R="Sony",F="Xiaomi",U="Zebra",L="Facebook",D="Chromium OS",q="Mac OS",H=function(e){for(var t={},n=0;n0?2===s.length?typeof s[1]==i?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==i||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):a:this[s[0]]=l?s[1].call(this,l,s[2]):a:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):a):this[s]=l||a;d+=2}},K=function(e,t){for(var n in t)if(typeof t[n]===c&&t[n].length>0){for(var r=0;r2&&(e.model="iPad",e.type=v),e},this.getEngine=function(){var e={};return e.name=a,e.version=a,W.call(e,r,d.engine),e},this.getOS=function(){var e={};return e.name=a,e.version=a,W.call(e,r,d.os),f&&!e.name&&l&&"Unknown"!=l.platform&&(e.name=l.platform.replace(/chrome os/i,D).replace(/macos/i,q)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===u&&e.length>350?$(e,350):e,this},this.setUA(r),this};J.VERSION="1.0.35",J.BROWSER=H([f,m,l]),J.CPU=H([b]),J.DEVICE=H([d,p,h,g,y,w,v,E,A]),J.ENGINE=J.OS=H([f,m]),typeof t!==s?(e.exports&&(t=e.exports=J),t.UAParser=J):n.amdO?(r=function(){return J}.call(t,n,t,e))===a||(e.exports=r):typeof o!==s&&(o.UAParser=J);var Y=typeof o!==s&&(o.jQuery||o.Zepto);if(Y&&!Y.ua){var Z=new J;Y.ua=Z.getResult(),Y.ua.get=function(){return Z.getUA()},Y.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var n in t)Y.ua[n]=t[n]}}}("object"===typeof window?window:this)},53250:function(e,t,n){"use strict";var r=n(67294);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=r.useState,i=r.useEffect,s=r.useLayoutEffect,c=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(r){return!0}}var l="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),o=r[0].inst,l=r[1];return s((function(){o.value=n,o.getSnapshot=t,u(o)&&l({inst:o})}),[e,n,t]),i((function(){return u(o)&&l({inst:o}),e((function(){u(o)&&l({inst:o})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},50139:function(e,t,n){"use strict";var r=n(67294),o=n(61688);var a="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},i=o.useSyncExternalStore,s=r.useRef,c=r.useEffect,u=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=u((function(){function e(e){if(!c){if(c=!0,i=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return s=t}return s=e}if(t=s,a(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,s=n)}var i,s,c=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var h=i(e,d[0],d[1]);return c((function(){f.hasValue=!0,f.value=h}),[h]),l(h),h}},61688:function(e,t,n){"use strict";e.exports=n(53250)},52798:function(e,t,n){"use strict";e.exports=n(50139)},32286:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const r=n(67556),o=n(86226),a=n(49575);function i(e){return{hash:e,hmac:(t,...n)=>(0,r.hmac)(e,t,(0,o.concatBytes)(...n)),randomBytes:o.randomBytes}}t.getHash=i,t.createCurve=function(e,t){const n=t=>(0,a.weierstrass)({...e,...i(t)});return Object.freeze({...n(t),create:n})}},68886:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const r=n(3188),o=n(41830),a=BigInt(0),i=BigInt(1);t.wNAF=function(e,t){const n=(e,t)=>{const n=t.negate();return e?n:t},r=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,o=t;for(;n>a;)n&i&&(r=r.add(o)),o=o.double(),n>>=i;return r},precomputeWindow(e,t){const{windows:n,windowSize:o}=r(t),a=[];let i=e,s=i;for(let r=0;r>=h,r>c&&(r-=f,a+=i);const s=t,p=t+Math.abs(r)-1,m=e%2!==0,b=r<0;0===r?l=l.add(n(m,o[s])):u=u.add(n(b,o[p]))}return{p:u,f:l}},wNAFCached(e,t,n,r){const o=e._WINDOW_SIZE||1;let a=t.get(e);return a||(a=this.precomputeWindow(e,o),1!==o&&t.set(e,r(a))),this.wNAF(o,a,n)}}},t.validateBasic=function(e){return(0,r.validateField)(e.Fp),(0,o.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,r.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},11534:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const r=n(3188),o=n(41830);const a=o.bytesToNumberBE;function i(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const n=Array.from({length:t}).fill(0);for(let r=t-1;r>=0;r--)n[r]=255&e,e>>>=8;return new Uint8Array(n)}function s(e,t){const n=new Uint8Array(e.length);for(let r=0;r255&&(t=r((0,o.concatBytes)((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:a,blockLen:l}=r,d=Math.ceil(n/a);if(d>255)throw new Error("Invalid xmd length");const f=(0,o.concatBytes)(t,i(t.length,1)),h=i(0,l),p=i(n,2),m=new Array(d),b=r((0,o.concatBytes)(h,e,p,i(0,1),f));m[0]=r((0,o.concatBytes)(b,i(1,1),f));for(let c=1;c<=d;c++){const e=[s(b,m[c-1]),i(c+1,1),f];m[c]=r((0,o.concatBytes)(...e))}return(0,o.concatBytes)(...m).slice(0,n)}function d(e,t,n,r,a){if(c(e),c(t),u(n),t.length>255){const e=Math.ceil(2*r/8);t=a.create({dkLen:e}).update((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return a.create({dkLen:n}).update(e).update(i(n,2)).update(t).update(i(t.length,1)).digest()}function f(e,t,n){(0,o.validateObject)(n,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:i,k:s,m:f,hash:h,expand:p,DST:m}=n;c(e),u(t);const b=function(e){if(e instanceof Uint8Array)return e;if("string"===typeof e)return(0,o.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(m),g=i.toString(2).length,y=Math.ceil((g+s)/8),v=t*f*y;let w;if("xmd"===p)w=l(e,b,v,h);else if("xof"===p)w=d(e,b,v,s,h);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');w=e}const E=new Array(t);for(let o=0;oArray.from(e).reverse()));return(t,r)=>{const[o,a,i,s]=n.map((n=>n.reduce(((n,r)=>e.add(e.mul(n,t),r)))));return t=e.div(o,a),r=e.mul(r,e.div(i,s)),{x:t,y:r}}},t.createHasher=function(e,t,n){if("function"!==typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(r,o){const a=f(r,2,{...n,DST:n.DST,...o}),i=e.fromAffine(t(a[0])),s=e.fromAffine(t(a[1])),c=i.add(s).clearCofactor();return c.assertValidity(),c},encodeToCurve(r,o){const a=f(r,1,{...n,DST:n.encodeDST,...o}),i=e.fromAffine(t(a[0])).clearCofactor();return i.assertValidity(),i}}}},3188:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const r=n(41830),o=BigInt(0),a=BigInt(1),i=BigInt(2),s=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);BigInt(9),BigInt(16);function d(e,t){const n=e%t;return n>=o?n:t+n}function f(e,t,n){if(n<=o||t 0");if(n===a)return o;let r=a;for(;t>o;)t&a&&(r=r*e%n),e=e*e%n,t>>=a;return r}function h(e,t){if(e===o||t<=o)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=d(e,t),r=t,i=o,s=a,c=a,u=o;for(;n!==o;){const e=r/n,t=r%n,o=i-c*e,a=s-u*e;r=n,n=t,i=c,s=u,c=o,u=a}if(r!==a)throw new Error("invert: does not exist");return d(i,t)}function p(e){const t=(e-a)/i;let n,r,s;for(n=e-a,r=0;n%i===o;n/=i,r++);for(s=i;so;)r*=r,r%=n;return r},t.invert=h,t.tonelliShanks=p,t.FpSqrt=m;t.isNegativeLE=(e,t)=>(d(e,t)&a)===a;const b=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function g(e,t,n){if(n 0");if(n===o)return e.ONE;if(n===a)return t;let r=e.ONE,i=t;for(;n>o;)n&a&&(r=e.mul(r,i)),i=e.sqr(i),n>>=a;return r}function y(e,t){const n=new Array(t.length),r=t.reduce(((t,r,o)=>e.is0(r)?t:(n[o]=t,e.mul(t,r))),e.ONE),o=e.inv(r);return t.reduceRight(((t,r,o)=>e.is0(r)?t:(n[o]=e.mul(t,n[o]),e.mul(t,r))),o),n}function v(e,t){const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}t.validateField=function(e){const t=b.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,r.validateObject)(e,t)},t.FpPow=g,t.FpInvertBatch=y,t.FpDiv=function(e,t,n){return e.mul(t,"bigint"===typeof n?h(n,e.ORDER):e.inv(n))},t.FpIsSquare=function(e){const t=(e.ORDER-a)/i;return n=>{const r=e.pow(n,t);return e.eql(r,e.ZERO)||e.eql(r,e.ONE)}},t.nLength=v,t.Field=function(e,t,n=!1,i={}){if(e<=o)throw new Error(`Expected Fp ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:c}=v(e,t);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");const u=m(e),l=Object.freeze({ORDER:e,BITS:s,BYTES:c,MASK:(0,r.bitMask)(s),ZERO:o,ONE:a,create:t=>d(t,e),isValid:t=>{if("bigint"!==typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return o<=t&&te===o,isOdd:e=>(e&a)===a,neg:t=>d(-t,e),eql:(e,t)=>e===t,sqr:t=>d(t*t,e),add:(t,n)=>d(t+n,e),sub:(t,n)=>d(t-n,e),mul:(t,n)=>d(t*n,e),pow:(e,t)=>g(l,e,t),div:(t,n)=>d(t*h(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>h(t,e),sqrt:i.sqrt||(e=>u(l,e)),invertBatch:e=>y(l,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?(0,r.numberToBytesLE)(e,c):(0,r.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n},t.hashToPrivateScalar=function(e,t,n=!1){const o=(e=(0,r.ensureBytes)("privateHash",e)).length,i=v(t).nByteLength+8;if(i<24||o1024)throw new Error(`hashToPrivateScalar: expected ${i}-1024 bytes of input, got ${o}`);return d(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-a)+a}},41830:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const n=BigInt(0),r=BigInt(1),o=BigInt(2),a=e=>e instanceof Uint8Array,i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function s(e){if(!a(e))throw new Error("Uint8Array expected");let t="";for(let n=0;ne+t.length),0));let n=0;return e.forEach((e=>{if(!a(e))throw new Error("Uint8Array expected");t.set(e,n),n+=e.length})),t}t.bytesToHex=s,t.numberToHexUnpadded=c,t.hexToNumber=u,t.hexToBytes=l,t.bytesToNumberBE=function(e){return u(s(e))},t.bytesToNumberLE=function(e){if(!a(e))throw new Error("Uint8Array expected");return u(s(Uint8Array.from(e).reverse()))},t.numberToBytesBE=d,t.numberToBytesLE=function(e,t){return d(e,t).reverse()},t.numberToVarBytesBE=function(e){return l(c(e))},t.ensureBytes=function(e,t,n){let r;if("string"===typeof t)try{r=l(t)}catch(i){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${i}`)}else{if(!a(t))throw new Error(`${e} must be hex string or Uint8Array`);r=Uint8Array.from(t)}const o=r.length;if("number"===typeof n&&o!==n)throw new Error(`${e} expected ${n} bytes, got ${o}`);return r},t.concatBytes=f,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let n=0;nn;e>>=r,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&r};t.bitSet=(e,t,o)=>e|(o?r:n)<(o<new Uint8Array(e),p=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,n){if("number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!==typeof n)throw new Error("hmacFn must be a function");let r=h(e),o=h(e),a=0;const i=()=>{r.fill(1),o.fill(0),a=0},s=(...e)=>n(o,r,...e),c=(e=h())=>{o=s(p([0]),e),r=s(),0!==e.length&&(o=s(p([1]),e),r=s())},u=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e{let n;for(i(),c(e);!(n=t(u()));)c();return i(),n}};const m={bigint:e=>"bigint"===typeof e,function:e=>"function"===typeof e,boolean:e=>"boolean"===typeof e,string:e=>"string"===typeof e,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"===typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,n={}){const r=(t,n,r)=>{const o=m[n];if("function"!==typeof o)throw new Error(`Invalid validator "${n}", expected function`);const a=e[t];if((!r||void 0!==a)&&!o(a,e))throw new Error(`Invalid param ${String(t)}=${a} (${typeof a}), expected ${n}`)};for(const[o,a]of Object.entries(t))r(o,a,!1);for(const[o,a]of Object.entries(n))r(o,a,!0);return e}},49575:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const r=n(3188),o=n(41830),a=n(41830),i=n(68886);const{bytesToNumberBE:s,hexToBytes:c}=o;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:n}=t.DER;if(e.length<2||2!==e[0])throw new n("Invalid signature integer tag");const r=e[1],o=e.subarray(2,r+2);if(!r||o.length!==r)throw new n("Invalid signature integer: wrong length");if(128&o[0])throw new n("Invalid signature integer: negative");if(0===o[0]&&!(128&o[1]))throw new n("Invalid signature integer: unnecessary leading zero");return{d:s(o),l:e.subarray(r+2)}},toSig(e){const{Err:n}=t.DER,r="string"===typeof e?c(e):e;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let o=r.length;if(o<2||48!=r[0])throw new n("Invalid signature tag");if(r[1]!==o-2)throw new n("Invalid signature: incorrect length");const{d:a,l:i}=t.DER._parseInt(r.subarray(2)),{d:s,l:u}=t.DER._parseInt(i);if(u.length)throw new n("Invalid signature: left bytes after parsing");return{r:a,s:s}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,n=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},r=t(n(e.s)),o=t(n(e.r)),a=r.length/2,i=o.length/2,s=n(a),c=n(i);return`30${n(i+a+4)}02${c}${o}02${s}${r}`}};const u=BigInt(0),l=BigInt(1),d=BigInt(2),f=BigInt(3),h=BigInt(4);function p(e){const t=function(e){const t=(0,i.validateBasic)(e);o.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:a}=t;if(n){if(!r.eql(a,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==typeof n||"bigint"!==typeof n.beta||"function"!==typeof n.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=t,s=t.toBytes||((e,t,r)=>{const a=t.toAffine();return o.concatBytes(Uint8Array.from([4]),n.toBytes(a.x),n.toBytes(a.y))}),c=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function d(e){const{a:r,b:o}=t,a=n.sqr(e),i=n.mul(a,e);return n.add(n.add(i,n.mul(e,r)),o)}if(!n.eql(n.sqr(t.Gy),d(t.Gx)))throw new Error("bad generator point: equation left != right");function h(e){return"bigint"===typeof e&&un.eql(e,n.ZERO);return o(t)&&o(r)?y.ZERO:new y(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(y.fromAffine)}static fromHex(e){const t=y.fromAffine(c((0,a.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return y.BASE.multiply(m(e))}_setWindowSize(e){this._WINDOW_SIZE=e,b.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:e,y:r}=this.toAffine();if(!n.isValid(e)||!n.isValid(r))throw new Error("bad point: x or y not FE");const o=n.sqr(r),a=d(e);if(!n.eql(o,a))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){g(e);const{px:t,py:r,pz:o}=this,{px:a,py:i,pz:s}=e,c=n.eql(n.mul(t,s),n.mul(a,o)),u=n.eql(n.mul(r,s),n.mul(i,o));return c&&u}negate(){return new y(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,o=n.mul(r,f),{px:a,py:i,pz:s}=this;let c=n.ZERO,u=n.ZERO,l=n.ZERO,d=n.mul(a,a),h=n.mul(i,i),p=n.mul(s,s),m=n.mul(a,i);return m=n.add(m,m),l=n.mul(a,s),l=n.add(l,l),c=n.mul(e,l),u=n.mul(o,p),u=n.add(c,u),c=n.sub(h,u),u=n.add(h,u),u=n.mul(c,u),c=n.mul(m,c),l=n.mul(o,l),p=n.mul(e,p),m=n.sub(d,p),m=n.mul(e,m),m=n.add(m,l),l=n.add(d,d),d=n.add(l,d),d=n.add(d,p),d=n.mul(d,m),u=n.add(u,d),p=n.mul(i,s),p=n.add(p,p),d=n.mul(p,m),c=n.sub(c,d),l=n.mul(p,h),l=n.add(l,l),l=n.add(l,l),new y(c,u,l)}add(e){g(e);const{px:r,py:o,pz:a}=this,{px:i,py:s,pz:c}=e;let u=n.ZERO,l=n.ZERO,d=n.ZERO;const h=t.a,p=n.mul(t.b,f);let m=n.mul(r,i),b=n.mul(o,s),v=n.mul(a,c),w=n.add(r,o),E=n.add(i,s);w=n.mul(w,E),E=n.add(m,b),w=n.sub(w,E),E=n.add(r,a);let A=n.add(i,c);return E=n.mul(E,A),A=n.add(m,v),E=n.sub(E,A),A=n.add(o,a),u=n.add(s,c),A=n.mul(A,u),u=n.add(b,v),A=n.sub(A,u),d=n.mul(h,E),u=n.mul(p,v),d=n.add(u,d),u=n.sub(b,d),d=n.add(b,d),l=n.mul(u,d),b=n.add(m,m),b=n.add(b,m),v=n.mul(h,v),E=n.mul(p,E),b=n.add(b,v),v=n.sub(m,v),v=n.mul(h,v),E=n.add(E,v),m=n.mul(b,E),l=n.add(l,m),m=n.mul(A,E),u=n.mul(w,u),u=n.sub(u,m),m=n.mul(w,b),d=n.mul(A,d),d=n.add(d,m),new y(u,l,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(y.ZERO)}wNAF(e){return w.wNAFCached(this,b,e,(e=>{const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(y.fromAffine)}))}multiplyUnsafe(e){const r=y.ZERO;if(e===u)return r;if(p(e),e===l)return this;const{endo:o}=t;if(!o)return w.unsafeLadder(this,e);let{k1neg:a,k1:i,k2neg:s,k2:c}=o.splitScalar(e),d=r,f=r,h=this;for(;i>u||c>u;)i&l&&(d=d.add(h)),c&l&&(f=f.add(h)),h=h.double(),i>>=l,c>>=l;return a&&(d=d.negate()),s&&(f=f.negate()),f=new y(n.mul(f.px,o.beta),f.py,f.pz),d.add(f)}multiply(e){p(e);let r,o,a=e;const{endo:i}=t;if(i){const{k1neg:e,k1:t,k2neg:s,k2:c}=i.splitScalar(a);let{p:u,f:l}=this.wNAF(t),{p:d,f:f}=this.wNAF(c);u=w.constTimeNegate(e,u),d=w.constTimeNegate(s,d),d=new y(n.mul(d.px,i.beta),d.py,d.pz),r=u.add(d),o=l.add(f)}else{const{p:e,f:t}=this.wNAF(a);r=e,o=t}return y.normalizeZ([r,o])[0]}multiplyAndAddUnsafe(e,t,n){const r=y.BASE,o=(e,t)=>t!==u&&t!==l&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),a=o(this,t).add(o(e,n));return a.is0()?void 0:a}toAffine(e){const{px:t,py:r,pz:o}=this,a=this.is0();null==e&&(e=a?n.ONE:n.inv(o));const i=n.mul(t,e),s=n.mul(r,e),c=n.mul(o,e);if(a)return{x:n.ZERO,y:n.ZERO};if(!n.eql(c,n.ONE))throw new Error("invZ was invalid");return{x:i,y:s}}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===l)return!0;if(n)return n(y,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===l?this:n?n(y,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),s(y,this,e)}toHex(e=!0){return o.bytesToHex(this.toRawBytes(e))}}y.BASE=new y(t.Gx,t.Gy,n.ONE),y.ZERO=new y(n.ZERO,n.ONE,n.ZERO);const v=t.nBitLength,w=(0,i.wNAF)(y,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:y,normPrivateKeyToScalar:m,weierstrassEquation:d,isWithinCurveOrder:h}}function m(e,t){const n=e.ORDER;let r=u;for(let f=n-l;f%d===u;f/=d)r+=l;const o=r,a=d<{let r=b,a=e.pow(n,p),i=e.sqr(a);i=e.mul(i,n);let s=e.mul(t,i);s=e.pow(s,c),s=e.mul(s,a),a=e.mul(s,n),i=e.mul(s,t);let u=e.mul(i,a);s=e.pow(u,m);let f=e.eql(s,e.ONE);a=e.mul(i,g),s=e.mul(u,r),i=e.cmov(a,i,f),u=e.cmov(s,u,f);for(let c=o;c>l;c--){let t=c-d;t=d<{let a=e.sqr(o);const i=e.mul(t,o);a=e.mul(a,i);let s=e.pow(a,n);s=e.mul(s,i);const c=e.mul(s,r),u=e.mul(e.sqr(s),o),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,s,l)}}}return y}t.weierstrassPoints=p,t.weierstrass=function(e){const n=function(e){const t=(0,i.validateBasic)(e);return o.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:s,n:c}=n,d=s.BYTES+1,f=2*s.BYTES+1;function h(e){return r.mod(e,c)}function m(e){return r.invert(e,c)}const{ProjectivePoint:b,normPrivateKeyToScalar:g,weierstrassEquation:y,isWithinCurveOrder:v}=p({...n,toBytes(e,t,n){const r=t.toAffine(),a=s.toBytes(r.x),i=o.concatBytes;return n?i(Uint8Array.from([t.hasEvenY()?2:3]),a):i(Uint8Array.from([4]),a,s.toBytes(r.y))},fromBytes(e){const t=e.length,n=e[0],r=e.subarray(1);if(t!==d||2!==n&&3!==n){if(t===f&&4===n){return{x:s.fromBytes(r.subarray(0,s.BYTES)),y:s.fromBytes(r.subarray(s.BYTES,2*s.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${d} compressed bytes or ${f} uncompressed bytes`)}{const e=o.bytesToNumberBE(r);if(!(u<(a=e)&&ao.bytesToHex(o.numberToBytesBE(e,n.nByteLength));function E(e){return e>c>>l}const A=(e,t,n)=>o.bytesToNumberBE(e.slice(t,n));class x{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const t=n.nByteLength;return e=(0,a.ensureBytes)("compactSignature",e,2*t),new x(A(e,0,t),A(e,t,2*t))}static fromDER(e){const{r:n,s:r}=t.DER.toSig((0,a.ensureBytes)("DER",e));return new x(n,r)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new x(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:r,recovery:o}=this,i=I((0,a.ensureBytes)("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const c=2===o||3===o?t+n.n:t;if(c>=s.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=0===(1&o)?"02":"03",l=b.fromHex(u+w(c)),d=m(c),f=h(-i*d),p=h(r*d),g=b.BASE.multiplyAndAddUnsafe(l,f,p);if(!g)throw new Error("point at infinify");return g.assertValidity(),g}hasHighS(){return E(this.s)}normalizeS(){return this.hasHighS()?new x(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const P={isValidPrivateKey(e){try{return g(e),!0}catch(t){return!1}},normPrivateKeyToScalar:g,randomPrivateKey:()=>{const e=n.randomBytes(s.BYTES+8),t=r.hashToPrivateScalar(e,c);return o.numberToBytesBE(t,n.nByteLength)},precompute:(e=8,t=b.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function C(e){const t=e instanceof Uint8Array,n="string"===typeof e,r=(t||n)&&e.length;return t?r===d||r===f:n?r===2*d||r===2*f:e instanceof b}const j=n.bits2int||function(e){const t=o.bytesToNumberBE(e),r=8*e.length-n.nBitLength;return r>0?t>>BigInt(r):t},I=n.bits2int_modN||function(e){return h(j(e))},O=o.bitMask(n.nBitLength);function T(e){if("bigint"!==typeof e)throw new Error("bigint expected");if(!(u<=e&&ee in r)))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:c}=n;let{lowS:d,prehash:f,extraEntropy:p}=r;null==d&&(d=!0),e=(0,a.ensureBytes)("msgHash",e),f&&(e=(0,a.ensureBytes)("prehashed msgHash",i(e)));const y=I(e),w=g(t),A=[T(w),T(y)];if(null!=p){const e=!0===p?c(s.BYTES):p;A.push((0,a.ensureBytes)("extraEntropy",e,s.BYTES))}const P=o.concatBytes(...A),C=y;return{seed:P,k2sig:function(e){const t=j(e);if(!v(t))return;const n=m(t),r=b.BASE.multiply(t).toAffine(),o=h(r.x);if(o===u)return;const a=h(n*h(C+o*w));if(a===u)return;let i=(r.x===o?0:2)|Number(r.y&l),s=a;return d&&E(a)&&(s=function(e){return E(e)?h(-e):e}(a),i^=1),new x(o,s,i)}}}const B={lowS:n.lowS,prehash:!1},k={lowS:n.lowS,prehash:!1};return b.BASE._setWindowSize(8),{CURVE:n,getPublicKey:function(e,t=!0){return b.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(C(e))throw new Error("first arg must be private key");if(!C(t))throw new Error("second arg must be public key");return b.fromHex(t).multiply(g(e)).toRawBytes(n)},sign:function(e,t,r=B){const{seed:a,k2sig:i}=S(e,t,r),s=n;return o.createHmacDrbg(s.hash.outputLen,s.nByteLength,s.hmac)(a,i)},verify:function(e,r,o,i=k){const s=e;if(r=(0,a.ensureBytes)("msgHash",r),o=(0,a.ensureBytes)("publicKey",o),"strict"in i)throw new Error("options.strict was renamed to lowS");const{lowS:c,prehash:u}=i;let l,d;try{if("string"===typeof s||s instanceof Uint8Array)try{l=x.fromDER(s)}catch(A){if(!(A instanceof t.DER.Err))throw A;l=x.fromCompact(s)}else{if("object"!==typeof s||"bigint"!==typeof s.r||"bigint"!==typeof s.s)throw new Error("PARSE");{const{r:e,s:t}=s;l=new x(e,t)}}d=b.fromHex(o)}catch(P){if("PARSE"===P.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&l.hasHighS())return!1;u&&(r=n.hash(r));const{r:f,s:p}=l,g=I(r),y=m(p),v=h(g*y),w=h(f*y),E=b.BASE.multiplyAndAddUnsafe(d,v,w)?.toAffine();return!!E&&h(E.x)===f},ProjectivePoint:b,Signature:x,utils:P}},t.SWUFpSqrtRatio=m,t.mapToCurveSimpleSWU=function(e,t){if(r.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const n=m(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let o,a,i,s,c,u,l,d;o=e.sqr(r),o=e.mul(o,t.Z),a=e.sqr(o),a=e.add(a,o),i=e.add(a,e.ONE),i=e.mul(i,t.B),s=e.cmov(t.Z,e.neg(a),!e.eql(a,e.ZERO)),s=e.mul(s,t.A),a=e.sqr(i),u=e.sqr(s),c=e.mul(u,t.A),a=e.add(a,c),a=e.mul(a,i),u=e.mul(u,s),c=e.mul(u,t.B),a=e.add(a,c),l=e.mul(o,i);const{isValid:f,value:h}=n(a,u);d=e.mul(o,r),d=e.mul(d,h),l=e.cmov(l,i,f),d=e.cmov(d,h,f);const p=e.isOdd(r)===e.isOdd(d);return d=e.cmov(e.neg(d),d,p),l=e.div(l,s),{x:l,y:d}}}},54791:function(e,t){"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function r(e){if("boolean"!==typeof e)throw new Error(`Expected boolean, not ${e}`)}function o(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function a(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function i(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){o(e);const n=t.outputLen;if(e.lengtha-s&&(this.process(n,0),s=0);for(let r=s;r>o&a),s=Number(n&a),c=r?4:0,u=r?0:4;e.setUint32(t+c,i,r),e.setUint32(t+u,s,r)}(n,a-8,BigInt(8*this.length),i),this.process(n,0);const c=(0,o.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let r=0;ra?e.create().update(n).digest():n);for(let r=0;rnew a(e,t).update(n).digest(),t.hmac.create=(e,t)=>new a(e,t)},33271:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const r=n(72529),o=n(86226),a=(e,t,n)=>e&t^e&n^t&n,i=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 r.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:n,D:r,E:o,F:a,G:i,H:s}=this;return[e,t,n,r,o,a,i,s]}set(e,t,n,r,o,a,i,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|a,this.G=0|i,this.H=0|s}process(e,t){for(let o=0;o<16;o++,t+=4)c[o]=e.getUint32(t,!1);for(let a=16;a<64;a++){const e=c[a-15],t=c[a-2],n=(0,o.rotr)(e,7)^(0,o.rotr)(e,18)^e>>>3,r=(0,o.rotr)(t,17)^(0,o.rotr)(t,19)^t>>>10;c[a]=r+c[a-7]+n+c[a-16]|0}let{A:n,B:r,C:s,D:u,E:l,F:d,G:f,H:h}=this;for(let m=0;m<64;m++){const e=h+((0,o.rotr)(l,6)^(0,o.rotr)(l,11)^(0,o.rotr)(l,25))+((p=l)&d^~p&f)+i[m]+c[m]|0,t=((0,o.rotr)(n,2)^(0,o.rotr)(n,13)^(0,o.rotr)(n,22))+a(n,r,s)|0;h=f,f=d,d=l,l=u+e|0,u=s,s=r,r=n,n=e+t|0}var p;n=n+this.A|0,r=r+this.B|0,s=s+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,r,s,u,l,d,f,h)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,o.wrapConstructor)((()=>new u)),t.sha224=(0,o.wrapConstructor)((()=>new l))},86226:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=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 r=n(39153),o=e=>e instanceof Uint8Array;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);if(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 a=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n{},t.asyncLoop=async function(e,n,r){let o=Date.now();for(let a=0;a=0&&ee+t.length),0));let n=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,n),n+=e.length})),t};t.Hash=class{clone(){return this._cloneInto()}};t.checkOpts=function(e,t){if(void 0!==t&&("object"!==typeof t||(n=t,"[object Object]"!==Object.prototype.toString.call(n)||n.constructor!==Object)))throw new Error("Options should be object or undefined");var n;return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(s(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(s(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(s(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(r.crypto&&"function"===typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},20050:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const r=n(33271),o=n(86226),a=n(3188),i=n(49575),s=n(41830),c=n(11534),u=n(32286),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f=BigInt(1),h=BigInt(2),p=(e,t)=>(e+t/h)/t;function m(e){const t=l,n=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),s=BigInt(23),c=BigInt(44),u=BigInt(88),d=e*e*e%t,f=d*d*e%t,p=(0,a.pow2)(f,n,t)*f%t,m=(0,a.pow2)(p,n,t)*f%t,g=(0,a.pow2)(m,h,t)*d%t,y=(0,a.pow2)(g,o,t)*g%t,v=(0,a.pow2)(y,i,t)*y%t,w=(0,a.pow2)(v,c,t)*v%t,E=(0,a.pow2)(w,u,t)*w%t,A=(0,a.pow2)(E,c,t)*v%t,x=(0,a.pow2)(A,n,t)*f%t,P=(0,a.pow2)(x,s,t)*y%t,C=(0,a.pow2)(P,r,t)*d%t,j=(0,a.pow2)(C,h,t);if(!b.eql(b.sqr(j),e))throw new Error("Cannot find square root");return j}const b=(0,a.Field)(l,void 0,void 0,{sqrt:m});t.secp256k1=(0,u.createCurve)({a:BigInt(0),b:BigInt(7),Fp:b,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=d,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,s=BigInt("0x100000000000000000000000000000000"),c=p(i*e,t),u=p(-r*e,t);let l=(0,a.mod)(e-c*n-u*o,t),h=(0,a.mod)(-c*r-u*i,t);const m=l>s,b=h>s;if(m&&(l=t-l),b&&(h=t-h),l>s||h>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:m,k1:l,k2neg:b,k2:h}}}},r.sha256);const g=BigInt(0),y=e=>"bigint"===typeof e&&ge.charCodeAt(0))));n=(0,s.concatBytes)(t,t),v[e]=n}return(0,r.sha256)((0,s.concatBytes)(n,...t))}const E=e=>e.toRawBytes(!0).slice(1),A=e=>(0,s.numberToBytesBE)(e,32),x=e=>(0,a.mod)(e,l),P=e=>(0,a.mod)(e,d),C=t.secp256k1.ProjectivePoint;function j(e){let n=t.secp256k1.utils.normPrivateKeyToScalar(e),r=C.fromPrivateKey(n);return{scalar:r.hasEvenY()?n:P(-n),bytes:E(r)}}function I(e){if(!y(e))throw new Error("bad x: need 0 < x < p");const t=x(e*e);let n=m(x(t*e+BigInt(7)));n%h!==g&&(n=x(-n));const r=new C(e,n,f);return r.assertValidity(),r}function O(...e){return P((0,s.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function T(e){return j(e).bytes}function S(e,t,n=(0,o.randomBytes)(32)){const r=(0,s.ensureBytes)("message",e),{bytes:a,scalar:i}=j(t),c=(0,s.ensureBytes)("auxRand",n,32),u=A(i^(0,s.bytesToNumberBE)(w("BIP0340/aux",c))),l=w("BIP0340/nonce",u,a,r),d=P((0,s.bytesToNumberBE)(l));if(d===g)throw new Error("sign failed: k is zero");const{bytes:f,scalar:h}=j(d),p=O(f,a,r),m=new Uint8Array(64);if(m.set(f,0),m.set(A(P(h+p*i)),32),!B(m,r,a))throw new Error("sign: Invalid signature produced");return m}function B(e,t,n){const r=(0,s.ensureBytes)("signature",e,64),o=(0,s.ensureBytes)("message",t),a=(0,s.ensureBytes)("publicKey",n,32);try{const e=I((0,s.bytesToNumberBE)(a)),t=(0,s.bytesToNumberBE)(r.subarray(0,32));if(!y(t))return!1;const n=(0,s.bytesToNumberBE)(r.subarray(32,64));if(!("bigint"===typeof(l=n)&&g(0,c.isogenyMap)(b,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),_=(()=>(0,i.mapToCurveSimpleSWU)(b,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:b.create(BigInt("-11"))}))(),N=(()=>(0,c.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:n}=_(b.create(e[0]));return k(t,n)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:b.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}))();t.hashToCurve=N.hashToCurve,t.encodeToCurve=N.encodeToCurve},71427:function(e,t){"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function r(e){if("boolean"!==typeof e)throw new Error(`Expected boolean, not ${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}`)}function a(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function i(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){o(e);const n=t.outputLen;if(e.length>r&n)}:{h:0|Number(e>>r&n),l:0|Number(e&n)}}function a(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let a=0;aBigInt(e>>>0)<>>0);function i(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}}t.add=i;const s={fromBig:o,split:a,toBig:t.toBig,shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:(e,t,n)=>e<>>32-n,rotlSL:(e,t,n)=>t<>>32-n,rotlBH:(e,t,n)=>t<>>64-n,rotlBL:(e,t,n)=>e<>>64-n,add:i,add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,add5H:(e,t,n,r,o,a)=>t+n+r+o+a+(e/2**32|0)|0,add5L:(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0)};t.default=s},922:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},7217:function(e,t,n){"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 r=n(71427),o=n(30066),a=n(74574),[i,s,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),d=BigInt(2),f=BigInt(7),h=BigInt(256),p=BigInt(113);for(let x=0,P=l,C=1,j=0;x<24;x++){[C,j]=[j,(2*C+3*j)%5],i.push(2*(5*j+C)),s.push((x+1)*(x+2)/2%64);let e=u;for(let t=0;t<7;t++)P=(P<>f)*p)%h,P&d&&(e^=l<<(l<n>32?o.default.rotlBH(e,t,n):o.default.rotlSH(e,t,n),y=(e,t,n)=>n>32?o.default.rotlBL(e,t,n):o.default.rotlSL(e,t,n);function v(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,o=(r+2)%10,a=n[o],i=n[o+1],s=g(a,i,1)^n[t],c=y(a,i,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=s,e[r+n+1]^=c}let t=e[2],o=e[3];for(let n=0;n<24;n++){const r=s[n],a=g(t,o,r),c=y(t,o,r),u=i[n];t=e[u],o=e[u+1],e[u]=a,e[u+1]=c}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=m[r],e[1]^=b[r]}n.fill(0)}t.keccakP=v;class w extends a.Hash{constructor(e,t,n,o=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=o,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,r.default.number(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,a.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){r.default.exists(this);const{blockLen:t,state:n}=this,o=(e=(0,a.toBytes)(e)).length;for(let r=0;r=n&&this.keccak();const a=Math.min(n-this.posOut,o-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return r.default.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(r.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:n,outputLen:r,rounds:o,enableXOF:a}=this;return e||(e=new w(t,n,r,a,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=r,e.enableXOF=a,e.destroyed=this.destroyed,e}}t.Keccak=w;const E=(e,t,n)=>(0,a.wrapConstructor)((()=>new w(t,e,n)));t.sha3_224=E(6,144,28),t.sha3_256=E(6,136,32),t.sha3_384=E(6,104,48),t.sha3_512=E(6,72,64),t.keccak_224=E(1,144,28),t.keccak_256=E(1,136,32),t.keccak_384=E(1,104,48),t.keccak_512=E(1,72,64);const A=(e,t,n)=>(0,a.wrapConstructorWithOpts)(((r={})=>new w(t,e,void 0===r.dkLen?n:r.dkLen,!0)));t.shake128=A(31,168,16),t.shake256=A(31,136,32)},74574:function(e,t,n){"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 r=n(922);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);if(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 o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let n=0;n{},t.asyncLoop=async function(e,n,r){let o=Date.now();for(let a=0;a=0&&ee 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),n=new Uint8Array(t);for(let r=0,o=0;re().update(i(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(i(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(r.crypto&&"function"===typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},35883:function(){},3975:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAccount=void 0,t.parseAccount=function(e){return"string"===typeof e?{address:e,type:"json-rpc"}:e}},3417:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publicKeyToAddress=void 0;const r=n(36556),o=n(75225);t.publicKeyToAddress=function(e){const t=(0,o.keccak256)(`0x${e.substring(4)}`).substring(26);return(0,r.checksumAddress)(`0x${t}`)}},22440:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsAddress=void 0;const r=n(28669),o=n(76286),a=n(22836),i=n(47797),s=n(80475),c=n(86308),u=n(19662),l=n(77863),d=n(72126),f=n(33531);t.getEnsAddress=async function(e,{blockNumber:t,blockTag:n,coinType:h,name:p,universalResolverAddress:m}){let b=m;if(!b){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");b=(0,i.getChainContractAddress)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const i=(0,a.encodeFunctionData)({abi:r.addressResolverAbi,functionName:"addr",...null!=h?{args:[(0,l.namehash)(p),BigInt(h)]}:{args:[(0,l.namehash)(p)]}}),u=await(0,f.readContract)(e,{address:b,abi:r.universalResolverResolveAbi,functionName:"resolve",args:[(0,c.toHex)((0,d.packetToBytes)(p)),i],blockNumber:t,blockTag:n});if("0x"===u[0])return null;const m=(0,s.trim)((0,o.decodeFunctionResult)({abi:r.addressResolverAbi,args:null!=h?[(0,l.namehash)(p),BigInt(h)]:void 0,functionName:"addr",data:u[0]}));return"0x"===m||"0x00"===(0,s.trim)(m)?null:m}catch(g){if((0,u.isNullUniversalResolverError)(g,"resolve"))return null;throw g}}},32637:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsAvatar=void 0;const r=n(18467),o=n(43896);t.getEnsAvatar=async function(e,{blockNumber:t,blockTag:n,gatewayUrls:a,name:i,universalResolverAddress:s}){const c=await(0,o.getEnsText)(e,{blockNumber:t,blockTag:n,key:"avatar",name:i,universalResolverAddress:s});if(!c)return null;try{return await(0,r.parseAvatarRecord)(e,{record:c,gatewayUrls:a})}catch{return null}}},59593:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsName=void 0;const r=n(28669),o=n(47797),a=n(86308),i=n(19662),s=n(72126),c=n(33531);t.getEnsName=async function(e,{address:t,blockNumber:n,blockTag:u,universalResolverAddress:l}){let d=l;if(!d){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");d=(0,o.getChainContractAddress)({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}const f=`${t.toLowerCase().substring(2)}.addr.reverse`;try{return(await(0,c.readContract)(e,{address:d,abi:r.universalResolverReverseAbi,functionName:"reverse",args:[(0,a.toHex)((0,s.packetToBytes)(f))],blockNumber:n,blockTag:u}))[0]}catch(h){if((0,i.isNullUniversalResolverError)(h,"reverse"))return null;throw h}}},12429:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsResolver=void 0;const r=n(47797),o=n(86308),a=n(72126),i=n(33531);t.getEnsResolver=async function(e,{blockNumber:t,blockTag:n,name:s,universalResolverAddress:c}){let u=c;if(!u){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");u=(0,r.getChainContractAddress)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const[l]=await(0,i.readContract)(e,{address:u,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,o.toHex)((0,a.packetToBytes)(s))],blockNumber:t,blockTag:n});return l}},43896:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsText=void 0;const r=n(28669),o=n(76286),a=n(22836),i=n(47797),s=n(86308),c=n(19662),u=n(77863),l=n(72126),d=n(33531);t.getEnsText=async function(e,{blockNumber:t,blockTag:n,name:f,key:h,universalResolverAddress:p}){let m=p;if(!m){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");m=(0,i.getChainContractAddress)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const i=await(0,d.readContract)(e,{address:m,abi:r.universalResolverResolveAbi,functionName:"resolve",args:[(0,s.toHex)((0,l.packetToBytes)(f)),(0,a.encodeFunctionData)({abi:r.textResolverAbi,functionName:"text",args:[(0,u.namehash)(f),h]})],blockNumber:t,blockTag:n});if("0x"===i[0])return null;const c=(0,o.decodeFunctionResult)({abi:r.textResolverAbi,functionName:"text",data:i[0]});return""===c?null:c}catch(b){if((0,c.isNullUniversalResolverError)(b,"resolve"))return null;throw b}}},28690:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventParameters=t.getFunctionParameters=t.getContract=void 0;const r=n(99985),o=n(37346),a=n(33531),i=n(63747),s=n(49488),c=n(97747);function u(e){const t=e.length&&Array.isArray(e[0]);return{args:t?e[0]:[],options:(t?e[1]:e[0])??{}}}function l(e,t){let n=!1;Array.isArray(e[0])?n=!0:1===e.length?n=t.inputs.some((e=>e.indexed)):2===e.length&&(n=!0);return{args:n?e[0]:void 0,options:(n?e[1]:e[0])??{}}}t.getContract=function({abi:e,address:t,publicClient:n,walletClient:d}){const f=void 0!==n&&null!==n,h=void 0!==d&&null!==d,p={};let m=!1,b=!1,g=!1;for(const r of e)if("function"===r.type?"view"===r.stateMutability||"pure"===r.stateMutability?m=!0:b=!0:"event"===r.type&&(g=!0),m&&b&&g)break;return f&&(m&&(p.read=new Proxy({},{get:(r,o)=>(...r)=>{const{args:i,options:s}=u(r);return(0,a.readContract)(n,{abi:e,address:t,functionName:o,args:i,...s})}})),b&&(p.simulate=new Proxy({},{get:(r,o)=>(...r)=>{const{args:a,options:s}=u(r);return(0,i.simulateContract)(n,{abi:e,address:t,functionName:o,args:a,...s})}})),g&&(p.createEventFilter=new Proxy({},{get:(o,a)=>(...o)=>{const i=e.find((e=>"event"===e.type&&e.name===a)),{args:s,options:c}=l(o,i);return(0,r.createContractEventFilter)(n,{abi:e,address:t,eventName:a,args:s,...c})}}),p.watchEvent=new Proxy({},{get:(r,o)=>(...r)=>{const a=e.find((e=>"event"===e.type&&e.name===o)),{args:i,options:c}=l(r,a);return(0,s.watchContractEvent)(n,{abi:e,address:t,eventName:o,args:i,...c})}}))),h&&b&&(p.write=new Proxy({},{get:(n,r)=>(...n)=>{const{args:o,options:a}=u(n);return(0,c.writeContract)(d,{abi:e,address:t,functionName:r,args:o,...a})}})),(f||h)&&b&&(p.estimateGas=new Proxy({},{get:(r,a)=>(...r)=>{const{args:i,options:s}=u(r),c=n??d;return(0,o.estimateContractGas)(c,{abi:e,address:t,functionName:a,args:i,...s,account:s.account??d.account})}})),p.address=t,p.abi=e,p},t.getFunctionParameters=u,t.getEventParameters=l},11273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRevertErrorData=t.call=void 0;const r=n(3975),o=n(28669),a=n(83984),i=n(26456),s=n(91363),c=n(9996),u=n(76286),l=n(22836),d=n(47797),f=n(86308),h=n(10133),p=n(82320),m=n(33270),b=n(48170),g=n(5434);function y(e){if(!(e instanceof i.BaseError))return;const t=e.walk();return"object"===typeof t.data?t.data.data:t.data}t.call=async function(e,t){const{account:i,batch:v=Boolean(e.batch?.multicall),blockNumber:w,blockTag:E="latest",accessList:A,data:x,gas:P,gasPrice:C,maxFeePerGas:j,maxPriorityFeePerGas:I,nonce:O,to:T,value:S,...B}=t,k=i?(0,r.parseAccount)(i):void 0;try{(0,g.assertRequest)(t);const n=(w?(0,f.numberToHex)(w):void 0)||E,r=e.chain?.formatters?.transactionRequest?.format||m.formatTransactionRequest,i=r({...(0,p.extract)(B,{format:r}),from:k?.address,accessList:A,data:x,gas:P,gasPrice:C,maxFeePerGas:j,maxPriorityFeePerGas:I,nonce:O,to:T,value:S});if(v&&function({request:e}){const{data:t,to:n,...r}=e;return!!t&&(!t.startsWith(a.aggregate3Signature)&&(!!n&&!(Object.values(r).filter((e=>"undefined"!==typeof e)).length>0)))}({request:i}))try{return await async function(e,t){const{batchSize:n=1024,wait:r=0}="object"===typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:a,blockTag:i="latest",data:h,multicallAddress:p,to:m}=t;let g=p;if(!g){if(!e.chain)throw new s.ClientChainNotConfiguredError;g=(0,d.getChainContractAddress)({blockNumber:a,chain:e.chain,contract:"multicall3"})}const y=(a?(0,f.numberToHex)(a):void 0)||i,{schedule:v}=(0,b.createBatchScheduler)({id:`${e.uid}.${y}`,wait:r,shouldSplitBatch(e){const t=e.reduce(((e,{data:t})=>e+(t.length-2)),0);return t>2*n},fn:async t=>{const n=t.map((e=>({allowFailure:!0,callData:e.data,target:e.to}))),r=(0,l.encodeFunctionData)({abi:o.multicall3Abi,args:[n],functionName:"aggregate3"}),a=await e.request({method:"eth_call",params:[{data:r,to:g},y]});return(0,u.decodeFunctionResult)({abi:o.multicall3Abi,args:[n],functionName:"aggregate3",data:a||"0x"})}}),[{returnData:w,success:E}]=await v({data:h,to:m});if(!E)throw new c.RawContractError({data:w});return"0x"===w?{data:void 0}:{data:w}}(e,{...i,blockNumber:w,blockTag:E})}catch(_){if(!(_ instanceof s.ClientChainNotConfiguredError)&&!(_ instanceof s.ChainDoesNotSupportContract))throw _}const h=await e.request({method:"eth_call",params:n?[i,n]:[i]});return"0x"===h?{data:void 0}:{data:h}}catch(_){const r=y(_),{offchainLookup:o,offchainLookupSignature:a}=await Promise.resolve().then(n.bind(n,64045));if(r?.slice(0,10)===a&&T)return{data:await o(e,{data:r,to:T})};throw(0,h.getCallError)(_,{...t,account:k,chain:e.chain})}},t.getRevertErrorData=y},46376:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBlockFilter=void 0;const r=n(44929);t.createBlockFilter=async function(e){const t=(0,r.createFilterRequestScope)(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}},99985:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createContractEventFilter=void 0;const r=n(7534),o=n(86308),a=n(44929);t.createContractEventFilter=async function(e,{address:t,abi:n,args:i,eventName:s,fromBlock:c,strict:u,toBlock:l}){const d=(0,a.createFilterRequestScope)(e,{method:"eth_newFilter"}),f=s?(0,r.encodeEventTopics)({abi:n,args:i,eventName:s}):void 0,h=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"===typeof c?(0,o.numberToHex)(c):c,toBlock:"bigint"===typeof l?(0,o.numberToHex)(l):l,topics:f}]});return{abi:n,args:i,eventName:s,id:h,request:d(h),strict:u,type:"event"}}},3200:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEventFilter=void 0;const r=n(7534),o=n(86308),a=n(44929);t.createEventFilter=async function(e,{address:t,args:n,event:i,events:s,fromBlock:c,strict:u,toBlock:l}={}){const d=s??(i?[i]:void 0),f=(0,a.createFilterRequestScope)(e,{method:"eth_newFilter"});let h=[];d&&(h=[d.flatMap((e=>(0,r.encodeEventTopics)({abi:[e],eventName:e.name,args:n})))],i&&(h=h[0]));const p=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"===typeof c?(0,o.numberToHex)(c):c,toBlock:"bigint"===typeof l?(0,o.numberToHex)(l):l,...h.length?{topics:h}:{}}]});return{abi:d,args:n,eventName:i?i.name:void 0,fromBlock:c,id:p,request:f(p),strict:u,toBlock:l,type:"event"}}},99792:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPendingTransactionFilter=void 0;const r=n(44929);t.createPendingTransactionFilter=async function(e){const t=(0,r.createFilterRequestScope)(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}},37346:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.estimateContractGas=void 0;const r=n(3975),o=n(22836),a=n(90042),i=n(23337);t.estimateContractGas=async function(e,{abi:t,address:n,args:s,functionName:c,...u}){const l=(0,o.encodeFunctionData)({abi:t,args:s,functionName:c});try{return await(0,i.estimateGas)(e,{data:l,to:n,...u})}catch(d){const e=u.account?(0,r.parseAccount)(u.account):void 0;throw(0,a.getContractError)(d,{abi:t,address:n,args:s,docsPath:"/docs/contract/estimateContractGas",functionName:c,sender:e?.address})}}},23337:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.estimateGas=void 0;const r=n(3975),o=n(26175),a=n(86308),i=n(54141),s=n(82320),c=n(33270),u=n(5434),l=n(40623);t.estimateGas=async function(e,t){const n=t.account??e.account;if(!n)throw new o.AccountNotFoundError({docsPath:"/docs/actions/public/estimateGas"});const d=(0,r.parseAccount)(n);try{const{accessList:n,blockNumber:r,blockTag:o,data:i,gas:f,gasPrice:h,maxFeePerGas:p,maxPriorityFeePerGas:m,nonce:b,to:g,value:y,...v}="local"===d.type?await(0,l.prepareRequest)(e,t):t,w=(r?(0,a.numberToHex)(r):void 0)||o;(0,u.assertRequest)(t);const E=e.chain?.formatters?.transactionRequest?.format||c.formatTransactionRequest,A=E({...(0,s.extract)(v,{format:E}),from:d.address,accessList:n,data:i,gas:f,gasPrice:h,maxFeePerGas:p,maxPriorityFeePerGas:m,nonce:b,to:g,value:y}),x=await e.request({method:"eth_estimateGas",params:w?[A,w]:[A]});return BigInt(x)}catch(f){throw(0,i.getEstimateGasError)(f,{...t,account:d,chain:e.chain})}}},85233:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBalance=void 0;const r=n(86308);t.getBalance=async function(e,{address:t,blockNumber:n,blockTag:o="latest"}){const a=n?(0,r.numberToHex)(n):void 0,i=await e.request({method:"eth_getBalance",params:[t,a||o]});return BigInt(i)}},29086:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlock=void 0;const r=n(54907),o=n(86308),a=n(23604);t.getBlock=async function(e,{blockHash:t,blockNumber:n,blockTag:i,includeTransactions:s}={}){const c=i??"latest",u=s??!1,l=void 0!==n?(0,o.numberToHex)(n):void 0;let d=null;if(d=t?await e.request({method:"eth_getBlockByHash",params:[t,u]}):await e.request({method:"eth_getBlockByNumber",params:[l||c,u]}),!d)throw new r.BlockNotFoundError({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||a.formatBlock)(d)}},99284:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockNumber=t.getBlockNumberCache=void 0;const r=n(38447),o=e=>`blockNumber.${e}`;t.getBlockNumberCache=function(e){return(0,r.getCache)(o(e))},t.getBlockNumber=async function(e,{cacheTime:t=e.cacheTime,maxAge:n}={}){const a=await(0,r.withCache)((()=>e.request({method:"eth_blockNumber"})),{cacheKey:o(e.uid),cacheTime:n??t});return BigInt(a)}},47480:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockTransactionCount=void 0;const r=n(57114),o=n(86308);t.getBlockTransactionCount=async function(e,{blockHash:t,blockNumber:n,blockTag:a="latest"}={}){const i=void 0!==n?(0,o.numberToHex)(n):void 0;let s;return s=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[i||a]}),(0,r.hexToNumber)(s)}},88352:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBytecode=void 0;const r=n(86308);t.getBytecode=async function(e,{address:t,blockNumber:n,blockTag:o="latest"}){const a=void 0!==n?(0,r.numberToHex)(n):void 0,i=await e.request({method:"eth_getCode",params:[t,a||o]});if("0x"!==i)return i}},42659:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChainId=void 0;const r=n(57114);t.getChainId=async function(e){const t=await e.request({method:"eth_chainId"});return(0,r.hexToNumber)(t)}},6560:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeeHistory=void 0;const r=n(86308),o=n(92736);t.getFeeHistory=async function(e,{blockCount:t,blockNumber:n,blockTag:a="latest",rewardPercentiles:i}){const s=n?(0,r.numberToHex)(n):void 0,c=await e.request({method:"eth_feeHistory",params:[(0,r.numberToHex)(t),s||a,i]});return(0,o.formatFeeHistory)(c)}},36696:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterChanges=void 0;const r=n(4403),o=n(81912),a=n(80330);t.getFilterChanges=async function(e,{filter:t}){const n="strict"in t&&t.strict;return(await t.request({method:"eth_getFilterChanges",params:[t.id]})).map((e=>{if("string"===typeof e)return e;try{const{eventName:r,args:i}="abi"in t&&t.abi?(0,o.decodeEventLog)({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return(0,a.formatLog)(e,{args:i,eventName:r})}catch(i){let n,o;if(i instanceof r.DecodeLogDataMismatch||i instanceof r.DecodeLogTopicsMismatch){if("strict"in t&&t.strict)return;n=i.abiItem.name,o=i.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,a.formatLog)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}},43675:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterLogs=void 0;const r=n(4403),o=n(81912),a=n(80330);t.getFilterLogs=async function(e,{filter:t}){const n=t.strict??!1;return(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map((e=>{try{const{eventName:r,args:i}="abi"in t&&t.abi?(0,o.decodeEventLog)({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return(0,a.formatLog)(e,{args:i,eventName:r})}catch(i){let n,o;if(i instanceof r.DecodeLogDataMismatch||i instanceof r.DecodeLogTopicsMismatch){if("strict"in t&&t.strict)return;n=i.abiItem.name,o=i.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,a.formatLog)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}},89984:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGasPrice=void 0,t.getGasPrice=async function(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}},96374:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLogs=void 0;const r=n(4403),o=n(81912),a=n(7534),i=n(86308),s=n(80330);t.getLogs=async function(e,{address:t,blockHash:n,fromBlock:c,toBlock:u,event:l,events:d,args:f,strict:h}={}){const p=h??!1,m=d??(l?[l]:void 0);let b,g=[];return m&&(g=[m.flatMap((e=>(0,a.encodeEventTopics)({abi:[e],eventName:e.name,args:f})))],l&&(g=g[0])),b=n?await e.request({method:"eth_getLogs",params:[{address:t,topics:g,blockHash:n}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:g,fromBlock:"bigint"===typeof c?(0,i.numberToHex)(c):c,toBlock:"bigint"===typeof u?(0,i.numberToHex)(u):u}]}),b.map((e=>{try{const{eventName:t,args:n}=m?(0,o.decodeEventLog)({abi:m,data:e.data,topics:e.topics,strict:p}):{eventName:void 0,args:void 0};return(0,s.formatLog)(e,{args:n,eventName:t})}catch(t){let n,o;if(t instanceof r.DecodeLogDataMismatch||t instanceof r.DecodeLogTopicsMismatch){if(p)return;n=t.abiItem.name,o=t.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,s.formatLog)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}},69894:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStorageAt=void 0;const r=n(86308);t.getStorageAt=async function(e,{address:t,blockNumber:n,blockTag:o="latest",slot:a}){const i=void 0!==n?(0,r.numberToHex)(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,a,i||o]})}},37960:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransaction=void 0;const r=n(70270),o=n(86308),a=n(1982);t.getTransaction=async function(e,{blockHash:t,blockNumber:n,blockTag:i,hash:s,index:c}){const u=i||"latest",l=void 0!==n?(0,o.numberToHex)(n):void 0;let d=null;if(s?d=await e.request({method:"eth_getTransactionByHash",params:[s]}):t?d=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,o.numberToHex)(c)]}):(l||u)&&(d=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||u,(0,o.numberToHex)(c)]})),!d)throw new r.TransactionNotFoundError({blockHash:t,blockNumber:n,blockTag:u,hash:s,index:c});return(e.chain?.formatters?.transaction?.format||a.formatTransaction)(d)}},44725:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionConfirmations=void 0;const r=n(99284),o=n(37960);t.getTransactionConfirmations=async function(e,{hash:t,transactionReceipt:n}){const[a,i]=await Promise.all([(0,r.getBlockNumber)(e),t?(0,o.getTransaction)(e,{hash:t}):void 0]),s=n?.blockNumber||i?.blockNumber;return s?a-s+1n:0n}},92530:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionCount=void 0;const r=n(57114),o=n(86308);t.getTransactionCount=async function(e,{address:t,blockTag:n="latest",blockNumber:a}){const i=await e.request({method:"eth_getTransactionCount",params:[t,a?(0,o.numberToHex)(a):n]});return(0,r.hexToNumber)(i)}},60148:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionReceipt=void 0;const r=n(70270),o=n(5840);t.getTransactionReceipt=async function(e,{hash:t}){const n=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!n)throw new r.TransactionReceiptNotFoundError({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||o.formatTransactionReceipt)(n)}},46580:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicall=void 0;const r=n(28669),o=n(4403),a=n(9996),i=n(76286),s=n(22836),c=n(47797),u=n(90042),l=n(33531);t.multicall=async function(e,t){const{allowFailure:n=!0,batchSize:d,blockNumber:f,blockTag:h,contracts:p,multicallAddress:m}=t,b=d??("object"===typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),g=p;let y=m;if(!y){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");y=(0,c.getChainContractAddress)({blockNumber:f,chain:e.chain,contract:"multicall3"})}const v=[[]];let w=0,E=0;for(let r=0;r0&&E>b&&(w++,E=(n.length-2)/2,v[w]=[]),v[w]=[...v[w],{allowFailure:!0,callData:n,target:t}]}catch(A){const r=(0,u.getContractError)(A,{abi:e,address:t,args:o,docsPath:"/docs/contract/multicall",functionName:a});if(!n)throw r;v[w]=[...v[w],{allowFailure:!0,callData:"0x",target:t}]}}return(await Promise.all(v.map((t=>(0,l.readContract)(e,{abi:r.multicall3Abi,address:y,args:[t],blockNumber:f,blockTag:h,functionName:"aggregate3"}))))).flat().map((({returnData:e,success:t},r)=>{const s=v.flat(),{callData:c}=s[r],{abi:l,address:d,functionName:f,args:h}=g[r];try{if("0x"===c)throw new o.AbiDecodingZeroDataError;if(!t)throw new a.RawContractError({data:e});const r=(0,i.decodeFunctionResult)({abi:l,args:h,data:e,functionName:f});return n?{result:r,status:"success"}:r}catch(A){const t=(0,u.getContractError)(A,{abi:l,address:d,args:h,docsPath:"/docs/contract/multicall",functionName:f});if(!n)throw t;return{error:t,result:void 0,status:"failure"}}}))}},33531:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readContract=void 0;const r=n(76286),o=n(22836),a=n(90042),i=n(11273);t.readContract=async function(e,{abi:t,address:n,args:s,functionName:c,...u}){const l=(0,o.encodeFunctionData)({abi:t,args:s,functionName:c});try{const{data:o}=await(0,i.call)(e,{data:l,to:n,...u});return(0,r.decodeFunctionResult)({abi:t,args:s,functionName:c,data:o||"0x"})}catch(d){throw(0,a.getContractError)(d,{abi:t,address:n,args:s,docsPath:"/docs/contract/readContract",functionName:c})}}},63747:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.simulateContract=void 0;const r=n(3975),o=n(76286),a=n(22836),i=n(90042),s=n(11273);t.simulateContract=async function(e,{abi:t,address:n,args:c,dataSuffix:u,functionName:l,...d}){const f=d.account?(0,r.parseAccount)(d.account):void 0,h=(0,a.encodeFunctionData)({abi:t,args:c,functionName:l});try{const{data:r}=await(0,s.call)(e,{batch:!1,data:`${h}${u?u.replace("0x",""):""}`,to:n,...d});return{result:(0,o.decodeFunctionResult)({abi:t,args:c,functionName:l,data:r||"0x"}),request:{abi:t,address:n,args:c,dataSuffix:u,functionName:l,...d}}}catch(p){throw(0,i.getContractError)(p,{abi:t,address:n,args:c,docsPath:"/docs/contract/simulateContract",functionName:l,sender:f?.address})}}},28553:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uninstallFilter=void 0,t.uninstallFilter=async function(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}},8123:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyHash=void 0;const r=n(28669),o=n(41930),a=n(9996),i=n(56770),s=n(50634),c=n(11273);t.verifyHash=async function(e,{address:t,hash:n,signature:u,...l}){const d=(0,s.isHex)(u)?u:(0,s.toHex)(u);try{const{data:a}=await(0,c.call)(e,{data:(0,s.encodeDeployData)({abi:r.universalSignatureValidatorAbi,args:[t,n,d],bytecode:o.universalSignatureValidatorByteCode}),...l});return(0,i.isBytesEqual)(a??"0x0","0x1")}catch(f){if(f instanceof a.CallExecutionError)return!1;throw f}}},97859:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=void 0;const r=n(50634),o=n(8123);t.verifyMessage=async function(e,{address:t,message:n,signature:a,...i}){const s=(0,r.hashMessage)(n);return(0,o.verifyHash)(e,{address:t,hash:s,signature:a,...i})}},96273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=void 0;const r=n(70834),o=n(8123);t.verifyTypedData=async function(e,{address:t,signature:n,message:a,primaryType:i,types:s,domain:c,...u}){const l=(0,r.hashTypedData)({message:a,primaryType:i,types:s,domain:c});return(0,o.verifyHash)(e,{address:t,hash:l,signature:n,...u})}},60789:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitForTransactionReceipt=void 0;const r=n(70270),o=n(36999),a=n(89514),i=n(58),s=n(29086),c=n(37960),u=n(60148),l=n(52489);t.waitForTransactionReceipt=async function(e,{confirmations:t=1,hash:n,onReplaced:d,pollingInterval:f=e.pollingInterval,timeout:h}){const p=(0,i.stringify)(["waitForTransactionReceipt",e.uid,n]);let m,b,g,y=!1;return new Promise(((i,v)=>{h&&setTimeout((()=>v(new r.WaitForTransactionReceiptTimeoutError({hash:n}))),h);const w=(0,o.observe)(p,{onReplaced:d,resolve:i,reject:v},(o=>{const i=(0,l.watchBlockNumber)(e,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:f,async onBlockNumber(l){if(y)return;let d=l;const f=e=>{i(),e(),w()};try{if(g){if(d-g.blockNumber+1no.resolve(g)))}if(m||(y=!0,await(0,a.withRetry)((async()=>{m=await(0,c.getTransaction)(e,{hash:n}),m.blockNumber&&(d=m.blockNumber)}),{delay:({count:e})=>200*~~(1<0&&d-g.blockNumber+1no.resolve(g)))}catch(h){if(m&&(h instanceof r.TransactionNotFoundError||h instanceof r.TransactionReceiptNotFoundError)){b=m;const n=(await(0,s.getBlock)(e,{blockNumber:d,includeTransactions:!0})).transactions.find((({from:e,nonce:t})=>e===b.from&&t===b.nonce));if(!n)return;if(g=await(0,u.getTransactionReceipt)(e,{hash:n.hash}),d-g.blockNumber+1n{o.onReplaced?.({reason:r,replacedTransaction:b,transaction:n,transactionReceipt:g}),o.resolve(g)}))}else f((()=>o.reject(h)))}}})}))}))}},52489:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchBlockNumber=void 0;const r=n(57114),o=n(36999),a=n(7760),i=n(58),s=n(99284);t.watchBlockNumber=function(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:c,onError:u,poll:l,pollingInterval:d=e.pollingInterval}){let f;return("undefined"!==typeof l?l:"webSocket"!==e.transport.type)?(()=>{const r=(0,i.stringify)(["watchBlockNumber",e.uid,t,n,d]);return(0,o.observe)(r,{onBlockNumber:c,onError:u},(r=>(0,a.poll)((async()=>{try{const t=await(0,s.getBlockNumber)(e,{cacheTime:0});if(f){if(t===f)return;if(t-f>1&&n)for(let e=f+1n;ef)&&(r.onBlockNumber(t,f),f=t)}catch(t){r.onError?.(t)}}),{emitOnBegin:t,interval:d})))})():(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newHeads"],onData(e){if(!t)return;const n=(0,r.hexToBigInt)(e.result?.number);c(n,f),f=n},onError(e){u?.(e)}});n=o,t||n()}catch(o){u?.(o)}})(),n})()}},70517:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchBlocks=void 0;const r=n(23604),o=n(36999),a=n(7760),i=n(58),s=n(29086);t.watchBlocks=function(e,{blockTag:t="latest",emitMissed:n=!1,emitOnBegin:c=!1,onBlock:u,onError:l,includeTransactions:d,poll:f,pollingInterval:h=e.pollingInterval}){const p="undefined"!==typeof f?f:"webSocket"!==e.transport.type,m=d??!1;let b;return p?(()=>{const r=(0,i.stringify)(["watchBlocks",e.uid,n,c,m,h]);return(0,o.observe)(r,{onBlock:u,onError:l},(r=>(0,a.poll)((async()=>{try{const o=await(0,s.getBlock)(e,{blockTag:t,includeTransactions:m});if(o.number&&b?.number){if(o.number===b.number)return;if(o.number-b.number>1&&n)for(let t=b?.number+1n;tb.number)&&(r.onBlock(o,b),b=o)}catch(o){r.onError?.(o)}}),{emitOnBegin:c,interval:h})))})():(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newHeads"],onData(n){if(!t)return;const o=(e.chain?.formatters?.block?.format||r.formatBlock)(n.result);u(o,b),b=o},onError(e){l?.(e)}});n=o,t||n()}catch(o){l?.(o)}})(),n})()}},49488:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchContractEvent=void 0;const r=n(95481),o=n(36999),a=n(7760),i=n(58),s=n(4403),c=n(68995),u=n(99985),l=n(99284),d=n(36696),f=n(96374),h=n(28553);t.watchContractEvent=function(e,{abi:t,address:n,args:p,batch:m=!0,eventName:b,onError:g,onLogs:y,poll:v,pollingInterval:w=e.pollingInterval,strict:E}){return("undefined"!==typeof v?v:"webSocket"!==e.transport.type)?(()=>{const s=(0,i.stringify)(["watchContractEvent",n,p,m,e.uid,b,w]),v=E??!1;return(0,o.observe)(s,{onLogs:y,onError:g},(o=>{let i,s,g=!1;const y=(0,a.poll)((async()=>{if(g)try{let a;if(s)a=await(0,d.getFilterChanges)(e,{filter:s});else{const o=await(0,l.getBlockNumber)(e);a=i&&i!==o?await(0,f.getLogs)(e,{address:n,args:p,fromBlock:i+1n,toBlock:o,event:(0,r.getAbiItem)({abi:t,name:b})}):[],i=o}if(0===a.length)return;m?o.onLogs(a):a.forEach((e=>o.onLogs([e])))}catch(a){s&&a instanceof c.InvalidInputRpcError&&(g=!1),o.onError?.(a)}else{try{s=await(0,u.createContractEventFilter)(e,{abi:t,address:n,args:p,eventName:b,strict:v})}catch{}g=!0}}),{emitOnBegin:!0,interval:w});return async()=>{s&&await(0,h.uninstallFilter)(e,{filter:s}),y()}}))})():(()=>{let r=!0,o=()=>r=!1;return(async()=>{try{const a=b?(0,c.encodeEventTopics)({abi:t,eventName:b,args:p}):[],{unsubscribe:i}=await e.transport.subscribe({params:["logs",{address:n,topics:a}],onData(e){if(!r)return;const n=e.result;try{const{eventName:e,args:r}=(0,c.decodeEventLog)({abi:t,data:n.data,topics:n.topics,strict:E}),o=(0,c.formatLog)(n,{args:r,eventName:e});y([o])}catch(o){let e,t;if(o instanceof s.DecodeLogDataMismatch||o instanceof c.DecodeLogTopicsMismatch){if(E)return;e=o.abiItem.name,t=o.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const r=(0,c.formatLog)(n,{args:t?[]:{},eventName:e});y([r])}},onError(e){g?.(e)}});o=i,r||o()}catch(a){g?.(a)}})(),o})()}},63558:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchEvent=void 0;const r=n(36999),o=n(7760),a=n(58),i=n(4403),s=n(60793),c=n(50634),u=n(3200),l=n(99284),d=n(36696),f=n(96374),h=n(28553);t.watchEvent=function(e,{address:t,args:n,batch:p=!0,event:m,events:b,onError:g,onLogs:y,poll:v,pollingInterval:w=e.pollingInterval,strict:E}){const A="undefined"!==typeof v?v:"webSocket"!==e.transport.type,x=E??!1;return A?(()=>{const i=(0,a.stringify)(["watchEvent",t,n,p,e.uid,m,w]);return(0,r.observe)(i,{onLogs:y,onError:g},(r=>{let a,i,c=!1;const g=(0,o.poll)((async()=>{if(c)try{let o;if(i)o=await(0,d.getFilterChanges)(e,{filter:i});else{const r=await(0,l.getBlockNumber)(e);o=a&&a!==r?await(0,f.getLogs)(e,{address:t,args:n,event:m,events:b,fromBlock:a+1n,toBlock:r}):[],a=r}if(0===o.length)return;p?r.onLogs(o):o.forEach((e=>r.onLogs([e])))}catch(o){i&&o instanceof s.InvalidInputRpcError&&(c=!1),r.onError?.(o)}else{try{i=await(0,u.createEventFilter)(e,{address:t,args:n,event:m,events:b,strict:x})}catch{}c=!0}}),{emitOnBegin:!0,interval:w});return async()=>{i&&await(0,h.uninstallFilter)(e,{filter:i}),g()}}))})():(()=>{let r=!0,o=()=>r=!1;return(async()=>{try{const a=b??(m?[m]:void 0);let s=[];a&&(s=[a.flatMap((e=>(0,c.encodeEventTopics)({abi:[e],eventName:e.name,args:n})))],m&&(s=s[0]));const{unsubscribe:u}=await e.transport.subscribe({params:["logs",{address:t,topics:s}],onData(e){if(!r)return;const t=e.result;try{const{eventName:e,args:n}=(0,c.decodeEventLog)({abi:a,data:t.data,topics:t.topics,strict:x}),r=(0,c.formatLog)(t,{args:n,eventName:e});y([r])}catch(n){let e,r;if(n instanceof i.DecodeLogDataMismatch||n instanceof i.DecodeLogTopicsMismatch){if(E)return;e=n.abiItem.name,r=n.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const o=(0,c.formatLog)(t,{args:r?[]:{},eventName:e});y([o])}},onError(e){g?.(e)}});o=u,r||o()}catch(a){g?.(a)}})(),o})()}},52674:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchPendingTransactions=void 0;const r=n(36999),o=n(7760),a=n(58),i=n(99792),s=n(36696),c=n(28553);t.watchPendingTransactions=function(e,{batch:t=!0,onError:n,onTransactions:u,poll:l,pollingInterval:d=e.pollingInterval}){return("undefined"!==typeof l?l:"webSocket"!==e.transport.type)?(()=>{const l=(0,a.stringify)(["watchPendingTransactions",e.uid,t,d]);return(0,r.observe)(l,{onTransactions:u,onError:n},(n=>{let r;const a=(0,o.poll)((async()=>{try{if(!r)try{return void(r=await(0,i.createPendingTransactionFilter)(e))}catch(o){throw a(),o}const c=await(0,s.getFilterChanges)(e,{filter:r});if(0===c.length)return;t?n.onTransactions(c):c.forEach((e=>n.onTransactions([e])))}catch(o){n.onError?.(o)}}),{emitOnBegin:!0,interval:d});return async()=>{r&&await(0,c.uninstallFilter)(e,{filter:r}),a()}}))})():(()=>{let t=!0,r=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!t)return;const n=e.result;u([n])},onError(e){n?.(e)}});r=o,t||r()}catch(o){n?.(o)}})(),r})()}},90233:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dropTransaction=void 0,t.dropTransaction=async function(e,{hash:t}){await e.request({method:`${e.mode}_dropTransaction`,params:[t]})}},79340:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAutomine=void 0,t.getAutomine=async function(e){return"ganache"===e.mode?await e.request({method:"eth_mining"}):await e.request({method:`${e.mode}_getAutomine`})}},36822:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTxpoolContent=void 0,t.getTxpoolContent=async function(e){return await e.request({method:"txpool_content"})}},31125:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTxpoolStatus=void 0;const r=n(57114);t.getTxpoolStatus=async function(e){const{pending:t,queued:n}=await e.request({method:"txpool_status"});return{pending:(0,r.hexToNumber)(t),queued:(0,r.hexToNumber)(n)}}},48328:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.impersonateAccount=void 0,t.impersonateAccount=async function(e,{address:t}){await e.request({method:`${e.mode}_impersonateAccount`,params:[t]})}},86437:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.increaseTime=void 0;const r=n(86308);t.increaseTime=async function(e,{seconds:t}){return await e.request({method:"evm_increaseTime",params:[(0,r.numberToHex)(t)]})}},19741:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inspectTxpool=void 0,t.inspectTxpool=async function(e){return await e.request({method:"txpool_inspect"})}},564:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mine=void 0;const r=n(86308);t.mine=async function(e,{blocks:t,interval:n}){"ganache"===e.mode?await e.request({method:"evm_mine",params:[{blocks:(0,r.numberToHex)(t)}]}):await e.request({method:`${e.mode}_mine`,params:[(0,r.numberToHex)(t),(0,r.numberToHex)(n||0)]})}},86619:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeBlockTimestampInterval=void 0,t.removeBlockTimestampInterval=async function(e){await e.request({method:`${e.mode}_removeBlockTimestampInterval`})}},48702:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reset=void 0,t.reset=async function(e,{blockNumber:t,jsonRpcUrl:n}={}){await e.request({method:`${e.mode}_reset`,params:[{forking:{blockNumber:Number(t),jsonRpcUrl:n}}]})}},33921:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.revert=void 0,t.revert=async function(e,{id:t}){await e.request({method:"evm_revert",params:[t]})}},93631:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendUnsignedTransaction=void 0;const r=n(82320),o=n(33270);t.sendUnsignedTransaction=async function(e,t){const{accessList:n,data:a,from:i,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,to:f,value:h,...p}=t,m=e.chain?.formatters?.transactionRequest?.format||o.formatTransactionRequest,b=m({...(0,r.extract)(p,{format:m}),accessList:n,data:a,from:i,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,to:f,value:h});return await e.request({method:"eth_sendUnsignedTransaction",params:[b]})}},1029:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setAutomine=void 0,t.setAutomine=async function(e,t){"ganache"===e.mode?t?await e.request({method:"miner_start"}):await e.request({method:"miner_stop"}):await e.request({method:"evm_setAutomine",params:[t]})}},86128:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBalance=void 0;const r=n(86308);t.setBalance=async function(e,{address:t,value:n}){"ganache"===e.mode?await e.request({method:"evm_setAccountBalance",params:[t,(0,r.numberToHex)(n)]}):await e.request({method:`${e.mode}_setBalance`,params:[t,(0,r.numberToHex)(n)]})}},68923:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockGasLimit=void 0;const r=n(86308);t.setBlockGasLimit=async function(e,{gasLimit:t}){await e.request({method:"evm_setBlockGasLimit",params:[(0,r.numberToHex)(t)]})}},58892:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockTimestampInterval=void 0,t.setBlockTimestampInterval=async function(e,{interval:t}){await e.request({method:`${e.mode}_setBlockTimestampInterval`,params:[t]})}},18954:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setCode=void 0,t.setCode=async function(e,{address:t,bytecode:n}){await e.request({method:`${e.mode}_setCode`,params:[t,n]})}},68335:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setCoinbase=void 0,t.setCoinbase=async function(e,{address:t}){await e.request({method:`${e.mode}_setCoinbase`,params:[t]})}},3332:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setIntervalMining=void 0,t.setIntervalMining=async function(e,{interval:t}){await e.request({method:"evm_setIntervalMining",params:[t]})}},49895:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setLoggingEnabled=void 0,t.setLoggingEnabled=async function(e,t){await e.request({method:`${e.mode}_setLoggingEnabled`,params:[t]})}},82900:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setMinGasPrice=void 0;const r=n(86308);t.setMinGasPrice=async function(e,{gasPrice:t}){await e.request({method:`${e.mode}_setMinGasPrice`,params:[(0,r.numberToHex)(t)]})}},25912:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setNextBlockBaseFeePerGas=void 0;const r=n(86308);t.setNextBlockBaseFeePerGas=async function(e,{baseFeePerGas:t}){await e.request({method:`${e.mode}_setNextBlockBaseFeePerGas`,params:[(0,r.numberToHex)(t)]})}},26605:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setNextBlockTimestamp=void 0;const r=n(86308);t.setNextBlockTimestamp=async function(e,{timestamp:t}){await e.request({method:"evm_setNextBlockTimestamp",params:[(0,r.numberToHex)(t)]})}},58942:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setNonce=void 0;const r=n(86308);t.setNonce=async function(e,{address:t,nonce:n}){await e.request({method:`${e.mode}_setNonce`,params:[t,(0,r.numberToHex)(n)]})}},58499:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setRpcUrl=void 0,t.setRpcUrl=async function(e,t){await e.request({method:`${e.mode}_setRpcUrl`,params:[t]})}},65972:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setStorageAt=void 0;const r=n(86308);t.setStorageAt=async function(e,{address:t,index:n,value:o}){await e.request({method:`${e.mode}_setStorageAt`,params:[t,"number"===typeof n?(0,r.numberToHex)(n):n,o]})}},68183:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.snapshot=void 0,t.snapshot=async function(e){return await e.request({method:"evm_snapshot"})}},9619:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stopImpersonatingAccount=void 0,t.stopImpersonatingAccount=async function(e,{address:t}){await e.request({method:`${e.mode}_stopImpersonatingAccount`,params:[t]})}},86247:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addChain=void 0;const r=n(86308);t.addChain=async function(e,{chain:t}){const{id:n,name:o,nativeCurrency:a,rpcUrls:i,blockExplorers:s}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,r.numberToHex)(n),chainName:o,nativeCurrency:a,rpcUrls:i.default.http,blockExplorerUrls:s?Object.values(s).map((({url:e})=>e)):void 0}]})}},33266:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deployContract=void 0;const r=n(77833),o=n(66773);t.deployContract=function(e,{abi:t,args:n,bytecode:a,...i}){const s=(0,r.encodeDeployData)({abi:t,args:n,bytecode:a});return(0,o.sendTransaction)(e,{...i,data:s})}},42386:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddresses=void 0;const r=n(36556);t.getAddresses=async function(e){return(await e.request({method:"eth_accounts"})).map((e=>(0,r.checksumAddress)(e)))}},41978:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPermissions=void 0,t.getPermissions=async function(e){return await e.request({method:"wallet_getPermissions"})}},94265:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestAddresses=void 0;const r=n(36556);t.requestAddresses=async function(e){return(await e.request({method:"eth_requestAccounts"})).map((e=>(0,r.getAddress)(e)))}},38315:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestPermissions=void 0,t.requestPermissions=async function(e,t){return e.request({method:"wallet_requestPermissions",params:[t]})}},66773:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendTransaction=void 0;const r=n(3975),o=n(26175),a=n(47797),i=n(72533),s=n(82320),c=n(33270),u=n(5434),l=n(40623),d=n(42659);t.sendTransaction=async function(e,t){const{account:n=e.account,chain:f=e.chain,accessList:h,data:p,gas:m,gasPrice:b,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:v,to:w,value:E,...A}=t;if(!n)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const x=(0,r.parseAccount)(n);try{let n;if((0,u.assertRequest)(t),null!==f&&(n=await(0,d.getChainId)(e),(0,a.assertCurrentChain)({currentChainId:n,chain:f})),"local"===x.type){const t=await(0,l.prepareRequest)(e,{account:x,accessList:h,chain:f,data:p,gas:m,gasPrice:b,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:v,to:w,value:E,...A});n||(n=await(0,d.getChainId)(e));const r=f?.serializers?.transaction,o=await x.signTransaction({...t,chainId:n},{serializer:r});return await e.request({method:"eth_sendRawTransaction",params:[o]})}const r=f?.formatters?.transactionRequest?.format||c.formatTransactionRequest,o=r({...(0,s.extract)(A,{format:r}),accessList:h,data:p,from:x.address,gas:m,gasPrice:b,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:v,to:w,value:E});return await e.request({method:"eth_sendTransaction",params:[o]})}catch(P){throw(0,i.getTransactionError)(P,{...t,account:x,chain:t.chain||void 0})}}},73753:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signMessage=void 0;const r=n(3975),o=n(26175),a=n(86308);t.signMessage=async function(e,{account:t=e.account,message:n}){if(!t)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const i=(0,r.parseAccount)(t);if("local"===i.type)return i.signMessage({message:n});const s="string"===typeof n?(0,a.stringToHex)(n):n.raw instanceof Uint8Array?(0,a.toHex)(n.raw):n.raw;return e.request({method:"personal_sign",params:[s,i.address]})}},58070:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signTypedData=void 0;const r=n(3975),o=n(26175),a=n(77116),i=n(58),s=n(42586);t.signTypedData=async function(e,{account:t=e.account,domain:n,message:c,primaryType:u,types:l}){if(!t)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const d=(0,r.parseAccount)(t),f={EIP712Domain:["string"===typeof n?.name&&{name:"name",type:"string"},n?.version&&{name:"version",type:"string"},"number"===typeof n?.chainId&&{name:"chainId",type:"uint256"},n?.verifyingContract&&{name:"verifyingContract",type:"address"},n?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...l};if((0,s.validateTypedData)({domain:n,message:c,primaryType:u,types:f}),"local"===d.type)return d.signTypedData({domain:n,primaryType:u,types:f,message:c});const h=(0,i.stringify)({domain:n??{},primaryType:u,types:f,message:c},((e,t)=>(0,a.isHex)(t)?t.toLowerCase():t));return e.request({method:"eth_signTypedData_v4",params:[d.address,h]})}},70173:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchChain=void 0;const r=n(86308);t.switchChain=async function(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,r.numberToHex)(t)}]})}},82840:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchAsset=void 0,t.watchAsset=async function(e,t){return await e.request({method:"wallet_watchAsset",params:t})}},97747:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.writeContract=void 0;const r=n(22836),o=n(66773);t.writeContract=async function(e,{abi:t,address:n,args:a,dataSuffix:i,functionName:s,...c}){const u=(0,r.encodeFunctionData)({abi:t,args:a,functionName:s});return await(0,o.sendTransaction)(e,{data:`${u}${i?i.replace("0x",""):""}`,to:n,...c})}},23259:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createClient=void 0;const r=n(43817),o=n(41217);t.createClient=function(e){const{batch:t,cacheTime:n=e.pollingInterval??4e3,key:a="base",name:i="Base Client",pollingInterval:s=4e3,type:c="base"}=e,u=e.chain,l=e.account?(0,r.parseAccount)(e.account):void 0,{config:d,request:f,value:h}=e.transport({chain:u,pollingInterval:s}),p={account:l,batch:t,cacheTime:n,chain:u,key:a,name:i,pollingInterval:s,request:f,transport:{...d,...h},type:c,uid:(0,o.uid)()};return Object.assign(p,{extend:function e(t){return n=>{const r=n(t);for(const e in p)delete r[e];const o={...t,...r};return Object.assign(o,{extend:e(o)})}}(p)})}},86610:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPublicClient=void 0;const r=n(23259),o=n(8980);t.createPublicClient=function(e){const{key:t="public",name:n="Public Client"}=e;return(0,r.createClient)({...e,key:t,name:n,type:"publicClient"}).extend(o.publicActions)}},34223:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTestClient=void 0;const r=n(23259),o=n(49467);t.createTestClient=function(e){const{key:t="test",name:n="Test Client",mode:a}=e;return(0,r.createClient)({...e,key:t,name:n,type:"testClient"}).extend((e=>({mode:a,...(0,o.testActions)({mode:a})(e)})))}},32415:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWalletClient=void 0;const r=n(23259),o=n(47839);t.createWalletClient=function(e){const{key:t="wallet",name:n="Wallet Client",transport:a}=e;return(0,r.createClient)({...e,key:t,name:n,transport:e=>a({...e,retryCount:0}),type:"walletClient"}).extend(o.walletActions)}},8980:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publicActions=void 0;const r=n(22440),o=n(32637),a=n(59593),i=n(12429),s=n(43896),c=n(11273),u=n(46376),l=n(99985),d=n(3200),f=n(99792),h=n(37346),p=n(23337),m=n(85233),b=n(29086),g=n(99284),y=n(47480),v=n(88352),w=n(42659),E=n(6560),A=n(36696),x=n(43675),P=n(89984),C=n(96374),j=n(69894),I=n(37960),O=n(44725),T=n(92530),S=n(60148),B=n(46580),k=n(33531),_=n(63747),N=n(28553),M=n(97859),R=n(96273),F=n(60789),U=n(52489),L=n(70517),D=n(49488),q=n(63558),H=n(52674);t.publicActions=function(e){return{call:t=>(0,c.call)(e,t),createBlockFilter:()=>(0,u.createBlockFilter)(e),createContractEventFilter:t=>(0,l.createContractEventFilter)(e,t),createEventFilter:t=>(0,d.createEventFilter)(e,t),createPendingTransactionFilter:()=>(0,f.createPendingTransactionFilter)(e),estimateContractGas:t=>(0,h.estimateContractGas)(e,t),estimateGas:t=>(0,p.estimateGas)(e,t),getBalance:t=>(0,m.getBalance)(e,t),getBlock:t=>(0,b.getBlock)(e,t),getBlockNumber:t=>(0,g.getBlockNumber)(e,t),getBlockTransactionCount:t=>(0,y.getBlockTransactionCount)(e,t),getBytecode:t=>(0,v.getBytecode)(e,t),getChainId:()=>(0,w.getChainId)(e),getEnsAddress:t=>(0,r.getEnsAddress)(e,t),getEnsAvatar:t=>(0,o.getEnsAvatar)(e,t),getEnsName:t=>(0,a.getEnsName)(e,t),getEnsResolver:t=>(0,i.getEnsResolver)(e,t),getEnsText:t=>(0,s.getEnsText)(e,t),getFeeHistory:t=>(0,E.getFeeHistory)(e,t),getFilterChanges:t=>(0,A.getFilterChanges)(e,t),getFilterLogs:t=>(0,x.getFilterLogs)(e,t),getGasPrice:()=>(0,P.getGasPrice)(e),getLogs:t=>(0,C.getLogs)(e,t),getStorageAt:t=>(0,j.getStorageAt)(e,t),getTransaction:t=>(0,I.getTransaction)(e,t),getTransactionConfirmations:t=>(0,O.getTransactionConfirmations)(e,t),getTransactionCount:t=>(0,T.getTransactionCount)(e,t),getTransactionReceipt:t=>(0,S.getTransactionReceipt)(e,t),multicall:t=>(0,B.multicall)(e,t),readContract:t=>(0,k.readContract)(e,t),simulateContract:t=>(0,_.simulateContract)(e,t),verifyMessage:t=>(0,M.verifyMessage)(e,t),verifyTypedData:t=>(0,R.verifyTypedData)(e,t),uninstallFilter:t=>(0,N.uninstallFilter)(e,t),waitForTransactionReceipt:t=>(0,F.waitForTransactionReceipt)(e,t),watchBlocks:t=>(0,L.watchBlocks)(e,t),watchBlockNumber:t=>(0,U.watchBlockNumber)(e,t),watchContractEvent:t=>(0,D.watchContractEvent)(e,t),watchEvent:t=>(0,q.watchEvent)(e,t),watchPendingTransactions:t=>(0,H.watchPendingTransactions)(e,t)}}},49467:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testActions=void 0;const r=n(90233),o=n(79340),a=n(36822),i=n(31125),s=n(48328),c=n(86437),u=n(19741),l=n(564),d=n(86619),f=n(48702),h=n(33921),p=n(93631),m=n(1029),b=n(86128),g=n(68923),y=n(58892),v=n(18954),w=n(68335),E=n(3332),A=n(49895),x=n(82900),P=n(25912),C=n(26605),j=n(58942),I=n(58499),O=n(65972),T=n(68183),S=n(9619);t.testActions=function({mode:e}){return t=>{const n=t.extend((()=>({mode:e})));return{dropTransaction:e=>(0,r.dropTransaction)(n,e),getAutomine:()=>(0,o.getAutomine)(n),getTxpoolContent:()=>(0,a.getTxpoolContent)(n),getTxpoolStatus:()=>(0,i.getTxpoolStatus)(n),impersonateAccount:e=>(0,s.impersonateAccount)(n,e),increaseTime:e=>(0,c.increaseTime)(n,e),inspectTxpool:()=>(0,u.inspectTxpool)(n),mine:e=>(0,l.mine)(n,e),removeBlockTimestampInterval:()=>(0,d.removeBlockTimestampInterval)(n),reset:e=>(0,f.reset)(n,e),revert:e=>(0,h.revert)(n,e),sendUnsignedTransaction:e=>(0,p.sendUnsignedTransaction)(n,e),setAutomine:e=>(0,m.setAutomine)(n,e),setBalance:e=>(0,b.setBalance)(n,e),setBlockGasLimit:e=>(0,g.setBlockGasLimit)(n,e),setBlockTimestampInterval:e=>(0,y.setBlockTimestampInterval)(n,e),setCode:e=>(0,v.setCode)(n,e),setCoinbase:e=>(0,w.setCoinbase)(n,e),setIntervalMining:e=>(0,E.setIntervalMining)(n,e),setLoggingEnabled:e=>(0,A.setLoggingEnabled)(n,e),setMinGasPrice:e=>(0,x.setMinGasPrice)(n,e),setNextBlockBaseFeePerGas:e=>(0,P.setNextBlockBaseFeePerGas)(n,e),setNextBlockTimestamp:e=>(0,C.setNextBlockTimestamp)(n,e),setNonce:e=>(0,j.setNonce)(n,e),setRpcUrl:e=>(0,I.setRpcUrl)(n,e),setStorageAt:e=>(0,O.setStorageAt)(n,e),snapshot:()=>(0,T.snapshot)(n),stopImpersonatingAccount:e=>(0,S.stopImpersonatingAccount)(n,e)}}}},47839:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walletActions=void 0;const r=n(42659),o=n(86247),a=n(33266),i=n(42386),s=n(41978),c=n(94265),u=n(38315),l=n(66773),d=n(73753),f=n(58070),h=n(70173),p=n(82840),m=n(97747);t.walletActions=function(e){return{addChain:t=>(0,o.addChain)(e,t),deployContract:t=>(0,a.deployContract)(e,t),getAddresses:()=>(0,i.getAddresses)(e),getChainId:()=>(0,r.getChainId)(e),getPermissions:()=>(0,s.getPermissions)(e),requestAddresses:()=>(0,c.requestAddresses)(e),requestPermissions:t=>(0,u.requestPermissions)(e,t),sendTransaction:t=>(0,l.sendTransaction)(e,t),signMessage:t=>(0,d.signMessage)(e,t),signTypedData:t=>(0,f.signTypedData)(e,t),switchChain:t=>(0,h.switchChain)(e,t),watchAsset:t=>(0,p.watchAsset)(e,t),writeContract:t=>(0,m.writeContract)(e,t)}}},42255:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransport=void 0;const r=n(25056);t.createTransport=function({key:e,name:t,request:n,retryCount:o=3,retryDelay:a=150,timeout:i,type:s},c){return{config:{key:e,name:t,request:n,retryCount:o,retryDelay:a,timeout:i,type:s},request:(0,r.buildRequest)(n,{retryCount:o,retryDelay:a}),value:c}}},99161:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.custom=void 0;const r=n(42255);t.custom=function(e,t={}){const{key:n="custom",name:o="Custom Provider",retryDelay:a}=t;return({retryCount:i})=>(0,r.createTransport)({key:n,name:o,request:e.request.bind(e),retryCount:t.retryCount??i,retryDelay:a,type:"custom"})}},72826:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rankTransports=t.fallback=void 0;const r=n(25056),o=n(78967),a=n(42255);function i({chain:e,interval:t=4e3,onTransports:n,sampleCount:r=10,timeout:a=1e3,transports:i,weights:s={}}){const{stability:c=.7,latency:u=.3}=s,l=[],d=async()=>{const s=await Promise.all(i.map((async t=>{const n=t({chain:e,retryCount:0,timeout:a}),r=Date.now();let o,i;try{await n.request({method:"net_listening"}),i=1}catch{i=0}finally{o=Date.now()}return{latency:o-r,success:i}})));l.push(s),l.length>r&&l.shift();const f=Math.max(...l.map((e=>Math.max(...e.map((({latency:e})=>e)))))),h=i.map(((e,t)=>{const n=l.map((e=>e[t].latency)),r=1-n.reduce(((e,t)=>e+t),0)/n.length/f,o=l.map((e=>e[t].success)),a=o.reduce(((e,t)=>e+t),0)/o.length;return 0===a?[0,t]:[u*r+c*a,t]})).sort(((e,t)=>t[0]-e[0]));n(h.map((([,e])=>i[e]))),await(0,o.wait)(t),d()};d()}t.fallback=function(e,t={}){const{key:n="fallback",name:o="Fallback",rank:s=!1,retryCount:c,retryDelay:u}=t;return({chain:t,pollingInterval:l=4e3,timeout:d})=>{let f=e,h=()=>{};const p=(0,a.createTransport)({key:n,name:o,async request({method:e,params:n}){const o=async(a=0)=>{const i=f[a]({chain:t,retryCount:0,timeout:d});try{const t=await i.request({method:e,params:n});return h({method:e,params:n,response:t,transport:i,status:"success"}),t}catch(s){if(h({error:s,method:e,params:n,transport:i,status:"error"}),(0,r.isDeterministicError)(s))throw s;if(a===f.length-1)throw s;return o(a+1)}};return o()},retryCount:c,retryDelay:u,type:"fallback"},{onResponse:e=>h=e,transports:f.map((e=>e({chain:t,retryCount:0})))});if(s){const e="object"===typeof s?s:{};i({chain:t,interval:e.interval??l,onTransports:e=>f=e,sampleCount:e.sampleCount,timeout:e.timeout,transports:f,weights:e.weights})}return p}},t.rankTransports=i},28216:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.http=void 0;const r=n(72782),o=n(44681),a=n(48170),i=n(82530),s=n(42255);t.http=function(e,t={}){const{batch:n,fetchOptions:c,key:u="http",name:l="HTTP JSON-RPC",retryDelay:d}=t;return({chain:f,retryCount:h,timeout:p})=>{const{batchSize:m=1e3,wait:b=0}="object"===typeof n?n:{},g=t.retryCount??h,y=p??t.timeout??1e4,v=e||f?.rpcUrls.default.http[0];if(!v)throw new o.UrlRequiredError;return(0,s.createTransport)({key:u,name:l,async request({method:t,params:o}){const s={method:t,params:o},{schedule:u}=(0,a.createBatchScheduler)({id:`${e}`,wait:b,shouldSplitBatch:e=>e.length>m,fn:e=>i.rpc.http(v,{body:e,fetchOptions:c,timeout:y})}),[{error:l,result:d}]=await(async e=>n?u(e):[await i.rpc.http(v,{body:e,fetchOptions:c,timeout:y})])(s);if(l)throw new r.RpcRequestError({body:s,error:l,url:v});return d},retryCount:g,retryDelay:d,timeout:y,type:"http"},{url:e})}}},37003:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.webSocket=void 0;const r=n(72782),o=n(44681),a=n(82530),i=n(42255);t.webSocket=function(e,t={}){const{key:n="webSocket",name:s="WebSocket JSON-RPC",retryDelay:c}=t;return({chain:u,retryCount:l,timeout:d})=>{const f=t.retryCount??l,h=d??t.timeout??1e4,p=e||u?.rpcUrls.default.webSocket?.[0];if(!p)throw new o.UrlRequiredError;return(0,i.createTransport)({key:n,name:s,async request({method:e,params:t}){const n={method:e,params:t},o=await(0,a.getSocket)(p),{error:i,result:s}=await a.rpc.webSocketAsync(o,{body:n,timeout:h});if(i)throw new r.RpcRequestError({body:n,error:i,url:p});return s},retryCount:f,retryDelay:c,timeout:h,type:"webSocket"},{getSocket:()=>(0,a.getSocket)(p),async subscribe({params:e,onData:t,onError:n}){const r=await(0,a.getSocket)(p),{result:o}=await new Promise(((o,i)=>a.rpc.webSocket(r,{body:{method:"eth_subscribe",params:e},onResponse(e){if(e.error)return i(e.error),void n?.(e.error);"number"!==typeof e.id?"eth_subscription"===e.method&&t(e.params):o(e)}})));return{subscriptionId:o,unsubscribe:async()=>new Promise((e=>a.rpc.webSocket(r,{body:{method:"eth_unsubscribe",params:[o]},onResponse:e})))}}})}}},28669:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.universalSignatureValidatorAbi=t.smartAccountAbi=t.addressResolverAbi=t.textResolverAbi=t.universalResolverReverseAbi=t.universalResolverResolveAbi=t.multicall3Abi=void 0,t.multicall3Abi=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}];const n=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}];t.universalResolverResolveAbi=[...n,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],t.universalResolverReverseAbi=[...n,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],t.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],t.addressResolverAbi=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],t.smartAccountAbi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],t.universalSignatureValidatorAbi=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},77243:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroAddress=void 0,t.zeroAddress="0x0000000000000000000000000000000000000000"},83984:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregate3Signature=void 0,t.aggregate3Signature="0x82ad56cb"},41930:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.universalSignatureValidatorByteCode=void 0,t.universalSignatureValidatorByteCode="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"},84387:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.minInt144=t.minInt136=t.minInt128=t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=t.maxInt8=void 0,t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=void 0,t.maxInt8=2n**(8n-1n),t.maxInt16=2n**(16n-1n),t.maxInt24=2n**(24n-1n),t.maxInt32=2n**(32n-1n),t.maxInt40=2n**(40n-1n),t.maxInt48=2n**(48n-1n),t.maxInt56=2n**(56n-1n),t.maxInt64=2n**(64n-1n),t.maxInt72=2n**(72n-1n),t.maxInt80=2n**(80n-1n),t.maxInt88=2n**(88n-1n),t.maxInt96=2n**(96n-1n),t.maxInt104=2n**(104n-1n),t.maxInt112=2n**(112n-1n),t.maxInt120=2n**(120n-1n),t.maxInt128=2n**(128n-1n),t.maxInt136=2n**(136n-1n),t.maxInt144=2n**(144n-1n),t.maxInt152=2n**(152n-1n),t.maxInt160=2n**(160n-1n),t.maxInt168=2n**(168n-1n),t.maxInt176=2n**(176n-1n),t.maxInt184=2n**(184n-1n),t.maxInt192=2n**(192n-1n),t.maxInt200=2n**(200n-1n),t.maxInt208=2n**(208n-1n),t.maxInt216=2n**(216n-1n),t.maxInt224=2n**(224n-1n),t.maxInt232=2n**(232n-1n),t.maxInt240=2n**(240n-1n),t.maxInt248=2n**(248n-1n),t.maxInt256=2n**(256n-1n),t.minInt8=-(2n**8n),t.minInt16=-(2n**16n),t.minInt24=-(2n**24n),t.minInt32=-(2n**32n),t.minInt40=-(2n**40n),t.minInt48=-(2n**48n),t.minInt56=-(2n**56n),t.minInt64=-(2n**64n),t.minInt72=-(2n**72n),t.minInt80=-(2n**80n),t.minInt88=-(2n**88n),t.minInt96=-(2n**96n),t.minInt104=-(2n**104n),t.minInt112=-(2n**112n),t.minInt120=-(2n**120n),t.minInt128=-(2n**128n),t.minInt136=-(2n**136n),t.minInt144=-(2n**144n),t.minInt152=-(2n**152n),t.minInt160=-(2n**160n),t.minInt168=-(2n**168n),t.minInt176=-(2n**176n),t.minInt184=-(2n**184n),t.minInt192=-(2n**192n),t.minInt200=-(2n**200n),t.minInt208=-(2n**208n),t.minInt216=-(2n**216n),t.minInt224=-(2n**224n),t.minInt232=-(2n**232n),t.minInt240=-(2n**240n),t.minInt248=-(2n**248n),t.minInt256=-(2n**256n),t.maxUint8=2n**8n,t.maxUint16=2n**16n,t.maxUint24=2n**24n,t.maxUint32=2n**32n,t.maxUint40=2n**40n,t.maxUint48=2n**48n,t.maxUint56=2n**56n,t.maxUint64=2n**64n,t.maxUint72=2n**72n,t.maxUint80=2n**80n,t.maxUint88=2n**88n,t.maxUint96=2n**96n,t.maxUint104=2n**104n,t.maxUint112=2n**112n,t.maxUint120=2n**120n,t.maxUint128=2n**128n,t.maxUint136=2n**136n,t.maxUint144=2n**144n,t.maxUint152=2n**152n,t.maxUint160=2n**160n,t.maxUint168=2n**168n,t.maxUint176=2n**176n,t.maxUint184=2n**184n,t.maxUint192=2n**192n,t.maxUint200=2n**200n,t.maxUint208=2n**208n,t.maxUint216=2n**216n,t.maxUint224=2n**224n,t.maxUint232=2n**232n,t.maxUint240=2n**240n,t.maxUint248=2n**248n,t.maxUint256=2n**256n},6049:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.solidityPanic=t.solidityError=t.panicReasons=void 0,t.panicReasons={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},t.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},t.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},99225:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.weiUnits=t.gweiUnits=t.etherUnits=void 0,t.etherUnits={gwei:9,wei:18},t.gweiUnits={ether:-9,wei:9},t.weiUnits={ether:-18,gwei:-9}},4403:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedPackedAbiType=t.InvalidDefinitionTypeError=t.InvalidArrayError=t.InvalidAbiDecodingTypeError=t.InvalidAbiEncodingTypeError=t.DecodeLogTopicsMismatch=t.DecodeLogDataMismatch=t.BytesSizeMismatchError=t.AbiFunctionSignatureNotFoundError=t.AbiFunctionOutputsNotFoundError=t.AbiFunctionNotFoundError=t.AbiEventNotFoundError=t.AbiEventSignatureNotFoundError=t.AbiEventSignatureEmptyTopicsError=t.AbiErrorSignatureNotFoundError=t.AbiErrorNotFoundError=t.AbiErrorInputsNotFoundError=t.AbiEncodingLengthMismatchError=t.AbiEncodingBytesSizeMismatchError=t.AbiEncodingArrayLengthMismatchError=t.AbiDecodingZeroDataError=t.AbiDecodingDataSizeTooSmallError=t.AbiDecodingDataSizeInvalidError=t.AbiConstructorParamsNotFoundError=t.AbiConstructorNotFoundError=void 0;const r=n(16759),o=n(66859),a=n(26456);class i extends a.BaseError{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}t.AbiConstructorNotFoundError=i;class s extends a.BaseError{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}t.AbiConstructorParamsNotFoundError=s;class c extends a.BaseError{constructor({data:e,size:t}){super([`Data size of ${t} bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join("\n"),{metaMessages:[`Data: ${e} (${t} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeInvalidError"})}}t.AbiDecodingDataSizeInvalidError=c;class u extends a.BaseError{constructor({data:e,params:t,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join("\n"),{metaMessages:[`Params: (${(0,r.formatAbiParams)(t,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=n}}t.AbiDecodingDataSizeTooSmallError=u;class l extends a.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}t.AbiDecodingZeroDataError=l;class d extends a.BaseError{constructor({expectedLength:e,givenLength:t,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}t.AbiEncodingArrayLengthMismatchError=d;class f extends a.BaseError{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,o.size)(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}t.AbiEncodingBytesSizeMismatchError=f;class h extends a.BaseError{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}t.AbiEncodingLengthMismatchError=h;class p extends a.BaseError{constructor(e,{docsPath:t}){super([`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorInputsNotFoundError"})}}t.AbiErrorInputsNotFoundError=p;class m extends a.BaseError{constructor(e,{docsPath:t}={}){super([`Error ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorNotFoundError"})}}t.AbiErrorNotFoundError=m;class b extends a.BaseError{constructor(e,{docsPath:t}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}t.AbiErrorSignatureNotFoundError=b;class g extends a.BaseError{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}t.AbiEventSignatureEmptyTopicsError=g;class y extends a.BaseError{constructor(e,{docsPath:t}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}t.AbiEventSignatureNotFoundError=y;class v extends a.BaseError{constructor(e,{docsPath:t}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}t.AbiEventNotFoundError=v;class w extends a.BaseError{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}t.AbiFunctionNotFoundError=w;class E extends a.BaseError{constructor(e,{docsPath:t}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}t.AbiFunctionOutputsNotFoundError=E;class A extends a.BaseError{constructor(e,{docsPath:t}){super([`Encoded function signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionSignatureNotFoundError"})}}t.AbiFunctionSignatureNotFoundError=A;class x extends a.BaseError{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}t.BytesSizeMismatchError=x;class P extends a.BaseError{constructor({abiItem:e,data:t,params:n,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join("\n"),{metaMessages:[`Params: (${(0,r.formatAbiParams)(n,{includeName:!0})})`,`Data: ${t} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=n,this.size=o}}t.DecodeLogDataMismatch=P;class C extends a.BaseError{constructor({abiItem:e,param:t}){super([`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,r.formatAbiItem)(e,{includeName:!0})}".`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}t.DecodeLogTopicsMismatch=C;class j extends a.BaseError{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}t.InvalidAbiEncodingTypeError=j;class I extends a.BaseError{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}t.InvalidAbiDecodingTypeError=I;class O extends a.BaseError{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}t.InvalidArrayError=O;class T extends a.BaseError{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}t.InvalidDefinitionTypeError=T;class S extends a.BaseError{constructor(e){super(`Type "${e}" is not supported for packed encoding.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedPackedAbiType"})}}t.UnsupportedPackedAbiType=S},26175:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountNotFoundError=void 0;const r=n(26456);class o extends r.BaseError{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join("\n"),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}t.AccountNotFoundError=o},56293:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAddressError=void 0;const r=n(26456);class o extends r.BaseError{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}t.InvalidAddressError=o},26456:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0;const r=n(54834);class o extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,r.getVersion)()});const n=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof o&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: https://viem.sh${a}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return a(this,e)}}function a(e,t){return t?.(e)?e:e&&"object"===typeof e&&"cause"in e?a(e.cause,t):t?null:e}t.BaseError=o},54907:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockNotFoundError=void 0;const r=n(26456);class o extends r.BaseError{constructor({blockHash:e,blockNumber:t}){let n="Block";e&&(n=`Block at hash "${e}"`),t&&(n=`Block at number "${t}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}t.BlockNotFoundError=o},67409:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OffchainLookupSenderMismatchError=t.OffchainLookupResponseMalformedError=t.OffchainLookupError=void 0;const r=n(58),o=n(26456),a=n(54834);class i extends o.BaseError{constructor({callbackSelector:e,cause:t,data:n,extraData:r,sender:o,urls:i}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",i&&[" Gateway URL(s):",...i.map((e=>` ${(0,a.getUrl)(e)}`))],` Sender: ${o}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${r}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}t.OffchainLookupError=i;class s extends o.BaseError{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,a.getUrl)(t)}`,`Response: ${(0,r.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}t.OffchainLookupResponseMalformedError=s;class c extends o.BaseError{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}t.OffchainLookupSenderMismatchError=c},91363:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidChainIdError=t.ClientChainNotConfiguredError=t.ChainNotFoundError=t.ChainMismatchError=t.ChainDoesNotSupportContract=void 0;const r=n(26456);class o extends r.BaseError{constructor({blockNumber:e,chain:t,contract:n}){super(`Chain "${t.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}t.ChainDoesNotSupportContract=o;class a extends r.BaseError{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} \u2013 ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} \u2013 ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}t.ChainMismatchError=a;class i extends r.BaseError{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}t.ChainNotFoundError=i;class s extends r.BaseError{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}t.ClientChainNotConfiguredError=s;class c extends r.BaseError{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}t.InvalidChainIdError=c},9996:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawContractError=t.ContractFunctionZeroDataError=t.ContractFunctionRevertedError=t.ContractFunctionExecutionError=t.CallExecutionError=void 0;const r=n(3975),o=n(6049),a=n(31293),i=n(16759),s=n(87541),c=n(95481),u=n(90686),l=n(22386),d=n(4403),f=n(26456),h=n(70270),p=n(54834);class m extends f.BaseError{constructor(e,{account:t,docsPath:n,chain:o,data:a,gas:i,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:d,nonce:f,to:p,value:m}){const b=t?(0,r.parseAccount)(t):void 0,g=(0,h.prettyPrint)({from:b?.address,to:p,value:"undefined"!==typeof m&&`${(0,u.formatEther)(m)} ${o?.nativeCurrency.symbol||"ETH"}`,data:a,gas:i,gasPrice:"undefined"!==typeof s&&`${(0,l.formatGwei)(s)} gwei`,maxFeePerGas:"undefined"!==typeof c&&`${(0,l.formatGwei)(c)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,l.formatGwei)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",g].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}t.CallExecutionError=m;class b extends f.BaseError{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:o,functionName:a,sender:u}){const l=(0,c.getAbiItem)({abi:t,args:n,name:a}),d=l?(0,s.formatAbiItemWithArgs)({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=l?(0,i.formatAbiItem)(l,{includeName:!0}):void 0,m=(0,h.prettyPrint)({address:r&&(0,p.getContractAddress)(r),function:f,args:d&&"()"!==d&&`${[...Array(a?.length??0).keys()].map((()=>" ")).join("")}${d}`,sender:u});super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",m].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=n,this.cause=e,this.contractAddress=r,this.functionName=a,this.sender=u}}t.ContractFunctionExecutionError=b;class g extends f.BaseError{constructor({abi:e,data:t,functionName:n,message:r}){let c,u,l,f,h;if(t&&"0x"!==t)try{u=(0,a.decodeErrorResult)({abi:e,data:t});const{abiItem:n,errorName:r,args:c}=u;if("Error"===r)f=c[0];else if("Panic"===r){const[e]=c;f=o.panicReasons[e]}else{const e=n?(0,i.formatAbiItem)(n,{includeName:!0}):void 0,t=n&&c?(0,s.formatAbiItemWithArgs)({abiItem:n,args:c,includeFunctionName:!1,includeName:!1}):void 0;l=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(r?.length??0).keys()].map((()=>" ")).join("")}${t}`:""]}}catch(p){c=p}else r&&(f=r);c instanceof d.AbiErrorSignatureNotFoundError&&(h=c.signature,l=[`Unable to decode signature "${h}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${h}.`]),super(f&&"execution reverted"!==f||h?[`The contract function "${n}" reverted with the following ${h?"signature":"reason"}:`,f||h].join("\n"):`The contract function "${n}" reverted.`,{cause:c,metaMessages:l}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=u,this.reason=f,this.signature=h}}t.ContractFunctionRevertedError=g;class y extends f.BaseError{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}t.ContractFunctionZeroDataError=y;class v extends f.BaseError{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}t.RawContractError=v},68377:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeExceedsPaddingSizeError=t.SliceOffsetOutOfBoundsError=void 0;const r=n(26456);class o extends r.BaseError{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}t.SliceOffsetOutOfBoundsError=o;class a extends r.BaseError{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}t.SizeExceedsPaddingSizeError=a},26425:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeOverflowError=t.OffsetOutOfBoundsError=t.InvalidHexValueError=t.InvalidHexBooleanError=t.InvalidBytesBooleanError=t.IntegerOutOfRangeError=t.DataLengthTooShortError=t.DataLengthTooLongError=void 0;const r=n(26456);class o extends r.BaseError{constructor({consumed:e,length:t}){super(`Consumed bytes (${e}) is shorter than data length (${t-1}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DataLengthTooLongError"})}}t.DataLengthTooLongError=o;class a extends r.BaseError{constructor({length:e,dataLength:t}){super(`Data length (${t-1}) is shorter than prefix length (${e-1}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DataLengthTooShortError"})}}t.DataLengthTooShortError=a;class i extends r.BaseError{constructor({max:e,min:t,signed:n,size:r,value:o}){super(`Number "${o}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}t.IntegerOutOfRangeError=i;class s extends r.BaseError{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesBooleanError"})}}t.InvalidBytesBooleanError=s;class c extends r.BaseError{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}t.InvalidHexBooleanError=c;class u extends r.BaseError{constructor(e){super(`Hex value "${e}" is an odd length (${e.length}). It must be an even length.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexValueError"})}}t.InvalidHexValueError=u;class l extends r.BaseError{constructor({nextOffset:e,offset:t}){super(`Next offset (${e}) is greater than previous offset + consumed bytes (${t})`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffsetOutOfBoundsError"})}}t.OffsetOutOfBoundsError=l;class d extends r.BaseError{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}t.SizeOverflowError=d},80733:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnsAvatarUnsupportedNamespaceError=t.EnsAvatarUriResolutionError=t.EnsAvatarInvalidNftUriError=t.EnsAvatarInvalidMetadataError=void 0;const r=n(26456);class o extends r.BaseError{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}t.EnsAvatarInvalidMetadataError=o;class a extends r.BaseError{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}t.EnsAvatarInvalidNftUriError=a;class i extends r.BaseError{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}t.EnsAvatarUriResolutionError=i;class s extends r.BaseError{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}t.EnsAvatarUnsupportedNamespaceError=s},78966:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EstimateGasExecutionError=void 0;const r=n(90686),o=n(22386),a=n(26456),i=n(70270);class s extends a.BaseError{constructor(e,{account:t,docsPath:n,chain:a,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){const m=(0,i.prettyPrint)({from:t?.address,to:h,value:"undefined"!==typeof p&&`${(0,r.formatEther)(p)} ${a?.nativeCurrency.symbol||"ETH"}`,data:s,gas:c,gasPrice:"undefined"!==typeof u&&`${(0,o.formatGwei)(u)} gwei`,maxFeePerGas:"undefined"!==typeof l&&`${(0,o.formatGwei)(l)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,o.formatGwei)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}t.EstimateGasExecutionError=s},79189:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilterTypeNotSupportedError=void 0;const r=n(26456);class o extends r.BaseError{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}t.FilterTypeNotSupportedError=o},72695:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownNodeError=t.TipAboveFeeCapError=t.TransactionTypeNotSupportedError=t.IntrinsicGasTooLowError=t.IntrinsicGasTooHighError=t.InsufficientFundsError=t.NonceMaxValueError=t.NonceTooLowError=t.NonceTooHighError=t.FeeCapTooLowError=t.FeeCapTooHighError=t.ExecutionRevertedError=void 0;const r=n(22386),o=n(26456);class a extends o.BaseError{constructor({cause:e,message:t}={}){const n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/}),t.ExecutionRevertedError=a;class i extends o.BaseError{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.formatGwei)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/}),t.FeeCapTooHighError=i;class s extends o.BaseError{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.formatGwei)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/}),t.FeeCapTooLowError=s;class c extends o.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/}),t.NonceTooHighError=c;class u extends o.BaseError{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/}),t.NonceTooLowError=u;class l extends o.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/}),t.NonceMaxValueError=l;class d extends o.BaseError{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/}),t.InsufficientFundsError=d;class f extends o.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/}),t.IntrinsicGasTooHighError=f;class h extends o.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/}),t.IntrinsicGasTooLowError=h;class p extends o.BaseError{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/}),t.TransactionTypeNotSupportedError=p;class m extends o.BaseError{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,r.formatGwei)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${(0,r.formatGwei)(n)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/}),t.TipAboveFeeCapError=m;class b extends o.BaseError{constructor({cause:e}){super(`An error occurred while executing: ${e?.message}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}t.UnknownNodeError=b},72782:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=t.RpcRequestError=t.WebSocketRequestError=t.HttpRequestError=void 0;const r=n(58),o=n(26456),a=n(54834);class i extends o.BaseError{constructor({body:e,details:t,headers:n,status:o,url:i}){super("HTTP request failed.",{details:t,metaMessages:[o&&`Status: ${o}`,`URL: ${(0,a.getUrl)(i)}`,e&&`Request body: ${(0,r.stringify)(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=o,this.url=i}}t.HttpRequestError=i;class s extends o.BaseError{constructor({body:e,details:t,url:n}){super("WebSocket request failed.",{details:t,metaMessages:[`URL: ${(0,a.getUrl)(n)}`,`Request body: ${(0,r.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}t.WebSocketRequestError=s;class c extends o.BaseError{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,a.getUrl)(n)}`,`Request body: ${(0,r.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}t.RpcRequestError=c;class u extends o.BaseError{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,a.getUrl)(t)}`,`Request body: ${(0,r.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}t.TimeoutError=u},60793:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownRpcError=t.SwitchChainError=t.ChainDisconnectedError=t.ProviderDisconnectedError=t.UnsupportedProviderMethodError=t.UnauthorizedProviderError=t.UserRejectedRequestError=t.JsonRpcVersionUnsupportedError=t.LimitExceededRpcError=t.MethodNotSupportedRpcError=t.TransactionRejectedRpcError=t.ResourceUnavailableRpcError=t.ResourceNotFoundRpcError=t.InvalidInputRpcError=t.InternalRpcError=t.InvalidParamsRpcError=t.MethodNotFoundRpcError=t.InvalidRequestRpcError=t.ParseRpcError=t.ProviderRpcError=t.RpcError=void 0;const r=n(26456),o=n(72782);class a extends r.BaseError{constructor(e,{code:t,docsPath:n,metaMessages:r,shortMessage:a}){super(a,{cause:e,docsPath:n,metaMessages:r||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof o.RpcRequestError?e.code:t??-1}}t.RpcError=a;class i extends a{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}t.ProviderRpcError=i;class s extends a{constructor(e){super(e,{code:s.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700}),t.ParseRpcError=s;class c extends a{constructor(e){super(e,{code:c.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600}),t.InvalidRequestRpcError=c;class u extends a{constructor(e){super(e,{code:u.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601}),t.MethodNotFoundRpcError=u;class l extends a{constructor(e){super(e,{code:l.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602}),t.InvalidParamsRpcError=l;class d extends a{constructor(e){super(e,{code:d.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603}),t.InternalRpcError=d;class f extends a{constructor(e){super(e,{code:f.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3}),t.InvalidInputRpcError=f;class h extends a{constructor(e){super(e,{code:h.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001}),t.ResourceNotFoundRpcError=h;class p extends a{constructor(e){super(e,{code:p.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002}),t.ResourceUnavailableRpcError=p;class m extends a{constructor(e){super(e,{code:m.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003}),t.TransactionRejectedRpcError=m;class b extends a{constructor(e){super(e,{code:b.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004}),t.MethodNotSupportedRpcError=b;class g extends a{constructor(e){super(e,{code:g.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005}),t.LimitExceededRpcError=g;class y extends a{constructor(e){super(e,{code:y.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006}),t.JsonRpcVersionUnsupportedError=y;class v extends i{constructor(e){super(e,{code:v.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001}),t.UserRejectedRequestError=v;class w extends i{constructor(e){super(e,{code:w.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100}),t.UnauthorizedProviderError=w;class E extends i{constructor(e){super(e,{code:E.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200}),t.UnsupportedProviderMethodError=E;class A extends i{constructor(e){super(e,{code:A.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900}),t.ProviderDisconnectedError=A;class x extends i{constructor(e){super(e,{code:x.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901}),t.ChainDisconnectedError=x;class P extends i{constructor(e){super(e,{code:P.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902}),t.SwitchChainError=P;t.UnknownRpcError=class extends a{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}},70270:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WaitForTransactionReceiptTimeoutError=t.TransactionReceiptNotFoundError=t.TransactionNotFoundError=t.TransactionExecutionError=t.InvalidStorageKeySizeError=t.InvalidSerializedTransactionError=t.InvalidSerializedTransactionTypeError=t.InvalidSerializableTransactionError=t.InvalidLegacyVError=t.FeeConflictError=t.prettyPrint=void 0;const r=n(90686),o=n(22386),a=n(26456);function i(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),n=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`)).join("\n")}t.prettyPrint=i;class s extends a.BaseError{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}t.FeeConflictError=s;class c extends a.BaseError{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}t.InvalidLegacyVError=c;class u extends a.BaseError{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",i(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}t.InvalidSerializableTransactionError=u;class l extends a.BaseError{constructor({serializedType:e}){super(`Serialized transaction type "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=e}}t.InvalidSerializedTransactionTypeError=l;class d extends a.BaseError{constructor({attributes:e,serializedTransaction:t,type:n}){const r=Object.entries(e).map((([e,t])=>"undefined"===typeof t?e:void 0)).filter(Boolean);super(`Invalid serialized transaction of type "${n}" was provided.`,{metaMessages:[`Serialized Transaction: "${t}"`,r.length>0?`Missing Attributes: ${r.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=t,this.type=n}}t.InvalidSerializedTransactionError=d;class f extends a.BaseError{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}t.InvalidStorageKeySizeError=f;class h extends a.BaseError{constructor(e,{account:t,docsPath:n,chain:a,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){const m=i({chain:a&&`${a?.name} (id: ${a?.id})`,from:t?.address,to:h,value:"undefined"!==typeof p&&`${(0,r.formatEther)(p)} ${a?.nativeCurrency.symbol||"ETH"}`,data:s,gas:c,gasPrice:"undefined"!==typeof u&&`${(0,o.formatGwei)(u)} gwei`,maxFeePerGas:"undefined"!==typeof l&&`${(0,o.formatGwei)(l)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,o.formatGwei)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}t.TransactionExecutionError=h;class p extends a.BaseError{constructor({blockHash:e,blockNumber:t,blockTag:n,hash:r,index:o}){let a="Transaction";n&&void 0!==o&&(a=`Transaction at block time "${n}" at index "${o}"`),e&&void 0!==o&&(a=`Transaction at block hash "${e}" at index "${o}"`),t&&void 0!==o&&(a=`Transaction at block number "${t}" at index "${o}"`),r&&(a=`Transaction with hash "${r}"`),super(`${a} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}t.TransactionNotFoundError=p;class m extends a.BaseError{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}t.TransactionReceiptNotFoundError=m;class b extends a.BaseError{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}t.WaitForTransactionReceiptTimeoutError=b},44681:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlRequiredError=void 0;const r=n(26456);class o extends r.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}t.UrlRequiredError=o},54834:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVersion=t.getUrl=t.getContractAddress=void 0;const r=n(59477);t.getContractAddress=e=>e;t.getUrl=e=>e;t.getVersion=()=>`viem@${r.version}`},59477:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="1.5.4"},68995:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=t.maxInt8=t.weiUnits=t.gweiUnits=t.etherUnits=t.zeroAddress=t.multicall3Abi=t.webSocket=t.createWalletClient=t.createTransport=t.walletActions=t.testActions=t.publicActions=t.createTestClient=t.createPublicClient=t.http=t.fallback=t.custom=t.createClient=t.getContract=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.UnknownSignatureError=t.UnknownTypeError=t.SolidityProtectedKeywordError=t.InvalidStructSignatureError=t.InvalidSignatureError=t.InvalidParenthesisError=t.InvalidParameterError=t.InvalidModifierError=t.InvalidFunctionModifierError=t.InvalidAbiTypeParameterError=t.InvalidAbiItemError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=t.CircularReferenceError=void 0,t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=void 0,t.InvalidAbiEncodingTypeError=t.InvalidAbiDecodingTypeError=t.DecodeLogTopicsMismatch=t.AbiFunctionSignatureNotFoundError=t.AbiFunctionOutputsNotFoundError=t.AbiFunctionNotFoundError=t.AbiEventSignatureNotFoundError=t.AbiEventSignatureEmptyTopicsError=t.AbiEventNotFoundError=t.AbiErrorSignatureNotFoundError=t.AbiErrorNotFoundError=t.AbiErrorInputsNotFoundError=t.AbiEncodingLengthMismatchError=t.AbiEncodingArrayLengthMismatchError=t.AbiDecodingZeroDataError=t.AbiDecodingDataSizeInvalidError=t.AbiConstructorParamsNotFoundError=t.AbiConstructorNotFoundError=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=t.minInt144=t.minInt136=t.minInt128=t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=void 0,t.NonceTooLowError=t.NonceTooHighError=t.NonceMaxValueError=t.IntrinsicGasTooLowError=t.IntrinsicGasTooHighError=t.InsufficientFundsError=t.FeeCapTooLowError=t.FeeCapTooHighError=t.ExecutionRevertedError=t.EstimateGasExecutionError=t.EnsAvatarUriResolutionError=t.OffsetOutOfBoundsError=t.InvalidHexValueError=t.InvalidHexBooleanError=t.InvalidBytesBooleanError=t.DataLengthTooShortError=t.DataLengthTooLongError=t.InvalidChainIdError=t.ClientChainNotConfiguredError=t.ChainDoesNotSupportContract=t.UserRejectedRequestError=t.UnsupportedProviderMethodError=t.UnknownRpcError=t.UnauthorizedProviderError=t.SwitchChainError=t.TransactionRejectedRpcError=t.RpcError=t.ResourceUnavailableRpcError=t.ResourceNotFoundRpcError=t.ProviderRpcError=t.ProviderDisconnectedError=t.ParseRpcError=t.MethodNotSupportedRpcError=t.MethodNotFoundRpcError=t.LimitExceededRpcError=t.JsonRpcVersionUnsupportedError=t.InvalidRequestRpcError=t.InvalidParamsRpcError=t.InvalidInputRpcError=t.InternalRpcError=t.ChainDisconnectedError=t.RawContractError=t.ContractFunctionZeroDataError=t.ContractFunctionRevertedError=t.ContractFunctionExecutionError=t.CallExecutionError=t.BlockNotFoundError=t.BaseError=t.InvalidDefinitionTypeError=t.InvalidArrayError=void 0,t.recoverPublicKey=t.recoverMessageAddress=t.recoverAddress=t.hexToSignature=t.hashTypedData=t.getTransactionType=t.getSerializedTransactionType=t.getCreateAddress=t.getCreate2Address=t.getContractAddress=t.getAbiItem=t.formatTransactionRequest=t.defineTransactionRequest=t.defineTransactionReceipt=t.transactionType=t.formatTransaction=t.defineTransaction=t.encodeFunctionResult=t.encodeFunctionData=t.encodeEventTopics=t.encodeErrorResult=t.encodeDeployData=t.encodeAbiParameters=t.decodeFunctionResult=t.decodeFunctionData=t.decodeEventLog=t.decodeErrorResult=t.decodeDeployData=t.decodeAbiParameters=t.formatLog=t.formatBlock=t.defineBlock=t.namehash=t.labelhash=t.UrlRequiredError=t.SizeExceedsPaddingSizeError=t.WaitForTransactionReceiptTimeoutError=t.TransactionReceiptNotFoundError=t.TransactionNotFoundError=t.TransactionExecutionError=t.InvalidLegacyVError=t.InvalidAddressError=t.WebSocketRequestError=t.TimeoutError=t.RpcRequestError=t.HttpRequestError=t.FilterTypeNotSupportedError=t.UnknownNodeError=t.TransactionTypeNotSupportedError=t.TipAboveFeeCapError=void 0,t.isAddressEqual=t.isAddress=t.hashMessage=t.getFunctionSelector=t.getEventSelector=t.getContractError=t.getAddress=t.fromRlp=t.hexToString=t.hexToNumber=t.hexToBool=t.hexToBigInt=t.fromHex=t.formatUnits=t.formatGwei=t.formatEther=t.encodePacked=t.defineChain=t.assertCurrentChain=t.concatHex=t.concatBytes=t.concat=t.offchainLookupSignature=t.offchainLookupAbiItem=t.offchainLookup=t.ccipFetch=t.fromBytes=t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigint=t.toHex=t.stringToHex=t.numberToHex=t.bytesToHex=t.boolToHex=t.toBytes=t.stringToBytes=t.numberToBytes=t.hexToBytes=t.boolToBytes=t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=t.assertRequest=t.verifyTypedData=t.verifyMessage=t.toRlp=t.signatureToHex=t.recoverTypedDataAddress=void 0,t.validateTypedData=t.trim=t.stringify=t.sliceHex=t.sliceBytes=t.slice=t.size=t.serializeTransaction=t.serializeAccessList=t.prepareRequest=t.parseUnits=t.parseTransaction=t.parseGwei=t.parseEther=t.padHex=t.padBytes=t.pad=t.keccak256=t.isHex=t.isHash=t.isBytes=void 0;var r=n(48661);Object.defineProperty(t,"CircularReferenceError",{enumerable:!0,get:function(){return r.CircularReferenceError}}),Object.defineProperty(t,"InvalidAbiParameterError",{enumerable:!0,get:function(){return r.InvalidAbiParameterError}}),Object.defineProperty(t,"InvalidAbiParametersError",{enumerable:!0,get:function(){return r.InvalidAbiParametersError}}),Object.defineProperty(t,"InvalidAbiItemError",{enumerable:!0,get:function(){return r.InvalidAbiItemError}}),Object.defineProperty(t,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return r.InvalidAbiTypeParameterError}}),Object.defineProperty(t,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return r.InvalidFunctionModifierError}}),Object.defineProperty(t,"InvalidModifierError",{enumerable:!0,get:function(){return r.InvalidModifierError}}),Object.defineProperty(t,"InvalidParameterError",{enumerable:!0,get:function(){return r.InvalidParameterError}}),Object.defineProperty(t,"InvalidParenthesisError",{enumerable:!0,get:function(){return r.InvalidParenthesisError}}),Object.defineProperty(t,"InvalidSignatureError",{enumerable:!0,get:function(){return r.InvalidSignatureError}}),Object.defineProperty(t,"InvalidStructSignatureError",{enumerable:!0,get:function(){return r.InvalidStructSignatureError}}),Object.defineProperty(t,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return r.SolidityProtectedKeywordError}}),Object.defineProperty(t,"UnknownTypeError",{enumerable:!0,get:function(){return r.UnknownTypeError}}),Object.defineProperty(t,"UnknownSignatureError",{enumerable:!0,get:function(){return r.UnknownSignatureError}}),Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return r.parseAbi}}),Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return r.parseAbiItem}}),Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return r.parseAbiParameter}}),Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return r.parseAbiParameters}});var o=n(28690);Object.defineProperty(t,"getContract",{enumerable:!0,get:function(){return o.getContract}});var a=n(23259);Object.defineProperty(t,"createClient",{enumerable:!0,get:function(){return a.createClient}});var i=n(99161);Object.defineProperty(t,"custom",{enumerable:!0,get:function(){return i.custom}});var s=n(72826);Object.defineProperty(t,"fallback",{enumerable:!0,get:function(){return s.fallback}});var c=n(28216);Object.defineProperty(t,"http",{enumerable:!0,get:function(){return c.http}});var u=n(86610);Object.defineProperty(t,"createPublicClient",{enumerable:!0,get:function(){return u.createPublicClient}});var l=n(34223);Object.defineProperty(t,"createTestClient",{enumerable:!0,get:function(){return l.createTestClient}});var d=n(8980);Object.defineProperty(t,"publicActions",{enumerable:!0,get:function(){return d.publicActions}});var f=n(49467);Object.defineProperty(t,"testActions",{enumerable:!0,get:function(){return f.testActions}});var h=n(47839);Object.defineProperty(t,"walletActions",{enumerable:!0,get:function(){return h.walletActions}});var p=n(42255);Object.defineProperty(t,"createTransport",{enumerable:!0,get:function(){return p.createTransport}});var m=n(32415);Object.defineProperty(t,"createWalletClient",{enumerable:!0,get:function(){return m.createWalletClient}});var b=n(37003);Object.defineProperty(t,"webSocket",{enumerable:!0,get:function(){return b.webSocket}});var g=n(28669);Object.defineProperty(t,"multicall3Abi",{enumerable:!0,get:function(){return g.multicall3Abi}});var y=n(77243);Object.defineProperty(t,"zeroAddress",{enumerable:!0,get:function(){return y.zeroAddress}});var v=n(99225);Object.defineProperty(t,"etherUnits",{enumerable:!0,get:function(){return v.etherUnits}}),Object.defineProperty(t,"gweiUnits",{enumerable:!0,get:function(){return v.gweiUnits}}),Object.defineProperty(t,"weiUnits",{enumerable:!0,get:function(){return v.weiUnits}});var w=n(84387);Object.defineProperty(t,"maxInt8",{enumerable:!0,get:function(){return w.maxInt8}}),Object.defineProperty(t,"maxInt16",{enumerable:!0,get:function(){return w.maxInt16}}),Object.defineProperty(t,"maxInt24",{enumerable:!0,get:function(){return w.maxInt24}}),Object.defineProperty(t,"maxInt32",{enumerable:!0,get:function(){return w.maxInt32}}),Object.defineProperty(t,"maxInt40",{enumerable:!0,get:function(){return w.maxInt40}}),Object.defineProperty(t,"maxInt48",{enumerable:!0,get:function(){return w.maxInt48}}),Object.defineProperty(t,"maxInt56",{enumerable:!0,get:function(){return w.maxInt56}}),Object.defineProperty(t,"maxInt64",{enumerable:!0,get:function(){return w.maxInt64}}),Object.defineProperty(t,"maxInt72",{enumerable:!0,get:function(){return w.maxInt72}}),Object.defineProperty(t,"maxInt80",{enumerable:!0,get:function(){return w.maxInt80}}),Object.defineProperty(t,"maxInt88",{enumerable:!0,get:function(){return w.maxInt88}}),Object.defineProperty(t,"maxInt96",{enumerable:!0,get:function(){return w.maxInt96}}),Object.defineProperty(t,"maxInt104",{enumerable:!0,get:function(){return w.maxInt104}}),Object.defineProperty(t,"maxInt112",{enumerable:!0,get:function(){return w.maxInt112}}),Object.defineProperty(t,"maxInt120",{enumerable:!0,get:function(){return w.maxInt120}}),Object.defineProperty(t,"maxInt128",{enumerable:!0,get:function(){return w.maxInt128}}),Object.defineProperty(t,"maxInt136",{enumerable:!0,get:function(){return w.maxInt136}}),Object.defineProperty(t,"maxInt144",{enumerable:!0,get:function(){return w.maxInt144}}),Object.defineProperty(t,"maxInt152",{enumerable:!0,get:function(){return w.maxInt152}}),Object.defineProperty(t,"maxInt160",{enumerable:!0,get:function(){return w.maxInt160}}),Object.defineProperty(t,"maxInt168",{enumerable:!0,get:function(){return w.maxInt168}}),Object.defineProperty(t,"maxInt176",{enumerable:!0,get:function(){return w.maxInt176}}),Object.defineProperty(t,"maxInt184",{enumerable:!0,get:function(){return w.maxInt184}}),Object.defineProperty(t,"maxInt192",{enumerable:!0,get:function(){return w.maxInt192}}),Object.defineProperty(t,"maxInt200",{enumerable:!0,get:function(){return w.maxInt200}}),Object.defineProperty(t,"maxInt208",{enumerable:!0,get:function(){return w.maxInt208}}),Object.defineProperty(t,"maxInt216",{enumerable:!0,get:function(){return w.maxInt216}}),Object.defineProperty(t,"maxInt224",{enumerable:!0,get:function(){return w.maxInt224}}),Object.defineProperty(t,"maxInt232",{enumerable:!0,get:function(){return w.maxInt232}}),Object.defineProperty(t,"maxInt240",{enumerable:!0,get:function(){return w.maxInt240}}),Object.defineProperty(t,"maxInt248",{enumerable:!0,get:function(){return w.maxInt248}}),Object.defineProperty(t,"maxInt256",{enumerable:!0,get:function(){return w.maxInt256}}),Object.defineProperty(t,"maxUint8",{enumerable:!0,get:function(){return w.maxUint8}}),Object.defineProperty(t,"maxUint16",{enumerable:!0,get:function(){return w.maxUint16}}),Object.defineProperty(t,"maxUint24",{enumerable:!0,get:function(){return w.maxUint24}}),Object.defineProperty(t,"maxUint32",{enumerable:!0,get:function(){return w.maxUint32}}),Object.defineProperty(t,"maxUint40",{enumerable:!0,get:function(){return w.maxUint40}}),Object.defineProperty(t,"maxUint48",{enumerable:!0,get:function(){return w.maxUint48}}),Object.defineProperty(t,"maxUint56",{enumerable:!0,get:function(){return w.maxUint56}}),Object.defineProperty(t,"maxUint64",{enumerable:!0,get:function(){return w.maxUint64}}),Object.defineProperty(t,"maxUint72",{enumerable:!0,get:function(){return w.maxUint72}}),Object.defineProperty(t,"maxUint80",{enumerable:!0,get:function(){return w.maxUint80}}),Object.defineProperty(t,"maxUint88",{enumerable:!0,get:function(){return w.maxUint88}}),Object.defineProperty(t,"maxUint96",{enumerable:!0,get:function(){return w.maxUint96}}),Object.defineProperty(t,"maxUint104",{enumerable:!0,get:function(){return w.maxUint104}}),Object.defineProperty(t,"maxUint112",{enumerable:!0,get:function(){return w.maxUint112}}),Object.defineProperty(t,"maxUint120",{enumerable:!0,get:function(){return w.maxUint120}}),Object.defineProperty(t,"maxUint128",{enumerable:!0,get:function(){return w.maxUint128}}),Object.defineProperty(t,"maxUint136",{enumerable:!0,get:function(){return w.maxUint136}}),Object.defineProperty(t,"maxUint144",{enumerable:!0,get:function(){return w.maxUint144}}),Object.defineProperty(t,"maxUint152",{enumerable:!0,get:function(){return w.maxUint152}}),Object.defineProperty(t,"maxUint160",{enumerable:!0,get:function(){return w.maxUint160}}),Object.defineProperty(t,"maxUint168",{enumerable:!0,get:function(){return w.maxUint168}}),Object.defineProperty(t,"maxUint176",{enumerable:!0,get:function(){return w.maxUint176}}),Object.defineProperty(t,"maxUint184",{enumerable:!0,get:function(){return w.maxUint184}}),Object.defineProperty(t,"maxUint192",{enumerable:!0,get:function(){return w.maxUint192}}),Object.defineProperty(t,"maxUint200",{enumerable:!0,get:function(){return w.maxUint200}}),Object.defineProperty(t,"maxUint208",{enumerable:!0,get:function(){return w.maxUint208}}),Object.defineProperty(t,"maxUint216",{enumerable:!0,get:function(){return w.maxUint216}}),Object.defineProperty(t,"maxUint224",{enumerable:!0,get:function(){return w.maxUint224}}),Object.defineProperty(t,"maxUint232",{enumerable:!0,get:function(){return w.maxUint232}}),Object.defineProperty(t,"maxUint240",{enumerable:!0,get:function(){return w.maxUint240}}),Object.defineProperty(t,"maxUint248",{enumerable:!0,get:function(){return w.maxUint248}}),Object.defineProperty(t,"maxUint256",{enumerable:!0,get:function(){return w.maxUint256}}),Object.defineProperty(t,"minInt8",{enumerable:!0,get:function(){return w.minInt8}}),Object.defineProperty(t,"minInt16",{enumerable:!0,get:function(){return w.minInt16}}),Object.defineProperty(t,"minInt24",{enumerable:!0,get:function(){return w.minInt24}}),Object.defineProperty(t,"minInt32",{enumerable:!0,get:function(){return w.minInt32}}),Object.defineProperty(t,"minInt40",{enumerable:!0,get:function(){return w.minInt40}}),Object.defineProperty(t,"minInt48",{enumerable:!0,get:function(){return w.minInt48}}),Object.defineProperty(t,"minInt56",{enumerable:!0,get:function(){return w.minInt56}}),Object.defineProperty(t,"minInt64",{enumerable:!0,get:function(){return w.minInt64}}),Object.defineProperty(t,"minInt72",{enumerable:!0,get:function(){return w.minInt72}}),Object.defineProperty(t,"minInt80",{enumerable:!0,get:function(){return w.minInt80}}),Object.defineProperty(t,"minInt88",{enumerable:!0,get:function(){return w.minInt88}}),Object.defineProperty(t,"minInt96",{enumerable:!0,get:function(){return w.minInt96}}),Object.defineProperty(t,"minInt104",{enumerable:!0,get:function(){return w.minInt104}}),Object.defineProperty(t,"minInt112",{enumerable:!0,get:function(){return w.minInt112}}),Object.defineProperty(t,"minInt120",{enumerable:!0,get:function(){return w.minInt120}}),Object.defineProperty(t,"minInt128",{enumerable:!0,get:function(){return w.minInt128}}),Object.defineProperty(t,"minInt136",{enumerable:!0,get:function(){return w.minInt136}}),Object.defineProperty(t,"minInt144",{enumerable:!0,get:function(){return w.minInt144}}),Object.defineProperty(t,"minInt152",{enumerable:!0,get:function(){return w.minInt152}}),Object.defineProperty(t,"minInt160",{enumerable:!0,get:function(){return w.minInt160}}),Object.defineProperty(t,"minInt168",{enumerable:!0,get:function(){return w.minInt168}}),Object.defineProperty(t,"minInt176",{enumerable:!0,get:function(){return w.minInt176}}),Object.defineProperty(t,"minInt184",{enumerable:!0,get:function(){return w.minInt184}}),Object.defineProperty(t,"minInt192",{enumerable:!0,get:function(){return w.minInt192}}),Object.defineProperty(t,"minInt200",{enumerable:!0,get:function(){return w.minInt200}}),Object.defineProperty(t,"minInt208",{enumerable:!0,get:function(){return w.minInt208}}),Object.defineProperty(t,"minInt216",{enumerable:!0,get:function(){return w.minInt216}}),Object.defineProperty(t,"minInt224",{enumerable:!0,get:function(){return w.minInt224}}),Object.defineProperty(t,"minInt232",{enumerable:!0,get:function(){return w.minInt232}}),Object.defineProperty(t,"minInt240",{enumerable:!0,get:function(){return w.minInt240}}),Object.defineProperty(t,"minInt248",{enumerable:!0,get:function(){return w.minInt248}}),Object.defineProperty(t,"minInt256",{enumerable:!0,get:function(){return w.minInt256}});var E=n(4403);Object.defineProperty(t,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return E.AbiConstructorNotFoundError}}),Object.defineProperty(t,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return E.AbiConstructorParamsNotFoundError}}),Object.defineProperty(t,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return E.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(t,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return E.AbiDecodingZeroDataError}}),Object.defineProperty(t,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return E.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(t,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return E.AbiEncodingLengthMismatchError}}),Object.defineProperty(t,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return E.AbiErrorInputsNotFoundError}}),Object.defineProperty(t,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return E.AbiErrorNotFoundError}}),Object.defineProperty(t,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return E.AbiErrorSignatureNotFoundError}}),Object.defineProperty(t,"AbiEventNotFoundError",{enumerable:!0,get:function(){return E.AbiEventNotFoundError}}),Object.defineProperty(t,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return E.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(t,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return E.AbiEventSignatureNotFoundError}}),Object.defineProperty(t,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return E.AbiFunctionNotFoundError}}),Object.defineProperty(t,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return E.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(t,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return E.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(t,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return E.DecodeLogTopicsMismatch}}),Object.defineProperty(t,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return E.InvalidAbiDecodingTypeError}}),Object.defineProperty(t,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return E.InvalidAbiEncodingTypeError}}),Object.defineProperty(t,"InvalidArrayError",{enumerable:!0,get:function(){return E.InvalidArrayError}}),Object.defineProperty(t,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return E.InvalidDefinitionTypeError}});var A=n(26456);Object.defineProperty(t,"BaseError",{enumerable:!0,get:function(){return A.BaseError}});var x=n(54907);Object.defineProperty(t,"BlockNotFoundError",{enumerable:!0,get:function(){return x.BlockNotFoundError}});var P=n(9996);Object.defineProperty(t,"CallExecutionError",{enumerable:!0,get:function(){return P.CallExecutionError}}),Object.defineProperty(t,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return P.ContractFunctionExecutionError}}),Object.defineProperty(t,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return P.ContractFunctionRevertedError}}),Object.defineProperty(t,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return P.ContractFunctionZeroDataError}}),Object.defineProperty(t,"RawContractError",{enumerable:!0,get:function(){return P.RawContractError}});var C=n(60793);Object.defineProperty(t,"ChainDisconnectedError",{enumerable:!0,get:function(){return C.ChainDisconnectedError}}),Object.defineProperty(t,"InternalRpcError",{enumerable:!0,get:function(){return C.InternalRpcError}}),Object.defineProperty(t,"InvalidInputRpcError",{enumerable:!0,get:function(){return C.InvalidInputRpcError}}),Object.defineProperty(t,"InvalidParamsRpcError",{enumerable:!0,get:function(){return C.InvalidParamsRpcError}}),Object.defineProperty(t,"InvalidRequestRpcError",{enumerable:!0,get:function(){return C.InvalidRequestRpcError}}),Object.defineProperty(t,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return C.JsonRpcVersionUnsupportedError}}),Object.defineProperty(t,"LimitExceededRpcError",{enumerable:!0,get:function(){return C.LimitExceededRpcError}}),Object.defineProperty(t,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return C.MethodNotFoundRpcError}}),Object.defineProperty(t,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return C.MethodNotSupportedRpcError}}),Object.defineProperty(t,"ParseRpcError",{enumerable:!0,get:function(){return C.ParseRpcError}}),Object.defineProperty(t,"ProviderDisconnectedError",{enumerable:!0,get:function(){return C.ProviderDisconnectedError}}),Object.defineProperty(t,"ProviderRpcError",{enumerable:!0,get:function(){return C.ProviderRpcError}}),Object.defineProperty(t,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return C.ResourceNotFoundRpcError}}),Object.defineProperty(t,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return C.ResourceUnavailableRpcError}}),Object.defineProperty(t,"RpcError",{enumerable:!0,get:function(){return C.RpcError}}),Object.defineProperty(t,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return C.TransactionRejectedRpcError}}),Object.defineProperty(t,"SwitchChainError",{enumerable:!0,get:function(){return C.SwitchChainError}}),Object.defineProperty(t,"UnauthorizedProviderError",{enumerable:!0,get:function(){return C.UnauthorizedProviderError}}),Object.defineProperty(t,"UnknownRpcError",{enumerable:!0,get:function(){return C.UnknownRpcError}}),Object.defineProperty(t,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return C.UnsupportedProviderMethodError}}),Object.defineProperty(t,"UserRejectedRequestError",{enumerable:!0,get:function(){return C.UserRejectedRequestError}});var j=n(91363);Object.defineProperty(t,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return j.ChainDoesNotSupportContract}}),Object.defineProperty(t,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return j.ClientChainNotConfiguredError}}),Object.defineProperty(t,"InvalidChainIdError",{enumerable:!0,get:function(){return j.InvalidChainIdError}});var I=n(26425);Object.defineProperty(t,"DataLengthTooLongError",{enumerable:!0,get:function(){return I.DataLengthTooLongError}}),Object.defineProperty(t,"DataLengthTooShortError",{enumerable:!0,get:function(){return I.DataLengthTooShortError}}),Object.defineProperty(t,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return I.InvalidBytesBooleanError}}),Object.defineProperty(t,"InvalidHexBooleanError",{enumerable:!0,get:function(){return I.InvalidHexBooleanError}}),Object.defineProperty(t,"InvalidHexValueError",{enumerable:!0,get:function(){return I.InvalidHexValueError}}),Object.defineProperty(t,"OffsetOutOfBoundsError",{enumerable:!0,get:function(){return I.OffsetOutOfBoundsError}});var O=n(80733);Object.defineProperty(t,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return O.EnsAvatarUriResolutionError}});var T=n(78966);Object.defineProperty(t,"EstimateGasExecutionError",{enumerable:!0,get:function(){return T.EstimateGasExecutionError}});var S=n(72695);Object.defineProperty(t,"ExecutionRevertedError",{enumerable:!0,get:function(){return S.ExecutionRevertedError}}),Object.defineProperty(t,"FeeCapTooHighError",{enumerable:!0,get:function(){return S.FeeCapTooHighError}}),Object.defineProperty(t,"FeeCapTooLowError",{enumerable:!0,get:function(){return S.FeeCapTooLowError}}),Object.defineProperty(t,"InsufficientFundsError",{enumerable:!0,get:function(){return S.InsufficientFundsError}}),Object.defineProperty(t,"IntrinsicGasTooHighError",{enumerable:!0,get:function(){return S.IntrinsicGasTooHighError}}),Object.defineProperty(t,"IntrinsicGasTooLowError",{enumerable:!0,get:function(){return S.IntrinsicGasTooLowError}}),Object.defineProperty(t,"NonceMaxValueError",{enumerable:!0,get:function(){return S.NonceMaxValueError}}),Object.defineProperty(t,"NonceTooHighError",{enumerable:!0,get:function(){return S.NonceTooHighError}}),Object.defineProperty(t,"NonceTooLowError",{enumerable:!0,get:function(){return S.NonceTooLowError}}),Object.defineProperty(t,"TipAboveFeeCapError",{enumerable:!0,get:function(){return S.TipAboveFeeCapError}}),Object.defineProperty(t,"TransactionTypeNotSupportedError",{enumerable:!0,get:function(){return S.TransactionTypeNotSupportedError}}),Object.defineProperty(t,"UnknownNodeError",{enumerable:!0,get:function(){return S.UnknownNodeError}});var B=n(79189);Object.defineProperty(t,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return B.FilterTypeNotSupportedError}});var k=n(72782);Object.defineProperty(t,"HttpRequestError",{enumerable:!0,get:function(){return k.HttpRequestError}}),Object.defineProperty(t,"RpcRequestError",{enumerable:!0,get:function(){return k.RpcRequestError}}),Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return k.TimeoutError}}),Object.defineProperty(t,"WebSocketRequestError",{enumerable:!0,get:function(){return k.WebSocketRequestError}});var _=n(56293);Object.defineProperty(t,"InvalidAddressError",{enumerable:!0,get:function(){return _.InvalidAddressError}});var N=n(70270);Object.defineProperty(t,"InvalidLegacyVError",{enumerable:!0,get:function(){return N.InvalidLegacyVError}}),Object.defineProperty(t,"TransactionExecutionError",{enumerable:!0,get:function(){return N.TransactionExecutionError}}),Object.defineProperty(t,"TransactionNotFoundError",{enumerable:!0,get:function(){return N.TransactionNotFoundError}}),Object.defineProperty(t,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return N.TransactionReceiptNotFoundError}}),Object.defineProperty(t,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return N.WaitForTransactionReceiptTimeoutError}});var M=n(68377);Object.defineProperty(t,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return M.SizeExceedsPaddingSizeError}});var R=n(44681);Object.defineProperty(t,"UrlRequiredError",{enumerable:!0,get:function(){return R.UrlRequiredError}});var F=n(41311);Object.defineProperty(t,"labelhash",{enumerable:!0,get:function(){return F.labelhash}});var U=n(77863);Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return U.namehash}});var L=n(23604);Object.defineProperty(t,"defineBlock",{enumerable:!0,get:function(){return L.defineBlock}}),Object.defineProperty(t,"formatBlock",{enumerable:!0,get:function(){return L.formatBlock}});var D=n(80330);Object.defineProperty(t,"formatLog",{enumerable:!0,get:function(){return D.formatLog}});var q=n(14722);Object.defineProperty(t,"decodeAbiParameters",{enumerable:!0,get:function(){return q.decodeAbiParameters}});var H=n(9385);Object.defineProperty(t,"decodeDeployData",{enumerable:!0,get:function(){return H.decodeDeployData}});var z=n(31293);Object.defineProperty(t,"decodeErrorResult",{enumerable:!0,get:function(){return z.decodeErrorResult}});var G=n(81912);Object.defineProperty(t,"decodeEventLog",{enumerable:!0,get:function(){return G.decodeEventLog}});var $=n(14338);Object.defineProperty(t,"decodeFunctionData",{enumerable:!0,get:function(){return $.decodeFunctionData}});var W=n(76286);Object.defineProperty(t,"decodeFunctionResult",{enumerable:!0,get:function(){return W.decodeFunctionResult}});var K=n(24837);Object.defineProperty(t,"encodeAbiParameters",{enumerable:!0,get:function(){return K.encodeAbiParameters}});var Q=n(77833);Object.defineProperty(t,"encodeDeployData",{enumerable:!0,get:function(){return Q.encodeDeployData}});var V=n(59094);Object.defineProperty(t,"encodeErrorResult",{enumerable:!0,get:function(){return V.encodeErrorResult}});var J=n(7534);Object.defineProperty(t,"encodeEventTopics",{enumerable:!0,get:function(){return J.encodeEventTopics}});var Y=n(22836);Object.defineProperty(t,"encodeFunctionData",{enumerable:!0,get:function(){return Y.encodeFunctionData}});var Z=n(72097);Object.defineProperty(t,"encodeFunctionResult",{enumerable:!0,get:function(){return Z.encodeFunctionResult}});var X=n(1982);Object.defineProperty(t,"defineTransaction",{enumerable:!0,get:function(){return X.defineTransaction}}),Object.defineProperty(t,"formatTransaction",{enumerable:!0,get:function(){return X.formatTransaction}}),Object.defineProperty(t,"transactionType",{enumerable:!0,get:function(){return X.transactionType}});var ee=n(5840);Object.defineProperty(t,"defineTransactionReceipt",{enumerable:!0,get:function(){return ee.defineTransactionReceipt}});var te=n(33270);Object.defineProperty(t,"defineTransactionRequest",{enumerable:!0,get:function(){return te.defineTransactionRequest}}),Object.defineProperty(t,"formatTransactionRequest",{enumerable:!0,get:function(){return te.formatTransactionRequest}});var ne=n(95481);Object.defineProperty(t,"getAbiItem",{enumerable:!0,get:function(){return ne.getAbiItem}});var re=n(82668);Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return re.getContractAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return re.getCreate2Address}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return re.getCreateAddress}});var oe=n(19768);Object.defineProperty(t,"getSerializedTransactionType",{enumerable:!0,get:function(){return oe.getSerializedTransactionType}});var ae=n(76547);Object.defineProperty(t,"getTransactionType",{enumerable:!0,get:function(){return ae.getTransactionType}});var ie=n(70834);Object.defineProperty(t,"hashTypedData",{enumerable:!0,get:function(){return ie.hashTypedData}});var se=n(91281);Object.defineProperty(t,"hexToSignature",{enumerable:!0,get:function(){return se.hexToSignature}});var ce=n(34159);Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return ce.recoverAddress}});var ue=n(77753);Object.defineProperty(t,"recoverMessageAddress",{enumerable:!0,get:function(){return ue.recoverMessageAddress}});var le=n(57275);Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return le.recoverPublicKey}});var de=n(80206);Object.defineProperty(t,"recoverTypedDataAddress",{enumerable:!0,get:function(){return de.recoverTypedDataAddress}});var fe=n(24366);Object.defineProperty(t,"signatureToHex",{enumerable:!0,get:function(){return fe.signatureToHex}});var he=n(28913);Object.defineProperty(t,"toRlp",{enumerable:!0,get:function(){return he.toRlp}});var pe=n(19338);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return pe.verifyMessage}});var me=n(92774);Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return me.verifyTypedData}});var be=n(5434);Object.defineProperty(t,"assertRequest",{enumerable:!0,get:function(){return be.assertRequest}});var ge=n(26825);Object.defineProperty(t,"assertTransactionEIP1559",{enumerable:!0,get:function(){return ge.assertTransactionEIP1559}}),Object.defineProperty(t,"assertTransactionEIP2930",{enumerable:!0,get:function(){return ge.assertTransactionEIP2930}}),Object.defineProperty(t,"assertTransactionLegacy",{enumerable:!0,get:function(){return ge.assertTransactionLegacy}});var ye=n(52387);Object.defineProperty(t,"boolToBytes",{enumerable:!0,get:function(){return ye.boolToBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return ye.hexToBytes}}),Object.defineProperty(t,"numberToBytes",{enumerable:!0,get:function(){return ye.numberToBytes}}),Object.defineProperty(t,"stringToBytes",{enumerable:!0,get:function(){return ye.stringToBytes}}),Object.defineProperty(t,"toBytes",{enumerable:!0,get:function(){return ye.toBytes}});var ve=n(86308);Object.defineProperty(t,"boolToHex",{enumerable:!0,get:function(){return ve.boolToHex}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return ve.bytesToHex}}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return ve.numberToHex}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return ve.stringToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return ve.toHex}});var we=n(54328);Object.defineProperty(t,"bytesToBigint",{enumerable:!0,get:function(){return we.bytesToBigint}}),Object.defineProperty(t,"bytesToBool",{enumerable:!0,get:function(){return we.bytesToBool}}),Object.defineProperty(t,"bytesToNumber",{enumerable:!0,get:function(){return we.bytesToNumber}}),Object.defineProperty(t,"bytesToString",{enumerable:!0,get:function(){return we.bytesToString}}),Object.defineProperty(t,"fromBytes",{enumerable:!0,get:function(){return we.fromBytes}});var Ee=n(64045);Object.defineProperty(t,"ccipFetch",{enumerable:!0,get:function(){return Ee.ccipFetch}}),Object.defineProperty(t,"offchainLookup",{enumerable:!0,get:function(){return Ee.offchainLookup}}),Object.defineProperty(t,"offchainLookupAbiItem",{enumerable:!0,get:function(){return Ee.offchainLookupAbiItem}}),Object.defineProperty(t,"offchainLookupSignature",{enumerable:!0,get:function(){return Ee.offchainLookupSignature}});var Ae=n(1501);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return Ae.concat}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return Ae.concatBytes}}),Object.defineProperty(t,"concatHex",{enumerable:!0,get:function(){return Ae.concatHex}});var xe=n(47797);Object.defineProperty(t,"assertCurrentChain",{enumerable:!0,get:function(){return xe.assertCurrentChain}}),Object.defineProperty(t,"defineChain",{enumerable:!0,get:function(){return xe.defineChain}});var Pe=n(33362);Object.defineProperty(t,"encodePacked",{enumerable:!0,get:function(){return Pe.encodePacked}});var Ce=n(90686);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return Ce.formatEther}});var je=n(22386);Object.defineProperty(t,"formatGwei",{enumerable:!0,get:function(){return je.formatGwei}});var Ie=n(88162);Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return Ie.formatUnits}});var Oe=n(57114);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return Oe.fromHex}}),Object.defineProperty(t,"hexToBigInt",{enumerable:!0,get:function(){return Oe.hexToBigInt}}),Object.defineProperty(t,"hexToBool",{enumerable:!0,get:function(){return Oe.hexToBool}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return Oe.hexToNumber}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return Oe.hexToString}});var Te=n(92237);Object.defineProperty(t,"fromRlp",{enumerable:!0,get:function(){return Te.fromRlp}});var Se=n(36556);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return Se.getAddress}});var Be=n(90042);Object.defineProperty(t,"getContractError",{enumerable:!0,get:function(){return Be.getContractError}});var ke=n(79148);Object.defineProperty(t,"getEventSelector",{enumerable:!0,get:function(){return ke.getEventSelector}});var _e=n(18546);Object.defineProperty(t,"getFunctionSelector",{enumerable:!0,get:function(){return _e.getFunctionSelector}});var Ne=n(67475);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return Ne.hashMessage}});var Me=n(21041);Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return Me.isAddress}});var Re=n(13711);Object.defineProperty(t,"isAddressEqual",{enumerable:!0,get:function(){return Re.isAddressEqual}});var Fe=n(43848);Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return Fe.isBytes}});var Ue=n(95056);Object.defineProperty(t,"isHash",{enumerable:!0,get:function(){return Ue.isHash}});var Le=n(77116);Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return Le.isHex}});var De=n(75225);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return De.keccak256}});var qe=n(54405);Object.defineProperty(t,"pad",{enumerable:!0,get:function(){return qe.pad}}),Object.defineProperty(t,"padBytes",{enumerable:!0,get:function(){return qe.padBytes}}),Object.defineProperty(t,"padHex",{enumerable:!0,get:function(){return qe.padHex}});var He=n(39118);Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return He.parseEther}});var ze=n(31187);Object.defineProperty(t,"parseGwei",{enumerable:!0,get:function(){return ze.parseGwei}});var Ge=n(53858);Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return Ge.parseTransaction}});var $e=n(73956);Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return $e.parseUnits}});var We=n(40623);Object.defineProperty(t,"prepareRequest",{enumerable:!0,get:function(){return We.prepareRequest}});var Ke=n(99435);Object.defineProperty(t,"serializeAccessList",{enumerable:!0,get:function(){return Ke.serializeAccessList}});var Qe=n(52932);Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return Qe.serializeTransaction}});var Ve=n(66859);Object.defineProperty(t,"size",{enumerable:!0,get:function(){return Ve.size}});var Je=n(53462);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return Je.slice}}),Object.defineProperty(t,"sliceBytes",{enumerable:!0,get:function(){return Je.sliceBytes}}),Object.defineProperty(t,"sliceHex",{enumerable:!0,get:function(){return Je.sliceHex}});var Ye=n(58);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return Ye.stringify}});var Ze=n(80475);Object.defineProperty(t,"trim",{enumerable:!0,get:function(){return Ze.trim}});var Xe=n(42586);Object.defineProperty(t,"validateTypedData",{enumerable:!0,get:function(){return Xe.validateTypedData}})},14722:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeAbiParameters=void 0;const r=n(4403),o=n(36556),a=n(66859),i=n(53462),s=n(80475),c=n(57114),u=n(24837);function l({data:e,param:t,position:n}){const a=(0,u.getArrayComponents)(t.type);if(a){const[r,o]=a;return function(e,{param:t,length:n,position:r}){if(!n){const n=(0,c.hexToNumber)((0,i.slice)(e,r,r+32,{strict:!0})),o=(0,c.hexToNumber)((0,i.slice)(e,n,n+32,{strict:!0}));let a=0;const s=[];for(let r=0;r!e)),o=r?[]:{};let a=0;if(d(t)){const s=(0,c.hexToNumber)((0,i.slice)(e,n,n+32,{strict:!0}));for(let n=0;n48?(0,c.hexToBigInt)(e,{signed:n}):(0,c.hexToNumber)(e,{signed:n})}}(f,{param:t});if("address"===t.type)return function(e){return{consumed:32,value:(0,o.checksumAddress)((0,i.slice)(e,-20))}}(f);if("bool"===t.type)return function(e){return{consumed:32,value:(0,c.hexToBool)(e)}}(f);throw new r.InvalidAbiDecodingTypeError(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function d(e){const{type:t}=e;if("string"===t)return!0;if("bytes"===t)return!0;if(t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(d);const n=(0,u.getArrayComponents)(e.type);return!(!n||!d({...e,type:n[1]}))}t.decodeAbiParameters=function(e,t){if("0x"===t&&e.length>0)throw new r.AbiDecodingZeroDataError;if((0,a.size)(t)&&(0,a.size)(t)<32)throw new r.AbiDecodingDataSizeTooSmallError({data:t,params:e,size:(0,a.size)(t)});return function({data:e,params:t}){const n=[];let o=0;for(let i=0;i=(0,a.size)(e))throw new r.AbiDecodingDataSizeTooSmallError({data:e,params:t,size:(0,a.size)(e)});const s=t[i],{consumed:c,value:u}=l({data:e,param:s,position:o});n.push(u),o+=c}return n}({data:t,params:e})}},9385:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeDeployData=void 0;const r=n(4403),o=n(14722),a="/docs/contract/decodeDeployData";t.decodeDeployData=function({abi:e,bytecode:t,data:n}){if(n===t)return{bytecode:t};const i=e.find((e=>"type"in e&&"constructor"===e.type));if(!i)throw new r.AbiConstructorNotFoundError({docsPath:a});if(!("inputs"in i))throw new r.AbiConstructorParamsNotFoundError({docsPath:a});if(!i.inputs||0===i.inputs.length)throw new r.AbiConstructorParamsNotFoundError({docsPath:a});return{args:(0,o.decodeAbiParameters)(i.inputs,`0x${n.replace(t,"")}`),bytecode:t}}},31293:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeErrorResult=void 0;const r=n(6049),o=n(4403),a=n(53462),i=n(18546),s=n(14722),c=n(16759);t.decodeErrorResult=function({abi:e,data:t}){const n=(0,a.slice)(t,0,4);if("0x"===n)throw new o.AbiDecodingZeroDataError;const u=[...e||[],r.solidityError,r.solidityPanic].find((e=>"error"===e.type&&n===(0,i.getFunctionSelector)((0,c.formatAbiItem)(e))));if(!u)throw new o.AbiErrorSignatureNotFoundError(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?(0,s.decodeAbiParameters)(u.inputs,(0,a.slice)(t,4)):void 0,errorName:u.name}}},81912:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeEventLog=void 0;const r=n(4403),o=n(79148),a=n(14722),i=n(16759),s="/docs/contract/decodeEventLog";function c({param:e,value:t}){if("string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))return t;return((0,a.decodeAbiParameters)([e],t)||[])[0]}t.decodeEventLog=function({abi:e,data:t,strict:n,topics:u}){const l=n??!0,[d,...f]=u;if(!d)throw new r.AbiEventSignatureEmptyTopicsError({docsPath:s});const h=e.find((e=>"event"===e.type&&d===(0,o.getEventSelector)((0,i.formatAbiItem)(e))));if(!h||!("name"in h)||"event"!==h.type)throw new r.AbiEventSignatureNotFoundError(d,{docsPath:s});const{name:p,inputs:m}=h,b=m?.some((e=>!("name"in e&&e.name)));let g=b?[]:{};const y=m.filter((e=>"indexed"in e&&e.indexed));if(f.length>0)for(let o=0;o!("indexed"in e&&e.indexed)));if(v.length>0)if(t&&"0x"!==t)try{const e=(0,a.decodeAbiParameters)(v,t);if(e)if(b)g=[...g,...e];else for(let t=0;t0?g:void 0}}},14338:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeFunctionData=void 0;const r=n(4403),o=n(53462),a=n(18546),i=n(14722),s=n(16759);t.decodeFunctionData=function({abi:e,data:t}){const n=(0,o.slice)(t,0,4),c=e.find((e=>"function"===e.type&&n===(0,a.getFunctionSelector)((0,s.formatAbiItem)(e))));if(!c)throw new r.AbiFunctionSignatureNotFoundError(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:c.name,args:"inputs"in c&&c.inputs&&c.inputs.length>0?(0,i.decodeAbiParameters)(c.inputs,(0,o.slice)(t,4)):void 0}}},76286:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeFunctionResult=void 0;const r=n(4403),o=n(14722),a=n(95481),i="/docs/contract/decodeFunctionResult";t.decodeFunctionResult=function({abi:e,args:t,functionName:n,data:s}){let c=e[0];if(n&&(c=(0,a.getAbiItem)({abi:e,args:t,name:n}),!c))throw new r.AbiFunctionNotFoundError(n,{docsPath:i});if("function"!==c.type)throw new r.AbiFunctionNotFoundError(void 0,{docsPath:i});if(!c.outputs)throw new r.AbiFunctionOutputsNotFoundError(c.name,{docsPath:i});const u=(0,o.decodeAbiParameters)(c.outputs,s);return u&&u.length>1?u:u&&1===u.length?u[0]:void 0}},24837:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getArrayComponents=t.encodeAbiParameters=void 0;const r=n(4403),o=n(56293),a=n(21041),i=n(1501),s=n(54405),c=n(66859),u=n(53462),l=n(86308);function d({param:e,value:t}){const n=h(e.type);if(n){const[o,a]=n;return function(e,{length:t,param:n}){const o=null===t;if(!Array.isArray(e))throw new r.InvalidArrayError(e);if(!o&&e.length!==t)throw new r.AbiEncodingArrayLengthMismatchError({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let a=!1;const s=[];for(let r=0;r0?(0,i.concat)([t,e]):t}}if(a)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,i.concat)(s.map((({encoded:e})=>e)))}}(t,{length:o,param:{...e,type:a}})}if("tuple"===e.type)return function(e,{param:t}){let n=!1;const r=[];for(let o=0;oe)))}}(t,{param:e});if("address"===e.type)return function(e){if(!(0,a.isAddress)(e))throw new o.InvalidAddressError({address:e});return{dynamic:!1,encoded:(0,s.padHex)(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){return{dynamic:!1,encoded:(0,s.padHex)((0,l.boolToHex)(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){return function(e,{signed:t}){return{dynamic:!1,encoded:(0,l.numberToHex)(e,{size:32,signed:t})}}(t,{signed:e.type.startsWith("int")})}if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,n]=t.type.split("bytes"),o=(0,c.size)(e);if(!n){let t=e;return o%32!==0&&(t=(0,s.padHex)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,i.concat)([(0,s.padHex)((0,l.numberToHex)(o,{size:32})),t])}}if(o!==parseInt(n))throw new r.AbiEncodingBytesSizeMismatchError({expectedSize:parseInt(n),value:e});return{dynamic:!1,encoded:(0,s.padHex)(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=(0,l.stringToHex)(e),n=Math.ceil((0,c.size)(t)/32),r=[];for(let o=0;o"type"in e&&"constructor"===e.type));if(!s)throw new r.AbiConstructorNotFoundError({docsPath:i});if(!("inputs"in s))throw new r.AbiConstructorParamsNotFoundError({docsPath:i});if(!s.inputs||0===s.inputs.length)throw new r.AbiConstructorParamsNotFoundError({docsPath:i});const c=(0,a.encodeAbiParameters)(s.inputs,t);return(0,o.concatHex)([n,c])}},59094:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeErrorResult=void 0;const r=n(4403),o=n(1501),a=n(18546),i=n(24837),s=n(16759),c=n(95481),u="/docs/contract/encodeErrorResult";t.encodeErrorResult=function({abi:e,errorName:t,args:n}){let l=e[0];if(t&&(l=(0,c.getAbiItem)({abi:e,args:n,name:t}),!l))throw new r.AbiErrorNotFoundError(t,{docsPath:u});if("error"!==l.type)throw new r.AbiErrorNotFoundError(void 0,{docsPath:u});const d=(0,s.formatAbiItem)(l),f=(0,a.getFunctionSelector)(d);let h="0x";if(n&&n.length>0){if(!l.inputs)throw new r.AbiErrorInputsNotFoundError(l.name,{docsPath:u});h=(0,i.encodeAbiParameters)(l.inputs,n)}return(0,o.concatHex)([f,h])}},7534:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeEventTopics=void 0;const r=n(4403),o=n(79189),a=n(52387),i=n(79148),s=n(75225),c=n(24837),u=n(16759),l=n(95481);function d({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,s.keccak256)((0,a.toBytes)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new o.FilterTypeNotSupportedError(e.type);return(0,c.encodeAbiParameters)([e],[t])}t.encodeEventTopics=function({abi:e,eventName:t,args:n}){let o=e[0];if(t&&(o=(0,l.getAbiItem)({abi:e,args:n,name:t}),!o))throw new r.AbiEventNotFoundError(t,{docsPath:"/docs/contract/encodeEventTopics"});if("event"!==o.type)throw new r.AbiEventNotFoundError(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const a=(0,u.formatAbiItem)(o),s=(0,i.getEventSelector)(a);let c=[];if(n&&"inputs"in o){const e=o.inputs?.filter((e=>"indexed"in e&&e.indexed)),t=Array.isArray(n)?n:Object.values(n).length>0?e?.map((e=>n[e.name]))??[]:[];t.length>0&&(c=e?.map(((e,n)=>Array.isArray(t[n])?t[n].map(((r,o)=>d({param:e,value:t[n][o]}))):t[n]?d({param:e,value:t[n]}):null))??[])}return[s,...c]}},22836:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFunctionData=void 0;const r=n(4403),o=n(1501),a=n(18546),i=n(24837),s=n(16759),c=n(95481);t.encodeFunctionData=function({abi:e,args:t,functionName:n}){let u=e[0];if(n&&(u=(0,c.getAbiItem)({abi:e,args:t,name:n}),!u))throw new r.AbiFunctionNotFoundError(n,{docsPath:"/docs/contract/encodeFunctionData"});if("function"!==u.type)throw new r.AbiFunctionNotFoundError(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const l=(0,s.formatAbiItem)(u),d=(0,a.getFunctionSelector)(l),f="inputs"in u&&u.inputs?(0,i.encodeAbiParameters)(u.inputs,t??[]):void 0;return(0,o.concatHex)([d,f??"0x"])}},72097:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFunctionResult=void 0;const r=n(4403),o=n(24837),a=n(95481);t.encodeFunctionResult=function({abi:e,functionName:t,result:n}){let i=e[0];if(t&&(i=(0,a.getAbiItem)({abi:e,name:t}),!i))throw new r.AbiFunctionNotFoundError(t,{docsPath:"/docs/contract/encodeFunctionResult"});if("function"!==i.type)throw new r.AbiFunctionNotFoundError(void 0,{docsPath:"/docs/contract/encodeFunctionResult"});if(!i.outputs)throw new r.AbiFunctionOutputsNotFoundError(i.name,{docsPath:"/docs/contract/encodeFunctionResult"});let s=Array.isArray(n)?n:[n];return 0!==i.outputs.length||s[0]||(s=[]),(0,o.encodeAbiParameters)(i.outputs,s)}},33362:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodePacked=void 0;const r=n(4403),o=n(56293),a=n(21041),i=n(1501),s=n(54405),c=n(86308),u=n(27678);function l(e,t,n=!1){if("address"===e){const e=t;if(!(0,a.isAddress)(e))throw new o.InvalidAddressError({address:e});return(0,s.pad)(e.toLowerCase(),{size:n?32:null})}if("string"===e)return(0,c.stringToHex)(t);if("bytes"===e)return t;if("bool"===e)return(0,s.pad)((0,c.boolToHex)(t),{size:n?32:1});const d=e.match(u.integerRegex);if(d){const[e,r,o="256"]=d,a=parseInt(o)/8;return(0,c.numberToHex)(t,{size:n?32:a,signed:"int"===r})}const f=e.match(u.bytesRegex);if(f){const[e,o]=f;if(parseInt(o)!==(t.length-2)/2)throw new r.BytesSizeMismatchError({expectedSize:parseInt(o),givenSize:(t.length-2)/2});return(0,s.pad)(t,{dir:"right",size:n?32:null})}const h=e.match(u.arrayRegex);if(h&&Array.isArray(t)){const[e,n]=h,r=[];for(let o=0;ofunction(e,{includeName:t}){if(e.type.startsWith("tuple"))return`(${o(e.components,{includeName:t})})${e.type.slice("tuple".length)}`;return e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t}))).join(t?", ":","):""}t.formatAbiItem=function(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new r.InvalidDefinitionTypeError(e.type);return`${e.name}(${o(e.inputs,{includeName:t})})`},t.formatAbiParams=o},87541:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiItemWithArgs=void 0;const r=n(58);t.formatAbiItemWithArgs=function({abiItem:e,args:t,includeFunctionName:n=!0,includeName:o=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map(((e,n)=>`${o&&e.name?`${e.name}: `:""}${"object"===typeof t[n]?(0,r.stringify)(t[n]):t[n]}`)).join(", ")})`}},95481:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArgOfType=t.getAbiItem=void 0;const r=n(21041);function o(e,t){const n=typeof e,a=t.type;switch(a){case"address":return(0,r.isAddress)(e);case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:return"tuple"===a&&"components"in t?Object.values(t.components).every(((t,n)=>o(Object.values(e)[n],t))):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(a)?"number"===n||"bigint"===n:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(a)?"string"===n||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(a)&&(Array.isArray(e)&&e.every((e=>o(e,{...t,type:a.replace(/(\[[0-9]{0,}\])$/,"")}))))}}t.getAbiItem=function({abi:e,args:t=[],name:n}){const r=e.filter((e=>"name"in e&&e.name===n));if(0!==r.length){if(1===r.length)return r[0];for(const e of r){if(!("inputs"in e))continue;if(!t||0===t.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(!e.inputs)continue;if(0===e.inputs.length)continue;if(e.inputs.length!==t.length)continue;if(t.every(((t,n)=>{const r="inputs"in e&&e.inputs[n];return!!r&&o(t,r)})))return e}return r[0]}},t.isArgOfType=o},43817:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publicKeyToAddress=t.parseAccount=void 0;var r=n(3975);Object.defineProperty(t,"parseAccount",{enumerable:!0,get:function(){return r.parseAccount}});var o=n(3417);Object.defineProperty(t,"publicKeyToAddress",{enumerable:!0,get:function(){return o.publicKeyToAddress}})},36556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddress=t.checksumAddress=void 0;const r=n(56293),o=n(52387),a=n(75225),i=n(21041);function s(e,t){const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=(0,a.keccak256)((0,o.stringToBytes)(n),"bytes"),i=(t?n.substring(`${t}0x`.length):n).split("");for(let o=0;o<40;o+=2)r[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(15&r[o>>1])>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());return`0x${i.join("")}`}t.checksumAddress=s,t.getAddress=function(e,t){if(!(0,i.isAddress)(e))throw new r.InvalidAddressError({address:e});return s(e,t)}},82668:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCreate2Address=t.getCreateAddress=t.getContractAddress=void 0;const r=n(1501),o=n(43848),a=n(54405),i=n(53462),s=n(52387),c=n(28913),u=n(75225),l=n(36556);function d(e){const t=(0,s.toBytes)((0,l.getAddress)(e.from));let n=(0,s.toBytes)(e.nonce);return 0===n[0]&&(n=new Uint8Array([])),(0,l.getAddress)(`0x${(0,u.keccak256)((0,c.toRlp)([t,n],"bytes")).slice(26)}`)}function f(e){const t=(0,s.toBytes)((0,l.getAddress)(e.from)),n=(0,a.pad)((0,o.isBytes)(e.salt)?e.salt:(0,s.toBytes)(e.salt),{size:32}),c=(0,s.toBytes)((0,u.keccak256)((0,o.isBytes)(e.bytecode)?e.bytecode:(0,s.toBytes)(e.bytecode)));return(0,l.getAddress)((0,i.slice)((0,u.keccak256)((0,r.concat)([(0,s.toBytes)("0xff"),t,n,c])),12))}t.getContractAddress=function(e){return"CREATE2"===e.opcode?f(e):d(e)},t.getCreateAddress=d,t.getCreate2Address=f},21041:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddress=void 0;const n=/^0x[a-fA-F0-9]{40}$/;t.isAddress=function(e){return n.test(e)}},13711:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddressEqual=void 0;const r=n(56293),o=n(21041);t.isAddressEqual=function(e,t){if(!(0,o.isAddress)(e))throw new r.InvalidAddressError({address:e});if(!(0,o.isAddress)(t))throw new r.InvalidAddressError({address:t});return e.toLowerCase()===t.toLowerCase()}},25056:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildRequest=t.isDeterministicError=void 0;const r=n(26456),o=n(72782),a=n(60793),i=n(89514);t.isDeterministicError=e=>"code"in e?-1!==e.code&&-32004!==e.code&&-32005!==e.code&&-32042!==e.code&&-32603!==e.code:!!(e instanceof o.HttpRequestError&&e.status)&&(403!==e.status&&408!==e.status&&413!==e.status&&429!==e.status&&500!==e.status&&502!==e.status&&503!==e.status&&504!==e.status),t.buildRequest=function(e,{retryDelay:n=150,retryCount:s=3}={}){return async c=>(0,i.withRetry)((async()=>{try{return await e(c)}catch(t){const e=t;switch(e.code){case a.ParseRpcError.code:throw new a.ParseRpcError(e);case a.InvalidRequestRpcError.code:throw new a.InvalidRequestRpcError(e);case a.MethodNotFoundRpcError.code:throw new a.MethodNotFoundRpcError(e);case a.InvalidParamsRpcError.code:throw new a.InvalidParamsRpcError(e);case a.InternalRpcError.code:throw new a.InternalRpcError(e);case a.InvalidInputRpcError.code:throw new a.InvalidInputRpcError(e);case a.ResourceNotFoundRpcError.code:throw new a.ResourceNotFoundRpcError(e);case a.ResourceUnavailableRpcError.code:throw new a.ResourceUnavailableRpcError(e);case a.TransactionRejectedRpcError.code:throw new a.TransactionRejectedRpcError(e);case a.MethodNotSupportedRpcError.code:throw new a.MethodNotSupportedRpcError(e);case a.LimitExceededRpcError.code:throw new a.LimitExceededRpcError(e);case a.JsonRpcVersionUnsupportedError.code:throw new a.JsonRpcVersionUnsupportedError(e);case a.UserRejectedRequestError.code:throw new a.UserRejectedRequestError(e);case a.UnauthorizedProviderError.code:throw new a.UnauthorizedProviderError(e);case a.UnsupportedProviderMethodError.code:throw new a.UnsupportedProviderMethodError(e);case a.ProviderDisconnectedError.code:throw new a.ProviderDisconnectedError(e);case a.ChainDisconnectedError.code:throw new a.ChainDisconnectedError(e);case a.SwitchChainError.code:throw new a.SwitchChainError(e);default:if(t instanceof r.BaseError)throw t;throw new a.UnknownRpcError(e)}}}),{delay:({count:e,error:t})=>{if(t&&t instanceof o.HttpRequestError){const e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<!(0,t.isDeterministicError)(e)})}},64045:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ccipFetch=t.offchainLookup=t.offchainLookupAbiItem=t.offchainLookupSignature=void 0;const r=n(11273),o=n(67409),a=n(72782),i=n(31293),s=n(24837),c=n(13711),u=n(1501),l=n(77116),d=n(58);async function f({data:e,sender:t,urls:n}){let r=new Error("An unknown error occurred.");for(let s=0;se)throw new r.ChainDoesNotSupportContract({blockNumber:e,chain:t,contract:{name:n,blockCreated:o.blockCreated}});return o.address}},35914:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractFunctionType=t.extractFunctionParams=t.extractFunctionName=t.extractFunctionParts=void 0;const n=/((function|event)\s)?(.*)(\((.*)\))/;function r(e){const t=e.match(n),r=t?.[2]||void 0,o=t?.[3];return{type:r,name:o,params:t?.[5]||void 0}}t.extractFunctionParts=r,t.extractFunctionName=function(e){return r(e).name},t.extractFunctionParams=function(e){const t=r(e).params?.split(",").map((e=>e.trim().split(" ")));return t?.map((e=>({type:e[0],name:"indexed"===e[1]?e[2]:e[1],..."indexed"===e[1]?{indexed:!0}:{}})))},t.extractFunctionType=function(e){return r(e).type}},1501:function(e,t){"use strict";function n(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function r(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.concatHex=t.concatBytes=t.concat=void 0,t.concat=function(e){return"string"===typeof e[0]?r(e):n(e)},t.concatBytes=n,t.concatHex=r},43848:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBytes=void 0,t.isBytes=function(e){return!!e&&("object"===typeof e&&("BYTES_PER_ELEMENT"in e&&(1===e.BYTES_PER_ELEMENT&&"Uint8Array"===e.constructor.name)))}},56770:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBytesEqual=void 0;const r=n(68995),o=n(41830);t.isBytesEqual=function(e,t){const n=(0,r.isHex)(e)?(0,r.toBytes)(e):e,a=(0,r.isHex)(t)?(0,r.toBytes)(t):t;return(0,o.equalBytes)(n,a)}},77116:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHex=void 0,t.isHex=function(e,{strict:t=!0}={}){return!!e&&("string"===typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")))}},54405:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.padBytes=t.padHex=t.pad=void 0;const r=n(68377);function o(e,{dir:t,size:n=32}={}){if(null===n)return e;const o=e.replace("0x","");if(o.length>2*n)throw new r.SizeExceedsPaddingSizeError({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o["right"===t?"padEnd":"padStart"](2*n,"0")}`}function a(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new r.SizeExceedsPaddingSizeError({size:e.length,targetSize:n,type:"bytes"});const o=new Uint8Array(n);for(let r=0;r0&&t>(0,a.size)(e)-1)throw new r.SliceOffsetOutOfBoundsError({offset:t,position:"start",size:(0,a.size)(e)})}function s(e,t,n){if("number"===typeof t&&"number"===typeof n&&(0,a.size)(e)!==n-t)throw new r.SliceOffsetOutOfBoundsError({offset:n,position:"end",size:(0,a.size)(e)})}function c(e,t,n,{strict:r}={}){i(e,t);const o=e.slice(t,n);return r&&s(o,t,n),o}function u(e,t,n,{strict:r}={}){i(e,t);const o=`0x${e.replace("0x","").slice(2*(t??0),2*(n??e.length))}`;return r&&s(o,t,n),o}t.slice=function(e,t,n,{strict:r}={}){return(0,o.isHex)(e,{strict:!1})?u(e,t,n,{strict:r}):c(e,t,n,{strict:r})},t.sliceBytes=c,t.sliceHex=u},80475:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trim=void 0,t.trim=function(e,{dir:t="left"}={}){let n="string"===typeof e?e.replace("0x",""):e,r=0;for(let o=0;o1||n[0]>1)throw new r.InvalidBytesBooleanError(n);return Boolean(n[0])}function u(e,t={}){"undefined"!==typeof t.size&&(0,a.assertSize)(e,{size:t.size});const n=(0,i.bytesToHex)(e,t);return(0,a.hexToNumber)(n)}function l(e,t={}){let n=e;return"undefined"!==typeof t.size&&((0,a.assertSize)(n,{size:t.size}),n=(0,o.trim)(n,{dir:"right"})),(new TextDecoder).decode(n)}t.fromBytes=function(e,t){const n="string"===typeof t?{to:t}:t,r=n.to;return"number"===r?u(e,n):"bigint"===r?s(e,n):"boolean"===r?c(e,n):"string"===r?l(e,n):(0,i.bytesToHex)(e,n)},t.bytesToBigint=s,t.bytesToBool=c,t.bytesToNumber=u,t.bytesToString=l},57114:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToString=t.hexToNumber=t.hexToBool=t.hexToBigInt=t.fromHex=t.assertSize=void 0;const r=n(26425),o=n(66859),a=n(80475),i=n(52387);function s(e,{size:t}){if((0,o.size)(e)>t)throw new r.SizeOverflowError({givenSize:(0,o.size)(e),maxSize:t})}function c(e,t={}){const{signed:n}=t;t.size&&s(e,{size:t.size});const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2;return r<=(1n<<8n*BigInt(o)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*o,"f")}`)-1n}function u(e,t={}){let n=e;if(t.size&&(s(n,{size:t.size}),n=(0,a.trim)(n)),"0x00"===(0,a.trim)(n))return!1;if("0x01"===(0,a.trim)(n))return!0;throw new r.InvalidHexBooleanError(n)}function l(e,t={}){return Number(c(e,t))}function d(e,t={}){let n=(0,i.hexToBytes)(e);return t.size&&(s(n,{size:t.size}),n=(0,a.trim)(n,{dir:"right"})),(new TextDecoder).decode(n)}t.assertSize=s,t.fromHex=function(e,t){const n="string"===typeof t?{to:t}:t,r=n.to;return"number"===r?l(e,n):"bigint"===r?c(e,n):"string"===r?d(e,n):"boolean"===r?u(e,n):(0,i.hexToBytes)(e,n)},t.hexToBigInt=c,t.hexToBool=u,t.hexToNumber=l,t.hexToString=d},92237:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromRlp=void 0;const r=n(26425),o=n(54328),a=n(52387),i=n(86308);function s(e,t){return Array.isArray(e)?e.map((e=>s(e,t))):"hex"===t?(0,i.bytesToHex)(e):e}function c(e,t=0){if(0===e.length)return[new Uint8Array([]),0];const n=e[t];if(n<=127)return[new Uint8Array([e[t]]),1];if(n<=183){const o=n-128,a=t+1;if(a+o>e.length)throw new r.DataLengthTooShortError({length:a+o,dataLength:e.length});return[e.slice(a,a+o),1+o]}if(n<=191){const a=n-183,i=t+1,s=(0,o.bytesToNumber)(e.slice(i,i+a));if(i+a+s>e.length)throw new r.DataLengthTooShortError({length:a+s,dataLength:e.length-a});return[e.slice(i+a,i+a+s),1+a+s]}let a=0,i=n-192;n>247&&(a=n-247,i=(0,o.bytesToNumber)(e.slice(t+1,t+1+a)));let s=t+1+a;if(s>e.length)throw new r.DataLengthTooShortError({length:s,dataLength:e.length});const u=1+a+i,l=[];for(;st+u)throw new r.OffsetOutOfBoundsError({nextOffset:s,offset:t+u})}return[l,u]}t.fromRlp=function(e,t){const n=function(e){if("string"===typeof e){if(e.length>3&&e.length%2!==0)throw new r.InvalidHexValueError(e);return(0,a.hexToBytes)(e)}return e}(e),[o,i]=c(n);if(it.toString(16).padStart(2,"0")));function s(e,t={}){const n=`0x${Number(e)}`;return"number"===typeof t.size?((0,a.assertSize)(n,{size:t.size}),(0,o.pad)(n,{size:t.size})):n}function c(e,t={}){let n="";for(let o=0;os||ihttps?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,i=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,s=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,c=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function u(e){try{const t=await fetch(e,{method:"HEAD"});if(200===t.status){return t.headers.get("content-type")?.startsWith("image/")}return!1}catch(t){return("object"!==typeof t||"undefined"===typeof t.response)&&(!!globalThis.hasOwnProperty("Image")&&new Promise((t=>{const n=new Image;n.onload=()=>{t(!0)},n.onerror=()=>{t(!1)},n.src=e})))}}function l(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function d({uri:e,gatewayUrls:t}){const n=s.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=l(t?.ipfs,"https://ipfs.io"),u=l(t?.arweave,"https://arweave.net"),d=e.match(a),{protocol:f,subpath:h,target:p,subtarget:m=""}=d?.groups||{},b="ipns:/"===f||"ipns/"===h,g="ipfs:/"===f||"ipfs/"===h||i.test(e);if(e.startsWith("http")&&!b&&!g){let n=e;return t?.arweave&&(n=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:n,isOnChain:!1,isEncoded:!1}}if((b||g)&&p)return{uri:`${r}/${b?"ipns":"ipfs"}/${p}${m}`,isOnChain:!1,isEncoded:!1};if("ar:/"===f&&p)return{uri:`${u}/${p}${m||""}`,isOnChain:!1,isEncoded:!1};let y=e.replace(c,"");if(y.startsWith("e.json()));return await h({gatewayUrls:e,uri:f(n)})}catch{throw new o.EnsAvatarUriResolutionError({uri:t})}},t.parseAvatarUri=h,t.parseNftUri=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,a]=t.split("/"),[i,s]=n.split(":"),[c,u]=r.split(":");if(!i||"eip155"!==i.toLowerCase())throw new o.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!s)throw new o.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!u)throw new o.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!a)throw new o.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!c)throw new o.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:parseInt(s),namespace:c.toLowerCase(),contractAddress:u,tokenID:a}},t.getNftTokenUri=async function(e,{nft:t}){if("erc721"===t.namespace)return(0,r.readContract)(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return(0,r.readContract)(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new o.EnsAvatarUnsupportedNamespaceError({namespace:t.namespace})}},17398:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeLabelhash=void 0,t.encodeLabelhash=function(e){return`[${e.slice(2)}]`}},7367:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodedLabelToLabelhash=void 0;const r=n(50634);t.encodedLabelToLabelhash=function(e){if(66!==e.length)return null;if(0!==e.indexOf("["))return null;if(65!==e.indexOf("]"))return null;const t=`0x${e.slice(1,65)}`;return(0,r.isHex)(t)?t:null}},19662:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNullUniversalResolverError=void 0;const r=n(6049),o=n(26456),a=n(9996);t.isNullUniversalResolverError=function(e,t){if(!(e instanceof o.BaseError))return!1;const n=e.walk((e=>e instanceof a.ContractFunctionRevertedError));return n instanceof a.ContractFunctionRevertedError&&("ResolverNotFound"===n.data?.errorName||("ResolverWildcardNotSupported"===n.data?.errorName||(!!n.reason?.includes("Wildcard on non-extended resolvers is not supported")||"reverse"===t&&n.reason===r.panicReasons[50])))}},41311:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.labelhash=void 0;const r=n(52387),o=n(86308),a=n(75225),i=n(7367);t.labelhash=function(e){const t=new Uint8Array(32).fill(0);return e?(0,i.encodedLabelToLabelhash)(e)||(0,a.keccak256)((0,r.stringToBytes)(e)):(0,o.bytesToHex)(t)}},77863:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namehash=void 0;const r=n(1501),o=n(52387),a=n(86308),i=n(75225),s=n(7367);t.namehash=function(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,a.bytesToHex)(t);const n=e.split(".");for(let a=n.length-1;a>=0;a-=1){const e=(0,s.encodedLabelToLabelhash)(n[a]),c=e?(0,o.toBytes)(e):(0,i.keccak256)((0,o.stringToBytes)(n[a]),"bytes");t=(0,i.keccak256)((0,r.concat)([t,c]),"bytes")}return(0,a.bytesToHex)(t)}},72126:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packetToBytes=void 0;const r=n(52387),o=n(17398),a=n(41311);t.packetToBytes=function(e){const t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);const n=new Uint8Array((0,r.stringToBytes)(t).byteLength+2);let i=0;const s=t.split(".");for(let c=0;c255&&(e=(0,r.stringToBytes)((0,o.encodeLabelhash)((0,a.labelhash)(s[c])))),n[i]=e.length,n.set(e,i+1),i+=e.length+1}return n.byteLength!==i+1?n.slice(0,i+1):n}},10133:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCallError=void 0;const r=n(9996),o=n(53951);t.getCallError=function(e,{docsPath:t,...n}){let a=e;return(0,o.containsNodeError)(e)&&(a=(0,o.getNodeError)(e,n)),new r.CallExecutionError(a,{docsPath:t,...n})}},90042:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContractError=void 0;const r=n(4403),o=n(26456),a=n(9996);t.getContractError=function(e,{abi:t,address:n,args:i,docsPath:s,functionName:c,sender:u}){const{code:l,data:d,message:f,shortMessage:h}=e instanceof a.RawContractError?e:e instanceof o.BaseError?e.walk((e=>"data"in e))||e.walk():{};let p=e;return e instanceof r.AbiDecodingZeroDataError?p=new a.ContractFunctionZeroDataError({functionName:c}):3===l&&(d||f||h)&&(p=new a.ContractFunctionRevertedError({abi:t,data:"object"===typeof d?d.data:d,functionName:c,message:h??f})),new a.ContractFunctionExecutionError(p,{abi:t,args:i,contractAddress:n,docsPath:s,functionName:c,sender:u})}},54141:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEstimateGasError=void 0;const r=n(78966),o=n(53951);t.getEstimateGasError=function(e,{docsPath:t,...n}){let a=e;return(0,o.containsNodeError)(e)&&(a=(0,o.getNodeError)(e,n)),new r.EstimateGasExecutionError(a,{docsPath:t,...n})}},53951:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeError=t.containsNodeError=void 0;const r=n(72695),o=n(72782),a=n(60793);t.containsNodeError=function(e){return e instanceof a.TransactionRejectedRpcError||e instanceof a.InvalidInputRpcError||e instanceof o.RpcRequestError&&e.code===r.ExecutionRevertedError.code},t.getNodeError=function(e,t){const n=e.details.toLowerCase();return r.FeeCapTooHighError.nodeMessage.test(n)?new r.FeeCapTooHighError({cause:e,maxFeePerGas:t?.maxFeePerGas}):r.FeeCapTooLowError.nodeMessage.test(n)?new r.FeeCapTooLowError({cause:e,maxFeePerGas:t?.maxFeePerGas}):r.NonceTooHighError.nodeMessage.test(n)?new r.NonceTooHighError({cause:e,nonce:t?.nonce}):r.NonceTooLowError.nodeMessage.test(n)?new r.NonceTooLowError({cause:e,nonce:t?.nonce}):r.NonceMaxValueError.nodeMessage.test(n)?new r.NonceMaxValueError({cause:e,nonce:t?.nonce}):r.InsufficientFundsError.nodeMessage.test(n)?new r.InsufficientFundsError({cause:e}):r.IntrinsicGasTooHighError.nodeMessage.test(n)?new r.IntrinsicGasTooHighError({cause:e,gas:t?.gas}):r.IntrinsicGasTooLowError.nodeMessage.test(n)?new r.IntrinsicGasTooLowError({cause:e,gas:t?.gas}):r.TransactionTypeNotSupportedError.nodeMessage.test(n)?new r.TransactionTypeNotSupportedError({cause:e}):r.TipAboveFeeCapError.nodeMessage.test(n)?new r.TipAboveFeeCapError({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):n.match(r.ExecutionRevertedError.nodeMessage)||"code"in e.cause&&e.cause?.code===r.ExecutionRevertedError.code?new r.ExecutionRevertedError({cause:e,message:e.cause.details||e.details}):new r.UnknownNodeError({cause:e.cause.cause})}},72533:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionError=void 0;const r=n(70270),o=n(53951);t.getTransactionError=function(e,{docsPath:t,...n}){let a=e;return(0,o.containsNodeError)(e)&&(a=(0,o.getNodeError)(e,n)),new r.TransactionExecutionError(a,{docsPath:t,...n})}},44929:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFilterRequestScope=void 0,t.createFilterRequestScope=function(e,{method:t}){const n={};return"fallback"===e.transport.type&&e.transport.onResponse?.((({method:e,response:r,status:o,transport:a})=>{"success"===o&&t===e&&(n[r]=a.request)})),t=>n[t]||e.request}},23604:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineBlock=t.formatBlock=void 0;const r=n(74373),o=n(1982);function a(e){const t=e.transactions?.map((e=>"string"===typeof e?e:(0,o.formatTransaction)(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}t.formatBlock=a,t.defineBlock=(0,r.defineFormatter)("block",a)},82320:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extract=void 0,t.extract=function(e,{format:t}){return t?Object.keys(t({})).reduce(((t,n)=>(e?.hasOwnProperty(n)&&(t[n]=e[n]),t)),{}):{}}},92736:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatFeeHistory=void 0,t.formatFeeHistory=function(e){return{baseFeePerGas:e.baseFeePerGas.map((e=>BigInt(e))),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map((e=>e.map((e=>BigInt(e)))))}}},74373:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineFormatter=void 0,t.defineFormatter=function(e,t){return({exclude:n,format:r})=>({exclude:n,format:e=>{const o=t(e);if(n)for(const t of n)delete o[t];return{...o,...r(e)}},type:e})}},80330:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLog=void 0,t.formatLog=function(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}},1982:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransaction=t.formatTransaction=t.transactionType=void 0;const r=n(57114),o=n(74373);function a(e){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.hexToNumber)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,r.hexToNumber)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?t.transactionType[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return"legacy"===n.type&&(delete n.accessList,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),"eip2930"===n.type&&(delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n}t.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"},t.formatTransaction=a,t.defineTransaction=(0,o.defineFormatter)("transaction",a)},5840:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransactionReceipt=t.formatTransactionReceipt=void 0;const r=n(57114),o=n(74373),a=n(80330),i=n(1982),s={"0x0":"reverted","0x1":"success"};function c(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>(0,a.formatLog)(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.hexToNumber)(e.transactionIndex):null,status:e.status?s[e.status]:null,type:e.type?i.transactionType[e.type]||e.type:null}}t.formatTransactionReceipt=c,t.defineTransactionReceipt=(0,o.defineFormatter)("transactionReceipt",c)},33270:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransactionRequest=t.formatTransactionRequest=void 0;const r=n(86308),o=n(74373);function a(e){return{...e,gas:"undefined"!==typeof e.gas?(0,r.numberToHex)(e.gas):void 0,gasPrice:"undefined"!==typeof e.gasPrice?(0,r.numberToHex)(e.gasPrice):void 0,maxFeePerGas:"undefined"!==typeof e.maxFeePerGas?(0,r.numberToHex)(e.maxFeePerGas):void 0,maxPriorityFeePerGas:"undefined"!==typeof e.maxPriorityFeePerGas?(0,r.numberToHex)(e.maxPriorityFeePerGas):void 0,nonce:"undefined"!==typeof e.nonce?(0,r.numberToHex)(e.nonce):void 0,value:"undefined"!==typeof e.value?(0,r.numberToHex)(e.value):void 0}}t.formatTransactionRequest=a,t.defineTransactionRequest=(0,o.defineFormatter)("transactionRequest",a)},79148:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventSelector=void 0;const r=n(81887);t.getEventSelector=e=>"string"===typeof e?(0,r.hashFunction)(e):(0,r.hashAbiItem)(e)},18546:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionSelector=void 0;const r=n(53462),o=n(81887);t.getFunctionSelector=e=>"string"===typeof e?(0,r.slice)((0,o.hashFunction)(e),0,4):(0,r.slice)((0,o.hashAbiItem)(e),0,4)},81887:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashAbiItem=t.hashFunction=void 0;const r=n(16759),o=n(35914),a=n(52387),i=n(75225),s=e=>(0,i.keccak256)((0,a.toBytes)(e));t.hashFunction=function(e){const t=(0,o.extractFunctionName)(e),n=(0,o.extractFunctionParams)(e)||[];return s(`${t}(${n.map((({type:e})=>e)).join(",")})`)},t.hashAbiItem=function(e){return s((0,r.formatAbiItem)(e))}},95056:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHash=void 0;const r=n(77116),o=n(66859);t.isHash=function(e){return(0,r.isHex)(e)&&32===(0,o.size)(e)}},75225:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=void 0;const r=n(7217),o=n(77116),a=n(52387),i=n(86308);t.keccak256=function(e,t){const n=t||"hex",s=(0,r.keccak_256)((0,o.isHex)(e,{strict:!1})?(0,a.toBytes)(e):e);return"bytes"===n?s:(0,i.toHex)(s)}},50634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatHex=t.concatBytes=t.concat=t.extractFunctionParts=t.extractFunctionType=t.extractFunctionParams=t.extractFunctionName=t.isAddressEqual=t.isAddress=t.getAddress=t.getCreate2Address=t.getCreateAddress=t.getContractAddress=t.publicKeyToAddress=t.parseAccount=t.formatAbiParams=t.formatAbiItem=t.formatAbiItemWithArgs=t.encodePacked=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.getAbiItem=t.encodeFunctionResult=t.encodeFunctionData=t.encodeEventTopics=t.encodeErrorResult=t.encodeDeployData=t.encodeAbiParameters=t.decodeFunctionResult=t.decodeFunctionData=t.decodeEventLog=t.decodeErrorResult=t.decodeAbiParameters=t.validateTypedData=t.stringify=t.rpc=t.getSocket=t.integerRegex=t.bytesRegex=t.arrayRegex=t.getChainContractAddress=t.defineChain=t.assertCurrentChain=t.offchainLookupSignature=t.offchainLookupAbiItem=t.offchainLookup=t.ccipFetch=t.buildRequest=void 0,t.getEventSelector=t.defineFormatter=t.getTransactionError=t.getEstimateGasError=t.getContractError=t.getCallError=t.getNodeError=t.containsNodeError=t.fromRlp=t.hexToString=t.hexToNumber=t.hexToBigInt=t.hexToBool=t.fromHex=t.fromBytes=t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigint=t.stringToHex=t.numberToHex=t.toHex=t.bytesToHex=t.boolToHex=t.stringToBytes=t.numberToBytes=t.hexToBytes=t.toBytes=t.boolToBytes=t.toRlp=t.extract=t.formatTransactionRequest=t.defineTransactionRequest=t.defineTransactionReceipt=t.formatLog=t.transactionType=t.formatTransaction=t.defineTransaction=t.formatBlock=t.defineBlock=t.trim=t.sliceHex=t.sliceBytes=t.slice=t.size=t.padHex=t.padBytes=t.pad=t.isHex=t.isBytes=void 0,t.parseGwei=t.parseEther=t.parseUnits=t.formatUnits=t.formatGwei=t.formatEther=t.serializeAccessList=t.serializeTransaction=t.prepareRequest=t.parseTransaction=t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=t.assertRequest=t.getTransactionType=t.getSerializedTransactionType=t.hashMessage=t.verifyTypedData=t.verifyMessage=t.recoverTypedDataAddress=t.recoverPublicKey=t.recoverMessageAddress=t.recoverAddress=t.hashTypedData=t.keccak256=t.isHash=t.getFunctionSelector=void 0;var r=n(25056);Object.defineProperty(t,"buildRequest",{enumerable:!0,get:function(){return r.buildRequest}});var o=n(64045);Object.defineProperty(t,"ccipFetch",{enumerable:!0,get:function(){return o.ccipFetch}}),Object.defineProperty(t,"offchainLookup",{enumerable:!0,get:function(){return o.offchainLookup}}),Object.defineProperty(t,"offchainLookupAbiItem",{enumerable:!0,get:function(){return o.offchainLookupAbiItem}}),Object.defineProperty(t,"offchainLookupSignature",{enumerable:!0,get:function(){return o.offchainLookupSignature}});var a=n(47797);Object.defineProperty(t,"assertCurrentChain",{enumerable:!0,get:function(){return a.assertCurrentChain}}),Object.defineProperty(t,"defineChain",{enumerable:!0,get:function(){return a.defineChain}}),Object.defineProperty(t,"getChainContractAddress",{enumerable:!0,get:function(){return a.getChainContractAddress}});var i=n(27678);Object.defineProperty(t,"arrayRegex",{enumerable:!0,get:function(){return i.arrayRegex}}),Object.defineProperty(t,"bytesRegex",{enumerable:!0,get:function(){return i.bytesRegex}}),Object.defineProperty(t,"integerRegex",{enumerable:!0,get:function(){return i.integerRegex}});var s=n(82530);Object.defineProperty(t,"getSocket",{enumerable:!0,get:function(){return s.getSocket}}),Object.defineProperty(t,"rpc",{enumerable:!0,get:function(){return s.rpc}});var c=n(58);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}});var u=n(42586);Object.defineProperty(t,"validateTypedData",{enumerable:!0,get:function(){return u.validateTypedData}});var l=n(14722);Object.defineProperty(t,"decodeAbiParameters",{enumerable:!0,get:function(){return l.decodeAbiParameters}});var d=n(31293);Object.defineProperty(t,"decodeErrorResult",{enumerable:!0,get:function(){return d.decodeErrorResult}});var f=n(81912);Object.defineProperty(t,"decodeEventLog",{enumerable:!0,get:function(){return f.decodeEventLog}});var h=n(14338);Object.defineProperty(t,"decodeFunctionData",{enumerable:!0,get:function(){return h.decodeFunctionData}});var p=n(76286);Object.defineProperty(t,"decodeFunctionResult",{enumerable:!0,get:function(){return p.decodeFunctionResult}});var m=n(24837);Object.defineProperty(t,"encodeAbiParameters",{enumerable:!0,get:function(){return m.encodeAbiParameters}});var b=n(77833);Object.defineProperty(t,"encodeDeployData",{enumerable:!0,get:function(){return b.encodeDeployData}});var g=n(59094);Object.defineProperty(t,"encodeErrorResult",{enumerable:!0,get:function(){return g.encodeErrorResult}});var y=n(7534);Object.defineProperty(t,"encodeEventTopics",{enumerable:!0,get:function(){return y.encodeEventTopics}});var v=n(22836);Object.defineProperty(t,"encodeFunctionData",{enumerable:!0,get:function(){return v.encodeFunctionData}});var w=n(72097);Object.defineProperty(t,"encodeFunctionResult",{enumerable:!0,get:function(){return w.encodeFunctionResult}});var E=n(95481);Object.defineProperty(t,"getAbiItem",{enumerable:!0,get:function(){return E.getAbiItem}});var A=n(48661);Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return A.parseAbi}}),Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return A.parseAbiItem}}),Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return A.parseAbiParameter}}),Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return A.parseAbiParameters}});var x=n(33362);Object.defineProperty(t,"encodePacked",{enumerable:!0,get:function(){return x.encodePacked}});var P=n(87541);Object.defineProperty(t,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return P.formatAbiItemWithArgs}});var C=n(16759);Object.defineProperty(t,"formatAbiItem",{enumerable:!0,get:function(){return C.formatAbiItem}}),Object.defineProperty(t,"formatAbiParams",{enumerable:!0,get:function(){return C.formatAbiParams}});var j=n(3975);Object.defineProperty(t,"parseAccount",{enumerable:!0,get:function(){return j.parseAccount}});var I=n(3417);Object.defineProperty(t,"publicKeyToAddress",{enumerable:!0,get:function(){return I.publicKeyToAddress}});var O=n(82668);Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return O.getContractAddress}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return O.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return O.getCreate2Address}});var T=n(36556);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return T.getAddress}});var S=n(21041);Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return S.isAddress}});var B=n(13711);Object.defineProperty(t,"isAddressEqual",{enumerable:!0,get:function(){return B.isAddressEqual}});var k=n(35914);Object.defineProperty(t,"extractFunctionName",{enumerable:!0,get:function(){return k.extractFunctionName}}),Object.defineProperty(t,"extractFunctionParams",{enumerable:!0,get:function(){return k.extractFunctionParams}}),Object.defineProperty(t,"extractFunctionType",{enumerable:!0,get:function(){return k.extractFunctionType}}),Object.defineProperty(t,"extractFunctionParts",{enumerable:!0,get:function(){return k.extractFunctionParts}});var _=n(1501);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return _.concat}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return _.concatBytes}}),Object.defineProperty(t,"concatHex",{enumerable:!0,get:function(){return _.concatHex}});var N=n(43848);Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return N.isBytes}});var M=n(77116);Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return M.isHex}});var R=n(54405);Object.defineProperty(t,"pad",{enumerable:!0,get:function(){return R.pad}}),Object.defineProperty(t,"padBytes",{enumerable:!0,get:function(){return R.padBytes}}),Object.defineProperty(t,"padHex",{enumerable:!0,get:function(){return R.padHex}});var F=n(66859);Object.defineProperty(t,"size",{enumerable:!0,get:function(){return F.size}});var U=n(53462);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return U.slice}}),Object.defineProperty(t,"sliceBytes",{enumerable:!0,get:function(){return U.sliceBytes}}),Object.defineProperty(t,"sliceHex",{enumerable:!0,get:function(){return U.sliceHex}});var L=n(80475);Object.defineProperty(t,"trim",{enumerable:!0,get:function(){return L.trim}});var D=n(23604);Object.defineProperty(t,"defineBlock",{enumerable:!0,get:function(){return D.defineBlock}}),Object.defineProperty(t,"formatBlock",{enumerable:!0,get:function(){return D.formatBlock}});var q=n(1982);Object.defineProperty(t,"defineTransaction",{enumerable:!0,get:function(){return q.defineTransaction}}),Object.defineProperty(t,"formatTransaction",{enumerable:!0,get:function(){return q.formatTransaction}}),Object.defineProperty(t,"transactionType",{enumerable:!0,get:function(){return q.transactionType}});var H=n(80330);Object.defineProperty(t,"formatLog",{enumerable:!0,get:function(){return H.formatLog}});var z=n(5840);Object.defineProperty(t,"defineTransactionReceipt",{enumerable:!0,get:function(){return z.defineTransactionReceipt}});var G=n(33270);Object.defineProperty(t,"defineTransactionRequest",{enumerable:!0,get:function(){return G.defineTransactionRequest}}),Object.defineProperty(t,"formatTransactionRequest",{enumerable:!0,get:function(){return G.formatTransactionRequest}});var $=n(82320);Object.defineProperty(t,"extract",{enumerable:!0,get:function(){return $.extract}});var W=n(28913);Object.defineProperty(t,"toRlp",{enumerable:!0,get:function(){return W.toRlp}});var K=n(52387);Object.defineProperty(t,"boolToBytes",{enumerable:!0,get:function(){return K.boolToBytes}}),Object.defineProperty(t,"toBytes",{enumerable:!0,get:function(){return K.toBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return K.hexToBytes}}),Object.defineProperty(t,"numberToBytes",{enumerable:!0,get:function(){return K.numberToBytes}}),Object.defineProperty(t,"stringToBytes",{enumerable:!0,get:function(){return K.stringToBytes}});var Q=n(86308);Object.defineProperty(t,"boolToHex",{enumerable:!0,get:function(){return Q.boolToHex}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return Q.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return Q.toHex}}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return Q.numberToHex}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return Q.stringToHex}});var V=n(54328);Object.defineProperty(t,"bytesToBigint",{enumerable:!0,get:function(){return V.bytesToBigint}}),Object.defineProperty(t,"bytesToBool",{enumerable:!0,get:function(){return V.bytesToBool}}),Object.defineProperty(t,"bytesToNumber",{enumerable:!0,get:function(){return V.bytesToNumber}}),Object.defineProperty(t,"bytesToString",{enumerable:!0,get:function(){return V.bytesToString}}),Object.defineProperty(t,"fromBytes",{enumerable:!0,get:function(){return V.fromBytes}});var J=n(57114);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return J.fromHex}}),Object.defineProperty(t,"hexToBool",{enumerable:!0,get:function(){return J.hexToBool}}),Object.defineProperty(t,"hexToBigInt",{enumerable:!0,get:function(){return J.hexToBigInt}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return J.hexToNumber}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return J.hexToString}});var Y=n(92237);Object.defineProperty(t,"fromRlp",{enumerable:!0,get:function(){return Y.fromRlp}});var Z=n(53951);Object.defineProperty(t,"containsNodeError",{enumerable:!0,get:function(){return Z.containsNodeError}}),Object.defineProperty(t,"getNodeError",{enumerable:!0,get:function(){return Z.getNodeError}});var X=n(10133);Object.defineProperty(t,"getCallError",{enumerable:!0,get:function(){return X.getCallError}});var ee=n(90042);Object.defineProperty(t,"getContractError",{enumerable:!0,get:function(){return ee.getContractError}});var te=n(54141);Object.defineProperty(t,"getEstimateGasError",{enumerable:!0,get:function(){return te.getEstimateGasError}});var ne=n(72533);Object.defineProperty(t,"getTransactionError",{enumerable:!0,get:function(){return ne.getTransactionError}});var re=n(74373);Object.defineProperty(t,"defineFormatter",{enumerable:!0,get:function(){return re.defineFormatter}});var oe=n(79148);Object.defineProperty(t,"getEventSelector",{enumerable:!0,get:function(){return oe.getEventSelector}});var ae=n(18546);Object.defineProperty(t,"getFunctionSelector",{enumerable:!0,get:function(){return ae.getFunctionSelector}});var ie=n(95056);Object.defineProperty(t,"isHash",{enumerable:!0,get:function(){return ie.isHash}});var se=n(75225);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return se.keccak256}});var ce=n(70834);Object.defineProperty(t,"hashTypedData",{enumerable:!0,get:function(){return ce.hashTypedData}});var ue=n(34159);Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return ue.recoverAddress}});var le=n(77753);Object.defineProperty(t,"recoverMessageAddress",{enumerable:!0,get:function(){return le.recoverMessageAddress}});var de=n(57275);Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return de.recoverPublicKey}});var fe=n(80206);Object.defineProperty(t,"recoverTypedDataAddress",{enumerable:!0,get:function(){return fe.recoverTypedDataAddress}});var he=n(19338);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return he.verifyMessage}});var pe=n(92774);Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return pe.verifyTypedData}});var me=n(67475);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return me.hashMessage}});var be=n(19768);Object.defineProperty(t,"getSerializedTransactionType",{enumerable:!0,get:function(){return be.getSerializedTransactionType}});var ge=n(76547);Object.defineProperty(t,"getTransactionType",{enumerable:!0,get:function(){return ge.getTransactionType}});var ye=n(5434);Object.defineProperty(t,"assertRequest",{enumerable:!0,get:function(){return ye.assertRequest}});var ve=n(26825);Object.defineProperty(t,"assertTransactionEIP1559",{enumerable:!0,get:function(){return ve.assertTransactionEIP1559}}),Object.defineProperty(t,"assertTransactionEIP2930",{enumerable:!0,get:function(){return ve.assertTransactionEIP2930}}),Object.defineProperty(t,"assertTransactionLegacy",{enumerable:!0,get:function(){return ve.assertTransactionLegacy}});var we=n(53858);Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return we.parseTransaction}});var Ee=n(40623);Object.defineProperty(t,"prepareRequest",{enumerable:!0,get:function(){return Ee.prepareRequest}});var Ae=n(52932);Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return Ae.serializeTransaction}});var xe=n(99435);Object.defineProperty(t,"serializeAccessList",{enumerable:!0,get:function(){return xe.serializeAccessList}});var Pe=n(90686);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return Pe.formatEther}});var Ce=n(22386);Object.defineProperty(t,"formatGwei",{enumerable:!0,get:function(){return Ce.formatGwei}});var je=n(88162);Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return je.formatUnits}});var Ie=n(73956);Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return Ie.parseUnits}});var Oe=n(39118);Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return Oe.parseEther}});var Te=n(31187);Object.defineProperty(t,"parseGwei",{enumerable:!0,get:function(){return Te.parseGwei}})},36999:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observe=t.cleanupCache=t.listenersCache=void 0,t.listenersCache=new Map,t.cleanupCache=new Map;let n=0;t.observe=function(e,r,o){const a=++n,i=()=>t.listenersCache.get(e)||[],s=()=>{const n=t.cleanupCache.get(e);1===i().length&&n&&n(),(()=>{const n=i();t.listenersCache.set(e,n.filter((e=>e.id!==a)))})()},c=i();if(t.listenersCache.set(e,[...c,{id:a,fns:r}]),c&&c.length>0)return s;const u={};for(const t in r)u[t]=(...e)=>{const n=i();0!==n.length&&n.forEach((n=>n.fns[t]?.(...e)))};const l=o(u);return"function"===typeof l&&t.cleanupCache.set(e,l),s}},7760:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.poll=void 0;const r=n(78967);t.poll=function(e,{emitOnBegin:t,initialWaitTime:n,interval:o}){let a=!0;const i=()=>a=!1;return(async()=>{let s;t&&(s=await e({unpoll:i}));const c=await(n?.(s))??o;await(0,r.wait)(c);const u=async()=>{a&&(await e({unpoll:i}),await(0,r.wait)(o),u())};u()})(),i}},48170:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBatchScheduler=void 0;const n=new Map;t.createBatchScheduler=function({fn:e,id:t,shouldSplitBatch:r,wait:o=0}){const a=async()=>{const t=s();i();const n=t.map((({args:e})=>e));0!==n.length&&e(n).then((e=>{t.forEach((({pendingPromise:t},n)=>t.resolve?.([e[n],e])))})).catch((e=>{t.forEach((({pendingPromise:t})=>t.reject?.(e)))}))},i=()=>n.delete(t),s=()=>n.get(t)||[],c=e=>n.set(t,[...s(),e]);return{flush:i,async schedule(e){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n})),i=r?.([...s().map((({args:e})=>e)),e]);i&&a();return s().length>0?(c({args:e,pendingPromise:t}),n):(c({args:e,pendingPromise:t}),setTimeout(a,o),n)}}}},38447:function(e,t){"use strict";function n(e){const n=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:n=>t.set(e,n)}),r=n(e,t.promiseCache),o=n(e,t.responseCache);return{clear:()=>{r.clear(),o.clear()},promise:r,response:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.withCache=t.getCache=t.responseCache=t.promiseCache=void 0,t.promiseCache=new Map,t.responseCache=new Map,t.getCache=n,t.withCache=async function(e,{cacheKey:t,cacheTime:r=1/0}){const o=n(t),a=o.response.get();if(a&&r>0){if((new Date).getTime()-a.created.getTime()!0)}={}){return new Promise(((a,i)=>{const s=async({count:c=0}={})=>{try{const t=await e();a(t)}catch(u){if(c{const n="function"===typeof t?t({count:c,error:e}):t;n&&await(0,r.wait)(n),s({count:c+1})})({error:u});i(u)}};s()}))}},64290:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withTimeout=void 0,t.withTimeout=function(e,{errorInstance:t,timeout:n,signal:r}){return new Promise(((o,a)=>{(async()=>{let i;try{const s=new AbortController;n>0&&(i=setTimeout((()=>{r?s.abort():a(t)}),n)),o(await e({signal:s?.signal}))}catch(s){"AbortError"===s.name&&a(t),a(s)}finally{clearTimeout(i)}})()}))}},27678:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.integerRegex=t.bytesRegex=t.arrayRegex=void 0,t.arrayRegex=/^(.*)\[([0-9]*)\]$/,t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/},82530:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rpc=t.getSocket=void 0;const r=n(72782),o=n(48170),a=n(64290),i=n(58);let s=0;const c=new Map;t.getSocket=async function(e){const t=new URL(e),r=t.toString();let a=c.get(r);if(a)return a;const{schedule:i}=(0,o.createBatchScheduler)({id:r,fn:async()=>{let e=await n.e(5289).then(n.bind(n,55289));e=e.default?.constructor?e.default:e.WebSocket;const o=new e(t),i=new Map,s=new Map,u=({data:e})=>{const t=JSON.parse(e),n="eth_subscription"===t.method,r=n?t.params.subscription:t.id,o=n?s:i,a=o.get(r);a&&a({data:e}),n||o.delete(r)},l=()=>{c.delete(r),o.removeEventListener("close",l),o.removeEventListener("message",u)};return o.addEventListener("close",l),o.addEventListener("message",u),o.readyState===e.CONNECTING&&await new Promise(((e,t)=>{o&&(o.onopen=e,o.onerror=t)})),a=Object.assign(o,{requests:i,subscriptions:s}),c.set(r,a),[a]}}),[s,[u]]=await i();return u},t.rpc={http:async function(e,{body:t,fetchOptions:n={},timeout:o=1e4}){const{headers:c,method:u,signal:l}=n;try{const d=await(0,a.withTimeout)((async({signal:r})=>await fetch(e,{...n,body:Array.isArray(t)?(0,i.stringify)(t.map((e=>({jsonrpc:"2.0",id:s++,...e})))):(0,i.stringify)({jsonrpc:"2.0",id:s++,...t}),headers:{...c,"Content-Type":"application/json"},method:u||"POST",signal:l||(o>0?r:void 0)})),{errorInstance:new r.TimeoutError({body:t,url:e}),timeout:o,signal:!0});let f;if(f=d.headers.get("Content-Type")?.startsWith("application/json")?await d.json():await d.text(),!d.ok)throw new r.HttpRequestError({body:t,details:(0,i.stringify)(f.error)||d.statusText,headers:d.headers,status:d.status,url:e});return f}catch(d){if(d instanceof r.HttpRequestError)throw d;if(d instanceof r.TimeoutError)throw d;throw new r.HttpRequestError({body:t,details:d.message,url:e})}},webSocket:function(e,{body:t,onResponse:n}){if(e.readyState===e.CLOSED||e.readyState===e.CLOSING)throw new r.WebSocketRequestError({body:t,url:e.url,details:"Socket is closed."});const o=s++,a=({data:r})=>{const i=JSON.parse(r);"number"===typeof i.id&&o!==i.id||(n?.(i),"eth_subscribe"===t.method&&"string"===typeof i.result&&e.subscriptions.set(i.result,a),"eth_unsubscribe"===t.method&&e.subscriptions.delete(t.params?.[0]))};return e.requests.set(o,a),e.send(JSON.stringify({jsonrpc:"2.0",...t,id:o})),e},webSocketAsync:async function(e,{body:n,timeout:o=1e4}){return(0,a.withTimeout)((()=>new Promise((r=>t.rpc.webSocket(e,{body:n,onResponse:r})))),{errorInstance:new r.TimeoutError({body:n,url:e.url}),timeout:o})}}},67475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashMessage=void 0;const r=n(1501),o=n(52387),a=n(75225);t.hashMessage=function(e,t){const n="string"===typeof e?(0,o.stringToBytes)(e):e.raw instanceof Uint8Array?e.raw:(0,o.toBytes)(e.raw),i=(0,o.stringToBytes)(`\x19Ethereum Signed Message:\n${n.length}`);return(0,a.keccak256)((0,r.concat)([i,n]),t)}},70834:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashTypedData=void 0;const r=n(24837),o=n(1501),a=n(86308),i=n(75225),s=n(42586);function c({data:e,primaryType:t,types:n}){const r=u({data:e,primaryType:t,types:n});return(0,i.keccak256)(r)}function u({data:e,primaryType:t,types:n}){const o=[{type:"bytes32"}],a=[l({primaryType:t,types:n})];for(const r of n[t]){const[t,i]=f({types:n,name:r.name,type:r.type,value:e[r.name]});o.push(t),a.push(i)}return(0,r.encodeAbiParameters)(o,a)}function l({primaryType:e,types:t}){const n=(0,a.toHex)(function({primaryType:e,types:t}){let n="";const r=d({primaryType:e,types:t});r.delete(e);const o=[e,...Array.from(r).sort()];for(const a of o)n+=`${a}(${t[a].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`;return n}({primaryType:e,types:t}));return(0,i.keccak256)(n)}function d({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u)?.[0];if(n.has(r)||void 0===t[r])return n;n.add(r);for(const o of t[r])d({primaryType:o.type,types:t},n);return n}function f({types:e,name:t,type:n,value:o}){if(void 0!==e[n])return[{type:"bytes32"},(0,i.keccak256)(u({data:o,primaryType:n,types:e}))];if("bytes"===n){return o=`0x${(o.length%2?"0":"")+o.slice(2)}`,[{type:"bytes32"},(0,i.keccak256)(o)]}if("string"===n)return[{type:"bytes32"},(0,i.keccak256)((0,a.toHex)(o))];if(n.lastIndexOf("]")===n.length-1){const a=n.slice(0,n.lastIndexOf("[")),s=o.map((n=>f({name:t,type:a,types:e,value:n})));return[{type:"bytes32"},(0,i.keccak256)((0,r.encodeAbiParameters)(s.map((([e])=>e)),s.map((([,e])=>e))))]}return[{type:n},o]}t.hashTypedData=function({domain:e,message:t,primaryType:n,types:r}){const a="undefined"===typeof e?{}:e,u={EIP712Domain:["string"===typeof a?.name&&{name:"name",type:"string"},a?.version&&{name:"version",type:"string"},"number"===typeof a?.chainId&&{name:"chainId",type:"uint256"},a?.verifyingContract&&{name:"verifyingContract",type:"address"},a?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...r};(0,s.validateTypedData)({domain:a,message:t,primaryType:n,types:u});const l=["0x1901"];return a&&l.push(function({domain:e,types:t}){return c({data:e,primaryType:"EIP712Domain",types:t})}({domain:a,types:u})),"EIP712Domain"!==n&&l.push(c({data:t,primaryType:n,types:u})),(0,i.keccak256)((0,o.concat)(l))}},91281:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToSignature=void 0;const r=n(20050),o=n(86308);t.hexToSignature=function(e){const{r:t,s:n}=r.secp256k1.Signature.fromCompact(e.slice(2,130)),a=BigInt(`0x${e.slice(130)}`);return{r:(0,o.numberToHex)(t),s:(0,o.numberToHex)(n),v:a}}},34159:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAddress=void 0;const r=n(3417),o=n(57275);t.recoverAddress=async function({hash:e,signature:t}){return(0,r.publicKeyToAddress)(await(0,o.recoverPublicKey)({hash:e,signature:t}))}},77753:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverMessageAddress=void 0;const r=n(67475),o=n(34159);t.recoverMessageAddress=async function({message:e,signature:t}){return(0,o.recoverAddress)({hash:(0,r.hashMessage)(e),signature:t})}},57275:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverPublicKey=void 0;const r=n(77116),o=n(57114),a=n(86308);t.recoverPublicKey=async function({hash:e,signature:t}){const i=(0,r.isHex)(t)?t:(0,a.toHex)(t),s=(0,r.isHex)(e)?e:(0,a.toHex)(e);let c=(0,o.hexToNumber)(`0x${i.slice(130)}`);0!==c&&1!==c||(c+=27);const{secp256k1:u}=await n.e(8824).then(n.bind(n,78824));return`0x${u.Signature.fromCompact(i.substring(2,130)).addRecoveryBit(c-27).recoverPublicKey(s.substring(2)).toHex(!1)}`}},80206:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedDataAddress=void 0;const r=n(70834),o=n(34159);t.recoverTypedDataAddress=async function({domain:e,message:t,primaryType:n,signature:a,types:i}){return(0,o.recoverAddress)({hash:(0,r.hashTypedData)({domain:e,message:t,primaryType:n,types:i}),signature:a})}},24366:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signatureToHex=void 0;const r=n(20050),o=n(57114),a=n(86308);t.signatureToHex=function({r:e,s:t,v:n}){return`0x${new r.secp256k1.Signature((0,o.hexToBigInt)(e),(0,o.hexToBigInt)(t)).toCompactHex()}${(0,a.toHex)(n).slice(2)}`}},19338:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=void 0;const r=n(36556),o=n(13711),a=n(77753);t.verifyMessage=async function({address:e,message:t,signature:n}){return(0,o.isAddressEqual)((0,r.getAddress)(e),await(0,a.recoverMessageAddress)({message:t,signature:n}))}},92774:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=void 0;const r=n(36556),o=n(13711),a=n(80206);t.verifyTypedData=async function({address:e,domain:t,message:n,primaryType:i,signature:s,types:c}){return(0,o.isAddressEqual)((0,r.getAddress)(e),await(0,a.recoverTypedDataAddress)({domain:t,message:n,primaryType:i,signature:s,types:c}))}},58:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0;t.stringify=(e,t,n)=>JSON.stringify(e,((e,n)=>{const r="bigint"===typeof n?n.toString():n;return"function"===typeof t?t(e,r):r}),n)},5434:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertRequest=void 0;const r=n(3975),o=n(56293),a=n(72695),i=n(70270),s=n(21041);t.assertRequest=function(e){const{account:t,gasPrice:n,maxFeePerGas:c,maxPriorityFeePerGas:u,to:l}=e,d=t?(0,r.parseAccount)(t):void 0;if(d&&!(0,s.isAddress)(d.address))throw new o.InvalidAddressError({address:d.address});if(l&&!(0,s.isAddress)(l))throw new o.InvalidAddressError({address:l});if("undefined"!==typeof n&&("undefined"!==typeof c||"undefined"!==typeof u))throw new i.FeeConflictError;if(c&&c>2n**256n-1n)throw new a.FeeCapTooHighError({maxFeePerGas:c});if(u&&c&&u>c)throw new a.TipAboveFeeCapError({maxFeePerGas:c,maxPriorityFeePerGas:u})}},26825:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=void 0;const r=n(56293),o=n(26456),a=n(91363),i=n(72695),s=n(21041);t.assertTransactionEIP1559=function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:c,maxFeePerGas:u,to:l}=e;if(t<=0)throw new a.InvalidChainIdError({chainId:t});if(l&&!(0,s.isAddress)(l))throw new r.InvalidAddressError({address:l});if(c)throw new o.BaseError("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(u&&u>2n**256n-1n)throw new i.FeeCapTooHighError({maxFeePerGas:u});if(n&&u&&n>u)throw new i.TipAboveFeeCapError({maxFeePerGas:u,maxPriorityFeePerGas:n})},t.assertTransactionEIP2930=function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:c,maxFeePerGas:u,to:l}=e;if(t<=0)throw new a.InvalidChainIdError({chainId:t});if(l&&!(0,s.isAddress)(l))throw new r.InvalidAddressError({address:l});if(n||u)throw new o.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(c&&c>2n**256n-1n)throw new i.FeeCapTooHighError({maxFeePerGas:c})},t.assertTransactionLegacy=function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:c,maxFeePerGas:u,to:l,accessList:d}=e;if(l&&!(0,s.isAddress)(l))throw new r.InvalidAddressError({address:l});if("undefined"!==typeof t&&t<=0)throw new a.InvalidChainIdError({chainId:t});if(n||u)throw new o.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(c&&c>2n**256n-1n)throw new i.FeeCapTooHighError({maxFeePerGas:c});if(d)throw new o.BaseError("`accessList` is not a valid Legacy Transaction attribute.")}},19768:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSerializedTransactionType=void 0;const r=n(70270),o=n(53462),a=n(57114);t.getSerializedTransactionType=function(e){const t=(0,o.sliceHex)(e,0,1);if("0x02"===t)return"eip1559";if("0x01"===t)return"eip2930";if("0x"!==t&&(0,a.hexToNumber)(t)>=192)return"legacy";throw new r.InvalidSerializedTransactionTypeError({serializedType:t})}},76547:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionType=void 0;const r=n(70270);t.getTransactionType=function(e){if(e.type)return e.type;if("undefined"!==typeof e.maxFeePerGas||"undefined"!==typeof e.maxPriorityFeePerGas)return"eip1559";if("undefined"!==typeof e.gasPrice)return"undefined"!==typeof e.accessList?"eip2930":"legacy";throw new r.InvalidSerializableTransactionError({transaction:e})}},53858:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTransaction=void 0;const r=n(56293),o=n(70270),a=n(21041),i=n(77116),s=n(54405),c=n(80475),u=n(57114),l=n(92237),d=n(95056),f=n(26825),h=n(19768);function p(e){const t=[];for(let n=0;n(0,d.isHash)(e)?e:(0,c.trim)(e)))})}return t}function m(e){const t=e.slice(-3),n="0x"===t[0]||0n===(0,u.hexToBigInt)(t[0])?27n:28n;return{r:(0,s.padHex)(t[1],{size:32}),s:(0,s.padHex)(t[2],{size:32}),v:n,yParity:27n===n?0:1}}t.parseTransaction=function(e){const t=(0,h.getSerializedTransactionType)(e);return"eip1559"===t?function(e){const t=(0,l.fromRlp)(`0x${e.slice(4)}`,"hex"),[n,r,a,s,c,d,h,b,g,y,v,w]=t;if(9!==t.length&&12!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{chainId:n,nonce:r,maxPriorityFeePerGas:a,maxFeePerGas:s,gas:c,to:d,value:h,data:b,accessList:g,...t.length>9?{v:y,r:v,s:w}:{}},serializedTransaction:e,type:"eip1559"});const E={chainId:(0,u.hexToNumber)(n),type:"eip1559"};(0,i.isHex)(d)&&"0x"!==d&&(E.to=d);(0,i.isHex)(c)&&"0x"!==c&&(E.gas=(0,u.hexToBigInt)(c));(0,i.isHex)(b)&&"0x"!==b&&(E.data=b);(0,i.isHex)(r)&&"0x"!==r&&(E.nonce=(0,u.hexToNumber)(r));(0,i.isHex)(h)&&"0x"!==h&&(E.value=(0,u.hexToBigInt)(h));(0,i.isHex)(s)&&"0x"!==s&&(E.maxFeePerGas=(0,u.hexToBigInt)(s));(0,i.isHex)(a)&&"0x"!==a&&(E.maxPriorityFeePerGas=(0,u.hexToBigInt)(a));0!==g.length&&"0x"!==g&&(E.accessList=p(g));(0,f.assertTransactionEIP1559)(E);return{...12===t.length?m(t):void 0,...E}}(e):"eip2930"===t?function(e){const t=(0,l.fromRlp)(`0x${e.slice(4)}`,"hex"),[n,r,a,s,c,d,h,b,g,y,v]=t;if(8!==t.length&&11!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{chainId:n,nonce:r,gasPrice:a,gas:s,to:c,value:d,data:h,accessList:b,...t.length>8?{v:g,r:y,s:v}:{}},serializedTransaction:e,type:"eip2930"});const w={chainId:(0,u.hexToNumber)(n),type:"eip2930"};(0,i.isHex)(c)&&"0x"!==c&&(w.to=c);(0,i.isHex)(s)&&"0x"!==s&&(w.gas=(0,u.hexToBigInt)(s));(0,i.isHex)(h)&&"0x"!==h&&(w.data=h);(0,i.isHex)(r)&&"0x"!==r&&(w.nonce=(0,u.hexToNumber)(r));(0,i.isHex)(d)&&"0x"!==d&&(w.value=(0,u.hexToBigInt)(d));(0,i.isHex)(a)&&"0x"!==a&&(w.gasPrice=(0,u.hexToBigInt)(a));0!==b.length&&"0x"!==b&&(w.accessList=p(b));(0,f.assertTransactionEIP2930)(w);return{...11===t.length?m(t):void 0,...w}}(e):function(e){const t=(0,l.fromRlp)(e,"hex"),[n,r,a,s,c,d,h,p,m]=t;if(6!==t.length&&9!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{nonce:n,gasPrice:r,gas:a,to:s,value:c,data:d,...t.length>6?{v:h,r:p,s:m}:{}},serializedTransaction:e,type:"legacy"});const b={type:"legacy"};(0,i.isHex)(s)&&"0x"!==s&&(b.to=s);(0,i.isHex)(a)&&"0x"!==a&&(b.gas=(0,u.hexToBigInt)(a));(0,i.isHex)(d)&&"0x"!==d&&(b.data=d);(0,i.isHex)(n)&&"0x"!==n&&(b.nonce=(0,u.hexToNumber)(n));(0,i.isHex)(c)&&"0x"!==c&&(b.value=(0,u.hexToBigInt)(c));(0,i.isHex)(r)&&"0x"!==r&&(b.gasPrice=(0,u.hexToBigInt)(r));if((0,f.assertTransactionLegacy)(b),6===t.length)return b;const g=(0,i.isHex)(h)&&"0x"!==h?(0,u.hexToBigInt)(h):0n;if("0x"===m&&"0x"===p)return g>0&&(b.chainId=Number(g)),b;const y=g,v=Number((y-35n)/2n);if(v>0)b.chainId=v;else if(27n!==y&&28n!==y)throw new o.InvalidLegacyVError({v:y});return b.v=y,b.s=m,b.r=p,b}(e)}},40623:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareRequest=void 0;const r=n(3975),o=n(23337),a=n(29086),i=n(89984),s=n(92530),c=n(26175),u=n(26456),l=n(5434);t.prepareRequest=async function(e,t){const{account:n,chain:d=e.chain,gas:f,gasPrice:h,maxFeePerGas:p,maxPriorityFeePerGas:m,nonce:b}=t;if(!n)throw new c.AccountNotFoundError;const g=(0,r.parseAccount)(n),y=await(0,a.getBlock)(e,{blockTag:"latest"}),v={...t,from:g.address};if("undefined"===typeof b&&(v.nonce=await(0,s.getTransactionCount)(e,{address:g.address,blockTag:"pending"})),"bigint"===typeof y.baseFeePerGas&&"undefined"===typeof h){let e=1500000000n;if("undefined"!==typeof d?.fees?.defaultPriorityFee&&(e="bigint"===typeof d.fees.defaultPriorityFee?d.fees.defaultPriorityFee:await d.fees.defaultPriorityFee({block:y,request:v})),"undefined"===typeof p)v.maxPriorityFeePerGas=m??e,v.maxFeePerGas=120n*y.baseFeePerGas/100n+v.maxPriorityFeePerGas;else{if("undefined"===typeof m&&p0)e=BigInt(2*n)+BigInt(35n+t.v-27n);else if(t.v!==e)throw new r.InvalidLegacyVError({v:t.v});h=[...h,(0,i.toHex)(e),t.r,t.s]}else n>0&&(h=[...h,(0,i.toHex)(n),"0x","0x"]);return(0,s.toRlp)(h)}(e,t)}},42586:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTypedData=void 0;const r=n(4403),o=n(56293),a=n(21041),i=n(66859),s=n(86308),c=n(27678);t.validateTypedData=function({domain:e,message:t,primaryType:n,types:u}){const l=u,d=(e,t)=>{for(const n of e){const{name:e,type:u}=n,f=u,h=t[e],p=f.match(c.integerRegex);if(p&&("number"===typeof h||"bigint"===typeof h)){const[e,t,n]=p;(0,s.numberToHex)(h,{signed:"int"===t,size:parseInt(n)/8})}if("address"===f&&"string"===typeof h&&!(0,a.isAddress)(h))throw new o.InvalidAddressError({address:h});const m=f.match(c.bytesRegex);if(m){const[e,t]=m;if(t&&(0,i.size)(h)!==parseInt(t))throw new r.BytesSizeMismatchError({expectedSize:parseInt(t),givenSize:(0,i.size)(h)})}const b=l[f];b&&d(b,h)}};if(l.EIP712Domain&&e&&d(l.EIP712Domain,e),"EIP712Domain"!==n){const e=l[n];d(e,t)}}},41217:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uid=void 0;let n,r=256;t.uid=function(e=11){if(!n||r+e>512){n="",r=0;for(let e=0;e<256;e++)n+=(256+256*Math.random()|0).toString(16).substring(1)}return n.substring(r,r+++e)}},90686:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatEther=void 0;const r=n(99225),o=n(88162);t.formatEther=function(e,t="wei"){return(0,o.formatUnits)(e,r.etherUnits[t])}},22386:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatGwei=void 0;const r=n(99225),o=n(88162);t.formatGwei=function(e,t="wei"){return(0,o.formatUnits)(e,r.gweiUnits[t])}},88162:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUnits=void 0,t.formatUnits=function(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${a?`.${a}`:""}`}},39118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEther=void 0;const r=n(99225),o=n(73956);t.parseEther=function(e,t="wei"){return(0,o.parseUnits)(e,r.etherUnits[t])}},31187:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseGwei=void 0;const r=n(99225),o=n(73956);t.parseGwei=function(e,t="wei"){return(0,o.parseUnits)(e,r.gweiUnits[t])}},73956:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUnits=void 0,t.parseUnits=function(e,t){let[n,r="0"]=e.split(".");const o=n.startsWith("-");if(o&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${r}`))&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>t){const[e,o,a]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],i=Math.round(Number(`${o}.${a}`));r=i>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${i}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${o?"-":""}${n}${r}`)}},78967:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wait=void 0,t.wait=async function(e){return new Promise((t=>setTimeout(t,e)))}},25611:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0;const r=n(20691);class o extends Error{constructor(e,t={}){const n=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof o&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: https://abitype.dev${a}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${r.version}`].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}}t.BaseError=o},2149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownSolidityTypeError=t.UnknownTypeError=t.InvalidAbiItemError=void 0;const r=n(25611);class o extends r.BaseError{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}t.InvalidAbiItemError=o;class a extends r.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}t.UnknownTypeError=a;class i extends r.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}t.UnknownSolidityTypeError=i},93669:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAbiTypeParameterError=t.InvalidFunctionModifierError=t.InvalidModifierError=t.SolidityProtectedKeywordError=t.InvalidParameterError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=void 0;const r=n(25611);class o extends r.BaseError{constructor({param:e}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}t.InvalidAbiParameterError=o;class a extends r.BaseError{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}t.InvalidAbiParametersError=a;class i extends r.BaseError{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}t.InvalidParameterError=i;class s extends r.BaseError{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}t.SolidityProtectedKeywordError=s;class c extends r.BaseError{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}t.InvalidModifierError=c;class u extends r.BaseError{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}t.InvalidFunctionModifierError=u;class l extends r.BaseError{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}t.InvalidAbiTypeParameterError=l},53584:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStructSignatureError=t.UnknownSignatureError=t.InvalidSignatureError=void 0;const r=n(25611);class o extends r.BaseError{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}t.InvalidSignatureError=o;class a extends r.BaseError{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}t.UnknownSignatureError=a;class i extends r.BaseError{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}t.InvalidStructSignatureError=i},71808:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidParenthesisError=void 0;const r=n(25611);class o extends r.BaseError{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}t.InvalidParenthesisError=o},98738:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CircularReferenceError=void 0;const r=n(25611);class o extends r.BaseError{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}t.CircularReferenceError=o},97601:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbi=void 0;const r=n(30717);t.formatAbi=function(e){const t=[],n=e.length;for(let o=0;o(\[(\d*)\])*)$/;t.formatAbiParameter=function e(t){let n=t.type;if(o.test(t.type)&&"components"in t){n="(";const a=t.components.length;for(let r=0;r[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;t.isErrorSignature=function(e){return o.test(e)},t.execErrorSignature=function(e){return(0,r.execTyped)(o,e)};const a=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;t.isEventSignature=function(e){return a.test(e)},t.execEventSignature=function(e){return(0,r.execTyped)(a,e)};const i=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;t.isFunctionSignature=function(e){return i.test(e)},t.execFunctionSignature=function(e){return(0,r.execTyped)(i,e)};const s=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;t.isStructSignature=function(e){return s.test(e)},t.execStructSignature=function(e){return(0,r.execTyped)(s,e)};const c=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;t.isConstructorSignature=function(e){return c.test(e)},t.execConstructorSignature=function(e){return(0,r.execTyped)(c,e)};const u=/^fallback\(\)$/;t.isFallbackSignature=function(e){return u.test(e)};const l=/^receive\(\) external payable$/;t.isReceiveSignature=function(e){return l.test(e)},t.modifiers=new Set(["memory","indexed","storage","calldata"]),t.eventModifiers=new Set(["indexed"]),t.functionModifiers=new Set(["calldata","memory","storage"])},21518:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseStructs=void 0;const r=n(11575),o=n(2149),a=n(93669),i=n(53584),s=n(98738),c=n(97677),u=n(30123);t.parseStructs=function(e){const t={},n=e.length;for(let s=0;s[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/;function d(e,t,n=new Set){const i=[],c=e.length;for(let f=0;f[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,d=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,f=/^u?int$/;function h(e,t){const n=(0,c.getParameterCacheKey)(e,t?.type);if(c.parameterCache.has(n))return c.parameterCache.get(n);const i=r.isTupleRegex.test(e),s=(0,r.execTyped)(i?d:l,e);if(!s)throw new a.InvalidParameterError({param:e});if(s.name&&g(s.name))throw new a.SolidityProtectedKeywordError({param:e,name:s.name});const b=s.name?{name:s.name}:{},v="indexed"===s.modifier?{indexed:!0}:{},w=t?.structs??{};let E,A={};if(i){E="tuple";const e=p(s.type),t=[],n=e.length;for(let r=0;r({blurs:{modalOverlay:i[n].modalOverlay},fonts:{body:o[t]},radii:{actionButton:a[e].actionButton,connectButton:a[e].connectButton,menuButton:a[e].connectButton,modal:a[e].modal,modalMobile:a[e].modalMobile}}),c={blue:{accentColor:"#0E76FD",accentColorForeground:"#FFF"},green:{accentColor:"#1DB847",accentColorForeground:"#FFF"},orange:{accentColor:"#FF801F",accentColorForeground:"#FFF"},pink:{accentColor:"#FF5CA0",accentColorForeground:"#FFF"},purple:{accentColor:"#5F5AFA",accentColorForeground:"#FFF"},red:{accentColor:"#FA423C",accentColorForeground:"#FFF"}},u=c.blue,l=({accentColor:e=u.accentColor,accentColorForeground:t=u.accentColorForeground,...n}={})=>({...s(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(0, 0, 0, 0.04)",actionButtonBorderMobile:"rgba(0, 0, 0, 0.06)",actionButtonSecondaryBackground:"rgba(0, 0, 0, 0.06)",closeButton:"rgba(60, 66, 66, 0.8)",closeButtonBackground:"rgba(0, 0, 0, 0.06)",connectButtonBackground:"#FFF",connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06))",connectButtonText:"#25292E",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(255, 255, 255, 0) 9.49%, rgba(171, 171, 171, 0.04) 71.04%), #FFFFFF",downloadTopCardBackground:"linear-gradient(126deg, rgba(171, 171, 171, 0.2) 9.49%, rgba(255, 255, 255, 0) 71.04%), #FFFFFF",error:"#FF494A",generalBorder:"rgba(0, 0, 0, 0.06)",generalBorderDim:"rgba(0, 0, 0, 0.03)",menuItemBackground:"rgba(60, 66, 66, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.3)",modalBackground:"#FFF",modalBorder:"transparent",modalText:"#25292E",modalTextDim:"rgba(60, 66, 66, 0.3)",modalTextSecondary:"rgba(60, 66, 66, 0.6)",profileAction:"#FFF",profileActionHover:"rgba(255, 255, 255, 0.5)",profileForeground:"rgba(60, 66, 66, 0.06)",selectedOptionBorder:"rgba(60, 66, 66, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.12)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});l.accentColors=c;var d=n(67294);var f=function(e,t){return Object.defineProperty(e,"__recipe__",{value:t,writable:!1}),e};function h(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");return f((function(e){if("string"===typeof e||"number"===typeof e||"boolean"===typeof e){if(!t.defaultCondition)throw new Error("No default condition");return{[t.defaultCondition]:e}}if(Array.isArray(e)){if(!("responsiveArray"in t))throw new Error("Responsive arrays are not supported");var n={};for(var r in t.responsiveArray)null!=e[r]&&(n[t.responsiveArray[r]]=e[r]);return n}return e}),{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createNormalizeValueFn",args:[{conditions:e.conditions}]})}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;tfunction(){for(var t=arguments.length,n=new Array(t),r=0;re.styles))),a=Object.keys(o),i=a.filter((e=>"mappings"in o[e])),s=t=>{var n=[],r={},a=b({},t),s=!1;for(var c of i){var u=t[c];if(null!=u){var l=o[c];for(var d of(s=!0,l.mappings))r[d]=u,null==a[d]&&delete a[d]}}var f=s?b(b({},r),a):t;for(var h in f){var p=f[h],m=o[h];try{if(m.mappings)continue;if("string"===typeof p||"number"===typeof p)n.push(m.values[p].defaultClass);else if(Array.isArray(p))for(var g=0;ge,v=function(){return g(y)(...arguments)},w=n(35133),E=n(86010),A=n(13105),x=n(73935),P=n(97582),C="right-scroll-bar-position",j="width-before-scroll-bar";function I(e,t){return function(e,t){var n=(0,d.useState)((function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}}))[0];return n.callback=t,n.facade}(t||null,(function(t){return e.forEach((function(e){return function(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}(e,t)}))}))}function O(e){return e}function T(e,t){void 0===t&&(t=O);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}var S=function(e){void 0===e&&(e={});var t=T(null);return t.options=(0,P.__assign)({async:!0,ssr:!1},e),t}(),B=function(){},k=d.forwardRef((function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:B,onWheelCapture:B,onTouchMoveCapture:B}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,l=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,b=e.allowPinchZoom,g=e.as,y=void 0===g?"div":g,v=(0,P.__rest)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=h,E=I([n,t]),A=(0,P.__assign)((0,P.__assign)({},v),o);return d.createElement(d.Fragment,null,l&&d.createElement(w,{sideCar:S,removeScrollBar:u,shards:f,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!b,lockRef:n}),i?d.cloneElement(d.Children.only(s),(0,P.__assign)((0,P.__assign)({},A),{ref:E})):d.createElement(y,(0,P.__assign)({},A,{className:c,ref:E}),s))}));k.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},k.classNames={fullWidth:j,zeroRight:C};var _,N=function(e){var t=e.sideCar,n=(0,P.__rest)(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,(0,P.__assign)({},n))};N.isSideCarExport=!0;function M(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_||n.nc;return t&&e.setAttribute("nonce",t),e}var R=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=M())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F=function(){var e=function(){var e=R();return function(t,n){d.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])}}();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},U={left:0,top:0,right:0,gap:0},L=function(e){return parseInt(e||"",10)||0},D=function(e){if(void 0===e&&(e="margin"),"undefined"===typeof window)return U;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[L(n),L(r),L(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},q=F(),H=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(C," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(j," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(C," .").concat(C," {\n right: 0 ").concat(r,";\n }\n \n .").concat(j," .").concat(j," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},z=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r,a=d.useMemo((function(){return D(o)}),[o]);return d.createElement(q,{styles:H(a,!t,o,n?"":"!important")})},G=!1;if("undefined"!==typeof window)try{var $=Object.defineProperty({},"passive",{get:function(){return G=!0,!0}});window.addEventListener("test",$,$),window.removeEventListener("test",$,$)}catch(pr){G=!1}var W=!!G&&{passive:!1},K=function(e,t){var n=t;do{if("undefined"!==typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Q(e,n)){var r=V(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Q=function(e,t){return"v"===e?function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)}(t):function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)}(t)},V=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Y=function(e){return[e.deltaX,e.deltaY]},Z=function(e){return e&&"current"in e?e.current:e},X=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ee=0,te=[];var ne,re=(ne=function(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(ee++)[0],a=d.useState((function(){return F()}))[0],i=d.useRef(e);d.useEffect((function(){i.current=e}),[e]),d.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(0,P.__spreadArray)([e.lockRef.current],(e.shards||[]).map(Z),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!i.current.allowPinchZoom;var o,a=J(e),s=n.current,c="deltaX"in e?e.deltaX:s[0]-a[0],u="deltaY"in e?e.deltaY:s[1]-a[1],l=e.target,d=Math.abs(c)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=K(d,l);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=K(d,l)),!f)return!1;if(!r.current&&"changedTouches"in e&&(c||u)&&(r.current=o),!o)return!0;var h=r.current||o;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,c=t.contains(s),u=!1,l=i>0,d=0,f=0;do{var h=V(e,s),p=h[0],m=h[1]-h[2]-a*p;(p||m)&&Q(e,s)&&(d+=m,f+=p),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(l&&(o&&0===d||!o&&i>d)||!l&&(o&&0===f||!o&&-i>f))&&(u=!0),u}(h,t,e,"h"===h?c:u,!0)}),[]),c=d.useCallback((function(e){var n=e;if(te.length&&te[te.length-1]===a){var r="deltaY"in n?Y(n):J(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.preventDefault();else if(!o){var c=(i.current.shards||[]).map(Z).filter(Boolean).filter((function(e){return e.contains(n.target)}));(c.length>0?s(n,c[0]):!i.current.noIsolation)&&n.preventDefault()}}}),[]),u=d.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),l=d.useCallback((function(e){n.current=J(e),r.current=void 0}),[]),f=d.useCallback((function(t){u(t.type,Y(t),t.target,s(t,e.lockRef.current))}),[]),h=d.useCallback((function(t){u(t.type,J(t),t.target,s(t,e.lockRef.current))}),[]);d.useEffect((function(){return te.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,W),document.addEventListener("touchmove",c,W),document.addEventListener("touchstart",l,W),function(){te=te.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,W),document.removeEventListener("touchmove",c,W),document.removeEventListener("touchstart",l,W)}}),[]);var p=e.removeScrollBar,m=e.inert;return d.createElement(d.Fragment,null,m?d.createElement(a,{styles:X(o)}):null,p?d.createElement(z,{gapMode:"margin"}):null)},S.useMedium(ne),N),oe=d.forwardRef((function(e,t){return d.createElement(k,(0,P.__assign)({},e,{ref:t,sideCar:re}))}));oe.classNames=k.classNames;var ae=oe;function ie(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function se(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=e.constructor();for(var o in e){var a=e[o],i=[...n,o];"string"===typeof a||"number"===typeof a||null==a?r[o]=t(a,i):"object"!==typeof a||Array.isArray(a)?console.warn('Skipping invalid key "'.concat(i.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(a)?"Array":typeof a,'"')):r[o]=se(a,t,i)}return r}function ce(e,t){var n={};if("object"===typeof t){var r=e;se(t,((e,t)=>{var o=function(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}(r,t);n[ie(o)]=String(e)}))}else{var o=e;for(var a in o)n[ie(a)]=o[a]}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map((e=>"".concat(e,":").concat(this[e]))).join(";")},writable:!1}),n}var ue=n(42455),le=n(92592),de=function(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");var n=h(e);return f((function(e,r){if("string"===typeof e||"number"===typeof e||"boolean"===typeof e){if(!t.defaultCondition)throw new Error("No default condition");return r(e,t.defaultCondition)}var o=Array.isArray(e)?n(e):e,a={};for(var i in o)null!=o[i]&&(a[i]=r(o[i],i));return a}),{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createMapValueFn",args:[{conditions:e.conditions}]})}({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),fe=h({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),he=v({conditions:{defaultCondition:"base",conditionNames:["base","hover","active"],responsiveArray:void 0},styles:{background:{values:{accentColor:{conditions:{base:"ju367v9c",hover:"ju367v9d",active:"ju367v9e"},defaultClass:"ju367v9c"},accentColorForeground:{conditions:{base:"ju367v9f",hover:"ju367v9g",active:"ju367v9h"},defaultClass:"ju367v9f"},actionButtonBorder:{conditions:{base:"ju367v9i",hover:"ju367v9j",active:"ju367v9k"},defaultClass:"ju367v9i"},actionButtonBorderMobile:{conditions:{base:"ju367v9l",hover:"ju367v9m",active:"ju367v9n"},defaultClass:"ju367v9l"},actionButtonSecondaryBackground:{conditions:{base:"ju367v9o",hover:"ju367v9p",active:"ju367v9q"},defaultClass:"ju367v9o"},closeButton:{conditions:{base:"ju367v9r",hover:"ju367v9s",active:"ju367v9t"},defaultClass:"ju367v9r"},closeButtonBackground:{conditions:{base:"ju367v9u",hover:"ju367v9v",active:"ju367v9w"},defaultClass:"ju367v9u"},connectButtonBackground:{conditions:{base:"ju367v9x",hover:"ju367v9y",active:"ju367v9z"},defaultClass:"ju367v9x"},connectButtonBackgroundError:{conditions:{base:"ju367va0",hover:"ju367va1",active:"ju367va2"},defaultClass:"ju367va0"},connectButtonInnerBackground:{conditions:{base:"ju367va3",hover:"ju367va4",active:"ju367va5"},defaultClass:"ju367va3"},connectButtonText:{conditions:{base:"ju367va6",hover:"ju367va7",active:"ju367va8"},defaultClass:"ju367va6"},connectButtonTextError:{conditions:{base:"ju367va9",hover:"ju367vaa",active:"ju367vab"},defaultClass:"ju367va9"},connectionIndicator:{conditions:{base:"ju367vac",hover:"ju367vad",active:"ju367vae"},defaultClass:"ju367vac"},downloadBottomCardBackground:{conditions:{base:"ju367vaf",hover:"ju367vag",active:"ju367vah"},defaultClass:"ju367vaf"},downloadTopCardBackground:{conditions:{base:"ju367vai",hover:"ju367vaj",active:"ju367vak"},defaultClass:"ju367vai"},error:{conditions:{base:"ju367val",hover:"ju367vam",active:"ju367van"},defaultClass:"ju367val"},generalBorder:{conditions:{base:"ju367vao",hover:"ju367vap",active:"ju367vaq"},defaultClass:"ju367vao"},generalBorderDim:{conditions:{base:"ju367var",hover:"ju367vas",active:"ju367vat"},defaultClass:"ju367var"},menuItemBackground:{conditions:{base:"ju367vau",hover:"ju367vav",active:"ju367vaw"},defaultClass:"ju367vau"},modalBackdrop:{conditions:{base:"ju367vax",hover:"ju367vay",active:"ju367vaz"},defaultClass:"ju367vax"},modalBackground:{conditions:{base:"ju367vb0",hover:"ju367vb1",active:"ju367vb2"},defaultClass:"ju367vb0"},modalBorder:{conditions:{base:"ju367vb3",hover:"ju367vb4",active:"ju367vb5"},defaultClass:"ju367vb3"},modalText:{conditions:{base:"ju367vb6",hover:"ju367vb7",active:"ju367vb8"},defaultClass:"ju367vb6"},modalTextDim:{conditions:{base:"ju367vb9",hover:"ju367vba",active:"ju367vbb"},defaultClass:"ju367vb9"},modalTextSecondary:{conditions:{base:"ju367vbc",hover:"ju367vbd",active:"ju367vbe"},defaultClass:"ju367vbc"},profileAction:{conditions:{base:"ju367vbf",hover:"ju367vbg",active:"ju367vbh"},defaultClass:"ju367vbf"},profileActionHover:{conditions:{base:"ju367vbi",hover:"ju367vbj",active:"ju367vbk"},defaultClass:"ju367vbi"},profileForeground:{conditions:{base:"ju367vbl",hover:"ju367vbm",active:"ju367vbn"},defaultClass:"ju367vbl"},selectedOptionBorder:{conditions:{base:"ju367vbo",hover:"ju367vbp",active:"ju367vbq"},defaultClass:"ju367vbo"},standby:{conditions:{base:"ju367vbr",hover:"ju367vbs",active:"ju367vbt"},defaultClass:"ju367vbr"}}},borderColor:{values:{accentColor:{conditions:{base:"ju367vbu",hover:"ju367vbv",active:"ju367vbw"},defaultClass:"ju367vbu"},accentColorForeground:{conditions:{base:"ju367vbx",hover:"ju367vby",active:"ju367vbz"},defaultClass:"ju367vbx"},actionButtonBorder:{conditions:{base:"ju367vc0",hover:"ju367vc1",active:"ju367vc2"},defaultClass:"ju367vc0"},actionButtonBorderMobile:{conditions:{base:"ju367vc3",hover:"ju367vc4",active:"ju367vc5"},defaultClass:"ju367vc3"},actionButtonSecondaryBackground:{conditions:{base:"ju367vc6",hover:"ju367vc7",active:"ju367vc8"},defaultClass:"ju367vc6"},closeButton:{conditions:{base:"ju367vc9",hover:"ju367vca",active:"ju367vcb"},defaultClass:"ju367vc9"},closeButtonBackground:{conditions:{base:"ju367vcc",hover:"ju367vcd",active:"ju367vce"},defaultClass:"ju367vcc"},connectButtonBackground:{conditions:{base:"ju367vcf",hover:"ju367vcg",active:"ju367vch"},defaultClass:"ju367vcf"},connectButtonBackgroundError:{conditions:{base:"ju367vci",hover:"ju367vcj",active:"ju367vck"},defaultClass:"ju367vci"},connectButtonInnerBackground:{conditions:{base:"ju367vcl",hover:"ju367vcm",active:"ju367vcn"},defaultClass:"ju367vcl"},connectButtonText:{conditions:{base:"ju367vco",hover:"ju367vcp",active:"ju367vcq"},defaultClass:"ju367vco"},connectButtonTextError:{conditions:{base:"ju367vcr",hover:"ju367vcs",active:"ju367vct"},defaultClass:"ju367vcr"},connectionIndicator:{conditions:{base:"ju367vcu",hover:"ju367vcv",active:"ju367vcw"},defaultClass:"ju367vcu"},downloadBottomCardBackground:{conditions:{base:"ju367vcx",hover:"ju367vcy",active:"ju367vcz"},defaultClass:"ju367vcx"},downloadTopCardBackground:{conditions:{base:"ju367vd0",hover:"ju367vd1",active:"ju367vd2"},defaultClass:"ju367vd0"},error:{conditions:{base:"ju367vd3",hover:"ju367vd4",active:"ju367vd5"},defaultClass:"ju367vd3"},generalBorder:{conditions:{base:"ju367vd6",hover:"ju367vd7",active:"ju367vd8"},defaultClass:"ju367vd6"},generalBorderDim:{conditions:{base:"ju367vd9",hover:"ju367vda",active:"ju367vdb"},defaultClass:"ju367vd9"},menuItemBackground:{conditions:{base:"ju367vdc",hover:"ju367vdd",active:"ju367vde"},defaultClass:"ju367vdc"},modalBackdrop:{conditions:{base:"ju367vdf",hover:"ju367vdg",active:"ju367vdh"},defaultClass:"ju367vdf"},modalBackground:{conditions:{base:"ju367vdi",hover:"ju367vdj",active:"ju367vdk"},defaultClass:"ju367vdi"},modalBorder:{conditions:{base:"ju367vdl",hover:"ju367vdm",active:"ju367vdn"},defaultClass:"ju367vdl"},modalText:{conditions:{base:"ju367vdo",hover:"ju367vdp",active:"ju367vdq"},defaultClass:"ju367vdo"},modalTextDim:{conditions:{base:"ju367vdr",hover:"ju367vds",active:"ju367vdt"},defaultClass:"ju367vdr"},modalTextSecondary:{conditions:{base:"ju367vdu",hover:"ju367vdv",active:"ju367vdw"},defaultClass:"ju367vdu"},profileAction:{conditions:{base:"ju367vdx",hover:"ju367vdy",active:"ju367vdz"},defaultClass:"ju367vdx"},profileActionHover:{conditions:{base:"ju367ve0",hover:"ju367ve1",active:"ju367ve2"},defaultClass:"ju367ve0"},profileForeground:{conditions:{base:"ju367ve3",hover:"ju367ve4",active:"ju367ve5"},defaultClass:"ju367ve3"},selectedOptionBorder:{conditions:{base:"ju367ve6",hover:"ju367ve7",active:"ju367ve8"},defaultClass:"ju367ve6"},standby:{conditions:{base:"ju367ve9",hover:"ju367vea",active:"ju367veb"},defaultClass:"ju367ve9"}}},boxShadow:{values:{connectButton:{conditions:{base:"ju367vec",hover:"ju367ved",active:"ju367vee"},defaultClass:"ju367vec"},dialog:{conditions:{base:"ju367vef",hover:"ju367veg",active:"ju367veh"},defaultClass:"ju367vef"},profileDetailsAction:{conditions:{base:"ju367vei",hover:"ju367vej",active:"ju367vek"},defaultClass:"ju367vei"},selectedOption:{conditions:{base:"ju367vel",hover:"ju367vem",active:"ju367ven"},defaultClass:"ju367vel"},selectedWallet:{conditions:{base:"ju367veo",hover:"ju367vep",active:"ju367veq"},defaultClass:"ju367veo"},walletLogo:{conditions:{base:"ju367ver",hover:"ju367ves",active:"ju367vet"},defaultClass:"ju367ver"}}},color:{values:{accentColor:{conditions:{base:"ju367veu",hover:"ju367vev",active:"ju367vew"},defaultClass:"ju367veu"},accentColorForeground:{conditions:{base:"ju367vex",hover:"ju367vey",active:"ju367vez"},defaultClass:"ju367vex"},actionButtonBorder:{conditions:{base:"ju367vf0",hover:"ju367vf1",active:"ju367vf2"},defaultClass:"ju367vf0"},actionButtonBorderMobile:{conditions:{base:"ju367vf3",hover:"ju367vf4",active:"ju367vf5"},defaultClass:"ju367vf3"},actionButtonSecondaryBackground:{conditions:{base:"ju367vf6",hover:"ju367vf7",active:"ju367vf8"},defaultClass:"ju367vf6"},closeButton:{conditions:{base:"ju367vf9",hover:"ju367vfa",active:"ju367vfb"},defaultClass:"ju367vf9"},closeButtonBackground:{conditions:{base:"ju367vfc",hover:"ju367vfd",active:"ju367vfe"},defaultClass:"ju367vfc"},connectButtonBackground:{conditions:{base:"ju367vff",hover:"ju367vfg",active:"ju367vfh"},defaultClass:"ju367vff"},connectButtonBackgroundError:{conditions:{base:"ju367vfi",hover:"ju367vfj",active:"ju367vfk"},defaultClass:"ju367vfi"},connectButtonInnerBackground:{conditions:{base:"ju367vfl",hover:"ju367vfm",active:"ju367vfn"},defaultClass:"ju367vfl"},connectButtonText:{conditions:{base:"ju367vfo",hover:"ju367vfp",active:"ju367vfq"},defaultClass:"ju367vfo"},connectButtonTextError:{conditions:{base:"ju367vfr",hover:"ju367vfs",active:"ju367vft"},defaultClass:"ju367vfr"},connectionIndicator:{conditions:{base:"ju367vfu",hover:"ju367vfv",active:"ju367vfw"},defaultClass:"ju367vfu"},downloadBottomCardBackground:{conditions:{base:"ju367vfx",hover:"ju367vfy",active:"ju367vfz"},defaultClass:"ju367vfx"},downloadTopCardBackground:{conditions:{base:"ju367vg0",hover:"ju367vg1",active:"ju367vg2"},defaultClass:"ju367vg0"},error:{conditions:{base:"ju367vg3",hover:"ju367vg4",active:"ju367vg5"},defaultClass:"ju367vg3"},generalBorder:{conditions:{base:"ju367vg6",hover:"ju367vg7",active:"ju367vg8"},defaultClass:"ju367vg6"},generalBorderDim:{conditions:{base:"ju367vg9",hover:"ju367vga",active:"ju367vgb"},defaultClass:"ju367vg9"},menuItemBackground:{conditions:{base:"ju367vgc",hover:"ju367vgd",active:"ju367vge"},defaultClass:"ju367vgc"},modalBackdrop:{conditions:{base:"ju367vgf",hover:"ju367vgg",active:"ju367vgh"},defaultClass:"ju367vgf"},modalBackground:{conditions:{base:"ju367vgi",hover:"ju367vgj",active:"ju367vgk"},defaultClass:"ju367vgi"},modalBorder:{conditions:{base:"ju367vgl",hover:"ju367vgm",active:"ju367vgn"},defaultClass:"ju367vgl"},modalText:{conditions:{base:"ju367vgo",hover:"ju367vgp",active:"ju367vgq"},defaultClass:"ju367vgo"},modalTextDim:{conditions:{base:"ju367vgr",hover:"ju367vgs",active:"ju367vgt"},defaultClass:"ju367vgr"},modalTextSecondary:{conditions:{base:"ju367vgu",hover:"ju367vgv",active:"ju367vgw"},defaultClass:"ju367vgu"},profileAction:{conditions:{base:"ju367vgx",hover:"ju367vgy",active:"ju367vgz"},defaultClass:"ju367vgx"},profileActionHover:{conditions:{base:"ju367vh0",hover:"ju367vh1",active:"ju367vh2"},defaultClass:"ju367vh0"},profileForeground:{conditions:{base:"ju367vh3",hover:"ju367vh4",active:"ju367vh5"},defaultClass:"ju367vh3"},selectedOptionBorder:{conditions:{base:"ju367vh6",hover:"ju367vh7",active:"ju367vh8"},defaultClass:"ju367vh6"},standby:{conditions:{base:"ju367vh9",hover:"ju367vha",active:"ju367vhb"},defaultClass:"ju367vh9"}}}}},{conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0},styles:{alignItems:{values:{"flex-start":{conditions:{smallScreen:"ju367v0",largeScreen:"ju367v1"},defaultClass:"ju367v0"},"flex-end":{conditions:{smallScreen:"ju367v2",largeScreen:"ju367v3"},defaultClass:"ju367v2"},center:{conditions:{smallScreen:"ju367v4",largeScreen:"ju367v5"},defaultClass:"ju367v4"}}},display:{values:{none:{conditions:{smallScreen:"ju367v6",largeScreen:"ju367v7"},defaultClass:"ju367v6"},block:{conditions:{smallScreen:"ju367v8",largeScreen:"ju367v9"},defaultClass:"ju367v8"},flex:{conditions:{smallScreen:"ju367va",largeScreen:"ju367vb"},defaultClass:"ju367va"},inline:{conditions:{smallScreen:"ju367vc",largeScreen:"ju367vd"},defaultClass:"ju367vc"}}}}},{conditions:void 0,styles:{margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},alignSelf:{values:{"flex-start":{defaultClass:"ju367ve"},"flex-end":{defaultClass:"ju367vf"},center:{defaultClass:"ju367vg"}}},backgroundSize:{values:{cover:{defaultClass:"ju367vh"}}},borderRadius:{values:{1:{defaultClass:"ju367vi"},6:{defaultClass:"ju367vj"},10:{defaultClass:"ju367vk"},13:{defaultClass:"ju367vl"},actionButton:{defaultClass:"ju367vm"},connectButton:{defaultClass:"ju367vn"},menuButton:{defaultClass:"ju367vo"},modal:{defaultClass:"ju367vp"},modalMobile:{defaultClass:"ju367vq"},"25%":{defaultClass:"ju367vr"},full:{defaultClass:"ju367vs"}}},borderStyle:{values:{solid:{defaultClass:"ju367vt"}}},borderWidth:{values:{0:{defaultClass:"ju367vu"},1:{defaultClass:"ju367vv"},2:{defaultClass:"ju367vw"},4:{defaultClass:"ju367vx"}}},cursor:{values:{pointer:{defaultClass:"ju367vy"}}},flexDirection:{values:{row:{defaultClass:"ju367vz"},column:{defaultClass:"ju367v10"}}},fontFamily:{values:{body:{defaultClass:"ju367v11"}}},fontSize:{values:{12:{defaultClass:"ju367v12"},13:{defaultClass:"ju367v13"},14:{defaultClass:"ju367v14"},16:{defaultClass:"ju367v15"},18:{defaultClass:"ju367v16"},20:{defaultClass:"ju367v17"},23:{defaultClass:"ju367v18"}}},fontWeight:{values:{regular:{defaultClass:"ju367v19"},medium:{defaultClass:"ju367v1a"},semibold:{defaultClass:"ju367v1b"},bold:{defaultClass:"ju367v1c"},heavy:{defaultClass:"ju367v1d"}}},gap:{values:{0:{defaultClass:"ju367v1e"},1:{defaultClass:"ju367v1f"},2:{defaultClass:"ju367v1g"},3:{defaultClass:"ju367v1h"},4:{defaultClass:"ju367v1i"},5:{defaultClass:"ju367v1j"},6:{defaultClass:"ju367v1k"},8:{defaultClass:"ju367v1l"},10:{defaultClass:"ju367v1m"},12:{defaultClass:"ju367v1n"},14:{defaultClass:"ju367v1o"},16:{defaultClass:"ju367v1p"},18:{defaultClass:"ju367v1q"},20:{defaultClass:"ju367v1r"},24:{defaultClass:"ju367v1s"},28:{defaultClass:"ju367v1t"},32:{defaultClass:"ju367v1u"},36:{defaultClass:"ju367v1v"},44:{defaultClass:"ju367v1w"},64:{defaultClass:"ju367v1x"},"-1":{defaultClass:"ju367v1y"}}},height:{values:{1:{defaultClass:"ju367v1z"},2:{defaultClass:"ju367v20"},4:{defaultClass:"ju367v21"},8:{defaultClass:"ju367v22"},12:{defaultClass:"ju367v23"},20:{defaultClass:"ju367v24"},24:{defaultClass:"ju367v25"},28:{defaultClass:"ju367v26"},30:{defaultClass:"ju367v27"},32:{defaultClass:"ju367v28"},34:{defaultClass:"ju367v29"},36:{defaultClass:"ju367v2a"},40:{defaultClass:"ju367v2b"},44:{defaultClass:"ju367v2c"},48:{defaultClass:"ju367v2d"},54:{defaultClass:"ju367v2e"},60:{defaultClass:"ju367v2f"},200:{defaultClass:"ju367v2g"},full:{defaultClass:"ju367v2h"},max:{defaultClass:"ju367v2i"}}},justifyContent:{values:{"flex-start":{defaultClass:"ju367v2j"},"flex-end":{defaultClass:"ju367v2k"},center:{defaultClass:"ju367v2l"},"space-between":{defaultClass:"ju367v2m"},"space-around":{defaultClass:"ju367v2n"}}},textAlign:{values:{left:{defaultClass:"ju367v2o"},center:{defaultClass:"ju367v2p"},inherit:{defaultClass:"ju367v2q"}}},marginBottom:{values:{0:{defaultClass:"ju367v2r"},1:{defaultClass:"ju367v2s"},2:{defaultClass:"ju367v2t"},3:{defaultClass:"ju367v2u"},4:{defaultClass:"ju367v2v"},5:{defaultClass:"ju367v2w"},6:{defaultClass:"ju367v2x"},8:{defaultClass:"ju367v2y"},10:{defaultClass:"ju367v2z"},12:{defaultClass:"ju367v30"},14:{defaultClass:"ju367v31"},16:{defaultClass:"ju367v32"},18:{defaultClass:"ju367v33"},20:{defaultClass:"ju367v34"},24:{defaultClass:"ju367v35"},28:{defaultClass:"ju367v36"},32:{defaultClass:"ju367v37"},36:{defaultClass:"ju367v38"},44:{defaultClass:"ju367v39"},64:{defaultClass:"ju367v3a"},"-1":{defaultClass:"ju367v3b"}}},marginLeft:{values:{0:{defaultClass:"ju367v3c"},1:{defaultClass:"ju367v3d"},2:{defaultClass:"ju367v3e"},3:{defaultClass:"ju367v3f"},4:{defaultClass:"ju367v3g"},5:{defaultClass:"ju367v3h"},6:{defaultClass:"ju367v3i"},8:{defaultClass:"ju367v3j"},10:{defaultClass:"ju367v3k"},12:{defaultClass:"ju367v3l"},14:{defaultClass:"ju367v3m"},16:{defaultClass:"ju367v3n"},18:{defaultClass:"ju367v3o"},20:{defaultClass:"ju367v3p"},24:{defaultClass:"ju367v3q"},28:{defaultClass:"ju367v3r"},32:{defaultClass:"ju367v3s"},36:{defaultClass:"ju367v3t"},44:{defaultClass:"ju367v3u"},64:{defaultClass:"ju367v3v"},"-1":{defaultClass:"ju367v3w"}}},marginRight:{values:{0:{defaultClass:"ju367v3x"},1:{defaultClass:"ju367v3y"},2:{defaultClass:"ju367v3z"},3:{defaultClass:"ju367v40"},4:{defaultClass:"ju367v41"},5:{defaultClass:"ju367v42"},6:{defaultClass:"ju367v43"},8:{defaultClass:"ju367v44"},10:{defaultClass:"ju367v45"},12:{defaultClass:"ju367v46"},14:{defaultClass:"ju367v47"},16:{defaultClass:"ju367v48"},18:{defaultClass:"ju367v49"},20:{defaultClass:"ju367v4a"},24:{defaultClass:"ju367v4b"},28:{defaultClass:"ju367v4c"},32:{defaultClass:"ju367v4d"},36:{defaultClass:"ju367v4e"},44:{defaultClass:"ju367v4f"},64:{defaultClass:"ju367v4g"},"-1":{defaultClass:"ju367v4h"}}},marginTop:{values:{0:{defaultClass:"ju367v4i"},1:{defaultClass:"ju367v4j"},2:{defaultClass:"ju367v4k"},3:{defaultClass:"ju367v4l"},4:{defaultClass:"ju367v4m"},5:{defaultClass:"ju367v4n"},6:{defaultClass:"ju367v4o"},8:{defaultClass:"ju367v4p"},10:{defaultClass:"ju367v4q"},12:{defaultClass:"ju367v4r"},14:{defaultClass:"ju367v4s"},16:{defaultClass:"ju367v4t"},18:{defaultClass:"ju367v4u"},20:{defaultClass:"ju367v4v"},24:{defaultClass:"ju367v4w"},28:{defaultClass:"ju367v4x"},32:{defaultClass:"ju367v4y"},36:{defaultClass:"ju367v4z"},44:{defaultClass:"ju367v50"},64:{defaultClass:"ju367v51"},"-1":{defaultClass:"ju367v52"}}},maxWidth:{values:{1:{defaultClass:"ju367v53"},2:{defaultClass:"ju367v54"},4:{defaultClass:"ju367v55"},8:{defaultClass:"ju367v56"},12:{defaultClass:"ju367v57"},20:{defaultClass:"ju367v58"},24:{defaultClass:"ju367v59"},28:{defaultClass:"ju367v5a"},30:{defaultClass:"ju367v5b"},32:{defaultClass:"ju367v5c"},34:{defaultClass:"ju367v5d"},36:{defaultClass:"ju367v5e"},40:{defaultClass:"ju367v5f"},44:{defaultClass:"ju367v5g"},48:{defaultClass:"ju367v5h"},54:{defaultClass:"ju367v5i"},60:{defaultClass:"ju367v5j"},200:{defaultClass:"ju367v5k"},full:{defaultClass:"ju367v5l"},max:{defaultClass:"ju367v5m"}}},minWidth:{values:{1:{defaultClass:"ju367v5n"},2:{defaultClass:"ju367v5o"},4:{defaultClass:"ju367v5p"},8:{defaultClass:"ju367v5q"},12:{defaultClass:"ju367v5r"},20:{defaultClass:"ju367v5s"},24:{defaultClass:"ju367v5t"},28:{defaultClass:"ju367v5u"},30:{defaultClass:"ju367v5v"},32:{defaultClass:"ju367v5w"},34:{defaultClass:"ju367v5x"},36:{defaultClass:"ju367v5y"},40:{defaultClass:"ju367v5z"},44:{defaultClass:"ju367v60"},48:{defaultClass:"ju367v61"},54:{defaultClass:"ju367v62"},60:{defaultClass:"ju367v63"},200:{defaultClass:"ju367v64"},full:{defaultClass:"ju367v65"},max:{defaultClass:"ju367v66"}}},overflow:{values:{hidden:{defaultClass:"ju367v67"}}},paddingBottom:{values:{0:{defaultClass:"ju367v68"},1:{defaultClass:"ju367v69"},2:{defaultClass:"ju367v6a"},3:{defaultClass:"ju367v6b"},4:{defaultClass:"ju367v6c"},5:{defaultClass:"ju367v6d"},6:{defaultClass:"ju367v6e"},8:{defaultClass:"ju367v6f"},10:{defaultClass:"ju367v6g"},12:{defaultClass:"ju367v6h"},14:{defaultClass:"ju367v6i"},16:{defaultClass:"ju367v6j"},18:{defaultClass:"ju367v6k"},20:{defaultClass:"ju367v6l"},24:{defaultClass:"ju367v6m"},28:{defaultClass:"ju367v6n"},32:{defaultClass:"ju367v6o"},36:{defaultClass:"ju367v6p"},44:{defaultClass:"ju367v6q"},64:{defaultClass:"ju367v6r"},"-1":{defaultClass:"ju367v6s"}}},paddingLeft:{values:{0:{defaultClass:"ju367v6t"},1:{defaultClass:"ju367v6u"},2:{defaultClass:"ju367v6v"},3:{defaultClass:"ju367v6w"},4:{defaultClass:"ju367v6x"},5:{defaultClass:"ju367v6y"},6:{defaultClass:"ju367v6z"},8:{defaultClass:"ju367v70"},10:{defaultClass:"ju367v71"},12:{defaultClass:"ju367v72"},14:{defaultClass:"ju367v73"},16:{defaultClass:"ju367v74"},18:{defaultClass:"ju367v75"},20:{defaultClass:"ju367v76"},24:{defaultClass:"ju367v77"},28:{defaultClass:"ju367v78"},32:{defaultClass:"ju367v79"},36:{defaultClass:"ju367v7a"},44:{defaultClass:"ju367v7b"},64:{defaultClass:"ju367v7c"},"-1":{defaultClass:"ju367v7d"}}},paddingRight:{values:{0:{defaultClass:"ju367v7e"},1:{defaultClass:"ju367v7f"},2:{defaultClass:"ju367v7g"},3:{defaultClass:"ju367v7h"},4:{defaultClass:"ju367v7i"},5:{defaultClass:"ju367v7j"},6:{defaultClass:"ju367v7k"},8:{defaultClass:"ju367v7l"},10:{defaultClass:"ju367v7m"},12:{defaultClass:"ju367v7n"},14:{defaultClass:"ju367v7o"},16:{defaultClass:"ju367v7p"},18:{defaultClass:"ju367v7q"},20:{defaultClass:"ju367v7r"},24:{defaultClass:"ju367v7s"},28:{defaultClass:"ju367v7t"},32:{defaultClass:"ju367v7u"},36:{defaultClass:"ju367v7v"},44:{defaultClass:"ju367v7w"},64:{defaultClass:"ju367v7x"},"-1":{defaultClass:"ju367v7y"}}},paddingTop:{values:{0:{defaultClass:"ju367v7z"},1:{defaultClass:"ju367v80"},2:{defaultClass:"ju367v81"},3:{defaultClass:"ju367v82"},4:{defaultClass:"ju367v83"},5:{defaultClass:"ju367v84"},6:{defaultClass:"ju367v85"},8:{defaultClass:"ju367v86"},10:{defaultClass:"ju367v87"},12:{defaultClass:"ju367v88"},14:{defaultClass:"ju367v89"},16:{defaultClass:"ju367v8a"},18:{defaultClass:"ju367v8b"},20:{defaultClass:"ju367v8c"},24:{defaultClass:"ju367v8d"},28:{defaultClass:"ju367v8e"},32:{defaultClass:"ju367v8f"},36:{defaultClass:"ju367v8g"},44:{defaultClass:"ju367v8h"},64:{defaultClass:"ju367v8i"},"-1":{defaultClass:"ju367v8j"}}},position:{values:{absolute:{defaultClass:"ju367v8k"},fixed:{defaultClass:"ju367v8l"},relative:{defaultClass:"ju367v8m"}}},right:{values:{0:{defaultClass:"ju367v8n"}}},transition:{values:{default:{defaultClass:"ju367v8o"},transform:{defaultClass:"ju367v8p"}}},userSelect:{values:{none:{defaultClass:"ju367v8q"}}},width:{values:{1:{defaultClass:"ju367v8r"},2:{defaultClass:"ju367v8s"},4:{defaultClass:"ju367v8t"},8:{defaultClass:"ju367v8u"},12:{defaultClass:"ju367v8v"},20:{defaultClass:"ju367v8w"},24:{defaultClass:"ju367v8x"},28:{defaultClass:"ju367v8y"},30:{defaultClass:"ju367v8z"},32:{defaultClass:"ju367v90"},34:{defaultClass:"ju367v91"},36:{defaultClass:"ju367v92"},40:{defaultClass:"ju367v93"},44:{defaultClass:"ju367v94"},48:{defaultClass:"ju367v95"},54:{defaultClass:"ju367v96"},60:{defaultClass:"ju367v97"},200:{defaultClass:"ju367v98"},full:{defaultClass:"ju367v99"},max:{defaultClass:"ju367v9a"}}},backdropFilter:{values:{modalOverlay:{defaultClass:"ju367v9b"}}}}}),pe={colors:{accentColor:"var(--rk-colors-accentColor)",accentColorForeground:"var(--rk-colors-accentColorForeground)",actionButtonBorder:"var(--rk-colors-actionButtonBorder)",actionButtonBorderMobile:"var(--rk-colors-actionButtonBorderMobile)",actionButtonSecondaryBackground:"var(--rk-colors-actionButtonSecondaryBackground)",closeButton:"var(--rk-colors-closeButton)",closeButtonBackground:"var(--rk-colors-closeButtonBackground)",connectButtonBackground:"var(--rk-colors-connectButtonBackground)",connectButtonBackgroundError:"var(--rk-colors-connectButtonBackgroundError)",connectButtonInnerBackground:"var(--rk-colors-connectButtonInnerBackground)",connectButtonText:"var(--rk-colors-connectButtonText)",connectButtonTextError:"var(--rk-colors-connectButtonTextError)",connectionIndicator:"var(--rk-colors-connectionIndicator)",downloadBottomCardBackground:"var(--rk-colors-downloadBottomCardBackground)",downloadTopCardBackground:"var(--rk-colors-downloadTopCardBackground)",error:"var(--rk-colors-error)",generalBorder:"var(--rk-colors-generalBorder)",generalBorderDim:"var(--rk-colors-generalBorderDim)",menuItemBackground:"var(--rk-colors-menuItemBackground)",modalBackdrop:"var(--rk-colors-modalBackdrop)",modalBackground:"var(--rk-colors-modalBackground)",modalBorder:"var(--rk-colors-modalBorder)",modalText:"var(--rk-colors-modalText)",modalTextDim:"var(--rk-colors-modalTextDim)",modalTextSecondary:"var(--rk-colors-modalTextSecondary)",profileAction:"var(--rk-colors-profileAction)",profileActionHover:"var(--rk-colors-profileActionHover)",profileForeground:"var(--rk-colors-profileForeground)",selectedOptionBorder:"var(--rk-colors-selectedOptionBorder)",standby:"var(--rk-colors-standby)"},fonts:{body:"var(--rk-fonts-body)"},radii:{actionButton:"var(--rk-radii-actionButton)",connectButton:"var(--rk-radii-connectButton)",menuButton:"var(--rk-radii-menuButton)",modal:"var(--rk-radii-modal)",modalMobile:"var(--rk-radii-modalMobile)"},shadows:{connectButton:"var(--rk-shadows-connectButton)",dialog:"var(--rk-shadows-dialog)",profileDetailsAction:"var(--rk-shadows-profileDetailsAction)",selectedOption:"var(--rk-shadows-selectedOption)",selectedWallet:"var(--rk-shadows-selectedWallet)",walletLogo:"var(--rk-shadows-walletLogo)"},blurs:{modalOverlay:"var(--rk-blurs-modalOverlay)"}},me={shrink:"_12cbo8i6",shrinkSm:"_12cbo8i7"},be={grow:"_12cbo8i4",growLg:"_12cbo8i5"};function ge({active:e,hover:t}){return["_12cbo8i3 ju367v8m",t&&be[t],me[e]]}var ye=(0,d.createContext)(null);function ve(){var e;const t=(0,d.useContext)(ye);return null!=(e=null==t?void 0:t.status)?e:null}function we(){const e=ve(),{isConnected:t}=(0,w.mA)();return t?e&&("loading"===e||"unauthenticated"===e)?e:"connected":"disconnected"}function Ee(){return"undefined"!==typeof navigator&&/android/i.test(navigator.userAgent)}function Ae(){return"undefined"!==typeof navigator&&/iPhone|iPod/.test(navigator.userAgent)||"undefined"!==typeof navigator&&(/iPad/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)}function xe(){return Ee()||Ae()}var Pe={a:"iekbcca",blockquote:"iekbcc2",button:"iekbcc9",input:"iekbcc8 iekbcc5 iekbcc4",mark:"iekbcc6",ol:"iekbcc1",q:"iekbcc2",select:"iekbcc7 iekbcc5 iekbcc4",table:"iekbcc3",textarea:"iekbcc5 iekbcc4",ul:"iekbcc1"},Ce=d.forwardRef((({as:e="div",className:t,testId:n,...r},o)=>{const a={},i={};for(const c in r)he.properties.has(c)?a[c]=r[c]:i[c]=r[c];const s=(({reset:e,...t})=>{if(!e)return he(t);const n=Pe[e],r=he(t);return(0,E.default)("iekbcc0",n,r)})({reset:"string"===typeof e?e:"div",...a});return d.createElement(e,{className:(0,E.default)(s,t),...i,"data-testid":n?`rk-${n.replace(/^rk-/,"")}`:void 0,ref:o})}));Ce.displayName="Box";var je=new Map,Ie=new Map;async function Oe(e){const t=Ie.get(e);if(t)return t;const n=async()=>e().then((async t=>(je.set(e,t),t))),r=n().catch((t=>n().catch((t=>{Ie.delete(e)}))));return Ie.set(e,r),r}async function Te(...e){return await Promise.all(e.map((e=>"function"===typeof e?Oe(e):e)))}function Se(e){const t="function"===typeof e?je.get(e):void 0,n=function(){const[,e]=(0,d.useReducer)((e=>e+1),0);return e}();return(0,d.useEffect)((()=>{"function"!==typeof e||t||Oe(e).then(n)}),[e,t,n]),"function"===typeof e?t:e}function Be({alt:e,background:t,borderColor:n,borderRadius:r,boxShadow:o,height:a,src:i,width:s}){const c=Se(i),u=c&&/^http/.test(c),[l,f]=(0,d.useReducer)((()=>!0),!1);return d.createElement(Ce,{"aria-label":e,borderRadius:r,boxShadow:o,height:"string"===typeof a?a:void 0,overflow:"hidden",position:"relative",role:"img",style:{background:t,height:"number"===typeof a?a:void 0,width:"number"===typeof s?s:void 0},width:"string"===typeof s?s:void 0},d.createElement(Ce,{...u?{"aria-hidden":!0,as:"img",onLoad:f,src:c}:{backgroundSize:"cover"},height:"full",position:"absolute",style:{touchCallout:"none",transition:"opacity .15s linear",userSelect:"none",...u?{opacity:l?1:0}:{backgroundImage:c?`url(${c})`:void 0,backgroundRepeat:"no-repeat",opacity:c?1:0}},width:"full"}),n?d.createElement(Ce,{..."object"===typeof n&&"custom"in n?{style:{borderColor:n.custom}}:{borderColor:n},borderRadius:r,borderStyle:"solid",borderWidth:"1",height:"full",position:"relative",width:"full"}):null)}var ke=({height:e=21,width:t=21})=>{const n=(r="spinner",(0,d.useMemo)((()=>`${r}_${Math.round(1e9*Math.random())}`),[r]));var r;return d.createElement("svg",{className:"_1luule42",fill:"none",height:e,viewBox:"0 0 21 21",width:t,xmlns:"http://www.w3.org/2000/svg"},d.createElement("clipPath",{id:n},d.createElement("path",{d:"M10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C11.3284 18 12 18.6716 12 19.5C12 20.3284 11.3284 21 10.5 21C4.70101 21 0 16.299 0 10.5C0 4.70101 4.70101 0 10.5 0C16.299 0 21 4.70101 21 10.5C21 11.3284 20.3284 12 19.5 12C18.6716 12 18 11.3284 18 10.5C18 6.35786 14.6421 3 10.5 3Z"})),d.createElement("foreignObject",{clipPath:`url(#${n})`,height:"21",width:"21",x:"0",y:"0"},d.createElement("div",{className:"_1luule43"})))},_e=["#FC5C54","#FFD95A","#E95D72","#6A87C8","#5FD0F3","#75C06B","#FFDD86","#5FC6D4","#FF949A","#FF8024","#9BA1A4","#EC66FF","#FF8CBC","#FF9A23","#C5DADB","#A8CE63","#71ABFF","#FFE279","#B6B1B6","#FF6780","#A575FF","#4D82FF","#FFB35A"],Ne=[{color:_e[0],emoji:"\ud83c\udf36"},{color:_e[1],emoji:"\ud83e\udd11"},{color:_e[2],emoji:"\ud83d\udc19"},{color:_e[3],emoji:"\ud83e\uded0"},{color:_e[4],emoji:"\ud83d\udc33"},{color:_e[0],emoji:"\ud83e\udd36"},{color:_e[5],emoji:"\ud83c\udf32"},{color:_e[6],emoji:"\ud83c\udf1e"},{color:_e[7],emoji:"\ud83d\udc12"},{color:_e[8],emoji:"\ud83d\udc35"},{color:_e[9],emoji:"\ud83e\udd8a"},{color:_e[10],emoji:"\ud83d\udc3c"},{color:_e[11],emoji:"\ud83e\udd84"},{color:_e[12],emoji:"\ud83d\udc37"},{color:_e[13],emoji:"\ud83d\udc27"},{color:_e[8],emoji:"\ud83e\udda9"},{color:_e[14],emoji:"\ud83d\udc7d"},{color:_e[0],emoji:"\ud83c\udf88"},{color:_e[8],emoji:"\ud83c\udf49"},{color:_e[1],emoji:"\ud83c\udf89"},{color:_e[15],emoji:"\ud83d\udc32"},{color:_e[16],emoji:"\ud83c\udf0e"},{color:_e[17],emoji:"\ud83c\udf4a"},{color:_e[18],emoji:"\ud83d\udc2d"},{color:_e[19],emoji:"\ud83c\udf63"},{color:_e[1],emoji:"\ud83d\udc25"},{color:_e[20],emoji:"\ud83d\udc7e"},{color:_e[15],emoji:"\ud83e\udd66"},{color:_e[0],emoji:"\ud83d\udc79"},{color:_e[17],emoji:"\ud83d\ude40"},{color:_e[4],emoji:"\u26f1"},{color:_e[21],emoji:"\u26f5\ufe0f"},{color:_e[17],emoji:"\ud83e\udd73"},{color:_e[8],emoji:"\ud83e\udd2f"},{color:_e[22],emoji:"\ud83e\udd20"}];var Me=({address:e,ensImage:t,size:n})=>{const[r,o]=(0,d.useState)(!1);(0,d.useEffect)((()=>{if(t){const e=new Image;e.src=t,e.onload=()=>o(!0)}}),[t]);const{color:a,emoji:i}=(0,d.useMemo)((()=>function(e){const t="string"===typeof e?e:"",n=Math.abs(function(e){let t=0;if(0===e.length)return t;for(let n=0;nd.createElement("svg",{fill:"none",height:"7",width:"14",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M12.75 1.54001L8.51647 5.0038C7.77974 5.60658 6.72026 5.60658 5.98352 5.0038L1.75 1.54001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",xmlns:"http://www.w3.org/2000/svg"}));function Le(e){return null!=e}var De={iconBackground:"#96bedc",iconUrl:async()=>(await n.e(1727).then(n.bind(n,1727))).default},qe={iconBackground:"#e84141",iconUrl:async()=>(await n.e(6237).then(n.bind(n,36237))).default},He={iconBackground:"#0052ff",iconUrl:async()=>(await n.e(1711).then(n.bind(n,41711))).default},ze={iconBackground:"#ebac0e",iconUrl:async()=>(await n.e(4253).then(n.bind(n,84253))).default},Ge={iconBackground:"#002D74",iconUrl:async()=>(await n.e(5939).then(n.bind(n,95939))).default},$e={iconBackground:"#484c50",iconUrl:async()=>(await n.e(5488).then(n.bind(n,85488))).default},We={iconBackground:"#f9f7ec",iconUrl:async()=>(await n.e(6253).then(n.bind(n,26253))).default},Ke={iconBackground:"#ff5a57",iconUrl:async()=>(await n.e(704).then(n.bind(n,60704))).default},Qe={iconBackground:"#9f71ec",iconUrl:async()=>(await n.e(8881).then(n.bind(n,48881))).default},Ve={iconBackground:"#000000",iconUrl:async()=>(await n.e(5119).then(n.bind(n,65119))).default},Je={arbitrum:{chainId:42161,name:"Arbitrum",...De},arbitrumGoerli:{chainId:421613,...De},avalanche:{chainId:43114,...qe},avalancheFuji:{chainId:43113,...qe},base:{chainId:8453,...He},baseGoerli:{chainId:84531,...He},bsc:{chainId:56,name:"BSC",...ze},bscTestnet:{chainId:97,...ze},cronos:{chainId:25,...Ge},cronosTestnet:{chainId:338,...Ge},goerli:{chainId:5,...$e},hardhat:{chainId:31337,...We},kovan:{chainId:42,...$e},localhost:{chainId:1337,...$e},mainnet:{chainId:1,...$e},optimism:{chainId:10,name:"Optimism",...Ke},optimismGoerli:{chainId:420,...Ke},optimismKovan:{chainId:69,...Ke},polygon:{chainId:137,...Qe},polygonMumbai:{chainId:80001,...Qe},rinkeby:{chainId:4,...$e},ropsten:{chainId:3,...$e},sepolia:{chainId:11155111,...$e},zora:{chainId:7777777,...Ve},zoraTestnet:{chainId:999,...Ve}},Ye=Object.fromEntries(Object.values(Je).filter(Le).map((({chainId:e,...t})=>[e,t]))),Ze=e=>e.map((e=>{var t;return{...e,...null!=(t=Ye[e.id])?t:{}}})),Xe=(0,d.createContext)({chains:[]});function et({chains:e,children:t,initialChain:n}){return d.createElement(Xe.Provider,{value:(0,d.useMemo)((()=>({chains:Ze(e),initialChainId:"number"===typeof n?n:null==n?void 0:n.id})),[e,n])},t)}var tt=()=>(0,d.useContext)(Xe).chains;function nt(){const e=A.RJ.id,t=(0,w.t_)(),n=Array.isArray(t.chains)?t.chains:[],r=null==n?void 0:n.some((t=>(null==t?void 0:t.id)===e));return{chainId:e,enabled:r}}function rt(e){const{chainId:t,enabled:n}=nt(),{data:r}=(0,w.c9)({chainId:t,enabled:n,name:e});return r}function ot(e){const{chainId:t,enabled:n}=nt(),{data:r}=(0,w.F6)({address:e,chainId:t,enabled:n});return r}function at(){var e;const{chain:t}=(0,w.LN)();return null!=(e=null==t?void 0:t.id)?e:null}var it="rk-transactions";function st(){return function(e){try{const t=e?JSON.parse(e):{};return"object"===typeof t?t:{}}catch(pr){return{}}}("undefined"!==typeof localStorage?localStorage.getItem(it):null)}var ct,ut=/^0x([A-Fa-f0-9]{64})$/;function lt({provider:e}){let t=st(),n=e;const r=new Set,o=new Map;function a(e,n){var r,o;return null!=(o=null==(r=t[e])?void 0:r[n])?o:[]}async function i(e,t){await Promise.all(a(e,t).filter((e=>"pending"===e.status)).map((async r=>{const{confirmations:a,hash:i}=r,c=o.get(i);if(c)return await c;const u=n.waitForTransactionReceipt({confirmations:a,hash:i}).then((({status:n})=>{o.delete(i),void 0!==n&&function(e,t,n,r){s(e,t,(e=>e.map((e=>e.hash===n?{...e,status:r}:e))))}(e,t,i,0===n||"reverted"===n?"failed":"confirmed")}));return o.set(i,u),await u})))}function s(e,n,o){var a,s;t=st(),t[e]=null!=(a=t[e])?a:{};let c=0;const u=o(null!=(s=t[e][n])?s:[]).filter((({status:e})=>"pending"===e||c++<=10));t[e][n]=u.length>0?u:void 0,localStorage.setItem(it,JSON.stringify(t)),r.forEach((e=>e())),i(e,n)}return{addTransaction:function(e,t,n){const r=function(e){const t=[];return ut.test(e.hash)||t.push("Invalid transaction hash"),"string"!==typeof e.description&&t.push("Transaction must have a description"),"undefined"!==typeof e.confirmations&&(!Number.isInteger(e.confirmations)||e.confirmations<1)&&t.push("Transaction confirmations must be a positiver integer"),t}(n);if(r.length>0)throw new Error(["Unable to add transaction",...r].join("\n"));s(e,t,(e=>[{...n,status:"pending"},...e.filter((({hash:e})=>e!==n.hash))]))},clearTransactions:function(e,t){s(e,t,(()=>[]))},getTransactions:a,onChange:function(e){return r.add(e),()=>{r.delete(e)}},setProvider:function(e){n=e},waitForPendingTransactions:i}}var dt=(0,d.createContext)(null);function ft({children:e}){const t=(0,w.t_)(),{address:n}=(0,w.mA)(),r=at(),[o]=(0,d.useState)((()=>null!=ct?ct:ct=lt({provider:t})));return(0,d.useEffect)((()=>{o.setProvider(t)}),[o,t]),(0,d.useEffect)((()=>{n&&r&&o.waitForPendingTransactions(n,r)}),[o,n,r]),d.createElement(dt.Provider,{value:o},e)}function ht(){const e=(0,d.useContext)(dt);if(!e)throw new Error("Transaction hooks must be used within RainbowKitProvider");return e}function pt(){const e=ht(),{address:t}=(0,w.mA)(),n=at(),[r,o]=(0,d.useState)((()=>e&&t&&n?e.getTransactions(t,n):[]));return(0,d.useEffect)((()=>{if(e&&t&&n)return o(e.getTransactions(t,n)),e.onChange((()=>{o(e.getTransactions(t,n))}))}),[e,t,n]),r}var mt=e=>"function"===typeof e?e():e;function bt(e,t={}){return Object.entries(function(e,{extends:t}={}){const n={...ce(pe,mt(e))};if(!t)return n;const r=ce(pe,mt(t));return Object.fromEntries(Object.entries(n).filter((([e,t])=>t!==r[e])))}(e,t)).map((([e,t])=>`${e}:${t.replace(/[:;{}]/g,"")};`)).join("")}var gt=()=>{const[e,t]=(0,d.useState)({height:void 0,width:void 0});return(0,d.useEffect)((()=>{function e(){t({height:window.innerHeight,width:window.innerWidth})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)}),[]),e},yt={appName:void 0,disclaimer:void 0,learnMoreUrl:"https://learn.rainbow.me/understanding-web3?utm_source=rainbowkit&utm_campaign=learnmore"},vt=(0,d.createContext)(yt),wt=(0,d.createContext)(!1),Et="compact",At="wide",xt=(0,d.createContext)(At),Pt=(0,d.createContext)(!1);function Ct(){return"undefined"!==typeof navigator&&/Version\/([0-9._]+).*Safari/.test(navigator.userAgent)}function jt(){var e;if("undefined"===typeof navigator)return"Browser";const t=navigator.userAgent.toLowerCase();return(null==(e=navigator.brave)?void 0:e.isBrave)?"Brave":t.indexOf("edg/")>-1?"Edge":t.indexOf("op")>-1?"Opera":"undefined"!==typeof document&&""!==getComputedStyle(document.body).getPropertyValue("--arc-palette-focus")?"Arc":t.indexOf("chrome")>-1?"Chrome":t.indexOf("firefox")>-1?"Firefox":Ct()?"Safari":"Browser"}var It=e=>{var t,n,r,o,a,i,s,c,u,l,d,f;const h=jt();return null!=(f={Arc:null==(t=null==e?void 0:e.downloadUrls)?void 0:t.chrome,Brave:null==(n=null==e?void 0:e.downloadUrls)?void 0:n.chrome,Chrome:null==(r=null==e?void 0:e.downloadUrls)?void 0:r.chrome,Edge:(null==(o=null==e?void 0:e.downloadUrls)?void 0:o.edge)||(null==(a=null==e?void 0:e.downloadUrls)?void 0:a.chrome),Firefox:null==(i=null==e?void 0:e.downloadUrls)?void 0:i.firefox,Opera:(null==(s=null==e?void 0:e.downloadUrls)?void 0:s.opera)||(null==(c=null==e?void 0:e.downloadUrls)?void 0:c.chrome),Safari:null==(u=null==e?void 0:e.downloadUrls)?void 0:u.safari,Browser:null==(l=null==e?void 0:e.downloadUrls)?void 0:l.browserExtension}[h])?f:null==(d=null==e?void 0:e.downloadUrls)?void 0:d.browserExtension},Ot=e=>{var t,n,r,o;return null!=(o=Ae()?null==(t=null==e?void 0:e.downloadUrls)?void 0:t.ios:null==(n=null==e?void 0:e.downloadUrls)?void 0:n.android)?o:null==(r=null==e?void 0:e.downloadUrls)?void 0:r.mobile},Tt="rk-recent";function St(){return"undefined"!==typeof localStorage?function(e){try{const t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch(pr){return[]}}(localStorage.getItem(Tt)):[]}function Bt(e){const t=(n=[e,...St()],[...new Set(n)]);var n;localStorage.setItem(Tt,JSON.stringify(t))}function kt(){const e=tt(),t=(0,d.useContext)(Xe).initialChainId,{connectAsync:n,connectors:r}=(0,w.$4)();async function o(r,o){var a,i,s;const c=await o.getChainId(),u=await n({chainId:null!=(s=null!=t?t:null==(a=e.find((({id:e})=>e===c)))?void 0:a.id)?s:null==(i=e[0])?void 0:i.id,connector:o});return u&&Bt(r),u}async function a(e,t){try{return await o(e,t)}catch(pr){if(!("UserRejectedRequestError"===pr.name||"Connection request reset. Please try again"===pr.message))throw pr}}const i=function(e){const t=[];for(const n of e)t.push(...n);return t}(r.map((e=>{var t;return null!=(t=e._wallets)?t:[]}))).sort(((e,t)=>e.index-t.index)),s=function(e,t){const n={};return e.forEach((e=>{const r=t(e);r&&(n[r]=e)})),n}(i,(e=>e.id)),c=St().map((e=>s[e])).filter(Le).slice(0,3),u=[...c,...i.filter((e=>!c.includes(e)))],l=[];return u.forEach((e=>{var t;if(!e)return;const n=c.includes(e);l.push({...e,connect:()=>e.connector.showQrModal?a(e.id,e.connector):o(e.id,e.connector),extensionDownloadUrl:It(e),groupName:e.groupName,mobileDownloadUrl:Ot(e),onConnecting:t=>e.connector.on("message",(({type:e})=>"connecting"===e?t():void 0)),ready:(null==(t=e.installed)||t)&&e.connector.ready,recent:n,showWalletConnectModal:e.walletConnectModalConnector?()=>a(e.id,e.walletConnectModalConnector):void 0})})),l}var _t=async()=>(await n.e(794).then(n.bind(n,20794))).default,Nt=()=>d.createElement(Be,{background:"#d0d5de",borderRadius:"10",height:"48",src:_t,width:"48"}),Mt=async()=>(await n.e(3200).then(n.bind(n,26936))).default,Rt=()=>d.createElement(Be,{background:"#d0d5de",borderRadius:"10",height:"48",src:Mt,width:"48"}),Ft=d.forwardRef((({as:e="div",children:t,className:n,color:r,display:o,font:a="body",id:i,size:s="16",style:c,tabIndex:u,textAlign:l="inherit",weight:f="regular"},h)=>d.createElement(Ce,{as:e,className:n,color:r,display:o,fontFamily:a,fontSize:s,fontWeight:f,id:i,ref:h,style:c,tabIndex:u,textAlign:l},t)));Ft.displayName="Text";var Ut={large:{fontSize:"16",paddingX:"24",paddingY:"10"},medium:{fontSize:"14",height:"28",paddingX:"12",paddingY:"4"},small:{fontSize:"14",paddingX:"10",paddingY:"5"}};function Lt({disabled:e=!1,href:t,label:n,onClick:r,rel:o="noreferrer noopener",size:a="medium",target:i="_blank",testId:s,type:c="primary"}){const u="primary"===c,l="large"!==a,f=xe(),h=e?"actionButtonSecondaryBackground":u?"accentColor":l?"actionButtonSecondaryBackground":null,{fontSize:p,height:m,paddingX:b,paddingY:g}=Ut[a],y=!f||!l;return d.createElement(Ce,{...t?e?{}:{as:"a",href:t,rel:o,target:i}:{as:"button",type:"button"},onClick:e?void 0:r,...y?{borderColor:!f||l||u?"actionButtonBorder":"actionButtonBorderMobile",borderStyle:"solid",borderWidth:"1"}:{},borderRadius:"actionButton",className:!e&&ge({active:"shrinkSm",hover:"grow"}),display:"block",paddingX:b,paddingY:g,style:{willChange:"transform"},testId:s,textAlign:"center",transition:"transform",...h?{background:h}:{},...m?{height:m}:{}},d.createElement(Ft,{color:e?"modalTextSecondary":u?"accentColorForeground":"accentColor",size:p,weight:"bold"},n))}var Dt=()=>xe()?d.createElement("svg",{"aria-hidden":!0,fill:"none",height:"11.5",viewBox:"0 0 11.5 11.5",width:"11.5",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M2.13388 0.366117C1.64573 -0.122039 0.854272 -0.122039 0.366117 0.366117C-0.122039 0.854272 -0.122039 1.64573 0.366117 2.13388L3.98223 5.75L0.366117 9.36612C-0.122039 9.85427 -0.122039 10.6457 0.366117 11.1339C0.854272 11.622 1.64573 11.622 2.13388 11.1339L5.75 7.51777L9.36612 11.1339C9.85427 11.622 10.6457 11.622 11.1339 11.1339C11.622 10.6457 11.622 9.85427 11.1339 9.36612L7.51777 5.75L11.1339 2.13388C11.622 1.64573 11.622 0.854272 11.1339 0.366117C10.6457 -0.122039 9.85427 -0.122039 9.36612 0.366117L5.75 3.98223L2.13388 0.366117Z",fill:"currentColor"})):d.createElement("svg",{"aria-hidden":!0,fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L3.58579 5L0.292893 8.29289C-0.0976311 8.68342 -0.0976311 9.31658 0.292893 9.70711C0.683417 10.0976 1.31658 10.0976 1.70711 9.70711L5 6.41421L8.29289 9.70711C8.68342 10.0976 9.31658 10.0976 9.70711 9.70711C10.0976 9.31658 10.0976 8.68342 9.70711 8.29289L6.41421 5L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L5 3.58579L1.70711 0.292893Z",fill:"currentColor"})),qt=({"aria-label":e="Close",onClose:t})=>{const n=xe();return d.createElement(Ce,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:ge({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},d.createElement(Dt,null))},Ht=async()=>(await n.e(2898).then(n.bind(n,92898))).default;function zt({onClose:e}){const[{status:t,...n},r]=d.useState({status:"idle"}),o=function(){var e;const{adapter:t}=null!=(e=(0,d.useContext)(ye))?e:{};if(!t)throw new Error("No authentication adapter found");return t}(),a=(0,d.useCallback)((async()=>{try{const e=await o.getNonce();r((t=>({...t,nonce:e})))}catch(e){r((e=>({...e,errorMessage:"Error preparing message, please retry!",status:"idle"})))}}),[o]),i=(0,d.useRef)(!1);d.useEffect((()=>{i.current||(i.current=!0,a())}),[a]);const s=xe(),{address:c}=(0,w.mA)(),{chain:u}=(0,w.LN)(),{signMessageAsync:l}=(0,w.QW)(),{disconnect:f}=(0,w.qL)(),h=()=>f();return d.createElement(Ce,{position:"relative"},d.createElement(Ce,{display:"flex",paddingRight:"16",paddingTop:"16",position:"absolute",right:"0"},d.createElement(qt,{onClose:e})),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:s?"32":"24",padding:"24",paddingX:"18",style:{paddingTop:s?"60px":"36px"}},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:s?"6":"4",style:{maxWidth:s?320:280}},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:s?"32":"16"},d.createElement(Be,{height:40,src:Ht,width:40}),d.createElement(Ft,{color:"modalText",size:s?"20":"18",textAlign:"center",weight:"heavy"},"Verify your account")),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:s?"16":"12"},d.createElement(Ft,{color:"modalTextSecondary",size:s?"16":"14",textAlign:"center"},"To finish connecting, you must sign a message in your wallet to verify that you are the owner of this account"),"idle"===t&&n.errorMessage?d.createElement(Ft,{color:"error",size:s?"16":"14",textAlign:"center",weight:"bold"},n.errorMessage):null)),d.createElement(Ce,{alignItems:s?void 0:"center",display:"flex",flexDirection:"column",gap:"8",width:"full"},d.createElement(Lt,{disabled:!n.nonce||"signing"===t||"verifying"===t,label:n.nonce?"signing"===t?"Waiting for signature...":"verifying"===t?"Verifying signature...":"Send message":"Preparing message...",onClick:async()=>{try{const t=null==u?void 0:u.id,{nonce:a}=n;if(!c||!t||!a)return;r((e=>({...e,errorMessage:void 0,status:"signing"})));const i=o.createMessage({address:c,chainId:t,nonce:a});let s;try{s=await l({message:o.getMessageBody({message:i})})}catch(e){return e instanceof ue.ab?r((e=>({...e,status:"idle"}))):r((e=>({...e,errorMessage:"Error signing message, please retry!",status:"idle"})))}r((e=>({...e,status:"verifying"})));try{if(await o.verify({message:i,signature:s}))return;throw new Error}catch(e){return r((e=>({...e,errorMessage:"Error verifying signature, please retry!",status:"idle"})))}}catch(e){r({errorMessage:"Oops, something went wrong!",status:"idle"})}},size:s?"large":"medium",testId:"auth-message-button"}),s?d.createElement(Lt,{label:"Cancel",onClick:h,size:"large",type:"secondary"}):d.createElement(Ce,{as:"button",borderRadius:"full",className:ge({active:"shrink",hover:"grow"}),display:"block",onClick:h,paddingX:"10",paddingY:"5",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},d.createElement(Ft,{color:"closeButton",size:s?"16":"14",weight:"bold"},"Cancel")))))}function Gt(){const e=tt(),t=kt(),n="unauthenticated"===ve(),r=(0,d.useCallback)((()=>{Te(...t.map((e=>e.iconUrl)),...e.map((e=>e.iconUrl)).filter(Le)),xe()||(Te(_t),Te(Mt)),n&&Te(Ht)}),[t,e,n]);(0,d.useEffect)((()=>{r()}),[r])}var $t="WALLETCONNECT_DEEPLINK_CHOICE";function Wt(){localStorage.removeItem($t)}var Kt=(0,d.createContext)(void 0),Qt="data-rk",Vt=e=>({[Qt]:e||""}),Jt=l();function Yt({appInfo:e,avatar:t,chains:n,children:r,coolMode:o=!1,id:a,initialChain:i,modalSize:s=At,showRecentTransactions:c=!1,theme:u=Jt}){if(Gt(),(0,w.mA)({onDisconnect:Wt}),"function"===typeof u)throw new Error('A theme function was provided to the "theme" prop instead of a theme object. You must execute this function to get the resulting theme object.');const l=(e=>{if(e&&!/^[a-zA-Z0-9_]+$/.test(e))throw new Error(`Invalid ID: ${e}`);return e?`[data-rk="${e}"]`:"[data-rk]"})(a),f={...yt,...e},h=null!=t?t:Me,{width:p}=gt(),m=p&&p<768;return d.createElement(et,{chains:n,initialChain:i},d.createElement(wt.Provider,{value:o},d.createElement(xt.Provider,{value:m?Et:s},d.createElement(Pt.Provider,{value:c},d.createElement(ft,null,d.createElement(Re.Provider,{value:h},d.createElement(vt.Provider,{value:f},d.createElement(Kt.Provider,{value:a},d.createElement(ur,null,u?d.createElement("div",{...Vt(a)},d.createElement("style",{dangerouslySetInnerHTML:{__html:[`${l}{${bt("lightMode"in u?u.lightMode:u)}}`,"darkMode"in u?`@media(prefers-color-scheme:dark){${l}{${bt(u.darkMode,{extends:u.lightMode})}}}`:null].join("")}}),r):r)))))))))}var Zt=(e,t)=>{const n=e.querySelectorAll("button:not(:disabled), a[href]");0!==n.length&&n["end"===t?n.length-1:0].focus()};function Xt(e){const t=(0,d.useRef)(null);return(0,d.useEffect)((()=>{const e=document.activeElement;return()=>{var t;null==(t=e.focus)||t.call(e)}}),[]),(0,d.useEffect)((()=>{if(t.current){const e=t.current.querySelector("[data-auto-focus]");e?e.focus():t.current.focus()}}),[t]),d.createElement(d.Fragment,null,d.createElement("div",{onFocus:(0,d.useCallback)((()=>t.current&&Zt(t.current,"end")),[]),tabIndex:0}),d.createElement("div",{ref:t,style:{outline:"none"},tabIndex:-1,...e}),d.createElement("div",{onFocus:(0,d.useCallback)((()=>t.current&&Zt(t.current,"start")),[]),tabIndex:0}))}var en=e=>e.stopPropagation();function tn({children:e,onClose:t,open:n,titleId:r}){(0,d.useEffect)((()=>{const e=e=>n&&"Escape"===e.key&&t();return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n,t]);const[o,a]=(0,d.useState)(!0);(0,d.useEffect)((()=>{a("hidden"!==getComputedStyle(window.document.body).overflow)}),[]);const i=(0,d.useCallback)((()=>t()),[t]),s=(()=>{const e=(0,d.useContext)(Kt);return Vt(e)})(),c=xe();return d.createElement(d.Fragment,null,n?(0,x.createPortal)(d.createElement(ae,{enabled:o},d.createElement(Ce,{...s},d.createElement(Ce,{...s,alignItems:c?"flex-end":"center","aria-labelledby":r,"aria-modal":!0,className:"_9pm4ki3 ju367v9b ju367vax ju367va ju367v2l ju367v8l",onClick:i,position:"fixed",role:"dialog"},d.createElement(Xt,{className:"_9pm4ki5 ju367va ju367v10 ju367v8m",onClick:en,role:"document"},e)))),document.body):null)}var nn="_1ckjpok1 ju367vb0 ju367vdl ju367vp ju367vt ju367vv ju367vef ju367va ju367v10 ju367v67 ju367v8m",rn="_1ckjpok6 ju367vq";function on({bottomSheetOnMobile:e=!1,children:t,marginTop:n,padding:r="16",wide:o=!1}){const a=xe(),i=(0,d.useContext)(xt)===Et;return d.createElement(Ce,{marginTop:n},d.createElement(Ce,{className:[o?a?"_1ckjpok2 _1ckjpok1 ju367vb0 ju367vdl ju367vp ju367vt ju367vv ju367vef ju367va ju367v10 ju367v67 ju367v8m":i?"_1ckjpok4 _1ckjpok1 ju367vb0 ju367vdl ju367vp ju367vt ju367vv ju367vef ju367va ju367v10 ju367v67 ju367v8m":"_1ckjpok3 _1ckjpok1 ju367vb0 ju367vdl ju367vp ju367vt ju367vv ju367vef ju367va ju367v10 ju367v67 ju367v8m":nn,a?rn:null,a&&e?"_1ckjpok7":null].join(" ")},d.createElement(Ce,{padding:r},t)))}var an=["k","m","b","t"];function sn(e,t=1){return e.toString().replace(new RegExp(`(.+\\.\\d{${t}})\\d+`),"$1").replace(/(\.[1-9]*)0+$/,"$1").replace(/\.$/,"")}function cn(e){if(e<1)return sn(e,3);if(e<100)return sn(e,2);if(e<1e4)return(new Intl.NumberFormat).format(parseFloat(sn(e,1)));let t=String(e);for(let n=an.length-1;n>=0;n--){const r=10**(3*(n+1));if(r<=e){t=sn(e=10*e/r/10,1)+an[n];break}}return t}function un(e){return e.length<8?e:`${e.substring(0,4)}...${e.substring(e.length-4)}`}function ln(e){const t=e.split("."),n=t.pop();return t.join(".").length>24?`${t.join(".").substring(0,24)}...`:`${t.join(".")}.${n}`}var dn=()=>d.createElement("svg",{fill:"none",height:"13",viewBox:"0 0 13 13",width:"13",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M4.94568 12.2646C5.41052 12.2646 5.77283 12.0869 6.01892 11.7109L12.39 1.96973C12.5677 1.69629 12.6429 1.44336 12.6429 1.2041C12.6429 0.561523 12.1644 0.0966797 11.5082 0.0966797C11.057 0.0966797 10.7767 0.260742 10.5033 0.691406L4.9115 9.50977L2.07458 5.98926C1.82166 5.68848 1.54822 5.55176 1.16541 5.55176C0.502319 5.55176 0.0238037 6.02344 0.0238037 6.66602C0.0238037 6.95312 0.112671 7.20605 0.358765 7.48633L3.88611 11.7588C4.18005 12.1074 4.50818 12.2646 4.94568 12.2646Z",fill:"currentColor"})),fn=()=>d.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 17 16",width:"17",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027ZM3.23376 10.5391C2.68689 10.5391 2.39294 10.2656 2.39294 9.68457V3.06055C2.39294 2.47949 2.68689 2.21289 3.23376 2.21289H9.8783C10.4252 2.21289 10.7191 2.47949 10.7191 3.06055V3.84668H6.59705C5.03845 3.84668 4.18396 4.69434 4.18396 6.24609V10.5391H3.23376ZM6.78845 13.9365C6.24158 13.9365 5.94763 13.6699 5.94763 13.0889V6.45801C5.94763 5.87695 6.24158 5.61035 6.78845 5.61035H13.433C13.9799 5.61035 14.2738 5.87695 14.2738 6.45801V13.0889C14.2738 13.6699 13.9799 13.9365 13.433 13.9365H6.78845Z",fill:"currentColor"})),hn=()=>d.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 18 16",width:"18",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M2.67834 15.5908H9.99963C11.5514 15.5908 12.399 14.7432 12.399 13.1777V10.2656H10.6354V12.9863C10.6354 13.5332 10.3688 13.8271 9.78772 13.8271H2.89026C2.3092 13.8271 2.0426 13.5332 2.0426 12.9863V3.15625C2.0426 2.60254 2.3092 2.30859 2.89026 2.30859H9.78772C10.3688 2.30859 10.6354 2.60254 10.6354 3.15625V5.89746H12.399V2.95801C12.399 1.39941 11.5514 0.544922 9.99963 0.544922H2.67834C1.12659 0.544922 0.278931 1.39941 0.278931 2.95801V13.1777C0.278931 14.7432 1.12659 15.5908 2.67834 15.5908ZM7.43616 8.85059H14.0875L15.0924 8.78906L14.566 9.14453L13.6842 9.96484C13.5406 10.1016 13.4586 10.2861 13.4586 10.4844C13.4586 10.8398 13.7321 11.168 14.1217 11.168C14.3199 11.168 14.4635 11.0928 14.6002 10.9561L16.7809 8.68652C16.986 8.48145 17.0543 8.27637 17.0543 8.06445C17.0543 7.85254 16.986 7.64746 16.7809 7.43555L14.6002 5.17285C14.4635 5.03613 14.3199 4.9541 14.1217 4.9541C13.7321 4.9541 13.4586 5.27539 13.4586 5.6377C13.4586 5.83594 13.5406 6.02734 13.6842 6.15723L14.566 6.98438L15.0924 7.33984L14.0875 7.27148H7.43616C7.01917 7.27148 6.65686 7.62012 6.65686 8.06445C6.65686 8.50195 7.01917 8.85059 7.43616 8.85059Z",fill:"currentColor"}));var pn=e=>{var t,n;return null==(n=null==(t=null==e?void 0:e.blockExplorers)?void 0:t.default)?void 0:n.url},mn=()=>d.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM12.7158 12.1416C13.2432 12.1416 13.5684 11.7549 13.5684 11.1836V7.19336C13.5684 6.44629 13.1377 6.05957 12.417 6.05957H8.40918C7.8291 6.05957 7.45117 6.38477 7.45117 6.91211C7.45117 7.43945 7.8291 7.77344 8.40918 7.77344H9.69238L10.7207 7.63281L9.53418 8.67871L6.73047 11.4912C6.53711 11.6758 6.41406 11.9395 6.41406 12.2031C6.41406 12.7832 6.85352 13.1699 7.39844 13.1699C7.68848 13.1699 7.92578 13.0732 8.1543 12.8623L10.9316 10.0762L11.9775 8.89844L11.8545 9.98828V11.1836C11.8545 11.7725 12.1885 12.1416 12.7158 12.1416Z",fill:"currentColor"})),bn=()=>d.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM7.29297 13.3018C7.58301 13.3018 7.81152 13.2139 7.99609 13.0205L10 11.0166L12.0127 13.0205C12.1973 13.2051 12.4258 13.3018 12.707 13.3018C13.2432 13.3018 13.6562 12.8887 13.6562 12.3525C13.6562 12.0977 13.5508 11.8691 13.3662 11.6934L11.3535 9.67188L13.375 7.6416C13.5596 7.44824 13.6562 7.22852 13.6562 6.98242C13.6562 6.44629 13.2432 6.0332 12.7158 6.0332C12.4346 6.0332 12.2148 6.12109 12.0215 6.31445L10 8.32715L7.9873 6.32324C7.80273 6.12988 7.58301 6.04199 7.29297 6.04199C6.76562 6.04199 6.35254 6.45508 6.35254 6.99121C6.35254 7.2373 6.44922 7.46582 6.63379 7.6416L8.65527 9.67188L6.63379 11.6934C6.44922 11.8691 6.35254 12.1064 6.35254 12.3525C6.35254 12.8887 6.76562 13.3018 7.29297 13.3018Z",fill:"currentColor"})),gn=()=>d.createElement("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M10 19.4443C15.0977 19.4443 19.2812 15.252 19.2812 10.1543C19.2812 5.06543 15.0889 0.873047 10 0.873047C4.90234 0.873047 0.71875 5.06543 0.71875 10.1543C0.71875 15.252 4.91113 19.4443 10 19.4443ZM10 17.1328C6.1416 17.1328 3.03906 14.0215 3.03906 10.1543C3.03906 6.2959 6.13281 3.18457 10 3.18457C13.8584 3.18457 16.9697 6.2959 16.9697 10.1543C16.9785 14.0215 13.8672 17.1328 10 17.1328ZM9.07715 14.3379C9.4375 14.3379 9.7627 14.1533 9.97363 13.8369L13.7441 8.00977C13.8848 7.79883 13.9814 7.5791 13.9814 7.36816C13.9814 6.84961 13.5244 6.48926 13.0322 6.48926C12.707 6.48926 12.4258 6.66504 12.2148 7.0166L9.05957 12.0967L7.5918 10.2949C7.37207 10.0225 7.13477 9.9082 6.84473 9.9082C6.33496 9.9082 5.92188 10.3125 5.92188 10.8223C5.92188 11.0684 6.00098 11.2793 6.18555 11.5078L8.1543 13.8545C8.40918 14.1709 8.70801 14.3379 9.07715 14.3379Z",fill:"currentColor"}));function yn({tx:e}){const t=xe(),n=(e=>{switch(e){case"pending":default:return ke;case"confirmed":return gn;case"failed":return bn}})(e.status),r="failed"===e.status?"error":"accentColor",{chain:o}=(0,w.LN)(),a="confirmed"===e.status?"Confirmed":"failed"===e.status?"Failed":"Pending",i=pn(o);return d.createElement(d.Fragment,null,d.createElement(Ce,{...i?{as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:ge({active:"shrink"}),href:`${i}/tx/${e.hash}`,rel:"noreferrer noopener",target:"_blank",transition:"default"}:{},color:"modalText",display:"flex",flexDirection:"row",justifyContent:"space-between",padding:"8",width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:t?"16":"14"},d.createElement(Ce,{color:r},d.createElement(n,null)),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:t?"3":"1"},d.createElement(Ce,null,d.createElement(Ft,{color:"modalText",font:"body",size:t?"16":"14",weight:"bold"},null==e?void 0:e.description)),d.createElement(Ce,null,d.createElement(Ft,{color:"pending"===e.status?"modalTextSecondary":r,font:"body",size:"14",weight:t?"medium":"regular"},a)))),i&&d.createElement(Ce,{alignItems:"center",color:"modalTextDim",display:"flex"},d.createElement(mn,null))))}function vn({address:e}){const t=pt(),n=function(){const e=ht(),{address:t}=(0,w.mA)(),n=at();return(0,d.useCallback)((()=>{if(!t||!n)throw new Error("No address or chain ID found");e.clearTransactions(t,n)}),[e,t,n])}(),{chain:r}=(0,w.LN)(),o=pn(r),a=t.slice(0,3),i=a.length>0,s=xe(),{appName:c}=(0,d.useContext)(vt);return d.createElement(d.Fragment,null,d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"10",paddingBottom:"2",paddingTop:"16",paddingX:s?"8":"18"},i&&d.createElement(Ce,{paddingBottom:s?"4":"0",paddingTop:"8",paddingX:s?"12":"6"},d.createElement(Ce,{display:"flex",justifyContent:"space-between"},d.createElement(Ft,{color:"modalTextSecondary",size:s?"16":"14",weight:"bold"},"Recent Transactions"),d.createElement(Ce,{style:{marginBottom:-6,marginLeft:-10,marginRight:-10,marginTop:-6}},d.createElement(Ce,{as:"button",background:{hover:"profileForeground"},borderRadius:"actionButton",className:ge({active:"shrink"}),onClick:n,paddingX:s?"8":"12",paddingY:s?"4":"5",transition:"default",type:"button"},d.createElement(Ft,{color:"modalTextSecondary",size:s?"16":"14",weight:"bold"},"Clear All"))))),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},i?a.map((e=>d.createElement(yn,{key:e.hash,tx:e}))):d.createElement(d.Fragment,null,d.createElement(Ce,{padding:s?"12":"8"},d.createElement(Ft,{color:"modalTextDim",size:s?"16":"14",weight:s?"medium":"bold"},null!=c?c:"Your"," transactions will appear here...")),s&&d.createElement(Ce,{background:"generalBorderDim",height:"1",marginX:"12",marginY:"8"})))),o&&d.createElement(Ce,{paddingBottom:"18",paddingX:s?"8":"18"},d.createElement(Ce,{alignItems:"center",as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:ge({active:"shrink"}),color:"modalTextDim",display:"flex",flexDirection:"row",href:`${o}/address/${e}`,justifyContent:"space-between",paddingX:"8",paddingY:"12",rel:"noreferrer noopener",style:{willChange:"transform"},target:"_blank",transition:"default",width:"full",...s?{paddingLeft:"12"}:{}},d.createElement(Ft,{color:"modalText",font:"body",size:s?"16":"14",weight:s?"semibold":"bold"},"View more on Explorer"),d.createElement(mn,null))))}function wn({action:e,icon:t,label:n,testId:r,url:o}){const a=xe();return d.createElement(Ce,{...o?{as:"a",href:o,rel:"noreferrer noopener",target:"_blank"}:{as:"button",type:"button"},background:{base:"profileAction",...a?{}:{hover:"profileActionHover"}},borderRadius:"menuButton",boxShadow:"profileDetailsAction",className:ge({active:"shrinkSm",hover:a?void 0:"grow"}),display:"flex",onClick:e,padding:a?"6":"8",style:{willChange:"transform"},testId:r,transition:"default",width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"1",justifyContent:"center",paddingTop:"2",width:"full"},d.createElement(Ce,{color:"modalText",height:"max"},t),d.createElement(Ce,null,d.createElement(Ft,{color:"modalText",size:a?"12":"13",weight:"bold"},n))))}function En({address:e,balanceData:t,ensAvatar:n,ensName:r,onClose:o,onDisconnect:a}){const i=(0,d.useContext)(Pt),[s,c]=(0,d.useState)(!1),u=(0,d.useCallback)((()=>{e&&(navigator.clipboard.writeText(e),c(!0))}),[e]);if((0,d.useEffect)((()=>{if(s){const e=setTimeout((()=>{c(!1)}),1500);return()=>clearTimeout(e)}}),[s]),!e)return null;const l=r?ln(r):un(e),f=null==t?void 0:t.formatted,h=f?cn(parseFloat(f)):void 0,p="rk_profile_title",m=xe();return d.createElement(d.Fragment,null,d.createElement(Ce,{display:"flex",flexDirection:"column"},d.createElement(Ce,{background:"profileForeground",padding:"16"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:m?"16":"12",justifyContent:"center",margin:"8",style:{textAlign:"center"}},d.createElement(Ce,{style:{position:"absolute",right:16,top:16,willChange:"transform"}},d.createElement(qt,{onClose:o}))," ",d.createElement(Ce,{marginTop:m?"24":"0"},d.createElement(Fe,{address:e,imageUrl:n,size:m?82:74})),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:m?"4":"0",textAlign:"center"},d.createElement(Ce,{textAlign:"center"},d.createElement(Ft,{as:"h2",color:"modalText",id:p,size:m?"20":"18",weight:"heavy"},l)),t&&d.createElement(Ce,{textAlign:"center"},d.createElement(Ft,{as:"h2",color:"modalTextSecondary",id:p,size:m?"16":"14",weight:"bold"},h," ",t.symbol)))),d.createElement(Ce,{display:"flex",flexDirection:"row",gap:"8",margin:"2",marginTop:"16"},d.createElement(wn,{action:u,icon:s?d.createElement(dn,null):d.createElement(fn,null),label:s?"Copied!":"Copy Address"}),d.createElement(wn,{action:a,icon:d.createElement(hn,null),label:"Disconnect",testId:"disconnect-button"}))),i&&d.createElement(d.Fragment,null,d.createElement(Ce,{background:"generalBorder",height:"1",marginTop:"-1"}),d.createElement(Ce,null,d.createElement(vn,{address:e})))))}function An({onClose:e,open:t}){const{address:n}=(0,w.mA)(),{data:r}=(0,w.KQ)({address:n}),o=ot(n),a=rt(o),{disconnect:i}=(0,w.qL)();if(!n)return null;return d.createElement(d.Fragment,null,n&&d.createElement(tn,{onClose:e,open:t,titleId:"rk_account_modal_title"},d.createElement(on,{bottomSheetOnMobile:!0,padding:"0"},d.createElement(En,{address:n,balanceData:r,ensAvatar:a,ensName:o,onClose:e,onDisconnect:i}))))}var xn=({size:e})=>d.createElement("svg",{fill:"none",height:e,viewBox:"0 0 28 28",width:e,xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M6.742 22.195h8.367c1.774 0 2.743-.968 2.743-2.758V16.11h-2.016v3.11c0 .625-.305.96-.969.96H6.984c-.664 0-.968-.335-.968-.96V7.984c0-.632.304-.968.968-.968h7.883c.664 0 .969.336.969.968v3.133h2.016v-3.36c0-1.78-.97-2.757-2.743-2.757H6.742C4.97 5 4 5.977 4 7.758v11.68c0 1.789.969 2.757 2.742 2.757Zm5.438-7.703h7.601l1.149-.07-.602.406-1.008.938a.816.816 0 0 0-.258.593c0 .407.313.782.758.782.227 0 .39-.086.547-.243l2.492-2.593c.235-.235.313-.47.313-.711 0-.242-.078-.477-.313-.719l-2.492-2.586c-.156-.156-.32-.25-.547-.25-.445 0-.758.367-.758.781 0 .227.094.446.258.594l1.008.945.602.407-1.149-.079H12.18a.904.904 0 0 0 0 1.805Z",fill:"currentColor"})),Pn=d.forwardRef((({children:e,currentlySelected:t=!1,onClick:n,testId:r,...o},a)=>{const i=xe();return d.createElement(Ce,{as:"button",borderRadius:"menuButton",disabled:t,display:"flex",onClick:n,ref:a,testId:r,type:"button"},d.createElement(Ce,{borderRadius:"menuButton",className:[i?"v9horb0":void 0,!t&&ge({active:"shrink"})],padding:i?"8":"6",transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",borderStyle:"solid",borderWidth:"1",boxShadow:"selectedOption",color:"accentColorForeground"}:{background:{hover:"menuItemBackground"},color:"modalText",transition:"default"},...o},e))}));function Cn({onClose:e,open:t}){var n;const{chain:r}=(0,w.LN)(),{chains:o,pendingChainId:a,reset:i,switchNetwork:s}=(0,w.g0)({onSettled:()=>{i(),e()}}),{disconnect:c}=(0,w.qL)(),u="rk_chain_modal_title",l=xe(),f=null!=(n=null==r?void 0:r.unsupported)&&n,h=l?"36":"28",{appName:p}=(0,d.useContext)(vt),m=tt();return r&&(null==r?void 0:r.id)?d.createElement(tn,{onClose:e,open:t,titleId:u},d.createElement(on,{bottomSheetOnMobile:!0},d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"14"},d.createElement(Ce,{display:"flex",flexDirection:"row",justifyContent:"space-between"},l&&d.createElement(Ce,{width:"30"}),d.createElement(Ce,{paddingBottom:"0",paddingLeft:"8",paddingTop:"4"},d.createElement(Ft,{as:"h1",color:"modalText",id:u,size:l?"20":"18",weight:"heavy"},"Switch Networks")),d.createElement(qt,{onClose:e})),f&&d.createElement(Ce,{marginX:"8",textAlign:l?"center":"left"},d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},"Wrong network detected, switch or disconnect to continue")),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4",padding:"2"},s?m.map((({iconBackground:e,iconUrl:t,id:n,name:i},c)=>{const u=o.find((e=>e.id===n));if(!u)return null;const f=u.id===(null==r?void 0:r.id),p=!f&&u.id===a;return d.createElement(d.Fragment,{key:u.id},d.createElement(Pn,{currentlySelected:f,onClick:f?void 0:()=>s(u.id),testId:`chain-option-${u.id}`},d.createElement(Ce,{fontFamily:"body",fontSize:"16",fontWeight:"bold"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:h},t&&d.createElement(Ce,{height:"full",marginRight:"8"},d.createElement(Be,{alt:null!=i?i:u.name,background:e,borderRadius:"full",height:h,src:t,width:h})),d.createElement("div",null,null!=i?i:u.name)),f&&d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},d.createElement(Ft,{color:"accentColorForeground",size:"14",weight:"bold"},"Connected"),d.createElement(Ce,{background:"connectionIndicator",borderColor:"selectedOptionBorder",borderRadius:"full",borderStyle:"solid",borderWidth:"1",height:"8",marginLeft:"8",width:"8"})),p&&d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},d.createElement(Ft,{color:"modalText",size:"14",weight:"bold"},"Confirm in Wallet"),d.createElement(Ce,{background:"standby",borderRadius:"full",height:"8",marginLeft:"8",width:"8"}))))),l&&cc(),testId:"chain-option-disconnect"},d.createElement(Ce,{color:"error",fontFamily:"body",fontSize:"16",fontWeight:"bold"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:h},d.createElement(Ce,{alignItems:"center",color:"error",height:h,justifyContent:"center",marginRight:"8"},d.createElement(xn,{size:Number(h)})),d.createElement("div",null,"Disconnect")))))))))):null}Pn.displayName="MenuButton";var jn=({children:e,href:t})=>d.createElement(Ce,{as:"a",color:"accentColor",href:t,rel:"noreferrer",target:"_blank"},e),In=({children:e})=>d.createElement(Ft,{color:"modalTextSecondary",size:"12",weight:"bold"},e);function On({compactModeEnabled:e=!1,getWallet:t}){const{disclaimer:n,learnMoreUrl:r}=(0,d.useContext)(vt);return d.createElement(d.Fragment,null,d.createElement(Ce,{alignItems:"center",color:"accentColor",display:"flex",flexDirection:"column",height:"full",justifyContent:"space-around"},d.createElement(Ce,{marginBottom:"10"},!e&&d.createElement(Ft,{color:"modalText",size:"23",weight:"heavy"},"NameSys")),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"32",justifyContent:"center",marginY:"20",style:{maxWidth:312}},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},d.createElement(Ce,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},d.createElement(Nt,null)),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},d.createElement(Ft,{color:"modalText",size:"16",weight:"bold"},"ENS Off-Chain Records Manager"),d.createElement(Ft,{color:"modalTextSecondary",size:"12",weight:"bold"},"Set your Records on Secure and Decentralised IPFS storage"))),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},d.createElement(Ce,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},d.createElement(Rt,null)),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},d.createElement(Ft,{color:"modalText",size:"16",weight:"bold"},"No More Gas Fees"),d.createElement(Ft,{color:"modalTextSecondary",size:"12",weight:"bold"},"Set your ENS Records for Free without worrying about Gas")))),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",margin:"10"},d.createElement(Lt,{label:"Get a Wallet",onClick:t}),d.createElement(Ce,{as:"a",className:ge({active:"shrink",hover:"grow"}),display:"block",href:r,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},d.createElement(Ft,{color:"accentColor",size:"14",weight:"bold"},"Learn More"))),n&&!e&&d.createElement(Ce,{marginBottom:"8",marginTop:"12",textAlign:"center"},d.createElement(n,{Link:jn,Text:In}))))}var Tn=()=>d.createElement("svg",{fill:"none",height:"17",viewBox:"0 0 11 17",width:"11",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M0.99707 8.6543C0.99707 9.08496 1.15527 9.44531 1.51562 9.79688L8.16016 16.3096C8.43262 16.5732 8.74902 16.7051 9.13574 16.7051C9.90918 16.7051 10.5508 16.0811 10.5508 15.3076C10.5508 14.9121 10.3838 14.5605 10.0938 14.2705L4.30176 8.64551L10.0938 3.0293C10.3838 2.74805 10.5508 2.3877 10.5508 2.00098C10.5508 1.23633 9.90918 0.603516 9.13574 0.603516C8.74902 0.603516 8.43262 0.735352 8.16016 0.999023L1.51562 7.51172C1.15527 7.85449 1.00586 8.21484 0.99707 8.6543Z",fill:"currentColor"})),Sn=()=>d.createElement("svg",{fill:"none",height:"12",viewBox:"0 0 8 12",width:"8",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M3.64258 7.99609C4.19336 7.99609 4.5625 7.73828 4.68555 7.24609C4.69141 7.21094 4.70312 7.16406 4.70898 7.13477C4.80859 6.60742 5.05469 6.35547 6.04492 5.76367C7.14648 5.10156 7.67969 4.3457 7.67969 3.24414C7.67969 1.39844 6.17383 0.255859 3.95898 0.255859C2.32422 0.255859 1.05859 0.894531 0.548828 1.86719C0.396484 2.14844 0.320312 2.44727 0.320312 2.74023C0.314453 3.37305 0.742188 3.79492 1.42188 3.79492C1.91406 3.79492 2.33594 3.54883 2.53516 3.11523C2.78711 2.47656 3.23242 2.21289 3.83594 2.21289C4.55664 2.21289 5.10742 2.65234 5.10742 3.29102C5.10742 3.9707 4.7793 4.29883 3.81836 4.87891C3.02148 5.36523 2.50586 5.92773 2.50586 6.76562V6.90039C2.50586 7.55664 2.96289 7.99609 3.64258 7.99609ZM3.67188 11.4473C4.42773 11.4473 5.04297 10.8672 5.04297 10.1406C5.04297 9.41406 4.42773 8.83984 3.67188 8.83984C2.91602 8.83984 2.30664 9.41406 2.30664 10.1406C2.30664 10.8672 2.91602 11.4473 3.67188 11.4473Z",fill:"currentColor"})),Bn=({"aria-label":e="Info",onClick:t})=>{const n=xe();return d.createElement(Ce,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:ge({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},d.createElement(Sn,null))},kn=e=>{const t=(0,d.useRef)(null),n=(0,d.useContext)(wt),r=Se(e);return(0,d.useEffect)((()=>{if(n&&t.current&&r)return function(e,t){_n++;const n=[15,20,25,35,45],r=35;let o=[],a=!1,i=0,s=0;const c=(()=>{const e="_rk_coolMode",t=document.getElementById(e);if(t)return t;const n=document.createElement("div");return n.setAttribute("id",e),n.setAttribute("style",["overflow:hidden","position:fixed","height:100%","top:0","left:0","right:0","bottom:0","pointer-events:none","z-index:2147483647"].join(";")),document.body.appendChild(n),n})();function u(){const e=n[Math.floor(Math.random()*n.length)],r=10*Math.random(),a=25*Math.random(),u=360*Math.random(),l=35*Math.random()*(Math.random()<=.5?-1:1),d=s-e/2,f=i-e/2,h=Math.random()<=.5?-1:1,p=document.createElement("div");p.innerHTML=``,p.setAttribute("style",["position:absolute","will-change:transform",`top:${d}px`,`left:${f}px`,`transform:rotate(${u}deg)`].join(";")),c.appendChild(p),o.push({direction:h,element:p,left:f,size:e,speedHorz:r,speedUp:a,spinSpeed:l,spinVal:u,top:d})}function l(){o.forEach((e=>{e.left=e.left-e.speedHorz*e.direction,e.top=e.top-e.speedUp,e.speedUp=Math.min(e.size,e.speedUp-1),e.spinVal=e.spinVal+e.spinSpeed,e.top>=Math.max(window.innerHeight,document.body.clientHeight)+e.size&&(o=o.filter((t=>t!==e)),e.element.remove()),e.element.setAttribute("style",["position:absolute","will-change:transform",`top:${e.top}px`,`left:${e.left}px`,`transform:rotate(${e.spinVal}deg)`].join(";"))}))}let d;function f(){a&&o.length{var t,n;"touches"in e?(i=null==(t=e.touches)?void 0:t[0].clientX,s=null==(n=e.touches)?void 0:n[0].clientY):(i=e.clientX,s=e.clientY)},y=e=>{g(e),a=!0},v=()=>{a=!1};return e.addEventListener(b,g,{passive:!1}),e.addEventListener(p,y),e.addEventListener(m,v),e.addEventListener("mouseleave",v),()=>{e.removeEventListener(b,g),e.removeEventListener(p,y),e.removeEventListener(m,v),e.removeEventListener("mouseleave",v);let t=setInterval((()=>{d&&0===o.length&&(cancelAnimationFrame(d),clearInterval(t),0===--_n&&c.remove())}),500)}}(t.current,r)}),[n,r]),t},_n=0;var Nn=({as:e="button",currentlySelected:t=!1,iconBackground:n,iconUrl:r,name:o,onClick:a,ready:i,recent:s,testId:c,...u})=>{const l=kn(r),[f,h]=(0,d.useState)(!1);return d.createElement(Ce,{display:"flex",flexDirection:"column",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),ref:l},d.createElement(Ce,{as:e,borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:t?void 0:["g5kl0l0",ge({active:"shrink"})],disabled:t,onClick:a,padding:"5",style:{willChange:"transform"},testId:c,transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",boxShadow:"selectedWallet"}:{background:{hover:"menuItemBackground"}},...u},d.createElement(Ce,{color:t?"accentColorForeground":"modalText",disabled:!i,fontFamily:"body",fontSize:"16",fontWeight:"bold",transition:"default"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"12"},d.createElement(Be,{background:n,...f?{}:{borderColor:"actionButtonBorder"},borderRadius:"6",height:"28",src:r,width:"28"}),d.createElement(Ce,null,d.createElement(Ce,{style:{marginTop:s?-2:void 0}},o),s&&d.createElement(Ft,{color:t?"accentColorForeground":"accentColor",size:"12",style:{lineHeight:1,marginTop:-1},weight:"bold"},"Recent"))))))};Nn.displayName="ModalSelection";var Mn=(e,t=1)=>{let n=e.replace("#","");3===n.length&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);return t>1&&t<=100&&(t/=100),`rgba(${parseInt(n.substring(0,2),16)},${parseInt(n.substring(2,4),16)},${parseInt(n.substring(4,6),16)},${t})`},Rn=e=>/^#([0-9a-f]{3}){1,2}$/i.test(e),Fn=async()=>(await n.e(8137).then(n.bind(n,68137))).default,Un=()=>Te(Fn),Ln=()=>d.createElement(Be,{background:"#e3a5e8",borderColor:"generalBorder",borderRadius:"10",height:"48",src:Fn,width:"48"}),Dn=async()=>(await n.e(1748).then(n.bind(n,31748))).default,qn=()=>d.createElement(Be,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:Dn,width:"48"}),Hn=async()=>(await n.e(5806).then(n.bind(n,75806))).default,zn=()=>Te(Hn),Gn=()=>d.createElement(Be,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:Hn,width:"48"});function $n({ecl:e="M",logoBackground:t,logoMargin:n=10,logoSize:r=50,logoUrl:o,size:a=200,uri:i}){const s=a-2*parseInt("20",10),c=(0,d.useMemo)((()=>{const t=[],n=((e,t)=>{const n=Array.prototype.slice.call(le.create(e,{errorCorrectionLevel:t}).modules.data,0),r=Math.sqrt(n.length);return n.reduce(((e,t,n)=>(n%r===0?e.push([t]):e[e.length-1].push(t))&&e),[])})(i,e),o=s/n.length;[{x:0,y:0},{x:1,y:0},{x:0,y:1}].forEach((({x:e,y:r})=>{const a=(n.length-7)*o*e,i=(n.length-7)*o*r;for(let n=0;n<3;n++)t.push(d.createElement("rect",{fill:n%2!==0?"white":"black",height:o*(7-2*n),key:`${n}-${e}-${r}`,rx:-5*(n-2)+(0===n?2:0),ry:-5*(n-2)+(0===n?2:0),width:o*(7-2*n),x:a+o*n,y:i+o*n}))}));const a=Math.floor((r+25)/o),c=n.length/2-a/2,u=n.length/2+a/2-1;return n.forEach(((e,r)=>{e.forEach(((e,a)=>{n[r][a]&&(r<7&&a<7||r>n.length-8&&a<7||r<7&&a>n.length-8||r>c&&rc&&a{switch(jt()){case"Arc":return(await n.e(6328).then(n.bind(n,76328))).default;case"Brave":return(await n.e(6551).then(n.bind(n,86551))).default;case"Chrome":return(await n.e(7682).then(n.bind(n,57682))).default;case"Edge":return(await n.e(934).then(n.bind(n,60934))).default;case"Firefox":return(await n.e(9223).then(n.bind(n,99223))).default;case"Opera":return(await n.e(9941).then(n.bind(n,89941))).default;case"Safari":return(await n.e(2604).then(n.bind(n,62604))).default;default:return(await n.e(2746).then(n.bind(n,92746))).default}};function Kn({getWalletDownload:e}){const t=kt().splice(0,5);return d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginTop:"18",width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"28",height:"full",width:"full"},null==t?void 0:t.filter((e=>{var t;return e.extensionDownloadUrl||e.qrCode&&(null==(t=e.downloadUrls)?void 0:t.qrCode)})).map((t=>{const{downloadUrls:n,iconBackground:r,iconUrl:o,id:a,name:i,qrCode:s}=t,c=(null==n?void 0:n.qrCode)&&s,u=!!t.extensionDownloadUrl,l=(null==n?void 0:n.qrCode)&&u;return d.createElement(Ce,{alignItems:"center",display:"flex",gap:"16",justifyContent:"space-between",key:t.id,width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},d.createElement(Be,{background:r,borderColor:"actionButtonBorder",borderRadius:"10",height:"48",src:o,width:"48"}),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"2"},d.createElement(Ft,{color:"modalText",size:"16",weight:"bold"},i),d.createElement(Ft,{color:"modalTextSecondary",size:"12",weight:"bold"},l?"Mobile Wallet and Extension":c?"Mobile Wallet":u?"Browser Extension":null))),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},d.createElement(Lt,{label:"GET",onClick:()=>e(a),type:"secondary"})))}))),d.createElement(Ce,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"column",gap:"8",justifyContent:"space-between",marginBottom:"4",paddingY:"8",style:{maxWidth:275,textAlign:"center"}},d.createElement(Ft,{color:"modalText",size:"14",weight:"bold"},"Not what you\u2019re looking for?"),d.createElement(Ft,{color:"modalTextSecondary",size:"12",weight:"bold"},"Select a wallet on the left to get started with a different wallet provider")))}var Qn="44";function Vn({changeWalletStep:e,compactModeEnabled:t,connectionError:n,onClose:r,qrCodeUri:o,reconnect:a,wallet:i}){var s;const{downloadUrls:c,iconBackground:u,iconUrl:l,name:f,qrCode:h,ready:p,showWalletConnectModal:m}=i,b=null==(s=i.desktop)?void 0:s.getUri,g=Ct(),y=!!i.extensionDownloadUrl,v=(null==c?void 0:c.qrCode)&&y,w=h&&o,E=m?{description:"Open WalletConnect modal",label:"OPEN",onClick:()=>{r(),m()}}:w?{description:`Get the ${f} app`,label:"GET",onClick:()=>e(v?"DOWNLOAD_OPTIONS":"DOWNLOAD")}:null,{width:A}=gt(),x=A&&A<768;return(0,d.useEffect)((()=>{Te(Wn)}),[]),d.createElement(Ce,{display:"flex",flexDirection:"column",height:"full",width:"full"},w?d.createElement(Ce,{alignItems:"center",display:"flex",height:"full",justifyContent:"center"},d.createElement($n,{logoBackground:u,logoSize:t?60:72,logoUrl:l,size:t?318:x?Math.max(280,Math.min(A-308,382)):382,uri:o})):d.createElement(Ce,{alignItems:"center",display:"flex",justifyContent:"center",style:{flexGrow:1}},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8"},d.createElement(Ce,{borderRadius:"10",height:Qn,overflow:"hidden"},d.createElement(Be,{height:Qn,src:l,width:Qn})),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"4",paddingX:"32",style:{textAlign:"center"}},d.createElement(Ft,{color:"modalText",size:"18",weight:"bold"},p?`Opening ${f}...`:y?`${f} is not installed`:`${f} is not available`),!p&&y?d.createElement(Ce,{paddingTop:"20"},d.createElement(Lt,{href:i.extensionDownloadUrl,label:"INSTALL",type:"secondary"})):null,p&&!w&&d.createElement(d.Fragment,null,d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},d.createElement(Ft,{color:"modalTextSecondary",size:"14",textAlign:"center",weight:"bold"},"Confirm connection in the extension")),d.createElement(Ce,{alignItems:"center",color:"modalText",display:"flex",flexDirection:"row",height:"32",marginTop:"8"},n?d.createElement(Lt,{label:"RETRY",onClick:b?async()=>{const e=await b();window.open(e,g?"_blank":"_self")}:()=>{a(i)}}):d.createElement(Ce,{color:"modalTextSecondary"},d.createElement(ke,null))))))),d.createElement(Ce,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"28",justifyContent:"space-between",marginTop:"12"},p&&E&&d.createElement(d.Fragment,null,d.createElement(Ft,{size:"14",weight:"bold",color:"modalText"},E.description),d.createElement(Lt,{label:E.label,onClick:E.onClick,type:"secondary"}))))}var Jn=({actionLabel:e,description:t,iconAccent:n,iconBackground:r,iconUrl:o,isCompact:a,onAction:i,title:s,url:c,variant:u})=>{const l="browser"===u,f=!l&&n&&((h=n)?[Mn(h,.2),Mn(h,.14),Mn(h,.1)]:null);var h;return d.createElement(Ce,{alignItems:"center",borderRadius:"13",display:"flex",justifyContent:"center",overflow:"hidden",paddingX:a?"18":"44",position:"relative",style:{flex:1,isolation:"isolate"},width:"full"},d.createElement(Ce,{borderColor:"actionButtonBorder",borderRadius:"13",borderStyle:"solid",borderWidth:"1",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0",zIndex:1}}),l&&d.createElement(Ce,{background:"downloadTopCardBackground",height:"full",position:"absolute",style:{zIndex:0},width:"full"},d.createElement(Ce,{display:"flex",flexDirection:"row",justifyContent:"space-between",style:{bottom:"0",filter:"blur(20px)",left:"0",position:"absolute",right:"0",top:"0",transform:"translate3d(0, 0, 0)"}},d.createElement(Ce,{style:{filter:"blur(100px)",marginLeft:-27,marginTop:-20,opacity:.6,transform:"translate3d(0, 0, 0)"}},d.createElement(Be,{borderRadius:"full",height:"200",src:o,width:"200"})),d.createElement(Ce,{style:{filter:"blur(100px)",marginRight:0,marginTop:105,opacity:.6,overflow:"auto",transform:"translate3d(0, 0, 0)"}},d.createElement(Be,{borderRadius:"full",height:"200",src:o,width:"200"})))),!l&&f&&d.createElement(Ce,{background:"downloadBottomCardBackground",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0"}},d.createElement(Ce,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${f[0]} 0%, ${f[1]} 25%, rgba(0,0,0,0) 100%)`,height:564,left:-215,top:-197,transform:"translate3d(0, 0, 0)",width:564}}),d.createElement(Ce,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${f[2]} 0%, rgba(0, 0, 0, 0) 100%)`,height:564,left:-1,top:-76,transform:"translate3d(0, 0, 0)",width:564}})),d.createElement(Ce,{alignItems:"flex-start",display:"flex",flexDirection:"row",gap:"24",height:"max",justifyContent:"center",style:{zIndex:1}},d.createElement(Ce,null,d.createElement(Be,{height:"60",src:o,width:"60",...r?{background:r,borderColor:"generalBorder",borderRadius:"10"}:null})),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4",style:{flex:1},width:"full"},d.createElement(Ft,{color:"modalText",size:"14",weight:"bold"},s),d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},t),d.createElement(Ce,{marginTop:"14",width:"max"},d.createElement(Lt,{href:c,label:e,onClick:i,size:"medium"})))))};function Yn({changeWalletStep:e,wallet:t}){const n=jt(),r="compact"===(0,d.useContext)(xt),{extension:o,extensionDownloadUrl:a,mobileDownloadUrl:i}=t;return(0,d.useEffect)((()=>{Un(),zn(),Te(Dn)}),[]),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",marginBottom:"8",marginTop:"4",width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8",height:"full",justifyContent:"center",width:"full"},a&&d.createElement(Jn,{actionLabel:`Add to ${n}`,description:"Access your wallet right from your favorite web browser",iconUrl:Wn,isCompact:r,onAction:()=>e((null==o?void 0:o.instructions)?"INSTRUCTIONS_EXTENSION":"CONNECT"),title:`${t.name} for ${n}`,url:a,variant:"browser"}),i&&d.createElement(Jn,{actionLabel:"Get the app",description:"Use the mobile wallet to explore the world of Ethereum",iconAccent:t.iconAccent,iconBackground:t.iconBackground,iconUrl:t.iconUrl,isCompact:r,onAction:()=>{e("DOWNLOAD")},title:`${t.name} for Mobile`,variant:"app"})))}function Zn({changeWalletStep:e,wallet:t}){const{downloadUrls:n,qrCode:r}=t;return(0,d.useEffect)((()=>{Un(),zn()}),[]),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",width:"full"},d.createElement(Ce,{style:{maxWidth:220,textAlign:"center"}},d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},"Scan with your phone to download on iOS or Android")),d.createElement(Ce,{height:"full"},(null==n?void 0:n.qrCode)?d.createElement($n,{logoSize:0,size:268,uri:n.qrCode}):null),d.createElement(Ce,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"34",justifyContent:"space-between",marginBottom:"12",paddingY:"8"},d.createElement(Lt,{label:"Continue",onClick:()=>e((null==r?void 0:r.instructions)?"INSTRUCTIONS_MOBILE":"CONNECT")})))}var Xn={create:()=>d.createElement(Ln,null),install:e=>d.createElement(Be,{background:e.iconBackground,borderColor:"generalBorder",borderRadius:"10",height:"48",src:e.iconUrl,width:"48"}),refresh:()=>d.createElement(qn,null),scan:()=>d.createElement(Gn,null)};function er({connectWallet:e,wallet:t}){var n,r,o,a;return d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},null==(r=null==(n=null==t?void 0:t.qrCode)?void 0:n.instructions)?void 0:r.steps.map(((e,n)=>{var r;return d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:n},d.createElement(Ce,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},null==(r=Xn[e.step])?void 0:r.call(Xn,t)),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},d.createElement(Ft,{color:"modalText",size:"16",weight:"bold"},e.title),d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},e.description)))}))),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},d.createElement(Lt,{label:"Connect",onClick:()=>e(t)}),d.createElement(Ce,{as:"a",className:ge({active:"shrink",hover:"grow"}),display:"block",href:null==(a=null==(o=null==t?void 0:t.qrCode)?void 0:o.instructions)?void 0:a.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},d.createElement(Ft,{color:"accentColor",size:"14",weight:"bold"},"Learn More"))))}function tr({wallet:e}){var t,n,r,o;return d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},null==(n=null==(t=null==e?void 0:e.extension)?void 0:t.instructions)?void 0:n.steps.map(((t,n)=>{var r;return d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:n},d.createElement(Ce,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},null==(r=Xn[t.step])?void 0:r.call(Xn,e)),d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},d.createElement(Ft,{color:"modalText",size:"16",weight:"bold"},t.title),d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},t.description)))}))),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},d.createElement(Lt,{label:"Refresh",onClick:window.location.reload.bind(window.location)}),d.createElement(Ce,{as:"a",className:ge({active:"shrink",hover:"grow"}),display:"block",href:null==(o=null==(r=null==e?void 0:e.extension)?void 0:r.instructions)?void 0:o.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},d.createElement(Ft,{color:"accentColor",size:"14",weight:"bold"},"Learn More"))))}function nr({onClose:e}){const t=Ct(),[n,r]=(0,d.useState)(),[o,a]=(0,d.useState)(),[i,s]=(0,d.useState)(),c=!!(null==o?void 0:o.qrCode)&&i,[u,l]=(0,d.useState)(!1),f=(0,d.useContext)(xt)===Et,{disclaimer:h}=(0,d.useContext)(vt),p=kt().filter((e=>e.ready||!!e.extensionDownloadUrl)).sort(((e,t)=>e.groupIndex-t.groupIndex)),m=function(e,t){const n={};return e.forEach((e=>{const r=t(e);r&&(n[r]||(n[r]=[]),n[r].push(e))})),n}(p,(e=>e.groupName)),b=e=>{var n,r,o;if(l(!1),e.ready){null==(r=null==(n=null==e?void 0:e.connect)?void 0:n.call(e))||r.catch((()=>{l(!0)}));const a=null==(o=e.desktop)?void 0:o.getUri;a&&setTimeout((async()=>{const e=await a();window.open(e,t?"_blank":"_self")}),0)}},g=e=>{var t;if(b(e),r(e.id),e.ready){let n=!1;null==(t=null==e?void 0:e.onConnecting)||t.call(e,(async()=>{var t,r;if(n)return;n=!0;const o=p.find((t=>e.id===t.id)),i=await(null==(t=null==o?void 0:o.qrCode)?void 0:t.getUri());s(i),setTimeout((()=>{a(o),w("CONNECT")}),i?0:50);const c=await(null==o?void 0:o.connector.getProvider()),u=null==(r=null==c?void 0:c.signer)?void 0:r.connection;if((null==u?void 0:u.on)&&(null==u?void 0:u.off)){const t=()=>{n(),g(e)},n=()=>{u.off("close",t),u.off("open",n)};u.on("close",t),u.on("open",n)}}))}else a(e),w((null==e?void 0:e.extensionDownloadUrl)?"DOWNLOAD_OPTIONS":"CONNECT")},y=e=>{var t;r(e);const n=p.find((t=>e===t.id)),o=null==(t=null==n?void 0:n.downloadUrls)?void 0:t.qrCode,i=!!(null==n?void 0:n.extensionDownloadUrl);a(n),w(o&&i?"DOWNLOAD_OPTIONS":o?"DOWNLOAD":"INSTRUCTIONS_EXTENSION")},v=()=>{r(void 0),a(void 0),s(void 0)},w=(e,t=!1)=>{t&&"GET"===e&&"GET"===E?v():t||"GET"!==e?t||"CONNECT"!==e||A("CONNECT"):A("GET"),P(e)},[E,A]=(0,d.useState)("NONE"),[x,P]=(0,d.useState)("NONE");let C,j=null,I=null,O=null;(0,d.useEffect)((()=>{l(!1)}),[x,o]);const T=!(!!!(null==o?void 0:o.extensionDownloadUrl)||!(null==o?void 0:o.mobileDownloadUrl));switch(x){case"NONE":j=d.createElement(On,{getWallet:()=>w("GET")});break;case"LEARN_COMPACT":j=d.createElement(On,{compactModeEnabled:f,getWallet:()=>w("GET")}),I="What is a Wallet?",O="NONE";break;case"GET":j=d.createElement(Kn,{getWalletDownload:y}),I="Get a Wallet",O=f?"LEARN_COMPACT":"NONE";break;case"CONNECT":j=o&&d.createElement(Vn,{changeWalletStep:w,compactModeEnabled:f,connectionError:u,onClose:e,qrCodeUri:i,reconnect:b,wallet:o}),I=c&&`Scan with ${"walletConnect"===o.id?"your phone":o.name}`,O=f?"NONE":null,C=f?v:()=>{};break;case"DOWNLOAD_OPTIONS":j=o&&d.createElement(Yn,{changeWalletStep:w,wallet:o}),I=o&&`Get ${o.name}`,O=T?E:null;break;case"DOWNLOAD":j=o&&d.createElement(Zn,{changeWalletStep:w,wallet:o}),I=o&&`Install ${o.name}`,O=T?"DOWNLOAD_OPTIONS":E;break;case"INSTRUCTIONS_MOBILE":j=o&&d.createElement(er,{connectWallet:g,wallet:o}),I=o&&`Get started with ${f&&o.shortName||o.name}`,O="DOWNLOAD";break;case"INSTRUCTIONS_EXTENSION":j=o&&d.createElement(tr,{wallet:o}),I=o&&`Get started with ${f&&o.shortName||o.name}`,O="DOWNLOAD_OPTIONS"}return d.createElement(Ce,{display:"flex",flexDirection:"row",style:{maxHeight:f?468:504}},(!f||"NONE"===x)&&d.createElement(Ce,{className:f?"_1vwt0cg4":"_1vwt0cg3",display:"flex",flexDirection:"column",marginTop:"16"},d.createElement(Ce,{display:"flex",justifyContent:"space-between"},f&&h&&d.createElement(Ce,{marginLeft:"16",width:"28"},d.createElement(Bn,{onClick:()=>w("LEARN_COMPACT")})),f&&!h&&d.createElement(Ce,{marginLeft:"16",width:"28"}),d.createElement(Ce,{marginLeft:f?"0":"6",paddingBottom:"8",paddingTop:"2",paddingX:"18"},d.createElement(Ft,{as:"h1",color:"modalText",id:"rk_connect_title",size:"16",weight:"heavy"},"Connect a Wallet")),f&&d.createElement(Ce,{marginRight:"16"},d.createElement(qt,{onClose:e}))),d.createElement(Ce,{className:"_1vwt0cg2 ju367v75 ju367v7q",paddingBottom:"18"},Object.entries(m).map((([e,t],r)=>t.length>0&&d.createElement(d.Fragment,{key:r},e?d.createElement(Ce,{marginBottom:"8",marginTop:"16",marginX:"6"},d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},e)):null,d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"4"},t.map((e=>d.createElement(Nn,{currentlySelected:e.id===n,iconBackground:e.iconBackground,iconUrl:e.iconUrl,key:e.id,name:e.name,onClick:()=>g(e),ready:e.ready,recent:e.recent,testId:`wallet-option-${e.id}`})))))))),f&&d.createElement(d.Fragment,null,d.createElement(Ce,{background:"generalBorder",height:"1",marginTop:"-1"}),h?d.createElement(Ce,{paddingX:"24",paddingY:"16",textAlign:"center"},d.createElement(h,{Link:jn,Text:In})):d.createElement(Ce,{alignItems:"center",display:"flex",justifyContent:"space-between",paddingX:"24",paddingY:"16"},d.createElement(Ce,{paddingY:"4"},d.createElement(Ft,{color:"modalTextSecondary",size:"14",weight:"bold"},"New to Ethereum wallets?")),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",justifyContent:"center"},d.createElement(Ce,{className:ge({active:"shrink",hover:"grow"}),cursor:"pointer",onClick:()=>w("LEARN_COMPACT"),paddingY:"4",style:{willChange:"transform"},transition:"default"},d.createElement(Ft,{color:"accentColor",size:"14",weight:"bold"},"Learn More")))))),(!f||"NONE"!==x)&&d.createElement(d.Fragment,null,!f&&d.createElement(Ce,{background:"generalBorder",minWidth:"1",width:"1"}),d.createElement(Ce,{display:"flex",flexDirection:"column",margin:"16",style:{flexGrow:1}},d.createElement(Ce,{alignItems:"center",display:"flex",justifyContent:"space-between",marginBottom:"12"},d.createElement(Ce,{width:"28"},O&&d.createElement(Ce,{as:"button",className:ge({active:"shrinkSm",hover:"growLg"}),color:"accentColor",onClick:()=>{O&&w(O,!0),null==C||C()},paddingX:"8",paddingY:"4",style:{boxSizing:"content-box",height:17,willChange:"transform"},transition:"default",type:"button"},d.createElement(Tn,null))),d.createElement(Ce,{display:"flex",justifyContent:"center",style:{flexGrow:1}},I&&d.createElement(Ft,{color:"modalText",size:"16",textAlign:"center",weight:"heavy"},I)),d.createElement(qt,{onClose:e})),d.createElement(Ce,{display:"flex",flexDirection:"column",style:{minHeight:f?396:432}},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"6",height:"full",justifyContent:"center",marginX:"8"},j)))))}function rr({onClose:e,wallet:t}){const{connect:n,connector:r,iconBackground:o,iconUrl:a,id:i,mobile:s,name:c,onConnecting:u,ready:l,shortName:f}=t,h=null==s?void 0:s.getUri,p=kn(a);return d.createElement(Ce,{as:"button",color:l?"modalText":"modalTextSecondary",disabled:!l,fontFamily:"body",key:i,onClick:(0,d.useCallback)((async()=>{"walletConnect"===i&&(null==e||e()),null==n||n();let t=!1;null==u||u((async()=>{if(!t&&(t=!0,h)){const e=await h();if("walletConnect"!==r.id&&"walletConnectLegacy"!==r.id||function({mobileUri:e,name:t}){localStorage.setItem($t,JSON.stringify({href:e.split("?")[0],name:t}))}({mobileUri:e,name:c}),e.startsWith("http")){const t=document.createElement("a");t.href=e,t.target="_blank",t.rel="noreferrer noopener",t.click()}else window.location.href=e}}))}),[r,n,h,u,e,c,i]),ref:p,style:{overflow:"visible",textAlign:"center"},testId:`wallet-option-${i}`,type:"button",width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},d.createElement(Ce,{paddingBottom:"8",paddingTop:"10"},d.createElement(Be,{background:o,borderRadius:"13",boxShadow:"walletLogo",height:"60",src:a,width:"60"})),d.createElement(Ce,{display:"flex",flexDirection:"column",textAlign:"center"},d.createElement(Ft,{as:"h2",color:t.ready?"modalText":"modalTextSecondary",size:"13",weight:"bold"},d.createElement(Ce,{as:"span",position:"relative"},null!=f?f:c,!t.ready&&" (unsupported)")),t.recent&&d.createElement(Ft,{color:"accentColor",size:"12",weight:"bold"},"Recent"))))}function or({onClose:e}){var t;const n=kt(),{disclaimer:r,learnMoreUrl:o}=(0,d.useContext)(vt);let a=null,i=null,s=!1,c=null;const[u,l]=(0,d.useState)("CONNECT"),f=Ae();switch(u){case"CONNECT":a="Connect a Wallet",s=!0,i=d.createElement(Ce,null,d.createElement(Ce,{background:"profileForeground",className:"_1am14410",display:"flex",paddingBottom:"20",paddingTop:"6"},d.createElement(Ce,{display:"flex",style:{margin:"0 auto"}},n.filter((e=>e.ready)).map((t=>d.createElement(Ce,{key:t.id,paddingX:"20"},d.createElement(Ce,{width:"60"},d.createElement(rr,{onClose:e,wallet:t}))))))),d.createElement(Ce,{background:"generalBorder",height:"1",marginBottom:"32",marginTop:"-1"}),d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",gap:"32",paddingX:"32",style:{textAlign:"center"}},d.createElement(Ce,{display:"flex",flexDirection:"column",gap:"8",textAlign:"center"},d.createElement(Ft,{color:"modalText",size:"23",weight:"bold"},"NameSys"),d.createElement(Ft,{color:"modalTextSecondary",size:"18",weight:"bold"},"ENS Off-Chain Records Manager"))),d.createElement(Ce,{paddingTop:"32",paddingX:"20"},d.createElement(Ce,{display:"flex",gap:"14",justifyContent:"center"},d.createElement(Lt,{label:"Get a Wallet",onClick:()=>l("GET"),size:"medium",type:"secondary"}),d.createElement(Lt,{href:o,label:"Learn More",size:"medium",type:"secondary"}))),r&&d.createElement(Ce,{marginTop:"28",marginX:"32",textAlign:"center"},d.createElement(r,{Link:jn,Text:In})));break;case"GET":{a="Get a Wallet",c="CONNECT";const e=null==(t=null==n?void 0:n.filter((e=>{var t,n,r;return(null==(t=e.downloadUrls)?void 0:t.ios)||(null==(n=e.downloadUrls)?void 0:n.android)||(null==(r=e.downloadUrls)?void 0:r.mobile)})))?void 0:t.splice(0,3);i=d.createElement(Ce,null,d.createElement(Ce,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginBottom:"36",marginTop:"5",paddingTop:"12",width:"full"},e.map(((t,n)=>{const{downloadUrls:r,iconBackground:o,iconUrl:a,name:i}=t;return(null==r?void 0:r.ios)||(null==r?void 0:r.android)||(null==r?void 0:r.mobile)?d.createElement(Ce,{display:"flex",gap:"16",key:t.id,paddingX:"20",width:"full"},d.createElement(Ce,{style:{minHeight:48,minWidth:48}},d.createElement(Be,{background:o,borderColor:"generalBorder",borderRadius:"10",height:"48",src:a,width:"48"})),d.createElement(Ce,{display:"flex",flexDirection:"column",width:"full"},d.createElement(Ce,{alignItems:"center",display:"flex",height:"48"},d.createElement(Ce,{width:"full"},d.createElement(Ft,{color:"modalText",size:"18",weight:"bold"},i)),d.createElement(Lt,{href:(f?null==r?void 0:r.ios:null==r?void 0:r.android)||(null==r?void 0:r.mobile),label:"GET",size:"small",type:"secondary"})),nl(c),padding:"16",style:{height:17,willChange:"transform"},transition:"default",type:"button"},d.createElement(Tn,null))),d.createElement(Ce,{marginTop:"4",textAlign:"center",width:"full"},d.createElement(Ft,{as:"h1",color:"modalText",id:"rk_connect_title",size:"16",weight:"bold"},a)),d.createElement(Ce,{alignItems:"center",display:"flex",height:"32",paddingRight:"14",position:"absolute",right:"0"},d.createElement(Ce,{style:{marginBottom:-20,marginTop:-20}},d.createElement(qt,{onClose:e}))))),d.createElement(Ce,{display:"flex",flexDirection:"column"},i))}function ar({onClose:e}){return xe()?d.createElement(or,{onClose:e}):d.createElement(nr,{onClose:e})}function ir({onClose:e,open:t}){const n="rk_connect_title",r=we();return"disconnected"===r?d.createElement(tn,{onClose:e,open:t,titleId:n},d.createElement(on,{bottomSheetOnMobile:!0,padding:"0",wide:!0},d.createElement(ar,{onClose:e}))):"unauthenticated"===r?d.createElement(tn,{onClose:e,open:t,titleId:n},d.createElement(on,{bottomSheetOnMobile:!0,padding:"0"},d.createElement(zt,{onClose:e}))):null}function sr(){const[e,t]=(0,d.useState)(!1);return{closeModal:(0,d.useCallback)((()=>t(!1)),[]),isModalOpen:e,openModal:(0,d.useCallback)((()=>t(!0)),[])}}var cr=(0,d.createContext)({accountModalOpen:!1,chainModalOpen:!1,connectModalOpen:!1});function ur({children:e}){const{closeModal:t,isModalOpen:n,openModal:r}=sr(),{closeModal:o,isModalOpen:a,openModal:i}=sr(),{closeModal:s,isModalOpen:c,openModal:u}=sr(),l=we(),{chain:f}=(0,w.LN)(),h=!(null==f?void 0:f.unsupported);function p({keepConnectModalOpen:e=!1}={}){e||t(),o(),s()}const m="unauthenticated"===ve();return(0,w.mA)({onConnect:()=>p({keepConnectModalOpen:m}),onDisconnect:()=>p()}),d.createElement(cr.Provider,{value:(0,d.useMemo)((()=>({accountModalOpen:a,chainModalOpen:c,connectModalOpen:n,openAccountModal:h&&"connected"===l?i:void 0,openChainModal:"connected"===l?u:void 0,openConnectModal:"disconnected"===l||"unauthenticated"===l?r:void 0})),[l,h,a,c,n,i,u,r])},e,d.createElement(ir,{onClose:t,open:n}),d.createElement(An,{onClose:o,open:a}),d.createElement(Cn,{onClose:s,open:c}))}var lr=()=>{};function dr({children:e}){var t,n,r,o;const a=(()=>{const[e,t]=(0,d.useReducer)((()=>!0),!1);return(0,d.useEffect)(t,[t]),e})(),{address:i}=(0,w.mA)(),s=ot(i),c=rt(s),{data:u}=(0,w.KQ)({address:i}),{chain:l}=(0,w.LN)(),f=(()=>{const e=tt();return(0,d.useMemo)((()=>{const t={};return e.forEach((e=>{t[e.id]=e})),t}),[e])})(),h=null!=(t=ve())?t:void 0,p=l?f[l.id]:void 0,m=null!=(n=null==p?void 0:p.name)?n:void 0,b=null!=(r=null==p?void 0:p.iconUrl)?r:void 0,g=null!=(o=null==p?void 0:p.iconBackground)?o:void 0,y=Se(b),v=(0,d.useContext)(Pt),E=pt().some((({status:e})=>"pending"===e))&&v,A=u?`${cn(parseFloat(u.formatted))} ${u.symbol}`:void 0,{openConnectModal:x}=function(){const{connectModalOpen:e,openConnectModal:t}=(0,d.useContext)(cr);return{connectModalOpen:e,openConnectModal:t}}(),{openChainModal:P}=function(){const{chainModalOpen:e,openChainModal:t}=(0,d.useContext)(cr);return{chainModalOpen:e,openChainModal:t}}(),{openAccountModal:C}=function(){const{accountModalOpen:e,openAccountModal:t}=(0,d.useContext)(cr);return{accountModalOpen:e,openAccountModal:t}}(),{accountModalOpen:j,chainModalOpen:I,connectModalOpen:O}=function(){const{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}=(0,d.useContext)(cr);return{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}}();return d.createElement(d.Fragment,null,e({account:i?{address:i,balanceDecimals:null==u?void 0:u.decimals,balanceFormatted:null==u?void 0:u.formatted,balanceSymbol:null==u?void 0:u.symbol,displayBalance:A,displayName:s?ln(s):un(i),ensAvatar:null!=c?c:void 0,ensName:null!=s?s:void 0,hasPendingTransactions:E}:void 0,accountModalOpen:j,authenticationStatus:h,chain:l?{hasIcon:Boolean(b),iconBackground:g,iconUrl:y,id:l.id,name:null!=m?m:l.name,unsupported:l.unsupported}:void 0,chainModalOpen:I,connectModalOpen:O,mounted:a,openAccountModal:null!=C?C:lr,openChainModal:null!=P?P:lr,openConnectModal:null!=x?x:lr}))}dr.displayName="ConnectButton.Custom";var fr={accountStatus:"full",chainStatus:{largeScreen:"full",smallScreen:"icon"},label:"Connect Wallet",showBalance:{largeScreen:!0,smallScreen:!1}};function hr({accountStatus:e=fr.accountStatus,chainStatus:t=fr.chainStatus,label:n=fr.label,showBalance:r=fr.showBalance}){const o=tt(),a=we();return d.createElement(dr,null,(({account:i,chain:s,mounted:c,openAccountModal:u,openChainModal:l,openConnectModal:f})=>{var h,p,m;const b=c&&"loading"!==a,g=null!=(h=null==s?void 0:s.unsupported)&&h;return d.createElement(Ce,{display:"flex",gap:"12",...!b&&{"aria-hidden":!0,style:{opacity:0,pointerEvents:"none",userSelect:"none"}}},b&&i&&"connected"===a?d.createElement(d.Fragment,null,s&&(o.length>1||g)&&d.createElement(Ce,{alignItems:"center","aria-label":"Chain Selector",as:"button",background:g?"connectButtonBackgroundError":"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:ge({active:"shrink",hover:"grow"}),color:g?"connectButtonTextError":"connectButtonText",display:de(t,(e=>"none"===e?"none":"flex")),fontFamily:"body",fontWeight:"bold",gap:"6",key:g?"unsupported":"supported",onClick:l,paddingX:"10",paddingY:"8",testId:g?"wrong-network-button":"chain-button",transition:"default",type:"button"},g?d.createElement(Ce,{alignItems:"center",display:"flex",height:"24",paddingX:"4",fontFamily:"body"},"Wrong network"):d.createElement(Ce,{alignItems:"center",display:"flex",gap:"6"},s.hasIcon?d.createElement(Ce,{display:de(t,(e=>"full"===e||"icon"===e?"block":"none")),height:"24",width:"24"},d.createElement(Be,{alt:null!=(p=s.name)?p:"Chain icon",background:s.iconBackground,borderRadius:"full",height:"24",src:s.iconUrl,width:"24"})):null,d.createElement(Ce,{display:de(t,(e=>"icon"!==e||s.iconUrl?"full"===e||"name"===e?"block":"none":"block"))},null!=(m=s.name)?m:s.id)),d.createElement(Ue,null)),!g&&d.createElement(Ce,{alignItems:"center",as:"button",background:"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:ge({active:"shrink",hover:"grow"}),color:"connectButtonText",display:"flex",fontFamily:"body",fontWeight:"bold",onClick:u,testId:"account-button",transition:"default",type:"button"},i.displayBalance&&d.createElement(Ce,{display:de(r,(e=>e?"block":"none")),padding:"8",paddingLeft:"12"},i.displayBalance),d.createElement(Ce,{background:fe(r)[xe()?"smallScreen":"largeScreen"]?"connectButtonInnerBackground":"connectButtonBackground",borderColor:"connectButtonBackground",borderRadius:"connectButton",borderStyle:"solid",borderWidth:"2",color:"connectButtonText",fontFamily:"body",fontWeight:"bold",paddingX:"8",paddingY:"6",transition:"default"},d.createElement(Ce,{alignItems:"center",display:"flex",gap:"6",height:"24"},d.createElement(Ce,{display:de(e,(e=>"full"===e||"avatar"===e?"block":"none"))},d.createElement(Fe,{address:i.address,imageUrl:i.ensAvatar,loading:i.hasPendingTransactions,size:24})),d.createElement(Ce,{alignItems:"center",display:"flex",gap:"6"},d.createElement(Ce,{display:de(e,(e=>"full"===e||"address"===e?"block":"none"))},i.displayName),d.createElement(Ue,null)))))):d.createElement(Ce,{as:"button",background:"accentColor",borderRadius:"connectButton",boxShadow:"connectButton",className:ge({active:"shrink",hover:"grow"}),color:"accentColorForeground",fontFamily:"body",fontWeight:"bold",height:"40",key:"connect",onClick:f,paddingX:"14",testId:"connect-button",transition:"default",type:"button",fontSize:16},n))}))}hr.__defaultProps=fr,hr.Custom=dr},94077:function(e,t,n){"use strict";n.d(t,{QB:function(){return Un},$j:function(){return cr},_g:function(){return ir},o6:function(){return Xn},vZ:function(){return Gn},zP:function(){return ur},EG:function(){return Ar},RQ:function(){return Br},w6:function(){return Tr},Lk:function(){return Sr},jS:function(){return kr},D0:function(){return xr},Hy:function(){return Pr},uV:function(){return fr},gY:function(){return Kn},xz:function(){return hr},jr:function(){return pr},wp:function(){return Zn},uw:function(){return _r},a4:function(){return vr},T7:function(){return Nr},l:function(){return Cr},If:function(){return jr},Mn:function(){return Mr},uH:function(){return Ir},QC:function(){return Or},pC:function(){return mr},Tb:function(){return br},fq:function(){return gr},n9:function(){return Er}});var r=n(64546),o=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},a=(e,t,n)=>(o(e,t,"read from private field"),n?n.call(e):t.get(e)),i=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},s=(e,t,n,r)=>(o(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),c=n(48439),u=n(1920),l=n(31826),d=n(96606),f=n(61786),h=n(26873),p=n(46872),m=n(35554),b=n(69977),g=n(90722);function y(e,t){if(!(e instanceof b.G))return!1;const n=e.walk((e=>e instanceof g.Lu));return n instanceof g.Lu&&("ResolverNotFound"===n.data?.errorName||("ResolverWildcardNotSupported"===n.data?.errorName||(!!n.reason?.includes("Wildcard on non-extended resolvers is not supported")||"reverse"===t&&n.reason===m.$[50])))}var v=n(9040),w=n(41327),E=n(90707),A=n(25493);function x(e){if(66!==e.length)return null;if(0!==e.indexOf("["))return null;if(65!==e.indexOf("]"))return null;const t=`0x${e.slice(1,65)}`;return(0,A.v)(t)?t:null}function P(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,p.ci)(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const e=x(n[r]),o=e?(0,w.O0)(e):(0,E.w)((0,w.qX)(n[r]),"bytes");t=(0,E.w)((0,v.zo)([t,o]),"bytes")}return(0,p.ci)(t)}function C(e){const t=new Uint8Array(32).fill(0);return e?x(e)||(0,E.w)((0,w.qX)(e)):(0,p.ci)(t)}function j(e){const t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);const n=new Uint8Array((0,w.qX)(t).byteLength+2);let r=0;const o=t.split(".");for(let a=0;a255&&(e=(0,w.qX)(`[${C(o[a]).slice(2)}]`)),n[r]=e.length,n.set(e,r+1),r+=e.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}var I=n(5555);function O(e,{abi:t,address:n,args:r,docsPath:o,functionName:a,sender:i}){const{code:s,data:c,message:u,shortMessage:l}=e instanceof g.VQ?e:e instanceof b.G?e.walk((e=>"data"in e))||e.walk():{};let d=e;return e instanceof I.wb?d=new g.Dk({functionName:a}):3===s&&(c||u||l)&&(d=new g.Lu({abi:t,data:"object"===typeof c?c.data:c,functionName:a,message:l??u})),new g.uq(d,{abi:t,args:r,contractAddress:n,docsPath:o,functionName:a,sender:i})}var T=n(83161);async function S(e,{abi:t,address:n,args:r,functionName:o,...a}){const i=(0,d.R)({abi:t,args:r,functionName:o});try{const{data:s}=await(0,T.R)(e,{data:i,to:n,...a});return(0,l.k)({abi:t,args:r,functionName:o,data:s||"0x"})}catch(s){throw O(s,{abi:t,address:n,args:r,docsPath:"/docs/contract/readContract",functionName:o})}}class B extends b.G{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class k extends b.G{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class _ extends b.G{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class N extends b.G{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const M=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,R=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,F=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,U=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;function L(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function D({uri:e,gatewayUrls:t}){const n=F.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=L(t?.ipfs,"https://ipfs.io"),o=L(t?.arweave,"https://arweave.net"),a=e.match(M),{protocol:i,subpath:s,target:c,subtarget:u=""}=a?.groups||{},l="ipns:/"===i||"ipns/"===s,d="ipfs:/"===i||"ipfs/"===s||R.test(e);if(e.startsWith("http")&&!l&&!d){let n=e;return t?.arweave&&(n=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:n,isOnChain:!1,isEncoded:!1}}if((l||d)&&c)return{uri:`${r}/${l?"ipns":"ipfs"}/${c}${u}`,isOnChain:!1,isEncoded:!1};if("ar:/"===i&&c)return{uri:`${o}/${c}${u||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(U,"");if(f.startsWith("{const n=new Image;n.onload=()=>{t(!0)},n.onerror=()=>{t(!1)},n.src=e}))}}(n);if(o)return n;throw new _({uri:t})}async function z(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?async function(e,{gatewayUrls:t,record:n}){const r=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,o]=t.split("/"),[a,i]=n.split(":"),[s,c]=r.split(":");if(!a||"eip155"!==a.toLowerCase())throw new k({reason:"Only EIP-155 supported"});if(!i)throw new k({reason:"Chain ID not found"});if(!c)throw new k({reason:"Contract address not found"});if(!o)throw new k({reason:"Token ID not found"});if(!s)throw new k({reason:"ERC namespace not found"});return{chainID:parseInt(i),namespace:s.toLowerCase(),contractAddress:c,tokenID:o}}(n),o=await async function(e,{nft:t}){if("erc721"===t.namespace)return S(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return S(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new N({namespace:t.namespace})}(e,{nft:r}),{uri:a,isOnChain:i,isEncoded:s}=D({uri:o,gatewayUrls:t});if(i&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){const e=s?atob(a.replace("data:application/json;base64,","")):a;return H({uri:q(JSON.parse(e)),gatewayUrls:t})}let c=r.tokenID;"erc1155"===r.namespace&&(c=c.replace("0x","").padStart(64,"0"));return async function({gatewayUrls:e,uri:t}){try{const n=await fetch(t).then((e=>e.json()));return await H({gatewayUrls:e,uri:q(n)})}catch{throw new _({uri:t})}}({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,c)})}(e,{gatewayUrls:t,record:n}):H({uri:n,gatewayUrls:t})}async function G(e,{blockNumber:t,blockTag:n,name:r,key:o,universalResolverAddress:a}){let i=a;if(!i){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=(0,f.LI)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const a=await S(e,{address:i,abi:u.k3,functionName:"resolve",args:[(0,p.NC)(j(r)),(0,d.R)({abi:u.nZ,functionName:"text",args:[P(r),o]})],blockNumber:t,blockTag:n});if("0x"===a[0])return null;const s=(0,l.k)({abi:u.nZ,functionName:"text",data:a[0]});return""===s?null:s}catch(s){if(y(s,"resolve"))return null;throw s}}function $(e,{method:t}){const n={};return"fallback"===e.transport.type&&e.transport.onResponse?.((({method:e,response:r,status:o,transport:a})=>{"success"===o&&t===e&&(n[r]=a.request)})),t=>n[t]||e.request}class W extends b.G{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}var K=n(56143);const Q=e=>"string"===typeof e?(0,K.F)(e):(0,K.J)(e);var V=n(62546),J=n(21494),Y=n(28604);function Z({abi:e,eventName:t,args:n}){let r=e[0];if(t&&(r=(0,Y.m)({abi:e,args:n,name:t}),!r))throw new I.mv(t,{docsPath:"/docs/contract/encodeEventTopics"});if("event"!==r.type)throw new I.mv(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const o=(0,J.t)(r),a=Q(o);let i=[];if(n&&"inputs"in r){const e=r.inputs?.filter((e=>"indexed"in e&&e.indexed)),t=Array.isArray(n)?n:Object.values(n).length>0?e?.map((e=>n[e.name]))??[]:[];t.length>0&&(i=e?.map(((e,n)=>Array.isArray(t[n])?t[n].map(((r,o)=>X({param:e,value:t[n][o]}))):t[n]?X({param:e,value:t[n]}):null))??[])}return[a,...i]}function X({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,E.w)((0,w.O0)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new W(e.type);return(0,V.E)([e],[t])}async function ee(e,{address:t,abi:n,args:r,eventName:o,fromBlock:a,strict:i,toBlock:s}){const c=$(e,{method:"eth_newFilter"}),u=o?Z({abi:n,args:r,eventName:o}):void 0,l=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"===typeof a?(0,p.eC)(a):a,toBlock:"bigint"===typeof s?(0,p.eC)(s):s,topics:u}]});return{abi:n,args:r,eventName:o,id:l,request:c(l),strict:i,type:"event"}}async function te(e,{address:t,args:n,event:r,events:o,fromBlock:a,strict:i,toBlock:s}={}){const c=o??(r?[r]:void 0),u=$(e,{method:"eth_newFilter"});let l=[];c&&(l=[c.flatMap((e=>Z({abi:[e],eventName:e.name,args:n})))],r&&(l=l[0]));const d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"===typeof a?(0,p.eC)(a):a,toBlock:"bigint"===typeof s?(0,p.eC)(s):s,...l.length?{topics:l}:{}}]});return{abi:c,args:n,eventName:r?r.name:void 0,fromBlock:a,id:d,request:u(d),strict:i,toBlock:s,type:"event"}}async function ne(e){const t=$(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}var re=n(21431),oe=n(14828);var ae=n(33910);const ie=new Map,se=new Map;async function ce(e,{cacheKey:t,cacheTime:n=1/0}){const r=function(e){const t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:n=>t.set(e,n)}),n=t(e,ie),r=t(e,se);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}(t),o=r.response.get();if(o&&n>0){if((new Date).getTime()-o.created.getTime()`blockNumber.${e}`;async function le(e,{cacheTime:t=e.cacheTime,maxAge:n}={}){const r=await ce((()=>e.request({method:"eth_blockNumber"})),{cacheKey:ue(e.uid),cacheTime:n??t});return BigInt(r)}var de=n(90169);var fe=n(29251);async function he(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:o}){const a=n?(0,p.eC)(n):void 0;return function(e){return{baseFeePerGas:e.baseFeePerGas.map((e=>BigInt(e))),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map((e=>e.map((e=>BigInt(e)))))}}(await e.request({method:"eth_feeHistory",params:[(0,p.eC)(t),a||r,o]}))}var pe=n(70558);const me="/docs/contract/decodeEventLog";function be({abi:e,data:t,strict:n,topics:r}){const o=n??!0,[a,...i]=r;if(!a)throw new I.FM({docsPath:me});const s=e.find((e=>"event"===e.type&&a===Q((0,J.t)(e))));if(!s||!("name"in s)||"event"!==s.type)throw new I.lC(a,{docsPath:me});const{name:c,inputs:u}=s,l=u?.some((e=>!("name"in e&&e.name)));let d=l?[]:{};const f=u.filter((e=>"indexed"in e&&e.indexed));if(i.length>0)for(let m=0;m!("indexed"in e&&e.indexed)));if(h.length>0)if(t&&"0x"!==t)try{const e=(0,pe.r)(h,t);if(e)if(l)d=[...d,...e];else for(let t=0;t0?d:void 0}}function ge({param:e,value:t}){if("string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))return t;return((0,pe.r)([e],t)||[])[0]}var ye=n(18829);async function ve(e,{filter:t}){const n="strict"in t&&t.strict;return(await t.request({method:"eth_getFilterChanges",params:[t.id]})).map((e=>{if("string"===typeof e)return e;try{const{eventName:r,args:o}="abi"in t&&t.abi?be({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return(0,ye.U)(e,{args:o,eventName:r})}catch(r){let n,o;if(r instanceof I.SM||r instanceof I.Gy){if("strict"in t&&t.strict)return;n=r.abiItem.name,o=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,ye.U)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}var we=n(48671);async function Ee(e,{address:t,blockHash:n,fromBlock:r,toBlock:o,event:a,events:i,args:s,strict:c}={}){const u=c??!1,l=i??(a?[a]:void 0);let d,f=[];return l&&(f=[l.flatMap((e=>Z({abi:[e],eventName:e.name,args:s})))],a&&(f=f[0])),d=n?await e.request({method:"eth_getLogs",params:[{address:t,topics:f,blockHash:n}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:f,fromBlock:"bigint"===typeof r?(0,p.eC)(r):r,toBlock:"bigint"===typeof o?(0,p.eC)(o):o}]}),d.map((e=>{try{const{eventName:t,args:n}=l?be({abi:l,data:e.data,topics:e.topics,strict:u}):{eventName:void 0,args:void 0};return(0,ye.U)(e,{args:n,eventName:t})}catch(t){let n,r;if(t instanceof I.SM||t instanceof I.Gy){if(u)return;n=t.abiItem.name,r=t.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,ye.U)(e,{args:r?[]:{},eventName:n})}})).filter(Boolean)}var Ae=n(54574),xe=n(94216);async function Pe(e,{blockHash:t,blockNumber:n,blockTag:r,hash:o,index:a}){const i=r||"latest",s=void 0!==n?(0,p.eC)(n):void 0;let c=null;if(o?c=await e.request({method:"eth_getTransactionByHash",params:[o]}):t?c=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,p.eC)(a)]}):(s||i)&&(c=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[s||i,(0,p.eC)(a)]})),!c)throw new Ae.Bh({blockHash:t,blockNumber:n,blockTag:i,hash:o,index:a});return(e.chain?.formatters?.transaction?.format||xe.Tr)(c)}var Ce=n(89784),je=n(4656);async function Ie(e,{hash:t}){const n=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!n)throw new Ae.Yb({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||je.f)(n)}async function Oe(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}var Te=n(90696);var Se=n(99353);async function Be(e,{address:t,hash:n,signature:r,...o}){const a=(0,A.v)(r)?r:(0,p.NC)(r);try{const{data:r}=await(0,T.R)(e,{data:(0,Se.w)({abi:u.$o,args:[t,n,a],bytecode:"0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"}),...o});return function(e,t){const n=(0,A.v)(e)?(0,w.O0)(e):e,r=(0,A.v)(t)?(0,w.O0)(t):t;return(0,Te.equalBytes)(n,r)}(r??"0x0","0x1")}catch(i){if(i instanceof g.cg)return!1;throw i}}async function ke(e,{address:t,message:n,signature:r,...o}){const a=function(e,t){const n="string"===typeof e?(0,w.qX)(e):e.raw instanceof Uint8Array?e.raw:(0,w.O0)(e.raw),r=(0,w.qX)(`\x19Ethereum Signed Message:\n${n.length}`);return(0,E.w)((0,v.zo)([r,n]),t)}(n);return Be(e,{address:t,hash:a,signature:r,...o})}var _e=n(61539);function Ne({domain:e,message:t,primaryType:n,types:r}){const o="undefined"===typeof e?{}:e,a={EIP712Domain:["string"===typeof o?.name&&{name:"name",type:"string"},o?.version&&{name:"version",type:"string"},"number"===typeof o?.chainId&&{name:"chainId",type:"uint256"},o?.verifyingContract&&{name:"verifyingContract",type:"address"},o?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...r};(0,_e.i)({domain:o,message:t,primaryType:n,types:a});const i=["0x1901"];return o&&i.push(function({domain:e,types:t}){return Me({data:e,primaryType:"EIP712Domain",types:t})}({domain:o,types:a})),"EIP712Domain"!==n&&i.push(Me({data:t,primaryType:n,types:a})),(0,E.w)((0,v.zo)(i))}function Me({data:e,primaryType:t,types:n}){const r=Re({data:e,primaryType:t,types:n});return(0,E.w)(r)}function Re({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],o=[Fe({primaryType:t,types:n})];for(const a of n[t]){const[t,i]=Le({types:n,name:a.name,type:a.type,value:e[a.name]});r.push(t),o.push(i)}return(0,V.E)(r,o)}function Fe({primaryType:e,types:t}){const n=(0,p.NC)(function({primaryType:e,types:t}){let n="";const r=Ue({primaryType:e,types:t});r.delete(e);const o=[e,...Array.from(r).sort()];for(const a of o)n+=`${a}(${t[a].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`;return n}({primaryType:e,types:t}));return(0,E.w)(n)}function Ue({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u)?.[0];if(n.has(r)||void 0===t[r])return n;n.add(r);for(const o of t[r])Ue({primaryType:o.type,types:t},n);return n}function Le({types:e,name:t,type:n,value:r}){if(void 0!==e[n])return[{type:"bytes32"},(0,E.w)(Re({data:r,primaryType:n,types:e}))];if("bytes"===n){return r=`0x${(r.length%2?"0":"")+r.slice(2)}`,[{type:"bytes32"},(0,E.w)(r)]}if("string"===n)return[{type:"bytes32"},(0,E.w)((0,p.NC)(r))];if(n.lastIndexOf("]")===n.length-1){const o=n.slice(0,n.lastIndexOf("[")),a=r.map((n=>Le({name:t,type:o,types:e,value:n})));return[{type:"bytes32"},(0,E.w)((0,V.E)(a.map((([e])=>e)),a.map((([,e])=>e))))]}return[{type:n},r]}const De=new Map,qe=new Map;let He=0;function ze(e,t,n){const r=++He,o=()=>De.get(e)||[],a=()=>{const t=qe.get(e);1===o().length&&t&&t(),(()=>{const t=o();De.set(e,t.filter((e=>e.id!==r)))})()},i=o();if(De.set(e,[...i,{id:r,fns:t}]),i&&i.length>0)return a;const s={};for(const u in t)s[u]=(...e)=>{const t=o();0!==t.length&&t.forEach((t=>t.fns[u]?.(...e)))};const c=n(s);return"function"===typeof c&&qe.set(e,c),a}var Ge=n(11941),$e=n(61344),We=n(40482);function Ke(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let o=!0;const a=()=>o=!1;return(async()=>{let i;t&&(i=await e({unpoll:a}));const s=await(n?.(i))??r;await(0,We.D)(s);const c=async()=>{o&&(await e({unpoll:a}),await(0,We.D)(r),c())};c()})(),a}function Qe(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:o,poll:a,pollingInterval:i=e.pollingInterval}){let s;return("undefined"!==typeof a?a:"webSocket"!==e.transport.type)?ze((0,$e.P)(["watchBlockNumber",e.uid,t,n,i]),{onBlockNumber:r,onError:o},(r=>Ke((async()=>{try{const t=await le(e,{cacheTime:0});if(s){if(t===s)return;if(t-s>1&&n)for(let e=s+1n;es)&&(r.onBlockNumber(t,s),s=t)}catch(t){r.onError?.(t)}}),{emitOnBegin:t,interval:i}))):(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:a}=await e.transport.subscribe({params:["newHeads"],onData(e){if(!t)return;const n=(0,de.y_)(e.result?.number);r(n,s),s=n},onError(e){o?.(e)}});n=a,t||n()}catch(a){o?.(a)}})(),n})()}var Ve=n(86101);var Je=n(42455);function Ye(e){return{call:t=>(0,T.R)(e,t),createBlockFilter:()=>async function(e){const t=$(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}(e),createContractEventFilter:t=>ee(e,t),createEventFilter:t=>te(e,t),createPendingTransactionFilter:()=>ne(e),estimateContractGas:t=>async function(e,{abi:t,address:n,args:r,functionName:o,...a}){const i=(0,d.R)({abi:t,args:r,functionName:o});try{return await(0,oe.Q)(e,{data:i,to:n,...a})}catch(s){throw O(s,{abi:t,address:n,args:r,docsPath:"/docs/contract/estimateContractGas",functionName:o,sender:(a.account?(0,re.T)(a.account):void 0)?.address})}}(e,t),estimateGas:t=>(0,oe.Q)(e,t),getBalance:t=>async function(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=n?(0,p.eC)(n):void 0,a=await e.request({method:"eth_getBalance",params:[t,o||r]});return BigInt(a)}(e,t),getBlock:t=>(0,ae.Q)(e,t),getBlockNumber:t=>le(e,t),getBlockTransactionCount:t=>async function(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const o=void 0!==n?(0,p.eC)(n):void 0;let a;return a=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||r]}),(0,de.ly)(a)}(e,t),getBytecode:t=>async function(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=void 0!==n?(0,p.eC)(n):void 0,a=await e.request({method:"eth_getCode",params:[t,o||r]});if("0x"!==a)return a}(e,t),getChainId:()=>(0,fe.L)(e),getEnsAddress:t=>async function(e,{blockNumber:t,blockTag:n,coinType:r,name:o,universalResolverAddress:a}){let i=a;if(!i){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=(0,f.LI)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const a=(0,d.R)({abi:u.X$,functionName:"addr",...null!=r?{args:[P(o),BigInt(r)]}:{args:[P(o)]}}),s=await S(e,{address:i,abi:u.k3,functionName:"resolve",args:[(0,p.NC)(j(o)),a],blockNumber:t,blockTag:n});if("0x"===s[0])return null;const c=(0,h.f)((0,l.k)({abi:u.X$,args:null!=r?[P(o),BigInt(r)]:void 0,functionName:"addr",data:s[0]}));return"0x"===c||"0x00"===(0,h.f)(c)?null:c}catch(s){if(y(s,"resolve"))return null;throw s}}(e,t),getEnsAvatar:t=>async function(e,{blockNumber:t,blockTag:n,gatewayUrls:r,name:o,universalResolverAddress:a}){const i=await G(e,{blockNumber:t,blockTag:n,key:"avatar",name:o,universalResolverAddress:a});if(!i)return null;try{return await z(e,{record:i,gatewayUrls:r})}catch{return null}}(e,t),getEnsName:t=>async function(e,{address:t,blockNumber:n,blockTag:r,universalResolverAddress:o}){let a=o;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=(0,f.LI)({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}const i=`${t.toLowerCase().substring(2)}.addr.reverse`;try{return(await S(e,{address:a,abi:u.du,functionName:"reverse",args:[(0,p.NC)(j(i))],blockNumber:n,blockTag:r}))[0]}catch(s){if(y(s,"reverse"))return null;throw s}}(e,t),getEnsResolver:t=>async function(e,{blockNumber:t,blockTag:n,name:r,universalResolverAddress:o}){let a=o;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=(0,f.LI)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const[i]=await S(e,{address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,p.NC)(j(r))],blockNumber:t,blockTag:n});return i}(e,t),getEnsText:t=>G(e,t),getFeeHistory:t=>he(e,t),getFilterChanges:e=>ve(0,e),getFilterLogs:e=>async function(e,{filter:t}){const n=t.strict??!1;return(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map((e=>{try{const{eventName:r,args:o}="abi"in t&&t.abi?be({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return(0,ye.U)(e,{args:o,eventName:r})}catch(r){let n,o;if(r instanceof I.SM||r instanceof I.Gy){if("strict"in t&&t.strict)return;n=r.abiItem.name,o=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,ye.U)(e,{args:o?[]:{},eventName:n})}})).filter(Boolean)}(0,e),getGasPrice:()=>(0,we.o)(e),getLogs:t=>Ee(e,t),getStorageAt:t=>async function(e,{address:t,blockNumber:n,blockTag:r="latest",slot:o}){const a=void 0!==n?(0,p.eC)(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,o,a||r]})}(e,t),getTransaction:t=>Pe(e,t),getTransactionConfirmations:t=>async function(e,{hash:t,transactionReceipt:n}){const[r,o]=await Promise.all([le(e),t?Pe(e,{hash:t}):void 0]),a=n?.blockNumber||o?.blockNumber;return a?r-a+1n:0n}(e,t),getTransactionCount:t=>(0,Ce.K)(e,t),getTransactionReceipt:t=>Ie(e,t),multicall:t=>async function(e,t){const{allowFailure:n=!0,batchSize:r,blockNumber:o,blockTag:a,contracts:i,multicallAddress:s}=t,c=r??("object"===typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),h=i;let p=s;if(!p){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");p=(0,f.LI)({blockNumber:o,chain:e.chain,contract:"multicall3"})}const m=[[]];let b=0,y=0;for(let u=0;u0&&y>c&&(b++,y=(n.length-2)/2,m[b]=[]),m[b]=[...m[b],{allowFailure:!0,callData:n,target:t}]}catch(v){const a=O(v,{abi:e,address:t,args:r,docsPath:"/docs/contract/multicall",functionName:o});if(!n)throw a;m[b]=[...m[b],{allowFailure:!0,callData:"0x",target:t}]}}return(await Promise.all(m.map((t=>S(e,{abi:u.F8,address:p,args:[t],blockNumber:o,blockTag:a,functionName:"aggregate3"}))))).flat().map((({returnData:e,success:t},r)=>{const o=m.flat(),{callData:a}=o[r],{abi:i,address:s,functionName:c,args:u}=h[r];try{if("0x"===a)throw new I.wb;if(!t)throw new g.VQ({data:e});const r=(0,l.k)({abi:i,args:u,data:e,functionName:c});return n?{result:r,status:"success"}:r}catch(v){const t=O(v,{abi:i,address:s,args:u,docsPath:"/docs/contract/multicall",functionName:c});if(!n)throw t;return{error:t,result:void 0,status:"failure"}}}))}(e,t),readContract:t=>S(e,t),simulateContract:t=>async function(e,{abi:t,address:n,args:r,dataSuffix:o,functionName:a,...i}){const s=i.account?(0,re.T)(i.account):void 0,c=(0,d.R)({abi:t,args:r,functionName:a});try{const{data:s}=await(0,T.R)(e,{batch:!1,data:`${c}${o?o.replace("0x",""):""}`,to:n,...i});return{result:(0,l.k)({abi:t,args:r,functionName:a,data:s||"0x"}),request:{abi:t,address:n,args:r,dataSuffix:o,functionName:a,...i}}}catch(u){throw O(u,{abi:t,address:n,args:r,docsPath:"/docs/contract/simulateContract",functionName:a,sender:s?.address})}}(e,t),verifyMessage:t=>ke(e,t),verifyTypedData:t=>async function(e,{address:t,signature:n,message:r,primaryType:o,types:a,domain:i,...s}){return Be(e,{address:t,hash:Ne({message:r,primaryType:o,types:a,domain:i}),signature:n,...s})}(e,t),uninstallFilter:e=>Oe(0,e),waitForTransactionReceipt:t=>async function(e,{confirmations:t=1,hash:n,onReplaced:r,pollingInterval:o=e.pollingInterval,timeout:a}){const i=(0,$e.P)(["waitForTransactionReceipt",e.uid,n]);let s,c,u,l=!1;return new Promise(((d,f)=>{a&&setTimeout((()=>f(new Ae.mc({hash:n}))),a);const h=ze(i,{onReplaced:r,resolve:d,reject:f},(r=>{const a=Qe(e,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:o,async onBlockNumber(o){if(l)return;let i=o;const d=e=>{a(),e(),h()};try{if(u){if(i-u.blockNumber+1nr.resolve(u)))}if(s||(l=!0,await(0,Ge.J)((async()=>{s=await Pe(e,{hash:n}),s.blockNumber&&(i=s.blockNumber)}),{delay:({count:e})=>200*~~(1<0&&i-u.blockNumber+1nr.resolve(u)))}catch(f){if(s&&(f instanceof Ae.Bh||f instanceof Ae.Yb)){c=s;const n=(await(0,ae.Q)(e,{blockNumber:i,includeTransactions:!0})).transactions.find((({from:e,nonce:t})=>e===c.from&&t===c.nonce));if(!n)return;if(u=await Ie(e,{hash:n.hash}),i-u.blockNumber+1n{r.onReplaced?.({reason:o,replacedTransaction:c,transaction:n,transactionReceipt:u}),r.resolve(u)}))}else d((()=>r.reject(f)))}}})}))}))}(e,t),watchBlocks:t=>function(e,{blockTag:t="latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:o,onError:a,includeTransactions:i,poll:s,pollingInterval:c=e.pollingInterval}){const u="undefined"!==typeof s?s:"webSocket"!==e.transport.type,l=i??!1;let d;return u?ze((0,$e.P)(["watchBlocks",e.uid,n,r,l,c]),{onBlock:o,onError:a},(o=>Ke((async()=>{try{const r=await(0,ae.Q)(e,{blockTag:t,includeTransactions:l});if(r.number&&d?.number){if(r.number===d.number)return;if(r.number-d.number>1&&n)for(let t=d?.number+1n;td.number)&&(o.onBlock(r,d),d=r)}catch(r){o.onError?.(r)}}),{emitOnBegin:r,interval:c}))):(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:r}=await e.transport.subscribe({params:["newHeads"],onData(n){if(!t)return;const r=(e.chain?.formatters?.block?.format||Ve.Z)(n.result);o(r,d),d=r},onError(e){a?.(e)}});n=r,t||n()}catch(r){a?.(r)}})(),n})()}(e,t),watchBlockNumber:t=>Qe(e,t),watchContractEvent:t=>function(e,{abi:t,address:n,args:r,batch:o=!0,eventName:a,onError:i,onLogs:s,poll:c,pollingInterval:u=e.pollingInterval,strict:l}){return("undefined"!==typeof c?c:"webSocket"!==e.transport.type)?(()=>{const c=(0,$e.P)(["watchContractEvent",n,r,o,e.uid,a,u]),d=l??!1;return ze(c,{onLogs:s,onError:i},(i=>{let s,c,l=!1;const f=Ke((async()=>{if(l)try{let u;if(c)u=await ve(0,{filter:c});else{const o=await le(e);u=s&&s!==o?await Ee(e,{address:n,args:r,fromBlock:s+1n,toBlock:o,event:(0,Y.m)({abi:t,name:a})}):[],s=o}if(0===u.length)return;o?i.onLogs(u):u.forEach((e=>i.onLogs([e])))}catch(u){c&&u instanceof Je.yR&&(l=!1),i.onError?.(u)}else{try{c=await ee(e,{abi:t,address:n,args:r,eventName:a,strict:d})}catch{}l=!0}}),{emitOnBegin:!0,interval:u});return async()=>{c&&await Oe(0,{filter:c}),f()}}))})():(()=>{let o=!0,c=()=>o=!1;return(async()=>{try{const u=a?Z({abi:t,eventName:a,args:r}):[],{unsubscribe:d}=await e.transport.subscribe({params:["logs",{address:n,topics:u}],onData(e){if(!o)return;const n=e.result;try{const{eventName:e,args:r}=be({abi:t,data:n.data,topics:n.topics,strict:l}),o=(0,ye.U)(n,{args:r,eventName:e});s([o])}catch(r){let e,t;if(r instanceof I.SM||r instanceof I.Gy){if(l)return;e=r.abiItem.name,t=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const o=(0,ye.U)(n,{args:t?[]:{},eventName:e});s([o])}},onError(e){i?.(e)}});c=d,o||c()}catch(u){i?.(u)}})(),c})()}(e,t),watchEvent:t=>function(e,{address:t,args:n,batch:r=!0,event:o,events:a,onError:i,onLogs:s,poll:c,pollingInterval:u=e.pollingInterval,strict:l}){const d="undefined"!==typeof c?c:"webSocket"!==e.transport.type,f=l??!1;return d?ze((0,$e.P)(["watchEvent",t,n,r,e.uid,o,u]),{onLogs:s,onError:i},(i=>{let s,c,l=!1;const d=Ke((async()=>{if(l)try{let u;if(c)u=await ve(0,{filter:c});else{const r=await le(e);u=s&&s!==r?await Ee(e,{address:t,args:n,event:o,events:a,fromBlock:s+1n,toBlock:r}):[],s=r}if(0===u.length)return;r?i.onLogs(u):u.forEach((e=>i.onLogs([e])))}catch(u){c&&u instanceof Je.yR&&(l=!1),i.onError?.(u)}else{try{c=await te(e,{address:t,args:n,event:o,events:a,strict:f})}catch{}l=!0}}),{emitOnBegin:!0,interval:u});return async()=>{c&&await Oe(0,{filter:c}),d()}})):(()=>{let r=!0,c=()=>r=!1;return(async()=>{try{const u=a??(o?[o]:void 0);let d=[];u&&(d=[u.flatMap((e=>Z({abi:[e],eventName:e.name,args:n})))],o&&(d=d[0]));const{unsubscribe:h}=await e.transport.subscribe({params:["logs",{address:t,topics:d}],onData(e){if(!r)return;const t=e.result;try{const{eventName:e,args:n}=be({abi:u,data:t.data,topics:t.topics,strict:f}),r=(0,ye.U)(t,{args:n,eventName:e});s([r])}catch(n){let e,r;if(n instanceof I.SM||n instanceof I.Gy){if(l)return;e=n.abiItem.name,r=n.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const o=(0,ye.U)(t,{args:r?[]:{},eventName:e});s([o])}},onError(e){i?.(e)}});c=h,r||c()}catch(u){i?.(u)}})(),c})()}(e,t),watchPendingTransactions:t=>function(e,{batch:t=!0,onError:n,onTransactions:r,poll:o,pollingInterval:a=e.pollingInterval}){return("undefined"!==typeof o?o:"webSocket"!==e.transport.type)?ze((0,$e.P)(["watchPendingTransactions",e.uid,t,a]),{onTransactions:r,onError:n},(n=>{let r;const o=Ke((async()=>{try{if(!r)try{return void(r=await ne(e))}catch(a){throw o(),a}const i=await ve(0,{filter:r});if(0===i.length)return;t?n.onTransactions(i):i.forEach((e=>n.onTransactions([e])))}catch(a){n.onError?.(a)}}),{emitOnBegin:!0,interval:a});return async()=>{r&&await Oe(0,{filter:r}),o()}})):(()=>{let t=!0,o=()=>t=!1;return(async()=>{try{const{unsubscribe:a}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!t)return;const n=e.result;r([n])},onError(e){n?.(e)}});o=a,t||o()}catch(a){n?.(a)}})(),o})()}(e,t)}}function Ze(e){const{key:t="public",name:n="Public Client"}=e;return(0,c.e)({...e,key:t,name:n,type:"publicClient"}).extend(Ye)}var Xe=n(62635),et=n(14160);function tt(e,t={}){const{key:n="fallback",name:r="Fallback",rank:o=!1,retryCount:a,retryDelay:i}=t;return({chain:t,pollingInterval:s=4e3,timeout:c})=>{let u=e,l=()=>{};const d=(0,et.q)({key:n,name:r,async request({method:e,params:n}){const r=async(o=0)=>{const a=u[o]({chain:t,retryCount:0,timeout:c});try{const t=await a.request({method:e,params:n});return l({method:e,params:n,response:t,transport:a,status:"success"}),t}catch(i){if(l({error:i,method:e,params:n,transport:a,status:"error"}),(0,Xe.y)(i))throw i;if(o===u.length-1)throw i;return r(o+1)}};return r()},retryCount:a,retryDelay:i,type:"fallback"},{onResponse:e=>l=e,transports:u.map((e=>e({chain:t,retryCount:0})))});if(o){const e="object"===typeof o?o:{};!function({chain:e,interval:t=4e3,onTransports:n,sampleCount:r=10,timeout:o=1e3,transports:a,weights:i={}}){const{stability:s=.7,latency:c=.3}=i,u=[],l=async()=>{const i=await Promise.all(a.map((async t=>{const n=t({chain:e,retryCount:0,timeout:o}),r=Date.now();let a,i;try{await n.request({method:"net_listening"}),i=1}catch{i=0}finally{a=Date.now()}return{latency:a-r,success:i}})));u.push(i),u.length>r&&u.shift();const d=Math.max(...u.map((e=>Math.max(...e.map((({latency:e})=>e)))))),f=a.map(((e,t)=>{const n=u.map((e=>e[t].latency)),r=1-n.reduce(((e,t)=>e+t),0)/n.length/d,o=u.map((e=>e[t].success)),a=o.reduce(((e,t)=>e+t),0)/o.length;return 0===a?[0,t]:[c*r+s*a,t]})).sort(((e,t)=>t[0]-e[0]));n(f.map((([,e])=>a[e]))),await(0,We.D)(t),l()};l()}({chain:t,interval:e.interval??s,onTransports:e=>u=e,sampleCount:e.sampleCount,timeout:e.timeout,transports:u,weights:e.weights})}return d}}var nt=n(88822);class rt extends b.G{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var ot=n(68583);function at(e,{errorInstance:t,timeout:n,signal:r}){return new Promise(((o,a)=>{(async()=>{let i;try{const s=new AbortController;n>0&&(i=setTimeout((()=>{r?s.abort():a(t)}),n)),o(await e({signal:s?.signal}))}catch(s){"AbortError"===s.name&&a(t),a(s)}finally{clearTimeout(i)}})()}))}let it=0;const st=new Map;async function ct(e){const t=new URL(e),r=t.toString();let o=st.get(r);if(o)return o;const{schedule:a}=(0,ot.S)({id:r,fn:async()=>{let e=await n.e(5289).then(n.bind(n,55289));e=e.default?.constructor?e.default:e.WebSocket;const a=new e(t),i=new Map,s=new Map,c=({data:e})=>{const t=JSON.parse(e),n="eth_subscription"===t.method,r=n?t.params.subscription:t.id,o=n?s:i,a=o.get(r);a&&a({data:e}),n||o.delete(r)},u=()=>{st.delete(r),a.removeEventListener("close",u),a.removeEventListener("message",c)};return a.addEventListener("close",u),a.addEventListener("message",c),a.readyState===e.CONNECTING&&await new Promise(((e,t)=>{a&&(a.onopen=e,a.onerror=t)})),o=Object.assign(a,{requests:i,subscriptions:s}),st.set(r,o),[o]}}),[i,[s]]=await a();return s}const ut={http:async function(e,{body:t,fetchOptions:n={},timeout:r=1e4}){const{headers:o,method:a,signal:i}=n;try{const s=await at((async({signal:s})=>await fetch(e,{...n,body:Array.isArray(t)?(0,$e.P)(t.map((e=>({jsonrpc:"2.0",id:it++,...e})))):(0,$e.P)({jsonrpc:"2.0",id:it++,...t}),headers:{...o,"Content-Type":"application/json"},method:a||"POST",signal:i||(r>0?s:void 0)})),{errorInstance:new nt.W5({body:t,url:e}),timeout:r,signal:!0});let c;if(c=s.headers.get("Content-Type")?.startsWith("application/json")?await s.json():await s.text(),!s.ok)throw new nt.Gg({body:t,details:(0,$e.P)(c.error)||s.statusText,headers:s.headers,status:s.status,url:e});return c}catch(s){if(s instanceof nt.Gg)throw s;if(s instanceof nt.W5)throw s;throw new nt.Gg({body:t,details:s.message,url:e})}},webSocket:function(e,{body:t,onResponse:n}){if(e.readyState===e.CLOSED||e.readyState===e.CLOSING)throw new nt.c9({body:t,url:e.url,details:"Socket is closed."});const r=it++,o=({data:a})=>{const i=JSON.parse(a);"number"===typeof i.id&&r!==i.id||(n?.(i),"eth_subscribe"===t.method&&"string"===typeof i.result&&e.subscriptions.set(i.result,o),"eth_unsubscribe"===t.method&&e.subscriptions.delete(t.params?.[0]))};return e.requests.set(r,o),e.send(JSON.stringify({jsonrpc:"2.0",...t,id:r})),e},webSocketAsync:async function(e,{body:t,timeout:n=1e4}){return at((()=>new Promise((n=>ut.webSocket(e,{body:t,onResponse:n})))),{errorInstance:new nt.W5({body:t,url:e.url}),timeout:n})}};var lt=n(57292),dt=n(58617);const ft=e=>(t,n,r)=>{const o=r.subscribe;r.subscribe=(e,t,n)=>{let a=e;if(t){const o=(null==n?void 0:n.equalityFn)||Object.is;let i=e(r.getState());a=n=>{const r=e(n);if(!o(i,r)){const e=i;t(i=r,e)}},(null==n?void 0:n.fireImmediately)&&t(i,i)}return o(a)};return e(t,n,r)};function ht(e,t){let n;try{n=e()}catch(r){return}return{getItem:e=>{var r;const o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),a=null!=(r=n.getItem(e))?r:null;return a instanceof Promise?a.then(o):o(a)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}const pt=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>pt(e)(n),catch(e){return this}}}catch(n){return{then(e){return this},catch:e=>pt(e)(n)}}},mt=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),((e,t)=>(n,r,o)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},i=!1;const s=new Set,c=new Set;let u;try{u=a.getStorage()}catch(b){}if(!u)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)}),r,o);const l=pt(a.serialize),d=()=>{const e=a.partialize({...r()});let t;const n=l({state:e,version:a.version}).then((e=>u.setItem(a.name,e))).catch((e=>{t=e}));if(t)throw t;return n},f=o.setState;o.setState=(e,t)=>{f(e,t),d()};const h=e(((...e)=>{n(...e),d()}),r,o);let p;const m=()=>{var e;if(!u)return;i=!1,s.forEach((e=>e(r())));const t=(null==(e=a.onRehydrateStorage)?void 0:e.call(a,r()))||void 0;return pt(u.getItem.bind(u))(a.name).then((e=>{if(e)return a.deserialize(e)})).then((e=>{if(e){if("number"!==typeof e.version||e.version===a.version)return e.state;if(a.migrate)return a.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return p=a.merge(e,null!=(t=r())?t:h),n(p,!0),d()})).then((()=>{null==t||t(p,void 0),i=!0,c.forEach((e=>e(p)))})).catch((e=>{null==t||t(void 0,e)}))};return o.persist={setOptions:e=>{a={...a,...e},e.getStorage&&(u=e.getStorage())},clearStorage:()=>{null==u||u.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>i,onHydrate:e=>(s.add(e),()=>{s.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),p||h})(e,t)):((e,t)=>(n,r,o)=>{let a={storage:ht((()=>localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},i=!1;const s=new Set,c=new Set;let u=a.storage;if(!u)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)}),r,o);const l=()=>{const e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},d=o.setState;o.setState=(e,t)=>{d(e,t),l()};const f=e(((...e)=>{n(...e),l()}),r,o);let h;const p=()=>{var e,t;if(!u)return;i=!1,s.forEach((e=>{var t;return e(null!=(t=r())?t:f)}));const o=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=r())?e:f))||void 0;return pt(u.getItem.bind(u))(a.name).then((e=>{if(e){if("number"!==typeof e.version||e.version===a.version)return e.state;if(a.migrate)return a.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return h=a.merge(e,null!=(t=r())?t:f),n(h,!0),l()})).then((()=>{null==o||o(h,void 0),h=r(),i=!0,c.forEach((e=>e(h)))})).catch((e=>{null==o||o(void 0,e)}))};return o.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{null==u||u.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>p(),hasHydrated:()=>i,onHydrate:e=>(s.add(e),()=>{s.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},a.skipHydration||p(),h||f})(e,t),bt=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"===typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!==typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,a={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,a),a},gt=e=>e?bt(e):bt;var yt=n(60263);function vt(e,t){if(Object.is(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;re[t++]}(function(e){let t=0;function n(){return e[t++]<<8|e[t++]}let r=n(),o=1,a=[0,1];for(let v=1;v>--c&1}const d=2**31,f=d>>>1,h=d-1;let p=0;for(let v=0;v<31;v++)p=p<<1|l();let m=[],b=0,g=d;for(;;){let e=Math.floor(((p-b+1)*o-1)/g),t=0,n=r;for(;n-t>1;){let r=t+n>>>1;e>>1|l(),i=i<<1^f,s=(s^f)<<1|f|1;b=i,g=1+s-i}let y=r-4;return m.map((t=>{switch(t-y){case 3:return y+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return y+256+(e[s++]<<8|e[s++]);case 1:return y+e[s++];default:return t-1}}))}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,n)=>t[e.charCodeAt(0)]=n));let n=e.length,r=new Uint8Array(6*n>>3);for(let o=0,a=0,i=0,s=0;o=8&&(r[a++]=s>>(i-=8));return r}(e)))}function At(e){return 1&e?~e>>1:e>>1}function xt(e,t){let n=Array(e);for(let r=0,o=0;r{let t=Pt(e);if(t.length)return t}))}function jt(e){let t=[];for(;;){let n=e();if(0==n)break;t.push(Tt(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push(St(n,e))}return t.flat()}function It(e){let t=[];for(;;){let n=e(t.length);if(!n)break;t.push(n)}return t}function Ot(e,t,n){let r=Array(e).fill().map((()=>[]));for(let o=0;or[t].push(e)));return r}function Tt(e,t){let n=1+t(),r=t(),o=It(t);return Ot(o.length,1+e,t).flatMap(((e,t)=>{let[a,...i]=e;return Array(o[t]).fill().map(((e,t)=>{let o=t*r;return[a+t*n,i.map((e=>e+o))]}))}))}function St(e,t){return Ot(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}var Bt=Et("AEgSbwjEDVYByQKaAQsBOQDpATQAngDUAHsAoABoANQAagCNAEQAhABMAHIAOwA9ACsANgAmAGIAHgAvACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGAAeABMAFwAXAA0ADgAWAA8AFAAVBFsF1QEXE0o3xAXUALIArkABaACmAgPGAK6AMDAwMAE/qAYK7P4HQAblMgVYBVkAPSw5Afa3EgfJwgAPA8meNALGCjACjqIChtk/j2+KAsXMAoPzASDgCgDyrgFCAi6OCkCQAOQA4woWABjVuskNDD6eBBx4AP4COhi+D+wKBirqBgSCaA0cBy4ArABqku+mnIAAXAaUJAbqABwAPAyUFvyp/Mo8INAIvCoDshQ8APcubKQAon4ZABgEJtgXAR4AuhnOBPsKIE04CZgJiR8cVlpM5INDABQADQAWAA9sVQAiAA8ASO8W2T30OVnKluYvChEeX05ZPe0AFAANABYAD2wgXUCYAMPsABwAOgzGFryp/AHauQVcBeMC0KACxLEKTR2kZhR0Gm5M9gC8DmgC4gAMLjSKF8qSAoF8ARMcAL4OaALiAAwuAUlQJpJMCwMt/AUpCthqGK4B2EQAciwSeAIyFiIDKCi6OGwAOuIB9iYAyA7MtgEcZIIAsgYABgCK1EoFHNZsGACoKNIBogAAAAAAKy4DnABoAQoaPu43dQQZGACrAcgCIgDgLBJ0OvRQsTOiKDVJBfsoBVoFWbC5BWo7XkITO1hCmHuUZmCh+QwUA8YIJvJ4JASkTAJUVAJ2HKwoAZCkpjZcA0YYBIRiCgDSBqxAMCQHKgI6XgBsAWIgcgCEHhoAlgFKuAAoahgBsMYDOC4iRFQBcFoGZgJmAPJKGAMqAgYASkIArABeAHQALLYGCPTwGo6AAAAKIgAqALQcSAHSAdwIDDKXeYHpAAsAEgA1AD4AOTR3etTBEGAQXQJNCkxtOxUMAq0PpwvmERYM0irM09kANKoH7ANUB+wDVANUB+wH7ANUB+wDVANUA1QDVBwL8BvUwRBgD0kEbgWPBYwE1wiEJkoRggcpCNNUDnQfHEgDRgD9IyZJHTuUMwwlQ0wNTQQH/TZDbKh9OQNIMaxU9pCjA8wyUDltAh5yEqEAKw90HTW2Tn96SHGhCkxPr7WASWNOaAK/Oqk/+QoiCZRvvHdPBj4QGCeiEPQMMAGyATgN6kvVBO4GOATGH3oZFg/KlZkIoi3aDOom4C6egFcj8iqABepL8TzaC0pRZQ9WC2IJ4DpggUsDHgEKIogK2g02CGoQ8ArGaA3iEUIHNgPSSZcAogb+Cw4dMhWyJg1iqQsGOXQG+BrzC4wmrBMmevkF0BoeBkoBJhr8AMwu5IWtWi5cGU9cBgALIiPEFKVQHQ0iQLR4RRoYBxIlpgKOQ21KhFEzHpAh8zw6DWMuEFF5B/I8AhlMC348m0aoRQsRzz6KPUUiRkwpBDJ8LCwniAnMD4IMtnxvAVYJHgmuDG4TLhEUN8IINgcWKpchJxIIHkaSYJcE9JwD8BPOAwgFPAk+BxADshwqEysVJgUKgSHUAvA20i6wAoxWfQEUBcgPIh/cEE1H3Q7mCJgCYgOAJegAKhUeABQimAhAYABcj9VTAi7ICMRqaSNxA2QU5F4RcAeODlQHpBwwFbwc3nDFXgiGBSigrAlYAXIJlgFcBOAIBjVYjJ0gPmdQi1UYmCBeQTxd+QIuDGIVnES6h3UCiA9oEhgBMgFwBzYM/gJ0EeoRaBCSCOiGATWyM/U6IgRMIYAgDgokA0xsywskJvYM9WYBoBJfAwk0OnfrZ6hgsyEX+gcWMsJBXSHuC49PygyZGr4YP1QrGeEHvAPwGvAn50FUBfwDoAAQOkoz6wS6C2YIiAk8AEYOoBQH1BhnCm6MzQEuiAG0lgNUjoACbIwGNAcIAGQIhAV24gAaAqQIoAACAMwDVAA2AqoHmgAWAII+AToDJCwBHuICjAOQCC7IAZIsAfAmBBjADBIA9DRuRwLDrgKAZ2afBdpVAosCRjIBSiIEAktETgOsbt4A2ABIBhDcRAESqEfIF+BAAdxsKADEAPgAAjIHAj4BygHwagC0AVwLLgmfsLIBSuYmAIAAEmgB1AKGANoAMgB87gFQAEoFVvYF0AJMRgEOLhUoVF4BuAMcATABCgB2BsiKosYEHARqB9ACEBgV3gLvKweyAyLcE8pCwgK921IAMhMKNQqkCqNgWF0wAy5vPU0ACx+lPsQ/SwVOO1A7VTtQO1U7UDtVO1A7VTtQO1UDlLzfvN8KaV9CYegMow3RRMU6RhPYYE5gLxPFLbQUvhXLJVMZOhq5JwIl4VUGDwEt0GYtCCk0che5ADwpZYM+Y4MeLQpIHORTjlT1LRgArkufM6wNqRsSRD0FRHXqYicWCwofAmR+AmI/WEqsWDcdAqH0AmiVAmYGAp+BOBgIAmY4AmYjBGsEfAN/EAN+jzkDOXQUOX86ICACbBoCMjM4BwJtxAJtq+yHMGRCKAFkANsA3gBHAgeVDIoA+wi/AAqyAncsAnafPAJ5SEACeLcaWdhFq0bwAnw8AnrFAn0GAnztR/1IemAhACgSSVVKWBIUSskC0P4C0MlLJAOITAOH40TCkS8C8p5dAAMDq0vLTCoiAMxNSU2sAos8AorVvhgEGkBkArQCjjQCjlk9lH4CjtYCjll1UbFTMgdS0VSCApP4ApMJAOYAGVUbVaxVzQMsGCmSgzLeeGNFODYCl5wC769YHqUAViIClowClnmZAKZZqVoGfkoAOAKWsgKWS1xBXM4CmcgCmWFcx10EFgKcmDm/OpoCnBMCn5gCnrWHABoMLicMAp3uAp6PALI6YTFh7AKe0AKgawGmAp6cHAKeS6JjxWQkIigCJ6wCJnsCoPgCoEnUAqYsAqXLAqf8AHoCp+9oeWiuAABGahlqzgKs4AKsqwKtZAKs/wJXGgJV2QKx3tQDH0tslAKyugoCsuUUbN1tYG1FXAMlygK2WTg8bo0DKUICuFsCuUQSArkndHAzcN4CvRYDLa8DMg4CvoVx/wMzbgK+F3Mfc0wCw8gCwwFzf3RIMkJ03QM8pAM8lwM9vALFeQLGRALGDYYCyGZOAshBAslMAskrAmSaAt3PeHZeeKt5IkvNAxigZv8CYfEZ8JUhewhej164DgLPaALPaSxIUM/wEJwAw6oCz3ABJucDTg9+SAIC3CQC24cC0kwDUlkDU1wA/gNViYCGPMgT6l1CcoLLg4oC2sQC2duEDYRGpzkDhqIALANkC4ZuVvYAUgLfYgLetXB0AuIs7REB8y0kAfSYAfLPhALr8ALpbXYC6vYC6uEA9kQBtgLuhgLrmZanlwAC7jwDhd2YdnDdcZ4C8wAAZgOOE5mQAvcQA5FrA5KEAveVAvnWAvhjmhmaqLg0mxsDnYAC/vcBGAA2nxmfsAMFigOmZwOm1gDOwgMGZ6GFogIGAwxGAQwBHAdqBl62ZAIAuARovA6IHrAKABRyNgAgAzASSgOGfAFgJB4AjOwAHgDmoAScjgi0BhygwgCoBRK86h4+PxZ5BWk4P0EsQiJCtV9yEl+9AJbGBTMAkE0am7o7J2AzErrQDjAYxxiKyfcFWAVZBVgFWQVkBVkFWAVZBVgFWQVYBVkFWAVZRxYI2IZoAwMDCmVe6iwEygOyBjC8vAC8BKi8AOhBKhazBUc+aj5xQkBCt192OF/pAFgSM6wAjP/MbMv9puhGez4nJAUsFyg3Nn5u32vB8hnDLGoBbNdvMRgFYAVrycLJuQjQSlwBAQEKfV5+jL8AND+CAAQW0gbmriQGAIzEDAMCDgDlZh4+JSBLQrJCvUI5JF8oYDcoOSQJwj4KRT9EPnk+gj5xPnICikK9SkM8X8xPUGtOCy1sVTBrDG8gX+E0OxwJaJwKYyQsPR4nQqxCvSzMAsv9X8oPIC8KCQoAACN+nt9rOy5LGMmsya0JZsLMzQphQWAP5hCkEgCTjh5GQiYbqm06zjkKND9EPnFCQBwICx5NSG1cLS5a4rwTCn7uHixCQBxeCUsKDzRVREM4BTtEnC0KghwuQkAb9glUIyQZMTIBBo9i8F8KcmTKYAxgLiRvAERgGjoDHB9gtAcDbBFmT2BOEgIAZOhgFmCWYH5gtGBMYJJpFhgGtg/cVqq8WwtDF6wBvCzOwgMgFgEdBB8BegJtMDGWU4EBiwq5SBsA5SR0jwvLDqdN6wGcAoidUAVBYAD4AD4LATUXWHsMpg0lILuwSABQDTUAFhO4NVUC0wxLZhEcANlPBnYECx9bADIAtwKbKAsWcKwzOaAaAVwBhwn9A9ruEAarBksGugAey1aqWwq7YhOKCy1ADrwBvAEjA0hbKSkpIR8gIi0TJwciDY4AVQJvWJFKlgJvIA9ySAHUdRDPUiEaqrFN6wcSBU1gAPgAPgsBewAHJW0LiAymOTEuyLBXDgwAYL0MAGRKaFAiIhzAADIAtwKbKC08D88CkRh8ULxYyXRzjtilnA72mhU+G+0S2hIHDxwByAk7EJQGESwNNwwAPAC0zwEDAKUA4gCbizAAFQBcG8cvbXcrDsIRAzwlRNTiHR8MG34CfATCC6vxbQA4Oi4Opzkuz6IdB7wKABA7Ls8SGgB9rNsdD7wbSBzOoncfAT4qYB0C7KAJBE3z5R9mDL0M+wg9Cj8ABcELPgJMDbwIvQ09CT0KvS7PoisOvAaYAhwPjBriBBwLvBY8AKELPBC8BRihe90AO2wMPQACpwm9BRzR9QYFB2/LBnwAB7wSXBISvQECAOsCAAB1FVwHFswV/HAXvBg8AC68AuyovAAevAJWISuAAAG8AALkFT0VvCvso7zJqDwEAp8nTAACXADn3hm8CaVcD7/FAPUafAiiBQv/cQDfvKe8GNwavKOMeXMG/KmchAASvAcbDAADlABtvAcAC7ynPAIaPLsIopzLDvwHwak8AOF8L7dtvwNJAAPsABW8AAb8AAm8AGmMABq8AA68Axi8jmoV/AABXAAObAAuTB8ABrwAF7wIIgANSwC6vCcAA7wADpwq7ACyWwAcHAAbvAAB7AqiAAXHCxYV3AAHnABCvAEDAGm8AAt8AB28AAi8CaIABcsAbqAZ1gCSCCIABcsAATwAB9wAHZwIIgAGmwAJfAAbLABtHADmvIEACFwACDwAFLwAaPwJIgAGywDjjAAJPAuiDsX7YAAHPABunUBJAEgACrwFAAM8AAmuAzgABxwAGXwAAgym/AAKHAAKPAAJ/KfsBrwACRwAAwwAEDwBABQ8ABFsAA+MAA3sAA28ABkMBxYcABU8AG6cFrQBvAC7ABM8BABpLAsA4UwAAjwABFMAF3wFHAAG0QAYvB8BfClTADpGALAJBw4McwApK3EBpQYIXwJtJA0ACghwTG1gK4oggRVjLjcDogq1AALZABcC/ARvAXdzSFMVIgNQAhY/AS0GBHRHvnxTe0EAKgAyAvwAVAvcAHyRLQEsAHfmDhIzRwJLAFgGAAJRAQiLzQB5PAQhpgBbANcWAJZpOCCMAM5ssgDQ1RcJw3Z0HBlXHgrSAYmRrCNUVE5JEz3DivoAgB04QSos4RKYUABzASosMSlDGhADMVYE+MbvAExm3QBrAnICQBF7Osh4LzXWBhETIAUVCK6v/xPNACYAAQIbAIYAiQCONgDjALQA1QCdPQC7AKsApgChAOcAnwDTAJwA4AEBAPwAwAB6AFsAywDNAPwA1wDrAIkAogEqAOMA2ADVBAIIKzTT09PTtb/bzM/NQjEWAUsBVS5GAVMBYgFhAVQBRUpCRGcMAUwUBgkEMzcMBwAgDSQmKCs3OTk8PDw9Pg0/HVBQUFBSUlFSKFNUVlVVHFxgYF9hYCNlZ29ucXFxcXFxc3Nzc3Nzc3Nzc3N1dXZ1dFsAPesAQgCTAHEAKwBf8QCHAFAAUAAwAm/oAIT+8fEAXQCM6wCYAEgAWwBd+PipAH4AfgBiAE8AqgAdAK8AfAI5AjwA9QDgAPcA9wDhAPgA4gDiAOEA3wAoAnQBSgE5ATcBTQE3ATcBNwEyATEBMQExARUBURAAKgkBAEwYCxcEFhcPAIcAjwCfAEoAYxkCKgBvAGgAkAMOAyArAxpCP0gqAIoCSADAAlACnQC5Ao8CjwKPAo8CjwKPAoQCjwKPAo8CjwKPAo8CjgKOApECmQKQAo8CjwKNAo0CjQKNAosCjgJuAc0CkAKYAo8CjwKOF3oMAPcGA5gCWgIzGAFNETYC2xILLBQBRzgUTpIBdKU9AWJaAP4DOkgA/wCSKh4ZkGsAKmEAagAvAIoDlcyM8K+FWwa7LA/DEgKe1nUrCwQkWwGzAN5/gYB/gX+Cg4N/hIeFf4aJh4GIg4mDin+Lf4x/jYuOf49/kIORf5J/k3+Uf5WElomXg5h/AIMloQCEBDwEOQQ7BD4EPARCBD8EOgRABEIEQQQ9BD8EQgCkA4gAylIA0AINAPdbAPcBGgD3APUA9QD2APXVhSRmvwD3APUA9QD2APUdAIpbAPcAigEaAPcAigLtAPcAitWFJGa/HQD4WwEaAPcA9wD1APUA9gD1APgA9QD1APYA9dWFJGa/HQCKWwEaAPcAigD3AIoC7QD3AIrVhSRmvx0CRAE3AksBOgJMwgOfAu0Dn9WFJGa/HQCKWwEaA58AigOfAIoC7QOfAIrVhSRmvx0EMQCKBDIAigeOMm4hLQCKAT9vBCQA/gDHWwMAVVv/FDMDAIoDPtkASgMAigMAl2dBtv/TrfLzakaPh3aztmIuZQrR3ER2n5Yo+qNR2jK/aP/V04UK1njIJXLgkab9PjOxyJDVbIN3R/FZLoZVl2kYFQIZ7V6LpRqGDt9OdDohnJKp5yX/HLj0voPpLrneDaN11t5W3sSM4ALscgSw8fyWLVkKa/cNcQmjYOgTLZUgOLi2F05g4TR0RfgZ4PBdntxdV3qvdxQt8DeaMMgjJMgwUxYN3tUNpUNx21AvwADDAIa0+raTWaoBXmShAl5AThpMi282o+WzOKMlxjHj7a+DI6AM6VI9w+xyh3Eyg/1XvPmbqjeg2MGXugHt8wW03DQMRTd5iqqOhjLvyOCcKtViGwAHVLyl86KqvxVX7MxSW8HLq6KCrLpB8SspAOHO9IuOwCh9poLoMEha9CHCxlRAXJNDobducWjqhFHqCkzjTM2V9CHslwq4iU19IxqhIFZMve15lDTiMVZIPdADXGxTqzSTv0dDWyk1ht430yvaYCy9qY0MQ3cC5c1uw4mHcTGkMHTAGC99TkNXFAiLQgw9ZWhwKJjGCe+J5FIaMpYhhyUnEgfrF3zEtzn40DdgCIJUJfZ0mo3eXsDwneJ8AYCr7Vx2eHFnt2H6ZEyAHs9JoQ4Lzh5zBoGOGwAz37NOPuqSNmZf51hBEovtpm2T1wI79OBWDyvCFYkONqAKGVYgIL0F+uxTcMLSPtFbiNDbBPFgip8MGDmLLHbSyGXdCMO6f7teiW9EEmorZ+75KzanZwvUySgjoUQBTfHlOIerJs6Y9wLlgDw18AB1ne0tZRNgGjcrqHbtubSUooEpy4hWpDzTSrmvqw0H9AoXQLolMt9eOM+l9RitBB1OBnrdC1XL4yLFyXqZSgZhv7FnnDEXLUeffb4nVDqYTLY6X7gHVaK4ZZlepja2Oe6OhLDI/Ve5SQTCmJdH3HJeb14cw99XsBQAlDy5s5kil2sGezZA3tFok2IsNja7QuFgM30Hff3NGSsSVFYZLOcTBOvlPx8vLhjJrSI7xrNMA/BOzpBIJrdR1+v+zw4RZ7ry6aq4/tFfvPQxQCPDsXlcRvIZYl+E5g3kJ+zLMZon0yElBvEOQTh6SaAdIO6BwdqJqfvgU+e8Y65FQhdiHkZMVt9/39N2jGd26J6cNjq8cQIyp6RonRPgVn2fl89uRDcQ27GacaN0MPrcNyRlbUWelKfDfyrNVVGBG5sjd3jXzTx06ywyzuWn5jbvEfPPCTbpClkgEu9oPLKICxU5HuDe3jA1XnvU85IYYhaEtOU1YVWYhEFsa4/TQj3rHdsU2da2eVbF8YjSI0m619/8bLMZu3xildwqM7zf1cjn4Whx0PSYXcY5bR7wEQfGC7CTOXwZdmsdTO8q3uGm7Rh/RfCWwpzBHCAaVfjxgibL5vUeL0pH6bzDmI9yCXKC/okkmbc28OJvI87L/bjFzpq0DHepw4kT1Od+fL7cyuFaRgfaUWB2++TCFvz11J0leEtrGkpccfX9z2LY39sph4PBHCjNOOkd0ybUm+ZzS8GkFbqMpq8uiX2yHpa0jllTLfGTDBMYR6FT5FWLLDPMkYxt1Q0eyMvxJWztDjy0m6VvZPvamrFXjHmPpU6WxrZqH6WW//I37RwvqPQhPz8I3RPuXAk1C94ZprQWm9iGM/KgiGDO6SV9sjp+Jmk4TBajMNJ5zzWZ1k1jrteQQBp9C2dOvmbIeeEME8y573Q8TgGe+ZCzutM45gYLBzYm2LNvgq2kebAbMpHRDSyh6dQ27GbsAAdCqQVVXWC1C+zpwBM2Lr4eqtobmmu1vJEDlIQR1iN8CUWpztq50z7FFQBn3SKViX6wSqzVQCoYvAjByjeSa+h1PRnYWvBinTDB9cHt4eqDsPS4jcD3FwXJKT0RQsl8EvslI2SFaz2OtmYLFV8FwgvWroZ3fKmh7btewX9tfL2upXsrsqpLJzpzNGyNlnuZyetg7DIOxQTMBR7dqlrTlZ6FWi1g4j1NSjA2j1Yd7fzTH6k9LxCyUCneAKYCU581bnvKih6KJTeTeCX4Zhme/QIz7w2o+AdSgtLAkdrLS9nfweYEqrMLsrGGSWXtgWamAWp6+x6GM/Z8jNw3BqPNQ39hrzYLECn3tPvh/LqKbRSCiDGauDKBBj/kGbpnM1Bb/my8hv4NWStclkwjfl57y4oNDgw1JAG9VOti3QVVoSziMEsSdfEjaCPIDb7SgpLXykQsM+nbqbt97I0mIlzWv0uqFobLMAq8Rd9pszUBKxFhBPwOjf//gVOz2r7URJ2OnpviCXv9iz3a4X/YLBYbXoYwxBv/Kq0a5s4utQHzoTerJ7PmFW/no/ZAsid/hRIV82tD+Qabh5F1ssIM8Ri3chu0PuPD3sSJRMjDoxLAbwUbroiPAz/V52e8s3DIixxlO7OrvhMj3qfzA0kKxzwicr5wJmZwJxTXgrwYsqhRvpgC2Nfdyd+TYYxJSZgk+gk2g9KyHSlwQVAyPtWWgvVGyVBqsU2LpDlLNosSAtolC1uBKt5pQZLhAxTjeGCWIC/HVpagc5rRwkgpCHKEsjA8d+scp8aiMewwQBhp5dYTV5t/Nvl+HbDMu8F3S0psPyZb1bSnqlHPFUnMQeQqSqwDBT23fJO9gO3aVaa1icrXU0PKwlMM5K+iL3ATcVq2fFWKk0irCTF4LDVDG4gUpkyplq6efcZS+WDR1woApjD18x+2JQR9oOXzuA7uy4b+/91WsJd/tSd1QcAH8PVPXApieA37B7YXPhDPH1azP3PKR+HfHmOoDYLeuKsIi/ssSsdYs62qJo14Hw1P2N/6zpr8F3FTWmJ4ysAVcl84Iv/tl///Z8FaAWbBQbyMNDZjrZ2JwdRjtd1jOeNumSodFtr4/Zf45iRJf/8HSW+KIB/+GlKu8Rv1BPLr/4duoL+kFPRqrstEr41gfJupoJRf4hcYDWX93FOcfEBiIivxtjtV8g7mvOReiamYWKE7vfPbv3v2L9Kwq3cIDFGLyhyfOGuf/9vA5muH6Pjg7B4SUj2ydDXra9fSBI+DrsNHA6l51wfHssJb+11TfNk7B8OleUe3Y+ZmHboMFHdv7FFP2cfISFyeAQR0sk/Xv62HBTdW4HmnGSLFk/cqyWVVFJkdIIa+4hos3JRHcqLoRKM5h2Qtk1RZtzISMtlXTfTqIc77YsCCgQD0r61jtxskCctwJOtjE/pL8wC4LBD4AZFjh2wzzFCrT/PNqW0/DeBbkfMfzVm9yy06WiF+1mTdNNEAytVtohBKg3brWd2VQa+aF+cQ0mW5CvbwOlWCT07liX226PjiVLwFCRs/Ax2/u+ZNPjrNFIWIPf5GjHyUKp60OeXe9F01f7IaPf/SDTvyDAf7LSWWejtiZcsqtWZjrdn6A2MqBwnSeKhrZOlUMmgMionmiCIvXqKZfmhGZ1MwD3uMF4n9KJcfWLA3cL5pq48tm5NDYNh3SS/TKUtmFSlQR89MR4+kxcqJgpGbhm9gXneDELkyqAN5nitmIzTscKeJRXqd64RiaOALR2d295NWwbjHRNG2AU5oR9OS2oJg/5CY6BFPc1JvD2Mxdhp2/MZdI8dLePxiP4KRIp8VXmqfg+jqd/RNG7GNuq1U2SiI4735Bdc0MVFx6mH5UOWEa5HuhYykd6t4M1gYLVS8m1B+9bUqi5DziQq7qT8d94cxB6AB4WqMCOF/zPPtRSZUUaMSsvHOWxGASufywTX8ogy6HgUf9p+Z30wUEosl8qgmwm6o2AV6nO9HKQjRHpN6SUegI5pvR61RLnUJ1lqCtmfcsRQutEizVpAaPXN7xMp5UQ5OSZK6tniCK9CpyMd7LjR6+MxfoMEDPpWdf2p2m5N3KO4QMxf+V7vGdYjemQczQ+m2MGIkFNYDMf0Yop2eSx81sP36WHUczqEhKysp2iJSYAvfgJjinKwToPvRKb+HBi+7cJ96S5ngfLOXaHAFRLkulo4TnXTFO51gX0TCCo4ZUHdbpdgkMEwUZAPjh6M+hA8DzycbtxAgH3uD6i0nN1aTiIuQ4BYCE9dEHHwAmINU+4YEWx4EC3OZwFGfYZMPLScVlb+BAAJeARUh+gdWA3/gRqCrf1jecgqeFf1MdzrrP4SVlGm5mMihSP+zYYksAB7O+SBPwNQqSNMiLnkviY/klwgcRmvqtCqeWeA0gjuir4CMZqmw/ntP6M+l0pdN8/P9xI53aP7x/zavJbbKOz8VzO/nXxIr1tjparMnqd6iWdByHKw4lF4p/u57Yv07WeZPDnRl7wgmDVZZ44fQsjdYO/gmXQ+940PRGst8UMQApFC4OOV22e4N+lVOPyFLAOj4t8R3PFw/FjbSWy0ELuAFReNkee8ORcBOT2NPDcs7OfpUmzvn/F9Czk9o9naMyVYy/j8I5qVFmQDFcptBp65J/+sJA3w/j6y/eqUkKxTsf0CZjtNdRSBEmJ2tmfgmJbqpcsSagk+Ul9qdyV+NnqFBIJZFCB1XwPvWGDBOjVUmpWGHsWA5uDuMgLUNKZ4vlq5qfzY1LnRhCc/mh5/EX+hzuGdDy5aYYx4BAdwTTeZHcZpl3X0YyuxZFWNE6wFNppYs3LcFJePOyfKZ8KYb7dmRyvDOcORLPH0sytC6mH1US3JVj6paYM1GEr+CUmyHRnabHPqLlh6Kl0/BWd3ebziDfvpRQpPoR7N+LkUeYWtQ6Rn5v5+NtNeBPs2+DKDlzEVR5aYbTVPrZekJsZ9UC9qtVcP99thVIt1GREnN8zXP8mBfzS+wKYym8fcW6KqrE702Zco+hFQAEIR7qimo7dd7wO8B7R+QZPTuCWm1UAwblDTyURSbd85P4Pz+wBpQyGPeEpsEvxxIZkKsyfSOUcfE3UqzMFwZKYijb7sOkzpou+tC4bPXey5GI1GUAg9c3vLwIwAhcdPHRsYvpAfzkZHWY20vWxxJO0lvKfj6sG2g/pJ1vd/X2EBZkyEjLN4nUZOpOO7MewyHCrxQK8d5aF7rCeQlFX+XksK6l6z971BPuJqwdjj68ULOj9ZTDdOLopMdOLL0PFSS792SXE/EC9EDnIXZGYhr52aQb+9b2zEdBSnpkxAdBUkwJDqGCpZk/HkRidjdp0zKv/Cm52EenmfeKX6HkLUJgMbTTxxIZkIeL/6xuAaAAHbA7mONVduTHNX/UJj1nJEaI7f3HlUyiqKn7VfBE+bdb4HWln1HPJx001Ulq1tOxFf8WZEARvq5Da1+pE7fPVxLntGACz3nkoLsKcPdUqdCwwiyWkmXTd5+bv3j7HaReRt3ESn783Ew3SWsvkEjKtbocNksbrLmV+GVZn1+Uneo35MT1/4r8fngQX5/ptORfgmWfF6KSB/ssJmUSijXxQqUpzkANEkSkYgYj560OOjJr6uqckFuO15TRNgABEwNDjus1V3q2huLPYERMCLXUNmJJpbMrUQsSO7Qnxta55TvPWL6gWmMOvFknqETzqzFVO8SVkovEdYatypLGmDy9VWfgAc0KyIChiOhbd7UlbAeVLPZyEDp4POXKBwN/KP5pT6Cyqs6yaI00vXMn1ubk9OWT9Q/O2t/C25qlnO/zO0xcBzpMBCAB8vsdsh3U8fnPX1XlPEWfaYJxKVaTUgfCESWl4CCkIyjE6iQ5JFcwU6S4/IH0/Agacp8d5Gzq2+GzPnJ7+sqk40mfFQpKrDbAKwLlr3ONEati2k/ycLMSUu7V/7BBkDlNyXoN9tvqXCbbMc4SSQXgC/DBUY9QjtrCtQ+susEomCq8xcNJNNMWCH31GtlTw2BdCXkJBjT+/QNWlBWwQ5SWCh1LdQ99QVii/DyTxjSR6rmdap3l3L3aiplQpPYlrzNm9er88fXd2+ao+YdUNjtqmxiVxmyYPzJxl67OokDcTezEGqldkGgPbRdXA+fGcuZVkembZByo7J1dMnkGNjwwCny+FNcVcWvWYL9mg8oF7jACVWI3bA64EXpdM8bSIEVIAs5JJH+LHXgnCsgcMGPZyAAVBncvbLiexzg9YozcytjPXVlAbQAC7Tc4S0C8QN4LlAGjj4pQAVWrwkaDoUYGxxvkCWKRRHkdzJB5zpREleBDL1oDKEvAqmkDibVC4kTqF89YO6laUjgtJPebBfzr16tg4t10GmN1sJ5vezk2sUOq8blCn5mPZyT3ltaDcddKupQjqusNM9wtFVD0ABzv17fZDn7GPT1nkCtdcgYejcK1qOcTGtPxnCX1rErEjVWCnEJv5HaOAUjgpiKQjUKkQi64D5g2COgwas8FcgIl0Pw95H9dWxE3QG0VbMNffh6BPlAojLDf4es2/5Xfq7hw5NGcON2g8Qsy2UQm94KddKyy3kdJxWgpNaEc15xcylbLC3vnT26u8qS90qc2MU8LdOJc5VPF5KnSpXIhnj1eJJ/jszjZ01oR6JDFJRoeTPO/wh4IPFbdG9KljuSzeuI92p8JF/bpgDE8wG86/W2EBKgPrmzdLijxssQn8mM44ky/KLGOJcrSwXIpZa/Z3v7W6HCRk7ewds99LTsUW1LbeJytw8Q/BFZVZyfO9BUHOCe2suuEkO8DU4fLX0IQSQ2TdOkKXDtPf3sNV9tYhYFueuPRhfQlEEy+aYM/MCz7diDNmFSswYYlZZPmKr2Q5AxLsSVEqqBtn6hVl1BCFOFExnqnIsmyY/NA8jXnDaNzr7Zv3hu+I1Mf/PJjk0gALN2G8ABzdf9FNvWHvZHhv6xIoDCXf964MxG92vGZtx/LYU5PeZqgly8tT5tGeQGeJzMMsJc5p+a5Rn2PtEhiRzo/5Owjy1n0Lzx3ev8GHQmeWb8vagG6O5Qk5nrZuQTiKODI4UqL0LLAusS2Ve7j1Ivdxquu1BR9Rc4QkOiUPwQXJv6du2E8i5pDhVoQpUhyMWGUT2O2YODIhjAfI71gxep5r5zAY7GBUZpy51hAw0pcCCrhOmU8Wp6ujQTdZQsCjtq6SHX8QAMNiPCIIkoxhHEZPgsBcOlP4aErJZPhF7qvx6gHrn8hEwPwYbx8YmT/n7lbcmTip1v8kgsrIjFTAlvLY4Nuil0KDmgz3svYs0ZJ3O3Is/vSx4xpxF1e2VAtZE8dJxGYEIhCSuPvCjP54l/NSNDnwlKvAW8mG+AQkgp7a87Igh26uKMFGD0PoPHTSvoWxiHuk+su8XkQiHIjeYKl/RdcOHpxhQH3zHCNE3aARm83Bl6zGxU/vMltlVPQhubcqhW4RYkl6uXk5JdP/QpzaKFpw2M8zvysv2qj7xaQECuu2akM0Cssj/uB9+wDR7uA6XOnLNaoczalHoMj33eiiu+DRaFsUmlmUZuh9bjDY4INMNSSAivSh03uJvny4Gj+D+neudoa7iJi7c4VFlZ/J5gUR82308zSNAt/ZroBXDWw0fV3eVPAn3aX0mtJabF6RsUZmL+Ehn+wn51/4QipMjD+6y64t7bjL6bjENan2prQ4h7++hBJ9NXvX8CUocJqMC937IasLzm5K0qwXeFMAimMHkEIQIQI2LrQ9sLBfXuyp66zWvlsh74GPv7Xpabj993pRNNDuFud5oIcn/92isbADXdpRPbjmbCNOrwRbxGZx2XmYNGMiV5kjF4IKyxCBvKier9U4uVoheCdmk83rp5G0PihAm2fAtczI4b9BWqX+nrZTrJX5kSwQddi93NQrXG+Cl3eBGNkM77VBsMpEolhXex1MVvMkZN9fG59GGbciH11FEXaY1MxrArovaSjE/lUUqBg2cZBNmiWbvzCHCPJ4RVGFK2dTbObM1m+gJyEX53fa7u3+TZpm74mNEzWbkVL4vjNwfL9uzRCu1cgbrNx5Yv5dDruNrIOgwIk+UZWwJfdbu/WHul6PMmRflVCIzd7B37Pgm/Up/NuCiQW7RXyafevN3AL6ycciCc4ZPlTRzEu+aURGlUBOJbUEsheX7PPyrrhdUt5JAG12EEEZpY/N3Vhbl5uLAfT0CbC2XmpnryFkxZmBTs5prvEeuf0bn73i3O82WTiQtJWEPLsBXnQmdnKhB06NbbhLtlTZYJMxDMJpFeajSNRDB2v61BMUHqXggUwRJ19m6p5zl51v11q34T74lTXdJURuV6+bg2D6qpfGnLy7KGLuLZngobM4pIouz4+n0/UzFKxDgLM4h+fUwKZozQ9UGrHjcif51Ruonz7oIVZ56xWtZS8z7u5zay6J2LD4gCYh2RXoBRLDKsUlZ80R8kmoxlJiL8aZCy2wCAonnucFxCLT1HKoMhbPKt34D97EXPPh0joO93iJVF1Uruew61Qoy3ZUVNX9uIJDt9AQWKLLo+mSzmTibyLHq0D6hhzpvgUgI6ekyVEL3FD+Fi5R3A8MRHPXspN1VyKkfRlC+OGiNgPC4NREZpFETgVmdXrQ2TxChuS3aY+Ndc7CiYv5+CmzfiqeZrWIQJW/C4RvjbGUoJFf1K6ZdR2xL/bG4kVq1+I4jQWX+26YUijpp+lpN7o5c6ZodXJCF56UkFGsqz44sIg8jrdWvbjRCxi2Bk0iyM3a7ecAV93zB6h1Ei38c0s6+8nrbkopArccGP8vntQe1bFeEh2nJIFOHX/k3/UHb5PtKGpnzbkmnRETMX+9X/QduLZWw/feklW/kH/JnzToJe9Kgu9Hct1UGbH5BPCLo4OOtQnZonW0xnyCcdtKyPQ/sbLiSTYJdSx4sJqWLMnfn6fIqPB3WAgk00J+fCOkomPHqtS67pf0mFmKoItYZUlJu6BihSZ8qve8+/X+LX1MhQXF95AshfUleCtmdn6l6QFXzLg2sgLn1oyVFuZecv7fzsIHzoRlAGp0gwYDOn1S4qabWvB5xUaE+Svw4KmjWtxdnuQbI32dw87D4N95u8qQRJTSQg0wLxOLkxSrPMLEn1UIhNKjAa9VLs3WLaXGrtCIt8bKY2AQP/ZdyRU6zT/E8qP2ltyBE2CCZPgWgEYDoJJO4n92y61ylNaSFXKohJhLjkfvYWm592539sIpmBNLlDo1bExFBfmHJJ0lFEiC/fj8v42OoMC9Mo3whIoWvyHfq6Uacqq55mzFf/EGC+NP/gHjhd6urc6R0hES27VXux7UY8CGKPohplWIZtTrFSaPWslCWy78E22Pw8fvReSUZx/txqLtHrFqg1DY/Eus6Iq1heZdrdcqE0/c971Bz1HW/XNXHsXpUIbI4kHdOfCc6T5zHZzvzQJB0ggMFL6IGPAilU9bj/ASdPk6fNvNtZqPuwEDhMBtBnhCexo6D6VAGIOPvJPPV523Y8R8a9vCqZbswSZKzOT1291BsUbmUWehtbb1fdRX9hiJKXvwr1QX6GjnZMgyMvnwOo2Dr24amr7FqEAbVeJAjRNOceM2EQ1Mna9fInqPJ5mh5X8CzT1aDOv08An0blz0fF5Gq4mS2cwq5glwIOlY5nznE8X4j/UdZ3FJsVIXte1JH0A7iibuPfazStM5O/Vo3KXIpXBeGORV0M9XDXFvsYZUHGvFCUubWzTw248EHE0cpQM2zNg6rjavreq3NHCAWsoZ7wvVy7l5gvtKRmIj1MnvfWEm0yFnGcuOq192350a5WefpfKCcX3Sn+AgHU+qnpstNtddbdVebagJU390lq9ko4aI9rqdaWXYG8tv5O/ZQHSqDRYHC6zfH10l5z++opso7aOSaIczlQ13iAzXvLdEu0V7kwNUZ1c8Y8aq7SeIEe5p902FlNkW8DnwHyueHchbK8vVFJfmr9mz7P8nUSccl1ULaoWMRSI1ls32kvlK0h46h3J25Yd9AzfcJbp9qYF/SEt3H5j69mMdcsNxZcAzT/A89ov3tglTX54y/EwjMfuoDoxPwLJDm5I7q6F9Kp469yNy1zSxz0N4HbRRBj9xFFuogvBspv7DXUNIsGxTINEQfmctb42XImWAODgARNo7dfcTqFKq6aTfivmvunLmzP9f8yLsJvXD3JbcPcDGNriMAcjzeDTNr65t8YB5tsnFDFLa0Uwmd2OvUdkLMX9TsAUYUfooSv47sw5J88j7CpahRjjO3/UhOXjTS39W5YZAel2KTbQd1h7INOw9P23GW7GDAe4agIUFHP48MZr7ubq0efFmmtwYMyk7D0r1oeG/CGOODgb9Ur+JMHxkwzPbtCX2ZnENQuI0RN5SyTIZuoY4XS9Rd/tPe3vNAZGSHM/YYwqs9xkkENx0O+eC2YVW1cwOJ3ckE890nbQeHLKlW15L0P0W2VliyYrfNr0nrIYddoRyGaCtj4OYd2MT7ebApqZOAQIaSHJM4mphhfjNjtnjg6YRyx9qM2FT3xOiYIMqXPFWdzhSgFF8ItocqVV09CmIoO8k6U/oJB7++wSX/YksxfPXHyjSgAGZOj1aKEq9fSvXBqtp2wu8/FxEf5AxapAD06pPGuLVUYLdgEzHR8wqRGYEwiUO9MyYbgswstuLYhwYFpSVKOdzAihZ9LuHtD598EGhINU9xc9xhL+QgTLAstmPIvvm2xyRw/WTUPXkP3ZHu6GyPmj5xFH9/QGpkglKXRVUBgVmLOJx8uZO2AstxQYocZH2JhORlxawj66BAXUEs7K/gPxINIRAFyK3WLuyq9oBTF9wEbnmCot82WjIg7CPNwYK3KrZMrKAz5yFszg4wCVLJVnIL8+OYA0xRDH8cHQjQUiQ2i1mr/be32k/3Xej9sdf3iuGvZHyLFSJvPSqz/wltnxumTJYKZsrWXtx/Rmu39jjV9lFaJttfFn57/No2h/unsJmMHbrnZ8csxkp5HQ4xR1s0HH+t3Iz82a3iQWTUDGq/+l2W3TUYLE8zNdL8Y+5oXaIH/Y2UUcX67cXeN4WvENZjz4+8q7vjhowOI3rSjFhGZ6KzwmU7+5nFV+kGWAZ5z2UWvzq0TK0pk1hPwAN4jbw//1CApRvIaIjhSGhioY6TUmsToek9cF9XjJdHvLPcyyCV3lbR5Jiz/ts46ay2F820VjTXvllElwrGzKcNSyvQlWDXdwrUINXmHorAM3fE19ngLZmgeUaCJLsSITf2VcfAOuWwX7mTPdP8Zb/04KqRniufCpwnDUk7sP0RX6cud/sanFMagnzKInSRVey0YzlVSOtA/AjrofmSH6RYbJQ8b4NDeTkIGc6247+Mnbez/qhJ9GAv9fGNFercPnnrf285Qgs+UqThLRgflcAKFuqWhLzZaR4QqvSwa3xe0LPkqj9xJWub195r7NrrR0e78FR+0mRBNMPsraqZctAUVAJfYKehTDV1MGGQSeDsOK9J3sbUuKRIS/WilX/64CBms9jCZocBlsBSZaIAjWm/SUZ8daWL2a/cJFyUOFqE3Epc2RWbtjNyPwOGpWtzu32kUooUqsJud7IV4E8rstUBXM7tGEtBx99x60g1duhyvxeKJSl8s5E34HTMmADT0836aEdg5Dv9rVyCz8i2REOmiz6wtIVFN0HsjAoN37SrY0bV1Ms8CRUILhvZvvRaDzoVCaSI0u8EPuTe4b7OPowgRGODl22UBBmHSTUY8e4DyL+Bc7bngo+2T8HtNvzyATSL5iJZgFPKpmUyZv54vVL90+/RQGATUmNKnrIvcJMYON9fl83naW5sf6hRkbbTC9RUEE6XADwjgA46wWfUQ+QWZl0J4PVTWAln/YfAz/SV3q3J9+yCYDleruoN5uoc/wT2f4YONGTb6zTGq3V+3JqzmCOjwebKln+fExVLN7sqtqfMnsKVXWbb2Ai5m3D/fCTgX7oKYzTZvj+m28XnDqPbXuP4MyWdmPezcesdrh7rCzA7BWdObiuyDEKjjzBbQ0qnuwjliz+b+j7aPMKlkXyIznV3tGzAfYwIbzGGt098oh4eq3ruDjdgHtjxfFCjHrjjRbHajoz/YOY4raojPFQ910GIlBV7hq47UDgpyajBxQUmD8NctiLV1rTSLAEsQDLTeRKcmPBMVMFF0SPBBhZ5oXoxtD3lMhuAQXmA+57OcciczVW9e9zwSIAHS+FJmvfXMJGF1dMBsIUMaPjvgaVqUc3p32qVCMQYFEiRLzlVSOGMCmv/HJIxAHe3mL/XnoZ1IkWLeRZfgyByjnDbbeRK5KL7bYHSVJZ9UFq+yCiNKeRUaYjgbC3hVUvfJAhy/QNl/JqLKVvGMk9ZcfyGidNeo/VTxK9vUpodzfQI9Z2eAre4nmrkzgxKSnT5IJ1D69oHuUS5hp7pK9IAWuNrAOtOH0mAuwCrY8mXAtVXUeaNK3OXr6PRvmWg4VQqFSy+a1GZfFYgdsJELG8N0kvqmzvwZ02Plf5fH9QTy6br0oY/IDsEA+GBf9pEVWCIuBCjsup3LDSDqI+5+0IKSUFr7A96A2f0FbcU9fqljdqvsd8sG55KcKloHIFZem2Wb6pCLXybnVSB0sjCXzdS8IKvE");const kt=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]);function _t(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function Nt(e){let t=[];for(let n=0,r=e.length;n>24&255}function Ut(e){return 16777215&e}const Lt=new Map(Ct(Rt).flatMap(((e,t)=>e.map((e=>[e,t+1<<24]))))),Dt=new Set(Pt(Rt)),qt=new Map,Ht=new Map;for(let[Fr,Ur]of jt(Rt)){if(!Dt.has(Fr)&&2==Ur.length){let[e,t]=Ur,n=Ht.get(e);n||(n=new Map,Ht.set(e,n)),n.set(t,Fr)}qt.set(Fr,Ur.reverse())}const zt=44032,Gt=4352,$t=4449,Wt=4519,Kt=28,Qt=588;function Vt(e){return e>=zt&&e<55204}function Jt(e,t){if(e>=Gt&&e<4371&&t>=$t&&t<4470)return zt+(e-Gt)*Qt+(t-$t)*Kt;if(Vt(e)&&t>Wt&&t<4547&&(e-zt)%Kt==0)return e+(t-Wt);{let n=Ht.get(e);return n&&(n=n.get(t),n)?n:-1}}function Yt(e){let t=[],n=[],r=!1;function o(e){let n=Lt.get(e);n&&(r=!0,e|=n),t.push(e)}for(let a of e)for(;;){if(a<128)t.push(a);else if(Vt(a)){let e=a-zt,t=e%Qt/Kt|0,n=e%Kt;o(Gt+(e/Qt|0)),o($t+t),n>0&&o(Wt+n)}else{let e=qt.get(a);e?n.push(...e):o(a)}if(!n.length)break;a=n.pop()}if(r&&t.length>1){let e=Ft(t[0]);for(let n=1;n0&&o>=e)0==e?(t.push(r,...n),n.length=0,r=i):n.push(i),o=e;else{let a=Jt(r,i);a>=0?r=a:0==o&&0==e?(t.push(r),r=i):(n.push(i),o=e)}}return r>=0&&t.push(r,...n),t}(Yt(e))}const en=65039,tn=".";function nn(){return new Set(Pt(Bt))}const rn=new Map(jt(Bt)),on=nn(),an=nn(),sn=new Set(Pt(Bt).map((function(e){return this[e]}),[...an])),cn=nn(),un=(nn(),Ct(Bt));function ln(){return new Set([Pt(Bt).map((e=>un[e])),Pt(Bt)].flat(2))}const dn=Bt(),fn=It((e=>{let t=It(Bt).map((e=>e+96));if(t.length){let n=e>=dn;t[0]-=32,t=Mt(t),n&&(t=`Restricted[${t}]`);let r=ln(),o=ln(),a=[...r,...o].sort(((e,t)=>e-t));return{N:t,P:r,M:!Bt(),R:n,V:new Set(a)}}})),hn=nn(),pn=new Map;[...hn,...nn()].sort(((e,t)=>e-t)).map(((e,t,n)=>{let r=Bt(),o=n[t]=r?n[t-r]:{V:[],M:new Map};o.V.push(e),hn.has(e)||pn.set(e,o)}));for(let{V:Fr,M:Ur}of new Set(pn.values())){let e=[];for(let n of Fr){let t=fn.filter((e=>e.V.has(n))),r=e.find((({G:e})=>t.some((t=>e.has(t)))));r||(r={G:new Set,V:[]},e.push(r)),r.V.push(n),t.forEach((e=>r.G.add(e)))}let t=e.flatMap((({G:e})=>[...e]));for(let{G:n,V:r}of e){let e=new Set(t.filter((e=>!n.has(e))));for(let t of r)Ur.set(t,e)}}let mn=new Set,bn=new Set;for(let Fr of fn)for(let e of Fr.V)(mn.has(e)?bn:mn).add(e);for(let Fr of mn)pn.has(Fr)||bn.has(Fr)||pn.set(Fr,1);const gn=new Set([...mn,...Zt(mn)]),yn=Pt(Bt),vn=function e(t){let n=It((()=>{let t=Pt(Bt).map((e=>yn[e]));if(t.length)return e(t)})).sort(((e,t)=>t.Q.size-e.Q.size)),r=Bt(),o=r%3;r=r/3|0;let a=1&r;return r>>=1,{B:n,V:o,F:a,S:1&r,C:2&r,Q:new Set(t)}}([]);class wn extends Array{get is_emoji(){return!0}}function En(e,t=_t){let n=[];var r;r=e[0],an.has(r)&&n.push("\u25cc");let o=0,a=e.length;for(let i=0;i0;)if(95!==e[--t])throw new Error("underscore allowed only at start")}function Cn(e){return cn.has(e)}function jn(e,t){let n=0;return e.split(tn).map((e=>{let r,o=Nt(e),a={input:o,offset:n};n+=o.length+1;try{let e,n=a.tokens=Bn(o,Xt),i=n.length;if(!i)throw new Error("empty label");{let o=n[0],s=i>1||o.is_emoji;if(!s&&o.every((e=>e<128)))r=o,Pn(r),function(e){if(e.length>=4&&45==e[2]&&45==e[3])throw new Error("invalid label extension")}(r),e="ASCII";else if(s&&(a.emoji=!0,o=n.flatMap((e=>e.is_emoji?[]:e))),r=n.flatMap((e=>!t&&e.is_emoji?kn(e):e)),Pn(r),o.length){if(an.has(r[0]))throw Sn("leading combining mark");for(let e=1;ee.V.has(n)));if(!e.length)throw t===fn?On(n):Tn(t[0],n);if(t=e,1==e.length)break}return t}(t);!function(e,t){let{V:n,M:r}=e;for(let o of t)if(!n.has(o))throw Tn(e,o);if(r){let e=Zt(t);for(let t=1,n=e.length;t4)throw new Error(`non-spacing marks: too many ${xn(En(e.slice(t-1,o)))} (${o-t}/4)`);t=o}}}(a,o),function(e,t){let n,r=[];for(let o of t){let e=pn.get(o);if(1===e)return;if(e){let t=e.M.get(o);if(n=n?n.filter((e=>t.has(e))):[...t],!n.length)return}else r.push(o)}if(n)for(let o of n)if(r.every((e=>o.V.has(e))))throw new Error(`whole-script confusable: ${e.N}/${o.N}`)}(a,t),e=a.N}else e="Emoji"}a.type=e}catch(i){a.error=i}return a.output=r,a}))}function In(e){return e.map((({input:t,error:n,output:r})=>{if(n){let r=n.message;throw new Error(1==e.length?r:`Invalid label ${xn(En(t))}: ${r}`)}return Mt(r)})).join(tn)}function On(e){return new Error(`disallowed character: ${An(e)}`)}function Tn(e,t){let n=An(t),r=fn.find((e=>e.P.has(t)));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${e.N} + ${n}`)}function Sn(e){return new Error(`illegal placement: ${e}`)}function Bn(e,t){let n=[],r=[];for(e=e.slice().reverse();e.length;){let o=_n(e);if(o)r.length&&(n.push(t(r)),r=[]),n.push(o);else{let t=e.pop();if(gn.has(t))r.push(t);else{let e=rn.get(t);if(e)r.push(...e);else if(!on.has(t))throw On(t)}}}return r.length&&n.push(t(r)),n}function kn(e){return e.filter((e=>e!=en))}function _n(e,t){let n,r,o=vn,a=[],i=e.length;for(t&&(t.length=0);i;){let s=e[--i];if(o=o.B.find((e=>e.Q.has(s))),!o)break;if(o.S)r=s;else if(o.C&&s===r)break;a.push(s),o.F&&(a.push(en),i>0&&e[i-1]==en&&i--),o.V&&(n=Nn(a,o),t&&t.push(...e.slice(i).reverse()),e.length=i)}return n}function Nn(e,t){let n=wn.from(e);return 2==t.V&&n.splice(1,1),n}function Mn(e){return function(e){return In(jn(e))}(e)}var Rn=n(22852);var Fn=n(97451);function Un(e,t,{batch:n={multicall:{wait:32}},pollingInterval:r=4e3,rank:o,retryCount:a,retryDelay:i,stallTimeout:s}={}){if(!e.length)throw new Error("must have at least one chain");let c=[];const u={},l={};for(const d of e){let e=!1;for(const n of t){const t=n(d);t&&(e=!0,c.some((({id:e})=>e===d.id))||(c=[...c,t.chain]),u[d.id]=[...u[d.id]||[],...t.rpcUrls.http],t.rpcUrls.webSocket&&(l[d.id]=[...l[d.id]||[],...t.rpcUrls.webSocket]))}if(!e)throw new Error([`Could not find valid provider configuration for chain "${d.name}".\n`,"You may need to add `jsonRpcProvider` to `configureChains` with the chain's RPC URLs.","Read more: https://wagmi.sh/core/providers/jsonRpc"].join("\n"))}return{chains:c,publicClient:({chainId:t})=>{const l=c.find((e=>e.id===t))??e[0],d=u[l.id];if(!d||!d[0])throw new Error(`No providers configured for chain "${l.id}"`);const f=Ze({batch:n,chain:l,transport:tt(d.map((e=>function(e,t={}){const{batch:n,fetchOptions:r,key:o="http",name:a="HTTP JSON-RPC",retryDelay:i}=t;return({chain:s,retryCount:c,timeout:u})=>{const{batchSize:l=1e3,wait:d=0}="object"===typeof n?n:{},f=t.retryCount??c,h=u??t.timeout??1e4,p=e||s?.rpcUrls.default.http[0];if(!p)throw new rt;return(0,et.q)({key:o,name:a,async request({method:t,params:o}){const a={method:t,params:o},{schedule:i}=(0,ot.S)({id:`${e}`,wait:d,shouldSplitBatch:e=>e.length>l,fn:e=>ut.http(p,{body:e,fetchOptions:r,timeout:h})}),[{error:s,result:c}]=await(async e=>n?i(e):[await ut.http(p,{body:e,fetchOptions:r,timeout:h})])(a);if(s)throw new nt.bs({body:a,error:s,url:p});return c},retryCount:f,retryDelay:i,timeout:h,type:"http"},{url:e})}}(e,{timeout:s}))),{rank:o,retryCount:a,retryDelay:i}),pollingInterval:r});return Object.assign(f,{chains:c})},webSocketPublicClient:({chainId:t})=>{const u=c.find((e=>e.id===t))??e[0],d=l[u.id];if(!d||!d[0])return;const f=Ze({batch:n,chain:u,transport:tt(d.map((e=>function(e,t={}){const{key:n="webSocket",name:r="WebSocket JSON-RPC",retryDelay:o}=t;return({chain:a,retryCount:i,timeout:s})=>{const c=t.retryCount??i,u=s??t.timeout??1e4,l=e||a?.rpcUrls.default.webSocket?.[0];if(!l)throw new rt;return(0,et.q)({key:n,name:r,async request({method:e,params:t}){const n={method:e,params:t},r=await ct(l),{error:o,result:a}=await ut.webSocketAsync(r,{body:n,timeout:u});if(o)throw new nt.bs({body:n,error:o,url:l});return a},retryCount:c,retryDelay:o,timeout:u,type:"webSocket"},{getSocket:()=>ct(l),async subscribe({params:e,onData:t,onError:n}){const r=await ct(l),{result:o}=await new Promise(((o,a)=>ut.webSocket(r,{body:{method:"eth_subscribe",params:e},onResponse(e){if(e.error)return a(e.error),void n?.(e.error);"number"!==typeof e.id?"eth_subscription"===e.method&&t(e.params):o(e)}})));return{subscriptionId:o,unsubscribe:async()=>new Promise((e=>ut.webSocket(r,{body:{method:"eth_unsubscribe",params:[o]},onResponse:e})))}}})}}(e,{timeout:s}))),{rank:o,retryCount:a,retryDelay:i}),pollingInterval:r});return Object.assign(f,{chains:c})}}}var Ln=class extends Error{constructor({activeChain:e,targetChain:t}){super(`Chain mismatch: Expected "${t}", received "${e}".`),this.name="ChainMismatchError"}},Dn=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured${t?` for connector "${t}"`:""}.`),this.name="ChainNotConfigured"}},qn=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},Hn=class extends Error{constructor(){super(...arguments),this.name="ConfigChainsNotFound",this.message="No chains were found on the wagmi config. Some functions that require a chain may not work."}},zn=class extends Error{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}};function Gn(e,t){if(e===t)return!0;if(e&&t&&"object"===typeof e&&"object"===typeof t){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)&&Array.isArray(t)){if(n=e.length,n!=t.length)return!1;for(r=n;0!==r--;)if(!Gn(e[r],t[r]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const o=Object.keys(e);if(n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(n&&!Gn(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}var $n=(e,{find:t,replace:n})=>e&&t(e)?n(e):"object"!==typeof e?e:Array.isArray(e)?e.map((e=>$n(e,{find:t,replace:n}))):e instanceof Object?Object.entries(e).reduce(((e,[r,o])=>({...e,[r]:$n(o,{find:t,replace:n})})),{}):e;function Wn(e){const t=JSON.parse(e);return $n(t,{find:e=>"string"===typeof e&&e.startsWith("#bigint."),replace:e=>BigInt(e.replace("#bigint.",""))})}function Kn(e){return{accessList:e.accessList,account:e.account,data:e.data,gas:e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce,to:e.to,value:e.value}}function Qn(e){return"number"===typeof e?e:"wei"===e?0:Math.abs(dt.Bd[e])}function Vn(e,t){return e.slice(0,t).join(".")||"."}function Jn(e,t){const{length:n}=e;for(let r=0;r{const r="bigint"===typeof n?`#bigint.${n.toString()}`:n;return t?.(e,r)||r}),r),n??void 0)}var Zn={getItem:e=>"",setItem:(e,t)=>null,removeItem:e=>null};function Xn({deserialize:e=Wn,key:t="wagmi",serialize:n=Yn,storage:r}){return{...r,getItem:(n,o=null)=>{const a=r.getItem(`${t}.${n}`);try{return a?e(a):o}catch(i){return console.warn(i),o}},setItem:(e,o)=>{if(null===o)r.removeItem(`${t}.${e}`);else try{r.setItem(`${t}.${e}`,n(o))}catch(a){console.error(a)}},removeItem:e=>r.removeItem(`${t}.${e}`)}}var er,tr,nr,rr,or,ar="store";function ir(e){const t=new class{constructor({autoConnect:e=!1,connectors:t=[new r._],publicClient:n,storage:a=Xn({storage:"undefined"!==typeof window?window.localStorage:Zn}),logger:c={warn:console.warn},webSocketPublicClient:u}){i(this,nr),this.publicClients=new Map,this.webSocketPublicClients=new Map,i(this,er,void 0),i(this,tr,void 0),this.args={autoConnect:e,connectors:t,logger:c,publicClient:n,storage:a,webSocketPublicClient:u};let l,d="disconnected";if(e)try{const e=a.getItem(ar)?.state?.data;d=e?.account?"reconnecting":"connecting",l=e?.chain?.id}catch(b){}const f="function"===typeof t?t():t;var h,p,m;f.forEach((e=>e.setStorage(a))),this.store=gt(ft(mt((()=>({connectors:f,publicClient:this.getPublicClient({chainId:l}),status:d,webSocketPublicClient:this.getWebSocketPublicClient({chainId:l})})),{name:ar,storage:a,partialize:t=>({...e&&{data:{account:t?.data?.account,chain:t?.data?.chain}},chains:t?.chains}),version:2}))),this.storage=a,s(this,tr,a?.getItem("wallet")),(h=this,p=nr,m=rr,o(h,p,"access private method"),m).call(this),e&&"undefined"!==typeof window&&setTimeout((async()=>await this.autoConnect()),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){return this.data?.chain?.id}get publicClient(){return this.store.getState().publicClient}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketPublicClient(){return this.store.getState().webSocketPublicClient}setState(e){const t="function"===typeof e?e(this.store.getState()):e;this.store.setState(t,!0)}clearState(){this.setState((e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"})))}async destroy(){this.connector&&await(this.connector.disconnect?.()),s(this,er,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(a(this,er))return;s(this,er,!0),this.setState((e=>({...e,status:e.data?.account?"reconnecting":"connecting"})));const e=a(this,tr)?[...this.connectors].sort((e=>e.id===a(this,tr)?-1:1)):this.connectors;let t=!1;for(const n of e){if(!n.ready||!n.isAuthorized)continue;if(!(await n.isAuthorized()))continue;const e=await n.connect();this.setState((t=>({...t,connector:n,chains:n?.chains,data:e,status:"connected"}))),t=!0;break}return t||this.setState((e=>({...e,data:void 0,status:"disconnected"}))),s(this,er,!1),this.data}setConnectors(e){this.args={...this.args,connectors:e};const t="function"===typeof e?e():e;t.forEach((e=>e.setStorage(this.args.storage))),this.setState((e=>({...e,connectors:t})))}getPublicClient({chainId:e}={}){let t=this.publicClients.get(-1);if(t&&t?.chain.id===e)return t;if(t=this.publicClients.get(e??-1),t)return t;const{publicClient:n}=this.args;return t="function"===typeof n?n({chainId:e}):n,this.publicClients.set(e??-1,t),t}setPublicClient(e){const t=this.data?.chain?.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState((e=>({...e,publicClient:this.getPublicClient({chainId:t})})))}getWebSocketPublicClient({chainId:e}={}){let t=this.webSocketPublicClients.get(-1);if(t&&t?.chain.id===e)return t;if(t=this.webSocketPublicClients.get(e??-1),t)return t;const{webSocketPublicClient:n}=this.args;return t="function"===typeof n?n({chainId:e}):n,t&&this.webSocketPublicClients.set(e??-1,t),t}setWebSocketPublicClient(e){const t=this.data?.chain?.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState((e=>({...e,webSocketPublicClient:this.getWebSocketPublicClient({chainId:t})})))}setLastUsedConnector(e=null){this.storage?.setItem("wallet",e)}}(e);return or=t,t}function sr(){if(!or)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return or}async function cr({chainId:e,connector:t}){const n=sr(),r=n.connector;if(r&&t.id===r.id)throw new qn;try{n.setState((e=>({...e,status:"connecting"})));const r=await t.connect({chainId:e});return n.setLastUsedConnector(t.id),n.setState((e=>({...e,connector:t,chains:t?.chains,data:r,status:"connected"}))),n.storage.setItem("connected",!0),{...r,connector:t}}catch(o){throw n.setState((e=>({...e,status:e.connector?"connected":"disconnected"}))),o}}async function ur(){const e=sr();e.connector&&await e.connector.disconnect(),e.clearState(),e.storage.removeItem("connected")}er=new WeakMap,tr=new WeakMap,nr=new WeakSet,rr=function(){const e=e=>{this.setState((t=>({...t,data:{...t.data,...e}})))},t=()=>{this.clearState()},n=e=>{this.setState((t=>({...t,error:e})))};this.store.subscribe((({connector:e})=>e),((r,o)=>{o?.off?.("change",e),o?.off?.("disconnect",t),o?.off?.("error",n),r&&(r.on?.("change",e),r.on?.("disconnect",t),r.on?.("error",n))}));const{publicClient:r,webSocketPublicClient:o}=this.args;("function"===typeof r||"function"===typeof o)&&this.store.subscribe((({data:e})=>e?.chain?.id),(e=>{this.setState((t=>({...t,publicClient:this.getPublicClient({chainId:e}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:e})})))}))};var lr=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],dr=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function fr({chainId:e}={}){const t=sr();return e&&t.getPublicClient({chainId:e})||t.publicClient}async function hr({chainId:e}={}){const t=sr();return await(t.connector?.getWalletClient?.({chainId:e}))||null}function pr({chainId:e}={}){const t=sr();return e&&t.getWebSocketPublicClient({chainId:e})||t.webSocketPublicClient}function mr(e,t){return sr().subscribe((({publicClient:e})=>e),(async()=>t(fr(e))))}function br({chainId:e},t){return sr().subscribe((({data:e,connector:t})=>({account:e?.account,chainId:e?.chain?.id,connector:t})),(async({chainId:n})=>{if(e&&n&&e!==n)return;const r=await hr({chainId:e});return sr().connector?t(r):t(null)}),{equalityFn:vt})}function gr(e,t){return sr().subscribe((({webSocketPublicClient:e})=>e),(async()=>t(pr(e))))}async function yr({chainId:e,contracts:t,blockNumber:n,blockTag:r,...o}){const a=fr({chainId:e});if(!a.chains)throw new Hn;if(e&&a.chain.id!==e)throw new Dn({chainId:e});return a.multicall({allowFailure:o.allowFailure??!0,blockNumber:n,blockTag:r,contracts:t})}async function vr({address:e,account:t,chainId:n,abi:r,args:o,functionName:a,blockNumber:i,blockTag:s}){return fr({chainId:n}).readContract({abi:r,address:e,account:t,functionName:a,args:o,blockNumber:i,blockTag:s})}async function wr({contracts:e,blockNumber:t,blockTag:n,...r}){const{allowFailure:o=!0}=r;try{const r=fr(),a=e.reduce(((e,t,n)=>{const o=t.chainId??r.chain.id;return{...e,[o]:[...e[o]||[],{contract:t,index:n}]}}),{}),i=()=>Object.entries(a).map((([e,r])=>yr({allowFailure:o,chainId:parseInt(e),contracts:r.map((({contract:e})=>e)),blockNumber:t,blockTag:n}))),s=(await Promise.all(i())).flat(),c=Object.values(a).flatMap((e=>e.map((({index:e})=>e))));return s.reduce(((e,t,n)=>(e&&(e[c[n]]=t),e)),[])}catch(a){if(a instanceof g.uq)throw a;const r=()=>e.map((e=>vr({...e,blockNumber:t,blockTag:n})));return o?(await Promise.allSettled(r())).map((e=>"fulfilled"===e.status?{result:e.value,status:"success"}:{error:e.reason,result:void 0,status:"failure"})):await Promise.all(r())}}async function Er(e){const t=await hr({chainId:e.chainId});if(!t)throw new lt.N;let n;if(e.chainId&&Rr({chainId:e.chainId}),"prepared"===e.mode)n=e.request;else{const{chainId:t,mode:r,...o}=e,a=await async function({abi:e,address:t,args:n,chainId:r,functionName:o,walletClient:a,...i}){const s=fr({chainId:r}),c=a??await hr({chainId:r});if(!c)throw new lt.N;r&&Rr({chainId:r});const{account:u,accessList:l,blockNumber:d,blockTag:f,gas:h,gasPrice:p,maxFeePerGas:m,maxPriorityFeePerGas:b,nonce:g,value:y}=function(e){return{accessList:e.accessList,account:e.account,blockNumber:e.blockNumber,blockTag:e.blockTag,data:e.data,gas:e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce,to:e.to,value:e.value}}(i),{result:v,request:w}=await s.simulateContract({abi:e,address:t,functionName:o,args:n,account:u||c.account,accessList:l,blockNumber:d,blockTag:f,gas:h,gasPrice:p,maxFeePerGas:m,maxPriorityFeePerGas:b,nonce:g,value:y});return{mode:"prepared",request:{...w,abi:e.filter((e=>"name"in e&&e.name===o)),chainId:r},result:v}}(o);n=a.request}return{hash:await t.writeContract({...n,chain:null})}}async function Ar({address:e,chainId:t,formatUnits:n,token:r}){const o=sr(),a=fr({chainId:t});if(r){const o=async({abi:o})=>{const a={abi:o,address:r,chainId:t},[i,s,c]=await wr({allowFailure:!1,contracts:[{...a,functionName:"balanceOf",args:[e]},{...a,functionName:"decimals"},{...a,functionName:"symbol"}]});return{decimals:s,formatted:(0,yt.b)(i??"0",Qn(n??s)),symbol:c,value:i}};try{return await o({abi:lr})}catch(u){if(u instanceof g.uq){const{symbol:e,...t}=await o({abi:dr});return{symbol:(0,de.rR)((0,h.f)(e,{dir:"right"})),...t}}throw u}}const i=[...o.publicClient.chains||[],...o.chains??[]],s=await a.getBalance({address:e}),c=i.find((e=>e.id===a.chain.id));return{decimals:c?.nativeCurrency.decimals??18,formatted:(0,yt.b)(s??"0",Qn(n??18)),symbol:c?.nativeCurrency.symbol??"ETH",value:s}}function xr(){const{data:e,connector:t,status:n}=sr();switch(n){case"connected":return{address:e?.account,connector:t,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:n};case"reconnecting":return{address:e?.account,connector:t,isConnected:!!e?.account,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:n};case"connecting":return{address:e?.account,connector:t,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:n};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:n}}}function Pr(){const e=sr(),t=e.data?.chain?.id,n=e.chains??[],r=[...e.publicClient?.chains||[],...n].find((e=>e.id===t))??{id:t,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:t?{...r,...e.data?.chain,id:t}:void 0,chains:n}}async function Cr(e){const t=await hr();if(!t)throw new lt.N;return await t.signMessage({message:e.message})}async function jr({chainId:e}){const{connector:t}=sr();if(!t)throw new lt.N;if(!t.switchChain)throw new zn({connector:t});return t.switchChain(e)}function Ir(e,{selector:t=(e=>e)}={}){return sr().subscribe((({data:e,connector:n,status:r})=>t({address:e?.account,connector:n,status:r})),(()=>e(xr())),{equalityFn:vt})}function Or(e,{selector:t=(e=>e)}={}){return sr().subscribe((({data:e,chains:n})=>t({chainId:e?.chain?.id,chains:n})),(()=>e(Pr())),{equalityFn:vt})}async function Tr({name:e,chainId:t}){const n=fr({chainId:t});return await n.getEnsAvatar({name:Mn(e)})}async function Sr({address:e,chainId:t}){return fr({chainId:t}).getEnsName({address:(0,wt.K)(e)})}async function Br({chainId:e}={}){const t=fr({chainId:e});return await t.getBlockNumber()}async function kr({chainId:e,formatUnits:t="gwei"}={}){const n=fr({chainId:e}),r=await n.getBlock();let o=null;try{o=await n.getGasPrice()}catch{}let a=null,i=null,s=null;r?.baseFeePerGas&&(a=r.baseFeePerGas,s=function(e,t="wei"){return(0,Rn.v)(e,dt.Zn[t])}("1"),i=2n*r.baseFeePerGas+s);const c=Qn(t);return{lastBaseFeePerGas:a,gasPrice:o,maxFeePerGas:i,maxPriorityFeePerGas:s,formatted:{gasPrice:o?(0,yt.b)(o,c):null,maxFeePerGas:i?(0,yt.b)(i,c):null,maxPriorityFeePerGas:s?(0,yt.b)(s,c):null}}}async function _r({accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,nonce:c,to:u,value:l,walletClient:d}){const f=fr({chainId:n}),h=d??await hr({chainId:n});if(!h)throw new lt.N;n&&Rr({chainId:n});const p=(u&&!(0,Fn.U)(u)?await async function({chainId:e,name:t}){const n=fr({chainId:e}),r=await n.getEnsAddress({name:Mn(t)});try{return"0x0000000000000000000000000000000000000000"===r?null:r?(0,wt.K)(r):null}catch(o){return null}}({name:u}):u)||void 0;if(p&&!(0,Fn.U)(p))throw new Error("Invalid address");return{accessList:e,account:t,data:r,gas:"undefined"===typeof o?await f.estimateGas({accessList:e,account:h.account,data:r,gas:o??void 0,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,nonce:c,to:p,value:l}):o||void 0,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:"prepared",nonce:c,to:p,value:l,...n?{chainId:n}:{}}}async function Nr({accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,to:l,value:d}){const f=await hr({chainId:n});if(!f)throw new lt.N;let h;n&&Rr({chainId:n}),h="prepared"===c?{account:t,accessList:e,chain:null,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,nonce:u,to:l,value:d}:await _r({accessList:e,account:t,chainId:n,data:r,gas:o||null,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,nonce:u,to:l,value:d});return{hash:await f.sendTransaction({...h,chain:null})}}async function Mr({chainId:e,confirmations:t=1,hash:n,onReplaced:r,timeout:o=0}){const a=fr({chainId:e}),i=await a.waitForTransactionReceipt({hash:n,confirmations:t,onReplaced:r,timeout:o});if("reverted"===i.status){const e=await a.getTransaction({hash:i.transactionHash}),t=await a.call({...e,gasPrice:"eip1559"!==e.type?e.gasPrice:void 0,maxFeePerGas:"eip1559"===e.type?e.maxFeePerGas:void 0,maxPriorityFeePerGas:"eip1559"===e.type?e.maxPriorityFeePerGas:void 0}),n=(0,de.rR)(`0x${t.substring(138)}`);throw new Error(n)}return i}function Rr({chainId:e}){const{chain:t,chains:n}=Pr(),r=t?.id;if(r&&e!==r)throw new Ln({activeChain:n.find((e=>e.id===r))?.name??`Chain ${r}`,targetChain:n.find((t=>t.id===e))?.name??`Chain ${e}`})}},13105:function(e,t,n){"use strict";n.d(t,{RJ:function(){return r}});var r={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}},38039:function(e,t,n){"use strict";function r(e){return"string"===typeof e?Number.parseInt(e,"0x"===e.trim().substring(0,2)?16:10):"bigint"===typeof e?Number(e):e}n.d(t,{J:function(){return r}})},37096:function(e,t,n){"use strict";n.d(t,{wR:function(){return b},Ko:function(){return h},ac:function(){return f},U9:function(){return m},qx:function(){return p},ov:function(){return l}});var r=n(24143),o={id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0},a={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},i=n(61786);n(90169),n(46872),n(86101),n(94216),n(4656),n(23822);n(92960),n(69977),n(21973),n(66054),n(97451),n(9040),n(26873),n(41327);n(54574);const s=(0,i.ax)(o),c=(0,i.ax)(a);var u=Object.defineProperty,l=(e,t,n)=>(((e,t,n)=>{t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!==typeof t?t+"":t,n),n),d=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},f=(e,t,n)=>(d(e,t,"read from private field"),n?n.call(e):t.get(e)),h=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},p=(e,t,n,r)=>(d(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),m=(e,t,n)=>(d(e,t,"access private method"),n),b=class extends r{constructor({chains:e=[c,s],options:t}){super(),l(this,"chains"),l(this,"options"),l(this,"storage"),this.chains=e,this.options=t}getBlockExplorerUrls(e){const{default:t,...n}=e.blockExplorers??{};if(t)return[t.url,...Object.values(n).map((e=>e.url))]}isChainUnsupported(e){return!this.chains.some((t=>t.id===e))}setStorage(e){this.storage=e}}},64546:function(e,t,n){"use strict";n.d(t,{_:function(){return f}});var r,o=n(57292),a=n(38039),i=n(37096),s=n(92221),c=n(42455),u=n(67629),l=n(19575),d=n(46872);var f=class extends i.wR{constructor({chains:e,options:t}={}){const n={shimDisconnect:!0,getProvider(){if("undefined"===typeof window)return;const e=window.ethereum;return e?.providers?e.providers[0]:e},...t};super({chains:e,options:n}),(0,i.ov)(this,"id","injected"),(0,i.ov)(this,"name"),(0,i.ov)(this,"ready"),(0,i.Ko)(this,r,void 0),(0,i.ov)(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),(0,i.ov)(this,"onAccountsChanged",(e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,s.K)(e[0])})})),(0,i.ov)(this,"onChainChanged",(e=>{const t=(0,a.J)(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})})),(0,i.ov)(this,"onDisconnect",(async e=>{if(1013===e.code){if(await this.getProvider()){if(await this.getAccount())return}}this.emit("disconnect"),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey)}));const o=n.getProvider();if("string"===typeof n.name)this.name=n.name;else if(o){const e=function(e){if(!e)return"Injected";const t=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOpera?"Opera":e.isPhantom?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0;if(e.providers?.length){const n=new Set;let r=1;for(const a of e.providers){let e=t(a);e||(e=`Unknown Wallet #${r}`,r+=1),n.add(e)}const o=[...n];return o.length?o:o[0]??"Injected"}return t(e)??"Injected"}(o);n.name?this.name=n.name(e):this.name="string"===typeof e?e:e[0]}else this.name="Injected";this.ready=!!o}async connect({chainId:e}={}){try{const t=await this.getProvider();if(!t)throw new o.N;t.on&&(t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const n=await t.request({method:"eth_requestAccounts"}),r=(0,s.K)(n[0]);let a=await this.getChainId(),i=this.isChainUnsupported(a);if(e&&a!==e){a=(await this.switchChain(e)).id,i=this.isChainUnsupported(a)}return this.options.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:r,chain:{id:a,unsupported:i}}}catch(t){if(this.isUserRejectedRequestError(t))throw new c.ab(t);if(-32002===t.code)throw new c.pT(t);throw t}}async disconnect(){const e=await this.getProvider();e?.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))}async getAccount(){const e=await this.getProvider();if(!e)throw new o.N;const t=await e.request({method:"eth_accounts"});return(0,s.K)(t[0])}async getChainId(){const e=await this.getProvider();if(!e)throw new o.N;return e.request({method:"eth_chainId"}).then(a.J)}async getProvider(){const e=this.options.getProvider();return e&&(0,i.qx)(this,r,e),(0,i.ac)(this,r)}async getWalletClient({chainId:e}={}){const[t,n]=await Promise.all([this.getProvider(),this.getAccount()]),r=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,u.K)({account:n,chain:r,transport:(0,l.P)(t)})}async isAuthorized(){try{if(this.options.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey))return!1;if(!(await this.getProvider()))throw new o.N;return!!(await this.getAccount())}catch{return!1}}async switchChain(e){const t=await this.getProvider();if(!t)throw new o.N;const n=(0,d.eC)(e);try{return await Promise.all([t.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]}),new Promise((t=>this.on("change",(({chain:n})=>{n?.id===e&&t()}))))]),this.chains.find((t=>t.id===e))??{id:e,name:`Chain ${n}`,network:`${n}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(r){const i=this.chains.find((t=>t.id===e));if(!i)throw new o.B({chainId:e,connectorId:this.id});if(4902===r.code||4902===r?.data?.originalError?.code)try{await t.request({method:"wallet_addEthereumChain",params:[{chainId:n,chainName:i.name,nativeCurrency:i.nativeCurrency,rpcUrls:[i.rpcUrls.public?.http[0]??""],blockExplorerUrls:this.getBlockExplorerUrls(i)}]});if(await this.getChainId()!==e)throw new c.ab(new Error("User rejected switch after adding network."));return i}catch(a){throw new c.ab(a)}if(this.isUserRejectedRequestError(r))throw new c.ab(r);throw new c.x3(r)}}async watchAsset({address:e,decimals:t=18,image:n,symbol:r}){const a=await this.getProvider();if(!a)throw new o.N;return a.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:t,image:n,symbol:r}}})}isUserRejectedRequestError(e){return 4001===e.code}};r=new WeakMap},57292:function(e,t,n){"use strict";n.d(t,{B:function(){return o},N:function(){return a}});var r=n(37096),o=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured for connector "${t}".`),(0,r.ov)(this,"name","ChainNotConfiguredForConnectorError")}},a=class extends Error{constructor(){super(...arguments),(0,r.ov)(this,"name","ConnectorNotFoundError"),(0,r.ov)(this,"message","Connector not found")}}},59499:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return r}})},97582:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return a},__asyncDelegator:function(){return C},__asyncGenerator:function(){return P},__asyncValues:function(){return j},__await:function(){return x},__awaiter:function(){return p},__classPrivateFieldGet:function(){return B},__classPrivateFieldIn:function(){return _},__classPrivateFieldSet:function(){return k},__createBinding:function(){return b},__decorate:function(){return s},__esDecorate:function(){return u},__exportStar:function(){return g},__extends:function(){return o},__generator:function(){return m},__importDefault:function(){return S},__importStar:function(){return T},__makeTemplateObject:function(){return I},__metadata:function(){return h},__param:function(){return c},__propKey:function(){return d},__read:function(){return v},__rest:function(){return i},__runInitializers:function(){return l},__setFunctionName:function(){return f},__spread:function(){return w},__spreadArray:function(){return A},__spreadArrays:function(){return E},__values:function(){return y}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,o,a){function i(e){if(void 0!==e&&"function"!==typeof e)throw new TypeError("Function expected");return e}for(var s,c=r.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?r.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),f=!1,h=n.length-1;h>=0;h--){var p={};for(var m in r)p[m]="access"===m?{}:r[m];for(var m in r.access)p.access[m]=r.access[m];p.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var b=(0,n[h])("accessor"===c?{get:d.get,set:d.set}:d[u],p);if("accessor"===c){if(void 0===b)continue;if(null===b||"object"!==typeof b)throw new TypeError("Object expected");(s=i(b.get))&&(d.get=s),(s=i(b.set))&&(d.set=s),(s=i(b.init))&&o.unshift(s)}else(s=i(b))&&("field"===c?o.unshift(s):d[u]=s)}l&&Object.defineProperty(l,r.name,d),f=!0}function l(e,t,n){for(var r=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function w(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof x?Promise.resolve(n.value.v).then(c,u):l(a[0][2],n)}catch(r){l(a[0][3],r)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function C(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:x(e[r](t)),done:!1}:o?o(t):t}:o}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var O=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&b(t,e,n);return O(t,e),t}function S(e){return e&&e.__esModule?e:{default:e}}function B(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function k(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function _(e,t){if(null===t||"object"!==typeof t&&"function"!==typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"===typeof e?t===e:e.has(t)}t.default={__extends:o,__assign:a,__rest:i,__decorate:s,__param:c,__metadata:h,__awaiter:p,__generator:m,__createBinding:b,__exportStar:g,__values:y,__read:v,__spread:w,__spreadArrays:E,__spreadArray:A,__await:x,__asyncGenerator:P,__asyncDelegator:C,__asyncValues:j,__makeTemplateObject:I,__importStar:T,__importDefault:S,__classPrivateFieldGet:B,__classPrivateFieldSet:k,__classPrivateFieldIn:_}},53160:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(16867);function o(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?(0,r.P)(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}},20605:function(e,t,n){"use strict";n.r(t),n.d(t,{concat:function(){return a}});var r=n(53160),o=n(16867);function a(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=(0,r.E)(t);let a=0;for(const r of e)n.set(r,a),a+=r.length;return(0,o.P)(n)}},52217:function(e,t,n){"use strict";n.r(t),n.d(t,{fromString:function(){return a}});var r=n(5370),o=n(16867);function a(e,t="utf8"){const n=r.Z[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):(0,o.P)(globalThis.Buffer.from(e,"utf-8"))}},37466:function(e,t,n){"use strict";n.d(t,{BB:function(){return a.toString},mL:function(){return o.fromString},zo:function(){return r.concat}});var r=n(20605),o=n(52217),a=n(92263)},92263:function(e,t,n){"use strict";n.r(t),n.d(t,{toString:function(){return o}});var r=n(5370);function o(e,t="utf8"){const n=r.Z[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}},16867:function(e,t,n){"use strict";function r(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}n.d(t,{P:function(){return r}})},5370:function(e,t,n){"use strict";n.d(t,{Z:function(){return De}});var r={};n.r(r),n.d(r,{identity:function(){return O}});var o={};n.r(o),n.d(o,{base2:function(){return T}});var a={};n.r(a),n.d(a,{base8:function(){return S}});var i={};n.r(i),n.d(i,{base10:function(){return B}});var s={};n.r(s),n.d(s,{base16:function(){return k},base16upper:function(){return _}});var c={};n.r(c),n.d(c,{base32:function(){return N},base32hex:function(){return U},base32hexpad:function(){return D},base32hexpadupper:function(){return q},base32hexupper:function(){return L},base32pad:function(){return R},base32padupper:function(){return F},base32upper:function(){return M},base32z:function(){return H}});var u={};n.r(u),n.d(u,{base36:function(){return z},base36upper:function(){return G}});var l={};n.r(l),n.d(l,{base58btc:function(){return $},base58flickr:function(){return W}});var d={};n.r(d),n.d(d,{base64:function(){return K},base64pad:function(){return Q},base64url:function(){return V},base64urlpad:function(){return J}});var f={};n.r(f),n.d(f,{base256emoji:function(){return ee}});var h={};n.r(h),n.d(h,{sha256:function(){return Ee},sha512:function(){return Ae}});var p={};n.r(p),n.d(p,{identity:function(){return Pe}});var m={};n.r(m),n.d(m,{code:function(){return je},decode:function(){return Oe},encode:function(){return Ie},name:function(){return Ce}});var b={};n.r(b),n.d(b,{code:function(){return ke},decode:function(){return Ne},encode:function(){return _e},name:function(){return Be}});var g=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r>>0,i=new Uint8Array(a);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=a-1;(0!==l||d>>0,i[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");o=d,t++}if(" "!==e[t]){for(var h=a-o;h!==a&&0===i[h];)h++;for(var p=new Uint8Array(r+(a-h)),m=r;h!==a;)p[m++]=i[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 n=0,r=0,o=0,a=t.length;o!==a&&0===t[o];)o++,n++;for(var i=(a-o)*l+1>>>0,u=new Uint8Array(i);o!==a;){for(var d=t[o],f=0,h=i-1;(0!==d||f>>0,u[h]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,o++}for(var p=i-r;p!==i&&0===u[p];)p++;for(var m=c.repeat(n);p{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class w{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class E{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"===typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return x(this,e)}}class A{constructor(e){this.decoders=e}or(e){return x(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const x=(e,t)=>new A({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class P{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new w(e,t,n),this.decoder=new E(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const C=({name:e,prefix:t,encode:n,decode:r})=>new P(e,t,n,r),j=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:o}=y(n,t);return C({prefix:e,name:t,encode:r,decode:e=>v(o(e))})},I=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>C({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],o=(1<n;)i-=n,a+=t[o&s>>i];if(i&&(a+=t[o&s<((e,t,n,r)=>{const o={};for(let l=0;l=8&&(s-=8,i[u++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return i})(t,r,n,e)}),O=C({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),T=I({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),S=I({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),B=j({prefix:"9",name:"base10",alphabet:"0123456789"}),k=I({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),_=I({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),N=I({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),M=I({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),R=I({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),F=I({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),U=I({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),L=I({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),D=I({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),q=I({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),H=I({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),z=j({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),G=j({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),$=j({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),W=j({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),K=I({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Q=I({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),V=I({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),J=I({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Y=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),Z=Y.reduce(((e,t,n)=>(e[n]=t,e)),[]),X=Y.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const ee=C({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Z[t]),"")},decode:function(e){const t=[];for(const n of e){const e=X[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var te=function e(t,n,r){n=n||[];var o=r=r||0;for(;t>=ne;)n[r++]=255&t|128,t/=128;for(;-128&t;)n[r++]=255&t|128,t>>>=7;return n[r]=0|t,e.bytes=r-o+1,n},ne=Math.pow(2,31);var re=function e(t,n){var r,o=0,a=0,i=n=n||0,s=t.length;do{if(i>=s)throw e.bytes=0,new RangeError("Could not decode varint");r=t[i++],o+=a<28?(127&r)<=128);return e.bytes=i-n,o};var oe=Math.pow(2,7),ae=Math.pow(2,14),ie=Math.pow(2,21),se=Math.pow(2,28),ce=Math.pow(2,35),ue=Math.pow(2,42),le=Math.pow(2,49),de=Math.pow(2,56),fe=Math.pow(2,63),he={encode:te,decode:re,encodingLength:function(e){return e(he.encode(e,t,n),t),me=e=>he.encodingLength(e),be=(e,t)=>{const n=t.byteLength,r=me(e),o=r+me(n),a=new Uint8Array(o+n);return pe(e,a,0),pe(n,a,r),a.set(t,o),new ge(e,n,t,a)};class ge{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const ye=({name:e,code:t,encode:n})=>new ve(e,t,n);class ve{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?be(this.code,t):t.then((e=>be(this.code,e)))}throw Error("Unknown type, must be binary type")}}const we=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Ee=ye({name:"sha2-256",code:18,encode:we("SHA-256")}),Ae=ye({name:"sha2-512",code:19,encode:we("SHA-512")}),xe=v,Pe={code:0,name:"identity",encode:xe,digest:e=>be(0,xe(e))},Ce="raw",je=85,Ie=e=>v(e),Oe=e=>v(e),Te=new TextEncoder,Se=new TextDecoder,Be="json",ke=512,_e=e=>Te.encode(JSON.stringify(e)),Ne=e=>JSON.parse(Se.decode(e));Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom");Symbol.for("@ipld/js-cid/CID");const Me={...r,...o,...a,...i,...s,...c,...u,...l,...d,...f};var Re=n(53160);function Fe(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const Ue=Fe("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Le=Fe("ascii","a",(e=>{let t="a";for(let n=0;n{e=e.substring(1);const t=(0,Re.E)(e.length);for(let n=0;n"undefined"!==typeof e)).length>0)))}({request:i}))try{return await async function(e,t){const{batchSize:n=1024,wait:r=0}="object"===typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:a,blockTag:i="latest",data:h,multicallAddress:p,to:m}=t;let g=p;if(!g){if(!e.chain)throw new s.pZ;g=(0,d.LI)({blockNumber:a,chain:e.chain,contract:"multicall3"})}const y=(a?(0,f.eC)(a):void 0)||i,{schedule:v}=(0,b.S)({id:`${e.uid}.${y}`,wait:r,shouldSplitBatch(e){const t=e.reduce(((e,{data:t})=>e+(t.length-2)),0);return t>2*n},fn:async t=>{const n=t.map((e=>({allowFailure:!0,callData:e.data,target:e.to}))),r=(0,l.R)({abi:o.F8,args:[n],functionName:"aggregate3"}),a=await e.request({method:"eth_call",params:[{data:r,to:g},y]});return(0,u.k)({abi:o.F8,args:[n],functionName:"aggregate3",data:a||"0x"})}}),[{returnData:w,success:E}]=await v({data:h,to:m});if(!E)throw new c.VQ({data:w});return"0x"===w?{data:void 0}:{data:w}}(e,{...i,blockNumber:w,blockTag:E})}catch(_){if(!(_ instanceof s.pZ)&&!(_ instanceof s.mm))throw _}const h=await e.request({method:"eth_call",params:n?[i,n]:[i]});return"0x"===h?{data:void 0}:{data:h}}catch(_){const r=function(e){if(!(e instanceof i.G))return;const t=e.walk();return"object"===typeof t.data?t.data.data:t.data}(_),{offchainLookup:o,offchainLookupSignature:a}=await n.e(3646).then(n.bind(n,33646));if(r?.slice(0,10)===a&&T)return{data:await o(e,{data:r,to:T})};throw function(e,{docsPath:t,...n}){let r=e;return(0,h.B)(e)&&(r=(0,h.k)(e,n)),new c.cg(r,{docsPath:t,...n})}(_,{...t,account:k,chain:e.chain})}}},14828:function(e,t,n){"use strict";n.d(t,{Q:function(){return b}});var r=n(21431),o=n(25071),a=n(46872),i=n(6665),s=n(56283),c=n(69977),u=n(54574);class l extends c.G{constructor(e,{account:t,docsPath:n,chain:r,data:o,gas:a,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){const m=(0,u.xr)({from:t?.address,to:h,value:"undefined"!==typeof p&&`${(0,i.d)(p)} ${r?.nativeCurrency.symbol||"ETH"}`,data:o,gas:a,gasPrice:"undefined"!==typeof c&&`${(0,s.o)(c)} gwei`,maxFeePerGas:"undefined"!==typeof l&&`${(0,s.o)(l)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,s.o)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}var d=n(90968);var f=n(91019),h=n(23822),p=n(13134),m=n(59920);async function b(e,t){const n=t.account??e.account;if(!n)throw new o.o({docsPath:"/docs/actions/public/estimateGas"});const i=(0,r.T)(n);try{const{accessList:n,blockNumber:r,blockTag:o,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:b,to:g,value:y,...v}="local"===i.type?await(0,m.h)(e,t):t,w=(r?(0,a.eC)(r):void 0)||o;(0,p.F)(t);const E=e.chain?.formatters?.transactionRequest?.format||h.t,A=E({...(0,f.K)(v,{format:E}),from:i.address,accessList:n,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:b,to:g,value:y}),x=await e.request({method:"eth_estimateGas",params:w?[A,w]:[A]});return BigInt(x)}catch(s){throw function(e,{docsPath:t,...n}){let r=e;return(0,d.B)(e)&&(r=(0,d.k)(e,n)),new l(r,{docsPath:t,...n})}(s,{...t,account:i,chain:e.chain})}}},33910:function(e,t,n){"use strict";n.d(t,{Q:function(){return s}});var r=n(69977);class o extends r.G{constructor({blockHash:e,blockNumber:t}){let n="Block";e&&(n=`Block at hash "${e}"`),t&&(n=`Block at number "${t}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}var a=n(46872),i=n(86101);async function s(e,{blockHash:t,blockNumber:n,blockTag:r,includeTransactions:s}={}){const c=r??"latest",u=s??!1,l=void 0!==n?(0,a.eC)(n):void 0;let d=null;if(d=t?await e.request({method:"eth_getBlockByHash",params:[t,u]}):await e.request({method:"eth_getBlockByNumber",params:[l||c,u]}),!d)throw new o({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||i.Z)(d)}},29251:function(e,t,n){"use strict";n.d(t,{L:function(){return o}});var r=n(90169);async function o(e){const t=await e.request({method:"eth_chainId"});return(0,r.ly)(t)}},48671:function(e,t,n){"use strict";async function r(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}n.d(t,{o:function(){return r}})},89784:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(90169),o=n(46872);async function a(e,{address:t,blockTag:n="latest",blockNumber:a}){const i=await e.request({method:"eth_getTransactionCount",params:[t,a?(0,o.eC)(a):n]});return(0,r.ly)(i)}},48439:function(e,t,n){"use strict";n.d(t,{e:function(){return s}});var r=n(21431);let o,a=256;function i(e=11){if(!o||a+e>512){o="",a=0;for(let e=0;e<256;e++)o+=(256+256*Math.random()|0).toString(16).substring(1)}return o.substring(a,a+++e)}function s(e){const{batch:t,cacheTime:n=e.pollingInterval??4e3,key:o="base",name:a="Base Client",pollingInterval:s=4e3,type:c="base"}=e,u=e.chain,l=e.account?(0,r.T)(e.account):void 0,{config:d,request:f,value:h}=e.transport({chain:u,pollingInterval:s}),p={account:l,batch:t,cacheTime:n,chain:u,key:o,name:a,pollingInterval:s,request:f,transport:{...d,...h},type:c,uid:i()};return Object.assign(p,{extend:function e(t){return n=>{const r=n(t);for(const e in p)delete r[e];const o={...t,...r};return Object.assign(o,{extend:e(o)})}}(p)})}},67629:function(e,t,n){"use strict";n.d(t,{K:function(){return x}});var r=n(48439),o=n(29251),a=n(46872);var i=n(99353),s=n(21431),c=n(25071),u=n(61786),l=n(54574),d=n(90968);var f=n(91019),h=n(23822),p=n(13134),m=n(59920);async function b(e,t){const{account:n=e.account,chain:r=e.chain,accessList:a,data:i,gas:b,gasPrice:g,maxFeePerGas:y,maxPriorityFeePerGas:v,nonce:w,to:E,value:A,...x}=t;if(!n)throw new c.o({docsPath:"/docs/actions/wallet/sendTransaction"});const P=(0,s.T)(n);try{let n;if((0,p.F)(t),null!==r&&(n=await(0,o.L)(e),(0,u.qg)({currentChainId:n,chain:r})),"local"===P.type){const t=await(0,m.h)(e,{account:P,accessList:a,chain:r,data:i,gas:b,gasPrice:g,maxFeePerGas:y,maxPriorityFeePerGas:v,nonce:w,to:E,value:A,...x});n||(n=await(0,o.L)(e));const s=r?.serializers?.transaction,c=await P.signTransaction({...t,chainId:n},{serializer:s});return await e.request({method:"eth_sendRawTransaction",params:[c]})}const s=r?.formatters?.transactionRequest?.format||h.t,c=s({...(0,f.K)(x,{format:s}),accessList:a,data:i,from:P.address,gas:b,gasPrice:g,maxFeePerGas:y,maxPriorityFeePerGas:v,nonce:w,to:E,value:A});return await e.request({method:"eth_sendTransaction",params:[c]})}catch(C){throw function(e,{docsPath:t,...n}){let r=e;return(0,d.B)(e)&&(r=(0,d.k)(e,n)),new l.mk(r,{docsPath:t,...n})}(C,{...t,account:P,chain:t.chain||void 0})}}var g=n(92221);var y=n(25493),v=n(61344),w=n(61539);var E=n(96606);function A(e){return{addChain:t=>async function(e,{chain:t}){const{id:n,name:r,nativeCurrency:o,rpcUrls:i,blockExplorers:s}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,a.eC)(n),chainName:r,nativeCurrency:o,rpcUrls:i.default.http,blockExplorerUrls:s?Object.values(s).map((({url:e})=>e)):void 0}]})}(e,t),deployContract:t=>function(e,{abi:t,args:n,bytecode:r,...o}){return b(e,{...o,data:(0,i.w)({abi:t,args:n,bytecode:r})})}(e,t),getAddresses:()=>async function(e){return(await e.request({method:"eth_accounts"})).map((e=>(0,g.x)(e)))}(e),getChainId:()=>(0,o.L)(e),getPermissions:()=>async function(e){return await e.request({method:"wallet_getPermissions"})}(e),requestAddresses:()=>async function(e){return(await e.request({method:"eth_requestAccounts"})).map((e=>(0,g.K)(e)))}(e),requestPermissions:t=>async function(e,t){return e.request({method:"wallet_requestPermissions",params:[t]})}(e,t),sendTransaction:t=>b(e,t),signMessage:t=>async function(e,{account:t=e.account,message:n}){if(!t)throw new c.o({docsPath:"/docs/actions/wallet/signMessage"});const r=(0,s.T)(t);if("local"===r.type)return r.signMessage({message:n});const o="string"===typeof n?(0,a.$G)(n):n.raw instanceof Uint8Array?(0,a.NC)(n.raw):n.raw;return e.request({method:"personal_sign",params:[o,r.address]})}(e,t),signTypedData:t=>async function(e,{account:t=e.account,domain:n,message:r,primaryType:o,types:a}){if(!t)throw new c.o({docsPath:"/docs/actions/wallet/signTypedData"});const i=(0,s.T)(t),u={EIP712Domain:["string"===typeof n?.name&&{name:"name",type:"string"},n?.version&&{name:"version",type:"string"},"number"===typeof n?.chainId&&{name:"chainId",type:"uint256"},n?.verifyingContract&&{name:"verifyingContract",type:"address"},n?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...a};if((0,w.i)({domain:n,message:r,primaryType:o,types:u}),"local"===i.type)return i.signTypedData({domain:n,primaryType:o,types:u,message:r});const l=(0,v.P)({domain:n??{},primaryType:o,types:u,message:r},((e,t)=>(0,y.v)(t)?t.toLowerCase():t));return e.request({method:"eth_signTypedData_v4",params:[i.address,l]})}(e,t),switchChain:t=>async function(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,a.eC)(t)}]})}(e,t),watchAsset:t=>async function(e,t){return await e.request({method:"wallet_watchAsset",params:t})}(e,t),writeContract:t=>async function(e,{abi:t,address:n,args:r,dataSuffix:o,functionName:a,...i}){const s=(0,E.R)({abi:t,args:r,functionName:a});return await b(e,{data:`${s}${o?o.replace("0x",""):""}`,to:n,...i})}(e,t)}}function x(e){const{key:t="wallet",name:n="Wallet Client",transport:o}=e;return(0,r.e)({...e,key:t,name:n,transport:e=>o({...e,retryCount:0}),type:"walletClient"}).extend(A)}},14160:function(e,t,n){"use strict";n.d(t,{q:function(){return o}});var r=n(62635);function o({key:e,name:t,request:n,retryCount:o=3,retryDelay:a=150,timeout:i,type:s},c){return{config:{key:e,name:t,request:n,retryCount:o,retryDelay:a,timeout:i,type:s},request:(0,r.n)(n,{retryCount:o,retryDelay:a}),value:c}}},19575:function(e,t,n){"use strict";n.d(t,{P:function(){return o}});var r=n(14160);function o(e,t={}){const{key:n="custom",name:o="Custom Provider",retryDelay:a}=t;return({retryCount:i})=>(0,r.q)({key:n,name:o,request:e.request.bind(e),retryCount:t.retryCount??i,retryDelay:a,type:"custom"})}},1920:function(e,t,n){"use strict";n.d(t,{$o:function(){return u},F8:function(){return r},X$:function(){return c},du:function(){return i},k3:function(){return a},nZ:function(){return s}});const r=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],o=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],a=[...o,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],i=[...o,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],s=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],c=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],u=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},35554:function(e,t,n){"use strict";n.d(t,{$:function(){return r},Up:function(){return o},hZ:function(){return a}});const r={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},o={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},a={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},58617:function(e,t,n){"use strict";n.d(t,{Bd:function(){return a},Zn:function(){return o},ez:function(){return r}});const r={gwei:9,wei:18},o={ether:-9,wei:9},a={ether:-18,gwei:-9}},5555:function(e,t,n){"use strict";n.d(t,{CI:function(){return x},FM:function(){return p},Gy:function(){return E},KY:function(){return v},M4:function(){return d},MX:function(){return y},SM:function(){return w},cO:function(){return s},dh:function(){return A},fM:function(){return i},fs:function(){return f},gr:function(){return l},hn:function(){return P},lC:function(){return m},mv:function(){return b},wM:function(){return C},wb:function(){return u},xB:function(){return c},xL:function(){return g},yP:function(){return h}});var r=n(21494),o=n(51756),a=n(69977);class i extends a.G{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class s extends a.G{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class c extends a.G{constructor({data:e,params:t,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join("\n"),{metaMessages:[`Params: (${(0,r.h)(t,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=n}}class u extends a.G{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class l extends a.G{constructor({expectedLength:e,givenLength:t,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class d extends a.G{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,o.d)(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class f extends a.G{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class h extends a.G{constructor(e,{docsPath:t}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class p extends a.G{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class m extends a.G{constructor(e,{docsPath:t}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class b extends a.G{constructor(e,{docsPath:t}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class g extends a.G{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class y extends a.G{constructor(e,{docsPath:t}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class v extends a.G{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class w extends a.G{constructor({abiItem:e,data:t,params:n,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join("\n"),{metaMessages:[`Params: (${(0,r.h)(n,{includeName:!0})})`,`Data: ${t} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=n,this.size=o}}class E extends a.G{constructor({abiItem:e,param:t}){super([`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,r.t)(e,{includeName:!0})}".`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class A extends a.G{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class x extends a.G{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class P extends a.G{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class C extends a.G{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}},25071:function(e,t,n){"use strict";n.d(t,{o:function(){return o}});var r=n(69977);class o extends r.G{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join("\n"),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}},92960:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});var r=n(69977);class o extends r.G{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}},69977:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var r=n(20966);class o extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,r.bo)()});const n=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof o&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: https://viem.sh${a}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return a(this,e)}}function a(e,t){return t?.(e)?e:e&&"object"===typeof e&&"cause"in e?a(e.cause,t):t?null:e}},21973:function(e,t,n){"use strict";n.d(t,{Bk:function(){return i},Yl:function(){return a},hJ:function(){return c},mm:function(){return o},pZ:function(){return s}});var r=n(69977);class o extends r.G{constructor({blockNumber:e,chain:t,contract:n}){super(`Chain "${t.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class a extends r.G{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} \u2013 ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} \u2013 ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class i extends r.G{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class s extends r.G{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}class c extends r.G{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}},90722:function(e,t,n){"use strict";n.d(t,{cg:function(){return b},uq:function(){return g},Lu:function(){return y},Dk:function(){return v},VQ:function(){return w}});var r=n(21431),o=n(35554),a=n(11856),i=n(21494),s=n(61344);function c({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map(((e,n)=>`${r&&e.name?`${e.name}: `:""}${"object"===typeof t[n]?(0,s.P)(t[n]):t[n]}`)).join(", ")})`}var u=n(28604),l=n(6665),d=n(56283),f=n(5555),h=n(69977),p=n(54574),m=n(20966);class b extends h.G{constructor(e,{account:t,docsPath:n,chain:o,data:a,gas:i,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:h,value:m}){const b=t?(0,r.T)(t):void 0,g=(0,p.xr)({from:b?.address,to:h,value:"undefined"!==typeof m&&`${(0,l.d)(m)} ${o?.nativeCurrency.symbol||"ETH"}`,data:a,gas:i,gasPrice:"undefined"!==typeof s&&`${(0,d.o)(s)} gwei`,maxFeePerGas:"undefined"!==typeof c&&`${(0,d.o)(c)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof u&&`${(0,d.o)(u)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",g].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class g extends h.G{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:o,functionName:a,sender:s}){const l=(0,u.m)({abi:t,args:n,name:a}),d=l?c({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=l?(0,i.t)(l,{includeName:!0}):void 0,h=(0,p.xr)({address:r&&(0,m.CR)(r),function:f,args:d&&"()"!==d&&`${[...Array(a?.length??0).keys()].map((()=>" ")).join("")}${d}`,sender:s});super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",h].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=n,this.cause=e,this.contractAddress=r,this.functionName=a,this.sender=s}}class y extends h.G{constructor({abi:e,data:t,functionName:n,message:r}){let s,u,l,d,h;if(t&&"0x"!==t)try{u=(0,a.p)({abi:e,data:t});const{abiItem:n,errorName:r,args:s}=u;if("Error"===r)d=s[0];else if("Panic"===r){const[e]=s;d=o.$[e]}else{const e=n?(0,i.t)(n,{includeName:!0}):void 0,t=n&&s?c({abiItem:n,args:s,includeFunctionName:!1,includeName:!1}):void 0;l=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(r?.length??0).keys()].map((()=>" ")).join("")}${t}`:""]}}catch(p){s=p}else r&&(d=r);s instanceof f.yP&&(h=s.signature,l=[`Unable to decode signature "${h}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${h}.`]),super(d&&"execution reverted"!==d||h?[`The contract function "${n}" reverted with the following ${h?"signature":"reason"}:`,d||h].join("\n"):`The contract function "${n}" reverted.`,{cause:s,metaMessages:l}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=u,this.reason=d,this.signature=h}}class v extends h.G{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class w extends h.G{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},98309:function(e,t,n){"use strict";n.d(t,{$:function(){return a},m:function(){return o}});var r=n(69977);class o extends r.G{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class a extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}},89466:function(e,t,n){"use strict";n.d(t,{Cd:function(){return a},J5:function(){return o},M6:function(){return i}});var r=n(69977);class o extends r.G{constructor({max:e,min:t,signed:n,size:r,value:o}){super(`Number "${o}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class a extends r.G{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class i extends r.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}},66054:function(e,t,n){"use strict";n.d(t,{C_:function(){return d},G$:function(){return s},Hh:function(){return i},M_:function(){return a},WF:function(){return f},ZI:function(){return c},cj:function(){return b},cs:function(){return m},dR:function(){return h},pZ:function(){return p},se:function(){return l},vU:function(){return u}});var r=n(56283),o=n(69977);class a extends o.G{constructor({cause:e,message:t}={}){const n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class i extends o.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class s extends o.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class c extends o.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class u extends o.G{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class l extends o.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends o.G{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class f extends o.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class h extends o.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class p extends o.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends o.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${(0,r.o)(n)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class b extends o.G{constructor({cause:e}){super(`An error occurred while executing: ${e?.message}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}},88822:function(e,t,n){"use strict";n.d(t,{Gg:function(){return i},W5:function(){return u},bs:function(){return c},c9:function(){return s}});var r=n(61344),o=n(69977),a=n(20966);class i extends o.G{constructor({body:e,details:t,headers:n,status:o,url:i}){super("HTTP request failed.",{details:t,metaMessages:[o&&`Status: ${o}`,`URL: ${(0,a.Gr)(i)}`,e&&`Request body: ${(0,r.P)(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=o,this.url=i}}class s extends o.G{constructor({body:e,details:t,url:n}){super("WebSocket request failed.",{details:t,metaMessages:[`URL: ${(0,a.Gr)(n)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class c extends o.G{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,a.Gr)(n)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class u extends o.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,a.Gr)(t)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}},42455:function(e,t,n){"use strict";n.d(t,{B:function(){return c},GD:function(){return y},I0:function(){return x},KB:function(){return m},LX:function(){return u},Og:function(){return h},PE:function(){return w},Pv:function(){return g},Ts:function(){return E},XS:function(){return d},ab:function(){return v},gS:function(){return b},ir:function(){return C},nY:function(){return l},pT:function(){return p},s7:function(){return s},u5:function(){return A},x3:function(){return P},yR:function(){return f}});var r=n(69977),o=n(88822);class a extends r.G{constructor(e,{code:t,docsPath:n,metaMessages:r,shortMessage:a}){super(a,{cause:e,docsPath:n,metaMessages:r||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof o.bs?e.code:t??-1}}class i extends a{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class s extends a{constructor(e){super(e,{code:s.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends a{constructor(e){super(e,{code:c.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class u extends a{constructor(e){super(e,{code:u.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class l extends a{constructor(e){super(e,{code:l.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends a{constructor(e){super(e,{code:d.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class f extends a{constructor(e){super(e,{code:f.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class h extends a{constructor(e){super(e,{code:h.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class p extends a{constructor(e){super(e,{code:p.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class m extends a{constructor(e){super(e,{code:m.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class b extends a{constructor(e){super(e,{code:b.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class g extends a{constructor(e){super(e,{code:g.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class y extends a{constructor(e){super(e,{code:y.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends i{constructor(e){super(e,{code:v.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends i{constructor(e){super(e,{code:w.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class E extends i{constructor(e){super(e,{code:E.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class A extends i{constructor(e){super(e,{code:A.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class x extends i{constructor(e){super(e,{code:x.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class P extends i{constructor(e){super(e,{code:P.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class C extends a{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}},54574:function(e,t,n){"use strict";n.d(t,{Bh:function(){return f},JC:function(){return l},Yb:function(){return h},j3:function(){return u},mc:function(){return p},mk:function(){return d},vl:function(){return c},xY:function(){return s},xr:function(){return i}});var r=n(6665),o=n(56283),a=n(69977);function i(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),n=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`)).join("\n")}class s extends a.G{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class c extends a.G{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class u extends a.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",i(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class l extends a.G{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}class d extends a.G{constructor(e,{account:t,docsPath:n,chain:a,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){const m=i({chain:a&&`${a?.name} (id: ${a?.id})`,from:t?.address,to:h,value:"undefined"!==typeof p&&`${(0,r.d)(p)} ${a?.nativeCurrency.symbol||"ETH"}`,data:s,gas:c,gasPrice:"undefined"!==typeof u&&`${(0,o.o)(u)} gwei`,maxFeePerGas:"undefined"!==typeof l&&`${(0,o.o)(l)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof d&&`${(0,o.o)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class f extends a.G{constructor({blockHash:e,blockNumber:t,blockTag:n,hash:r,index:o}){let a="Transaction";n&&void 0!==o&&(a=`Transaction at block time "${n}" at index "${o}"`),e&&void 0!==o&&(a=`Transaction at block hash "${e}" at index "${o}"`),t&&void 0!==o&&(a=`Transaction at block number "${t}" at index "${o}"`),r&&(a=`Transaction with hash "${r}"`),super(`${a} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class h extends a.G{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class p extends a.G{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}},20966:function(e,t,n){"use strict";n.d(t,{CR:function(){return r},Gr:function(){return o},bo:function(){return a}});const r=e=>e,o=e=>e,a=()=>"viem@1.5.4"},70558:function(e,t,n){"use strict";n.d(t,{r:function(){return l}});var r=n(5555),o=n(92221),a=n(51756),i=n(33283),s=n(26873),c=n(90169),u=n(62546);function l(e,t){if("0x"===t&&e.length>0)throw new r.wb;if((0,a.d)(t)&&(0,a.d)(t)<32)throw new r.xB({data:t,params:e,size:(0,a.d)(t)});return function({data:e,params:t}){const n=[];let o=0;for(let i=0;i=(0,a.d)(e))throw new r.xB({data:e,params:t,size:(0,a.d)(e)});const s=t[i],{consumed:c,value:u}=d({data:e,param:s,position:o});n.push(u),o+=c}return n}({data:t,params:e})}function d({data:e,param:t,position:n}){const a=(0,u.S)(t.type);if(a){const[r,o]=a;return function(e,{param:t,length:n,position:r}){if(!n){const n=(0,c.ly)((0,i.tP)(e,r,r+32,{strict:!0})),o=(0,c.ly)((0,i.tP)(e,n,n+32,{strict:!0}));let a=0;const s=[];for(let r=0;r!e)),o=r?[]:{};let a=0;if(f(t)){const s=(0,c.ly)((0,i.tP)(e,n,n+32,{strict:!0}));for(let n=0;n48?(0,c.y_)(e,{signed:n}):(0,c.ly)(e,{signed:n})}}(l,{param:t});if("address"===t.type)return function(e){return{consumed:32,value:(0,o.x)((0,i.tP)(e,-20))}}(l);if("bool"===t.type)return function(e){return{consumed:32,value:(0,c.XA)(e)}}(l);throw new r.CI(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function f(e){const{type:t}=e;if("string"===t)return!0;if("bytes"===t)return!0;if(t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(f);const n=(0,u.S)(e.type);return!(!n||!f({...e,type:n[1]}))}},11856:function(e,t,n){"use strict";n.d(t,{p:function(){return u}});var r=n(35554),o=n(5555),a=n(33283),i=n(80507),s=n(70558),c=n(21494);function u({abi:e,data:t}){const n=(0,a.tP)(t,0,4);if("0x"===n)throw new o.wb;const u=[...e||[],r.Up,r.hZ].find((e=>"error"===e.type&&n===(0,i.o)((0,c.t)(e))));if(!u)throw new o.yP(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?(0,s.r)(u.inputs,(0,a.tP)(t,4)):void 0,errorName:u.name}}},31826:function(e,t,n){"use strict";n.d(t,{k:function(){return s}});var r=n(5555),o=n(70558),a=n(28604);const i="/docs/contract/decodeFunctionResult";function s({abi:e,args:t,functionName:n,data:s}){let c=e[0];if(n&&(c=(0,a.m)({abi:e,args:t,name:n}),!c))throw new r.xL(n,{docsPath:i});if("function"!==c.type)throw new r.xL(void 0,{docsPath:i});if(!c.outputs)throw new r.MX(c.name,{docsPath:i});const u=(0,o.r)(c.outputs,s);return u&&u.length>1?u:u&&1===u.length?u[0]:void 0}},62546:function(e,t,n){"use strict";n.d(t,{E:function(){return d},S:function(){return p}});var r=n(5555),o=n(92960),a=n(97451),i=n(9040),s=n(28795),c=n(51756),u=n(33283),l=n(46872);function d(e,t){if(e.length!==t.length)throw new r.fs({expectedLength:e.length,givenLength:t.length});const n=function({params:e,values:t}){const n=[];for(let r=0;r0?(0,i.zo)([t,e]):t}}if(a)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,i.zo)(s.map((({encoded:e})=>e)))}}(t,{length:o,param:{...e,type:a}})}if("tuple"===e.type)return function(e,{param:t}){let n=!1;const r=[];for(let o=0;oe)))}}(t,{param:e});if("address"===e.type)return function(e){if(!(0,a.U)(e))throw new o.b({address:e});return{dynamic:!1,encoded:(0,s.gc)(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){return{dynamic:!1,encoded:(0,s.gc)((0,l.C4)(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){return function(e,{signed:t}){return{dynamic:!1,encoded:(0,l.eC)(e,{size:32,signed:t})}}(t,{signed:e.type.startsWith("int")})}if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,n]=t.type.split("bytes"),o=(0,c.d)(e);if(!n){let t=e;return o%32!==0&&(t=(0,s.gc)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,i.zo)([(0,s.gc)((0,l.eC)(o,{size:32})),t])}}if(o!==parseInt(n))throw new r.M4({expectedSize:parseInt(n),value:e});return{dynamic:!1,encoded:(0,s.gc)(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=(0,l.$G)(e),n=Math.ceil((0,c.d)(t)/32),r=[];for(let o=0;o"type"in e&&"constructor"===e.type));if(!s)throw new r.fM({docsPath:i});if(!("inputs"in s))throw new r.cO({docsPath:i});if(!s.inputs||0===s.inputs.length)throw new r.cO({docsPath:i});const c=(0,a.E)(s.inputs,t);return(0,o.SM)([n,c])}},96606:function(e,t,n){"use strict";n.d(t,{R:function(){return u}});var r=n(5555),o=n(9040),a=n(80507),i=n(62546),s=n(21494),c=n(28604);function u({abi:e,args:t,functionName:n}){let u=e[0];if(n&&(u=(0,c.m)({abi:e,args:t,name:n}),!u))throw new r.xL(n,{docsPath:"/docs/contract/encodeFunctionData"});if("function"!==u.type)throw new r.xL(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const l=(0,s.t)(u),d=(0,a.o)(l),f="inputs"in u&&u.inputs?(0,i.E)(u.inputs,t??[]):void 0;return(0,o.SM)([d,f??"0x"])}},21494:function(e,t,n){"use strict";n.d(t,{h:function(){return a},t:function(){return o}});var r=n(5555);function o(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new r.wM(e.type);return`${e.name}(${a(e.inputs,{includeName:t})})`}function a(e,{includeName:t=!1}={}){return e?e.map((e=>function(e,{includeName:t}){if(e.type.startsWith("tuple"))return`(${a(e.components,{includeName:t})})${e.type.slice("tuple".length)}`;return e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t}))).join(t?", ":","):""}},28604:function(e,t,n){"use strict";n.d(t,{m:function(){return o}});var r=n(97451);function o({abi:e,args:t=[],name:n}){const r=e.filter((e=>"name"in e&&e.name===n));if(0!==r.length){if(1===r.length)return r[0];for(const e of r){if(!("inputs"in e))continue;if(!t||0===t.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(!e.inputs)continue;if(0===e.inputs.length)continue;if(e.inputs.length!==t.length)continue;if(t.every(((t,n)=>{const r="inputs"in e&&e.inputs[n];return!!r&&a(t,r)})))return e}return r[0]}}function a(e,t){const n=typeof e,o=t.type;switch(o){case"address":return(0,r.U)(e);case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:return"tuple"===o&&"components"in t?Object.values(t.components).every(((t,n)=>a(Object.values(e)[n],t))):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?"number"===n||"bigint"===n:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?"string"===n||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)&&(Array.isArray(e)&&e.every((e=>a(e,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")}))))}}},92221:function(e,t,n){"use strict";n.d(t,{K:function(){return c},x:function(){return s}});var r=n(92960),o=n(41327),a=n(90707),i=n(97451);function s(e,t){const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=(0,a.w)((0,o.qX)(n),"bytes"),i=(t?n.substring(`${t}0x`.length):n).split("");for(let o=0;o<40;o+=2)r[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(15&r[o>>1])>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());return`0x${i.join("")}`}function c(e,t){if(!(0,i.U)(e))throw new r.b({address:e});return s(e,t)}},97451:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});const r=/^0x[a-fA-F0-9]{40}$/;function o(e){return r.test(e)}},62635:function(e,t,n){"use strict";n.d(t,{n:function(){return c},y:function(){return s}});var r=n(69977),o=n(88822),a=n(42455),i=n(11941);const s=e=>"code"in e?-1!==e.code&&-32004!==e.code&&-32005!==e.code&&-32042!==e.code&&-32603!==e.code:!!(e instanceof o.Gg&&e.status)&&(403!==e.status&&408!==e.status&&413!==e.status&&429!==e.status&&500!==e.status&&502!==e.status&&503!==e.status&&504!==e.status);function c(e,{retryDelay:t=150,retryCount:n=3}={}){return async c=>(0,i.J)((async()=>{try{return await e(c)}catch(t){const e=t;switch(e.code){case a.s7.code:throw new a.s7(e);case a.B.code:throw new a.B(e);case a.LX.code:throw new a.LX(e);case a.nY.code:throw new a.nY(e);case a.XS.code:throw new a.XS(e);case a.yR.code:throw new a.yR(e);case a.Og.code:throw new a.Og(e);case a.pT.code:throw new a.pT(e);case a.KB.code:throw new a.KB(e);case a.gS.code:throw new a.gS(e);case a.Pv.code:throw new a.Pv(e);case a.GD.code:throw new a.GD(e);case a.ab.code:throw new a.ab(e);case a.PE.code:throw new a.PE(e);case a.Ts.code:throw new a.Ts(e);case a.u5.code:throw new a.u5(e);case a.I0.code:throw new a.I0(e);case a.x3.code:throw new a.x3(e);default:if(t instanceof r.G)throw t;throw new a.ir(e)}}}),{delay:({count:e,error:n})=>{if(n&&n instanceof o.Gg){const e=n?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<!s(e)})}},61786:function(e,t,n){"use strict";n.d(t,{LI:function(){return i},ax:function(){return a},qg:function(){return o}});var r=n(21973);function o({chain:e,currentChainId:t}){if(!e)throw new r.Bk;if(t!==e.id)throw new r.Yl({chain:e,currentChainId:t})}function a(e,t={}){const{fees:n=e.fees,formatters:r=e.formatters,serializers:o=e.serializers}=t;return{...e,fees:n,formatters:r,serializers:o}}function i({blockNumber:e,chain:t,contract:n}){const o=t?.contracts?.[n];if(!o)throw new r.mm({chain:t,contract:{name:n}});if(e&&o.blockCreated&&o.blockCreated>e)throw new r.mm({blockNumber:e,chain:t,contract:{name:n,blockCreated:o.blockCreated}});return o.address}},9040:function(e,t,n){"use strict";function r(e){return"string"===typeof e[0]?o(e):function(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}(e)}function o(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}n.d(t,{SM:function(){return o},zo:function(){return r}})},25493:function(e,t,n){"use strict";function r(e,{strict:t=!0}={}){return!!e&&("string"===typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")))}n.d(t,{v:function(){return r}})},28795:function(e,t,n){"use strict";n.d(t,{gc:function(){return a},vk:function(){return o}});var r=n(98309);function o(e,{dir:t,size:n=32}={}){return"string"===typeof e?a(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new r.$({size:e.length,targetSize:n,type:"bytes"});const o=new Uint8Array(n);for(let r=0;r2*n)throw new r.$({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o["right"===t?"padEnd":"padStart"](2*n,"0")}`}},51756:function(e,t,n){"use strict";n.d(t,{d:function(){return o}});var r=n(25493);function o(e){return(0,r.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},33283:function(e,t,n){"use strict";n.d(t,{tP:function(){return i}});var r=n(98309),o=n(25493),a=n(51756);function i(e,t,n,{strict:r}={}){return(0,o.v)(e,{strict:!1})?function(e,t,n,{strict:r}={}){s(e,t);const o=`0x${e.replace("0x","").slice(2*(t??0),2*(n??e.length))}`;r&&c(o,t,n);return o}(e,t,n,{strict:r}):function(e,t,n,{strict:r}={}){s(e,t);const o=e.slice(t,n);r&&c(o,t,n);return o}(e,t,n,{strict:r})}function s(e,t){if("number"===typeof t&&t>0&&t>(0,a.d)(e)-1)throw new r.m({offset:t,position:"start",size:(0,a.d)(e)})}function c(e,t,n){if("number"===typeof t&&"number"===typeof n&&(0,a.d)(e)!==n-t)throw new r.m({offset:n,position:"end",size:(0,a.d)(e)})}},26873:function(e,t,n){"use strict";function r(e,{dir:t="left"}={}){let n="string"===typeof e?e.replace("0x",""):e,r=0;for(let o=0;ot)throw new r.M6({givenSize:(0,o.d)(e),maxSize:t})}function c(e,t={}){const{signed:n}=t;t.size&&s(e,{size:t.size});const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2;return r<=(1n<<8n*BigInt(o)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*o,"f")}`)-1n}function u(e,t={}){let n=e;if(t.size&&(s(n,{size:t.size}),n=(0,a.f)(n)),"0x00"===(0,a.f)(n))return!1;if("0x01"===(0,a.f)(n))return!0;throw new r.Cd(n)}function l(e,t={}){return Number(c(e,t))}function d(e,t={}){let n=(0,i.nr)(e);return t.size&&(s(n,{size:t.size}),n=(0,a.f)(n,{dir:"right"})),(new TextDecoder).decode(n)}},41327:function(e,t,n){"use strict";n.d(t,{O0:function(){return u},nr:function(){return l},qX:function(){return d}});var r=n(69977),o=n(25493),a=n(28795),i=n(90169),s=n(46872);const c=new TextEncoder;function u(e,t={}){return"number"===typeof e||"bigint"===typeof e?function(e,t){return l((0,s.eC)(e,t))}(e,t):"boolean"===typeof e?function(e,t={}){const n=new Uint8Array(1);if(n[0]=Number(e),"number"===typeof t.size)return(0,i.Yf)(n,{size:t.size}),(0,a.vk)(n,{size:t.size});return n}(e,t):(0,o.v)(e)?l(e,t):d(e,t)}function l(e,t={}){let n=e;t.size&&((0,i.Yf)(n,{size:t.size}),n=(0,a.vk)(n,{dir:"right",size:t.size}));let o=n.slice(2);o.length%2&&(o=`0${o}`);const s=new Uint8Array(o.length/2);for(let a=0;at.toString(16).padStart(2,"0")));function s(e,t={}){return"number"===typeof e||"bigint"===typeof e?l(e,t):"string"===typeof e?f(e,t):"boolean"===typeof e?c(e,t):u(e,t)}function c(e,t={}){const n=`0x${Number(e)}`;return"number"===typeof t.size?((0,a.Yf)(n,{size:t.size}),(0,o.vk)(n,{size:t.size})):n}function u(e,t={}){let n="";for(let o=0;os||i"string"===typeof e?e:(0,o.Tr)(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const i=(0,r.$)("block",a)},91019:function(e,t,n){"use strict";function r(e,{format:t}){if(!t)return{};return Object.keys(t({})).reduce(((t,n)=>(e?.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})}n.d(t,{K:function(){return r}})},75491:function(e,t,n){"use strict";function r(e,t){return({exclude:n,format:r})=>({exclude:n,format:e=>{const o=t(e);if(n)for(const t of n)delete o[t];return{...o,...r(e)}},type:e})}n.d(t,{$:function(){return r}})},18829:function(e,t,n){"use strict";function r(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}n.d(t,{U:function(){return r}})},94216:function(e,t,n){"use strict";n.d(t,{Tr:function(){return i},c8:function(){return a},y_:function(){return s}});var r=n(90169),o=n(75491);const a={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function i(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,r.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?a[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip2930"===t.type&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}const s=(0,o.$)("transaction",i)},4656:function(e,t,n){"use strict";n.d(t,{d:function(){return u},f:function(){return c}});var r=n(90169),o=n(75491),a=n(18829),i=n(94216);const s={"0x0":"reverted","0x1":"success"};function c(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>(0,a.U)(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.ly)(e.transactionIndex):null,status:e.status?s[e.status]:null,type:e.type?i.c8[e.type]||e.type:null}}const u=(0,o.$)("transactionReceipt",c)},23822:function(e,t,n){"use strict";n.d(t,{i:function(){return a},t:function(){return o}});var r=n(46872);function o(e){return{...e,gas:"undefined"!==typeof e.gas?(0,r.eC)(e.gas):void 0,gasPrice:"undefined"!==typeof e.gasPrice?(0,r.eC)(e.gasPrice):void 0,maxFeePerGas:"undefined"!==typeof e.maxFeePerGas?(0,r.eC)(e.maxFeePerGas):void 0,maxPriorityFeePerGas:"undefined"!==typeof e.maxPriorityFeePerGas?(0,r.eC)(e.maxPriorityFeePerGas):void 0,nonce:"undefined"!==typeof e.nonce?(0,r.eC)(e.nonce):void 0,value:"undefined"!==typeof e.value?(0,r.eC)(e.value):void 0}}const a=(0,n(75491).$)("transactionRequest",o)},80507:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(33283),o=n(56143);const a=e=>"string"===typeof e?(0,r.tP)((0,o.F)(e),0,4):(0,r.tP)((0,o.J)(e),0,4)},56143:function(e,t,n){"use strict";n.d(t,{J:function(){return l},F:function(){return u}});var r=n(21494);const o=/((function|event)\s)?(.*)(\((.*)\))/;function a(e){const t=e.match(o),n=t?.[2]||void 0,r=t?.[3];return{type:n,name:r,params:t?.[5]||void 0}}var i=n(41327),s=n(90707);const c=e=>(0,s.w)((0,i.O0)(e));function u(e){const t=function(e){return a(e).name}(e),n=function(e){const t=a(e).params?.split(",").map((e=>e.trim().split(" ")));return t?.map((e=>({type:e[0],name:"indexed"===e[1]?e[2]:e[1],..."indexed"===e[1]?{indexed:!0}:{}})))}(e)||[];return c(`${t}(${n.map((({type:e})=>e)).join(",")})`)}function l(e){return c((0,r.t)(e))}},90707:function(e,t,n){"use strict";function r(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}`)}n.d(t,{w:function(){return k}});const a={number:r,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");r(e.outputLen),r(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 n=t.outputLen;if(e.length>c&s)}:{h:0|Number(e>>c&s),l:0|Number(e&s)}}var l={fromBig:u,split:function(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0),shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:(e,t,n)=>e<>>32-n,rotlSL:(e,t,n)=>t<>>32-n,rotlBH:(e,t,n)=>t<>>64-n,rotlBL:(e,t,n)=>e<>>64-n,add:function(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,add5H:(e,t,n,r,o,a)=>t+n+r+o+a+(e/2**32|0)|0,add5L:(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0)};"object"===typeof globalThis&&"crypto"in globalThis&&globalThis.crypto;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function d(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}const[f,h,p]=[[],[],[]],m=BigInt(0),b=BigInt(1),g=BigInt(2),y=BigInt(7),v=BigInt(256),w=BigInt(113);for(let _=0,N=b,M=1,R=0;_<24;_++){[M,R]=[R,(2*M+3*R)%5],f.push(2*(5*R+M)),h.push((_+1)*(_+2)/2%64);let e=m;for(let t=0;t<7;t++)N=(N<>y)*w)%v,N&g&&(e^=b<<(b<n>32?l.rotlBH(e,t,n):l.rotlSH(e,t,n),P=(e,t,n)=>n>32?l.rotlBL(e,t,n):l.rotlSL(e,t,n);class C extends class{clone(){return this._cloneInto()}}{constructor(e,t,n,r=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,i.number(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var a;this.state=new Uint8Array(200),this.state32=(a=this.state,new Uint32Array(a.buffer,a.byteOffset,Math.floor(a.byteLength/4)))}keccak(){!function(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,o=(r+2)%10,a=n[o],i=n[o+1],s=x(a,i,1)^n[t],c=P(a,i,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=s,e[r+n+1]^=c}let t=e[2],o=e[3];for(let n=0;n<24;n++){const r=h[n],a=x(t,o,r),i=P(t,o,r),s=f[n];t=e[s],o=e[s+1],e[s]=a,e[s+1]=i}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=E[r],e[1]^=A[r]}n.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){i.exists(this);const{blockLen:t,state:n}=this,r=(e=d(e)).length;for(let o=0;o=n&&this.keccak();const a=Math.min(n-this.posOut,o-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return i.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(i.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:n,outputLen:r,rounds:o,enableXOF:a}=this;return e||(e=new C(t,n,r,a,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=r,e.enableXOF=a,e.destroyed=this.destroyed,e}}const j=(e,t,n)=>function(e){const t=t=>e().update(d(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}((()=>new C(t,e,n))),I=(j(6,144,28),j(6,136,32),j(6,104,48),j(6,72,64),j(1,144,28),j(1,136,32)),O=(j(1,104,48),j(1,72,64),(e,t,n)=>function(e){const t=(t,n)=>e(n).update(d(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}(((r={})=>new C(t,e,void 0===r.dkLen?n:r.dkLen,!0))));O(31,168,16),O(31,136,32);var T=n(25493),S=n(41327),B=n(46872);function k(e,t){const n=t||"hex",r=I((0,T.v)(e,{strict:!1})?(0,S.O0)(e):e);return"bytes"===n?r:(0,B.NC)(r)}},68583:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});const r=new Map;function o({fn:e,id:t,shouldSplitBatch:n,wait:o=0}){const a=async()=>{const t=s();i();const n=t.map((({args:e})=>e));0!==n.length&&e(n).then((e=>{t.forEach((({pendingPromise:t},n)=>t.resolve?.([e[n],e])))})).catch((e=>{t.forEach((({pendingPromise:t})=>t.reject?.(e)))}))},i=()=>r.delete(t),s=()=>r.get(t)||[],c=e=>r.set(t,[...s(),e]);return{flush:i,async schedule(e){const t={},r=new Promise(((e,n)=>{t.resolve=e,t.reject=n})),i=n?.([...s().map((({args:e})=>e)),e]);i&&a();return s().length>0?(c({args:e,pendingPromise:t}),r):(c({args:e,pendingPromise:t}),setTimeout(a,o),r)}}}},11941:function(e,t,n){"use strict";n.d(t,{J:function(){return o}});var r=n(40482);function o(e,{delay:t=100,retryCount:n=2,shouldRetry:o=(()=>!0)}={}){return new Promise(((a,i)=>{const s=async({count:c=0}={})=>{try{const t=await e();a(t)}catch(u){if(c{const n="function"===typeof t?t({count:c,error:e}):t;n&&await(0,r.D)(n),s({count:c+1})})({error:u});i(u)}};s()}))}},61344:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});const r=(e,t,n)=>JSON.stringify(e,((e,n)=>{const r="bigint"===typeof n?n.toString():n;return"function"===typeof t?t(e,r):r}),n)},13134:function(e,t,n){"use strict";n.d(t,{F:function(){return c}});var r=n(21431),o=n(92960),a=n(66054),i=n(54574),s=n(97451);function c(e){const{account:t,gasPrice:n,maxFeePerGas:c,maxPriorityFeePerGas:u,to:l}=e,d=t?(0,r.T)(t):void 0;if(d&&!(0,s.U)(d.address))throw new o.b({address:d.address});if(l&&!(0,s.U)(l))throw new o.b({address:l});if("undefined"!==typeof n&&("undefined"!==typeof c||"undefined"!==typeof u))throw new i.xY;if(c&&c>2n**256n-1n)throw new a.Hh({maxFeePerGas:c});if(u&&c&&u>c)throw new a.cs({maxFeePerGas:c,maxPriorityFeePerGas:u})}},59920:function(e,t,n){"use strict";n.d(t,{h:function(){return d}});var r=n(21431),o=n(14828),a=n(33910),i=n(48671),s=n(89784),c=n(25071),u=n(69977),l=n(13134);async function d(e,t){const{account:n,chain:d=e.chain,gas:f,gasPrice:h,maxFeePerGas:p,maxPriorityFeePerGas:m,nonce:b}=t;if(!n)throw new c.o;const g=(0,r.T)(n),y=await(0,a.Q)(e,{blockTag:"latest"}),v={...t,from:g.address};if("undefined"===typeof b&&(v.nonce=await(0,s.K)(e,{address:g.address,blockTag:"pending"})),"bigint"===typeof y.baseFeePerGas&&"undefined"===typeof h){let e=1500000000n;if("undefined"!==typeof d?.fees?.defaultPriorityFee&&(e="bigint"===typeof d.fees.defaultPriorityFee?d.fees.defaultPriorityFee:await d.fees.defaultPriorityFee({block:y,request:v})),"undefined"===typeof p)v.maxPriorityFeePerGas=m??e,v.maxFeePerGas=120n*y.baseFeePerGas/100n+v.maxPriorityFeePerGas;else{if("undefined"===typeof m&&p{for(const n of e){const{name:e,type:l}=n,h=l,p=t[e],m=h.match(u);if(m&&("number"===typeof p||"bigint"===typeof p)){const[e,t,n]=m;(0,s.eC)(p,{signed:"int"===t,size:parseInt(n)/8})}if("address"===h&&"string"===typeof p&&!(0,a.U)(p))throw new o.b({address:p});const b=h.match(c);if(b){const[e,t]=b;if(t&&(0,i.d)(p)!==parseInt(t))throw new r.KY({expectedSize:parseInt(t),givenSize:(0,i.d)(p)})}const g=d[h];g&&f(g,p)}};if(d.EIP712Domain&&e&&f(d.EIP712Domain,e),"EIP712Domain"!==n){const e=d[n];f(e,t)}}},6665:function(e,t,n){"use strict";n.d(t,{d:function(){return a}});var r=n(58617),o=n(60263);function a(e,t="wei"){return(0,o.b)(e,r.ez[t])}},56283:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(58617),o=n(60263);function a(e,t="wei"){return(0,o.b)(e,r.Zn[t])}},60263:function(e,t,n){"use strict";function r(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${a?`.${a}`:""}`}n.d(t,{b:function(){return r}})},22852:function(e,t,n){"use strict";function r(e,t){let[n,r="0"]=e.split(".");const o=n.startsWith("-");if(o&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${r}`))&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>t){const[e,o,a]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],i=Math.round(Number(`${o}.${a}`));r=i>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${i}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${o?"-":""}${n}${r}`)}n.d(t,{v:function(){return r}})},40482:function(e,t,n){"use strict";async function r(e){return new Promise((t=>setTimeout(t,e)))}n.d(t,{D:function(){return r}})},90696:function(e,t,n){"use strict";n.r(t),n.d(t,{bitGet:function(){return A},bitLen:function(){return E},bitMask:function(){return P},bitSet:function(){return x},bytesToHex:function(){return c},bytesToNumberBE:function(){return f},bytesToNumberLE:function(){return h},concatBytes:function(){return y},createHmacDrbg:function(){return I},ensureBytes:function(){return g},equalBytes:function(){return v},hexToBytes:function(){return d},hexToNumber:function(){return l},numberToBytesBE:function(){return p},numberToBytesLE:function(){return m},numberToHexUnpadded:function(){return u},numberToVarBytesBE:function(){return b},utf8ToBytes:function(){return w},validateObject:function(){return T}});const r=BigInt(0),o=BigInt(1),a=BigInt(2),i=e=>e instanceof Uint8Array,s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function c(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let n=0;ne+t.length),0));let n=0;return e.forEach((e=>{if(!i(e))throw new Error("Uint8Array expected");t.set(e,n),n+=e.length})),t}function v(e,t){if(e.length!==t.length)return!1;for(let n=0;nr;e>>=o,t+=1);return t}function A(e,t){return e>>BigInt(t)&o}const x=(e,t,n)=>e|(n?o:r)<(a<new Uint8Array(e),j=e=>Uint8Array.from(e);function I(e,t,n){if("number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!==typeof n)throw new Error("hmacFn must be a function");let r=C(e),o=C(e),a=0;const i=()=>{r.fill(1),o.fill(0),a=0},s=(...e)=>n(o,r,...e),c=(e=C())=>{o=s(j([0]),e),r=s(),0!==e.length&&(o=s(j([1]),e),r=s())},u=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e{let n;for(i(),c(e);!(n=t(u()));)c();return i(),n}}const O={bigint:e=>"bigint"===typeof e,function:e=>"function"===typeof e,boolean:e=>"boolean"===typeof e,string:e=>"string"===typeof e,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"===typeof e&&Number.isSafeInteger(e.outputLen)};function T(e,t,n={}){const r=(t,n,r)=>{const o=O[n];if("function"!==typeof o)throw new Error(`Invalid validator "${n}", expected function`);const a=e[t];if((!r||void 0!==a)&&!o(a,e))throw new Error(`Invalid param ${String(t)}=${a} (${typeof a}), expected ${n}`)};for(const[o,a]of Object.entries(t))r(o,a,!1);for(const[o,a]of Object.entries(n))r(o,a,!0);return e}},35133:function(e,t,n){"use strict";function r({storage:e,key:t="REACT_QUERY_OFFLINE_CACHE",throttleTime:n=1e3,serialize:r=JSON.stringify,deserialize:i=JSON.parse,retry:s}){if(e){const a=n=>{try{return void e.setItem(t,r(n))}catch(o){return o}};return{persistClient:o((e=>{let t=e,n=a(t),r=0;for(;n&&t;)r++,t=null==s?void 0:s({persistedClient:t,error:n,errorCount:r}),t&&(n=a(t))}),n),restoreClient:()=>{const n=e.getItem(t);if(n)return i(n)},removeClient:()=>{e.removeItem(t)}}}return{persistClient:a,restoreClient:()=>{},removeClient:a}}function o(e,t=100){let n,r=null;return function(...o){n=o,null===r&&(r=setTimeout((()=>{e(...n),r=null}),t))}}function a(){}n.d(t,{eM:function(){return Ce},_g:function(){return Ae},mA:function(){return Je},KQ:function(){return Ze},$4:function(){return et},do:function(){return ut},GG:function(){return dt},qL:function(){return rt},c9:function(){return ht},F6:function(){return mt},LK:function(){return We},LN:function(){return ot},M5:function(){return bt},t_:function(){return Re},pQ:function(){return yt},QW:function(){return it},g0:function(){return ct},BX:function(){return vt}});const i="undefined"===typeof window||"Deno"in window;function s(){}function c(e){return"number"===typeof e&&e>=0&&e!==1/0}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t,n){return P(e)?"function"===typeof t?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function d(e,t,n){return P(e)?"function"===typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"===typeof e?{...t,mutationFn:e}:{...e}}function f(e,t,n){return P(e)?[{...t,queryKey:e},n]:[e||{},t]}function h(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:a,queryKey:i,stale:s}=e;if(P(i))if(r){if(t.queryHash!==m(i,t.options))return!1}else if(!g(t.queryKey,i))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!==typeof s||t.isStale()===s)&&(("undefined"===typeof o||o===t.state.fetchStatus)&&!(a&&!a(t)))}function p(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:a}=e;if(P(a)){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(a))return!1}else if(!g(t.options.mutationKey,a))return!1}return("boolean"!==typeof r||"loading"===t.state.status===r)&&!(o&&!o(t))}function m(e,t){return((null==t?void 0:t.queryKeyHashFn)||b)(e)}function b(e){return JSON.stringify(e,((e,t)=>A(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function g(e,t){return y(e,t)}function y(e,t){return e===t||typeof e===typeof t&&(!(!e||!t||"object"!==typeof e||"object"!==typeof t)&&!Object.keys(t).some((n=>!y(e[n],t[n]))))}function v(e,t){if(e===t)return e;const n=E(e)&&E(t);if(n||A(e)&&A(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),a=o.length,i=n?[]:{};let s=0;for(let c=0;c{setTimeout(t,e)}))}function j(e){C(0).then(e)}function I(e,t,n){return null!=n.isDataEqual&&n.isDataEqual(e,t)?e:"function"===typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?v(e,t):t}const O=console;const T=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()};const o=r=>{t?e.push(r):j((()=>{n(r)}))},a=()=>{const t=e;e=[],t.length&&j((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||a()}return n},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e}}}();class S{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const B=new class extends S{constructor(){super(),this.setup=e=>{if(!i&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"===typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach((({listener:e})=>{e()}))}isFocused(){return"boolean"===typeof this.focused?this.focused:"undefined"===typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}},k=["online","offline"];const _=new class extends S{constructor(){super(),this.setup=e=>{if(!i&&window.addEventListener){const t=()=>e();return k.forEach((e=>{window.addEventListener(e,t,!1)})),()=>{k.forEach((e=>{window.removeEventListener(e,t)}))}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"===typeof e?this.setOnline(e):this.onOnline()}))}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach((({listener:e})=>{e()}))}isOnline(){return"boolean"===typeof this.online?this.online:"undefined"===typeof navigator||"undefined"===typeof navigator.onLine||navigator.onLine}};function N(e){return Math.min(1e3*2**e,3e4)}function M(e){return"online"!==(null!=e?e:"online")||_.isOnline()}class R{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function F(e){return e instanceof R}function U(e){let t,n,r,o=!1,a=0,i=!1;const s=new Promise(((e,t)=>{n=e,r=t})),c=()=>!B.isFocused()||"always"!==e.networkMode&&!_.isOnline(),u=r=>{i||(i=!0,null==e.onSuccess||e.onSuccess(r),null==t||t(),n(r))},l=n=>{i||(i=!0,null==e.onError||e.onError(n),null==t||t(),r(n))},d=()=>new Promise((n=>{t=e=>{const t=i||!c();return t&&n(e),t},null==e.onPause||e.onPause()})).then((()=>{t=void 0,i||null==e.onContinue||e.onContinue()})),f=()=>{if(i)return;let t;try{t=e.fn()}catch(n){t=Promise.reject(n)}Promise.resolve(t).then(u).catch((t=>{var n,r;if(i)return;const s=null!=(n=e.retry)?n:3,u=null!=(r=e.retryDelay)?r:N,h="function"===typeof u?u(a,t):u,p=!0===s||"number"===typeof s&&a{if(c())return d()})).then((()=>{o?l(t):f()}))):l(t)}))};return M(e.networkMode)?f():d().then(f),{promise:s,cancel:t=>{i||(l(new R(t)),null==e.abort||e.abort())},continue:()=>(null==t?void 0:t())?s:Promise.resolve(),cancelRetry:()=>{o=!0},continueRetry:()=>{o=!1}}}class L{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),c(this.cacheTime)&&(this.gcTimeout=setTimeout((()=>{this.optionalRemove()}),this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:i?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class D extends L{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||O,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){const t="function"===typeof e.initialData?e.initialData():e.initialData,n="undefined"!==typeof t,r=n?"function"===typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){const n=I(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;const n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(s).catch(s):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some((e=>!1!==e.options.enabled))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((e=>e.getCurrentResult().isStale))}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!u(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var n,r;if("idle"!==this.state.fetchStatus)if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return null==(o=this.retryer)||o.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}Array.isArray(this.options.queryKey);const a=function(){if("function"===typeof AbortController)return new AbortController}(),i={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};s(i);const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(i)):Promise.reject("Missing queryFn")};var u;(s(c),null==(n=this.options.behavior)||n.onFetch(c),this.revertState=this.state,"idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(r=c.fetchOptions)?void 0:r.meta))&&this.dispatch({type:"fetch",meta:null==(u=c.fetchOptions)?void 0:u.meta});const l=e=>{var t,n,r,o;(F(e)&&e.silent||this.dispatch({type:"error",error:e}),F(e))||(null==(t=(n=this.cache.config).onError)||t.call(n,e,this),null==(r=(o=this.cache.config).onSettled)||r.call(o,this.state.data,e,this));this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=U({fn:c.fetchFn,abort:null==a?void 0:a.abort.bind(a),onSuccess:e=>{var t,n,r,o;"undefined"!==typeof e?(this.setData(e),null==(t=(n=this.cache.config).onSuccess)||t.call(n,e,this),null==(r=(o=this.cache.config).onSettled)||r.call(o,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):l(new Error(this.queryHash+" data is undefined"))},onError:l,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var n,r;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(n=e.meta)?n:null,fetchStatus:M(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(r=e.dataUpdatedAt)?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return F(o)&&o.revert&&this.revertState?{...this.revertState}:{...t,error:o,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),T.batch((()=>{this.observers.forEach((t=>{t.onQueryUpdate(e)})),this.cache.notify({query:this,type:"updated",action:e})}))}}class q extends S{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,n){var r;const o=t.queryKey,a=null!=(r=t.queryHash)?r:m(o,t);let i=this.get(a);return i||(i=new D({cache:this,logger:e.getLogger(),queryKey:o,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(i)),i}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((t=>t!==e)),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){T.batch((()=>{this.queries.forEach((e=>{this.remove(e)}))}))}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){const[n]=f(e,t);return"undefined"===typeof n.exact&&(n.exact=!0),this.queries.find((e=>h(n,e)))}findAll(e,t){const[n]=f(e,t);return Object.keys(n).length>0?this.queries.filter((e=>h(n,e))):this.queries}notify(e){T.batch((()=>{this.listeners.forEach((({listener:t})=>{t(e)}))}))}onFocus(){T.batch((()=>{this.queries.forEach((e=>{e.onFocus()}))}))}onOnline(){T.batch((()=>{this.queries.forEach((e=>{e.onOnline()}))}))}}class H extends L{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||O,this.observers=[],this.state=e.state||z(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter((t=>t!==e)),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){const e=()=>{var e;return this.retryer=U({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},t="loading"===this.state.status;try{var n,r,o,a,i,s,c,u;if(!t){var l,d,f,h;this.dispatch({type:"loading",variables:this.options.variables}),await(null==(l=(d=this.mutationCache.config).onMutate)?void 0:l.call(d,this.state.variables,this));const e=await(null==(f=(h=this.options).onMutate)?void 0:f.call(h,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}const p=await e();return await(null==(n=(r=this.mutationCache.config).onSuccess)?void 0:n.call(r,p,this.state.variables,this.state.context,this)),await(null==(o=(a=this.options).onSuccess)?void 0:o.call(a,p,this.state.variables,this.state.context)),await(null==(i=(s=this.mutationCache.config).onSettled)?void 0:i.call(s,p,null,this.state.variables,this.state.context,this)),await(null==(c=(u=this.options).onSettled)?void 0:c.call(u,p,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:p}),p}catch(A){try{var p,m,b,g,y,v,w,E;throw await(null==(p=(m=this.mutationCache.config).onError)?void 0:p.call(m,A,this.state.variables,this.state.context,this)),await(null==(b=(g=this.options).onError)?void 0:b.call(g,A,this.state.variables,this.state.context)),await(null==(y=(v=this.mutationCache.config).onSettled)?void 0:y.call(v,void 0,A,this.state.variables,this.state.context,this)),await(null==(w=(E=this.options).onSettled)?void 0:w.call(E,void 0,A,this.state.variables,this.state.context)),A}finally{this.dispatch({type:"error",error:A})}}}dispatch(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!M(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...t,...e.state}}})(this.state),T.batch((()=>{this.observers.forEach((t=>{t.onMutationUpdate(e)})),this.mutationCache.notify({mutation:this,type:"updated",action:e})}))}}function z(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class G extends S{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,n){const r=new H({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(r),r}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter((t=>t!==e)),this.notify({type:"removed",mutation:e})}clear(){T.batch((()=>{this.mutations.forEach((e=>{this.remove(e)}))}))}getAll(){return this.mutations}find(e){return"undefined"===typeof e.exact&&(e.exact=!0),this.mutations.find((t=>p(e,t)))}findAll(e){return this.mutations.filter((t=>p(e,t)))}notify(e){T.batch((()=>{this.listeners.forEach((({listener:t})=>{t(e)}))}))}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then((()=>{const e=this.mutations.filter((e=>e.state.isPaused));return T.batch((()=>e.reduce(((e,t)=>e.then((()=>t.continue().catch(s)))),Promise.resolve())))})).then((()=>{this.resuming=void 0})),this.resuming}}function $(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,a,i;const s=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,c=null==(r=e.fetchOptions)||null==(o=r.meta)?void 0:o.fetchMore,u=null==c?void 0:c.pageParam,l="forward"===(null==c?void 0:c.direction),d="backward"===(null==c?void 0:c.direction),f=(null==(a=e.state.data)?void 0:a.pages)||[],h=(null==(i=e.state.data)?void 0:i.pageParams)||[];let p=h,m=!1;const b=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),g=(e,t,n,r)=>(p=r?[t,...p]:[...p,t],r?[n,...e]:[...e,n]),y=(t,n,r,o)=>{if(m)return Promise.reject("Cancelled");if("undefined"===typeof r&&!n&&t.length)return Promise.resolve(t);const a={queryKey:e.queryKey,pageParam:r,meta:e.options.meta};var i;i=a,Object.defineProperty(i,"signal",{enumerable:!0,get:()=>{var t,n;return null!=(t=e.signal)&&t.aborted?m=!0:null==(n=e.signal)||n.addEventListener("abort",(()=>{m=!0})),e.signal}});const s=b(a);return Promise.resolve(s).then((e=>g(t,r,e,o)))};let v;if(f.length)if(l){const t="undefined"!==typeof u,n=t?u:W(e.options,f);v=y(f,t,n)}else if(d){const t="undefined"!==typeof u,n=t?u:K(e.options,f);v=y(f,t,n,!0)}else{p=[];const t="undefined"===typeof e.options.getNextPageParam;v=!s||!f[0]||s(f[0],0,f)?y([],t,h[0]):Promise.resolve(g([],h[0],f[0]));for(let n=1;n{if(!s||!f[n]||s(f[n],n,f)){const o=t?h[n]:W(e.options,r);return y(r,t,o)}return Promise.resolve(g(r,h[n],f[n]))}))}else v=y([]);return v.then((e=>({pages:e,pageParams:p})))}}}}function W(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function K(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}class Q{constructor(e={}){this.queryCache=e.queryCache||new q,this.mutationCache=e.mutationCache||new G,this.logger=e.logger||O,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=B.subscribe((()=>{B.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())})),this.unsubscribeOnline=_.subscribe((()=>{_.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())})))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=f(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const r=l(e,t,n),o=this.getQueryData(r.queryKey);return o?Promise.resolve(o):this.fetchQuery(r)}getQueriesData(e){return this.getQueryCache().findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.queryCache.find(e),o=function(e,t){return"function"===typeof e?e(t):e}(t,null==r?void 0:r.state.data);if("undefined"===typeof o)return;const a=l(e),i=this.defaultQueryOptions(a);return this.queryCache.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return T.batch((()=>this.getQueryCache().findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){const[n]=f(e,t),r=this.queryCache;T.batch((()=>{r.findAll(n).forEach((e=>{r.remove(e)}))}))}resetQueries(e,t,n){const[r,o]=f(e,t,n),a=this.queryCache,i={type:"active",...r};return T.batch((()=>(a.findAll(r).forEach((e=>{e.reset()})),this.refetchQueries(i,o))))}cancelQueries(e,t,n){const[r,o={}]=f(e,t,n);"undefined"===typeof o.revert&&(o.revert=!0);const a=T.batch((()=>this.queryCache.findAll(r).map((e=>e.cancel(o)))));return Promise.all(a).then(s).catch(s)}invalidateQueries(e,t,n){const[r,o]=f(e,t,n);return T.batch((()=>{var e,t;if(this.queryCache.findAll(r).forEach((e=>{e.invalidate()})),"none"===r.refetchType)return Promise.resolve();const n={...r,type:null!=(e=null!=(t=r.refetchType)?t:r.type)?e:"active"};return this.refetchQueries(n,o)}))}refetchQueries(e,t,n){const[r,o]=f(e,t,n),a=T.batch((()=>this.queryCache.findAll(r).filter((e=>!e.isDisabled())).map((e=>{var t;return e.fetch(void 0,{...o,cancelRefetch:null==(t=null==o?void 0:o.cancelRefetch)||t,meta:{refetchPage:r.refetchPage}})}))));let i=Promise.all(a).then(s);return null!=o&&o.throwOnError||(i=i.catch(s)),i}fetchQuery(e,t,n){const r=l(e,t,n),o=this.defaultQueryOptions(r);"undefined"===typeof o.retry&&(o.retry=!1);const a=this.queryCache.build(this,o);return a.isStaleByTime(o.staleTime)?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(s).catch(s)}fetchInfiniteQuery(e,t,n){const r=l(e,t,n);return r.behavior=$(),this.fetchQuery(r)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(s).catch(s)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find((t=>b(e)===b(t.queryKey)));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find((t=>g(e,t.queryKey)));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find((t=>b(e)===b(t.mutationKey)));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find((t=>g(e,t.mutationKey)));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=m(t.queryKey,t)),"undefined"===typeof t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),"undefined"===typeof t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}function V(e){return e.state.isPaused}function J(e){return"success"===e.state.status}function Y(e,t={}){const n=[],r=[];if(!1!==t.dehydrateMutations){const r=t.shouldDehydrateMutation||V;e.getMutationCache().getAll().forEach((e=>{r(e)&&n.push(function(e){return{mutationKey:e.options.mutationKey,state:e.state}}(e))}))}if(!1!==t.dehydrateQueries){const n=t.shouldDehydrateQuery||J;e.getQueryCache().getAll().forEach((e=>{n(e)&&r.push(function(e){return{state:e.state,queryKey:e.queryKey,queryHash:e.queryHash}}(e))}))}return{mutations:n,queries:r}}const Z=["added","removed","updated"];function X(e){return Z.includes(e)}async function ee({queryClient:e,persister:t,buster:n="",dehydrateOptions:r}){const o={buster:n,timestamp:Date.now(),clientState:Y(e,r)};await t.persistClient(o)}function te(e){let t,n=!1;const r=async function({queryClient:e,persister:t,maxAge:n=864e5,buster:r="",hydrateOptions:o}){try{const a=await t.restoreClient();if(a)if(a.timestamp){const i=Date.now()-a.timestamp>n,s=a.buster!==r;i||s?t.removeClient():function(e,t,n){if("object"!==typeof t||null===t)return;const r=e.getMutationCache(),o=e.getQueryCache(),a=t.mutations||[],i=t.queries||[];a.forEach((t=>{var o;r.build(e,{...null==n||null==(o=n.defaultOptions)?void 0:o.mutations,mutationKey:t.mutationKey},t.state)})),i.forEach((t=>{var r;const a=o.get(t.queryHash),i={...t.state,fetchStatus:"idle"};a?a.state.dataUpdatedAt{n||(t=function(e){const t=e.queryClient.getQueryCache().subscribe((t=>{X(t.type)&&ee(e)})),n=e.queryClient.getMutationCache().subscribe((t=>{X(t.type)&&ee(e)}));return()=>{t(),n()}}(e))}));return[()=>{n=!0,null==t||t()},r]}var ne=n(94077),re=n(67294);const oe=re.createContext(void 0),ae=re.createContext(!1);function ie(e,t){return e||(t&&"undefined"!==typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=oe),window.ReactQueryClientContext):oe)}const se=({context:e}={})=>{const t=re.useContext(ie(e,re.useContext(ae)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ce=({client:e,children:t,context:n,contextSharing:r=!1})=>{re.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]);const o=ie(n,r);return re.createElement(ae.Provider,{value:!n&&r},re.createElement(o.Provider,{value:e},t))},ue=re.createContext(!1);ue.Provider;function le(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const de=re.createContext(le());var fe=n(61688);const he=fe.useSyncExternalStore;class pe extends S{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=this.client.defaultMutationOptions(e),w(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.currentMutation)||e.removeObserver(this))}onMutationUpdate(e){this.updateResult();const t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:"undefined"!==typeof e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0},t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){T.batch((()=>{var t,n,r,o;if(this.mutateOptions&&this.hasListeners())if(e.onSuccess)null==(t=(n=this.mutateOptions).onSuccess)||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(r=(o=this.mutateOptions).onSettled)||r.call(o,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context);else if(e.onError){var a,i,s,c;null==(a=(i=this.mutateOptions).onError)||a.call(i,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(s=(c=this.mutateOptions).onSettled)||s.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}e.listeners&&this.listeners.forEach((({listener:e})=>{e(this.currentResult)}))}))}}function me(){}class be extends S{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),ge(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ye(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ye(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),w(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),"undefined"!==typeof this.options.enabled&&"boolean"!==typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const o=this.hasListeners();o&&ve(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();const a=this.computeRefetchInterval();!o||this.currentQuery===r&&this.options.enabled===n.enabled&&a===this.currentRefetchInterval||this.updateRefetchInterval(a)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e);return this.createResult(t,e)}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach((n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})})),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,t);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,t)))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then((()=>(this.updateResult(),this.currentResult)))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(s)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),i||this.currentResult.isStale||!c(this.options.staleTime))return;const e=u(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((()=>{this.currentResult.isStale||this.updateResult()}),e)}computeRefetchInterval(){var e;return"function"===typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!i&&!1!==this.options.enabled&&c(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((()=>{(this.options.refetchIntervalInBackground||B.isFocused())&&this.executeFetch()}),this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const n=this.currentQuery,r=this.options,o=this.currentResult,a=this.currentResultState,i=this.currentResultOptions,s=e!==n,c=s?e.state:this.currentQueryInitialState,u=s?this.currentResult:this.previousQueryResult,{state:l}=e;let d,{dataUpdatedAt:f,error:h,errorUpdatedAt:p,fetchStatus:m,status:b}=l,g=!1,y=!1;if(t._optimisticResults){const o=this.hasListeners(),a=!o&&ge(e,t),i=o&&ve(e,n,t,r);(a||i)&&(m=M(e.options.networkMode)?"fetching":"paused",f||(b="loading")),"isRestoring"===t._optimisticResults&&(m="idle")}if(t.keepPreviousData&&!l.dataUpdatedAt&&null!=u&&u.isSuccess&&"error"!==b)d=u.data,f=u.dataUpdatedAt,b=u.status,g=!0;else if(t.select&&"undefined"!==typeof l.data)if(o&&l.data===(null==a?void 0:a.data)&&t.select===this.selectFn)d=this.selectResult;else try{this.selectFn=t.select,d=t.select(l.data),d=I(null==o?void 0:o.data,d,t),this.selectResult=d,this.selectError=null}catch(A){0,this.selectError=A}else d=l.data;if("undefined"!==typeof t.placeholderData&&"undefined"===typeof d&&"loading"===b){let e;if(null!=o&&o.isPlaceholderData&&t.placeholderData===(null==i?void 0:i.placeholderData))e=o.data;else if(e="function"===typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&"undefined"!==typeof e)try{e=t.select(e),this.selectError=null}catch(A){0,this.selectError=A}"undefined"!==typeof e&&(b="success",d=I(null==o?void 0:o.data,e,t),y=!0)}this.selectError&&(h=this.selectError,d=this.selectResult,p=Date.now(),b="error");const v="fetching"===m,w="loading"===b,E="error"===b;return{status:b,fetchStatus:m,isLoading:w,isSuccess:"success"===b,isError:E,isInitialLoading:w&&v,data:d,dataUpdatedAt:f,error:h,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>c.dataUpdateCount||l.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!w,isLoadingError:E&&0===l.dataUpdatedAt,isPaused:"paused"===m,isPlaceholderData:y,isPreviousData:g,isRefetchError:E&&0!==l.dataUpdatedAt,isStale:we(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,w(n,t))return;this.currentResult=n;const r={cache:!0};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options;if("all"===e||!e&&!this.trackedProps.size)return!0;const n=new Set(null!=e?e:this.trackedProps);return this.options.useErrorBoundary&&n.add("error"),Object.keys(this.currentResult).some((e=>{const r=e;return this.currentResult[r]!==t[r]&&n.has(r)}))})()&&(r.listeners=!0),this.notify({...r,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};"success"===e.type?t.onSuccess=!e.manual:"error"!==e.type||F(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){T.batch((()=>{var t,n,r,o;if(e.onSuccess)null==(t=(n=this.options).onSuccess)||t.call(n,this.currentResult.data),null==(r=(o=this.options).onSettled)||r.call(o,this.currentResult.data,null);else if(e.onError){var a,i,s,c;null==(a=(i=this.options).onError)||a.call(i,this.currentResult.error),null==(s=(c=this.options).onSettled)||s.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach((({listener:e})=>{e(this.currentResult)})),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})}))}}function ge(e,t){return function(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&ye(e,t,t.refetchOnMount)}function ye(e,t,n){if(!1!==t.enabled){const r="function"===typeof n?n(e):n;return"always"===r||!1!==r&&we(e,t)}return!1}function ve(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&we(e,n)}function we(e,t){return e.isStaleByTime(t.staleTime)}var Ee=n(52798);function Ae({queryClient:e=new Q({defaultOptions:{queries:{cacheTime:864e5,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),storage:t=(0,ne.o6)({storage:"undefined"!==typeof window&&window.localStorage?window.localStorage:ne.wp}),persister:n=("undefined"!==typeof window?r({key:"cache",storage:t,serialize:e=>e,deserialize:e=>e}):void 0),...o}){const a=(0,ne._g)({...o,storage:t});return n&&te({queryClient:e,persister:n,dehydrateOptions:{shouldDehydrateQuery:e=>0!==e.cacheTime&&!1!==e.queryKey[0].persist}}),Object.assign(a,{queryClient:e})}var xe=re.createContext(void 0),Pe=re.createContext(void 0);function Ce({children:e,config:t}){return re.createElement(xe.Provider,{children:re.createElement(ce,{children:e,client:t.queryClient,context:Pe}),value:t})}function je(){const e=re.useContext(xe);if(!e)throw new Error(["`useConfig` must be used within `WagmiConfig`.\n","Read more: https://wagmi.sh/react/WagmiConfig"].join("\n"));return e}var Ie=fe.useSyncExternalStore;function Oe(e){return"[object Object]"===Object.prototype.toString.call(e)}function Te(e,t,n){return r=e,Array.isArray(r)?"function"===typeof t?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e;var r}function Se(e){return JSON.stringify(e,((e,t)=>function(e){if(!Oe(e))return!1;const t=e.constructor;if("undefined"===typeof t)return!0;const n=t.prototype;return!!Oe(n)&&!!n.hasOwnProperty("isPrototypeOf")}(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):"bigint"===typeof t?t.toString():t))}function Be(e,t){const n={};return Object.keys(e).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(t.trackedProps.add(r),e[r])})})),n}function ke(e,t){const n=se({context:e.context}),r=re.useContext(ue),o=re.useContext(de),a=n.defaultQueryOptions({...e,queryKeyHashFn:Se});a._optimisticResults=r?"isRestoring":"optimistic",a.onError&&(a.onError=T.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=T.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=T.batchCalls(a.onSettled)),a.suspense&&"number"!==typeof a.staleTime&&(a.staleTime=1e3),(a.suspense||a.useErrorBoundary)&&(o.isReset()||(a.retryOnMount=!1));const[i]=re.useState((()=>new t(n,a))),s=i.getOptimisticResult(a);if(Ie(re.useCallback((e=>r?()=>{}:i.subscribe(T.batchCalls(e))),[i,r]),(()=>i.getCurrentResult()),(()=>i.getCurrentResult())),re.useEffect((()=>{o.clearReset()}),[o]),re.useEffect((()=>{i.setOptions(a,{listeners:!1})}),[a,i]),a.suspense&&s.isLoading&&s.isFetching&&!r)throw i.fetchOptimistic(a).then((({data:e})=>{a.onSuccess?.(e),a.onSettled?.(e,null)})).catch((e=>{o.clearReset(),a.onError?.(e),a.onSettled?.(void 0,e)}));if(s.isError&&!o.isReset()&&!s.isFetching&&(c=a.useErrorBoundary,u=[s.error,i.getCurrentQuery()],"function"===typeof c?c(...u):c))throw s.error;var c,u;const l="loading"===s.status&&"idle"===s.fetchStatus?"idle":s.status,d="idle"===l,f="loading"===l&&"fetching"===s.fetchStatus;return{...s,defaultedOptions:a,isIdle:d,isLoading:f,observer:i,status:l}}function _e(e,t,n){const r=d(e,t,n);return function(e,t,n){const r=d(e,t,n),o=se({context:r.context}),[a]=re.useState((()=>new pe(o,r)));re.useEffect((()=>{a.setOptions(r)}),[a,r]);const i=he(re.useCallback((e=>a.subscribe(T.batchCalls(e))),[a]),(()=>a.getCurrentResult()),(()=>a.getCurrentResult())),s=re.useCallback(((e,t)=>{a.mutate(e,t).catch(me)}),[a]);if(i.error&&(c=a.options.useErrorBoundary,u=[i.error],"function"===typeof c?c(...u):c))throw i.error;var c,u;return{...i,mutate:s,mutateAsync:i.mutate}}({context:Pe,...r})}function Ne(e,t,n){const r=Te(e,t,n),o=ke({context:Pe,...r},be),a={data:o.data,error:o.error,fetchStatus:o.fetchStatus,isError:o.isError,isFetched:o.isFetched,isFetchedAfterMount:o.isFetchedAfterMount,isFetching:o.isFetching,isIdle:o.isIdle,isLoading:o.isLoading,isRefetching:o.isRefetching,isSuccess:o.isSuccess,refetch:o.refetch,status:o.status,internal:{dataUpdatedAt:o.dataUpdatedAt,errorUpdatedAt:o.errorUpdatedAt,failureCount:o.failureCount,isFetchedAfterMount:o.isFetchedAfterMount,isLoadingError:o.isLoadingError,isPaused:o.isPaused,isPlaceholderData:o.isPlaceholderData,isPreviousData:o.isPreviousData,isRefetchError:o.isRefetchError,isStale:o.isStale,remove:o.remove}};return o.defaultedOptions.notifyOnChangeProps?a:Be(a,o.observer)}var Me=()=>se({context:Pe});function Re({chainId:e}={}){return(0,Ee.useSyncExternalStoreWithSelector)((t=>(0,ne.pC)({chainId:e},t)),(()=>(0,ne.uV)({chainId:e})),(()=>(0,ne.uV)({chainId:e})),(e=>e),((e,t)=>e.uid===t.uid))}function Fe({chainId:e}){return[{entity:"walletClient",chainId:e,persist:!1}]}function Ue({queryKey:[{chainId:e}]}){return(0,ne.xz)({chainId:e})}function Le({chainId:e,suspense:t,onError:n,onSettled:r,onSuccess:o}={}){const{connector:a}=Je(),i=qe({chainId:e}),s=Ne(Fe({chainId:i}),Ue,{cacheTime:0,enabled:Boolean(a),staleTime:1/0,suspense:t,onError:n,onSettled:r,onSuccess:o}),c=Me();return re.useEffect((()=>(0,ne.Tb)({chainId:i},(e=>{e?c.invalidateQueries(Fe({chainId:i})):c.removeQueries(Fe({chainId:i}))}))),[c,i]),s}function De({chainId:e}={}){return(0,Ee.useSyncExternalStoreWithSelector)((t=>(0,ne.fq)({chainId:e},t)),(()=>(0,ne.jr)({chainId:e})),(()=>(0,ne.jr)({chainId:e})),(e=>e),((e,t)=>e?.uid===t?.uid))}function qe({chainId:e}={}){return Re({chainId:e}).chain.id}function He({chainId:e,scopeKey:t}){return[{entity:"blockNumber",chainId:e,scopeKey:t}]}function ze({queryKey:[{chainId:e}]}){return(0,ne.RQ)({chainId:e})}function Ge({cacheTime:e=0,chainId:t,enabled:n=!0,scopeKey:r,staleTime:o,suspense:a,watch:i=!1,onBlock:s,onError:c,onSettled:u,onSuccess:l}={}){const d=qe({chainId:t}),f=Re({chainId:d}),h=De({chainId:d}),p=Me();return re.useEffect((()=>{if(!n)return;if(!i&&!s)return;return(h??f).watchBlockNumber({onBlockNumber:e=>{i&&p.setQueryData(He({chainId:d,scopeKey:r}),e),s&&s(e)},emitOnBegin:!0})}),[d,r,s,f,p,i,h,n]),Ne(He({scopeKey:r,chainId:d}),ze,{cacheTime:e,enabled:n,staleTime:o,suspense:a,onError:c,onSettled:u,onSuccess:l})}function $e({queryKey:[{chainId:e,formatUnits:t}]}){return(0,ne.jS)({chainId:e,formatUnits:t})}function We({cacheTime:e,chainId:t,enabled:n=!0,formatUnits:r="gwei",scopeKey:o,staleTime:a,suspense:i,watch:s,onError:c,onSettled:u,onSuccess:l}={}){const d=qe({chainId:t}),f=re.useMemo((()=>function({chainId:e,formatUnits:t,scopeKey:n}){return[{entity:"feeData",chainId:e,formatUnits:t,scopeKey:n}]}({chainId:d,formatUnits:r,scopeKey:o})),[d,r,o]),h=Ne(f,$e,{cacheTime:e,enabled:n,staleTime:a,suspense:i,onError:c,onSettled:u,onSuccess:l});return Ke({chainId:d,enabled:Boolean(n&&s),queryKey:f}),h}function Ke({chainId:e,enabled:t,queryKey:n}){const r=Me(),o=re.useCallback((()=>r.invalidateQueries({queryKey:n},{cancelRefetch:!1})),[r,n]);Ge({chainId:e,enabled:t,onBlock:t?o:void 0,scopeKey:t?void 0:"idle"})}var Qe=e=>"object"===typeof e&&!Array.isArray(e);function Ve(e,t,n=t,r=ne.vZ){const o=re.useRef([]),a=(0,Ee.useSyncExternalStoreWithSelector)(e,t,n,(e=>e),((e,t)=>{if(Qe(e)&&Qe(t)&&o.current.length){for(const n of o.current){if(!r(e[n],t[n]))return!1}return!0}return r(e,t)}));if(Qe(a)){const e={...a};return Object.defineProperties(e,Object.entries(e).reduce(((e,[t,n])=>({...e,[t]:{configurable:!1,enumerable:!0,get:()=>(o.current.includes(t)||o.current.push(t),n)}})),{})),e}return a}function Je({onConnect:e,onDisconnect:t}={}){const n=je(),r=Ve(re.useCallback((e=>(0,ne.uH)(e)),[n]),ne.D0),o=re.useRef(),a=o.current;return re.useEffect((()=>{"connected"!==a?.status&&"connected"===r.status&&e?.({address:r.address,connector:r.connector,isReconnected:"reconnecting"===a?.status||void 0===a?.status}),"connected"===a?.status&&"disconnected"===r.status&&t?.(),o.current=r}),[e,t,a,r]),r}function Ye({queryKey:[{address:e,chainId:t,formatUnits:n,token:r}]}){if(!e)throw new Error("address is required");return(0,ne.EG)({address:e,chainId:t,formatUnits:n,token:r})}function Ze({address:e,cacheTime:t,chainId:n,enabled:r=!0,formatUnits:o,scopeKey:a,staleTime:i,suspense:s,token:c,watch:u,onError:l,onSettled:d,onSuccess:f}={}){const h=qe({chainId:n}),p=re.useMemo((()=>function({address:e,chainId:t,formatUnits:n,scopeKey:r,token:o}){return[{entity:"balance",address:e,chainId:t,formatUnits:n,scopeKey:r,token:o}]}({address:e,chainId:h,formatUnits:o,scopeKey:a,token:c})),[e,h,o,a,c]),m=Ne(p,Ye,{cacheTime:t,enabled:Boolean(r&&e),staleTime:i,suspense:s,onError:l,onSettled:d,onSuccess:f});return Ke({chainId:h,enabled:Boolean(r&&u&&e),queryKey:p}),m}var Xe=e=>{const{connector:t,chainId:n}=e;if(!t)throw new Error("connector is required");return(0,ne.$j)({connector:t,chainId:n})};function et({chainId:e,connector:t,onError:n,onMutate:r,onSettled:o,onSuccess:a}={}){const i=je(),{data:s,error:c,isError:u,isIdle:l,isLoading:d,isSuccess:f,mutate:h,mutateAsync:p,reset:m,status:b,variables:g}=_e((y={connector:t,chainId:e},[{entity:"connect",...y}]),Xe,{onError:n,onMutate:r,onSettled:o,onSuccess:a});var y;const v=re.useCallback((n=>h({chainId:n?.chainId??e,connector:n?.connector??t})),[e,t,h]),w=re.useCallback((n=>p({chainId:n?.chainId??e,connector:n?.connector??t})),[e,t,p]);return{connect:v,connectAsync:w,connectors:i.connectors,data:s,error:c,isError:u,isIdle:l,isLoading:d,isSuccess:f,pendingConnector:g?.connector,reset:m,status:b,variables:g}}var tt=[{entity:"disconnect"}],nt=()=>(0,ne.zP)();function rt({onError:e,onMutate:t,onSettled:n,onSuccess:r}={}){const{error:o,isError:a,isIdle:i,isLoading:s,isSuccess:c,mutate:u,mutateAsync:l,reset:d,status:f}=_e(tt,nt,{...e?{onError(t,n,r){e(t,r)}}:{},onMutate:t,...n?{onSettled(e,t,r,o){n(t,o)}}:{},...r?{onSuccess(e,t,n){r(n)}}:{}});return{disconnect:u,disconnectAsync:l,error:o,isError:a,isIdle:i,isLoading:s,isSuccess:c,reset:d,status:f}}function ot(){const e=je();return Ve((0,re.useCallback)((e=>(0,ne.QC)(e)),[e]),ne.Hy)}var at=e=>{const{message:t}=e;if(!t)throw new Error("message is required");return(0,ne.l)({message:t})};function it({message:e,onError:t,onMutate:n,onSettled:r,onSuccess:o}={}){const{data:a,error:i,isError:s,isIdle:c,isLoading:u,isSuccess:l,mutate:d,mutateAsync:f,reset:h,status:p,variables:m}=_e((b={message:e},[{entity:"signMessage",...b}]),at,{onError:t,onMutate:n,onSettled:r,onSuccess:o});var b;const g=re.useCallback((t=>d(t||{message:e})),[e,d]),y=re.useCallback((t=>f(t||{message:e})),[e,f]);return{data:a,error:i,isError:s,isIdle:c,isLoading:u,isSuccess:l,reset:h,signMessage:g,signMessageAsync:y,status:p,variables:m}}var st=e=>{const{chainId:t}=e;if(!t)throw new Error("chainId is required");return(0,ne.If)({chainId:t})};function ct({chainId:e,throwForSwitchChainNotSupported:t,onError:n,onMutate:r,onSettled:o,onSuccess:a}={}){const i=je(),s=function(){const[,e]=re.useReducer((e=>e+1),0);return e}(),{data:c,error:u,isError:l,isIdle:d,isLoading:f,isSuccess:h,mutate:p,mutateAsync:m,reset:b,status:g,variables:y}=_e((v={chainId:e},[{entity:"switchNetwork",...v}]),st,{onError:n,onMutate:r,onSettled:o,onSuccess:a});var v;const w=re.useCallback((t=>p({chainId:t??e})),[e,p]),E=re.useCallback((t=>m({chainId:t??e})),[e,m]);let A,x;re.useEffect((()=>i.subscribe((({chains:e,connector:t})=>({chains:e,connector:t})),s)),[i,s]);const P=!!i.connector?.switchChain;return(t||P)&&(A=w,x=E),{chains:i.chains??[],data:c,error:u,isError:l,isIdle:d,isLoading:f,isSuccess:h,pendingChainId:y?.chainId,reset:b,status:g,switchNetwork:A,switchNetworkAsync:x,variables:y}}function ut({abi:e,address:t,account:n,args:r,blockNumber:o,blockTag:a,cacheOnBlock:i=!1,cacheTime:s,chainId:c,enabled:u=!0,functionName:l,isDataEqual:d,keepPreviousData:f,onError:h,onSettled:p,onSuccess:m,scopeKey:b,select:g,staleTime:y,structuralSharing:w=((e,t)=>(0,ne.vZ)(e,t)?e:v(e,t)),suspense:E,watch:A}={}){const x=qe({chainId:c}),{data:P}=Ge({chainId:x,enabled:A||i,scopeKey:A||i?void 0:"idle",watch:A}),C=o??P,j=re.useMemo((()=>function({account:e,address:t,args:n,blockNumber:r,blockTag:o,chainId:a,functionName:i,scopeKey:s}){return[{entity:"readContract",account:e,address:t,args:n,blockNumber:r,blockTag:o,chainId:a,functionName:i,scopeKey:s}]}({account:n,address:t,args:r,blockNumber:i?C:void 0,blockTag:a,chainId:x,functionName:l,scopeKey:b})),[n,t,r,C,a,i,x,l,b]),I=re.useMemo((()=>{let n=Boolean(u&&e&&t&&l);return i&&(n=Boolean(n&&C)),n}),[e,t,C,i,u,l]);return Ke({chainId:x,enabled:Boolean(I&&A&&!i),queryKey:j}),Ne(j,function({abi:e}){return async({queryKey:[{account:t,address:n,args:r,blockNumber:o,blockTag:a,chainId:i,functionName:s}]})=>{if(!e)throw new Error("abi is required");if(!n)throw new Error("address is required");return await(0,ne.a4)({account:t,address:n,args:r,blockNumber:o,blockTag:a,chainId:i,abi:e,functionName:s})??null}}({abi:e}),{cacheTime:s,enabled:I,isDataEqual:d,keepPreviousData:f,select:g,staleTime:y,structuralSharing:w,suspense:E,onError:h,onSettled:p,onSuccess:m})}function lt(e){if("prepared"===e.mode){if(!e.request)throw new Error("request is required");return(0,ne.n9)({mode:"prepared",request:e.request})}if(!e.address)throw new Error("address is required");if(!e.abi)throw new Error("abi is required");if(!e.functionName)throw new Error("functionName is required");return(0,ne.n9)({address:e.address,args:e.args,chainId:e.chainId,abi:e.abi,functionName:e.functionName,accessList:e.accessList,account:e.account,gas:e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce,value:e.value})}function dt(e){const{address:t,abi:n,args:r,chainId:o,functionName:a,mode:i,request:s}=e,{accessList:c,account:u,gas:l,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:h,nonce:p,value:m}=(0,ne.gY)(e),{data:b,error:g,isError:y,isIdle:v,isLoading:w,isSuccess:E,mutate:A,mutateAsync:x,reset:P,status:C,variables:j}=_e(function({address:e,abi:t,functionName:n,...r}){const{args:o,accessList:a,account:i,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,request:f,value:h}=r;return[{entity:"writeContract",address:e,args:o,abi:t,accessList:a,account:i,functionName:n,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,request:f,value:h}]}({address:t,abi:n,functionName:a,chainId:o,mode:i,args:r,accessList:c,account:u,gas:l,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:h,nonce:p,request:s,value:m}),lt,{onError:e.onError,onMutate:e.onMutate,onSettled:e.onSettled,onSuccess:e.onSuccess});return{data:b,error:g,isError:y,isIdle:v,isLoading:w,isSuccess:E,reset:P,status:C,variables:j,write:re.useMemo((()=>{if("prepared"===e.mode){if(!s)return;return()=>A({mode:"prepared",request:e.request,chainId:e.chainId})}return e=>A({address:t,args:r,abi:n,functionName:a,chainId:o,accessList:c,account:u,gas:l,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:h,nonce:p,value:m,...e})}),[c,u,n,t,r,o,e.chainId,e.mode,e.request,a,l,d,f,h,A,p,s,m]),writeAsync:re.useMemo((()=>{if("prepared"===e.mode){if(!s)return;return()=>x({mode:"prepared",request:e.request})}return e=>x({address:t,args:r,abi:n,chainId:o,functionName:a,accessList:c,account:u,gas:l,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:h,nonce:p,value:m,...e})}),[c,u,n,t,r,o,e.mode,e.request,a,l,d,f,h,x,p,s,m])}}function ft({queryKey:[{name:e,chainId:t}]}){if(!e)throw new Error("name is required");return(0,ne.w6)({name:e,chainId:t})}function ht({cacheTime:e,chainId:t,enabled:n=!0,name:r,scopeKey:o,staleTime:a=864e5,suspense:i,onError:s,onSettled:c,onSuccess:u}={}){const l=qe({chainId:t});return Ne(function({name:e,chainId:t,scopeKey:n}){return[{entity:"ensAvatar",name:e,chainId:t,scopeKey:n}]}({name:r,chainId:l,scopeKey:o}),ft,{cacheTime:e,enabled:Boolean(n&&r&&l),staleTime:a,suspense:i,onError:s,onSettled:c,onSuccess:u})}function pt({queryKey:[{address:e,chainId:t}]}){if(!e)throw new Error("address is required");return(0,ne.Lk)({address:e,chainId:t})}function mt({address:e,cacheTime:t,chainId:n,enabled:r=!0,scopeKey:o,staleTime:a=864e5,suspense:i,onError:s,onSettled:c,onSuccess:u}={}){const l=qe({chainId:n});return Ne(function({address:e,chainId:t,scopeKey:n}){return[{entity:"ensName",address:e,chainId:t,scopeKey:n}]}({address:e,chainId:l,scopeKey:o}),pt,{cacheTime:t,enabled:Boolean(r&&e&&l),staleTime:a,suspense:i,onError:s,onSettled:c,onSuccess:u})}function bt({accessList:e,account:t,chainId:n,cacheTime:r,data:o,enabled:a=!0,gas:i,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:l,scopeKey:d,staleTime:f,suspense:h,to:p,value:m,onError:b,onSettled:g,onSuccess:y}={}){const{chain:v}=ot(),{data:w}=Le({chainId:n}),E=Ne(function({accessList:e,account:t,activeChainId:n,chainId:r,data:o,gas:a,gasPrice:i,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:d,scopeKey:f,walletClientAddress:h}){return[{entity:"prepareSendTransaction",activeChainId:n,accessList:e,account:t,chainId:r,data:o,gas:a,gasPrice:i,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:d,scopeKey:f,walletClientAddress:h}]}({accessList:e,activeChainId:v?.id,account:t,chainId:n,data:o,gas:i,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:l,scopeKey:d,to:p,value:m,walletClientAddress:w?.account.address}),function({walletClient:e}){return({queryKey:[{accessList:t,account:n,chainId:r,data:o,gas:a,gasPrice:i,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:d}]})=>{if(!l)throw new Error("to is required");return(0,ne.uw)({accessList:t,account:n,chainId:r,data:o,gas:a,gasPrice:i,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:d,walletClient:e})}}({walletClient:w}),{cacheTime:r,enabled:Boolean(a&&w&&p),staleTime:f,suspense:h,onError:b,onSettled:g,onSuccess:y});return Object.assign(E,{config:{mode:"prepared",...E.isSuccess?E.data:void 0}})}var gt=({accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,to:l,value:d})=>{if(!l)throw new Error("to is required.");return(0,ne.T7)({accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,to:l,value:d})};function yt({accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,to:l,value:d,onError:f,onMutate:h,onSettled:p,onSuccess:m}={}){const{data:b,error:g,isError:y,isIdle:v,isLoading:w,isSuccess:E,mutate:A,mutateAsync:x,reset:P,status:C,variables:j}=_e((I={accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,to:l,value:d},[{entity:"sendTransaction",...I}]),gt,{onError:f,onMutate:h,onSettled:p,onSuccess:m});var I;const O=re.useCallback((f=>A({chainId:n,mode:c,...f||{accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,value:d,to:l}})),[e,t,n,r,o,a,i,s,c,A,u,l,d]),T=re.useCallback((f=>x({chainId:n,mode:c,...f||{accessList:e,account:t,chainId:n,data:r,gas:o,gasPrice:a,maxFeePerGas:i,maxPriorityFeePerGas:s,mode:c,nonce:u,value:d,to:l}})),[e,t,n,r,o,a,i,s,c,x,u,l,d]);return{data:b,error:g,isError:y,isIdle:v,isLoading:w,isSuccess:E,reset:P,sendTransaction:"prepared"!==c||l?O:void 0,sendTransactionAsync:"prepared"!==c||l?T:void 0,status:C,variables:j}}function vt({chainId:e,confirmations:t,hash:n,timeout:r,cacheTime:o,enabled:a=!0,scopeKey:i,staleTime:s,suspense:c,onError:u,onReplaced:l,onSettled:d,onSuccess:f}={}){return Ne(function({confirmations:e,chainId:t,hash:n,scopeKey:r,timeout:o}){return[{entity:"waitForTransaction",confirmations:e,chainId:t,hash:n,scopeKey:r,timeout:o}]}({chainId:qe({chainId:e}),confirmations:t,hash:n,scopeKey:i,timeout:r}),function({onReplaced:e}){return({queryKey:[{chainId:t,confirmations:n,hash:r,timeout:o}]})=>{if(!r)throw new Error("hash is required");return(0,ne.Mn)({chainId:t,confirmations:n,hash:r,onReplaced:e,timeout:o})}}({onReplaced:l}),{cacheTime:o,enabled:Boolean(a&&n),staleTime:s,suspense:c,onError:u,onSettled:d,onSuccess:f})}},64122:function(e){"use strict";e.exports=JSON.parse('{"name":"@safe-global/safe-apps-sdk","version":"8.1.0","description":"SDK developed to integrate third-party apps with Safe app.","main":"dist/src/index.js","typings":"dist/src/index.d.ts","_files":["dist/**/*","src/**/*","CHANGELOG.md","README.md"],"sideEffects":false,"keywords":["Safe","sdk","apps"],"scripts":{"test":"jest","format-dist":"sed -i \'\' \'s/\\"files\\":/\\"_files\\":/\' dist/package.json","build":"yarn rimraf dist && tsc && yarn format-dist"},"author":"Safe (https://safe.global)","license":"MIT","dependencies":{"@safe-global/safe-gateway-typescript-sdk":"^3.5.3","viem":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/safe-global/safe-apps-sdk.git"},"bugs":{"url":"https://github.com/safe-global/safe-apps-sdk/issues"},"homepage":"https://github.com/safe-global/safe-apps-sdk#readme","publishConfig":{"access":"public"}}')}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],(function(){return t(6840),t(61587)}));var n=e.O();_N_E=n}]); \ No newline at end of file diff --git a/out/_next/static/chunks/pages/account-e36a6a73785e98e0.js b/out/_next/static/chunks/pages/account-ae3559ecb1f387d6.js similarity index 57% rename from out/_next/static/chunks/pages/account-e36a6a73785e98e0.js rename to out/_next/static/chunks/pages/account-ae3559ecb1f387d6.js index 224fe081..3d84eac6 100644 --- a/out/_next/static/chunks/pages/account-e36a6a73785e98e0.js +++ b/out/_next/static/chunks/pages/account-ae3559ecb1f387d6.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7966],{67307:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ie}});var a,s,i,o,r,c=n(50029),l=n(59499),d=n(16835),h=n(87794),u=n.n(h),p=n(67294),x=n(9008),f=n.n(x),m=n(56974),g=n(35133),y=n(64146),v=n(2593),j=n(27586),N=n(16441),S=n(84243),w=n(84917),b=n(38197),E=n(31886),D=n(85518),T=n(56371),Z=n(22794),k=n(92675),C=n(20321),W=n(46822),O=n(92673),P=n(41894),R=n(64637),I=n(27921),L=n(58595),_=n(40342),K=n(22661),z=n(85893),B=function(e){var t=e.onSearch,n=(0,p.useState)(""),a=n[0],s=n[1];return(0,z.jsx)("form",{className:"flex-column-sans-justify",onSubmit:function(e){e.preventDefault(),t(a)},children:(0,z.jsxs)("div",{className:"flex-row-sans-justify",children:[(0,z.jsx)("input",{type:"text",placeholder:"search .eth name".toLowerCase(),value:a.toLowerCase(),name:".eth search",id:"eth-search",onChange:function(e){s(e.target.value.toLowerCase())},onInvalid:function(e){e.target.setCustomValidity("Please enter a valid .eth name")},onInput:function(e){e.target.setCustomValidity("")},required:!0,pattern:".*\\.eth$",title:"\u2757 Input must end with '.eth'"}),(0,z.jsx)("button",{className:"button",style:{height:"38px",width:"50px",marginLeft:"15px"},type:"submit","data-tooltip":"Search",disabled:!a.length,children:(0,z.jsx)("span",{className:"material-icons",style:{fontSize:"22px",fontWeight:"700"},children:"search"})})]})})},M=n(88006),q=n(71383),A=n(73935),H=n(14141),F=H.ZP.div(a||(a=(0,q.Z)(["\n padding-top: 10px;\n padding-left: 50px;\n padding-right: 50px;\n padding-bottom: 25px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n"]))),U=H.ZP.div(s||(s=(0,q.Z)(["\n margin-top: -10px;\n font-size: 17px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n margin-bottom: 0px;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n"]))),Y=H.ZP.div(i||(i=(0,q.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),G=H.ZP.div(o||(o=(0,q.Z)(["\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 450px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 5px;\n"]))),V=H.ZP.div(r||(r=(0,q.Z)(["\n position: absolute;\n top: -60px;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"]))),X=function(e){var t=e.show,n=e.onClose,a=(e.children,e.handleModalData),s=e.handleTrigger,i=p.useState(!1),o=(0,d.Z)(i,2),r=o[0],c=o[1],l=p.useState(!1),h=(0,d.Z)(l,2),u=h[0],x=h[1],f=p.useState(""),m=(0,d.Z)(f,2),g=m[0],y=m[1];p.useEffect((function(){c(!0)}),[]);var v=t?(0,z.jsxs)(V,{children:[(0,z.jsxs)(G,{children:[(0,z.jsx)(Y,{children:(0,z.jsx)("a",{href:"#",onClick:function(e){a(void 0),s(!1),e.preventDefault(),n()},children:(0,z.jsx)("span",{className:"material-icons",children:"close"})})}),t&&(0,z.jsxs)(U,{children:[(0,z.jsx)("div",{className:"material-icons",style:{marginTop:"4px",fontSize:"66px"},children:"accessible_forward"}),(0,z.jsx)("div",{style:{marginTop:"15px"},children:"Choose Storage to Export Key For"})]}),(0,z.jsxs)(F,{children:[(0,z.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,z.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){a("0"),s(!0),n()},"data-tooltip":"Export Ownerhash Key",children:(0,z.jsxs)("div",{className:"flex-row",children:["Ownerhash","\xa0",(0,z.jsx)("span",{className:"material-icons chonk",children:"recycling"})]})}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){x(!0),y('Exports Key for Ownerhash')},"data-tooltip":"Export Ownerhash Key",children:(0,z.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"21px"},children:"info_outline"})})]}),(0,z.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,z.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){a("1"),s(!0),n()},"data-tooltip":"Export Recordhash Key",children:(0,z.jsxs)("div",{className:"flex-row",children:["Recordhash","\xa0",(0,z.jsx)("span",{className:"material-icons chonk",children:"create"})]})}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){x(!0),y('Exports Key for Recordhash')},"data-tooltip":"Export Recordhash Key",children:(0,z.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"16px"},children:"info_outline"})})]}),(0,z.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,z.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){a("2"),s(!0),n()},"data-tooltip":"Export Gateway Key",children:(0,z.jsxs)("div",{className:"flex-row",children:["HTTP Gateway","\xa0",(0,z.jsx)("span",{className:"material-icons chonk",children:"dns"})]})}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){x(!0),y('Exports Key for HTTP Gateway')},"data-tooltip":"Export Gateway Key",children:(0,z.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"16px"},children:"info_outline"})})]})]})]}),(0,z.jsx)("div",{id:"modal-inner",children:(0,z.jsx)(Z.Z,{color:"cyan",icon:"info",onClose:function(){return x(!1)},show:u,position:"",children:g})})]}):null;return r?A.createPortal(v,document.getElementById("modal")):null},J=n(62012),Q=n(71775),$=n(36490),ee=n(19745),te=n(24978),ne=n(67191);function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function se(e){for(var t=1;txn&&Tt>0&&fn(Tt)}),[Tt]),p.useEffect((function(){Ss&&Es&&String(Es)!==J.DR&&(String(Es)===J.O["1"===is?7:3]?Ss&&String(Ss)!==J.DR&&ct(String(Ss)):ct(String(Es))),"OWNER"!==Fe&&setTimeout((function(){Re(!1),Tn(!1)}),2e3)}),[Ve,at,js,Fe,Ss,ws,Es]),p.useEffect((function(){fs&&"ownerhash_IPNS"===ba?Ht(fs):fs&&"ownerhash_Signer"===ba?Gt(fs):fs&&"export_IPNS"===ba?Ht(fs):fs&&"export_Signer"===ba&&Gt(fs)}),[fs,ba]),p.useEffect((function(){if(rt&&rt===a&&ht.length>0){Tn(!0);var e=[];[].push(ht.split(".eth")[0]);var t=function(){var t=(0,c.Z)(u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:J.Ap.getResolver(ht).then((function(t){e.push({key:1,name:ht.split(".eth")[0],migrated:(null===t||void 0===t?void 0:t.address)===os?"1/2":"0"}),e.length>0&&(qn&&"0x"!==String(qn)&&String(qn)!==String(Un)&&"1/2"===e[0].migrated?e[0].migrated="1":Un&&"0x"!==String(Un)&&"1/2"===e[0].migrated&&(e[0].migrated="3/4"),vn(Sn),h(e),qe(!0),setTimeout((function(){Re(!1)}),1e3))}));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}else rt&&rt!==a&&ht.length>0?(Re(!1),qe(!1),Ke(!0),xe("You do not have Manager permission"),de(!0)):rt&&rt===J.DR&&ht.length>0&&!Ds&&(Re(!1),qe(!1),Ke(!0),xe("Name not Registered or Expired"),de(!0))}),[rt,a,ht,qn,Un,Sn,Ds,Ts]),p.useEffect((function(){Ga.trigger&&Ga.modalData&&(ka(!1),"0"===Ga.modalData?(ga("eth:".concat(a)),la(!0)):"1"===Ga.modalData&&Pa(!0))}),[Ga]),p.useEffect((function(){ns.trigger&&void 0!==ns.modalData&&(Na(ns.modalData),Ea("ownerhash_HTTP"),Jn(["0x","0x"]),ta(["0x","0x"]))}),[ns]),p.useEffect((function(){Qa.trigger&&Qa.modalData&&(pa(!1),"0"===Qa.modalData?(ga("eth:".concat(a)),la(!0)):["1","2"].includes(Qa.modalData)?(ga(""),la(!0)):ga("0"))}),[Qa]),p.useEffect((function(){if(Zs&&"0x"!==String(Zs)){var e="";(e=String(Zs).startsWith(J.Kv)?"ipns://".concat(ne.K5(String(Zs)).decoded):w.ZN(String(Zs))).startsWith("https://"),An("".concat(e))}}),[Zs]),p.useEffect((function(){if(ks&&"0x"!==String(ks)){var e="";(e=String(ks).startsWith(J.Kv)?"ipns://".concat(ne.K5(String(ks)).decoded):w.ZN(String(ks))).startsWith("https://"),Yn("".concat(e))}}),[ks]),p.useEffect((function(){if(ht){var e=j.VM(ht),t=v.O$.from(e),n=b.keccak256(w.Y0(ht.split(".eth")[0]));et(e),st(String(t)),Xe(String(v.O$.from(n)))}}),[ht]);var Us=(0,g.BX)({hash:null===Ws||void 0===Ws?void 0:Ws.hash}),Ys=Us.isSuccess,Gs=Us.isError,Vs=Us.isLoading,Xs=(0,g.BX)({hash:null===_s||void 0===_s?void 0:_s.hash}),Js=Xs.isSuccess,Qs=Xs.isError,$s=Xs.isLoading;return p.useEffect((function(){if(Ys&&Rs){var e=function(){var e=(0,c.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ds(void 0,{},"","");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}ps(Ys,Rs,Sn,ja)}),[Ys,Rs,Sn,ja]),p.useEffect((function(){ps(Js,Bs,Sn,ja)}),[Js,Bs,Sn,ja]),p.useEffect((function(){Vs&&!Gs&&(Re(!0),zn("Waiting for Confirmation")),!Vs&&Gs&&(Jt?Jt&&Qt(!1):(zn("Transaction Failed"),In(!0),Ot(0)),Re(!1))}),[Vs,Gs]),p.useEffect((function(){$s&&!Qs&&(Re(!0),zn("Waiting for Confirmation")),!$s&&Qs&&(Jt?Jt&&Qt(!1):(zn("Transaction Failed"),In(!0),Ot(0)),Re(!1))}),[$s,Qs]),p.useEffect((function(){Ps&&!Is?(Re(!0),Wn(!1),zn("Waiting for Transaction"),Jt&&Qt(!1)):!Ps&&Is&&(Jt?Jt&&Qt(!1):(us(),zn("Transaction Declined By User"),qe(!1)),Fa({modalData:void 0,trigger:!1}))}),[Ps,Is]),p.useEffect((function(){zs&&!Ms?(Re(!0),Wn(!1),zn("Waiting for Transaction"),Jt&&Qt(!1)):!zs&&Ms&&(Jt?Jt&&Qt(!1):(us(),zn("Transaction Declined By User"),qe(!1)),Fa({modalData:void 0,trigger:!1}))}),[zs,Ms]),p.useEffect((function(){"UTILS"===Fe&&(gs&&!ms?(Re(!0),zn("Waiting for Signature"),Jt&&Qt(!1)):ms&&!gs&&(Jt?Jt&&Qt(!1):(zn("Signature Failed"),us()),Fa({modalData:void 0,trigger:!1}),$a({modalData:void 0,trigger:!1})))}),[gs,ms,Fe]),(0,z.jsxs)("div",{className:"page flex-column-sans-align",style:{maxWidth:"100%"},children:[!D.tq&&(0,z.jsx)("div",{style:{margin:"20px",width:"40%",display:"flex",justifyContent:"flex-start"},children:(0,z.jsx)("img",{className:"avatar",alt:"corner-account",src:"logo.png"})}),(0,z.jsxs)(f(),{children:[(0,z.jsx)("title",{children:"NameSys - Off-chain Records Manager"}),(0,z.jsx)("meta",{name:"viewport",content:"initial-scale=1.0, width=device-width, user-scalable=no"}),(0,z.jsx)("link",{rel:"shortcut icon",href:"logo.png"}),(0,z.jsx)("link",{rel:"preload",as:"style",href:"https://fonts.googleapis.com/icon?family=Material+Icons"}),(0,z.jsx)("link",{rel:"preload",href:"SF-Mono.woff2",as:"font",type:"font/woff2",crossOrigin:"anonymous"}),(0,z.jsx)("link",{rel:"preload",href:"Spotnik.woff2",as:"font",type:"font/woff2",crossOrigin:"anonymous"})]}),(0,z.jsx)("div",{style:{fontFamily:"Rajdhani"}}),(0,z.jsx)("div",{style:{fontFamily:"SF Mono"}}),(0,z.jsx)("div",{style:{fontFamily:"Spotnik"}}),(0,z.jsx)("div",{id:"overlay",className:"overlay",children:(0,z.jsxs)("div",{className:"overlay-content overlay-content-alt",children:[(0,z.jsx)(K.Z,{height:75,width:75}),(0,z.jsx)("div",{style:{marginTop:"20px"},children:(0,z.jsx)("span",{children:"PLEASE WAIT"})})]})}),(0,z.jsx)("div",{children:(0,z.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"space-between",width:"100%"},children:[(0,z.jsxs)("div",{style:{display:"flex",flexDirection:D.tq?"column":"row",marginLeft:D.tq?"25px":"9%",marginRight:"auto",marginTop:D.tq?"25px":"-7%"},children:[(0,z.jsx)("div",{style:{marginRight:D.tq?"20px":"40px"},children:(0,z.jsx)("button",{className:"button",onClick:function(){window.location.href="/ccip2-eth-client/",ta([]),Jn([]),ia("")},"data-tooltip":"Homepage",children:(0,z.jsxs)("div",{className:"flex-sans-direction",children:[(D.tq,"Home"),(0,z.jsx)("span",{className:"material-icons-round",style:{marginLeft:"3px"},children:"home"})]})})}),(0,z.jsx)("div",{style:{marginLeft:D.tq?"-9px":"-30px"},children:(0,z.jsx)(_.Z,{variable:ft})})]}),(0,z.jsxs)("div",{className:"connect-button",style:{marginLeft:"auto",display:"flex",flexDirection:"row",marginTop:D.tq?"25px":"-7%"},children:[(0,z.jsx)("button",{className:"button clear",onClick:function(){window.scrollTo(0,0),H(!0),ta([]),Jn([]),ia("")},style:{marginRight:10,display:"none"},"data-tooltip":"Learn more",children:(0,z.jsxs)("div",{className:"flex-row",children:["about",(0,z.jsx)("span",{className:"material-icons-round",style:{marginLeft:"3px"},children:"info"})]})}),(0,z.jsx)("button",{className:"button clear",onClick:function(){window.scrollTo(0,0),oe(!0),ta([]),Jn([]),ia("")},style:{marginRight:10,display:"none"},"data-tooltip":"Terms of Use",children:(0,z.jsxs)("div",{className:"flex-row",children:["terms",(0,z.jsx)("span",{children:"\xa0"}),(0,z.jsx)("span",{className:"material-icons-round",children:"gavel"})]})}),!D.tq&&(0,z.jsx)("div",{children:(0,z.jsx)(m.NL,{label:"connect"})}),D.tq&&(0,z.jsx)("div",{children:(0,z.jsx)(m.NL,{label:"connect"})})]})]})}),(0,z.jsx)("div",{className:"container",style:{maxWidth:"inherit",margin:"50px 0 0 0"},children:(0,z.jsxs)("div",{className:D.tq||tn?"none":"heading-alt",style:{flex:"1 1 auto",marginTop:i?"30px":"0"},children:[(0,z.jsx)("div",{style:{marginTop:"-120px"},children:(0,z.jsxs)("div",{className:"flex-column",style:{paddingTop:"100px"},children:[!D.tq&&i&&(0,z.jsxs)("div",{children:[(0,z.jsx)("img",{className:"icon-ccip2",alt:"sample-icon",src:"logo.png",hidden:!0}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:"70px",color:"#fc6603",marginBottom:"20px",fontWeight:"700"},children:"NameSys"}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:26,color:"#eb8634",marginTop:D.tq?"-30px":"10px",fontWeight:"700"},children:"Off-chain Records Manager"})]}),!D.tq&&(s||!i)&&(0,z.jsxs)("div",{style:{marginTop:"-30px",marginBottom:"10px"},children:[(0,z.jsx)("img",{className:"icon-ccip2",alt:"sample-icon",src:"logo.png",hidden:!0}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:"52px",color:"#fc6603",marginBottom:"20px",marginTop:"30px",fontWeight:"700"},children:"NameSys"})]}),D.tq&&i&&(0,z.jsxs)("div",{className:"flex-column",children:[(0,z.jsx)("img",{className:"icon-ccip2",alt:"sample-icon",src:"logo.png",style:{marginBottom:"7px"}}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:"52px",color:"#fc6603",marginBottom:"20px",fontWeight:"700"},children:"NameSys"}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:26,color:"#eb8634",marginTop:"-10px",fontWeight:"700"},children:"Off-chain Records"}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:26,color:"#eb8634",marginTop:"0px",fontWeight:"700"},children:"Manager"})]}),D.tq&&(s||!i)&&(0,z.jsxs)("div",{className:"flex-column",style:{marginTop:"-30px",marginBottom:"50px"},children:[(0,z.jsx)("img",{className:"icon-ccip2",alt:"sample-icon",src:"logo.png",style:{marginBottom:"7px"}}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:"40px",color:"#fc6603",marginTop:"10px",fontWeight:"700"},children:"NameSys"})]})]})}),i&&(0,z.jsx)("div",{style:{marginBottom:"0px"},children:(0,z.jsx)("div",{className:"content-slider",children:(0,z.jsx)("div",{className:"slider",children:(0,z.jsx)("div",{className:"mask",children:(0,z.jsx)("ul",{children:J.hh.map((function(e,t){return(0,z.jsx)("li",{className:"anim".concat(t+1),children:(0,z.jsx)("div",{className:"carousal-item",children:(0,z.jsx)("div",{dangerouslySetInnerHTML:{__html:e}})})},t)}))})})})})}),(s||!i)&&(0,z.jsxs)("div",{className:"flex-sans-direction",style:{marginBottom:"50px",marginTop:D.tq?"-35px":"2px"},children:[(0,z.jsx)("button",{onClick:function(){Ue("OWNER"),yn.length>0?h(yn):console.error("BUG"),Xe(""),st(""),ut(""),qe(!1),ct(""),yn.length>0?Re(!1):Re(!_e),de(!1),ta([]),Jn([]),ia(""),Ot(0),yn&&qe(!0)},className:"button-header",disabled:"OWNER"===Fe||Pe,"data-tooltip":"Show names that you can manage",children:(0,z.jsxs)("div",{className:"flex-sans-direction",children:["NAMES",(0,z.jsx)("span",{className:"material-icons-round",style:{marginLeft:"3px"},children:"manage_accounts"})]})}),(0,z.jsx)("button",{onClick:function(){"SEARCH"!==Fe&&vn(Sn),h([]),Ue("UTILS"),qe(!1),ct(""),Re(!0),ut(""),de(!1),ta([]),Jn([]),ia(""),zn("Please Wait"),Ot(0)},className:"button-header",disabled:"UTILS"===Fe||Pe,"data-tooltip":"NameSys Utility Functions",children:(0,z.jsxs)("div",{className:"flex-sans-direction",children:["UTILS",(0,z.jsx)("span",{className:"material-icons-round",style:{marginLeft:"3px"},children:"supervised_user_circle"})]})}),(0,z.jsx)("button",{onClick:function(){"UTILS"!==Fe&&vn(Sn),h([]),Ue("SEARCH"),qe(!1),ct(""),Re(!0),ut(""),Jn([]),ta([]),ia(""),de(!1),zn("Please Wait"),Ot(0)},className:"button-header",disabled:"SEARCH"===Fe||Pe,"data-tooltip":"Search for an ENS name",children:(0,z.jsxs)("div",{className:"flex-sans-direction",children:["SEARCH",(0,z.jsx)("span",{className:"material-icons-round",style:{marginLeft:"3px"},children:"search"})]})})]}),Pe&&(s||!i)&&(0,z.jsx)("div",{children:(0,z.jsxs)("div",{className:"flex-column",style:{marginTop:"50px",marginBottom:"200px"},children:[(0,z.jsx)("div",{className:"flex-column",style:{paddingBottom:"10px"},children:(0,z.jsx)(K.Z,{height:60,width:60})}),(0,z.jsxs)("div",{className:"flex-column",style:{marginTop:"10px"},children:[(0,z.jsx)("div",{style:{color:"#fc6603",fontWeight:"700"},children:"OWNER"!==Fe?"".concat(Kn):La.modalData?"Please wait":"".concat(Kn)}),(0,z.jsxs)("div",{style:{color:"white",fontWeight:"700",marginTop:"10px"},children:[(0,z.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"22px"},children:"UTILS"===Fe?Wt>0?"".concat(Wt):"":"OWNER"===Fe?La.modalData?"":"".concat(xn):""}),(0,z.jsx)("span",{style:{fontSize:"19px"},children:"UTILS"===Fe?Wt>0?" Of ":"":"OWNER"===Fe?La.modalData?"":" Of ":""}),(0,z.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"22px"},children:"UTILS"===Fe?Wt>0?"".concat(ba.startsWith("export")?"2"===Qa.modalData?"1":"2":"1"):"":"OWNER"===Fe?La.modalData?"":"".concat(It):""})]})]})]})}),Pe&&"OWNER"===Fe&&l.length>0&&(s||!i)&&!_e&&!Cn&&(0,z.jsx)("div",{children:(0,z.jsxs)("div",{className:"flex-column",style:{marginTop:"50px",marginBottom:"200px"},children:[(0,z.jsx)("div",{className:"flex-column",style:{paddingBottom:"10px"},children:(0,z.jsx)(K.Z,{height:60,width:60})}),(0,z.jsx)("div",{className:"flex-column",style:{marginTop:"10px"},children:(0,z.jsx)("div",{style:{color:"#fc6603",fontWeight:"700"},children:"Please Wait"})})]})}),!Pe&&"OWNER"===Fe&&l.length>0&&(s||!i)&&!_e&&(0,z.jsxs)("div",{children:[(0,z.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"18px",color:"cyan",marginBottom:"25px",fontWeight:"700",marginTop:D.tq?"-10px":"0"},children:[(0,z.jsx)("span",{style:{marginRight:"5px"},children:"Names You Manage"}),(0,z.jsx)("button",{className:"button-tiny emphasis-smol",onClick:function(){G(!0),jt("info"),bt("cyan"),Bt('This list does not contain Wrapped Names or Subdomains or Legacy Names that you Manage but do not Own. Please use the Search tab to find names in these categories')},"data-tooltip":"Enlighten me",children:(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:"orange"},children:"info_outline"})})]}),"OWNER"===Fe&&!Pe&&Me&&(0,z.jsx)("div",{className:"list-container",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"50px"},children:(0,z.jsx)(L.Z,{label:"edit",items:l,onItemClickStealth:Fs,onItemClickPreview:Hs})})]}),!Pe&&"SEARCH"===Fe&&l.length>0&&(s||!i)&&!_e&&(0,z.jsxs)("div",{children:[(0,z.jsx)("div",{className:"flex-sans-direction",style:{fontSize:"18px",color:"cyan",marginBottom:"25px",fontWeight:"700"},children:"search result"}),(0,z.jsx)("div",{className:"list-container",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"50px"},children:(0,z.jsx)(L.Z,{label:"edit",items:l,onItemClickStealth:Fs,onItemClickPreview:Hs})})]}),!Pe&&"UTILS"===Fe&&!Me&&l&&(s||!i)&&(0,z.jsxs)("div",{children:[(0,z.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"18px",color:"cyan",marginBottom:"25px",fontWeight:"700"},children:[(0,z.jsx)("span",{style:{marginRight:"5px"},children:"NameSys Utilities"}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){G(!0),jt("info"),bt("cyan"),Bt('NameSys Utility Functions to set Ownerhash and Export Keys')},"data-tooltip":"Enlighten me",children:(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:"cyan"},children:"info_outline"})})]}),(0,z.jsxs)("div",{className:"export-container flex-column",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"30px"},children:[(0,z.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"18px",color:"cyan",marginBottom:"25px",fontWeight:"700"},children:[(0,z.jsx)("span",{style:{marginRight:"5px"},children:"Ownerhash Setter"}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){G(!0),jt("info"),bt("cyan"),Bt('Sets Ownerhash For All Names in a Wallet')},"data-tooltip":"Set New Ownerhash",children:(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:"cyan"},children:"info_outline"})})]}),(0,z.jsx)("input",{style:{width:"90%",color:"rgb(50, 205, 50, 0.75)"},type:"text",placeholder:"Click on 'SET'",disabled:!0,value:"ipns://"===Un?"":Un,id:"owner-hash"}),(0,z.jsxs)("div",{className:"flex-row",children:[(0,z.jsx)("button",{className:"button",style:{height:"38px",width:"80px",marginTop:"18px",marginLeft:"15px"},type:"submit","data-tooltip":"Set New Ownerhash",onClick:function(){ka(!0),Ea("ownerhash"),Jn([]),ta([]),ia(""),Ht(""),Gt(""),qe(!1),zn("")},children:(0,z.jsxs)("div",{className:"flex-sans-direction",children:[(0,z.jsx)("span",{children:"SET"}),(0,z.jsx)("span",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700",marginLeft:"3px"},children:"settings"})]})}),(Ys||Gs)&&!Vs&&(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:Ys?"lime":"orangered",marginLeft:"10px",marginTop:"18px",fontSize:"20px"},children:Ys?"task_alt":"cancel"}),(Js||Qs)&&!$s&&(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:Js?"lime":"orangered",marginLeft:"10px",marginTop:"18px",fontSize:"20px"},children:Js?"task_alt":"cancel"})]})]}),(0,z.jsxs)("div",{className:"hash-container flex-column",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"70px"},children:[(0,z.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"18px",color:"cyan",marginBottom:"25px",fontWeight:"700"},children:[(0,z.jsx)("span",{style:{marginRight:"5px"},children:"Private Key Exporter"}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){G(!0),jt("info"),bt("cyan"),Bt('Export your IPNS and/or Records Signer Keys')},"data-tooltip":"Export Keys",children:(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:"cyan"},children:"info_outline"})})]}),(0,z.jsxs)("div",{style:{width:"90%",alignItems:"flex-start"},children:[(0,z.jsx)("span",{style:{color:"skyblue",fontSize:"12px",fontWeight:"700"},children:"IPNS PRIVATE KEY"}),(0,z.jsxs)("div",{className:"flex-sans-direction",style:{marginTop:"2px",width:"100%"},children:[(0,z.jsx)("input",{style:{width:"100%",paddingRight:"32px",fontWeight:"400",textAlign:"left",color:"IPNS PRIVATE KEY COPIED!"===Xn[0]?"lime":"rgb(255, 255, 150, 0.75)"},type:"text",placeholder:"IPNS Private Key",value:ba.startsWith("export")?ba.endsWith("HTTP")?"":"0x"!==Xn[0]?Xn[0]:"":"",id:"export-ipns",disabled:!0}),(0,z.jsx)("button",{className:"button-empty",onClick:function(){J.vQ("export-ipns"),bt("lime"),Jn(["IPNS PRIVATE KEY COPIED!","COPIED!"])},"data-tooltip":"Copy IPNS Key",style:{marginLeft:"-25px",color:!wt||Xn[0]||Xn[1]?"cyan":wt},hidden:!Xn[0]||"0x"===Xn[0],children:(0,z.jsx)("span",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700"},children:"content_copy"})})]})]}),(0,z.jsxs)("div",{style:{width:"90%",alignItems:"flex-start",marginTop:"10px"},children:[(0,z.jsx)("span",{style:{color:"skyblue",fontSize:"12px",fontWeight:"700"},children:"CCIP MANAGER KEY"}),(0,z.jsxs)("div",{className:"flex-sans-direction",style:{marginTop:"2px",width:"100%"},children:[(0,z.jsx)("input",{style:{width:"100%",paddingRight:"32px",fontWeight:"400",textAlign:"left",color:"RECORDS SIGNER KEY COPIED!"===ea[0]?"lime":"rgb(255, 255, 150, 0.75)"},type:"text",placeholder:"CCIP Manager Key",value:ba.startsWith("export")?ea[0]:"",id:"export-ccip",disabled:!0}),(0,z.jsx)("button",{className:"button-empty",onClick:function(){J.vQ("export-ccip"),bt("lime"),ta(["RECORDS SIGNER KEY COPIED!","COPIED!"])},"data-tooltip":"Copy Manager Key",style:{marginLeft:"-25px",color:!wt||ea[0]||ea[1]?"cyan":wt},hidden:!ea[0],children:(0,z.jsx)("span",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700"},children:"content_copy"})})]})]}),(0,z.jsxs)("div",{style:{width:"90%",alignItems:"flex-start",marginTop:"10px"},children:[(0,z.jsx)("span",{style:{color:"skyblue",fontSize:"12px",fontWeight:"700"},children:"IPNS ENCODED KEY"}),(0,z.jsxs)("div",{className:"flex-sans-direction",style:{marginTop:"2px",width:"100%"},children:[(0,z.jsx)("input",{style:{width:"100%",paddingRight:"32px",fontWeight:"400",textAlign:"left",color:"IPNS ENCODED KEY COPIED!"===sa?"lime":"rgb(255, 255, 150, 0.75)"},type:"text",placeholder:"IPNS Encoded Key",value:ba.startsWith("export")?sa:"",id:"export-encoded",disabled:!0}),(0,z.jsx)("button",{className:"button-empty",onClick:function(){J.vQ("export-encoded"),bt("lime"),ia("IPNS ENCODED KEY COPIED!")},"data-tooltip":"Copy Manager Key",style:{marginLeft:"-25px",color:wt&&!sa?wt:"cyan"},hidden:!sa,children:(0,z.jsx)("span",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700"},children:"content_copy"})})]})]}),(0,z.jsxs)("div",{className:"flex-row",children:[(0,z.jsx)("button",{className:"button",style:{height:"38px",width:"115px",marginLeft:"15px",marginTop:"20px"},type:"submit","data-tooltip":"Export Keys",onClick:function(){pa(!0),Ea("export"),Jn([]),ta([]),ia(""),Ht(""),Gt(""),zn("")},children:(0,z.jsxs)("div",{className:"flex-sans-direction",children:[(0,z.jsx)("span",{children:"EXPORT"}),(0,z.jsx)("span",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700",marginLeft:"5px"},children:"file_download"})]})}),(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:sa||Xn[0]||ea[0]?"lime":ms?"orangered":"",marginLeft:"10px",marginTop:"18px",fontSize:"20px"},children:sa||Xn[0]||ea[0]?"task_alt":ms?"cancel":""})]})]})]}),!Pe&&"SEARCH"===Fe&&l&&(s||!i)&&(0,z.jsxs)("div",{children:[(0,z.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"18px",color:"cyan",marginBottom:"25px",marginTop:l?"-15px":"0px"},children:[(0,z.jsx)("span",{style:{marginRight:"5px"},children:"search names"}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){G(!0),jt("info"),bt("cyan"),Bt('Search for a Subdomain or a Wrapped Domain or a Legacy name that you Manage but do not Own')},"data-tooltip":"Enlighten me",children:(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:"cyan"},children:"info_outline"})})]}),(0,z.jsx)("div",{className:"search-container",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"50px"},children:(0,z.jsx)(B,{onSearch:function(e){h([]),Re(!0),nn(!0),hn(e),ut(e),Ke(!1)}})})]}),!Pe&&_e&&"OWNER"===Fe&&!le&&(0,z.jsx)("div",{children:(0,z.jsxs)("div",{className:"flex-column",style:{fontSize:"22px",color:"#fc6603",marginBottom:"25px",fontWeight:"700"},children:[(0,z.jsx)("span",{className:"material-icons-round miui-smaller",children:"warning"}),(0,z.jsx)("br",{}),"No Names Found"]})}),!Dn&&!rt&&ht&&"OWNER"!==Fe&&!Pe&&!le&&(0,z.jsx)("div",{children:(0,z.jsxs)("div",{className:"flex-column",style:{fontSize:"22px",color:"#fc6603",marginBottom:"25px",fontWeight:"700"},children:[(0,z.jsx)("span",{className:"material-icons-round miui-smaller",children:"warning"}),(0,z.jsx)("br",{}),"No Names Found"]})}),(0,z.jsxs)("div",{className:"flex-sans-direction",style:{color:"#fc6603",top:"auto",left:D.tq?"32%":"14%",transform:D.tq?"translateX(-72%)":"translateX(-92%)",bottom:10},children:[(0,z.jsxs)("div",{className:"flex-row",style:{marginRight:"15px"},children:[(0,z.jsx)("span",{className:"material-icons-round",style:{marginRight:"3px"},children:"source"}),(0,z.jsx)("a",{href:"https://github.com/namesys-eth/ccip2-eth-client",className:"footer-text",target:"_blank",rel:"noreferrer",children:"GitHub"})]}),(0,z.jsxs)("div",{className:"flex-row",children:[(0,z.jsx)("span",{className:"material-icons-round",style:{marginRight:"3px"},children:"info_outline"}),(0,z.jsx)("a",{href:"https://github.com/namesys-eth/ccip2-eth-resources/blob/main/docs/GUIDE.md",className:"footer-text",target:"_blank",rel:"noreferrer",children:"Help"})]})]}),(0,z.jsxs)("div",{id:"modal",children:[ge&&(0,z.jsx)(C.Z,{onClose:function(){return ye(!1)},show:ge,_ENS_:Ee,chain:is,handleParentTrigger:function(e){_a((function(t){return se(se({},t),{},{trigger:e})}))},handleParentModalData:function(e){_a((function(t){return se(se({},t),{},{modalData:e})}))}}),Ne&&(0,z.jsx)(W.Z,{onClose:function(){return Se(!1)},show:Ne,_ENS_:ke,chain:is,handleParentTrigger:function(e){Ma((function(t){return se(se({},t),{},{trigger:e})}))},handleParentModalData:function(e){Ma((function(t){return se(se({},t),{},{modalData:e})}))}}),(0,z.jsx)(O.Z,{onClose:function(){return H(!1)},show:A}),(0,z.jsx)(k.Z,{onClose:function(){return oe(!1)},show:ie}),(0,z.jsx)(R.Z,{onClose:function(){In(!1),Qt(!0)},color:"red",show:Rn&&!Pe,title:"cancel",children:Kn}),(0,z.jsx)(R.Z,{onClose:function(){de(!1),Xe(""),st(""),ut(""),ct("")},color:"red",show:le&&!tn&&!Pe,title:"block",children:pe}),(0,z.jsx)(R.Z,{onClose:function(){de(!1),Xe(""),st(""),ut(""),ct("")},color:"red",show:le&&tn&&!Pe,title:"block",children:pe}),(0,z.jsx)(I.Z,{handleTrigger:function(e){as((function(t){return se(se({},t),{},{trigger:e})}))},handleModalData:function(e){as((function(t){return se(se({},t),{},{modalData:e})}))},onClose:function(){Pa(!1)},show:Oa}),(0,z.jsx)(P.Z,{handleTrigger:function(e){Fa((function(t){return se(se({},t),{},{trigger:e})}))},handleModalData:function(e){Fa((function(t){return se(se({},t),{},{modalData:e})}))},onClose:function(){la(!1)},show:ca,children:[ma,"ownerhash"]}),(0,z.jsx)(M.Z,{handleTrigger:function(e){Va((function(t){return se(se({},t),{},{trigger:e})}))},handleModalData:function(e){Va((function(t){return se(se({},t),{},{modalData:e})}))},onClose:function(){ka(!1)},show:Za&&!ca,children:"0"}),(0,z.jsx)(X,{handleTrigger:function(e){$a((function(t){return se(se({},t),{},{trigger:e})}))},handleModalData:function(e){$a((function(t){return se(se({},t),{},{modalData:e})}))},onClose:function(){pa(!1)},show:ua,children:""}),(0,z.jsx)(Z.Z,{color:wt,icon:vt,onClose:function(){return G(!1)},show:Y,position:"",children:zt})]})]})})]})}},682:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account",function(){return n(67307)}])}},function(e){e.O(0,[8543,8041,8764,8109,3482,1469,9774,2888,179],(function(){return t=682,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7966],{67307:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ie}});var a,s,i,o,r,c=n(50029),l=n(59499),d=n(16835),h=n(87794),u=n.n(h),p=n(67294),x=n(9008),f=n.n(x),m=n(56974),g=n(35133),y=n(64146),v=n(2593),j=n(27586),N=n(16441),S=n(84243),w=n(84917),b=n(38197),E=n(31886),D=n(85518),T=n(56371),Z=n(22794),k=n(92675),C=n(20321),W=n(46822),O=n(92673),P=n(41894),R=n(64637),I=n(27921),L=n(58595),_=n(40342),K=n(22661),z=n(85893),B=function(e){var t=e.onSearch,n=(0,p.useState)(""),a=n[0],s=n[1];return(0,z.jsx)("form",{className:"flex-column-sans-justify",onSubmit:function(e){e.preventDefault(),t(a)},children:(0,z.jsxs)("div",{className:"flex-row-sans-justify",children:[(0,z.jsx)("input",{type:"text",placeholder:"search .eth name".toLowerCase(),value:a.toLowerCase(),name:".eth search",id:"eth-search",onChange:function(e){s(e.target.value.toLowerCase())},onInvalid:function(e){e.target.setCustomValidity("Please enter a valid .eth name")},onInput:function(e){e.target.setCustomValidity("")},required:!0,pattern:".*\\.eth$",title:"\u2757 Input must end with '.eth'"}),(0,z.jsx)("button",{className:"button",style:{height:"38px",width:"50px",marginLeft:"15px"},type:"submit","data-tooltip":"Search",disabled:!a.length,children:(0,z.jsx)("span",{className:"material-icons",style:{fontSize:"22px",fontWeight:"700"},children:"search"})})]})})},M=n(88006),q=n(71383),A=n(73935),H=n(14141),F=H.ZP.div(a||(a=(0,q.Z)(["\n padding-top: 10px;\n padding-left: 50px;\n padding-right: 50px;\n padding-bottom: 25px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n overflow-y: auto;\n color: white;\n font-size: 14px;\n font-weight: 700;\n"]))),U=H.ZP.div(s||(s=(0,q.Z)(["\n margin-top: -10px;\n font-size: 17px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n font-weight: 700;\n margin-bottom: 0px;\n color: white;\n padding-left: 20px;\n padding-right: 20px;\n color: cyan;\n"]))),Y=H.ZP.div(i||(i=(0,q.Z)(["\n display: flex;\n justify-content: flex-end;\n"]))),G=H.ZP.div(o||(o=(0,q.Z)(["\n background: rgba(66,46,40,1);\n background-size: 400% 400%;\n width: 450px;\n border-radius: 6px;\n overflow-y: initial !important\n display: flex;\n text-align: center;\n justify-content: center;\n padding: 5px;\n"]))),V=H.ZP.div(r||(r=(0,q.Z)(["\n position: absolute;\n top: -60px;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 1);\n"]))),X=function(e){var t=e.show,n=e.onClose,a=(e.children,e.handleModalData),s=e.handleTrigger,i=p.useState(!1),o=(0,d.Z)(i,2),r=o[0],c=o[1],l=p.useState(!1),h=(0,d.Z)(l,2),u=h[0],x=h[1],f=p.useState(""),m=(0,d.Z)(f,2),g=m[0],y=m[1];p.useEffect((function(){c(!0)}),[]);var v=t?(0,z.jsxs)(V,{children:[(0,z.jsxs)(G,{children:[(0,z.jsx)(Y,{children:(0,z.jsx)("a",{href:"#",onClick:function(e){a(void 0),s(!1),e.preventDefault(),n()},children:(0,z.jsx)("span",{className:"material-icons",children:"close"})})}),t&&(0,z.jsxs)(U,{children:[(0,z.jsx)("div",{className:"material-icons",style:{marginTop:"4px",fontSize:"66px"},children:"accessible_forward"}),(0,z.jsx)("div",{style:{marginTop:"15px"},children:"Choose Storage to Export Key For"})]}),(0,z.jsxs)(F,{children:[(0,z.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,z.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){a("0"),s(!0),n()},"data-tooltip":"Export Ownerhash Key",children:(0,z.jsxs)("div",{className:"flex-row",children:["Ownerhash","\xa0",(0,z.jsx)("span",{className:"material-icons chonk",children:"recycling"})]})}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){x(!0),y('Exports Key for Ownerhash')},"data-tooltip":"Export Ownerhash Key",children:(0,z.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"21px"},children:"info_outline"})})]}),(0,z.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,z.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){a("1"),s(!0),n()},"data-tooltip":"Export Recordhash Key",children:(0,z.jsxs)("div",{className:"flex-row",children:["Recordhash","\xa0",(0,z.jsx)("span",{className:"material-icons chonk",children:"create"})]})}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){x(!0),y('Exports Key for Recordhash')},"data-tooltip":"Export Recordhash Key",children:(0,z.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"16px"},children:"info_outline"})})]}),(0,z.jsxs)("div",{className:"flex-row",style:{marginLeft:"25px"},children:[(0,z.jsx)("button",{className:"button-option",style:{height:"35px",width:"175px",marginTop:"15px",fontSize:"15px",fontWeight:"700"},onClick:function(){a("2"),s(!0),n()},"data-tooltip":"Export Gateway Key",children:(0,z.jsxs)("div",{className:"flex-row",children:["HTTP Gateway","\xa0",(0,z.jsx)("span",{className:"material-icons chonk",children:"dns"})]})}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){x(!0),y('Exports Key for HTTP Gateway')},"data-tooltip":"Export Gateway Key",children:(0,z.jsx)("div",{className:"material-icons smol",style:{color:"cyan",marginLeft:"5px",marginTop:"16px"},children:"info_outline"})})]})]})]}),(0,z.jsx)("div",{id:"modal-inner",children:(0,z.jsx)(Z.Z,{color:"cyan",icon:"info",onClose:function(){return x(!1)},show:u,position:"",children:g})})]}):null;return r?A.createPortal(v,document.getElementById("modal")):null},J=n(62012),Q=n(71775),$=n(36490),ee=n(19745),te=n(24978),ne=n(67191);function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function se(e){for(var t=1;txn&&Tt>0&&fn(Tt)}),[Tt]),p.useEffect((function(){Ss&&Es&&String(Es)!==J.DR&&(String(Es)===J.O["1"===is?7:3]?Ss&&String(Ss)!==J.DR&&ct(String(Ss)):ct(String(Es))),"OWNER"!==Fe&&setTimeout((function(){Re(!1),Tn(!1)}),2e3)}),[Ve,at,js,Fe,Ss,ws,Es]),p.useEffect((function(){fs&&"ownerhash_IPNS"===ba?Ht(fs):fs&&"ownerhash_Signer"===ba?Gt(fs):fs&&"export_IPNS"===ba?Ht(fs):fs&&"export_Signer"===ba&&Gt(fs)}),[fs,ba]),p.useEffect((function(){if(rt&&rt===a&&ht.length>0){Tn(!0);var e=[];[].push(ht.split(".eth")[0]);var t=function(){var t=(0,c.Z)(u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:J.Ap.getResolver(ht).then((function(t){e.push({key:1,name:ht.split(".eth")[0],migrated:(null===t||void 0===t?void 0:t.address)===os?"1/2":"0"}),e.length>0&&(qn&&"0x"!==String(qn)&&String(qn)!==String(Un)&&"1/2"===e[0].migrated?e[0].migrated="1":Un&&"0x"!==String(Un)&&"1/2"===e[0].migrated&&(e[0].migrated="3/4"),vn(Sn),h(e),qe(!0),setTimeout((function(){Re(!1)}),1e3))}));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}else rt&&rt!==a&&ht.length>0?(Re(!1),qe(!1),Ke(!0),xe("You do not have Manager permission"),de(!0)):rt&&rt===J.DR&&ht.length>0&&!Ds&&(Re(!1),qe(!1),Ke(!0),xe("Name not Registered or Expired"),de(!0))}),[rt,a,ht,qn,Un,Sn,Ds,Ts]),p.useEffect((function(){Ga.trigger&&Ga.modalData&&(ka(!1),"0"===Ga.modalData?(ga("eth:".concat(a)),la(!0)):"1"===Ga.modalData&&Pa(!0))}),[Ga]),p.useEffect((function(){ns.trigger&&void 0!==ns.modalData&&(Na(ns.modalData),Ea("ownerhash_HTTP"),Jn(["0x","0x"]),ta(["0x","0x"]))}),[ns]),p.useEffect((function(){Qa.trigger&&Qa.modalData&&(pa(!1),"0"===Qa.modalData?(ga("eth:".concat(a)),la(!0)):["1","2"].includes(Qa.modalData)?(ga(""),la(!0)):ga("0"))}),[Qa]),p.useEffect((function(){if(Zs&&"0x"!==String(Zs)){var e="";(e=String(Zs).startsWith(J.Kv)?"ipns://".concat(ne.K5(String(Zs)).decoded):w.ZN(String(Zs))).startsWith("https://"),An("".concat(e))}}),[Zs]),p.useEffect((function(){if(ks&&"0x"!==String(ks)){var e="";(e=String(ks).startsWith(J.Kv)?"ipns://".concat(ne.K5(String(ks)).decoded):w.ZN(String(ks))).startsWith("https://"),Yn("".concat(e))}}),[ks]),p.useEffect((function(){if(ht){var e=j.VM(ht),t=v.O$.from(e),n=b.keccak256(w.Y0(ht.split(".eth")[0]));et(e),st(String(t)),Xe(String(v.O$.from(n)))}}),[ht]);var Us=(0,g.BX)({hash:null===Ws||void 0===Ws?void 0:Ws.hash}),Ys=Us.isSuccess,Gs=Us.isError,Vs=Us.isLoading,Xs=(0,g.BX)({hash:null===_s||void 0===_s?void 0:_s.hash}),Js=Xs.isSuccess,Qs=Xs.isError,$s=Xs.isLoading;return p.useEffect((function(){if(Ys&&Rs){var e=function(){var e=(0,c.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ds(void 0,{},"","");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}ps(Ys,Rs,Sn,ja)}),[Ys,Rs,Sn,ja]),p.useEffect((function(){ps(Js,Bs,Sn,ja)}),[Js,Bs,Sn,ja]),p.useEffect((function(){Vs&&!Gs&&(Re(!0),zn("Waiting for Confirmation")),!Vs&&Gs&&(Jt?Jt&&Qt(!1):(zn("Transaction Failed"),In(!0),Ot(0)),Re(!1))}),[Vs,Gs]),p.useEffect((function(){$s&&!Qs&&(Re(!0),zn("Waiting for Confirmation")),!$s&&Qs&&(Jt?Jt&&Qt(!1):(zn("Transaction Failed"),In(!0),Ot(0)),Re(!1))}),[$s,Qs]),p.useEffect((function(){Ps&&!Is?(Re(!0),Wn(!1),zn("Waiting for Transaction"),Jt&&Qt(!1)):!Ps&&Is&&(Jt?Jt&&Qt(!1):(us(),zn("Transaction Declined By User"),qe(!1)),Fa({modalData:void 0,trigger:!1}))}),[Ps,Is]),p.useEffect((function(){zs&&!Ms?(Re(!0),Wn(!1),zn("Waiting for Transaction"),Jt&&Qt(!1)):!zs&&Ms&&(Jt?Jt&&Qt(!1):(us(),zn("Transaction Declined By User"),qe(!1)),Fa({modalData:void 0,trigger:!1}))}),[zs,Ms]),p.useEffect((function(){"UTILS"===Fe&&(gs&&!ms?(Re(!0),zn("Waiting for Signature"),Jt&&Qt(!1)):ms&&!gs&&(Jt?Jt&&Qt(!1):(zn("Signature Failed"),us()),Fa({modalData:void 0,trigger:!1}),$a({modalData:void 0,trigger:!1})))}),[gs,ms,Fe]),(0,z.jsxs)("div",{className:"page flex-column-sans-align",style:{maxWidth:"100%"},children:[!D.tq&&(0,z.jsx)("div",{style:{margin:"20px",width:"40%",display:"flex",justifyContent:"flex-start"},children:(0,z.jsx)("img",{className:"avatar",alt:"corner-account",src:"logo.png"})}),(0,z.jsxs)(f(),{children:[(0,z.jsx)("title",{children:"NameSys - Off-chain Records Manager"}),(0,z.jsx)("meta",{name:"viewport",content:"initial-scale=1.0, width=device-width, user-scalable=no"}),(0,z.jsx)("link",{rel:"shortcut icon",href:"logo.png"}),(0,z.jsx)("link",{rel:"preload",as:"style",href:"https://fonts.googleapis.com/icon?family=Material+Icons"}),(0,z.jsx)("link",{rel:"preload",href:"SF-Mono.woff2",as:"font",type:"font/woff2",crossOrigin:"anonymous"}),(0,z.jsx)("link",{rel:"preload",href:"Spotnik.woff2",as:"font",type:"font/woff2",crossOrigin:"anonymous"})]}),(0,z.jsx)("div",{style:{fontFamily:"Rajdhani"}}),(0,z.jsx)("div",{style:{fontFamily:"SF Mono"}}),(0,z.jsx)("div",{style:{fontFamily:"Spotnik"}}),(0,z.jsx)("div",{id:"overlay",className:"overlay",children:(0,z.jsxs)("div",{className:"overlay-content overlay-content-alt",children:[(0,z.jsx)(K.Z,{height:75,width:75}),(0,z.jsx)("div",{style:{marginTop:"20px"},children:(0,z.jsx)("span",{children:"PLEASE WAIT"})})]})}),(0,z.jsx)("div",{children:(0,z.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"space-between",width:"100%"},children:[(0,z.jsxs)("div",{style:{display:"flex",flexDirection:D.tq?"column":"row",marginLeft:D.tq?"25px":"9%",marginRight:"auto",marginTop:D.tq?"25px":"-7%"},children:[(0,z.jsx)("div",{style:{marginRight:D.tq?"20px":"40px"},children:(0,z.jsx)("button",{className:"button",onClick:function(){window.location.href="/",ta([]),Jn([]),ia("")},"data-tooltip":"Homepage",children:(0,z.jsxs)("div",{className:"flex-sans-direction",children:[(D.tq,"Home"),(0,z.jsx)("span",{className:"material-icons-round",style:{marginLeft:"3px"},children:"home"})]})})}),(0,z.jsx)("div",{style:{marginLeft:D.tq?"-9px":"-30px"},children:(0,z.jsx)(_.Z,{variable:ft})})]}),(0,z.jsxs)("div",{className:"connect-button",style:{marginLeft:"auto",display:"flex",flexDirection:"row",marginTop:D.tq?"25px":"-7%"},children:[(0,z.jsx)("button",{className:"button clear",onClick:function(){window.scrollTo(0,0),H(!0),ta([]),Jn([]),ia("")},style:{marginRight:10,display:"none"},"data-tooltip":"Learn more",children:(0,z.jsxs)("div",{className:"flex-row",children:["about",(0,z.jsx)("span",{className:"material-icons-round",style:{marginLeft:"3px"},children:"info"})]})}),(0,z.jsx)("button",{className:"button clear",onClick:function(){window.scrollTo(0,0),oe(!0),ta([]),Jn([]),ia("")},style:{marginRight:10,display:"none"},"data-tooltip":"Terms of Use",children:(0,z.jsxs)("div",{className:"flex-row",children:["terms",(0,z.jsx)("span",{children:"\xa0"}),(0,z.jsx)("span",{className:"material-icons-round",children:"gavel"})]})}),!D.tq&&(0,z.jsx)("div",{children:(0,z.jsx)(m.NL,{label:"connect"})}),D.tq&&(0,z.jsx)("div",{children:(0,z.jsx)(m.NL,{label:"connect"})})]})]})}),(0,z.jsx)("div",{className:"container",style:{maxWidth:"inherit",margin:"50px 0 0 0"},children:(0,z.jsxs)("div",{className:D.tq||tn?"none":"heading-alt",style:{flex:"1 1 auto",marginTop:i?"30px":"0"},children:[(0,z.jsx)("div",{style:{marginTop:"-120px"},children:(0,z.jsxs)("div",{className:"flex-column",style:{paddingTop:"100px"},children:[!D.tq&&i&&(0,z.jsxs)("div",{children:[(0,z.jsx)("img",{className:"icon-ccip2",alt:"sample-icon",src:"logo.png",hidden:!0}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:"70px",color:"#fc6603",marginBottom:"20px",fontWeight:"700"},children:"NameSys"}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:26,color:"#eb8634",marginTop:D.tq?"-30px":"10px",fontWeight:"700"},children:"Off-chain Records Manager"})]}),!D.tq&&(s||!i)&&(0,z.jsxs)("div",{style:{marginTop:"-30px",marginBottom:"10px"},children:[(0,z.jsx)("img",{className:"icon-ccip2",alt:"sample-icon",src:"logo.png",hidden:!0}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:"52px",color:"#fc6603",marginBottom:"20px",marginTop:"30px",fontWeight:"700"},children:"NameSys"})]}),D.tq&&i&&(0,z.jsxs)("div",{className:"flex-column",children:[(0,z.jsx)("img",{className:"icon-ccip2",alt:"sample-icon",src:"logo.png",style:{marginBottom:"7px"}}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:"52px",color:"#fc6603",marginBottom:"20px",fontWeight:"700"},children:"NameSys"}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:26,color:"#eb8634",marginTop:"-10px",fontWeight:"700"},children:"Off-chain Records"}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:26,color:"#eb8634",marginTop:"0px",fontWeight:"700"},children:"Manager"})]}),D.tq&&(s||!i)&&(0,z.jsxs)("div",{className:"flex-column",style:{marginTop:"-30px",marginBottom:"50px"},children:[(0,z.jsx)("img",{className:"icon-ccip2",alt:"sample-icon",src:"logo.png",style:{marginBottom:"7px"}}),(0,z.jsx)("div",{className:"flex-column",style:{fontSize:"40px",color:"#fc6603",marginTop:"10px",fontWeight:"700"},children:"NameSys"})]})]})}),i&&(0,z.jsx)("div",{style:{marginBottom:"0px"},children:(0,z.jsx)("div",{className:"content-slider",children:(0,z.jsx)("div",{className:"slider",children:(0,z.jsx)("div",{className:"mask",children:(0,z.jsx)("ul",{children:J.hh.map((function(e,t){return(0,z.jsx)("li",{className:"anim".concat(t+1),children:(0,z.jsx)("div",{className:"carousal-item",children:(0,z.jsx)("div",{dangerouslySetInnerHTML:{__html:e}})})},t)}))})})})})}),(s||!i)&&(0,z.jsxs)("div",{className:"flex-sans-direction",style:{marginBottom:"50px",marginTop:D.tq?"-35px":"2px"},children:[(0,z.jsx)("button",{onClick:function(){Ue("OWNER"),yn.length>0?h(yn):console.error("BUG"),Xe(""),st(""),ut(""),qe(!1),ct(""),yn.length>0?Re(!1):Re(!_e),de(!1),ta([]),Jn([]),ia(""),Ot(0),yn&&qe(!0)},className:"button-header",disabled:"OWNER"===Fe||Pe,"data-tooltip":"Show names that you can manage",children:(0,z.jsxs)("div",{className:"flex-sans-direction",children:["NAMES",(0,z.jsx)("span",{className:"material-icons-round",style:{marginLeft:"3px"},children:"manage_accounts"})]})}),(0,z.jsx)("button",{onClick:function(){"SEARCH"!==Fe&&vn(Sn),h([]),Ue("UTILS"),qe(!1),ct(""),Re(!0),ut(""),de(!1),ta([]),Jn([]),ia(""),zn("Please Wait"),Ot(0)},className:"button-header",disabled:"UTILS"===Fe||Pe,"data-tooltip":"NameSys Utility Functions",children:(0,z.jsxs)("div",{className:"flex-sans-direction",children:["UTILS",(0,z.jsx)("span",{className:"material-icons-round",style:{marginLeft:"3px"},children:"supervised_user_circle"})]})}),(0,z.jsx)("button",{onClick:function(){"UTILS"!==Fe&&vn(Sn),h([]),Ue("SEARCH"),qe(!1),ct(""),Re(!0),ut(""),Jn([]),ta([]),ia(""),de(!1),zn("Please Wait"),Ot(0)},className:"button-header",disabled:"SEARCH"===Fe||Pe,"data-tooltip":"Search for an ENS name",children:(0,z.jsxs)("div",{className:"flex-sans-direction",children:["SEARCH",(0,z.jsx)("span",{className:"material-icons-round",style:{marginLeft:"3px"},children:"search"})]})})]}),Pe&&(s||!i)&&(0,z.jsx)("div",{children:(0,z.jsxs)("div",{className:"flex-column",style:{marginTop:"50px",marginBottom:"200px"},children:[(0,z.jsx)("div",{className:"flex-column",style:{paddingBottom:"10px"},children:(0,z.jsx)(K.Z,{height:60,width:60})}),(0,z.jsxs)("div",{className:"flex-column",style:{marginTop:"10px"},children:[(0,z.jsx)("div",{style:{color:"#fc6603",fontWeight:"700"},children:"OWNER"!==Fe?"".concat(Kn):La.modalData?"Please wait":"".concat(Kn)}),(0,z.jsxs)("div",{style:{color:"white",fontWeight:"700",marginTop:"10px"},children:[(0,z.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"22px"},children:"UTILS"===Fe?Wt>0?"".concat(Wt):"":"OWNER"===Fe?La.modalData?"":"".concat(xn):""}),(0,z.jsx)("span",{style:{fontSize:"19px"},children:"UTILS"===Fe?Wt>0?" Of ":"":"OWNER"===Fe?La.modalData?"":" Of ":""}),(0,z.jsx)("span",{style:{fontFamily:"SF Mono",fontSize:"22px"},children:"UTILS"===Fe?Wt>0?"".concat(ba.startsWith("export")?"2"===Qa.modalData?"1":"2":"1"):"":"OWNER"===Fe?La.modalData?"":"".concat(It):""})]})]})]})}),Pe&&"OWNER"===Fe&&l.length>0&&(s||!i)&&!_e&&!Cn&&(0,z.jsx)("div",{children:(0,z.jsxs)("div",{className:"flex-column",style:{marginTop:"50px",marginBottom:"200px"},children:[(0,z.jsx)("div",{className:"flex-column",style:{paddingBottom:"10px"},children:(0,z.jsx)(K.Z,{height:60,width:60})}),(0,z.jsx)("div",{className:"flex-column",style:{marginTop:"10px"},children:(0,z.jsx)("div",{style:{color:"#fc6603",fontWeight:"700"},children:"Please Wait"})})]})}),!Pe&&"OWNER"===Fe&&l.length>0&&(s||!i)&&!_e&&(0,z.jsxs)("div",{children:[(0,z.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"18px",color:"cyan",marginBottom:"25px",fontWeight:"700",marginTop:D.tq?"-10px":"0"},children:[(0,z.jsx)("span",{style:{marginRight:"5px"},children:"Names You Manage"}),(0,z.jsx)("button",{className:"button-tiny emphasis-smol",onClick:function(){G(!0),jt("info"),bt("cyan"),Bt('This list does not contain Wrapped Names or Subdomains or Legacy Names that you Manage but do not Own. Please use the Search tab to find names in these categories')},"data-tooltip":"Enlighten me",children:(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:"orange"},children:"info_outline"})})]}),"OWNER"===Fe&&!Pe&&Me&&(0,z.jsx)("div",{className:"list-container",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"50px"},children:(0,z.jsx)(L.Z,{label:"edit",items:l,onItemClickStealth:Fs,onItemClickPreview:Hs})})]}),!Pe&&"SEARCH"===Fe&&l.length>0&&(s||!i)&&!_e&&(0,z.jsxs)("div",{children:[(0,z.jsx)("div",{className:"flex-sans-direction",style:{fontSize:"18px",color:"cyan",marginBottom:"25px",fontWeight:"700"},children:"search result"}),(0,z.jsx)("div",{className:"list-container",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"50px"},children:(0,z.jsx)(L.Z,{label:"edit",items:l,onItemClickStealth:Fs,onItemClickPreview:Hs})})]}),!Pe&&"UTILS"===Fe&&!Me&&l&&(s||!i)&&(0,z.jsxs)("div",{children:[(0,z.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"18px",color:"cyan",marginBottom:"25px",fontWeight:"700"},children:[(0,z.jsx)("span",{style:{marginRight:"5px"},children:"NameSys Utilities"}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){G(!0),jt("info"),bt("cyan"),Bt('NameSys Utility Functions to set Ownerhash and Export Keys')},"data-tooltip":"Enlighten me",children:(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:"cyan"},children:"info_outline"})})]}),(0,z.jsxs)("div",{className:"export-container flex-column",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"30px"},children:[(0,z.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"18px",color:"cyan",marginBottom:"25px",fontWeight:"700"},children:[(0,z.jsx)("span",{style:{marginRight:"5px"},children:"Ownerhash Setter"}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){G(!0),jt("info"),bt("cyan"),Bt('Sets Ownerhash For All Names in a Wallet')},"data-tooltip":"Set New Ownerhash",children:(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:"cyan"},children:"info_outline"})})]}),(0,z.jsx)("input",{style:{width:"90%",color:"rgb(50, 205, 50, 0.75)"},type:"text",placeholder:"Click on 'SET'",disabled:!0,value:"ipns://"===Un?"":Un,id:"owner-hash"}),(0,z.jsxs)("div",{className:"flex-row",children:[(0,z.jsx)("button",{className:"button",style:{height:"38px",width:"80px",marginTop:"18px",marginLeft:"15px"},type:"submit","data-tooltip":"Set New Ownerhash",onClick:function(){ka(!0),Ea("ownerhash"),Jn([]),ta([]),ia(""),Ht(""),Gt(""),qe(!1),zn("")},children:(0,z.jsxs)("div",{className:"flex-sans-direction",children:[(0,z.jsx)("span",{children:"SET"}),(0,z.jsx)("span",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700",marginLeft:"3px"},children:"settings"})]})}),(Ys||Gs)&&!Vs&&(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:Ys?"lime":"orangered",marginLeft:"10px",marginTop:"18px",fontSize:"20px"},children:Ys?"task_alt":"cancel"}),(Js||Qs)&&!$s&&(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:Js?"lime":"orangered",marginLeft:"10px",marginTop:"18px",fontSize:"20px"},children:Js?"task_alt":"cancel"})]})]}),(0,z.jsxs)("div",{className:"hash-container flex-column",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"70px"},children:[(0,z.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"18px",color:"cyan",marginBottom:"25px",fontWeight:"700"},children:[(0,z.jsx)("span",{style:{marginRight:"5px"},children:"Private Key Exporter"}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){G(!0),jt("info"),bt("cyan"),Bt('Export your IPNS and/or Records Signer Keys')},"data-tooltip":"Export Keys",children:(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:"cyan"},children:"info_outline"})})]}),(0,z.jsxs)("div",{style:{width:"90%",alignItems:"flex-start"},children:[(0,z.jsx)("span",{style:{color:"skyblue",fontSize:"12px",fontWeight:"700"},children:"IPNS PRIVATE KEY"}),(0,z.jsxs)("div",{className:"flex-sans-direction",style:{marginTop:"2px",width:"100%"},children:[(0,z.jsx)("input",{style:{width:"100%",paddingRight:"32px",fontWeight:"400",textAlign:"left",color:"IPNS PRIVATE KEY COPIED!"===Xn[0]?"lime":"rgb(255, 255, 150, 0.75)"},type:"text",placeholder:"IPNS Private Key",value:ba.startsWith("export")?ba.endsWith("HTTP")?"":"0x"!==Xn[0]?Xn[0]:"":"",id:"export-ipns",disabled:!0}),(0,z.jsx)("button",{className:"button-empty",onClick:function(){J.vQ("export-ipns"),bt("lime"),Jn(["IPNS PRIVATE KEY COPIED!","COPIED!"])},"data-tooltip":"Copy IPNS Key",style:{marginLeft:"-25px",color:!wt||Xn[0]||Xn[1]?"cyan":wt},hidden:!Xn[0]||"0x"===Xn[0],children:(0,z.jsx)("span",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700"},children:"content_copy"})})]})]}),(0,z.jsxs)("div",{style:{width:"90%",alignItems:"flex-start",marginTop:"10px"},children:[(0,z.jsx)("span",{style:{color:"skyblue",fontSize:"12px",fontWeight:"700"},children:"CCIP MANAGER KEY"}),(0,z.jsxs)("div",{className:"flex-sans-direction",style:{marginTop:"2px",width:"100%"},children:[(0,z.jsx)("input",{style:{width:"100%",paddingRight:"32px",fontWeight:"400",textAlign:"left",color:"RECORDS SIGNER KEY COPIED!"===ea[0]?"lime":"rgb(255, 255, 150, 0.75)"},type:"text",placeholder:"CCIP Manager Key",value:ba.startsWith("export")?ea[0]:"",id:"export-ccip",disabled:!0}),(0,z.jsx)("button",{className:"button-empty",onClick:function(){J.vQ("export-ccip"),bt("lime"),ta(["RECORDS SIGNER KEY COPIED!","COPIED!"])},"data-tooltip":"Copy Manager Key",style:{marginLeft:"-25px",color:!wt||ea[0]||ea[1]?"cyan":wt},hidden:!ea[0],children:(0,z.jsx)("span",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700"},children:"content_copy"})})]})]}),(0,z.jsxs)("div",{style:{width:"90%",alignItems:"flex-start",marginTop:"10px"},children:[(0,z.jsx)("span",{style:{color:"skyblue",fontSize:"12px",fontWeight:"700"},children:"IPNS ENCODED KEY"}),(0,z.jsxs)("div",{className:"flex-sans-direction",style:{marginTop:"2px",width:"100%"},children:[(0,z.jsx)("input",{style:{width:"100%",paddingRight:"32px",fontWeight:"400",textAlign:"left",color:"IPNS ENCODED KEY COPIED!"===sa?"lime":"rgb(255, 255, 150, 0.75)"},type:"text",placeholder:"IPNS Encoded Key",value:ba.startsWith("export")?sa:"",id:"export-encoded",disabled:!0}),(0,z.jsx)("button",{className:"button-empty",onClick:function(){J.vQ("export-encoded"),bt("lime"),ia("IPNS ENCODED KEY COPIED!")},"data-tooltip":"Copy Manager Key",style:{marginLeft:"-25px",color:wt&&!sa?wt:"cyan"},hidden:!sa,children:(0,z.jsx)("span",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700"},children:"content_copy"})})]})]}),(0,z.jsxs)("div",{className:"flex-row",children:[(0,z.jsx)("button",{className:"button",style:{height:"38px",width:"115px",marginLeft:"15px",marginTop:"20px"},type:"submit","data-tooltip":"Export Keys",onClick:function(){pa(!0),Ea("export"),Jn([]),ta([]),ia(""),Ht(""),Gt(""),zn("")},children:(0,z.jsxs)("div",{className:"flex-sans-direction",children:[(0,z.jsx)("span",{children:"EXPORT"}),(0,z.jsx)("span",{className:"material-icons-round",style:{fontSize:"22px",fontWeight:"700",marginLeft:"5px"},children:"file_download"})]})}),(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:sa||Xn[0]||ea[0]?"lime":ms?"orangered":"",marginLeft:"10px",marginTop:"18px",fontSize:"20px"},children:sa||Xn[0]||ea[0]?"task_alt":ms?"cancel":""})]})]})]}),!Pe&&"SEARCH"===Fe&&l&&(s||!i)&&(0,z.jsxs)("div",{children:[(0,z.jsxs)("div",{className:"flex-sans-direction",style:{fontSize:"18px",color:"cyan",marginBottom:"25px",marginTop:l?"-15px":"0px"},children:[(0,z.jsx)("span",{style:{marginRight:"5px"},children:"search names"}),(0,z.jsx)("button",{className:"button-tiny",onClick:function(){G(!0),jt("info"),bt("cyan"),Bt('Search for a Subdomain or a Wrapped Domain or a Legacy name that you Manage but do not Own')},"data-tooltip":"Enlighten me",children:(0,z.jsx)("div",{className:"material-icons-round smol",style:{color:"cyan"},children:"info_outline"})})]}),(0,z.jsx)("div",{className:"search-container",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"50px"},children:(0,z.jsx)(B,{onSearch:function(e){h([]),Re(!0),nn(!0),hn(e),ut(e),Ke(!1)}})})]}),!Pe&&_e&&"OWNER"===Fe&&!le&&(0,z.jsx)("div",{children:(0,z.jsxs)("div",{className:"flex-column",style:{fontSize:"22px",color:"#fc6603",marginBottom:"25px",fontWeight:"700"},children:[(0,z.jsx)("span",{className:"material-icons-round miui-smaller",children:"warning"}),(0,z.jsx)("br",{}),"No Names Found"]})}),!Dn&&!rt&&ht&&"OWNER"!==Fe&&!Pe&&!le&&(0,z.jsx)("div",{children:(0,z.jsxs)("div",{className:"flex-column",style:{fontSize:"22px",color:"#fc6603",marginBottom:"25px",fontWeight:"700"},children:[(0,z.jsx)("span",{className:"material-icons-round miui-smaller",children:"warning"}),(0,z.jsx)("br",{}),"No Names Found"]})}),(0,z.jsxs)("div",{className:"flex-sans-direction",style:{color:"#fc6603",top:"auto",left:D.tq?"32%":"14%",transform:D.tq?"translateX(-72%)":"translateX(-92%)",bottom:10},children:[(0,z.jsxs)("div",{className:"flex-row",style:{marginRight:"15px"},children:[(0,z.jsx)("span",{className:"material-icons-round",style:{marginRight:"3px"},children:"source"}),(0,z.jsx)("a",{href:"https://github.com/namesys-eth/ccip2-eth-client",className:"footer-text",target:"_blank",rel:"noreferrer",children:"GitHub"})]}),(0,z.jsxs)("div",{className:"flex-row",children:[(0,z.jsx)("span",{className:"material-icons-round",style:{marginRight:"3px"},children:"info_outline"}),(0,z.jsx)("a",{href:"https://github.com/namesys-eth/ccip2-eth-resources/blob/main/docs/GUIDE.md",className:"footer-text",target:"_blank",rel:"noreferrer",children:"Help"})]})]}),(0,z.jsxs)("div",{id:"modal",children:[ge&&(0,z.jsx)(C.Z,{onClose:function(){return ye(!1)},show:ge,_ENS_:Ee,chain:is,handleParentTrigger:function(e){_a((function(t){return se(se({},t),{},{trigger:e})}))},handleParentModalData:function(e){_a((function(t){return se(se({},t),{},{modalData:e})}))}}),Ne&&(0,z.jsx)(W.Z,{onClose:function(){return Se(!1)},show:Ne,_ENS_:ke,chain:is,handleParentTrigger:function(e){Ma((function(t){return se(se({},t),{},{trigger:e})}))},handleParentModalData:function(e){Ma((function(t){return se(se({},t),{},{modalData:e})}))}}),(0,z.jsx)(O.Z,{onClose:function(){return H(!1)},show:A}),(0,z.jsx)(k.Z,{onClose:function(){return oe(!1)},show:ie}),(0,z.jsx)(R.Z,{onClose:function(){In(!1),Qt(!0)},color:"red",show:Rn&&!Pe,title:"cancel",children:Kn}),(0,z.jsx)(R.Z,{onClose:function(){de(!1),Xe(""),st(""),ut(""),ct("")},color:"red",show:le&&!tn&&!Pe,title:"block",children:pe}),(0,z.jsx)(R.Z,{onClose:function(){de(!1),Xe(""),st(""),ut(""),ct("")},color:"red",show:le&&tn&&!Pe,title:"block",children:pe}),(0,z.jsx)(I.Z,{handleTrigger:function(e){as((function(t){return se(se({},t),{},{trigger:e})}))},handleModalData:function(e){as((function(t){return se(se({},t),{},{modalData:e})}))},onClose:function(){Pa(!1)},show:Oa}),(0,z.jsx)(P.Z,{handleTrigger:function(e){Fa((function(t){return se(se({},t),{},{trigger:e})}))},handleModalData:function(e){Fa((function(t){return se(se({},t),{},{modalData:e})}))},onClose:function(){la(!1)},show:ca,children:[ma,"ownerhash"]}),(0,z.jsx)(M.Z,{handleTrigger:function(e){Va((function(t){return se(se({},t),{},{trigger:e})}))},handleModalData:function(e){Va((function(t){return se(se({},t),{},{modalData:e})}))},onClose:function(){ka(!1)},show:Za&&!ca,children:"0"}),(0,z.jsx)(X,{handleTrigger:function(e){$a((function(t){return se(se({},t),{},{trigger:e})}))},handleModalData:function(e){$a((function(t){return se(se({},t),{},{modalData:e})}))},onClose:function(){pa(!1)},show:ua,children:""}),(0,z.jsx)(Z.Z,{color:wt,icon:vt,onClose:function(){return G(!1)},show:Y,position:"",children:zt})]})]})})]})}},682:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account",function(){return n(67307)}])}},function(e){e.O(0,[8543,8041,8764,6724,8109,5246,1469,9774,2888,179],(function(){return t=682,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file diff --git a/out/_next/static/chunks/pages/index-6b71d8ff8ed1ec2b.js b/out/_next/static/chunks/pages/index-547ce76aec519803.js similarity index 63% rename from out/_next/static/chunks/pages/index-6b71d8ff8ed1ec2b.js rename to out/_next/static/chunks/pages/index-547ce76aec519803.js index 3bf49f46..cfdb19be 100644 --- a/out/_next/static/chunks/pages/index-6b71d8ff8ed1ec2b.js +++ b/out/_next/static/chunks/pages/index-547ce76aec519803.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{41928:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return _}});var a=n(50029),r=n(59499),s=n(16835),i=n(87794),o=n.n(i),c=n(67294),l=n(9008),d=n.n(l),u=n(56974),f=n(35133),p=n(64146),h=n(2593),x=n(27586),m=n(16441),g=n(84917),v=n(38197),y=n(9279),j=n(85518),S=n(22794),w=n(92675),N=n(20321),b=n(46822),Z=n(92673),k=n(64637),O=n(58595),D=n(40342),q=n(22661),E=n(85893),C=function(e){var t=e.onSearch,n=(0,c.useState)(""),a=n[0],r=n[1];return(0,E.jsx)("form",{style:{display:"flex",alignItems:"center",flexDirection:"column"},onSubmit:function(e){e.preventDefault(),t(a)},children:(0,E.jsxs)("div",{style:{display:"flex",alignItems:"center",flexDirection:"row"},children:[(0,E.jsx)("input",{className:"input-main",type:"text",placeholder:j.tq?"search .eth":"search for a .eth domain",value:a.toLowerCase(),name:".eth search",id:"eth-search",onChange:function(e){r(e.target.value.toLowerCase())},onInvalid:function(e){e.target.setCustomValidity("Please enter a valid .eth name")},onInput:function(e){e.target.setCustomValidity("")},required:!0,pattern:".*\\.eth$",title:"\u2757 Input must end with '.eth'",style:{fontFamily:a?"SF Mono":"Spotnik",fontWeight:"600",fontSize:a?"22px":"19px",paddingTop:a?"8px":"15px",paddingBottom:a?"8px":"15px"}}),(0,E.jsx)("button",{className:"button",style:{height:"46px",width:"80px",marginLeft:"20px"},type:"submit","data-tooltip":"Search",disabled:!a.length,children:(0,E.jsx)("span",{className:"material-icons",style:{fontSize:"28px",fontWeight:"700"},children:"search"})})]})})},P=n(62012),R=n(71775),W=n(67191);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function I(e){for(var t=1;t0){var e=[];[].push(et.split(".eth")[0]);var t=function(){var t=(0,a.Z)(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:P.Ap.getResolver(et).then((function(t){e.push({key:1,name:et.split(".eth")[0],migrated:(null===t||void 0===t?void 0:t.address)===Yt?"1/2":"0"}),e.length>0&&(bt&&"ipns://"!==String(bt)&&"1/2"===e[0].migrated?e[0].migrated=String(bt).startsWith("https://")?"4/5":"1":Dt&&"ipns://"!==String(Dt)&&"1/2"===e[0].migrated&&(e[0].migrated=String(Dt).startsWith("https://")?"4/5":"3/4"),_(e),Ce(!0),Te(!0))}));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}}),[et,bt,Dt]),c.useEffect((function(){mn&&mn!==vn&&t?String(mn).startsWith(P.Wp)?Zt(g.ZN(String(mn))):Zt("ipns://".concat(W.K5(String(mn)).decoded)):Zt("")}),[mn,vn]),c.useEffect((function(){vn&&t?String(vn).startsWith(P.Wp)?qt(g.ZN(String(vn))):qt("ipns://".concat(W.K5(String(vn)).decoded)):qt("")}),[vn]),c.useEffect((function(){Ee&&We?"0x"!==Pt&&Pt!==P.DR?(Q(!1),Ne(!0),setTimeout((function(){Ne(!1)}),5e3),Oe(!1)):(setTimeout((function(){Ne(!1)}),2e3),ae("Name not Registered Or Expired Or in Grace"),Q(!0),Oe(!0),tt("")):We?(setTimeout((function(){Ne(!1)}),2e3),ae("Name not Registered Or Expired Or in Grace"),Q(!0),Oe(!0)):Ne(!0)}),[Ee,Pt,We]),c.useEffect((function(){if(et)try{var e=x.VM(et),t=h.O$.from(e);Ve(String(t));var n=v.keccak256(g.Y0(et.split(".eth")[0]));He(e),Me(String(h.O$.from(n)))}catch(a){}}),[et,Pt,Ye]);return(0,E.jsxs)("div",{className:"page flex-column-sans-align",style:{maxWidth:"100vw"},children:[!j.tq&&(0,E.jsx)("div",{style:{margin:"20px",width:"40%",display:"flex",justifyContent:"flex-start"},children:(0,E.jsx)("img",{className:"avatar",alt:"corner-index",src:"logo.png"})}),(0,E.jsxs)(d(),{children:[(0,E.jsx)("title",{children:"NameSys - Off-Chain Records Manager"}),(0,E.jsx)("meta",{name:"viewport",content:"initial-scale=1.0, width=device-width"}),(0,E.jsx)("meta",{name:"description",content:"NameSys"}),(0,E.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,E.jsx)("link",{rel:"shortcut icon",href:"logo.png"}),(0,E.jsx)("link",{rel:"preload",href:"https://fonts.googleapis.com/icon?family=Material+Icons",as:"style"}),(0,E.jsx)("link",{rel:"preload",href:"SF-Mono.woff2",as:"font",type:"font/woff2",crossOrigin:"anonymous"}),(0,E.jsx)("link",{rel:"preload",href:"Spotnik.woff2",as:"font",type:"font/woff2",crossOrigin:"anonymous"}),(0,E.jsx)("link",{rel:"preload",href:"Rajdhani.woff2",as:"font",type:"font/woff2",crossOrigin:"anonymous"})]}),(0,E.jsx)("div",{style:{fontFamily:"Rajdhani"}}),(0,E.jsx)("div",{style:{fontFamily:"SF Mono"}}),(0,E.jsx)("div",{style:{fontFamily:"Spotnik"}}),(0,E.jsx)("div",{id:"overlay",className:"overlay",children:(0,E.jsxs)("div",{className:"overlay-content",children:[(0,E.jsx)(q.Z,{height:75,width:75}),(0,E.jsx)("div",{style:{marginTop:"20px"},children:(0,E.jsx)("span",{children:"PLEASE WAIT"})})]})}),(0,E.jsx)("div",{children:(0,E.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"space-between",width:"100%"},children:[(0,E.jsxs)("div",{style:{display:"flex",flexDirection:j.tq?"column":"row",marginLeft:j.tq?"25px":"9%",marginRight:"auto",marginTop:j.tq?"25px":"-7%"},children:[(0,E.jsx)("div",{style:{marginRight:j.tq?"20px":"40px"},children:(0,E.jsx)("button",{className:"button",onClick:function(){window.location.href="/ccip2-eth-client/account.html"},"data-tooltip":"My Names",disabled:r,hidden:j.tq,children:(0,E.jsxs)("div",{className:"flex-sans-direction",children:[j.tq?"Names":"My Names","\xa0",(0,E.jsx)("span",{className:"material-icons",children:"admin_panel_settings"})]})})}),(0,E.jsx)("div",{style:{marginLeft:j.tq?"-9px":"-30px",marginTop:j.tq?"-15px":"0px"},children:(0,E.jsx)(D.Z,{variable:rt})})]}),(0,E.jsxs)("div",{className:"connect-button",style:{marginLeft:"auto",display:"flex",flexDirection:j.tq?"column":"row",marginTop:j.tq?"-5px":"-7%"},children:[(0,E.jsxs)("div",{style:{marginRight:j.tq?"10px":"15px",marginTop:j.tq?"10px":"6px",color:"#fc6603",fontFamily:"SF Mono",fontSize:j.tq?"13px":"18px"},children:[(0,E.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:j.tq?"7.5px":"12px",fontWeight:"700",marginRight:"2px"},children:"v"}),"1.1",(0,E.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:j.tq?"10px":"15px",fontWeight:"700",marginLeft:"2px"},children:"-beta"})]}),(0,E.jsx)("button",{className:"button clear",onClick:function(){window.scrollTo(0,0),A(!0)},style:{marginRight:10,display:"none"},"data-tooltip":"Learn more",children:(0,E.jsxs)("div",{className:"flex-row",children:["about",(0,E.jsx)("span",{style:{fontFamily:"SF Mono"},children:"\xa0"}),(0,E.jsx)("span",{className:"material-icons",children:"info"})]})}),(0,E.jsx)("button",{className:"button clear",onClick:function(){window.scrollTo(0,0),X(!0)},style:{marginRight:10,display:"none"},"data-tooltip":"Terms of Use",children:(0,E.jsxs)("div",{className:"flex-row",children:["terms","\xa0",(0,E.jsx)("span",{className:"material-icons",children:"gavel"})]})}),!j.tq&&(0,E.jsx)("div",{children:(0,E.jsx)(u.NL,{label:"connect"})}),j.tq&&(0,E.jsx)("div",{children:(0,E.jsx)(u.NL,{label:"connect"})})]})]})}),(0,E.jsx)("div",{className:"container",style:{maxWidth:"inherit",marginTop:It?"0px":"40px"},children:(0,E.jsxs)("div",{className:j.tq||It?!j.tq&&It?"heading":"none":"heading",style:{flex:"1 1 auto"},children:[(0,E.jsx)("div",{style:{marginTop:"-120px"},children:(0,E.jsxs)("div",{style:{display:"flex",justifyContent:"center",textAlign:"center",paddingTop:"100px"},children:[!j.tq&&(0,E.jsxs)("div",{children:[(0,E.jsx)("img",{className:"icon-ccip2",alt:"sample-icon",src:"logo.png",hidden:!0}),(0,E.jsx)("div",{className:"flex-column",style:{fontSize:It?"46px":"50px",marginTop:It?"20px":"28px",color:"#fc6603",marginBottom:"10px",fontWeight:"700"},children:"NameSys"}),(0,E.jsx)("div",{className:"flex-column",style:{fontSize:It?"24px":"28px",marginTop:"0px",color:"#eb8634",fontWeight:"700"},children:"Off-chain Records Manager"})]}),j.tq&&(0,E.jsxs)("div",{children:[(0,E.jsx)("img",{className:"icon-ccip2",alt:"sample-icon",src:"logo.png",hidden:It}),(0,E.jsx)("div",{className:"flex-column",style:{fontSize:It?"36px":"44px",marginTop:It?"44px":"10px",color:"#fc6603"},children:"NameSys"}),(0,E.jsx)("div",{className:"flex-column",style:{fontSize:It?"20px":"24px",fontWeight:700,color:"#eb8634",marginTop:"5px"},children:"Off-chain Records Manager"}),(0,E.jsx)("div",{style:{},children:(0,E.jsx)("button",{className:"button",onClick:function(){window.location.href="/ccip2-eth-client/account.html"},"data-tooltip":"My Names",disabled:r,style:{marginTop:"15px",marginBottom:"-10px"},children:(0,E.jsxs)("div",{className:"flex-sans-direction",children:["My Names","\xa0",(0,E.jsx)("span",{className:"material-icons",children:"admin_panel_settings"})]})})})]})]})}),(0,E.jsx)("br",{}),(0,E.jsx)("br",{}),(0,E.jsx)("div",{className:"main-search-container",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"50px"},children:(0,E.jsx)(C,{onSearch:function(e){Ne(!0),tt(e),_([]),Me(""),Ve(""),$e(""),St("search"),Zt(""),Rt(""),_t(!0),t||qt("")}})}),!It&&(0,E.jsx)("div",{children:(0,E.jsx)("div",{className:"content-slider",children:(0,E.jsx)("div",{className:"slider",children:(0,E.jsx)("div",{className:"mask",children:(0,E.jsx)("ul",{children:P.hh.map((function(e,t){return(0,E.jsx)("li",{className:"anim".concat(t+1),children:(0,E.jsx)("div",{className:"carousal-item",children:(0,E.jsx)("div",{dangerouslySetInnerHTML:{__html:e}})})},t)}))})})})})}),we&&It&&(0,E.jsx)("div",{children:(0,E.jsxs)("div",{className:"flex-column",style:{marginTop:"-10px",marginBottom:"200px"},children:[(0,E.jsx)("div",{className:"flex-column",style:{paddingBottom:"10px"},children:(0,E.jsx)(q.Z,{height:50,width:50})}),(0,E.jsx)("div",{style:{marginTop:"10px"},children:(0,E.jsx)("span",{style:{color:"#fc6603",fontWeight:"700"},children:"Please Wait"})})]})}),!we&&T.length>0&&!ke&&It&&(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{style:{alignItems:"center",justifyContent:"center",display:"flex",fontSize:"18px",color:"cyan",marginBottom:"25px",fontWeight:"700"},children:[(0,E.jsx)("span",{style:{marginRight:"5px"},children:"search results"}),(0,E.jsx)("button",{className:"button-tiny",onClick:function(){K(!0),lt("info"),pt("cyan"),At(""),gt("Search results for your query")},children:(0,E.jsx)("div",{className:"material-icons smol",style:{color:"cyan"},children:"info_outline"})})]}),(0,E.jsx)("div",{className:"list-container",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"50px"},children:(0,E.jsx)(O.Z,{label:r&&!n||Ye!==t?"view":"edit",items:T,onItemClickStealth:function(e){ye("".concat(e))},onItemClickPreview:function(e){xe("".concat(e,":"))}})})]}),(0,E.jsxs)("div",{className:"flex-sans-direction",style:{color:"#fc6603",top:"auto",left:j.tq?"32%":"13%",transform:j.tq?"translateX(-72%)":"translateX(-93%)",bottom:10,position:"fixed"},children:[(0,E.jsxs)("div",{className:"flex-row",style:{marginRight:"15px"},children:[(0,E.jsx)("span",{className:"material-icons",style:{marginRight:"3px"},children:"source"}),(0,E.jsx)("a",{href:"https://github.com/namesys-eth",className:"footer-text",target:"_blank",rel:"noreferrer",children:"GitHub"})]}),(0,E.jsxs)("div",{className:"flex-row",children:[(0,E.jsx)("span",{className:"material-icons",style:{marginRight:"3px"},children:"info_outline"}),(0,E.jsx)("a",{href:"readme/readme.htm?src=https://namesys-eth.github.io/ccip2-eth-resources/GUIDE.md",className:"footer-text",target:"_blank",rel:"noreferrer",children:"Help"})]})]}),(0,E.jsxs)("div",{id:"modal",children:[ie&&(0,E.jsx)(N.Z,{onClose:function(){return oe(!1)},show:ie,_ENS_:he,chain:P.wU.chainId,handleParentTrigger:function(e){Kt((function(t){return I(I({},t),{},{trigger:e})}))},handleParentModalData:function(e){Kt((function(t){return I(I({},t),{},{modalData:e})}))}}),de&&(0,E.jsx)(b.Z,{onClose:function(){return ue(!1)},show:de,_ENS_:ve,chain:P.wU.chainId,handleParentTrigger:function(e){Xt((function(t){return I(I({},t),{},{trigger:e})}))},handleParentModalData:function(e){Xt((function(t){return I(I({},t),{},{modalData:e})}))}}),(0,E.jsx)(Z.Z,{onClose:function(){return A(!1)},show:F}),(0,E.jsx)(w.Z,{onClose:function(){return X(!1)},show:G}),(0,E.jsx)(k.Z,{onClose:function(){Q(!1),Me(""),Ve(""),tt(""),$e("")},color:"red",show:J&&"search"===jt&&!we,title:"block",children:ne}),(0,E.jsx)(S.Z,{color:ft,icon:ct,onClose:function(){return K(!1)},show:B,position:Ft,children:mt})]})]})})]})}},48312:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(41928)}])}},function(e){e.O(0,[8543,8041,8764,8109,3482,1469,9774,2888,179],(function(){return t=48312,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{41928:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return _}});var a=n(50029),r=n(59499),s=n(16835),i=n(87794),o=n.n(i),c=n(67294),l=n(9008),d=n.n(l),u=n(56974),f=n(35133),p=n(64146),h=n(2593),x=n(27586),m=n(16441),g=n(84917),v=n(38197),y=n(9279),j=n(85518),S=n(22794),w=n(92675),N=n(20321),b=n(46822),Z=n(92673),k=n(64637),O=n(58595),D=n(40342),q=n(22661),E=n(85893),C=function(e){var t=e.onSearch,n=(0,c.useState)(""),a=n[0],r=n[1];return(0,E.jsx)("form",{style:{display:"flex",alignItems:"center",flexDirection:"column"},onSubmit:function(e){e.preventDefault(),t(a)},children:(0,E.jsxs)("div",{style:{display:"flex",alignItems:"center",flexDirection:"row"},children:[(0,E.jsx)("input",{className:"input-main",type:"text",placeholder:j.tq?"search .eth":"search for a .eth domain",value:a.toLowerCase(),name:".eth search",id:"eth-search",onChange:function(e){r(e.target.value.toLowerCase())},onInvalid:function(e){e.target.setCustomValidity("Please enter a valid .eth name")},onInput:function(e){e.target.setCustomValidity("")},required:!0,pattern:".*\\.eth$",title:"\u2757 Input must end with '.eth'",style:{fontFamily:a?"SF Mono":"Spotnik",fontWeight:"600",fontSize:a?"22px":"19px",paddingTop:a?"8px":"15px",paddingBottom:a?"8px":"15px"}}),(0,E.jsx)("button",{className:"button",style:{height:"46px",width:"80px",marginLeft:"20px"},type:"submit","data-tooltip":"Search",disabled:!a.length,children:(0,E.jsx)("span",{className:"material-icons",style:{fontSize:"28px",fontWeight:"700"},children:"search"})})]})})},P=n(62012),R=n(71775),W=n(67191);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function I(e){for(var t=1;t0){var e=[];[].push(et.split(".eth")[0]);var t=function(){var t=(0,a.Z)(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:P.Ap.getResolver(et).then((function(t){e.push({key:1,name:et.split(".eth")[0],migrated:(null===t||void 0===t?void 0:t.address)===Yt?"1/2":"0"}),e.length>0&&(bt&&"ipns://"!==String(bt)&&"1/2"===e[0].migrated?e[0].migrated=String(bt).startsWith("https://")?"4/5":"1":Dt&&"ipns://"!==String(Dt)&&"1/2"===e[0].migrated&&(e[0].migrated=String(Dt).startsWith("https://")?"4/5":"3/4"),_(e),Ce(!0),Te(!0))}));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}}),[et,bt,Dt]),c.useEffect((function(){mn&&mn!==vn&&t?String(mn).startsWith(P.Wp)?Zt(g.ZN(String(mn))):Zt("ipns://".concat(W.K5(String(mn)).decoded)):Zt("")}),[mn,vn]),c.useEffect((function(){vn&&t?String(vn).startsWith(P.Wp)?qt(g.ZN(String(vn))):qt("ipns://".concat(W.K5(String(vn)).decoded)):qt("")}),[vn]),c.useEffect((function(){Ee&&We?"0x"!==Pt&&Pt!==P.DR?(Q(!1),Ne(!0),setTimeout((function(){Ne(!1)}),5e3),Oe(!1)):(setTimeout((function(){Ne(!1)}),2e3),ae("Name not Registered Or Expired Or in Grace"),Q(!0),Oe(!0),tt("")):We?(setTimeout((function(){Ne(!1)}),2e3),ae("Name not Registered Or Expired Or in Grace"),Q(!0),Oe(!0)):Ne(!0)}),[Ee,Pt,We]),c.useEffect((function(){if(et)try{var e=x.VM(et),t=h.O$.from(e);Ve(String(t));var n=v.keccak256(g.Y0(et.split(".eth")[0]));He(e),Me(String(h.O$.from(n)))}catch(a){}}),[et,Pt,Ye]);return(0,E.jsxs)("div",{className:"page flex-column-sans-align",style:{maxWidth:"100vw"},children:[!j.tq&&(0,E.jsx)("div",{style:{margin:"20px",width:"40%",display:"flex",justifyContent:"flex-start"},children:(0,E.jsx)("img",{className:"avatar",alt:"corner-index",src:"logo.png"})}),(0,E.jsxs)(d(),{children:[(0,E.jsx)("title",{children:"NameSys - Off-Chain Records Manager"}),(0,E.jsx)("meta",{name:"viewport",content:"initial-scale=1.0, width=device-width"}),(0,E.jsx)("meta",{name:"description",content:"NameSys"}),(0,E.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,E.jsx)("link",{rel:"shortcut icon",href:"logo.png"}),(0,E.jsx)("link",{rel:"preload",href:"https://fonts.googleapis.com/icon?family=Material+Icons",as:"style"}),(0,E.jsx)("link",{rel:"preload",href:"SF-Mono.woff2",as:"font",type:"font/woff2",crossOrigin:"anonymous"}),(0,E.jsx)("link",{rel:"preload",href:"Spotnik.woff2",as:"font",type:"font/woff2",crossOrigin:"anonymous"}),(0,E.jsx)("link",{rel:"preload",href:"Rajdhani.woff2",as:"font",type:"font/woff2",crossOrigin:"anonymous"})]}),(0,E.jsx)("div",{style:{fontFamily:"Rajdhani"}}),(0,E.jsx)("div",{style:{fontFamily:"SF Mono"}}),(0,E.jsx)("div",{style:{fontFamily:"Spotnik"}}),(0,E.jsx)("div",{id:"overlay",className:"overlay",children:(0,E.jsxs)("div",{className:"overlay-content",children:[(0,E.jsx)(q.Z,{height:75,width:75}),(0,E.jsx)("div",{style:{marginTop:"20px"},children:(0,E.jsx)("span",{children:"PLEASE WAIT"})})]})}),(0,E.jsx)("div",{children:(0,E.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"space-between",width:"100%"},children:[(0,E.jsxs)("div",{style:{display:"flex",flexDirection:j.tq?"column":"row",marginLeft:j.tq?"25px":"9%",marginRight:"auto",marginTop:j.tq?"25px":"-7%"},children:[(0,E.jsx)("div",{style:{marginRight:j.tq?"20px":"40px"},children:(0,E.jsx)("button",{className:"button",onClick:function(){window.location.href="/account.html"},"data-tooltip":"My Names",disabled:r,hidden:j.tq,children:(0,E.jsxs)("div",{className:"flex-sans-direction",children:[j.tq?"Names":"My Names","\xa0",(0,E.jsx)("span",{className:"material-icons",children:"admin_panel_settings"})]})})}),(0,E.jsx)("div",{style:{marginLeft:j.tq?"-9px":"-30px",marginTop:j.tq?"-15px":"0px"},children:(0,E.jsx)(D.Z,{variable:rt})})]}),(0,E.jsxs)("div",{className:"connect-button",style:{marginLeft:"auto",display:"flex",flexDirection:j.tq?"column":"row",marginTop:j.tq?"-5px":"-7%"},children:[(0,E.jsxs)("div",{style:{marginRight:j.tq?"10px":"15px",marginTop:j.tq?"10px":"6px",color:"#fc6603",fontFamily:"SF Mono",fontSize:j.tq?"13px":"18px"},children:[(0,E.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:j.tq?"7.5px":"12px",fontWeight:"700",marginRight:"2px"},children:"v"}),"1.1",(0,E.jsx)("span",{style:{fontFamily:"Spotnik",fontSize:j.tq?"10px":"15px",fontWeight:"700",marginLeft:"2px"},children:"-beta"})]}),(0,E.jsx)("button",{className:"button clear",onClick:function(){window.scrollTo(0,0),A(!0)},style:{marginRight:10,display:"none"},"data-tooltip":"Learn more",children:(0,E.jsxs)("div",{className:"flex-row",children:["about",(0,E.jsx)("span",{style:{fontFamily:"SF Mono"},children:"\xa0"}),(0,E.jsx)("span",{className:"material-icons",children:"info"})]})}),(0,E.jsx)("button",{className:"button clear",onClick:function(){window.scrollTo(0,0),X(!0)},style:{marginRight:10,display:"none"},"data-tooltip":"Terms of Use",children:(0,E.jsxs)("div",{className:"flex-row",children:["terms","\xa0",(0,E.jsx)("span",{className:"material-icons",children:"gavel"})]})}),!j.tq&&(0,E.jsx)("div",{children:(0,E.jsx)(u.NL,{label:"connect"})}),j.tq&&(0,E.jsx)("div",{children:(0,E.jsx)(u.NL,{label:"connect"})})]})]})}),(0,E.jsx)("div",{className:"container",style:{maxWidth:"inherit",marginTop:It?"0px":"40px"},children:(0,E.jsxs)("div",{className:j.tq||It?!j.tq&&It?"heading":"none":"heading",style:{flex:"1 1 auto"},children:[(0,E.jsx)("div",{style:{marginTop:"-120px"},children:(0,E.jsxs)("div",{style:{display:"flex",justifyContent:"center",textAlign:"center",paddingTop:"100px"},children:[!j.tq&&(0,E.jsxs)("div",{children:[(0,E.jsx)("img",{className:"icon-ccip2",alt:"sample-icon",src:"logo.png",hidden:!0}),(0,E.jsx)("div",{className:"flex-column",style:{fontSize:It?"46px":"50px",marginTop:It?"20px":"28px",color:"#fc6603",marginBottom:"10px",fontWeight:"700"},children:"NameSys"}),(0,E.jsx)("div",{className:"flex-column",style:{fontSize:It?"24px":"28px",marginTop:"0px",color:"#eb8634",fontWeight:"700"},children:"Off-chain Records Manager"})]}),j.tq&&(0,E.jsxs)("div",{children:[(0,E.jsx)("img",{className:"icon-ccip2",alt:"sample-icon",src:"logo.png",hidden:It}),(0,E.jsx)("div",{className:"flex-column",style:{fontSize:It?"36px":"44px",marginTop:It?"44px":"10px",color:"#fc6603"},children:"NameSys"}),(0,E.jsx)("div",{className:"flex-column",style:{fontSize:It?"20px":"24px",fontWeight:700,color:"#eb8634",marginTop:"5px"},children:"Off-chain Records Manager"}),(0,E.jsx)("div",{style:{},children:(0,E.jsx)("button",{className:"button",onClick:function(){window.location.href="/account.html"},"data-tooltip":"My Names",disabled:r,style:{marginTop:"15px",marginBottom:"-10px"},children:(0,E.jsxs)("div",{className:"flex-sans-direction",children:["My Names","\xa0",(0,E.jsx)("span",{className:"material-icons",children:"admin_panel_settings"})]})})})]})]})}),(0,E.jsx)("br",{}),(0,E.jsx)("br",{}),(0,E.jsx)("div",{className:"main-search-container",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"50px"},children:(0,E.jsx)(C,{onSearch:function(e){Ne(!0),tt(e),_([]),Me(""),Ve(""),$e(""),St("search"),Zt(""),Rt(""),_t(!0),t||qt("")}})}),!It&&(0,E.jsx)("div",{children:(0,E.jsx)("div",{className:"content-slider",children:(0,E.jsx)("div",{className:"slider",children:(0,E.jsx)("div",{className:"mask",children:(0,E.jsx)("ul",{children:P.hh.map((function(e,t){return(0,E.jsx)("li",{className:"anim".concat(t+1),children:(0,E.jsx)("div",{className:"carousal-item",children:(0,E.jsx)("div",{dangerouslySetInnerHTML:{__html:e}})})},t)}))})})})})}),we&&It&&(0,E.jsx)("div",{children:(0,E.jsxs)("div",{className:"flex-column",style:{marginTop:"-10px",marginBottom:"200px"},children:[(0,E.jsx)("div",{className:"flex-column",style:{paddingBottom:"10px"},children:(0,E.jsx)(q.Z,{height:50,width:50})}),(0,E.jsx)("div",{style:{marginTop:"10px"},children:(0,E.jsx)("span",{style:{color:"#fc6603",fontWeight:"700"},children:"Please Wait"})})]})}),!we&&T.length>0&&!ke&&It&&(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{style:{alignItems:"center",justifyContent:"center",display:"flex",fontSize:"18px",color:"cyan",marginBottom:"25px",fontWeight:"700"},children:[(0,E.jsx)("span",{style:{marginRight:"5px"},children:"search results"}),(0,E.jsx)("button",{className:"button-tiny",onClick:function(){K(!0),lt("info"),pt("cyan"),At(""),gt("Search results for your query")},children:(0,E.jsx)("div",{className:"material-icons smol",style:{color:"cyan"},children:"info_outline"})})]}),(0,E.jsx)("div",{className:"list-container",style:{maxHeight:"520px",overflowY:"auto",marginBottom:"50px"},children:(0,E.jsx)(O.Z,{label:r&&!n||Ye!==t?"view":"edit",items:T,onItemClickStealth:function(e){ye("".concat(e))},onItemClickPreview:function(e){xe("".concat(e,":"))}})})]}),(0,E.jsxs)("div",{className:"flex-sans-direction",style:{color:"#fc6603",top:"auto",left:j.tq?"32%":"13%",transform:j.tq?"translateX(-72%)":"translateX(-93%)",bottom:10,position:"fixed"},children:[(0,E.jsxs)("div",{className:"flex-row",style:{marginRight:"15px"},children:[(0,E.jsx)("span",{className:"material-icons",style:{marginRight:"3px"},children:"source"}),(0,E.jsx)("a",{href:"https://github.com/namesys-eth",className:"footer-text",target:"_blank",rel:"noreferrer",children:"GitHub"})]}),(0,E.jsxs)("div",{className:"flex-row",children:[(0,E.jsx)("span",{className:"material-icons",style:{marginRight:"3px"},children:"info_outline"}),(0,E.jsx)("a",{href:"readme/readme.htm?src=https://namesys-eth.github.io/ccip2-eth-resources/GUIDE.md",className:"footer-text",target:"_blank",rel:"noreferrer",children:"Help"})]})]}),(0,E.jsxs)("div",{id:"modal",children:[ie&&(0,E.jsx)(N.Z,{onClose:function(){return oe(!1)},show:ie,_ENS_:he,chain:P.wU.chainId,handleParentTrigger:function(e){Kt((function(t){return I(I({},t),{},{trigger:e})}))},handleParentModalData:function(e){Kt((function(t){return I(I({},t),{},{modalData:e})}))}}),de&&(0,E.jsx)(b.Z,{onClose:function(){return ue(!1)},show:de,_ENS_:ve,chain:P.wU.chainId,handleParentTrigger:function(e){Xt((function(t){return I(I({},t),{},{trigger:e})}))},handleParentModalData:function(e){Xt((function(t){return I(I({},t),{},{modalData:e})}))}}),(0,E.jsx)(Z.Z,{onClose:function(){return A(!1)},show:F}),(0,E.jsx)(w.Z,{onClose:function(){return X(!1)},show:G}),(0,E.jsx)(k.Z,{onClose:function(){Q(!1),Me(""),Ve(""),tt(""),$e("")},color:"red",show:J&&"search"===jt&&!we,title:"block",children:ne}),(0,E.jsx)(S.Z,{color:ft,icon:ct,onClose:function(){return K(!1)},show:B,position:Ft,children:mt})]})]})})]})}},48312:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(41928)}])}},function(e){e.O(0,[8543,8041,8764,6724,8109,5246,1469,9774,2888,179],(function(){return t=48312,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file diff --git a/out/_next/static/chunks/webpack-48b731e940c7534a.js b/out/_next/static/chunks/webpack-48b731e940c7534a.js deleted file mode 100644 index 170d3624..00000000 --- a/out/_next/static/chunks/webpack-48b731e940c7534a.js +++ /dev/null @@ -1 +0,0 @@ -!function(){"use strict";var e={},t={};function n(r){var f=t[r];if(void 0!==f)return f.exports;var o=t[r]={id:r,loaded:!1,exports:{}},a=!0;try{e[r].call(o.exports,o,o.exports,n),a=!1}finally{a&&delete t[r]}return o.loaded=!0,o.exports}n.m=e,n.amdO={},function(){var e=[];n.O=function(t,r,f,o){if(!r){var a=1/0;for(u=0;u=o)&&Object.keys(n.O).every((function(e){return n.O[e](r[d])}))?r.splice(d--,1):(c=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,f,o]}}(),n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(r,f){if(1&f&&(r=this(r)),8&f)return r;if("object"===typeof r&&r){if(4&f&&r.__esModule)return r;if(16&f&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var c=2&f&&r;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((function(e){a[e]=function(){return r[e]}}));return a.default=function(){return r},n.d(o,a),o}}(),n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return 8764===e?"static/chunks/8764-593a836a579a1569.js":8109===e?"static/chunks/8109-144fa7e49c07249e.js":"static/chunks/"+e+"."+{514:"d2f047fea62adf58",541:"5993c23b9b319446",704:"484bcd9e0a7f5626",794:"f18da82915d63734",934:"405a73de74b58e27",1088:"04d87f92e05f23c7",1608:"ec04f07937386922",1711:"ae2b84d9f5645069",1727:"af62bd633f21ee69",1748:"f63b451fd93f590b",1894:"cf8bb2590ecc3edc",1950:"c8039f3dc9bb92f5",2027:"038de301f3a28eb2",2604:"250be1a3b8354750",2746:"0a838d09eabc5b43",2898:"f370a64b5af02f0b",3200:"6135ea7388cc6e9c",3525:"53072abba3ca74b8",3646:"111aba596062de80",4253:"6be69df622e36e45",4419:"c4f2007bfe36ec14",5023:"798aaaf48ec0ce89",5119:"33e08a0525159056",5289:"5d8686a37c030aeb",5488:"ea86c6ce443ba3bd",5577:"37ea4b85f4bb1a28",5670:"2bee96e50f302d0d",5806:"7abe5840ceba140e",5811:"39f4dd66d499574b",5939:"0a433dc6f963fc41",6237:"f7b1d24c812922e4",6253:"dcdff54f0dceda1f",6328:"ea13afa99496d818",6551:"432f96462db0d036",6847:"a575059dbc72db1a",7682:"b0a3567fac8e0052",7749:"91ea02a2812002e1",8137:"d6c500ddcf42e542",8824:"984bbfca761cedbf",8881:"8c985300b37d631a",9223:"882cd6b61a640a13",9343:"f765202d31d21580",9894:"c93f7cb64c560417",9941:"44044767831d9eb0"}[e]+".js"},n.miniCssF=function(e){return"static/css/3458e6a5de51a375.css"},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="_N_E:";n.l=function(r,f,o,a){if(e[r])e[r].push(f);else{var c,d;if(void 0!==o)for(var i=document.getElementsByTagName("script"),u=0;u=o)&&Object.keys(n.O).every((function(e){return n.O[e](r[d])}))?r.splice(d--,1):(c=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,f,o]}}(),n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(r,f){if(1&f&&(r=this(r)),8&f)return r;if("object"===typeof r&&r){if(4&f&&r.__esModule)return r;if(16&f&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var c=2&f&&r;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((function(e){a[e]=function(){return r[e]}}));return a.default=function(){return r},n.d(o,a),o}}(),n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return 8764===e?"static/chunks/8764-593a836a579a1569.js":8109===e?"static/chunks/8109-144fa7e49c07249e.js":"static/chunks/"+e+"."+{514:"d2f047fea62adf58",541:"5993c23b9b319446",556:"bab5f5b7ff8ff120",704:"484bcd9e0a7f5626",794:"f18da82915d63734",934:"405a73de74b58e27",1088:"04d87f92e05f23c7",1608:"ec04f07937386922",1711:"ae2b84d9f5645069",1727:"af62bd633f21ee69",1748:"f63b451fd93f590b",1894:"cf8bb2590ecc3edc",1950:"c8039f3dc9bb92f5",2027:"038de301f3a28eb2",2174:"f6baa39611ece47e",2604:"250be1a3b8354750",2746:"0a838d09eabc5b43",2898:"f370a64b5af02f0b",3200:"6135ea7388cc6e9c",3525:"53072abba3ca74b8",3646:"111aba596062de80",4253:"6be69df622e36e45",4419:"c4f2007bfe36ec14",5023:"798aaaf48ec0ce89",5119:"33e08a0525159056",5289:"5d8686a37c030aeb",5488:"ea86c6ce443ba3bd",5577:"37ea4b85f4bb1a28",5670:"2bee96e50f302d0d",5806:"7abe5840ceba140e",5811:"39f4dd66d499574b",5939:"0a433dc6f963fc41",6237:"f7b1d24c812922e4",6253:"dcdff54f0dceda1f",6328:"ea13afa99496d818",6551:"432f96462db0d036",6847:"a575059dbc72db1a",7682:"b0a3567fac8e0052",7749:"91ea02a2812002e1",8137:"d6c500ddcf42e542",8824:"984bbfca761cedbf",8881:"8c985300b37d631a",9223:"882cd6b61a640a13",9343:"f765202d31d21580",9894:"c93f7cb64c560417",9941:"44044767831d9eb0"}[e]+".js"},n.miniCssF=function(e){return"static/css/3458e6a5de51a375.css"},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="_N_E:";n.l=function(r,f,o,a){if(e[r])e[r].push(f);else{var c,d;if(void 0!==o)for(var i=document.getElementsByTagName("script"),u=0;u*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--cui-gutter-x) * .5);padding-left:calc(var(--cui-gutter-x) * .5);margin-top:var(--cui-gutter-y)}.badge{--cui-badge-padding-x:0.65em;--cui-badge-padding-y:0.35em;--cui-badge-font-size:0.75em;--cui-badge-font-weight:700;--cui-badge-color:hsla(0,0%,100%,.87);--cui-badge-border-radius:0.375rem;display:inline-block;padding:var(--cui-badge-padding-y) var(--cui-badge-padding-x);font-size:var(--cui-badge-font-size);font-weight:var(--cui-badge-font-weight);line-height:1;color:var(--cui-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--cui-badge-border-radius,0)}.badge:empty{display:none}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.modal .modal-inner{--cui-modal-zindex:5;--cui-modal-width:500px;--cui-modal-padding:1rem;--cui-modal-margin:0.5rem;--cui-modal-color:unset;--cui-modal-bg:#fff;--cui-modal-border-color:var(--cui-border-color-translucent);--cui-modal-border-width:1px;--cui-modal-border-radius:0.5rem;--cui-modal-box-shadow:0 0.125rem 0.25rem rgba(0,0,21,.075);--cui-modal-inner-border-radius:calc(0.5rem - 1px);--cui-modal-header-padding-x:1rem;--cui-modal-header-padding-y:1rem;--cui-modal-header-padding:1rem 1rem;--cui-modal-header-border-color:var(--cui-border-color);--cui-modal-header-border-width:1px;--cui-modal-title-line-height:1.5;--cui-modal-footer-gap:0.5rem;--cui-modal-footer-bg: ;--cui-modal-footer-border-color:var(--cui-border-color);--cui-modal-footer-border-width:1px;position:fixed;top:0;left:0;z-index:var(--cui-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}@media (min-width:576px){.modal .modal-inner{--cui-modal-margin:1.75rem;--cui-modal-box-shadow:0 0.5rem 1rem rgba(0,0,21,.15)}}@keyframes spinner-border{to{transform:rotate(1turn)}}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentColor;opacity:.5}@keyframes placeholder-glow{50%{opacity:.2}}@keyframes placeholder-wave{to{-webkit-mask-position:-200% 0;mask-position:-200% 0}}.emphasis-smol{animation:blink-smol 3s linear infinite}.emphasis-smol:hover{animation:none;transform:scale(1.5)}@keyframes blink-smol{0%,to{opacity:1;transform:scale(1.5)}25%,75%{opacity:.75;transform:scale(1.25)}50%{opacity:0;transform:scale(1)}}.emphasis{animation:blink-guide 3s linear infinite}.emphasis:hover{animation:none}@keyframes blink-guide{0%,to{opacity:1;transform:scale(1.2)}25%,75%{opacity:.75;transform:scale(1.1)}50%{opacity:0;transform:scale(1)}}.blink{animation:blinker 1s linear infinite}@keyframes blinker{50%{opacity:0}}.icon{display:inline-block;color:inherit;text-align:center;vertical-align:-.125rem;fill:currentColor}.icon:not(.icon-c-s):not(.icon-custom-size){width:1rem;height:1rem;font-size:1rem}.border{border:var(--cui-border-width) var(--cui-border-style) var(--cui-border-color)!important}.scrollable-div::-webkit-scrollbar{width:12px}.scrollable-div::-webkit-scrollbar-track{background:#f1f1f163}.scrollable-div::-webkit-scrollbar-thumb,.scrollable-div::-webkit-scrollbar-thumb:hover{background:#ff8c56}.scrollable-div{scrollbar-width:thin;scrollbar-color:#ff5100 #f1f1f150}[data-rk] .iekbcc0{border:0;box-sizing:border-box;font-size:100%;line-height:normal;margin:0;padding:0;text-align:left;vertical-align:baseline;-webkit-tap-highlight-color:transparent}[data-rk] .iekbcc1{list-style:none}[data-rk] .iekbcc2{quotes:none}[data-rk] .iekbcc2:after,[data-rk] .iekbcc2:before{content:""}[data-rk] .iekbcc3{border-collapse:collapse;border-spacing:0}[data-rk] .iekbcc4{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-rk] .iekbcc5{outline:none}[data-rk] .iekbcc5::-moz-placeholder{opacity:1}[data-rk] .iekbcc5:-ms-input-placeholder{opacity:1}[data-rk] .iekbcc5::placeholder{opacity:1}[data-rk] .iekbcc6{background-color:transparent;color:inherit}[data-rk] .iekbcc7:disabled{opacity:1}[data-rk] .iekbcc7::-ms-expand,[data-rk] .iekbcc8::-ms-clear{display:none}[data-rk] .iekbcc8::-webkit-search-cancel-button{-webkit-appearance:none}[data-rk] .iekbcc9{background:none;cursor:pointer;text-align:left}[data-rk] .iekbcca{color:inherit;text-decoration:none}[data-rk] .ju367v0{align-items:flex-start}[data-rk] .ju367v2{align-items:flex-end}[data-rk] .ju367v4{align-items:center}[data-rk] .ju367v6{display:none}[data-rk] .ju367v6,[data-rk] .ju367v8{font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367v8{display:block}[data-rk] .ju367va{display:flex}[data-rk] .ju367vc{display:inline}[data-rk] .ju367ve{align-self:flex-start}[data-rk] .ju367vf{align-self:flex-end}[data-rk] .ju367vg{align-self:center}[data-rk] .ju367vh{background-size:cover}[data-rk] .ju367vi{border-radius:1px}[data-rk] .ju367vj{border-radius:6px}[data-rk] .ju367vk{border-radius:10px}[data-rk] .ju367vl{border-radius:13px}[data-rk] .ju367vm{border-radius:var(--rk-radii-actionButton)}[data-rk] .ju367vn{border-radius:var(--rk-radii-connectButton)}[data-rk] .ju367vo{border-radius:var(--rk-radii-menuButton)}[data-rk] .ju367vp{border-radius:var(--rk-radii-modal)}[data-rk] .ju367vq{border-radius:var(--rk-radii-modalMobile)}[data-rk] .ju367vr{border-radius:25%}[data-rk] .ju367vs{border-radius:9999px}[data-rk] .ju367vt{border-style:solid}[data-rk] .ju367vu{border-width:0}[data-rk] .ju367vv{border-width:1px}[data-rk] .ju367vw{border-width:2px}[data-rk] .ju367vx{border-width:4px}[data-rk] .ju367vy{cursor:pointer}[data-rk] .ju367vz{flex-direction:row}[data-rk] .ju367v10{flex-direction:column}[data-rk] .ju367v11{font-family:var(--rk-fonts-body)}[data-rk] .ju367v12{font-size:12px;line-height:18px}[data-rk] .ju367v13{font-size:13px;line-height:18px}[data-rk] .ju367v14{font-size:14px;line-height:18px}[data-rk] .ju367v15{font-size:16px;line-height:20px}[data-rk] .ju367v16{font-size:18px;line-height:24px}[data-rk] .ju367v17{font-size:20px;line-height:24px}[data-rk] .ju367v18{font-size:23px;line-height:29px}[data-rk] .ju367v19{font-weight:400}[data-rk] .ju367v1a{font-weight:500}[data-rk] .ju367v1b{font-weight:600}[data-rk] .ju367v1c{font-weight:700}[data-rk] .ju367v1d{font-weight:800}[data-rk] .ju367v1e{gap:0}[data-rk] .ju367v1f{gap:1px}[data-rk] .ju367v1g{gap:2px}[data-rk] .ju367v1h{gap:3px}[data-rk] .ju367v1i{gap:4px}[data-rk] .ju367v1j{gap:5px}[data-rk] .ju367v1k{gap:6px}[data-rk] .ju367v1l{gap:8px}[data-rk] .ju367v1m{gap:10px}[data-rk] .ju367v1n{gap:12px}[data-rk] .ju367v1o{gap:14px}[data-rk] .ju367v1p{gap:16px}[data-rk] .ju367v1q{gap:18px}[data-rk] .ju367v1r{gap:20px}[data-rk] .ju367v1s{gap:24px}[data-rk] .ju367v1t{gap:28px}[data-rk] .ju367v1u{gap:32px}[data-rk] .ju367v1v{gap:36px}[data-rk] .ju367v1w{gap:44px}[data-rk] .ju367v1x{gap:64px}[data-rk] .ju367v1y{gap:-1px}[data-rk] .ju367v1z{height:1px}[data-rk] .ju367v20{height:2px}[data-rk] .ju367v21{height:4px}[data-rk] .ju367v22{height:8px}[data-rk] .ju367v23{height:12px}[data-rk] .ju367v24{height:20px}[data-rk] .ju367v25{height:24px}[data-rk] .ju367v26{height:28px}[data-rk] .ju367v27{height:30px}[data-rk] .ju367v28{height:32px}[data-rk] .ju367v29{height:34px}[data-rk] .ju367v2a{height:36px}[data-rk] .ju367v2b{height:40px}[data-rk] .ju367v2c{height:44px}[data-rk] .ju367v2d{height:48px}[data-rk] .ju367v2e{height:54px}[data-rk] .ju367v2f{height:60px}[data-rk] .ju367v2g{height:200px}[data-rk] .ju367v2h{height:100%}[data-rk] .ju367v2i{height:-moz-max-content;height:max-content}[data-rk] .ju367v2j{justify-content:flex-start}[data-rk] .ju367v2k{justify-content:flex-end}[data-rk] .ju367v2l{justify-content:center}[data-rk] .ju367v2m{justify-content:space-between}[data-rk] .ju367v2n{justify-content:space-around}[data-rk] .ju367v2o{text-align:left}[data-rk] .ju367v2p{text-align:center}[data-rk] .ju367v2q{text-align:inherit}[data-rk] .ju367v2r{margin-bottom:0}[data-rk] .ju367v2s{margin-bottom:1px}[data-rk] .ju367v2t{margin-bottom:2px}[data-rk] .ju367v2u{margin-bottom:3px}[data-rk] .ju367v2v{margin-bottom:4px}[data-rk] .ju367v2w{margin-bottom:5px}[data-rk] .ju367v2x{margin-bottom:6px}[data-rk] .ju367v2y{margin-bottom:8px}[data-rk] .ju367v2z{margin-bottom:10px}[data-rk] .ju367v30{margin-bottom:12px}[data-rk] .ju367v31{margin-bottom:14px}[data-rk] .ju367v32{margin-bottom:16px}[data-rk] .ju367v33{margin-bottom:18px}[data-rk] .ju367v34{margin-bottom:20px}[data-rk] .ju367v35{margin-bottom:24px}[data-rk] .ju367v36{margin-bottom:28px}[data-rk] .ju367v37{margin-bottom:32px}[data-rk] .ju367v38{margin-bottom:36px}[data-rk] .ju367v39{margin-bottom:44px}[data-rk] .ju367v3a{margin-bottom:64px}[data-rk] .ju367v3b{margin-bottom:-1px}[data-rk] .ju367v3c{margin-left:0}[data-rk] .ju367v3d{margin-left:1px}[data-rk] .ju367v3e{margin-left:2px}[data-rk] .ju367v3f{margin-left:3px}[data-rk] .ju367v3g{margin-left:4px}[data-rk] .ju367v3h{margin-left:5px}[data-rk] .ju367v3i{margin-left:6px}[data-rk] .ju367v3j{margin-left:8px}[data-rk] .ju367v3k{margin-left:10px}[data-rk] .ju367v3l{margin-left:12px}[data-rk] .ju367v3m{margin-left:14px}[data-rk] .ju367v3n{margin-left:16px}[data-rk] .ju367v3o{margin-left:18px}[data-rk] .ju367v3p{margin-left:20px}[data-rk] .ju367v3q{margin-left:24px}[data-rk] .ju367v3r{margin-left:28px}[data-rk] .ju367v3s{margin-left:32px}[data-rk] .ju367v3t{margin-left:36px}[data-rk] .ju367v3u{margin-left:44px}[data-rk] .ju367v3v{margin-left:64px}[data-rk] .ju367v3w{margin-left:-1px}[data-rk] .ju367v3x{margin-right:0}[data-rk] .ju367v3y{margin-right:1px}[data-rk] .ju367v3z{margin-right:2px}[data-rk] .ju367v40{margin-right:3px}[data-rk] .ju367v41{margin-right:4px}[data-rk] .ju367v42{margin-right:5px}[data-rk] .ju367v43{margin-right:6px}[data-rk] .ju367v44{margin-right:8px}[data-rk] .ju367v45{margin-right:10px}[data-rk] .ju367v46{margin-right:12px}[data-rk] .ju367v47{margin-right:14px}[data-rk] .ju367v48{margin-right:16px}[data-rk] .ju367v49{margin-right:18px}[data-rk] .ju367v4a{margin-right:20px}[data-rk] .ju367v4b{margin-right:24px}[data-rk] .ju367v4c{margin-right:28px}[data-rk] .ju367v4d{margin-right:32px}[data-rk] .ju367v4e{margin-right:36px}[data-rk] .ju367v4f{margin-right:44px}[data-rk] .ju367v4g{margin-right:64px}[data-rk] .ju367v4h{margin-right:-1px}[data-rk] .ju367v4i{margin-top:0}[data-rk] .ju367v4j{margin-top:1px}[data-rk] .ju367v4k{margin-top:2px}[data-rk] .ju367v4l{margin-top:3px}[data-rk] .ju367v4m{margin-top:4px}[data-rk] .ju367v4n{margin-top:5px}[data-rk] .ju367v4o{margin-top:6px}[data-rk] .ju367v4p{margin-top:8px}[data-rk] .ju367v4q{margin-top:10px}[data-rk] .ju367v4r{margin-top:12px}[data-rk] .ju367v4s{margin-top:14px}[data-rk] .ju367v4t{margin-top:16px}[data-rk] .ju367v4u{margin-top:18px}[data-rk] .ju367v4v{margin-top:20px}[data-rk] .ju367v4w{margin-top:24px}[data-rk] .ju367v4x{margin-top:28px}[data-rk] .ju367v4y{margin-top:32px}[data-rk] .ju367v4z{margin-top:36px}[data-rk] .ju367v50{margin-top:44px}[data-rk] .ju367v51{margin-top:64px}[data-rk] .ju367v52{margin-top:-1px}[data-rk] .ju367v53{max-width:1px}[data-rk] .ju367v54{max-width:2px}[data-rk] .ju367v55{max-width:4px}[data-rk] .ju367v56{max-width:8px}[data-rk] .ju367v57{max-width:12px}[data-rk] .ju367v58{max-width:20px}[data-rk] .ju367v59{max-width:24px}[data-rk] .ju367v5a{max-width:28px}[data-rk] .ju367v5b{max-width:30px}[data-rk] .ju367v5c{max-width:32px}[data-rk] .ju367v5d{max-width:34px}[data-rk] .ju367v5e{max-width:36px}[data-rk] .ju367v5f{max-width:40px}[data-rk] .ju367v5g{max-width:44px}[data-rk] .ju367v5h{max-width:48px}[data-rk] .ju367v5i{max-width:54px}[data-rk] .ju367v5j{max-width:60px}[data-rk] .ju367v5k{max-width:200px}[data-rk] .ju367v5l{max-width:100%}[data-rk] .ju367v5m{max-width:-moz-max-content;max-width:max-content}[data-rk] .ju367v5n{min-width:1px}[data-rk] .ju367v5o{min-width:2px}[data-rk] .ju367v5p{min-width:4px}[data-rk] .ju367v5q{min-width:8px}[data-rk] .ju367v5r{min-width:12px}[data-rk] .ju367v5s{min-width:20px}[data-rk] .ju367v5t{min-width:24px}[data-rk] .ju367v5u{min-width:28px}[data-rk] .ju367v5v{min-width:30px}[data-rk] .ju367v5w{min-width:32px}[data-rk] .ju367v5x{min-width:34px}[data-rk] .ju367v5y{min-width:36px}[data-rk] .ju367v5z{min-width:40px}[data-rk] .ju367v60{min-width:44px}[data-rk] .ju367v61{min-width:48px}[data-rk] .ju367v62{min-width:54px}[data-rk] .ju367v63{min-width:60px}[data-rk] .ju367v64{min-width:200px}[data-rk] .ju367v65{min-width:100%}[data-rk] .ju367v66{min-width:-moz-max-content;min-width:max-content}[data-rk] .ju367v67{overflow:hidden}[data-rk] .ju367v68{padding-bottom:0}[data-rk] .ju367v69{padding-bottom:1px}[data-rk] .ju367v6a{padding-bottom:2px}[data-rk] .ju367v6b{padding-bottom:3px}[data-rk] .ju367v6c{padding-bottom:4px}[data-rk] .ju367v6d{padding-bottom:5px}[data-rk] .ju367v6e{padding-bottom:6px}[data-rk] .ju367v6f{padding-bottom:8px;font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367v6g{padding-bottom:10px}[data-rk] .ju367v6h{padding-bottom:12px}[data-rk] .ju367v6i{padding-bottom:14px}[data-rk] .ju367v6j{padding-bottom:16px}[data-rk] .ju367v6k{padding-bottom:18px}[data-rk] .ju367v6l{padding-bottom:20px}[data-rk] .ju367v6m{padding-bottom:24px}[data-rk] .ju367v6n{padding-bottom:28px}[data-rk] .ju367v6o{padding-bottom:32px}[data-rk] .ju367v6p{padding-bottom:36px}[data-rk] .ju367v6q{padding-bottom:44px}[data-rk] .ju367v6r{padding-bottom:64px}[data-rk] .ju367v6s{padding-bottom:-1px}[data-rk] .ju367v6t{padding-left:0}[data-rk] .ju367v6u{padding-left:1px}[data-rk] .ju367v6v{padding-left:2px}[data-rk] .ju367v6w{padding-left:3px}[data-rk] .ju367v6x{padding-left:4px}[data-rk] .ju367v6y{padding-left:5px}[data-rk] .ju367v6z{padding-left:6px}[data-rk] .ju367v70{padding-left:8px}[data-rk] .ju367v71{padding-left:10px}[data-rk] .ju367v72{padding-left:12px;font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367v73{padding-left:14px}[data-rk] .ju367v74{padding-left:16px}[data-rk] .ju367v75{padding-left:18px}[data-rk] .ju367v76{padding-left:20px}[data-rk] .ju367v77{padding-left:24px}[data-rk] .ju367v78{padding-left:28px}[data-rk] .ju367v79{padding-left:32px}[data-rk] .ju367v7a{padding-left:36px}[data-rk] .ju367v7b{padding-left:44px}[data-rk] .ju367v7c{padding-left:64px}[data-rk] .ju367v7d{padding-left:-1px}[data-rk] .ju367v7e{padding-right:0}[data-rk] .ju367v7f{padding-right:1px}[data-rk] .ju367v7g{padding-right:2px}[data-rk] .ju367v7h{padding-right:3px}[data-rk] .ju367v7i{padding-right:4px}[data-rk] .ju367v7j{padding-right:5px}[data-rk] .ju367v7k{padding-right:6px}[data-rk] .ju367v7l{padding-right:8px;font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367v7m{padding-right:10px}[data-rk] .ju367v7n{padding-right:12px}[data-rk] .ju367v7o{padding-right:14px}[data-rk] .ju367v7p{padding-right:16px}[data-rk] .ju367v7q{padding-right:18px}[data-rk] .ju367v7r{padding-right:20px}[data-rk] .ju367v7s{padding-right:24px}[data-rk] .ju367v7t{padding-right:28px}[data-rk] .ju367v7u{padding-right:32px}[data-rk] .ju367v7v{padding-right:36px}[data-rk] .ju367v7w{padding-right:44px}[data-rk] .ju367v7x{padding-right:64px}[data-rk] .ju367v7y{padding-right:-1px}[data-rk] .ju367v7z{padding-top:0}[data-rk] .ju367v80{padding-top:1px;font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367v81{padding-top:2px}[data-rk] .ju367v82{padding-top:3px}[data-rk] .ju367v83{padding-top:4px}[data-rk] .ju367v84{padding-top:5px}[data-rk] .ju367v85{padding-top:6px}[data-rk] .ju367v86{padding-top:8px;font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367v87{padding-top:10px}[data-rk] .ju367v88{padding-top:12px}[data-rk] .ju367v89{padding-top:14px}[data-rk] .ju367v8a{padding-top:16px}[data-rk] .ju367v8b{padding-top:18px}[data-rk] .ju367v8c{padding-top:20px}[data-rk] .ju367v8d{padding-top:24px}[data-rk] .ju367v8e{padding-top:28px}[data-rk] .ju367v8f{padding-top:32px}[data-rk] .ju367v8g{padding-top:36px}[data-rk] .ju367v8h{padding-top:44px}[data-rk] .ju367v8i{padding-top:64px}[data-rk] .ju367v8j{padding-top:-1px}[data-rk] .ju367v8k{position:absolute}[data-rk] .ju367v8l{position:fixed}[data-rk] .ju367v8m{position:relative;font-family:Spotnik}[data-rk] .ju367v8n{right:0}[data-rk] .ju367v8o{transition:.125s ease}[data-rk] .ju367v8p{transition:transform .125s ease}[data-rk] .ju367v8q{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-rk] .ju367v8r{width:1px}[data-rk] .ju367v8s{width:2px}[data-rk] .ju367v8t{width:4px}[data-rk] .ju367v8u{width:8px}[data-rk] .ju367v8v{width:12px}[data-rk] .ju367v8w{width:20px}[data-rk] .ju367v8x{width:24px}[data-rk] .ju367v8y{width:28px}[data-rk] .ju367v8z{width:30px}[data-rk] .ju367v90{width:32px}[data-rk] .ju367v91{width:34px}[data-rk] .ju367v92{width:36px}[data-rk] .ju367v93{width:40px}[data-rk] .ju367v94{width:44px}[data-rk] .ju367v95{width:48px}[data-rk] .ju367v96{width:54px}[data-rk] .ju367v97{width:60px}[data-rk] .ju367v98{width:200px}[data-rk] .ju367v99{width:100%}[data-rk] .ju367v9a{width:-moz-max-content;width:max-content}[data-rk] .ju367v9b{-webkit-backdrop-filter:var(--rk-blurs-modalOverlay);backdrop-filter:var(--rk-blurs-modalOverlay)}[data-rk] .ju367v9c,[data-rk] .ju367v9d:hover,[data-rk] .ju367v9e:active{background:var(--rk-colors-accentColor)}[data-rk] .ju367v9f,[data-rk] .ju367v9g:hover,[data-rk] .ju367v9h:active{background:var(--rk-colors-accentColorForeground)}[data-rk] .ju367v9i,[data-rk] .ju367v9j:hover,[data-rk] .ju367v9k:active{background:var(--rk-colors-actionButtonBorder)}[data-rk] .ju367v9l,[data-rk] .ju367v9m:hover,[data-rk] .ju367v9n:active{background:var(--rk-colors-actionButtonBorderMobile)}[data-rk] .ju367v9o,[data-rk] .ju367v9p:hover,[data-rk] .ju367v9q:active{background:var(--rk-colors-actionButtonSecondaryBackground)}[data-rk] .ju367v9r,[data-rk] .ju367v9s:hover,[data-rk] .ju367v9t:active{background:var(--rk-colors-closeButton)}[data-rk] .ju367v9u,[data-rk] .ju367v9v:hover,[data-rk] .ju367v9w:active{background:var(--rk-colors-closeButtonBackground)}[data-rk] .ju367v9x,[data-rk] .ju367v9y:hover,[data-rk] .ju367v9z:active{background:var(--rk-colors-connectButtonBackground)}[data-rk] .ju367va0,[data-rk] .ju367va1:hover,[data-rk] .ju367va2:active{background:var(--rk-colors-connectButtonBackgroundError)}[data-rk] .ju367va3,[data-rk] .ju367va4:hover,[data-rk] .ju367va5:active{background:var(--rk-colors-connectButtonInnerBackground)}[data-rk] .ju367va6,[data-rk] .ju367va7:hover,[data-rk] .ju367va8:active{background:var(--rk-colors-connectButtonText)}[data-rk] .ju367va9,[data-rk] .ju367vaa:hover,[data-rk] .ju367vab:active{background:var(--rk-colors-connectButtonTextError)}[data-rk] .ju367vac,[data-rk] .ju367vad:hover,[data-rk] .ju367vae:active{background:var(--rk-colors-connectionIndicator)}[data-rk] .ju367vaf,[data-rk] .ju367vag:hover,[data-rk] .ju367vah:active{background:var(--rk-colors-downloadBottomCardBackground)}[data-rk] .ju367vai,[data-rk] .ju367vaj:hover,[data-rk] .ju367vak:active{background:var(--rk-colors-downloadTopCardBackground)}[data-rk] .ju367val,[data-rk] .ju367vam:hover,[data-rk] .ju367van:active{background:var(--rk-colors-error)}[data-rk] .ju367vao,[data-rk] .ju367vap:hover,[data-rk] .ju367vaq:active{background:var(--rk-colors-generalBorder)}[data-rk] .ju367var,[data-rk] .ju367vas:hover,[data-rk] .ju367vat:active{background:var(--rk-colors-generalBorderDim)}[data-rk] .ju367vau,[data-rk] .ju367vav:hover,[data-rk] .ju367vaw:active{background:var(--rk-colors-menuItemBackground)}[data-rk] .ju367vax,[data-rk] .ju367vay:hover,[data-rk] .ju367vaz:active{background:var(--rk-colors-modalBackdrop)}[data-rk] .ju367vb0,[data-rk] .ju367vb1:hover,[data-rk] .ju367vb2:active{background:var(--rk-colors-modalBackground)}[data-rk] .ju367vb3,[data-rk] .ju367vb4:hover,[data-rk] .ju367vb5:active{background:var(--rk-colors-modalBorder)}[data-rk] .ju367vb6,[data-rk] .ju367vb7:hover,[data-rk] .ju367vb8:active{background:var(--rk-colors-modalText)}[data-rk] .ju367vb9,[data-rk] .ju367vba:hover,[data-rk] .ju367vbb:active{background:var(--rk-colors-modalTextDim)}[data-rk] .ju367vbc,[data-rk] .ju367vbd:hover,[data-rk] .ju367vbe:active{background:var(--rk-colors-modalTextSecondary)}[data-rk] .ju367vbf,[data-rk] .ju367vbg:hover,[data-rk] .ju367vbh:active{background:var(--rk-colors-profileAction)}[data-rk] .ju367vbi,[data-rk] .ju367vbj:hover,[data-rk] .ju367vbk:active{background:var(--rk-colors-profileActionHover)}[data-rk] .ju367vbl,[data-rk] .ju367vbm:hover,[data-rk] .ju367vbn:active{background:var(--rk-colors-profileForeground)}[data-rk] .ju367vbo,[data-rk] .ju367vbp:hover,[data-rk] .ju367vbq:active{background:var(--rk-colors-selectedOptionBorder)}[data-rk] .ju367vbr,[data-rk] .ju367vbs:hover,[data-rk] .ju367vbt:active{background:var(--rk-colors-standby)}[data-rk] .ju367vbu,[data-rk] .ju367vbv:hover,[data-rk] .ju367vbw:active{border-color:var(--rk-colors-accentColor)}[data-rk] .ju367vbx,[data-rk] .ju367vby:hover,[data-rk] .ju367vbz:active{border-color:var(--rk-colors-accentColorForeground)}[data-rk] .ju367vc0,[data-rk] .ju367vc1:hover,[data-rk] .ju367vc2:active{border-color:var(--rk-colors-actionButtonBorder)}[data-rk] .ju367vc3,[data-rk] .ju367vc4:hover,[data-rk] .ju367vc5:active{border-color:var(--rk-colors-actionButtonBorderMobile)}[data-rk] .ju367vc6,[data-rk] .ju367vc7:hover,[data-rk] .ju367vc8:active{border-color:var(--rk-colors-actionButtonSecondaryBackground)}[data-rk] .ju367vc9,[data-rk] .ju367vca:hover,[data-rk] .ju367vcb:active{border-color:var(--rk-colors-closeButton)}[data-rk] .ju367vcc,[data-rk] .ju367vcd:hover,[data-rk] .ju367vce:active{border-color:var(--rk-colors-closeButtonBackground)}[data-rk] .ju367vcf,[data-rk] .ju367vcg:hover,[data-rk] .ju367vch:active{border-color:var(--rk-colors-connectButtonBackground)}[data-rk] .ju367vci,[data-rk] .ju367vcj:hover,[data-rk] .ju367vck:active{border-color:var(--rk-colors-connectButtonBackgroundError)}[data-rk] .ju367vcl,[data-rk] .ju367vcm:hover,[data-rk] .ju367vcn:active{border-color:var(--rk-colors-connectButtonInnerBackground)}[data-rk] .ju367vco,[data-rk] .ju367vcp:hover,[data-rk] .ju367vcq:active{border-color:var(--rk-colors-connectButtonText)}[data-rk] .ju367vcr,[data-rk] .ju367vcs:hover,[data-rk] .ju367vct:active{border-color:var(--rk-colors-connectButtonTextError)}[data-rk] .ju367vcu,[data-rk] .ju367vcv:hover,[data-rk] .ju367vcw:active{border-color:var(--rk-colors-connectionIndicator)}[data-rk] .ju367vcx,[data-rk] .ju367vcy:hover,[data-rk] .ju367vcz:active{border-color:var(--rk-colors-downloadBottomCardBackground)}[data-rk] .ju367vd0,[data-rk] .ju367vd1:hover,[data-rk] .ju367vd2:active{border-color:var(--rk-colors-downloadTopCardBackground)}[data-rk] .ju367vd3,[data-rk] .ju367vd4:hover,[data-rk] .ju367vd5:active{border-color:var(--rk-colors-error)}[data-rk] .ju367vd6,[data-rk] .ju367vd7:hover,[data-rk] .ju367vd8:active{border-color:var(--rk-colors-generalBorder)}[data-rk] .ju367vd9,[data-rk] .ju367vda:hover,[data-rk] .ju367vdb:active{border-color:var(--rk-colors-generalBorderDim)}[data-rk] .ju367vdc,[data-rk] .ju367vdd:hover,[data-rk] .ju367vde:active{border-color:var(--rk-colors-menuItemBackground)}[data-rk] .ju367vdf,[data-rk] .ju367vdg:hover,[data-rk] .ju367vdh:active{border-color:var(--rk-colors-modalBackdrop)}[data-rk] .ju367vdi,[data-rk] .ju367vdj:hover,[data-rk] .ju367vdk:active{border-color:var(--rk-colors-modalBackground)}[data-rk] .ju367vdl,[data-rk] .ju367vdm:hover,[data-rk] .ju367vdn:active{border-color:var(--rk-colors-modalBorder)}[data-rk] .ju367vdo,[data-rk] .ju367vdp:hover,[data-rk] .ju367vdq:active{border-color:var(--rk-colors-modalText)}[data-rk] .ju367vdr,[data-rk] .ju367vds:hover,[data-rk] .ju367vdt:active{border-color:var(--rk-colors-modalTextDim)}[data-rk] .ju367vdu,[data-rk] .ju367vdv:hover,[data-rk] .ju367vdw:active{border-color:var(--rk-colors-modalTextSecondary)}[data-rk] .ju367vdx,[data-rk] .ju367vdy:hover,[data-rk] .ju367vdz:active{border-color:var(--rk-colors-profileAction)}[data-rk] .ju367ve0,[data-rk] .ju367ve1:hover,[data-rk] .ju367ve2:active{border-color:var(--rk-colors-profileActionHover)}[data-rk] .ju367ve3,[data-rk] .ju367ve4:hover,[data-rk] .ju367ve5:active{border-color:var(--rk-colors-profileForeground)}[data-rk] .ju367ve6,[data-rk] .ju367ve7:hover,[data-rk] .ju367ve8:active{border-color:var(--rk-colors-selectedOptionBorder)}[data-rk] .ju367ve9,[data-rk] .ju367vea:hover,[data-rk] .ju367veb:active{border-color:var(--rk-colors-standby)}[data-rk] .ju367vec,[data-rk] .ju367ved:hover,[data-rk] .ju367vee:active{box-shadow:var(--rk-shadows-connectButton)}[data-rk] .ju367vef,[data-rk] .ju367veg:hover,[data-rk] .ju367veh:active{box-shadow:var(--rk-shadows-dialog)}[data-rk] .ju367vei,[data-rk] .ju367vej:hover,[data-rk] .ju367vek:active{box-shadow:var(--rk-shadows-profileDetailsAction)}[data-rk] .ju367vel,[data-rk] .ju367vem:hover,[data-rk] .ju367ven:active{box-shadow:var(--rk-shadows-selectedOption)}[data-rk] .ju367veo,[data-rk] .ju367vep:hover,[data-rk] .ju367veq:active{box-shadow:var(--rk-shadows-selectedWallet)}[data-rk] .ju367ver,[data-rk] .ju367ves:hover,[data-rk] .ju367vet:active{box-shadow:var(--rk-shadows-walletLogo)}[data-rk] .ju367veu,[data-rk] .ju367vev:hover,[data-rk] .ju367vew:active{color:var(--rk-colors-accentColor)}[data-rk] .ju367vex,[data-rk] .ju367vey:hover,[data-rk] .ju367vez:active{color:var(--rk-colors-accentColorForeground)}[data-rk] .ju367vf0,[data-rk] .ju367vf1:hover,[data-rk] .ju367vf2:active{color:var(--rk-colors-actionButtonBorder)}[data-rk] .ju367vf3,[data-rk] .ju367vf4:hover,[data-rk] .ju367vf5:active{color:var(--rk-colors-actionButtonBorderMobile)}[data-rk] .ju367vf6,[data-rk] .ju367vf7:hover,[data-rk] .ju367vf8:active{color:var(--rk-colors-actionButtonSecondaryBackground)}[data-rk] .ju367vf9,[data-rk] .ju367vfa:hover,[data-rk] .ju367vfb:active{color:var(--rk-colors-closeButton)}[data-rk] .ju367vfc,[data-rk] .ju367vfd:hover,[data-rk] .ju367vfe:active{color:var(--rk-colors-closeButtonBackground)}[data-rk] .ju367vff,[data-rk] .ju367vfg:hover,[data-rk] .ju367vfh:active{color:var(--rk-colors-connectButtonBackground)}[data-rk] .ju367vfi,[data-rk] .ju367vfj:hover,[data-rk] .ju367vfk:active{color:var(--rk-colors-connectButtonBackgroundError)}[data-rk] .ju367vfl,[data-rk] .ju367vfm:hover,[data-rk] .ju367vfn:active{color:var(--rk-colors-connectButtonInnerBackground)}[data-rk] .ju367vfo,[data-rk] .ju367vfp:hover,[data-rk] .ju367vfq:active{color:var(--rk-colors-connectButtonText)}[data-rk] .ju367vfr,[data-rk] .ju367vfs:hover,[data-rk] .ju367vft:active{color:var(--rk-colors-connectButtonTextError)}[data-rk] .ju367vfu,[data-rk] .ju367vfv:hover,[data-rk] .ju367vfw:active{color:var(--rk-colors-connectionIndicator)}[data-rk] .ju367vfx,[data-rk] .ju367vfy:hover,[data-rk] .ju367vfz:active{color:var(--rk-colors-downloadBottomCardBackground)}[data-rk] .ju367vg0,[data-rk] .ju367vg1:hover,[data-rk] .ju367vg2:active{color:var(--rk-colors-downloadTopCardBackground)}[data-rk] .ju367vg3,[data-rk] .ju367vg4:hover,[data-rk] .ju367vg5:active{color:var(--rk-colors-error)}[data-rk] .ju367vg6,[data-rk] .ju367vg7:hover,[data-rk] .ju367vg8:active{color:var(--rk-colors-generalBorder)}[data-rk] .ju367vg9,[data-rk] .ju367vga:hover,[data-rk] .ju367vgb:active{color:var(--rk-colors-generalBorderDim)}[data-rk] .ju367vgc,[data-rk] .ju367vgd:hover,[data-rk] .ju367vge:active{color:var(--rk-colors-menuItemBackground)}[data-rk] .ju367vgf,[data-rk] .ju367vgg:hover,[data-rk] .ju367vgh:active{color:var(--rk-colors-modalBackdrop)}[data-rk] .ju367vgi,[data-rk] .ju367vgj:hover,[data-rk] .ju367vgk:active{color:var(--rk-colors-modalBackground)}[data-rk] .ju367vgl,[data-rk] .ju367vgm:hover,[data-rk] .ju367vgn:active{color:var(--rk-colors-modalBorder)}[data-rk] .ju367vgo,[data-rk] .ju367vgp:hover,[data-rk] .ju367vgq:active{color:var(--rk-colors-modalText)}[data-rk] .ju367vgr,[data-rk] .ju367vgs:hover,[data-rk] .ju367vgt:active{color:var(--rk-colors-modalTextDim)}[data-rk] .ju367vgu,[data-rk] .ju367vgv:hover,[data-rk] .ju367vgw:active{color:var(--rk-colors-modalTextSecondary)}[data-rk] .ju367vgx,[data-rk] .ju367vgy:hover,[data-rk] .ju367vgz:active{color:var(--rk-colors-profileAction)}[data-rk] .ju367vh0,[data-rk] .ju367vh1:hover,[data-rk] .ju367vh2:active{color:var(--rk-colors-profileActionHover)}[data-rk] .ju367vh3,[data-rk] .ju367vh4:hover,[data-rk] .ju367vh5:active{color:var(--rk-colors-profileForeground)}[data-rk] .ju367vh6,[data-rk] .ju367vh7:hover,[data-rk] .ju367vh8:active{color:var(--rk-colors-selectedOptionBorder)}[data-rk] .ju367vh9,[data-rk] .ju367vha:hover,[data-rk] .ju367vhb:active{color:var(--rk-colors-standby)}@media screen and (min-width:768px){[data-rk] .ju367v1{align-items:flex-start}[data-rk] .ju367v3{align-items:flex-end}[data-rk] .ju367v5{align-items:center}[data-rk] .ju367v7{display:none}[data-rk] .ju367v9{display:block;font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367vb{display:flex}[data-rk] .ju367vd{display:inline}}[data-rk] ._12cbo8i3,[data-rk] ._12cbo8i3:after{--_12cbo8i0:1;--_12cbo8i1:1}[data-rk] ._12cbo8i3:hover{transform:scale(var(--_12cbo8i0))}[data-rk] ._12cbo8i3:active{transform:scale(var(--_12cbo8i1))}[data-rk] ._12cbo8i3:active:after{content:"";bottom:-1px;display:block;left:-1px;position:absolute;right:-1px;top:-1px;transform:scale(calc((1 / var(--_12cbo8i1)) * var(--_12cbo8i0)))}[data-rk] ._12cbo8i4,[data-rk] ._12cbo8i4:after{--_12cbo8i0:1.025}[data-rk] ._12cbo8i5,[data-rk] ._12cbo8i5:after{--_12cbo8i0:1.1}[data-rk] ._12cbo8i6,[data-rk] ._12cbo8i6:after{--_12cbo8i1:0.95}[data-rk] ._12cbo8i7,[data-rk] ._12cbo8i7:after{--_12cbo8i1:0.9}@keyframes _1luule41{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}[data-rk] ._1luule42{animation:_1luule41 3s linear infinite}[data-rk] ._1luule43{background:conic-gradient(from 180deg at 50% 50%,rgba(72,146,254,0) 0deg,currentColor 282.04deg,rgba(72,146,254,0) 319.86deg,rgba(72,146,254,0) 1turn);height:21px;width:21px}@keyframes _9pm4ki0{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes _9pm4ki1{0%{opacity:0}to{opacity:1}}[data-rk] ._9pm4ki3{animation:_9pm4ki1 .15s ease;bottom:-200px;left:-200px;padding:200px;right:-200px;top:-200px;transform:translateZ(0);z-index:2147483646}[data-rk] ._9pm4ki5{animation:_9pm4ki0 .35s cubic-bezier(.15,1.15,.6,1),_9pm4ki1 .15s ease;max-width:100vw}[data-rk] ._1ckjpok1{box-sizing:content-box;max-width:100vw;width:360px}[data-rk] ._1ckjpok2{width:100vw}[data-rk] ._1ckjpok3{width:768px}[data-rk] ._1ckjpok4{min-width:368px;width:368px}[data-rk] ._1ckjpok6{border-width:0;box-sizing:border-box;width:100vw}@media screen and (min-width:768px){[data-rk] ._1ckjpok1{width:360px}[data-rk] ._1ckjpok2{width:480px}[data-rk] ._1ckjpok3{width:720px}[data-rk] ._1ckjpok4{min-width:368px;width:368px}}@media screen and (max-width:767px){[data-rk] ._1ckjpok7{border-bottom-left-radius:0;border-bottom-right-radius:0;margin-top:-200px;padding-bottom:200px;top:200px}}[data-rk] .v9horb0:hover{background:unset}[data-rk] .g5kl0l0{border-color:transparent}[data-rk] ._1vwt0cg0{background:#fff}[data-rk] ._1vwt0cg2{max-height:454px;overflow-y:auto}[data-rk] ._1vwt0cg3{min-width:246px}[data-rk] ._1vwt0cg4{min-width:100%}@media screen and (min-width:768px){[data-rk] ._1vwt0cg3{min-width:287px}}[data-rk] ._1am14410{overflow:auto;scrollbar-width:none;transform:translateZ(0)}[data-rk] ._1am14410::-webkit-scrollbar{display:none} \ No newline at end of file +@import url("https://fonts.googleapis.com/icon?family=Material+Icons");@import url("https://fonts.googleapis.com/icon?family=Material+Icons+Round");@font-face{font-family:SF Mono;src:url(https://namesys.eth.limo/_next/static/media/SF-Mono.1ef6859c.woff2) format("woff2");font-weight:400;font-style:normal;margin:0;padding:0}@font-face{font-family:Rajdhani;src:url(https://namesys.eth.limo/_next/static/media/Rajdhani.34941911.woff2) format("woff2");font-weight:400;font-style:normal;margin:0;padding:0}@font-face{font-family:SF Mono Unicode;src:url(https://namesys.eth.limo/_next/static/media/SF-Mono.1ef6859c.woff2) format("woff2");font-weight:400;font-style:normal;margin:0;padding:0;unicode-range:U+30-39}@font-face{font-family:Roboto Mono;src:url(https://namesys.eth.limo/_next/static/media/Roboto-Mono.f73e941d.woff2) format("woff2");font-weight:400;font-style:normal;margin:0;padding:0}@font-face{font-family:Bioliquid;src:url(https://namesys.eth.limo/_next/static/media/Bioliquid.f2782572.woff2) format("woff2");font-weight:400;font-style:normal;margin:0;padding:0}@font-face{font-family:Spotnik;src:url(https://namesys.eth.limo/_next/static/media/Spotnik.464dbd09.woff2) format("woff2");font-weight:400;font-style:normal;margin:0;padding:0}body{margin:0;font-family:Spotnik;font-size:22px;font-weight:400;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:4px!important;color:#000!important;background-image:linear-gradient(135deg,#422e28,#000 25%,#000);background-size:cover;min-height:100vh!important}.heading,body{background-repeat:no-repeat}.heading{background-image:url(/shadow.svg);background-size:4%;background-position-x:50%;background-position-y:10%}@media screen and (max-width:1300px){.heading{background-size:0}}.heading-alt{background-image:url(/shadow.svg);background-size:4%;background-repeat:no-repeat;background-position-x:50%;background-position-y:4.5%}@media screen and (max-width:1300px){.heading-alt{background-size:0}}.iekbcc0{max-width:197.5vw}.ju367veu{color:#fff!important}.page{max-width:100vw!important;height:auto;border-radius:4px;overflow-x:hidden;position:relative}.avatar{background-size:100% 100%;border-radius:6px;border:solid;border-width:0;width:15%}@media screen and (max-width:1030px){.avatar{width:0;padding-top:50px}}.container{align-items:center;justify-content:center;height:100%;background:transparent;animation:gradient 7s ease infinite;background-size:400% 400%;border:0 solid #646464;border-radius:10px;padding:10px 50px}@media screen and (max-width:800px){.container{padding:0}}input[type=text].input-main[type=text]{font-family:Spotnik;padding-left:15px;padding-top:15px;padding-bottom:15px;background-color:#000;border-radius:5px;font-size:18px;font-weight:700;color:#fff;outline:none;border:none;width:100%}@media screen and (max-width:800px){input[type=text].input-main[type=text]{font-size:16px;font-weight:700;padding-left:10px;padding-top:15px;padding-bottom:15px}}input[type=text]{font-family:SF Mono;padding-left:7px;padding-top:7px;padding-bottom:7px;background-color:#000;border-radius:5px;font-size:15px;color:#fff;outline:none;border:none}input:disabled{color:gray}.inputextra::-moz-placeholder{color:rgba(144,238,144,.6)}.inputextra:-ms-input-placeholder{color:rgba(144,238,144,.6)}.inputextra::placeholder{color:rgba(144,238,144,.6)}.inputextra_::-moz-placeholder{color:hsla(0,0%,100%,.7)}.inputextra_:-ms-input-placeholder{color:hsla(0,0%,100%,.7)}.inputextra_::placeholder{color:hsla(0,0%,100%,.7)}.inputextra__::-moz-placeholder{color:rgba(255,251,0,.7)}.inputextra__:-ms-input-placeholder{color:rgba(255,251,0,.7)}.inputextra__::placeholder{color:rgba(255,251,0,.7)}.inputextra___::-moz-placeholder{color:rgba(255,111,67,.5)}.inputextra___:-ms-input-placeholder{color:rgba(255,111,67,.5)}.inputextra___::placeholder{color:rgba(255,111,67,.5)}.icon-ens{align-items:center;justify-content:center;width:80.55px;height:90px;margin-bottom:8px}@media screen and (max-width:800px){.icon-ens{margin-top:10px;width:71.6px;height:80px}}.icon-ccip2{align-items:center;justify-content:center;width:60px;height:60px;margin-bottom:15px}@media screen and (max-width:800px){.icon-ccip2{margin-top:10px;width:60px;height:60px;margin-bottom:-7px}}.icon-ens-small{width:16.66px}.icon-ens-small,.icon-vision-small{align-items:center;justify-content:center;height:18px;margin-bottom:-4px;margin-left:13px}.icon-vision-small{width:18px}.icon-godid-small{width:20px;height:20px;margin-bottom:-6px;margin-left:13px}.icon,.icon-godid-small{align-items:center;justify-content:center}.icon{width:13px;height:13px;margin-bottom:-1.5px}.miui{font-size:100px}.miui-small{font-size:60px}.miui-smaller{font-size:40px}.smol{font-size:16px;margin-left:5px;color:cyan}.smoller{font-size:18px}.chonk{font-size:20px}.label{font-family:SF Mono;font-size:15px;font-weight:800;line-height:20px;display:flex;justify-content:center;margin-bottom:3px;cursor:pointer}.list-container{width:40%;margin-left:30%;border-radius:5px;border:0 solid hsla(0,0%,100%,.2);background:hsla(0,35%,60%,.15);padding:25px}@media screen and (max-width:800px){.list-container{width:99%;margin-left:.5%;padding:15px 1px}}.flex-column{flex-direction:column}.flex-column,.flex-row{display:flex;align-items:center;justify-content:center}.flex-row{flex-direction:row}.flex-column-sans-align{display:flex;flex-direction:column;justify-content:center}.flex-row-sans-align{display:flex;flex-direction:row;justify-content:center}.flex-sans-direction{display:flex;align-items:center;justify-content:center}.flex-column-sans-justify{display:flex;align-items:center;flex-direction:column}.flex-row-sans-justify{display:flex;align-items:center;flex-direction:row}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.9);z-index:9}.overlay,.overlay-content{display:flex;flex-direction:column;align-items:center;justify-content:center}.overlay-content{margin-top:220px;color:#fc6603;font-size:30px;font-weight:700}.overlay-content-alt{margin-top:220px}.search-container{width:30%;margin-left:35%;border-radius:5px;border:0 solid hsla(0,0%,100%,.2);background-image:linear-gradient(112deg,rgba(190,95,65,.2),rgba(191,41,36,.2) 48%,rgba(203,111,0,.2));padding:25px}@media screen and (max-width:800px){.search-container{width:90%;margin-left:5%}}.export-container{width:30%;margin-left:35%;border-radius:5px;border:0 solid hsla(0,0%,100%,.2);background-image:linear-gradient(112deg,rgba(190,95,65,.2),rgba(191,41,36,.2) 48%,rgba(203,111,0,.2));padding:25px}@media screen and (max-width:800px){.export-container{width:90%;margin-left:5%}}.hash-container{width:30%;margin-left:35%;border-radius:5px;border:0 solid hsla(0,0%,100%,.2);background-image:linear-gradient(112deg,rgba(190,95,65,.2),rgba(191,41,36,.2) 48%,rgba(203,111,0,.2));padding:25px}@media screen and (max-width:800px){.hash-container{width:90%;margin-left:5%}}.main-search-container{width:50%;margin-left:25%;border-radius:5px;border:0 solid hsla(0,0%,100%,.2);background-image:linear-gradient(112deg,rgba(190,95,65,.2),rgba(191,41,36,.2) 48%,rgba(203,111,0,.2));padding:35px}@media screen and (max-width:800px){.main-search-container{width:90%;margin-left:5%}}.button-empty{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;font-family:Spotnik;background:transparent;font-size:15px;font-weight:800;height:40px;padding:0;border-radius:0;align-items:left;color:cyan;transition:all .1s ease}.button-empty:disabled{background:hsla(0,0%,100%,.2);color:#fff;cursor:not-allowed}.button-empty:after{content:attr(data-tooltip);background-color:#000;color:#fff;padding:4px;border-radius:2px;position:absolute;max-width:250px;top:-40%;left:-25%;transform:translateX(-50%);white-space:nowrap;visibility:visible;opacity:0;font-size:10px;transition:opacity .2s ease-in-out}.button-empty:hover:after{visibility:visible;opacity:1}.button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;font-family:Spotnik;background-image:linear-gradient(112deg,#be5f41,#bf2924 48%,#cb6f00);font-size:15px;font-weight:800;height:40px;padding:1px 12px;border-radius:6px;align-items:left;color:#fff;transition:all .1s ease}.button:disabled{background:hsla(0,0%,100%,.2);color:#fff;cursor:not-allowed}.button:after{content:attr(data-tooltip);background-color:#000;color:#fff;padding:4px;border-radius:2px;position:absolute;top:-50%;left:-25%;max-width:250px;transform:translateX(-50%);white-space:nowrap;visibility:visible;opacity:0;font-size:10px;transition:opacity .2s ease-in-out}.button:hover:after{visibility:visible;opacity:1}.button-option{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;font-family:Spotnik;background-image:linear-gradient(112deg,#be5f41,#bf2924 48%,#cb6f00);font-size:15px;font-weight:800;height:40px;padding:1px 12px;border-radius:6px;align-items:left;color:#fff;transition:all .1s ease}.button-option:disabled{background:hsla(0,0%,100%,.2);color:#fff;cursor:not-allowed}.button-option:after{content:attr(data-tooltip);background-color:#000;color:#fff;padding:4px;border-radius:2px;position:absolute;top:-50%;left:5%;max-width:250px;transform:translateX(-50%);white-space:nowrap;visibility:visible;opacity:0;font-size:10px;transition:opacity .2s ease-in-out}.button-option:hover:after{visibility:visible;opacity:1}.clear{color:#fff}@media screen and (max-width:800px){.clear{display:none}}.footer-text{color:#fff;text-decoration:none;font-size:14px;font-weight:700;margin-bottom:-3px}.footer-text:hover{color:cyan;background-color:transparent;cursor:pointer}.button-header{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;font-family:Spotnik;background-image:linear-gradient(112deg,#be5f41,#bf2924 48%,#cb6f00);font-size:15px;font-weight:800;height:40px;padding:1px 12px;border-radius:6px;align-items:left;color:#fff;transition:all .1s ease;margin-left:10px;margin-right:10px}.button-header:disabled{background-image:linear-gradient(112deg,rgba(190,95,65,.1),rgba(191,41,36,.1) 48%,rgba(203,111,0,.1))}.button-header:after{content:attr(data-tooltip);background-color:#000;color:#fff;padding:4px;border-radius:2px;position:absolute;top:-40%;left:50%;max-width:250px;transform:translateX(-50%);white-space:nowrap;visibility:hidden;opacity:0;font-size:10px;transition:opacity .2s ease-in-out}.button-header:hover:after{visibility:visible;opacity:1}.connect-button{margin-top:-10%;padding-right:40px}@media screen and (max-width:800px){.connect-button{margin-top:-18%;padding-right:20px}}.connect-button-2{margin-top:-10%;padding-right:40px}@media screen and (max-width:800px){.connect-button-2{margin-top:-18%;padding-right:40px}}.button-tiny{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;font-family:Spotnik;font-size:15px;font-weight:800;height:40px;padding:1px;border-radius:6px;align-items:left;color:#fff;transition:all .1s ease;margin-right:10px}.button-tiny:after{content:attr(data-tooltip);background-color:#000;color:#fff;padding:4px;border-radius:2px;position:absolute;top:-15%;left:110%;max-width:250px;transform:translateX(-50%);white-space:nowrap;visibility:hidden;opacity:0;font-size:10px;transition:opacity .2s ease-in-out}.button-tiny:hover:after{visibility:visible;opacity:1}button:not(:disabled):hover{transform:scale(1.15)}h1{font-size:32px;font-family:Spotnik!important;font-weight:400;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h2{font-family:SF Mono!important}h2,h4{font-size:18px;font-weight:800}h4{font-family:Spotnik}a:link,a:visited{color:#fff;text-decoration:none;border-radius:3px}a:visited{background:hsla(0,0%,100%,.5);padding:2px 5px}@keyframes pulse{0%{opacity:0}to{opacity:"100%"}}@keyframes gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.carousal-item{display:flex;justify-content:center;text-align:center;background:hsla(0,0%,100%,0);padding:10px;border-radius:6px;font-size:30px;color:#eb8634;font-weight:700;font-family:Spotnik}@media screen and (max-width:800px){.carousal-item{font-size:20px;letter-spacing:0}}img{max-width:100%;height:auto}.content-slider{margin-top:50px;margin-bottom:170px;height:200px;width:100%;justify-content:center;align-items:center}.slider{left:50%;margin-left:-400px;height:100%;overflow:visible;position:relative}@media screen and (max-width:800px){.slider{margin-left:-200px}}.mask{overflow:hidden;height:100%}.slider ul{margin:0;padding:0;position:relative}.slider li{width:800px;height:100%;position:absolute;top:-125px;list-style:none}@media screen and (max-width:800px){.slider li{width:400px}}.slider li.anim1{animation:cycle 15s linear infinite}.slider li.anim2{animation:cycle2 15s linear infinite}.slider li.anim3{animation:cycle3 15s linear infinite}.slider li.anim4{animation:cycle4 15s linear infinite}.slider li.anim5{animation:cycle5 15s linear infinite}.slider:hover li{animation-play-state:paused}@keyframes cycle{0%{top:0}4%{top:0}16%{top:0;opacity:1;z-index:0}20%{top:125px;opacity:0;z-index:0}21%{top:-125px;opacity:0;z-index:-1}50%{top:-125px;opacity:0;z-index:-1}92%{top:-125px;opacity:0;z-index:0}96%{top:-125px;opacity:0}to{top:0;opacity:1}}@keyframes cycle2{0%{top:-125px;opacity:0}16%{top:-125px;opacity:0}20%{top:0;opacity:1}24%{top:0;opacity:1}36%{top:0;opacity:1;z-index:0}40%{top:125px;opacity:0;z-index:0}41%{top:-125px;opacity:0;z-index:-1}to{top:-125px;opacity:0;z-index:-1}}@keyframes cycle3{0%{top:-125px;opacity:0}36%{top:-125px;opacity:0}40%{top:0;opacity:1}44%{top:0;opacity:1}56%{top:0;opacity:1;z-index:0}60%{top:125px;opacity:0;z-index:0}61%{top:-125px;opacity:0;z-index:-1}to{top:-125px;opacity:0;z-index:-1}}@keyframes cycle4{0%{top:-125px;opacity:0}56%{top:-125px;opacity:0}60%{top:0;opacity:1}64%{top:0;opacity:1}76%{top:0;opacity:1;z-index:0}80%{top:125px;opacity:0;z-index:0}81%{top:-125px;opacity:0;z-index:-1}to{top:-125px;opacity:0;z-index:-1}}@keyframes cycle5{0%{top:-125px;opacity:0}76%{top:-125px;opacity:0}80%{top:0;opacity:1}84%{top:0;opacity:1}96%{top:0;opacity:1;z-index:0}to{top:125px;opacity:0;z-index:0}}:root{--cui-blue:#0d6efd;--cui-indigo:#6610f2;--cui-purple:#6f42c1;--cui-pink:#d63384;--cui-red:#dc3545;--cui-orange:#fd7e14;--cui-yellow:#ffc107;--cui-green:#198754;--cui-teal:#20c997;--cui-cyan:#0dcaf0;--cui-black:#000015;--cui-white:#fff;--cui-gray:#8a93a2;--cui-gray-dark:#636f83;--cui-gray-100:#ebedef;--cui-gray-200:#d8dbe0;--cui-gray-300:#c4c9d0;--cui-gray-400:#b1b7c1;--cui-gray-500:#9da5b1;--cui-gray-600:#8a93a2;--cui-gray-700:#768192;--cui-gray-800:#636f83;--cui-gray-900:#4f5d73;--cui-primary:#321fdb;--cui-secondary:#9da5b1;--cui-success:#2eb85c;--cui-info:#39f;--cui-warning:#f9b115;--cui-danger:#e55353;--cui-light:#ebedef;--cui-dark:#4f5d73;--cui-primary-rgb:50,31,219;--cui-secondary-rgb:157,165,177;--cui-success-rgb:46,184,92;--cui-info-rgb:51,153,255;--cui-warning-rgb:249,177,21;--cui-danger-rgb:229,83,83;--cui-light-rgb:235,237,239;--cui-dark-rgb:79,93,115;--cui-white-rgb:255,255,255;--cui-black-rgb:0,0,21;--cui-body-color-rgb:44,56,74;--cui-body-bg-rgb:255,255,255;--cui-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--cui-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--cui-gradient:linear-gradient(180deg,hsla(0,0%,100%,.15),hsla(0,0%,100%,0));--cui-body-font-family:var(--cui-font-sans-serif);--cui-body-font-size:1rem;--cui-body-font-weight:400;--cui-body-line-height:1.5;--cui-body-color:rgba(44,56,74,.95);--cui-body-bg:#fff;--cui-border-width:1px;--cui-border-style:solid;--cui-border-color:#d8dbe0;--cui-border-color-translucent:rgba(0,0,21,.175);--cui-border-radius:0.375rem;--cui-border-radius-sm:0.25rem;--cui-border-radius-lg:0.5rem;--cui-border-radius-xl:1rem;--cui-border-radius-2xl:2rem;--cui-border-radius-pill:50rem;--cui-heading-color:unset;--cui-link-color:#321fdb;--cui-link-hover-color:#2819af;--cui-code-color:#d63384;--cui-highlight-bg:#fff3cd}*,:after,:before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}hr{margin:1rem 0;color:inherit;border:0;border-top:1px solid;opacity:.25}address{font-style:normal;line-height:inherit}address,ul{margin-bottom:1rem}ul{margin-top:0}ul ul{margin-bottom:0}label{display:inline-block}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}[type=button],[type=submit],button{-moz-appearance:button;appearance:button;-webkit-appearance:button}[type=button]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-moz-appearance:textfield;appearance:textfield;-webkit-appearance:textfield}::-webkit-search-decoration{appearance:none;-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;appearance:button;-webkit-appearance:button}::file-selector-button{font:inherit;-moz-appearance:button;appearance:button;-webkit-appearance:button}[hidden]{display:none!important}.row{--cui-gutter-x:1.5rem;--cui-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--cui-gutter-y));margin-right:calc(-.5 * var(--cui-gutter-x));margin-left:calc(-.5 * var(--cui-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--cui-gutter-x) * .5);padding-left:calc(var(--cui-gutter-x) * .5);margin-top:var(--cui-gutter-y)}.badge{--cui-badge-padding-x:0.65em;--cui-badge-padding-y:0.35em;--cui-badge-font-size:0.75em;--cui-badge-font-weight:700;--cui-badge-color:hsla(0,0%,100%,.87);--cui-badge-border-radius:0.375rem;display:inline-block;padding:var(--cui-badge-padding-y) var(--cui-badge-padding-x);font-size:var(--cui-badge-font-size);font-weight:var(--cui-badge-font-weight);line-height:1;color:var(--cui-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--cui-badge-border-radius,0)}.badge:empty{display:none}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.modal .modal-inner{--cui-modal-zindex:5;--cui-modal-width:500px;--cui-modal-padding:1rem;--cui-modal-margin:0.5rem;--cui-modal-color:unset;--cui-modal-bg:#fff;--cui-modal-border-color:var(--cui-border-color-translucent);--cui-modal-border-width:1px;--cui-modal-border-radius:0.5rem;--cui-modal-box-shadow:0 0.125rem 0.25rem rgba(0,0,21,.075);--cui-modal-inner-border-radius:calc(0.5rem - 1px);--cui-modal-header-padding-x:1rem;--cui-modal-header-padding-y:1rem;--cui-modal-header-padding:1rem 1rem;--cui-modal-header-border-color:var(--cui-border-color);--cui-modal-header-border-width:1px;--cui-modal-title-line-height:1.5;--cui-modal-footer-gap:0.5rem;--cui-modal-footer-bg: ;--cui-modal-footer-border-color:var(--cui-border-color);--cui-modal-footer-border-width:1px;position:fixed;top:0;left:0;z-index:var(--cui-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}@media (min-width:576px){.modal .modal-inner{--cui-modal-margin:1.75rem;--cui-modal-box-shadow:0 0.5rem 1rem rgba(0,0,21,.15)}}@keyframes spinner-border{to{transform:rotate(1turn)}}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentColor;opacity:.5}@keyframes placeholder-glow{50%{opacity:.2}}@keyframes placeholder-wave{to{-webkit-mask-position:-200% 0;mask-position:-200% 0}}.emphasis-smol{animation:blink-smol 3s linear infinite}.emphasis-smol:hover{animation:none;transform:scale(1.5)}@keyframes blink-smol{0%,to{opacity:1;transform:scale(1.5)}25%,75%{opacity:.75;transform:scale(1.25)}50%{opacity:0;transform:scale(1)}}.emphasis{animation:blink-guide 3s linear infinite}.emphasis:hover{animation:none}@keyframes blink-guide{0%,to{opacity:1;transform:scale(1.2)}25%,75%{opacity:.75;transform:scale(1.1)}50%{opacity:0;transform:scale(1)}}.blink{animation:blinker 1s linear infinite}@keyframes blinker{50%{opacity:0}}.icon{display:inline-block;color:inherit;text-align:center;vertical-align:-.125rem;fill:currentColor}.icon:not(.icon-c-s):not(.icon-custom-size){width:1rem;height:1rem;font-size:1rem}.border{border:var(--cui-border-width) var(--cui-border-style) var(--cui-border-color)!important}.scrollable-div::-webkit-scrollbar{width:12px}.scrollable-div::-webkit-scrollbar-track{background:#f1f1f163}.scrollable-div::-webkit-scrollbar-thumb,.scrollable-div::-webkit-scrollbar-thumb:hover{background:#ff8c56}.scrollable-div{scrollbar-width:thin;scrollbar-color:#ff5100 #f1f1f150}[data-rk] .iekbcc0{border:0;box-sizing:border-box;font-size:100%;line-height:normal;margin:0;padding:0;text-align:left;vertical-align:baseline;-webkit-tap-highlight-color:transparent}[data-rk] .iekbcc1{list-style:none}[data-rk] .iekbcc2{quotes:none}[data-rk] .iekbcc2:after,[data-rk] .iekbcc2:before{content:""}[data-rk] .iekbcc3{border-collapse:collapse;border-spacing:0}[data-rk] .iekbcc4{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-rk] .iekbcc5{outline:none}[data-rk] .iekbcc5::-moz-placeholder{opacity:1}[data-rk] .iekbcc5:-ms-input-placeholder{opacity:1}[data-rk] .iekbcc5::placeholder{opacity:1}[data-rk] .iekbcc6{background-color:transparent;color:inherit}[data-rk] .iekbcc7:disabled{opacity:1}[data-rk] .iekbcc7::-ms-expand,[data-rk] .iekbcc8::-ms-clear{display:none}[data-rk] .iekbcc8::-webkit-search-cancel-button{-webkit-appearance:none}[data-rk] .iekbcc9{background:none;cursor:pointer;text-align:left}[data-rk] .iekbcca{color:inherit;text-decoration:none}[data-rk] .ju367v0{align-items:flex-start}[data-rk] .ju367v2{align-items:flex-end}[data-rk] .ju367v4{align-items:center}[data-rk] .ju367v6{display:none}[data-rk] .ju367v6,[data-rk] .ju367v8{font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367v8{display:block}[data-rk] .ju367va{display:flex}[data-rk] .ju367vc{display:inline}[data-rk] .ju367ve{align-self:flex-start}[data-rk] .ju367vf{align-self:flex-end}[data-rk] .ju367vg{align-self:center}[data-rk] .ju367vh{background-size:cover}[data-rk] .ju367vi{border-radius:1px}[data-rk] .ju367vj{border-radius:6px}[data-rk] .ju367vk{border-radius:10px}[data-rk] .ju367vl{border-radius:13px}[data-rk] .ju367vm{border-radius:var(--rk-radii-actionButton)}[data-rk] .ju367vn{border-radius:var(--rk-radii-connectButton)}[data-rk] .ju367vo{border-radius:var(--rk-radii-menuButton)}[data-rk] .ju367vp{border-radius:var(--rk-radii-modal)}[data-rk] .ju367vq{border-radius:var(--rk-radii-modalMobile)}[data-rk] .ju367vr{border-radius:25%}[data-rk] .ju367vs{border-radius:9999px}[data-rk] .ju367vt{border-style:solid}[data-rk] .ju367vu{border-width:0}[data-rk] .ju367vv{border-width:1px}[data-rk] .ju367vw{border-width:2px}[data-rk] .ju367vx{border-width:4px}[data-rk] .ju367vy{cursor:pointer}[data-rk] .ju367vz{flex-direction:row}[data-rk] .ju367v10{flex-direction:column}[data-rk] .ju367v11{font-family:var(--rk-fonts-body)}[data-rk] .ju367v12{font-size:12px;line-height:18px}[data-rk] .ju367v13{font-size:13px;line-height:18px}[data-rk] .ju367v14{font-size:14px;line-height:18px}[data-rk] .ju367v15{font-size:16px;line-height:20px}[data-rk] .ju367v16{font-size:18px;line-height:24px}[data-rk] .ju367v17{font-size:20px;line-height:24px}[data-rk] .ju367v18{font-size:23px;line-height:29px}[data-rk] .ju367v19{font-weight:400}[data-rk] .ju367v1a{font-weight:500}[data-rk] .ju367v1b{font-weight:600}[data-rk] .ju367v1c{font-weight:700}[data-rk] .ju367v1d{font-weight:800}[data-rk] .ju367v1e{gap:0}[data-rk] .ju367v1f{gap:1px}[data-rk] .ju367v1g{gap:2px}[data-rk] .ju367v1h{gap:3px}[data-rk] .ju367v1i{gap:4px}[data-rk] .ju367v1j{gap:5px}[data-rk] .ju367v1k{gap:6px}[data-rk] .ju367v1l{gap:8px}[data-rk] .ju367v1m{gap:10px}[data-rk] .ju367v1n{gap:12px}[data-rk] .ju367v1o{gap:14px}[data-rk] .ju367v1p{gap:16px}[data-rk] .ju367v1q{gap:18px}[data-rk] .ju367v1r{gap:20px}[data-rk] .ju367v1s{gap:24px}[data-rk] .ju367v1t{gap:28px}[data-rk] .ju367v1u{gap:32px}[data-rk] .ju367v1v{gap:36px}[data-rk] .ju367v1w{gap:44px}[data-rk] .ju367v1x{gap:64px}[data-rk] .ju367v1y{gap:-1px}[data-rk] .ju367v1z{height:1px}[data-rk] .ju367v20{height:2px}[data-rk] .ju367v21{height:4px}[data-rk] .ju367v22{height:8px}[data-rk] .ju367v23{height:12px}[data-rk] .ju367v24{height:20px}[data-rk] .ju367v25{height:24px}[data-rk] .ju367v26{height:28px}[data-rk] .ju367v27{height:30px}[data-rk] .ju367v28{height:32px}[data-rk] .ju367v29{height:34px}[data-rk] .ju367v2a{height:36px}[data-rk] .ju367v2b{height:40px}[data-rk] .ju367v2c{height:44px}[data-rk] .ju367v2d{height:48px}[data-rk] .ju367v2e{height:54px}[data-rk] .ju367v2f{height:60px}[data-rk] .ju367v2g{height:200px}[data-rk] .ju367v2h{height:100%}[data-rk] .ju367v2i{height:-moz-max-content;height:max-content}[data-rk] .ju367v2j{justify-content:flex-start}[data-rk] .ju367v2k{justify-content:flex-end}[data-rk] .ju367v2l{justify-content:center}[data-rk] .ju367v2m{justify-content:space-between}[data-rk] .ju367v2n{justify-content:space-around}[data-rk] .ju367v2o{text-align:left}[data-rk] .ju367v2p{text-align:center}[data-rk] .ju367v2q{text-align:inherit}[data-rk] .ju367v2r{margin-bottom:0}[data-rk] .ju367v2s{margin-bottom:1px}[data-rk] .ju367v2t{margin-bottom:2px}[data-rk] .ju367v2u{margin-bottom:3px}[data-rk] .ju367v2v{margin-bottom:4px}[data-rk] .ju367v2w{margin-bottom:5px}[data-rk] .ju367v2x{margin-bottom:6px}[data-rk] .ju367v2y{margin-bottom:8px}[data-rk] .ju367v2z{margin-bottom:10px}[data-rk] .ju367v30{margin-bottom:12px}[data-rk] .ju367v31{margin-bottom:14px}[data-rk] .ju367v32{margin-bottom:16px}[data-rk] .ju367v33{margin-bottom:18px}[data-rk] .ju367v34{margin-bottom:20px}[data-rk] .ju367v35{margin-bottom:24px}[data-rk] .ju367v36{margin-bottom:28px}[data-rk] .ju367v37{margin-bottom:32px}[data-rk] .ju367v38{margin-bottom:36px}[data-rk] .ju367v39{margin-bottom:44px}[data-rk] .ju367v3a{margin-bottom:64px}[data-rk] .ju367v3b{margin-bottom:-1px}[data-rk] .ju367v3c{margin-left:0}[data-rk] .ju367v3d{margin-left:1px}[data-rk] .ju367v3e{margin-left:2px}[data-rk] .ju367v3f{margin-left:3px}[data-rk] .ju367v3g{margin-left:4px}[data-rk] .ju367v3h{margin-left:5px}[data-rk] .ju367v3i{margin-left:6px}[data-rk] .ju367v3j{margin-left:8px}[data-rk] .ju367v3k{margin-left:10px}[data-rk] .ju367v3l{margin-left:12px}[data-rk] .ju367v3m{margin-left:14px}[data-rk] .ju367v3n{margin-left:16px}[data-rk] .ju367v3o{margin-left:18px}[data-rk] .ju367v3p{margin-left:20px}[data-rk] .ju367v3q{margin-left:24px}[data-rk] .ju367v3r{margin-left:28px}[data-rk] .ju367v3s{margin-left:32px}[data-rk] .ju367v3t{margin-left:36px}[data-rk] .ju367v3u{margin-left:44px}[data-rk] .ju367v3v{margin-left:64px}[data-rk] .ju367v3w{margin-left:-1px}[data-rk] .ju367v3x{margin-right:0}[data-rk] .ju367v3y{margin-right:1px}[data-rk] .ju367v3z{margin-right:2px}[data-rk] .ju367v40{margin-right:3px}[data-rk] .ju367v41{margin-right:4px}[data-rk] .ju367v42{margin-right:5px}[data-rk] .ju367v43{margin-right:6px}[data-rk] .ju367v44{margin-right:8px}[data-rk] .ju367v45{margin-right:10px}[data-rk] .ju367v46{margin-right:12px}[data-rk] .ju367v47{margin-right:14px}[data-rk] .ju367v48{margin-right:16px}[data-rk] .ju367v49{margin-right:18px}[data-rk] .ju367v4a{margin-right:20px}[data-rk] .ju367v4b{margin-right:24px}[data-rk] .ju367v4c{margin-right:28px}[data-rk] .ju367v4d{margin-right:32px}[data-rk] .ju367v4e{margin-right:36px}[data-rk] .ju367v4f{margin-right:44px}[data-rk] .ju367v4g{margin-right:64px}[data-rk] .ju367v4h{margin-right:-1px}[data-rk] .ju367v4i{margin-top:0}[data-rk] .ju367v4j{margin-top:1px}[data-rk] .ju367v4k{margin-top:2px}[data-rk] .ju367v4l{margin-top:3px}[data-rk] .ju367v4m{margin-top:4px}[data-rk] .ju367v4n{margin-top:5px}[data-rk] .ju367v4o{margin-top:6px}[data-rk] .ju367v4p{margin-top:8px}[data-rk] .ju367v4q{margin-top:10px}[data-rk] .ju367v4r{margin-top:12px}[data-rk] .ju367v4s{margin-top:14px}[data-rk] .ju367v4t{margin-top:16px}[data-rk] .ju367v4u{margin-top:18px}[data-rk] .ju367v4v{margin-top:20px}[data-rk] .ju367v4w{margin-top:24px}[data-rk] .ju367v4x{margin-top:28px}[data-rk] .ju367v4y{margin-top:32px}[data-rk] .ju367v4z{margin-top:36px}[data-rk] .ju367v50{margin-top:44px}[data-rk] .ju367v51{margin-top:64px}[data-rk] .ju367v52{margin-top:-1px}[data-rk] .ju367v53{max-width:1px}[data-rk] .ju367v54{max-width:2px}[data-rk] .ju367v55{max-width:4px}[data-rk] .ju367v56{max-width:8px}[data-rk] .ju367v57{max-width:12px}[data-rk] .ju367v58{max-width:20px}[data-rk] .ju367v59{max-width:24px}[data-rk] .ju367v5a{max-width:28px}[data-rk] .ju367v5b{max-width:30px}[data-rk] .ju367v5c{max-width:32px}[data-rk] .ju367v5d{max-width:34px}[data-rk] .ju367v5e{max-width:36px}[data-rk] .ju367v5f{max-width:40px}[data-rk] .ju367v5g{max-width:44px}[data-rk] .ju367v5h{max-width:48px}[data-rk] .ju367v5i{max-width:54px}[data-rk] .ju367v5j{max-width:60px}[data-rk] .ju367v5k{max-width:200px}[data-rk] .ju367v5l{max-width:100%}[data-rk] .ju367v5m{max-width:-moz-max-content;max-width:max-content}[data-rk] .ju367v5n{min-width:1px}[data-rk] .ju367v5o{min-width:2px}[data-rk] .ju367v5p{min-width:4px}[data-rk] .ju367v5q{min-width:8px}[data-rk] .ju367v5r{min-width:12px}[data-rk] .ju367v5s{min-width:20px}[data-rk] .ju367v5t{min-width:24px}[data-rk] .ju367v5u{min-width:28px}[data-rk] .ju367v5v{min-width:30px}[data-rk] .ju367v5w{min-width:32px}[data-rk] .ju367v5x{min-width:34px}[data-rk] .ju367v5y{min-width:36px}[data-rk] .ju367v5z{min-width:40px}[data-rk] .ju367v60{min-width:44px}[data-rk] .ju367v61{min-width:48px}[data-rk] .ju367v62{min-width:54px}[data-rk] .ju367v63{min-width:60px}[data-rk] .ju367v64{min-width:200px}[data-rk] .ju367v65{min-width:100%}[data-rk] .ju367v66{min-width:-moz-max-content;min-width:max-content}[data-rk] .ju367v67{overflow:hidden}[data-rk] .ju367v68{padding-bottom:0}[data-rk] .ju367v69{padding-bottom:1px}[data-rk] .ju367v6a{padding-bottom:2px}[data-rk] .ju367v6b{padding-bottom:3px}[data-rk] .ju367v6c{padding-bottom:4px}[data-rk] .ju367v6d{padding-bottom:5px}[data-rk] .ju367v6e{padding-bottom:6px}[data-rk] .ju367v6f{padding-bottom:8px;font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367v6g{padding-bottom:10px}[data-rk] .ju367v6h{padding-bottom:12px}[data-rk] .ju367v6i{padding-bottom:14px}[data-rk] .ju367v6j{padding-bottom:16px}[data-rk] .ju367v6k{padding-bottom:18px}[data-rk] .ju367v6l{padding-bottom:20px}[data-rk] .ju367v6m{padding-bottom:24px}[data-rk] .ju367v6n{padding-bottom:28px}[data-rk] .ju367v6o{padding-bottom:32px}[data-rk] .ju367v6p{padding-bottom:36px}[data-rk] .ju367v6q{padding-bottom:44px}[data-rk] .ju367v6r{padding-bottom:64px}[data-rk] .ju367v6s{padding-bottom:-1px}[data-rk] .ju367v6t{padding-left:0}[data-rk] .ju367v6u{padding-left:1px}[data-rk] .ju367v6v{padding-left:2px}[data-rk] .ju367v6w{padding-left:3px}[data-rk] .ju367v6x{padding-left:4px}[data-rk] .ju367v6y{padding-left:5px}[data-rk] .ju367v6z{padding-left:6px}[data-rk] .ju367v70{padding-left:8px}[data-rk] .ju367v71{padding-left:10px}[data-rk] .ju367v72{padding-left:12px;font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367v73{padding-left:14px}[data-rk] .ju367v74{padding-left:16px}[data-rk] .ju367v75{padding-left:18px}[data-rk] .ju367v76{padding-left:20px}[data-rk] .ju367v77{padding-left:24px}[data-rk] .ju367v78{padding-left:28px}[data-rk] .ju367v79{padding-left:32px}[data-rk] .ju367v7a{padding-left:36px}[data-rk] .ju367v7b{padding-left:44px}[data-rk] .ju367v7c{padding-left:64px}[data-rk] .ju367v7d{padding-left:-1px}[data-rk] .ju367v7e{padding-right:0}[data-rk] .ju367v7f{padding-right:1px}[data-rk] .ju367v7g{padding-right:2px}[data-rk] .ju367v7h{padding-right:3px}[data-rk] .ju367v7i{padding-right:4px}[data-rk] .ju367v7j{padding-right:5px}[data-rk] .ju367v7k{padding-right:6px}[data-rk] .ju367v7l{padding-right:8px;font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367v7m{padding-right:10px}[data-rk] .ju367v7n{padding-right:12px}[data-rk] .ju367v7o{padding-right:14px}[data-rk] .ju367v7p{padding-right:16px}[data-rk] .ju367v7q{padding-right:18px}[data-rk] .ju367v7r{padding-right:20px}[data-rk] .ju367v7s{padding-right:24px}[data-rk] .ju367v7t{padding-right:28px}[data-rk] .ju367v7u{padding-right:32px}[data-rk] .ju367v7v{padding-right:36px}[data-rk] .ju367v7w{padding-right:44px}[data-rk] .ju367v7x{padding-right:64px}[data-rk] .ju367v7y{padding-right:-1px}[data-rk] .ju367v7z{padding-top:0}[data-rk] .ju367v80{padding-top:1px;font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367v81{padding-top:2px}[data-rk] .ju367v82{padding-top:3px}[data-rk] .ju367v83{padding-top:4px}[data-rk] .ju367v84{padding-top:5px}[data-rk] .ju367v85{padding-top:6px}[data-rk] .ju367v86{padding-top:8px;font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367v87{padding-top:10px}[data-rk] .ju367v88{padding-top:12px}[data-rk] .ju367v89{padding-top:14px}[data-rk] .ju367v8a{padding-top:16px}[data-rk] .ju367v8b{padding-top:18px}[data-rk] .ju367v8c{padding-top:20px}[data-rk] .ju367v8d{padding-top:24px}[data-rk] .ju367v8e{padding-top:28px}[data-rk] .ju367v8f{padding-top:32px}[data-rk] .ju367v8g{padding-top:36px}[data-rk] .ju367v8h{padding-top:44px}[data-rk] .ju367v8i{padding-top:64px}[data-rk] .ju367v8j{padding-top:-1px}[data-rk] .ju367v8k{position:absolute}[data-rk] .ju367v8l{position:fixed}[data-rk] .ju367v8m{position:relative;font-family:Spotnik}[data-rk] .ju367v8n{right:0}[data-rk] .ju367v8o{transition:.125s ease}[data-rk] .ju367v8p{transition:transform .125s ease}[data-rk] .ju367v8q{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-rk] .ju367v8r{width:1px}[data-rk] .ju367v8s{width:2px}[data-rk] .ju367v8t{width:4px}[data-rk] .ju367v8u{width:8px}[data-rk] .ju367v8v{width:12px}[data-rk] .ju367v8w{width:20px}[data-rk] .ju367v8x{width:24px}[data-rk] .ju367v8y{width:28px}[data-rk] .ju367v8z{width:30px}[data-rk] .ju367v90{width:32px}[data-rk] .ju367v91{width:34px}[data-rk] .ju367v92{width:36px}[data-rk] .ju367v93{width:40px}[data-rk] .ju367v94{width:44px}[data-rk] .ju367v95{width:48px}[data-rk] .ju367v96{width:54px}[data-rk] .ju367v97{width:60px}[data-rk] .ju367v98{width:200px}[data-rk] .ju367v99{width:100%}[data-rk] .ju367v9a{width:-moz-max-content;width:max-content}[data-rk] .ju367v9b{-webkit-backdrop-filter:var(--rk-blurs-modalOverlay);backdrop-filter:var(--rk-blurs-modalOverlay)}[data-rk] .ju367v9c,[data-rk] .ju367v9d:hover,[data-rk] .ju367v9e:active{background:var(--rk-colors-accentColor)}[data-rk] .ju367v9f,[data-rk] .ju367v9g:hover,[data-rk] .ju367v9h:active{background:var(--rk-colors-accentColorForeground)}[data-rk] .ju367v9i,[data-rk] .ju367v9j:hover,[data-rk] .ju367v9k:active{background:var(--rk-colors-actionButtonBorder)}[data-rk] .ju367v9l,[data-rk] .ju367v9m:hover,[data-rk] .ju367v9n:active{background:var(--rk-colors-actionButtonBorderMobile)}[data-rk] .ju367v9o,[data-rk] .ju367v9p:hover,[data-rk] .ju367v9q:active{background:var(--rk-colors-actionButtonSecondaryBackground)}[data-rk] .ju367v9r,[data-rk] .ju367v9s:hover,[data-rk] .ju367v9t:active{background:var(--rk-colors-closeButton)}[data-rk] .ju367v9u,[data-rk] .ju367v9v:hover,[data-rk] .ju367v9w:active{background:var(--rk-colors-closeButtonBackground)}[data-rk] .ju367v9x,[data-rk] .ju367v9y:hover,[data-rk] .ju367v9z:active{background:var(--rk-colors-connectButtonBackground)}[data-rk] .ju367va0,[data-rk] .ju367va1:hover,[data-rk] .ju367va2:active{background:var(--rk-colors-connectButtonBackgroundError)}[data-rk] .ju367va3,[data-rk] .ju367va4:hover,[data-rk] .ju367va5:active{background:var(--rk-colors-connectButtonInnerBackground)}[data-rk] .ju367va6,[data-rk] .ju367va7:hover,[data-rk] .ju367va8:active{background:var(--rk-colors-connectButtonText)}[data-rk] .ju367va9,[data-rk] .ju367vaa:hover,[data-rk] .ju367vab:active{background:var(--rk-colors-connectButtonTextError)}[data-rk] .ju367vac,[data-rk] .ju367vad:hover,[data-rk] .ju367vae:active{background:var(--rk-colors-connectionIndicator)}[data-rk] .ju367vaf,[data-rk] .ju367vag:hover,[data-rk] .ju367vah:active{background:var(--rk-colors-downloadBottomCardBackground)}[data-rk] .ju367vai,[data-rk] .ju367vaj:hover,[data-rk] .ju367vak:active{background:var(--rk-colors-downloadTopCardBackground)}[data-rk] .ju367val,[data-rk] .ju367vam:hover,[data-rk] .ju367van:active{background:var(--rk-colors-error)}[data-rk] .ju367vao,[data-rk] .ju367vap:hover,[data-rk] .ju367vaq:active{background:var(--rk-colors-generalBorder)}[data-rk] .ju367var,[data-rk] .ju367vas:hover,[data-rk] .ju367vat:active{background:var(--rk-colors-generalBorderDim)}[data-rk] .ju367vau,[data-rk] .ju367vav:hover,[data-rk] .ju367vaw:active{background:var(--rk-colors-menuItemBackground)}[data-rk] .ju367vax,[data-rk] .ju367vay:hover,[data-rk] .ju367vaz:active{background:var(--rk-colors-modalBackdrop)}[data-rk] .ju367vb0,[data-rk] .ju367vb1:hover,[data-rk] .ju367vb2:active{background:var(--rk-colors-modalBackground)}[data-rk] .ju367vb3,[data-rk] .ju367vb4:hover,[data-rk] .ju367vb5:active{background:var(--rk-colors-modalBorder)}[data-rk] .ju367vb6,[data-rk] .ju367vb7:hover,[data-rk] .ju367vb8:active{background:var(--rk-colors-modalText)}[data-rk] .ju367vb9,[data-rk] .ju367vba:hover,[data-rk] .ju367vbb:active{background:var(--rk-colors-modalTextDim)}[data-rk] .ju367vbc,[data-rk] .ju367vbd:hover,[data-rk] .ju367vbe:active{background:var(--rk-colors-modalTextSecondary)}[data-rk] .ju367vbf,[data-rk] .ju367vbg:hover,[data-rk] .ju367vbh:active{background:var(--rk-colors-profileAction)}[data-rk] .ju367vbi,[data-rk] .ju367vbj:hover,[data-rk] .ju367vbk:active{background:var(--rk-colors-profileActionHover)}[data-rk] .ju367vbl,[data-rk] .ju367vbm:hover,[data-rk] .ju367vbn:active{background:var(--rk-colors-profileForeground)}[data-rk] .ju367vbo,[data-rk] .ju367vbp:hover,[data-rk] .ju367vbq:active{background:var(--rk-colors-selectedOptionBorder)}[data-rk] .ju367vbr,[data-rk] .ju367vbs:hover,[data-rk] .ju367vbt:active{background:var(--rk-colors-standby)}[data-rk] .ju367vbu,[data-rk] .ju367vbv:hover,[data-rk] .ju367vbw:active{border-color:var(--rk-colors-accentColor)}[data-rk] .ju367vbx,[data-rk] .ju367vby:hover,[data-rk] .ju367vbz:active{border-color:var(--rk-colors-accentColorForeground)}[data-rk] .ju367vc0,[data-rk] .ju367vc1:hover,[data-rk] .ju367vc2:active{border-color:var(--rk-colors-actionButtonBorder)}[data-rk] .ju367vc3,[data-rk] .ju367vc4:hover,[data-rk] .ju367vc5:active{border-color:var(--rk-colors-actionButtonBorderMobile)}[data-rk] .ju367vc6,[data-rk] .ju367vc7:hover,[data-rk] .ju367vc8:active{border-color:var(--rk-colors-actionButtonSecondaryBackground)}[data-rk] .ju367vc9,[data-rk] .ju367vca:hover,[data-rk] .ju367vcb:active{border-color:var(--rk-colors-closeButton)}[data-rk] .ju367vcc,[data-rk] .ju367vcd:hover,[data-rk] .ju367vce:active{border-color:var(--rk-colors-closeButtonBackground)}[data-rk] .ju367vcf,[data-rk] .ju367vcg:hover,[data-rk] .ju367vch:active{border-color:var(--rk-colors-connectButtonBackground)}[data-rk] .ju367vci,[data-rk] .ju367vcj:hover,[data-rk] .ju367vck:active{border-color:var(--rk-colors-connectButtonBackgroundError)}[data-rk] .ju367vcl,[data-rk] .ju367vcm:hover,[data-rk] .ju367vcn:active{border-color:var(--rk-colors-connectButtonInnerBackground)}[data-rk] .ju367vco,[data-rk] .ju367vcp:hover,[data-rk] .ju367vcq:active{border-color:var(--rk-colors-connectButtonText)}[data-rk] .ju367vcr,[data-rk] .ju367vcs:hover,[data-rk] .ju367vct:active{border-color:var(--rk-colors-connectButtonTextError)}[data-rk] .ju367vcu,[data-rk] .ju367vcv:hover,[data-rk] .ju367vcw:active{border-color:var(--rk-colors-connectionIndicator)}[data-rk] .ju367vcx,[data-rk] .ju367vcy:hover,[data-rk] .ju367vcz:active{border-color:var(--rk-colors-downloadBottomCardBackground)}[data-rk] .ju367vd0,[data-rk] .ju367vd1:hover,[data-rk] .ju367vd2:active{border-color:var(--rk-colors-downloadTopCardBackground)}[data-rk] .ju367vd3,[data-rk] .ju367vd4:hover,[data-rk] .ju367vd5:active{border-color:var(--rk-colors-error)}[data-rk] .ju367vd6,[data-rk] .ju367vd7:hover,[data-rk] .ju367vd8:active{border-color:var(--rk-colors-generalBorder)}[data-rk] .ju367vd9,[data-rk] .ju367vda:hover,[data-rk] .ju367vdb:active{border-color:var(--rk-colors-generalBorderDim)}[data-rk] .ju367vdc,[data-rk] .ju367vdd:hover,[data-rk] .ju367vde:active{border-color:var(--rk-colors-menuItemBackground)}[data-rk] .ju367vdf,[data-rk] .ju367vdg:hover,[data-rk] .ju367vdh:active{border-color:var(--rk-colors-modalBackdrop)}[data-rk] .ju367vdi,[data-rk] .ju367vdj:hover,[data-rk] .ju367vdk:active{border-color:var(--rk-colors-modalBackground)}[data-rk] .ju367vdl,[data-rk] .ju367vdm:hover,[data-rk] .ju367vdn:active{border-color:var(--rk-colors-modalBorder)}[data-rk] .ju367vdo,[data-rk] .ju367vdp:hover,[data-rk] .ju367vdq:active{border-color:var(--rk-colors-modalText)}[data-rk] .ju367vdr,[data-rk] .ju367vds:hover,[data-rk] .ju367vdt:active{border-color:var(--rk-colors-modalTextDim)}[data-rk] .ju367vdu,[data-rk] .ju367vdv:hover,[data-rk] .ju367vdw:active{border-color:var(--rk-colors-modalTextSecondary)}[data-rk] .ju367vdx,[data-rk] .ju367vdy:hover,[data-rk] .ju367vdz:active{border-color:var(--rk-colors-profileAction)}[data-rk] .ju367ve0,[data-rk] .ju367ve1:hover,[data-rk] .ju367ve2:active{border-color:var(--rk-colors-profileActionHover)}[data-rk] .ju367ve3,[data-rk] .ju367ve4:hover,[data-rk] .ju367ve5:active{border-color:var(--rk-colors-profileForeground)}[data-rk] .ju367ve6,[data-rk] .ju367ve7:hover,[data-rk] .ju367ve8:active{border-color:var(--rk-colors-selectedOptionBorder)}[data-rk] .ju367ve9,[data-rk] .ju367vea:hover,[data-rk] .ju367veb:active{border-color:var(--rk-colors-standby)}[data-rk] .ju367vec,[data-rk] .ju367ved:hover,[data-rk] .ju367vee:active{box-shadow:var(--rk-shadows-connectButton)}[data-rk] .ju367vef,[data-rk] .ju367veg:hover,[data-rk] .ju367veh:active{box-shadow:var(--rk-shadows-dialog)}[data-rk] .ju367vei,[data-rk] .ju367vej:hover,[data-rk] .ju367vek:active{box-shadow:var(--rk-shadows-profileDetailsAction)}[data-rk] .ju367vel,[data-rk] .ju367vem:hover,[data-rk] .ju367ven:active{box-shadow:var(--rk-shadows-selectedOption)}[data-rk] .ju367veo,[data-rk] .ju367vep:hover,[data-rk] .ju367veq:active{box-shadow:var(--rk-shadows-selectedWallet)}[data-rk] .ju367ver,[data-rk] .ju367ves:hover,[data-rk] .ju367vet:active{box-shadow:var(--rk-shadows-walletLogo)}[data-rk] .ju367veu,[data-rk] .ju367vev:hover,[data-rk] .ju367vew:active{color:var(--rk-colors-accentColor)}[data-rk] .ju367vex,[data-rk] .ju367vey:hover,[data-rk] .ju367vez:active{color:var(--rk-colors-accentColorForeground)}[data-rk] .ju367vf0,[data-rk] .ju367vf1:hover,[data-rk] .ju367vf2:active{color:var(--rk-colors-actionButtonBorder)}[data-rk] .ju367vf3,[data-rk] .ju367vf4:hover,[data-rk] .ju367vf5:active{color:var(--rk-colors-actionButtonBorderMobile)}[data-rk] .ju367vf6,[data-rk] .ju367vf7:hover,[data-rk] .ju367vf8:active{color:var(--rk-colors-actionButtonSecondaryBackground)}[data-rk] .ju367vf9,[data-rk] .ju367vfa:hover,[data-rk] .ju367vfb:active{color:var(--rk-colors-closeButton)}[data-rk] .ju367vfc,[data-rk] .ju367vfd:hover,[data-rk] .ju367vfe:active{color:var(--rk-colors-closeButtonBackground)}[data-rk] .ju367vff,[data-rk] .ju367vfg:hover,[data-rk] .ju367vfh:active{color:var(--rk-colors-connectButtonBackground)}[data-rk] .ju367vfi,[data-rk] .ju367vfj:hover,[data-rk] .ju367vfk:active{color:var(--rk-colors-connectButtonBackgroundError)}[data-rk] .ju367vfl,[data-rk] .ju367vfm:hover,[data-rk] .ju367vfn:active{color:var(--rk-colors-connectButtonInnerBackground)}[data-rk] .ju367vfo,[data-rk] .ju367vfp:hover,[data-rk] .ju367vfq:active{color:var(--rk-colors-connectButtonText)}[data-rk] .ju367vfr,[data-rk] .ju367vfs:hover,[data-rk] .ju367vft:active{color:var(--rk-colors-connectButtonTextError)}[data-rk] .ju367vfu,[data-rk] .ju367vfv:hover,[data-rk] .ju367vfw:active{color:var(--rk-colors-connectionIndicator)}[data-rk] .ju367vfx,[data-rk] .ju367vfy:hover,[data-rk] .ju367vfz:active{color:var(--rk-colors-downloadBottomCardBackground)}[data-rk] .ju367vg0,[data-rk] .ju367vg1:hover,[data-rk] .ju367vg2:active{color:var(--rk-colors-downloadTopCardBackground)}[data-rk] .ju367vg3,[data-rk] .ju367vg4:hover,[data-rk] .ju367vg5:active{color:var(--rk-colors-error)}[data-rk] .ju367vg6,[data-rk] .ju367vg7:hover,[data-rk] .ju367vg8:active{color:var(--rk-colors-generalBorder)}[data-rk] .ju367vg9,[data-rk] .ju367vga:hover,[data-rk] .ju367vgb:active{color:var(--rk-colors-generalBorderDim)}[data-rk] .ju367vgc,[data-rk] .ju367vgd:hover,[data-rk] .ju367vge:active{color:var(--rk-colors-menuItemBackground)}[data-rk] .ju367vgf,[data-rk] .ju367vgg:hover,[data-rk] .ju367vgh:active{color:var(--rk-colors-modalBackdrop)}[data-rk] .ju367vgi,[data-rk] .ju367vgj:hover,[data-rk] .ju367vgk:active{color:var(--rk-colors-modalBackground)}[data-rk] .ju367vgl,[data-rk] .ju367vgm:hover,[data-rk] .ju367vgn:active{color:var(--rk-colors-modalBorder)}[data-rk] .ju367vgo,[data-rk] .ju367vgp:hover,[data-rk] .ju367vgq:active{color:var(--rk-colors-modalText)}[data-rk] .ju367vgr,[data-rk] .ju367vgs:hover,[data-rk] .ju367vgt:active{color:var(--rk-colors-modalTextDim)}[data-rk] .ju367vgu,[data-rk] .ju367vgv:hover,[data-rk] .ju367vgw:active{color:var(--rk-colors-modalTextSecondary)}[data-rk] .ju367vgx,[data-rk] .ju367vgy:hover,[data-rk] .ju367vgz:active{color:var(--rk-colors-profileAction)}[data-rk] .ju367vh0,[data-rk] .ju367vh1:hover,[data-rk] .ju367vh2:active{color:var(--rk-colors-profileActionHover)}[data-rk] .ju367vh3,[data-rk] .ju367vh4:hover,[data-rk] .ju367vh5:active{color:var(--rk-colors-profileForeground)}[data-rk] .ju367vh6,[data-rk] .ju367vh7:hover,[data-rk] .ju367vh8:active{color:var(--rk-colors-selectedOptionBorder)}[data-rk] .ju367vh9,[data-rk] .ju367vha:hover,[data-rk] .ju367vhb:active{color:var(--rk-colors-standby)}@media screen and (min-width:768px){[data-rk] .ju367v1{align-items:flex-start}[data-rk] .ju367v3{align-items:flex-end}[data-rk] .ju367v5{align-items:center}[data-rk] .ju367v7{display:none}[data-rk] .ju367v9{display:block;font-family:SF Mono;font-weight:600;letter-spacing:0;font-size:18px}[data-rk] .ju367vb{display:flex}[data-rk] .ju367vd{display:inline}}[data-rk] ._12cbo8i3,[data-rk] ._12cbo8i3:after{--_12cbo8i0:1;--_12cbo8i1:1}[data-rk] ._12cbo8i3:hover{transform:scale(var(--_12cbo8i0))}[data-rk] ._12cbo8i3:active{transform:scale(var(--_12cbo8i1))}[data-rk] ._12cbo8i3:active:after{content:"";bottom:-1px;display:block;left:-1px;position:absolute;right:-1px;top:-1px;transform:scale(calc((1 / var(--_12cbo8i1)) * var(--_12cbo8i0)))}[data-rk] ._12cbo8i4,[data-rk] ._12cbo8i4:after{--_12cbo8i0:1.025}[data-rk] ._12cbo8i5,[data-rk] ._12cbo8i5:after{--_12cbo8i0:1.1}[data-rk] ._12cbo8i6,[data-rk] ._12cbo8i6:after{--_12cbo8i1:0.95}[data-rk] ._12cbo8i7,[data-rk] ._12cbo8i7:after{--_12cbo8i1:0.9}@keyframes _1luule41{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}[data-rk] ._1luule42{animation:_1luule41 3s linear infinite}[data-rk] ._1luule43{background:conic-gradient(from 180deg at 50% 50%,rgba(72,146,254,0) 0deg,currentColor 282.04deg,rgba(72,146,254,0) 319.86deg,rgba(72,146,254,0) 1turn);height:21px;width:21px}@keyframes _9pm4ki0{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes _9pm4ki1{0%{opacity:0}to{opacity:1}}[data-rk] ._9pm4ki3{animation:_9pm4ki1 .15s ease;bottom:-200px;left:-200px;padding:200px;right:-200px;top:-200px;transform:translateZ(0);z-index:2147483646}[data-rk] ._9pm4ki5{animation:_9pm4ki0 .35s cubic-bezier(.15,1.15,.6,1),_9pm4ki1 .15s ease;max-width:100vw}[data-rk] ._1ckjpok1{box-sizing:content-box;max-width:100vw;width:360px}[data-rk] ._1ckjpok2{width:100vw}[data-rk] ._1ckjpok3{width:768px}[data-rk] ._1ckjpok4{min-width:368px;width:368px}[data-rk] ._1ckjpok6{border-width:0;box-sizing:border-box;width:100vw}@media screen and (min-width:768px){[data-rk] ._1ckjpok1{width:360px}[data-rk] ._1ckjpok2{width:480px}[data-rk] ._1ckjpok3{width:720px}[data-rk] ._1ckjpok4{min-width:368px;width:368px}}@media screen and (max-width:767px){[data-rk] ._1ckjpok7{border-bottom-left-radius:0;border-bottom-right-radius:0;margin-top:-200px;padding-bottom:200px;top:200px}}[data-rk] .v9horb0:hover{background:unset}[data-rk] .g5kl0l0{border-color:transparent}[data-rk] ._1vwt0cg0{background:#fff}[data-rk] ._1vwt0cg2{max-height:454px;overflow-y:auto}[data-rk] ._1vwt0cg3{min-width:246px}[data-rk] ._1vwt0cg4{min-width:100%}@media screen and (min-width:768px){[data-rk] ._1vwt0cg3{min-width:287px}}[data-rk] ._1am14410{overflow:auto;scrollbar-width:none;transform:translateZ(0)}[data-rk] ._1am14410::-webkit-scrollbar{display:none} \ No newline at end of file diff --git a/out/_next/static/oKEdDSaokOxbKjibcSZIi/_buildManifest.js b/out/_next/static/oKEdDSaokOxbKjibcSZIi/_buildManifest.js new file mode 100644 index 00000000..723b476f --- /dev/null +++ b/out/_next/static/oKEdDSaokOxbKjibcSZIi/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST=function(s,c,a,f,e,t,b){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,c,a,f,e,t,b,"static/chunks/pages/index-547ce76aec519803.js"],"/_error":["static/chunks/pages/_error-4a934674346210d3.js"],"/account":[s,c,a,f,e,t,b,"static/chunks/pages/account-ae3559ecb1f387d6.js"],"/fallback":["static/chunks/pages/fallback-6fab776daa9ae5fc.js"],sortedPages:["/","/_app","/_error","/account","/fallback"]}}("static/chunks/de297ff1-639b71474d4cca8e.js","static/chunks/e97c7a19-0d10bf4e9f3c1869.js","static/chunks/8764-593a836a579a1569.js","static/chunks/6724-b954bf9a27972ff7.js","static/chunks/8109-144fa7e49c07249e.js","static/chunks/5246-750e02a737a02c02.js","static/chunks/1469-2f1e551b079174d0.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/out/_next/static/7B-6x4C0oL8E4_p07T6FF/_middlewareManifest.js b/out/_next/static/oKEdDSaokOxbKjibcSZIi/_middlewareManifest.js similarity index 100% rename from out/_next/static/7B-6x4C0oL8E4_p07T6FF/_middlewareManifest.js rename to out/_next/static/oKEdDSaokOxbKjibcSZIi/_middlewareManifest.js diff --git a/out/_next/static/7B-6x4C0oL8E4_p07T6FF/_ssgManifest.js b/out/_next/static/oKEdDSaokOxbKjibcSZIi/_ssgManifest.js similarity index 100% rename from out/_next/static/7B-6x4C0oL8E4_p07T6FF/_ssgManifest.js rename to out/_next/static/oKEdDSaokOxbKjibcSZIi/_ssgManifest.js diff --git a/out/account.html b/out/account.html index 24da8699..e08b6f12 100644 --- a/out/account.html +++ b/out/account.html @@ -1,4 +1,4 @@ -NameSys - Off-chain Records Manager
corner-account
+NameSys - Off-chain Records Manager
corner-account
@@ -44,4 +44,4 @@ -
Loading Names
0 Of 0
sourceGitHub
info_outlineHelp
\ No newline at end of file +
Loading Names
0 Of 0
sourceGitHub
info_outlineHelp
\ No newline at end of file diff --git a/out/fallback.html b/out/fallback.html index 81c86daf..d62fe30d 100644 --- a/out/fallback.html +++ b/out/fallback.html @@ -1 +1 @@ -
signal_wifi_connected_no_internet_4Your device is offline
\ No newline at end of file +
signal_wifi_connected_no_internet_4Your device is offline
\ No newline at end of file diff --git a/out/index.html b/out/index.html index 4533b78e..2a09209b 100644 --- a/out/index.html +++ b/out/index.html @@ -1,4 +1,4 @@ -NameSys - Off-Chain Records Manager
corner-index
+NameSys - Off-Chain Records Manager
corner-index
@@ -21,4 +21,4 @@ -
PLEASE WAIT
v1.1-beta
NameSys
Off-chain Records Manager


  • energy_savings_leaf

    Gasless ENS Records
  • hub

    Decentralised Records Storage on IPFS
  • recycling

    Unlimited Record Updates With IPNS
  • badge

    Dynamic Records and More


  • Enjoy ENS Hassle Free
sourceGitHub
info_outlineHelp
\ No newline at end of file +
PLEASE WAIT
v1.1-beta
NameSys
Off-chain Records Manager


  • energy_savings_leaf

    Gasless ENS Records
  • hub

    Decentralised Records Storage on IPFS
  • recycling

    Unlimited Record Updates With IPNS
  • badge

    Dynamic Records and More


  • Enjoy ENS Hassle Free
sourceGitHub
info_outlineHelp
\ No newline at end of file diff --git a/out/sw.js b/out/sw.js index f763596f..aedbf29b 100644 --- a/out/sw.js +++ b/out/sw.js @@ -1 +1 @@ -!function(){"use strict";var e={913:function(){try{self["workbox:core:6.5.4"]&&_()}catch(e){}},550:function(){try{self["workbox:expiration:6.5.4"]&&_()}catch(e){}},977:function(){try{self["workbox:precaching:6.5.4"]&&_()}catch(e){}},80:function(){try{self["workbox:routing:6.5.4"]&&_()}catch(e){}},873:function(){try{self["workbox:strategies:6.5.4"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}},i=!0;try{e[n](r,r.exports,s),i=!1}finally{i&&delete t[n]}return r.exports}!function(){s(913);const e=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}const n=new Set;const a={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},r=e=>[a.prefix,e,a.suffix].filter((e=>e&&e.length>0)).join("-"),i=e=>e||r(a.precache),o=e=>e||r(a.runtime);function c(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let h;function l(e){e.then((()=>{}))}class u{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const d=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function f(e){return new Promise((t=>setTimeout(t,e)))}function p(e,t){const s=t();return e.waitUntil(s),s}async function g(e,s){let n=null;if(e.url){n=new URL(e.url).origin}if(n!==self.location.origin)throw new t("cross-origin-copy-response",{origin:n});const a=e.clone(),r={headers:new Headers(a.headers),status:a.status,statusText:a.statusText},i=s?s(r):r,o=function(){if(void 0===h){const t=new Response("");if("body"in t)try{new Response(t.body),h=!0}catch(e){h=!1}h=!1}return h}()?a.body:await a.blob();return new Response(o,i)}let w,m;const y=new WeakMap,_=new WeakMap,v=new WeakMap,b=new WeakMap,x=new WeakMap;let R={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return _.get(e);if("objectStoreNames"===t)return e.objectStoreNames||v.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return T(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function E(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(m||(m=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),T(y.get(this))}:function(...t){return T(e.apply(k(this),t))}:function(t,...s){const n=e.call(k(this),t,...s);return v.set(n,t.sort?t.sort():[t]),T(n)}}function C(e){return"function"===typeof e?E(e):(e instanceof IDBTransaction&&function(e){if(_.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));_.set(e,t)}(e),t=e,(w||(w=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,R):e);var t}function T(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(T(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&y.set(t,e)})).catch((()=>{})),x.set(t,e),t}(e);if(b.has(e))return b.get(e);const t=C(e);return t!==e&&(b.set(e,t),x.set(t,e)),t}const k=e=>x.get(e);const L=["get","getKey","getAll","getAllKeys","count"],q=["put","add","delete","clear"],U=new Map;function D(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(U.get(t))return U.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=q.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!L.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return U.set(t,r),r}R=(e=>({...e,get:(t,s,n)=>D(t,s)||e.get(t,s,n),has:(t,s)=>!!D(t,s)||e.has(t,s)}))(R);s(550);const N="cache-entries",S=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class P{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(N,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),T(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=S(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(N,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(N,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(N).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const o of a)await s.delete(N,o.id),i.push(o.url);return i}_getId(e){return this._cacheName+"|"+S(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),o=T(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(T(i.result),e.oldVersion,e.newVersion,T(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),o.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),o}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class I{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new P(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,l(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);l(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(o){0}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){n.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===o())throw new t("expire-custom-caches-only");let s=this._cacheExpirations.get(e);return s||(s=new I(e,this._config),this._cacheExpirations.set(e,s)),s}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}s(873);function M(e){return"string"===typeof e?new Request(e):e}class O{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new u,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:s}=this;let n=M(e);if("navigate"===n.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))n=await e({request:n.clone(),event:s})}catch(i){if(i instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let e;e=await fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:r,response:e});return e}catch(o){throw a&&await this.runCallbacks("fetchDidFail",{error:o,event:s,originalRequest:a.clone(),request:r.clone()}),o}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=M(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await o({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,s){const a=M(e);await f(0);const r=await this.getCacheKey(a,"write");if(!s)throw new t("cache-put-with-no-response",{url:d(r.url)});const i=await this._ensureResponseSafeToCache(s);if(!i)return!1;const{cacheName:o,matchOptions:h}=this._strategy,l=await self.caches.open(o),u=this.hasCallback("cacheDidUpdate"),p=u?await async function(e,t,s,n){const a=c(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const o of i)if(a===c(o.url,s))return e.match(o,n)}(l,r.clone(),["__WB_REVISION__"],h):null;try{await l.put(r,u?i.clone():i)}catch(g){if(g instanceof Error)throw"QuotaExceededError"===g.name&&await async function(){for(const e of n)await e()}(),g}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:o,oldResponse:p,newResponse:i.clone(),request:r,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=M(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class K{constructor(e={}){this.cacheName=o(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new O(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,s,n){let a;await e.runCallbacks("handlerWillStart",{event:n,request:s});try{if(a=await this._handle(s,e),!a||"error"===a.type)throw new t("no-response",{url:s.url})}catch(r){if(r instanceof Error)for(const t of e.iterateCallbacks("handlerDidError"))if(a=await t({error:r,event:n,request:s}),a)break;if(!a)throw r}for(const t of e.iterateCallbacks("handlerWillRespond"))a=await t({event:n,request:s,response:a});return a}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}const W={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};class j extends K{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(W),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,s){const n=[];const a=[];let r;if(this._networkTimeoutSeconds){const{id:t,promise:i}=this._getTimeoutPromise({request:e,logs:n,handler:s});r=t,a.push(i)}const i=this._getNetworkPromise({timeoutId:r,request:e,logs:n,handler:s});a.push(i);const o=await s.waitUntil((async()=>await s.waitUntil(Promise.race(a))||await i)());if(!o)throw new t("no-response",{url:e.url});return o}_getTimeoutPromise({request:e,logs:t,handler:s}){let n;return{promise:new Promise((t=>{n=setTimeout((async()=>{t(await s.cacheMatch(e))}),1e3*this._networkTimeoutSeconds)})),id:n}}async _getNetworkPromise({timeoutId:e,request:t,logs:s,handler:n}){let a,r;try{r=await n.fetchAndCachePut(t)}catch(i){i instanceof Error&&(a=i)}return e&&clearTimeout(e),!a&&r||(r=await n.cacheMatch(t)),r}}class B extends K{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(W)}async _handle(e,s){const n=s.fetchAndCachePut(e).catch((()=>{}));s.waitUntil(n);let a,r=await s.cacheMatch(e);if(r)0;else{0;try{r=await n}catch(i){i instanceof Error&&(a=i)}}if(!r)throw new t("no-response",{url:e.url,error:a});return r}}s(80);const H=e=>e&&"object"===typeof e?e:{handle:e};class F{constructor(e,t,s="GET"){this.handler=H(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=H(e)}}class $ extends F{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class G{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return void 0;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const o=e.method;if(!i&&this._defaultHandlerMap.has(o)&&(i=this._defaultHandlerMap.get(o)),!i)return void 0;let c;try{c=i.handle({url:s,request:e,event:t,params:a})}catch(l){c=Promise.reject(l)}const h=r&&r.catchHandler;return c instanceof Promise&&(this._catchHandler||h)&&(c=c.catch((async n=>{if(h){0;try{return await h.handle({url:s,request:e,event:t,params:a})}catch(r){r instanceof Error&&(n=r)}}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n}))),c}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"===typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,H(e))}setCatchHandler(e){this._catchHandler=H(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t("unregister-route-but-not-found-with-method",{method:e.method});const s=this._routes.get(e.method).indexOf(e);if(!(s>-1))throw new t("unregister-route-route-not-registered");this._routes.get(e.method).splice(s,1)}}let Q;const V=()=>(Q||(Q=new G,Q.addFetchListener(),Q.addCacheListener()),Q);function J(e,s,n){let a;if("string"===typeof e){const t=new URL(e,location.href);0;a=new F((({url:e})=>e.href===t.href),s,n)}else if(e instanceof RegExp)a=new $(e,s,n);else if("function"===typeof e)a=new F(e,s,n);else{if(!(e instanceof F))throw new t("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=e}return V().registerRoute(a),a}s(977);function z(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:s,url:n}=e;if(!n)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!s){const e=new URL(n,location.href);return{cacheKey:e.href,url:e.href}}const a=new URL(n,location.href),r=new URL(n,location.href);return a.searchParams.set("__WB_REVISION__",s),{cacheKey:a.href,url:r.href}}class X{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class Y{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null===t||void 0===t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}class Z extends K{constructor(e={}){e.cacheName=i(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(Z.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,s){let n;const a=s.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const t=a.integrity,r=e.integrity,i=!r||r===t;if(n=await s.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||t:void 0})),t&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await s.cachePut(e,n.clone());0}}return n}async _handleInstall(e,s){this._useDefaultCacheabilityPluginIfNeeded();const n=await s.fetch(e);if(!(await s.cachePut(e,n.clone())))throw new t("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==Z.copyRedirectedCacheableResponsesPlugin&&(n===Z.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push(Z.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}Z.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},Z.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await g(e):e};class ee{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new Z({cacheName:i(e),plugins:[...t,new Y({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const s=[];for(const n of e){"string"===typeof n?s.push(n):n&&void 0===n.revision&&s.push(n.url);const{cacheKey:e,url:a}=z(n),r="string"!==typeof n&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:e});if("string"!==typeof n&&n.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==n.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(e,n.integrity)}if(this._urlsToCacheKeys.set(a,e),this._urlsToCacheModes.set(a,r),s.length>0){const e=`Workbox is precaching URLs without revision info: ${s.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return p(e,(async()=>{const t=new X;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return p(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const s=this.getCacheKeyForURL(e);if(!s)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:s},t.params),this.strategy.handle(t))}}let te;const se=()=>(te||(te=new ee),te);class ne extends F{constructor(e,t){super((({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}function ae(e){return se().matchPrecache(e)}self.skipWaiting(),self.addEventListener("activate",(()=>self.clients.claim()));var re,ie,oe=[{'revision':'9bbf19a123fd61fe5c210e151c0328cc','url':'/Bioliquid.woff2'},{'revision':'962c1a8b020dac15baf9aa20a07d933c','url':'/Rajdhani.woff2'},{'revision':'ea0d73166b7edccfe1c3c4f75ddae0a3','url':'/Roboto-Mono.woff2'},{'revision':'0667a32587cc27bbdbadc70314c7bb14','url':'/SF-Mono.woff2'},{'revision':'e2fcb2a0f6b0be3fcc78264dbe957f29','url':'/Spotnik.woff2'},{'revision':'faa36e148f215d429b892500c07e2d5e','url':'/_next/static/7B-6x4C0oL8E4_p07T6FF/_buildManifest.js'},{'revision':'fb2823d66b3e778e04a3f681d0d2fb19','url':'/_next/static/7B-6x4C0oL8E4_p07T6FF/_middlewareManifest.js'},{'revision':'b6652df95db52feb4daf4eca35380933','url':'/_next/static/7B-6x4C0oL8E4_p07T6FF/_ssgManifest.js'},{'revision':'04d87f92e05f23c7','url':'/_next/static/chunks/1088.04d87f92e05f23c7.js'},{'revision':'3f9839cb080aea51','url':'/_next/static/chunks/1469-3f9839cb080aea51.js'},{'revision':'ec04f07937386922','url':'/_next/static/chunks/1608.ec04f07937386922.js'},{'revision':'ae2b84d9f5645069','url':'/_next/static/chunks/1711.ae2b84d9f5645069.js'},{'revision':'af62bd633f21ee69','url':'/_next/static/chunks/1727.af62bd633f21ee69.js'},{'revision':'f63b451fd93f590b','url':'/_next/static/chunks/1748.f63b451fd93f590b.js'},{'revision':'cf8bb2590ecc3edc','url':'/_next/static/chunks/1894.cf8bb2590ecc3edc.js'},{'revision':'c8039f3dc9bb92f5','url':'/_next/static/chunks/1950.c8039f3dc9bb92f5.js'},{'revision':'038de301f3a28eb2','url':'/_next/static/chunks/2027.038de301f3a28eb2.js'},{'revision':'250be1a3b8354750','url':'/_next/static/chunks/2604.250be1a3b8354750.js'},{'revision':'0a838d09eabc5b43','url':'/_next/static/chunks/2746.0a838d09eabc5b43.js'},{'revision':'f370a64b5af02f0b','url':'/_next/static/chunks/2898.f370a64b5af02f0b.js'},{'revision':'6135ea7388cc6e9c','url':'/_next/static/chunks/3200.6135ea7388cc6e9c.js'},{'revision':'541ec2729b5b05cf','url':'/_next/static/chunks/3482-541ec2729b5b05cf.js'},{'revision':'53072abba3ca74b8','url':'/_next/static/chunks/3525.53072abba3ca74b8.js'},{'revision':'111aba596062de80','url':'/_next/static/chunks/3646.111aba596062de80.js'},{'revision':'6be69df622e36e45','url':'/_next/static/chunks/4253.6be69df622e36e45.js'},{'revision':'c4f2007bfe36ec14','url':'/_next/static/chunks/4419.c4f2007bfe36ec14.js'},{'revision':'798aaaf48ec0ce89','url':'/_next/static/chunks/5023.798aaaf48ec0ce89.js'},{'revision':'33e08a0525159056','url':'/_next/static/chunks/5119.33e08a0525159056.js'},{'revision':'d2f047fea62adf58','url':'/_next/static/chunks/514.d2f047fea62adf58.js'},{'revision':'5d8686a37c030aeb','url':'/_next/static/chunks/5289.5d8686a37c030aeb.js'},{'revision':'5993c23b9b319446','url':'/_next/static/chunks/541.5993c23b9b319446.js'},{'revision':'ea86c6ce443ba3bd','url':'/_next/static/chunks/5488.ea86c6ce443ba3bd.js'},{'revision':'37ea4b85f4bb1a28','url':'/_next/static/chunks/5577.37ea4b85f4bb1a28.js'},{'revision':'2bee96e50f302d0d','url':'/_next/static/chunks/5670.2bee96e50f302d0d.js'},{'revision':'7abe5840ceba140e','url':'/_next/static/chunks/5806.7abe5840ceba140e.js'},{'revision':'39f4dd66d499574b','url':'/_next/static/chunks/5811.39f4dd66d499574b.js'},{'revision':'0a433dc6f963fc41','url':'/_next/static/chunks/5939.0a433dc6f963fc41.js'},{'revision':'f7b1d24c812922e4','url':'/_next/static/chunks/6237.f7b1d24c812922e4.js'},{'revision':'dcdff54f0dceda1f','url':'/_next/static/chunks/6253.dcdff54f0dceda1f.js'},{'revision':'ea13afa99496d818','url':'/_next/static/chunks/6328.ea13afa99496d818.js'},{'revision':'432f96462db0d036','url':'/_next/static/chunks/6551.432f96462db0d036.js'},{'revision':'a575059dbc72db1a','url':'/_next/static/chunks/6847.a575059dbc72db1a.js'},{'revision':'484bcd9e0a7f5626','url':'/_next/static/chunks/704.484bcd9e0a7f5626.js'},{'revision':'b0a3567fac8e0052','url':'/_next/static/chunks/7682.b0a3567fac8e0052.js'},{'revision':'91ea02a2812002e1','url':'/_next/static/chunks/7749.91ea02a2812002e1.js'},{'revision':'f18da82915d63734','url':'/_next/static/chunks/794.f18da82915d63734.js'},{'revision':'144fa7e49c07249e','url':'/_next/static/chunks/8109-144fa7e49c07249e.js'},{'revision':'d6c500ddcf42e542','url':'/_next/static/chunks/8137.d6c500ddcf42e542.js'},{'revision':'593a836a579a1569','url':'/_next/static/chunks/8764-593a836a579a1569.js'},{'revision':'984bbfca761cedbf','url':'/_next/static/chunks/8824.984bbfca761cedbf.js'},{'revision':'8c985300b37d631a','url':'/_next/static/chunks/8881.8c985300b37d631a.js'},{'revision':'882cd6b61a640a13','url':'/_next/static/chunks/9223.882cd6b61a640a13.js'},{'revision':'405a73de74b58e27','url':'/_next/static/chunks/934.405a73de74b58e27.js'},{'revision':'f765202d31d21580','url':'/_next/static/chunks/9343.f765202d31d21580.js'},{'revision':'c93f7cb64c560417','url':'/_next/static/chunks/9894.c93f7cb64c560417.js'},{'revision':'44044767831d9eb0','url':'/_next/static/chunks/9941.44044767831d9eb0.js'},{'revision':'639b71474d4cca8e','url':'/_next/static/chunks/de297ff1-639b71474d4cca8e.js'},{'revision':'0d10bf4e9f3c1869','url':'/_next/static/chunks/e97c7a19-0d10bf4e9f3c1869.js'},{'revision':'28712122b8f24e0e','url':'/_next/static/chunks/framework-28712122b8f24e0e.js'},{'revision':'235b4afd80b524a5','url':'/_next/static/chunks/main-235b4afd80b524a5.js'},{'revision':'1f4b9b779e80c94b','url':'/_next/static/chunks/pages/_app-1f4b9b779e80c94b.js'},{'revision':'4a934674346210d3','url':'/_next/static/chunks/pages/_error-4a934674346210d3.js'},{'revision':'e36a6a73785e98e0','url':'/_next/static/chunks/pages/account-e36a6a73785e98e0.js'},{'revision':'6fab776daa9ae5fc','url':'/_next/static/chunks/pages/fallback-6fab776daa9ae5fc.js'},{'revision':'6b71d8ff8ed1ec2b','url':'/_next/static/chunks/pages/index-6b71d8ff8ed1ec2b.js'},{'revision':'99442aec5788bccac9b2f0ead2afdd6b','url':'/_next/static/chunks/polyfills-5cd94c89d3acac5f.js'},{'revision':'48b731e940c7534a','url':'/_next/static/chunks/webpack-48b731e940c7534a.js'},{'revision':'3458e6a5de51a375','url':'/_next/static/css/3458e6a5de51a375.css'},{'revision':'f2782572','url':'/_next/static/media/Bioliquid.f2782572.woff2'},{'revision':'34941911','url':'/_next/static/media/Rajdhani.34941911.woff2'},{'revision':'f73e941d','url':'/_next/static/media/Roboto-Mono.f73e941d.woff2'},{'revision':'1ef6859c','url':'/_next/static/media/SF-Mono.1ef6859c.woff2'},{'revision':'464dbd09','url':'/_next/static/media/Spotnik.464dbd09.woff2'},{'revision':'933c96f543ca515972c6d217d0306c71','url':'/ens-red.png'},{'revision':'aa858b65b4bccd0b8b171b7381782b54','url':'/ens-vision.png'},{'revision':'6d1fe7b883e5cee5559899a921e1191d','url':'/ens-white.png'},{'revision':'649aaa4e91cad7bb65932962cd7df11a','url':'/ens.png'},{'revision':'e21260efeb5ea2999269530516c5d71a','url':'/eth-dark.png'},{'revision':'7871856f87888053a7906446e0bed261','url':'/eth-red.png'},{'revision':'16f3a5485241d8b9e632f2aa53a6512c','url':'/eth.png'},{'revision':'a1bec2f2792cf6cfb340955d6b4cdb24','url':'/godid.svg'},{'revision':'fee4a5f8e0a922dc9b7b86278ade220e','url':'/logo.png'},{'revision':'b1abc504789fbd3d9e0e827c78443322','url':'/manifest.json'},{'revision':'7ac4d0e9806b2dbdc0b08f4c22a5bc35','url':'/readme/GUIDE.md'},{'revision':'ccf294a28856da3ea777c2daef9ef073','url':'/readme/github-markdown.min.css'},{'revision':'201b1c8cd745a48c260d0f57b53f5ce8','url':'/readme/index.js'},{'revision':'cf2fbbf84281d9ecbffb4993203d543b','url':'/readme/jquery.min.js'},{'revision':'ec7a634ecb477777ec6b6ca434b455ae','url':'/readme/query.js'},{'revision':'80362c5a131a99766e04f5ed50fddedf','url':'/readme/readme.htm'},{'revision':'f998a0f83800c6d1a754308b830ee998','url':'/readme/style.css'},{'revision':'77cd19437dced1bc1e3852c71134faaf','url':'/readme/theme.min.css'},{'revision':'06c2ab8e193a2de3408319058e0a7639','url':'/readme/zero-md.min.js'},{'revision':'1ddad315b35daeb40be0f5fd3b3922a6','url':'/shadow.svg'},{'revision':'a9f80d8d245b051a96c9ee42c3cc6316','url':'/sw.js'}];oe.push({url:"/fallback",revision:"1234567890"}),function(e){se().precache(e)}(oe),function(e){const t=se();J(new ne(t,e))}(re),self.addEventListener("activate",(e=>{const t=i();e.waitUntil((async(e,t="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(t)&&s.includes(self.registration.scope)&&s!==e));return await Promise.all(s.map((e=>self.caches.delete(e)))),s})(t).then((e=>{})))})),J("/",new j({cacheName:"start-url",plugins:[new A({maxEntries:1,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/^https:\/\/fonts\.(?:googleapis|gstatic)\.com\/.*/i,new class extends K{async _handle(e,s){let n,a=await s.cacheMatch(e);if(a)0;else{0;try{a=await s.fetchAndCachePut(e)}catch(r){r instanceof Error&&(n=r)}0}if(!a)throw new t("no-response",{url:e.url,error:n});return a}}({cacheName:"google-fonts",plugins:[new A({maxEntries:4,maxAgeSeconds:31536e3,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new B({cacheName:"static-font-assets",plugins:[new A({maxEntries:4,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new class extends K{constructor(e={}){super(e),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,s){let n,a;try{const t=[s.fetch(e)];if(this._networkTimeoutSeconds){const e=f(1e3*this._networkTimeoutSeconds);t.push(e)}if(a=await Promise.race(t),!a)throw new Error(`Timed out the network response after ${this._networkTimeoutSeconds} seconds.`)}catch(r){r instanceof Error&&(n=r)}if(!a)throw new t("no-response",{url:e.url,error:n});return a}}({cacheName:"static-image-assets",plugins:[new A({maxEntries:64,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:js)$/i,new B({cacheName:"static-js-assets",plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:css|less)$/i,new B({cacheName:"static-style-assets",plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:json|xml|csv)$/i,new j({cacheName:"static-data-assets",plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\/api\/.*$/i,new j({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new A({maxEntries:16,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/.*/i,new j({cacheName:"others",networkTimeoutSeconds:10,plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),ie=new B,V().setDefaultHandler(ie),function(e){V().setCatchHandler(e)}((function(e){switch(e.event.request.destination){case"document":return ae("/fallback");case"image":return ae("/static/images/fallback.png");default:return Response.error()}}))}()}(); \ No newline at end of file +!function(){"use strict";var e={913:function(){try{self["workbox:core:6.5.4"]&&_()}catch(e){}},550:function(){try{self["workbox:expiration:6.5.4"]&&_()}catch(e){}},977:function(){try{self["workbox:precaching:6.5.4"]&&_()}catch(e){}},80:function(){try{self["workbox:routing:6.5.4"]&&_()}catch(e){}},873:function(){try{self["workbox:strategies:6.5.4"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}},i=!0;try{e[n](r,r.exports,s),i=!1}finally{i&&delete t[n]}return r.exports}!function(){s(913);const e=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}const n=new Set;const a={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},r=e=>[a.prefix,e,a.suffix].filter((e=>e&&e.length>0)).join("-"),i=e=>e||r(a.precache),o=e=>e||r(a.runtime);function c(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let h;function l(e){e.then((()=>{}))}class u{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const d=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function f(e){return new Promise((t=>setTimeout(t,e)))}function p(e,t){const s=t();return e.waitUntil(s),s}async function g(e,s){let n=null;if(e.url){n=new URL(e.url).origin}if(n!==self.location.origin)throw new t("cross-origin-copy-response",{origin:n});const a=e.clone(),r={headers:new Headers(a.headers),status:a.status,statusText:a.statusText},i=s?s(r):r,o=function(){if(void 0===h){const t=new Response("");if("body"in t)try{new Response(t.body),h=!0}catch(e){h=!1}h=!1}return h}()?a.body:await a.blob();return new Response(o,i)}let w,m;const y=new WeakMap,_=new WeakMap,v=new WeakMap,b=new WeakMap,x=new WeakMap;let R={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return _.get(e);if("objectStoreNames"===t)return e.objectStoreNames||v.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return T(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function E(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(m||(m=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),T(y.get(this))}:function(...t){return T(e.apply(k(this),t))}:function(t,...s){const n=e.call(k(this),t,...s);return v.set(n,t.sort?t.sort():[t]),T(n)}}function C(e){return"function"===typeof e?E(e):(e instanceof IDBTransaction&&function(e){if(_.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));_.set(e,t)}(e),t=e,(w||(w=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,R):e);var t}function T(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(T(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&y.set(t,e)})).catch((()=>{})),x.set(t,e),t}(e);if(b.has(e))return b.get(e);const t=C(e);return t!==e&&(b.set(e,t),x.set(t,e)),t}const k=e=>x.get(e);const L=["get","getKey","getAll","getAllKeys","count"],q=["put","add","delete","clear"],U=new Map;function D(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(U.get(t))return U.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=q.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!L.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return U.set(t,r),r}R=(e=>({...e,get:(t,s,n)=>D(t,s)||e.get(t,s,n),has:(t,s)=>!!D(t,s)||e.has(t,s)}))(R);s(550);const N="cache-entries",S=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class P{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(N,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),T(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=S(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(N,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(N,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(N).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const o of a)await s.delete(N,o.id),i.push(o.url);return i}_getId(e){return this._cacheName+"|"+S(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),o=T(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(T(i.result),e.oldVersion,e.newVersion,T(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),o.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),o}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class I{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new P(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,l(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);l(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(o){0}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){n.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===o())throw new t("expire-custom-caches-only");let s=this._cacheExpirations.get(e);return s||(s=new I(e,this._config),this._cacheExpirations.set(e,s)),s}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}s(873);function M(e){return"string"===typeof e?new Request(e):e}class O{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new u,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:s}=this;let n=M(e);if("navigate"===n.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))n=await e({request:n.clone(),event:s})}catch(i){if(i instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let e;e=await fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:r,response:e});return e}catch(o){throw a&&await this.runCallbacks("fetchDidFail",{error:o,event:s,originalRequest:a.clone(),request:r.clone()}),o}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=M(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await o({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,s){const a=M(e);await f(0);const r=await this.getCacheKey(a,"write");if(!s)throw new t("cache-put-with-no-response",{url:d(r.url)});const i=await this._ensureResponseSafeToCache(s);if(!i)return!1;const{cacheName:o,matchOptions:h}=this._strategy,l=await self.caches.open(o),u=this.hasCallback("cacheDidUpdate"),p=u?await async function(e,t,s,n){const a=c(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const o of i)if(a===c(o.url,s))return e.match(o,n)}(l,r.clone(),["__WB_REVISION__"],h):null;try{await l.put(r,u?i.clone():i)}catch(g){if(g instanceof Error)throw"QuotaExceededError"===g.name&&await async function(){for(const e of n)await e()}(),g}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:o,oldResponse:p,newResponse:i.clone(),request:r,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=M(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class K{constructor(e={}){this.cacheName=o(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new O(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,s,n){let a;await e.runCallbacks("handlerWillStart",{event:n,request:s});try{if(a=await this._handle(s,e),!a||"error"===a.type)throw new t("no-response",{url:s.url})}catch(r){if(r instanceof Error)for(const t of e.iterateCallbacks("handlerDidError"))if(a=await t({error:r,event:n,request:s}),a)break;if(!a)throw r}for(const t of e.iterateCallbacks("handlerWillRespond"))a=await t({event:n,request:s,response:a});return a}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}const W={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};class j extends K{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(W),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,s){const n=[];const a=[];let r;if(this._networkTimeoutSeconds){const{id:t,promise:i}=this._getTimeoutPromise({request:e,logs:n,handler:s});r=t,a.push(i)}const i=this._getNetworkPromise({timeoutId:r,request:e,logs:n,handler:s});a.push(i);const o=await s.waitUntil((async()=>await s.waitUntil(Promise.race(a))||await i)());if(!o)throw new t("no-response",{url:e.url});return o}_getTimeoutPromise({request:e,logs:t,handler:s}){let n;return{promise:new Promise((t=>{n=setTimeout((async()=>{t(await s.cacheMatch(e))}),1e3*this._networkTimeoutSeconds)})),id:n}}async _getNetworkPromise({timeoutId:e,request:t,logs:s,handler:n}){let a,r;try{r=await n.fetchAndCachePut(t)}catch(i){i instanceof Error&&(a=i)}return e&&clearTimeout(e),!a&&r||(r=await n.cacheMatch(t)),r}}class B extends K{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(W)}async _handle(e,s){const n=s.fetchAndCachePut(e).catch((()=>{}));s.waitUntil(n);let a,r=await s.cacheMatch(e);if(r)0;else{0;try{r=await n}catch(i){i instanceof Error&&(a=i)}}if(!r)throw new t("no-response",{url:e.url,error:a});return r}}s(80);const H=e=>e&&"object"===typeof e?e:{handle:e};class F{constructor(e,t,s="GET"){this.handler=H(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=H(e)}}class $ extends F{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class G{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return void 0;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const o=e.method;if(!i&&this._defaultHandlerMap.has(o)&&(i=this._defaultHandlerMap.get(o)),!i)return void 0;let c;try{c=i.handle({url:s,request:e,event:t,params:a})}catch(l){c=Promise.reject(l)}const h=r&&r.catchHandler;return c instanceof Promise&&(this._catchHandler||h)&&(c=c.catch((async n=>{if(h){0;try{return await h.handle({url:s,request:e,event:t,params:a})}catch(r){r instanceof Error&&(n=r)}}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n}))),c}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"===typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,H(e))}setCatchHandler(e){this._catchHandler=H(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t("unregister-route-but-not-found-with-method",{method:e.method});const s=this._routes.get(e.method).indexOf(e);if(!(s>-1))throw new t("unregister-route-route-not-registered");this._routes.get(e.method).splice(s,1)}}let Q;const V=()=>(Q||(Q=new G,Q.addFetchListener(),Q.addCacheListener()),Q);function J(e,s,n){let a;if("string"===typeof e){const t=new URL(e,location.href);0;a=new F((({url:e})=>e.href===t.href),s,n)}else if(e instanceof RegExp)a=new $(e,s,n);else if("function"===typeof e)a=new F(e,s,n);else{if(!(e instanceof F))throw new t("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=e}return V().registerRoute(a),a}s(977);function z(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:s,url:n}=e;if(!n)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!s){const e=new URL(n,location.href);return{cacheKey:e.href,url:e.href}}const a=new URL(n,location.href),r=new URL(n,location.href);return a.searchParams.set("__WB_REVISION__",s),{cacheKey:a.href,url:r.href}}class X{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class Y{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null===t||void 0===t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}class Z extends K{constructor(e={}){e.cacheName=i(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(Z.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,s){let n;const a=s.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const t=a.integrity,r=e.integrity,i=!r||r===t;if(n=await s.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||t:void 0})),t&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await s.cachePut(e,n.clone());0}}return n}async _handleInstall(e,s){this._useDefaultCacheabilityPluginIfNeeded();const n=await s.fetch(e);if(!(await s.cachePut(e,n.clone())))throw new t("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==Z.copyRedirectedCacheableResponsesPlugin&&(n===Z.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push(Z.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}Z.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},Z.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await g(e):e};class ee{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new Z({cacheName:i(e),plugins:[...t,new Y({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const s=[];for(const n of e){"string"===typeof n?s.push(n):n&&void 0===n.revision&&s.push(n.url);const{cacheKey:e,url:a}=z(n),r="string"!==typeof n&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:e});if("string"!==typeof n&&n.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==n.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(e,n.integrity)}if(this._urlsToCacheKeys.set(a,e),this._urlsToCacheModes.set(a,r),s.length>0){const e=`Workbox is precaching URLs without revision info: ${s.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return p(e,(async()=>{const t=new X;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return p(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const s=this.getCacheKeyForURL(e);if(!s)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:s},t.params),this.strategy.handle(t))}}let te;const se=()=>(te||(te=new ee),te);class ne extends F{constructor(e,t){super((({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}function ae(e){return se().matchPrecache(e)}self.skipWaiting(),self.addEventListener("activate",(()=>self.clients.claim()));var re,ie,oe=[{'revision':'9bbf19a123fd61fe5c210e151c0328cc','url':'/Bioliquid.woff2'},{'revision':'962c1a8b020dac15baf9aa20a07d933c','url':'/Rajdhani.woff2'},{'revision':'ea0d73166b7edccfe1c3c4f75ddae0a3','url':'/Roboto-Mono.woff2'},{'revision':'0667a32587cc27bbdbadc70314c7bb14','url':'/SF-Mono.woff2'},{'revision':'e2fcb2a0f6b0be3fcc78264dbe957f29','url':'/Spotnik.woff2'},{'revision':'04d87f92e05f23c7','url':'/_next/static/chunks/1088.04d87f92e05f23c7.js'},{'revision':'2f1e551b079174d0','url':'/_next/static/chunks/1469-2f1e551b079174d0.js'},{'revision':'ec04f07937386922','url':'/_next/static/chunks/1608.ec04f07937386922.js'},{'revision':'ae2b84d9f5645069','url':'/_next/static/chunks/1711.ae2b84d9f5645069.js'},{'revision':'af62bd633f21ee69','url':'/_next/static/chunks/1727.af62bd633f21ee69.js'},{'revision':'f63b451fd93f590b','url':'/_next/static/chunks/1748.f63b451fd93f590b.js'},{'revision':'cf8bb2590ecc3edc','url':'/_next/static/chunks/1894.cf8bb2590ecc3edc.js'},{'revision':'c8039f3dc9bb92f5','url':'/_next/static/chunks/1950.c8039f3dc9bb92f5.js'},{'revision':'038de301f3a28eb2','url':'/_next/static/chunks/2027.038de301f3a28eb2.js'},{'revision':'f6baa39611ece47e','url':'/_next/static/chunks/2174.f6baa39611ece47e.js'},{'revision':'250be1a3b8354750','url':'/_next/static/chunks/2604.250be1a3b8354750.js'},{'revision':'0a838d09eabc5b43','url':'/_next/static/chunks/2746.0a838d09eabc5b43.js'},{'revision':'f370a64b5af02f0b','url':'/_next/static/chunks/2898.f370a64b5af02f0b.js'},{'revision':'6135ea7388cc6e9c','url':'/_next/static/chunks/3200.6135ea7388cc6e9c.js'},{'revision':'53072abba3ca74b8','url':'/_next/static/chunks/3525.53072abba3ca74b8.js'},{'revision':'111aba596062de80','url':'/_next/static/chunks/3646.111aba596062de80.js'},{'revision':'6be69df622e36e45','url':'/_next/static/chunks/4253.6be69df622e36e45.js'},{'revision':'c4f2007bfe36ec14','url':'/_next/static/chunks/4419.c4f2007bfe36ec14.js'},{'revision':'798aaaf48ec0ce89','url':'/_next/static/chunks/5023.798aaaf48ec0ce89.js'},{'revision':'33e08a0525159056','url':'/_next/static/chunks/5119.33e08a0525159056.js'},{'revision':'d2f047fea62adf58','url':'/_next/static/chunks/514.d2f047fea62adf58.js'},{'revision':'750e02a737a02c02','url':'/_next/static/chunks/5246-750e02a737a02c02.js'},{'revision':'5d8686a37c030aeb','url':'/_next/static/chunks/5289.5d8686a37c030aeb.js'},{'revision':'5993c23b9b319446','url':'/_next/static/chunks/541.5993c23b9b319446.js'},{'revision':'ea86c6ce443ba3bd','url':'/_next/static/chunks/5488.ea86c6ce443ba3bd.js'},{'revision':'bab5f5b7ff8ff120','url':'/_next/static/chunks/556.bab5f5b7ff8ff120.js'},{'revision':'37ea4b85f4bb1a28','url':'/_next/static/chunks/5577.37ea4b85f4bb1a28.js'},{'revision':'294b57e99702d064','url':'/_next/static/chunks/5660.294b57e99702d064.js'},{'revision':'2bee96e50f302d0d','url':'/_next/static/chunks/5670.2bee96e50f302d0d.js'},{'revision':'7abe5840ceba140e','url':'/_next/static/chunks/5806.7abe5840ceba140e.js'},{'revision':'39f4dd66d499574b','url':'/_next/static/chunks/5811.39f4dd66d499574b.js'},{'revision':'0a433dc6f963fc41','url':'/_next/static/chunks/5939.0a433dc6f963fc41.js'},{'revision':'f7b1d24c812922e4','url':'/_next/static/chunks/6237.f7b1d24c812922e4.js'},{'revision':'dcdff54f0dceda1f','url':'/_next/static/chunks/6253.dcdff54f0dceda1f.js'},{'revision':'ea13afa99496d818','url':'/_next/static/chunks/6328.ea13afa99496d818.js'},{'revision':'432f96462db0d036','url':'/_next/static/chunks/6551.432f96462db0d036.js'},{'revision':'b954bf9a27972ff7','url':'/_next/static/chunks/6724-b954bf9a27972ff7.js'},{'revision':'a575059dbc72db1a','url':'/_next/static/chunks/6847.a575059dbc72db1a.js'},{'revision':'484bcd9e0a7f5626','url':'/_next/static/chunks/704.484bcd9e0a7f5626.js'},{'revision':'b0a3567fac8e0052','url':'/_next/static/chunks/7682.b0a3567fac8e0052.js'},{'revision':'91ea02a2812002e1','url':'/_next/static/chunks/7749.91ea02a2812002e1.js'},{'revision':'f18da82915d63734','url':'/_next/static/chunks/794.f18da82915d63734.js'},{'revision':'144fa7e49c07249e','url':'/_next/static/chunks/8109-144fa7e49c07249e.js'},{'revision':'d6c500ddcf42e542','url':'/_next/static/chunks/8137.d6c500ddcf42e542.js'},{'revision':'593a836a579a1569','url':'/_next/static/chunks/8764-593a836a579a1569.js'},{'revision':'984bbfca761cedbf','url':'/_next/static/chunks/8824.984bbfca761cedbf.js'},{'revision':'8c985300b37d631a','url':'/_next/static/chunks/8881.8c985300b37d631a.js'},{'revision':'882cd6b61a640a13','url':'/_next/static/chunks/9223.882cd6b61a640a13.js'},{'revision':'405a73de74b58e27','url':'/_next/static/chunks/934.405a73de74b58e27.js'},{'revision':'f765202d31d21580','url':'/_next/static/chunks/9343.f765202d31d21580.js'},{'revision':'c93f7cb64c560417','url':'/_next/static/chunks/9894.c93f7cb64c560417.js'},{'revision':'44044767831d9eb0','url':'/_next/static/chunks/9941.44044767831d9eb0.js'},{'revision':'639b71474d4cca8e','url':'/_next/static/chunks/de297ff1-639b71474d4cca8e.js'},{'revision':'0d10bf4e9f3c1869','url':'/_next/static/chunks/e97c7a19-0d10bf4e9f3c1869.js'},{'revision':'28712122b8f24e0e','url':'/_next/static/chunks/framework-28712122b8f24e0e.js'},{'revision':'235b4afd80b524a5','url':'/_next/static/chunks/main-235b4afd80b524a5.js'},{'revision':'ae9b86c99babcf6d','url':'/_next/static/chunks/pages/_app-ae9b86c99babcf6d.js'},{'revision':'4a934674346210d3','url':'/_next/static/chunks/pages/_error-4a934674346210d3.js'},{'revision':'ae3559ecb1f387d6','url':'/_next/static/chunks/pages/account-ae3559ecb1f387d6.js'},{'revision':'6fab776daa9ae5fc','url':'/_next/static/chunks/pages/fallback-6fab776daa9ae5fc.js'},{'revision':'547ce76aec519803','url':'/_next/static/chunks/pages/index-547ce76aec519803.js'},{'revision':'99442aec5788bccac9b2f0ead2afdd6b','url':'/_next/static/chunks/polyfills-5cd94c89d3acac5f.js'},{'revision':'8ca24e60d412662e','url':'/_next/static/chunks/webpack-8ca24e60d412662e.js'},{'revision':'3458e6a5de51a375','url':'/_next/static/css/3458e6a5de51a375.css'},{'revision':'f2782572','url':'/_next/static/media/Bioliquid.f2782572.woff2'},{'revision':'34941911','url':'/_next/static/media/Rajdhani.34941911.woff2'},{'revision':'f73e941d','url':'/_next/static/media/Roboto-Mono.f73e941d.woff2'},{'revision':'1ef6859c','url':'/_next/static/media/SF-Mono.1ef6859c.woff2'},{'revision':'464dbd09','url':'/_next/static/media/Spotnik.464dbd09.woff2'},{'revision':'c8fbb4bba90b2bf52b024424a3dedccf','url':'/_next/static/oKEdDSaokOxbKjibcSZIi/_buildManifest.js'},{'revision':'fb2823d66b3e778e04a3f681d0d2fb19','url':'/_next/static/oKEdDSaokOxbKjibcSZIi/_middlewareManifest.js'},{'revision':'b6652df95db52feb4daf4eca35380933','url':'/_next/static/oKEdDSaokOxbKjibcSZIi/_ssgManifest.js'},{'revision':'933c96f543ca515972c6d217d0306c71','url':'/ens-red.png'},{'revision':'aa858b65b4bccd0b8b171b7381782b54','url':'/ens-vision.png'},{'revision':'6d1fe7b883e5cee5559899a921e1191d','url':'/ens-white.png'},{'revision':'649aaa4e91cad7bb65932962cd7df11a','url':'/ens.png'},{'revision':'e21260efeb5ea2999269530516c5d71a','url':'/eth-dark.png'},{'revision':'7871856f87888053a7906446e0bed261','url':'/eth-red.png'},{'revision':'16f3a5485241d8b9e632f2aa53a6512c','url':'/eth.png'},{'revision':'a1bec2f2792cf6cfb340955d6b4cdb24','url':'/godid.svg'},{'revision':'fee4a5f8e0a922dc9b7b86278ade220e','url':'/logo.png'},{'revision':'b1abc504789fbd3d9e0e827c78443322','url':'/manifest.json'},{'revision':'7ac4d0e9806b2dbdc0b08f4c22a5bc35','url':'/readme/GUIDE.md'},{'revision':'ccf294a28856da3ea777c2daef9ef073','url':'/readme/github-markdown.min.css'},{'revision':'201b1c8cd745a48c260d0f57b53f5ce8','url':'/readme/index.js'},{'revision':'cf2fbbf84281d9ecbffb4993203d543b','url':'/readme/jquery.min.js'},{'revision':'ec7a634ecb477777ec6b6ca434b455ae','url':'/readme/query.js'},{'revision':'80362c5a131a99766e04f5ed50fddedf','url':'/readme/readme.htm'},{'revision':'f998a0f83800c6d1a754308b830ee998','url':'/readme/style.css'},{'revision':'77cd19437dced1bc1e3852c71134faaf','url':'/readme/theme.min.css'},{'revision':'06c2ab8e193a2de3408319058e0a7639','url':'/readme/zero-md.min.js'},{'revision':'1ddad315b35daeb40be0f5fd3b3922a6','url':'/shadow.svg'},{'revision':'a9f80d8d245b051a96c9ee42c3cc6316','url':'/sw.js'}];oe.push({url:"/fallback",revision:"1234567890"}),function(e){se().precache(e)}(oe),function(e){const t=se();J(new ne(t,e))}(re),self.addEventListener("activate",(e=>{const t=i();e.waitUntil((async(e,t="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(t)&&s.includes(self.registration.scope)&&s!==e));return await Promise.all(s.map((e=>self.caches.delete(e)))),s})(t).then((e=>{})))})),J("/",new j({cacheName:"start-url",plugins:[new A({maxEntries:1,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/^https:\/\/fonts\.(?:googleapis|gstatic)\.com\/.*/i,new class extends K{async _handle(e,s){let n,a=await s.cacheMatch(e);if(a)0;else{0;try{a=await s.fetchAndCachePut(e)}catch(r){r instanceof Error&&(n=r)}0}if(!a)throw new t("no-response",{url:e.url,error:n});return a}}({cacheName:"google-fonts",plugins:[new A({maxEntries:4,maxAgeSeconds:31536e3,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new B({cacheName:"static-font-assets",plugins:[new A({maxEntries:4,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new class extends K{constructor(e={}){super(e),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,s){let n,a;try{const t=[s.fetch(e)];if(this._networkTimeoutSeconds){const e=f(1e3*this._networkTimeoutSeconds);t.push(e)}if(a=await Promise.race(t),!a)throw new Error(`Timed out the network response after ${this._networkTimeoutSeconds} seconds.`)}catch(r){r instanceof Error&&(n=r)}if(!a)throw new t("no-response",{url:e.url,error:n});return a}}({cacheName:"static-image-assets",plugins:[new A({maxEntries:64,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:js)$/i,new B({cacheName:"static-js-assets",plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:css|less)$/i,new B({cacheName:"static-style-assets",plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:json|xml|csv)$/i,new j({cacheName:"static-data-assets",plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\/api\/.*$/i,new j({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new A({maxEntries:16,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/.*/i,new j({cacheName:"others",networkTimeoutSeconds:10,plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),ie=new B,V().setDefaultHandler(ie),function(e){V().setCatchHandler(e)}((function(e){switch(e.event.request.destination){case"document":return ae("/fallback");case"image":return ae("/static/images/fallback.png");default:return Response.error()}}))}()}(); \ No newline at end of file diff --git a/package.json b/package.json index 87362c86..5970ddc1 100644 --- a/package.json +++ b/package.json @@ -78,6 +78,8 @@ "patch-package": "^6.4.7", "purgecss": "^5.0.0", "react-router-dom": "^6.11.1", - "typescript": "5.0.4" + "ts-loader": "^9.4.4", + "typescript": "5.0.4", + "worker-loader": "^3.0.8" } } diff --git a/public/sw.js b/public/sw.js index f763596f..aedbf29b 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1 +1 @@ -!function(){"use strict";var e={913:function(){try{self["workbox:core:6.5.4"]&&_()}catch(e){}},550:function(){try{self["workbox:expiration:6.5.4"]&&_()}catch(e){}},977:function(){try{self["workbox:precaching:6.5.4"]&&_()}catch(e){}},80:function(){try{self["workbox:routing:6.5.4"]&&_()}catch(e){}},873:function(){try{self["workbox:strategies:6.5.4"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}},i=!0;try{e[n](r,r.exports,s),i=!1}finally{i&&delete t[n]}return r.exports}!function(){s(913);const e=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}const n=new Set;const a={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},r=e=>[a.prefix,e,a.suffix].filter((e=>e&&e.length>0)).join("-"),i=e=>e||r(a.precache),o=e=>e||r(a.runtime);function c(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let h;function l(e){e.then((()=>{}))}class u{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const d=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function f(e){return new Promise((t=>setTimeout(t,e)))}function p(e,t){const s=t();return e.waitUntil(s),s}async function g(e,s){let n=null;if(e.url){n=new URL(e.url).origin}if(n!==self.location.origin)throw new t("cross-origin-copy-response",{origin:n});const a=e.clone(),r={headers:new Headers(a.headers),status:a.status,statusText:a.statusText},i=s?s(r):r,o=function(){if(void 0===h){const t=new Response("");if("body"in t)try{new Response(t.body),h=!0}catch(e){h=!1}h=!1}return h}()?a.body:await a.blob();return new Response(o,i)}let w,m;const y=new WeakMap,_=new WeakMap,v=new WeakMap,b=new WeakMap,x=new WeakMap;let R={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return _.get(e);if("objectStoreNames"===t)return e.objectStoreNames||v.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return T(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function E(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(m||(m=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),T(y.get(this))}:function(...t){return T(e.apply(k(this),t))}:function(t,...s){const n=e.call(k(this),t,...s);return v.set(n,t.sort?t.sort():[t]),T(n)}}function C(e){return"function"===typeof e?E(e):(e instanceof IDBTransaction&&function(e){if(_.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));_.set(e,t)}(e),t=e,(w||(w=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,R):e);var t}function T(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(T(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&y.set(t,e)})).catch((()=>{})),x.set(t,e),t}(e);if(b.has(e))return b.get(e);const t=C(e);return t!==e&&(b.set(e,t),x.set(t,e)),t}const k=e=>x.get(e);const L=["get","getKey","getAll","getAllKeys","count"],q=["put","add","delete","clear"],U=new Map;function D(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(U.get(t))return U.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=q.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!L.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return U.set(t,r),r}R=(e=>({...e,get:(t,s,n)=>D(t,s)||e.get(t,s,n),has:(t,s)=>!!D(t,s)||e.has(t,s)}))(R);s(550);const N="cache-entries",S=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class P{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(N,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),T(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=S(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(N,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(N,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(N).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const o of a)await s.delete(N,o.id),i.push(o.url);return i}_getId(e){return this._cacheName+"|"+S(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),o=T(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(T(i.result),e.oldVersion,e.newVersion,T(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),o.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),o}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class I{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new P(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,l(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);l(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(o){0}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){n.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===o())throw new t("expire-custom-caches-only");let s=this._cacheExpirations.get(e);return s||(s=new I(e,this._config),this._cacheExpirations.set(e,s)),s}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}s(873);function M(e){return"string"===typeof e?new Request(e):e}class O{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new u,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:s}=this;let n=M(e);if("navigate"===n.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))n=await e({request:n.clone(),event:s})}catch(i){if(i instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let e;e=await fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:r,response:e});return e}catch(o){throw a&&await this.runCallbacks("fetchDidFail",{error:o,event:s,originalRequest:a.clone(),request:r.clone()}),o}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=M(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await o({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,s){const a=M(e);await f(0);const r=await this.getCacheKey(a,"write");if(!s)throw new t("cache-put-with-no-response",{url:d(r.url)});const i=await this._ensureResponseSafeToCache(s);if(!i)return!1;const{cacheName:o,matchOptions:h}=this._strategy,l=await self.caches.open(o),u=this.hasCallback("cacheDidUpdate"),p=u?await async function(e,t,s,n){const a=c(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const o of i)if(a===c(o.url,s))return e.match(o,n)}(l,r.clone(),["__WB_REVISION__"],h):null;try{await l.put(r,u?i.clone():i)}catch(g){if(g instanceof Error)throw"QuotaExceededError"===g.name&&await async function(){for(const e of n)await e()}(),g}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:o,oldResponse:p,newResponse:i.clone(),request:r,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=M(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class K{constructor(e={}){this.cacheName=o(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new O(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,s,n){let a;await e.runCallbacks("handlerWillStart",{event:n,request:s});try{if(a=await this._handle(s,e),!a||"error"===a.type)throw new t("no-response",{url:s.url})}catch(r){if(r instanceof Error)for(const t of e.iterateCallbacks("handlerDidError"))if(a=await t({error:r,event:n,request:s}),a)break;if(!a)throw r}for(const t of e.iterateCallbacks("handlerWillRespond"))a=await t({event:n,request:s,response:a});return a}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}const W={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};class j extends K{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(W),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,s){const n=[];const a=[];let r;if(this._networkTimeoutSeconds){const{id:t,promise:i}=this._getTimeoutPromise({request:e,logs:n,handler:s});r=t,a.push(i)}const i=this._getNetworkPromise({timeoutId:r,request:e,logs:n,handler:s});a.push(i);const o=await s.waitUntil((async()=>await s.waitUntil(Promise.race(a))||await i)());if(!o)throw new t("no-response",{url:e.url});return o}_getTimeoutPromise({request:e,logs:t,handler:s}){let n;return{promise:new Promise((t=>{n=setTimeout((async()=>{t(await s.cacheMatch(e))}),1e3*this._networkTimeoutSeconds)})),id:n}}async _getNetworkPromise({timeoutId:e,request:t,logs:s,handler:n}){let a,r;try{r=await n.fetchAndCachePut(t)}catch(i){i instanceof Error&&(a=i)}return e&&clearTimeout(e),!a&&r||(r=await n.cacheMatch(t)),r}}class B extends K{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(W)}async _handle(e,s){const n=s.fetchAndCachePut(e).catch((()=>{}));s.waitUntil(n);let a,r=await s.cacheMatch(e);if(r)0;else{0;try{r=await n}catch(i){i instanceof Error&&(a=i)}}if(!r)throw new t("no-response",{url:e.url,error:a});return r}}s(80);const H=e=>e&&"object"===typeof e?e:{handle:e};class F{constructor(e,t,s="GET"){this.handler=H(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=H(e)}}class $ extends F{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class G{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return void 0;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const o=e.method;if(!i&&this._defaultHandlerMap.has(o)&&(i=this._defaultHandlerMap.get(o)),!i)return void 0;let c;try{c=i.handle({url:s,request:e,event:t,params:a})}catch(l){c=Promise.reject(l)}const h=r&&r.catchHandler;return c instanceof Promise&&(this._catchHandler||h)&&(c=c.catch((async n=>{if(h){0;try{return await h.handle({url:s,request:e,event:t,params:a})}catch(r){r instanceof Error&&(n=r)}}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n}))),c}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"===typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,H(e))}setCatchHandler(e){this._catchHandler=H(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t("unregister-route-but-not-found-with-method",{method:e.method});const s=this._routes.get(e.method).indexOf(e);if(!(s>-1))throw new t("unregister-route-route-not-registered");this._routes.get(e.method).splice(s,1)}}let Q;const V=()=>(Q||(Q=new G,Q.addFetchListener(),Q.addCacheListener()),Q);function J(e,s,n){let a;if("string"===typeof e){const t=new URL(e,location.href);0;a=new F((({url:e})=>e.href===t.href),s,n)}else if(e instanceof RegExp)a=new $(e,s,n);else if("function"===typeof e)a=new F(e,s,n);else{if(!(e instanceof F))throw new t("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=e}return V().registerRoute(a),a}s(977);function z(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:s,url:n}=e;if(!n)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!s){const e=new URL(n,location.href);return{cacheKey:e.href,url:e.href}}const a=new URL(n,location.href),r=new URL(n,location.href);return a.searchParams.set("__WB_REVISION__",s),{cacheKey:a.href,url:r.href}}class X{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class Y{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null===t||void 0===t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}class Z extends K{constructor(e={}){e.cacheName=i(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(Z.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,s){let n;const a=s.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const t=a.integrity,r=e.integrity,i=!r||r===t;if(n=await s.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||t:void 0})),t&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await s.cachePut(e,n.clone());0}}return n}async _handleInstall(e,s){this._useDefaultCacheabilityPluginIfNeeded();const n=await s.fetch(e);if(!(await s.cachePut(e,n.clone())))throw new t("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==Z.copyRedirectedCacheableResponsesPlugin&&(n===Z.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push(Z.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}Z.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},Z.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await g(e):e};class ee{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new Z({cacheName:i(e),plugins:[...t,new Y({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const s=[];for(const n of e){"string"===typeof n?s.push(n):n&&void 0===n.revision&&s.push(n.url);const{cacheKey:e,url:a}=z(n),r="string"!==typeof n&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:e});if("string"!==typeof n&&n.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==n.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(e,n.integrity)}if(this._urlsToCacheKeys.set(a,e),this._urlsToCacheModes.set(a,r),s.length>0){const e=`Workbox is precaching URLs without revision info: ${s.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return p(e,(async()=>{const t=new X;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return p(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const s=this.getCacheKeyForURL(e);if(!s)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:s},t.params),this.strategy.handle(t))}}let te;const se=()=>(te||(te=new ee),te);class ne extends F{constructor(e,t){super((({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}function ae(e){return se().matchPrecache(e)}self.skipWaiting(),self.addEventListener("activate",(()=>self.clients.claim()));var re,ie,oe=[{'revision':'9bbf19a123fd61fe5c210e151c0328cc','url':'/Bioliquid.woff2'},{'revision':'962c1a8b020dac15baf9aa20a07d933c','url':'/Rajdhani.woff2'},{'revision':'ea0d73166b7edccfe1c3c4f75ddae0a3','url':'/Roboto-Mono.woff2'},{'revision':'0667a32587cc27bbdbadc70314c7bb14','url':'/SF-Mono.woff2'},{'revision':'e2fcb2a0f6b0be3fcc78264dbe957f29','url':'/Spotnik.woff2'},{'revision':'faa36e148f215d429b892500c07e2d5e','url':'/_next/static/7B-6x4C0oL8E4_p07T6FF/_buildManifest.js'},{'revision':'fb2823d66b3e778e04a3f681d0d2fb19','url':'/_next/static/7B-6x4C0oL8E4_p07T6FF/_middlewareManifest.js'},{'revision':'b6652df95db52feb4daf4eca35380933','url':'/_next/static/7B-6x4C0oL8E4_p07T6FF/_ssgManifest.js'},{'revision':'04d87f92e05f23c7','url':'/_next/static/chunks/1088.04d87f92e05f23c7.js'},{'revision':'3f9839cb080aea51','url':'/_next/static/chunks/1469-3f9839cb080aea51.js'},{'revision':'ec04f07937386922','url':'/_next/static/chunks/1608.ec04f07937386922.js'},{'revision':'ae2b84d9f5645069','url':'/_next/static/chunks/1711.ae2b84d9f5645069.js'},{'revision':'af62bd633f21ee69','url':'/_next/static/chunks/1727.af62bd633f21ee69.js'},{'revision':'f63b451fd93f590b','url':'/_next/static/chunks/1748.f63b451fd93f590b.js'},{'revision':'cf8bb2590ecc3edc','url':'/_next/static/chunks/1894.cf8bb2590ecc3edc.js'},{'revision':'c8039f3dc9bb92f5','url':'/_next/static/chunks/1950.c8039f3dc9bb92f5.js'},{'revision':'038de301f3a28eb2','url':'/_next/static/chunks/2027.038de301f3a28eb2.js'},{'revision':'250be1a3b8354750','url':'/_next/static/chunks/2604.250be1a3b8354750.js'},{'revision':'0a838d09eabc5b43','url':'/_next/static/chunks/2746.0a838d09eabc5b43.js'},{'revision':'f370a64b5af02f0b','url':'/_next/static/chunks/2898.f370a64b5af02f0b.js'},{'revision':'6135ea7388cc6e9c','url':'/_next/static/chunks/3200.6135ea7388cc6e9c.js'},{'revision':'541ec2729b5b05cf','url':'/_next/static/chunks/3482-541ec2729b5b05cf.js'},{'revision':'53072abba3ca74b8','url':'/_next/static/chunks/3525.53072abba3ca74b8.js'},{'revision':'111aba596062de80','url':'/_next/static/chunks/3646.111aba596062de80.js'},{'revision':'6be69df622e36e45','url':'/_next/static/chunks/4253.6be69df622e36e45.js'},{'revision':'c4f2007bfe36ec14','url':'/_next/static/chunks/4419.c4f2007bfe36ec14.js'},{'revision':'798aaaf48ec0ce89','url':'/_next/static/chunks/5023.798aaaf48ec0ce89.js'},{'revision':'33e08a0525159056','url':'/_next/static/chunks/5119.33e08a0525159056.js'},{'revision':'d2f047fea62adf58','url':'/_next/static/chunks/514.d2f047fea62adf58.js'},{'revision':'5d8686a37c030aeb','url':'/_next/static/chunks/5289.5d8686a37c030aeb.js'},{'revision':'5993c23b9b319446','url':'/_next/static/chunks/541.5993c23b9b319446.js'},{'revision':'ea86c6ce443ba3bd','url':'/_next/static/chunks/5488.ea86c6ce443ba3bd.js'},{'revision':'37ea4b85f4bb1a28','url':'/_next/static/chunks/5577.37ea4b85f4bb1a28.js'},{'revision':'2bee96e50f302d0d','url':'/_next/static/chunks/5670.2bee96e50f302d0d.js'},{'revision':'7abe5840ceba140e','url':'/_next/static/chunks/5806.7abe5840ceba140e.js'},{'revision':'39f4dd66d499574b','url':'/_next/static/chunks/5811.39f4dd66d499574b.js'},{'revision':'0a433dc6f963fc41','url':'/_next/static/chunks/5939.0a433dc6f963fc41.js'},{'revision':'f7b1d24c812922e4','url':'/_next/static/chunks/6237.f7b1d24c812922e4.js'},{'revision':'dcdff54f0dceda1f','url':'/_next/static/chunks/6253.dcdff54f0dceda1f.js'},{'revision':'ea13afa99496d818','url':'/_next/static/chunks/6328.ea13afa99496d818.js'},{'revision':'432f96462db0d036','url':'/_next/static/chunks/6551.432f96462db0d036.js'},{'revision':'a575059dbc72db1a','url':'/_next/static/chunks/6847.a575059dbc72db1a.js'},{'revision':'484bcd9e0a7f5626','url':'/_next/static/chunks/704.484bcd9e0a7f5626.js'},{'revision':'b0a3567fac8e0052','url':'/_next/static/chunks/7682.b0a3567fac8e0052.js'},{'revision':'91ea02a2812002e1','url':'/_next/static/chunks/7749.91ea02a2812002e1.js'},{'revision':'f18da82915d63734','url':'/_next/static/chunks/794.f18da82915d63734.js'},{'revision':'144fa7e49c07249e','url':'/_next/static/chunks/8109-144fa7e49c07249e.js'},{'revision':'d6c500ddcf42e542','url':'/_next/static/chunks/8137.d6c500ddcf42e542.js'},{'revision':'593a836a579a1569','url':'/_next/static/chunks/8764-593a836a579a1569.js'},{'revision':'984bbfca761cedbf','url':'/_next/static/chunks/8824.984bbfca761cedbf.js'},{'revision':'8c985300b37d631a','url':'/_next/static/chunks/8881.8c985300b37d631a.js'},{'revision':'882cd6b61a640a13','url':'/_next/static/chunks/9223.882cd6b61a640a13.js'},{'revision':'405a73de74b58e27','url':'/_next/static/chunks/934.405a73de74b58e27.js'},{'revision':'f765202d31d21580','url':'/_next/static/chunks/9343.f765202d31d21580.js'},{'revision':'c93f7cb64c560417','url':'/_next/static/chunks/9894.c93f7cb64c560417.js'},{'revision':'44044767831d9eb0','url':'/_next/static/chunks/9941.44044767831d9eb0.js'},{'revision':'639b71474d4cca8e','url':'/_next/static/chunks/de297ff1-639b71474d4cca8e.js'},{'revision':'0d10bf4e9f3c1869','url':'/_next/static/chunks/e97c7a19-0d10bf4e9f3c1869.js'},{'revision':'28712122b8f24e0e','url':'/_next/static/chunks/framework-28712122b8f24e0e.js'},{'revision':'235b4afd80b524a5','url':'/_next/static/chunks/main-235b4afd80b524a5.js'},{'revision':'1f4b9b779e80c94b','url':'/_next/static/chunks/pages/_app-1f4b9b779e80c94b.js'},{'revision':'4a934674346210d3','url':'/_next/static/chunks/pages/_error-4a934674346210d3.js'},{'revision':'e36a6a73785e98e0','url':'/_next/static/chunks/pages/account-e36a6a73785e98e0.js'},{'revision':'6fab776daa9ae5fc','url':'/_next/static/chunks/pages/fallback-6fab776daa9ae5fc.js'},{'revision':'6b71d8ff8ed1ec2b','url':'/_next/static/chunks/pages/index-6b71d8ff8ed1ec2b.js'},{'revision':'99442aec5788bccac9b2f0ead2afdd6b','url':'/_next/static/chunks/polyfills-5cd94c89d3acac5f.js'},{'revision':'48b731e940c7534a','url':'/_next/static/chunks/webpack-48b731e940c7534a.js'},{'revision':'3458e6a5de51a375','url':'/_next/static/css/3458e6a5de51a375.css'},{'revision':'f2782572','url':'/_next/static/media/Bioliquid.f2782572.woff2'},{'revision':'34941911','url':'/_next/static/media/Rajdhani.34941911.woff2'},{'revision':'f73e941d','url':'/_next/static/media/Roboto-Mono.f73e941d.woff2'},{'revision':'1ef6859c','url':'/_next/static/media/SF-Mono.1ef6859c.woff2'},{'revision':'464dbd09','url':'/_next/static/media/Spotnik.464dbd09.woff2'},{'revision':'933c96f543ca515972c6d217d0306c71','url':'/ens-red.png'},{'revision':'aa858b65b4bccd0b8b171b7381782b54','url':'/ens-vision.png'},{'revision':'6d1fe7b883e5cee5559899a921e1191d','url':'/ens-white.png'},{'revision':'649aaa4e91cad7bb65932962cd7df11a','url':'/ens.png'},{'revision':'e21260efeb5ea2999269530516c5d71a','url':'/eth-dark.png'},{'revision':'7871856f87888053a7906446e0bed261','url':'/eth-red.png'},{'revision':'16f3a5485241d8b9e632f2aa53a6512c','url':'/eth.png'},{'revision':'a1bec2f2792cf6cfb340955d6b4cdb24','url':'/godid.svg'},{'revision':'fee4a5f8e0a922dc9b7b86278ade220e','url':'/logo.png'},{'revision':'b1abc504789fbd3d9e0e827c78443322','url':'/manifest.json'},{'revision':'7ac4d0e9806b2dbdc0b08f4c22a5bc35','url':'/readme/GUIDE.md'},{'revision':'ccf294a28856da3ea777c2daef9ef073','url':'/readme/github-markdown.min.css'},{'revision':'201b1c8cd745a48c260d0f57b53f5ce8','url':'/readme/index.js'},{'revision':'cf2fbbf84281d9ecbffb4993203d543b','url':'/readme/jquery.min.js'},{'revision':'ec7a634ecb477777ec6b6ca434b455ae','url':'/readme/query.js'},{'revision':'80362c5a131a99766e04f5ed50fddedf','url':'/readme/readme.htm'},{'revision':'f998a0f83800c6d1a754308b830ee998','url':'/readme/style.css'},{'revision':'77cd19437dced1bc1e3852c71134faaf','url':'/readme/theme.min.css'},{'revision':'06c2ab8e193a2de3408319058e0a7639','url':'/readme/zero-md.min.js'},{'revision':'1ddad315b35daeb40be0f5fd3b3922a6','url':'/shadow.svg'},{'revision':'a9f80d8d245b051a96c9ee42c3cc6316','url':'/sw.js'}];oe.push({url:"/fallback",revision:"1234567890"}),function(e){se().precache(e)}(oe),function(e){const t=se();J(new ne(t,e))}(re),self.addEventListener("activate",(e=>{const t=i();e.waitUntil((async(e,t="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(t)&&s.includes(self.registration.scope)&&s!==e));return await Promise.all(s.map((e=>self.caches.delete(e)))),s})(t).then((e=>{})))})),J("/",new j({cacheName:"start-url",plugins:[new A({maxEntries:1,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/^https:\/\/fonts\.(?:googleapis|gstatic)\.com\/.*/i,new class extends K{async _handle(e,s){let n,a=await s.cacheMatch(e);if(a)0;else{0;try{a=await s.fetchAndCachePut(e)}catch(r){r instanceof Error&&(n=r)}0}if(!a)throw new t("no-response",{url:e.url,error:n});return a}}({cacheName:"google-fonts",plugins:[new A({maxEntries:4,maxAgeSeconds:31536e3,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new B({cacheName:"static-font-assets",plugins:[new A({maxEntries:4,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new class extends K{constructor(e={}){super(e),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,s){let n,a;try{const t=[s.fetch(e)];if(this._networkTimeoutSeconds){const e=f(1e3*this._networkTimeoutSeconds);t.push(e)}if(a=await Promise.race(t),!a)throw new Error(`Timed out the network response after ${this._networkTimeoutSeconds} seconds.`)}catch(r){r instanceof Error&&(n=r)}if(!a)throw new t("no-response",{url:e.url,error:n});return a}}({cacheName:"static-image-assets",plugins:[new A({maxEntries:64,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:js)$/i,new B({cacheName:"static-js-assets",plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:css|less)$/i,new B({cacheName:"static-style-assets",plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:json|xml|csv)$/i,new j({cacheName:"static-data-assets",plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\/api\/.*$/i,new j({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new A({maxEntries:16,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/.*/i,new j({cacheName:"others",networkTimeoutSeconds:10,plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),ie=new B,V().setDefaultHandler(ie),function(e){V().setCatchHandler(e)}((function(e){switch(e.event.request.destination){case"document":return ae("/fallback");case"image":return ae("/static/images/fallback.png");default:return Response.error()}}))}()}(); \ No newline at end of file +!function(){"use strict";var e={913:function(){try{self["workbox:core:6.5.4"]&&_()}catch(e){}},550:function(){try{self["workbox:expiration:6.5.4"]&&_()}catch(e){}},977:function(){try{self["workbox:precaching:6.5.4"]&&_()}catch(e){}},80:function(){try{self["workbox:routing:6.5.4"]&&_()}catch(e){}},873:function(){try{self["workbox:strategies:6.5.4"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}},i=!0;try{e[n](r,r.exports,s),i=!1}finally{i&&delete t[n]}return r.exports}!function(){s(913);const e=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}const n=new Set;const a={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},r=e=>[a.prefix,e,a.suffix].filter((e=>e&&e.length>0)).join("-"),i=e=>e||r(a.precache),o=e=>e||r(a.runtime);function c(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let h;function l(e){e.then((()=>{}))}class u{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const d=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function f(e){return new Promise((t=>setTimeout(t,e)))}function p(e,t){const s=t();return e.waitUntil(s),s}async function g(e,s){let n=null;if(e.url){n=new URL(e.url).origin}if(n!==self.location.origin)throw new t("cross-origin-copy-response",{origin:n});const a=e.clone(),r={headers:new Headers(a.headers),status:a.status,statusText:a.statusText},i=s?s(r):r,o=function(){if(void 0===h){const t=new Response("");if("body"in t)try{new Response(t.body),h=!0}catch(e){h=!1}h=!1}return h}()?a.body:await a.blob();return new Response(o,i)}let w,m;const y=new WeakMap,_=new WeakMap,v=new WeakMap,b=new WeakMap,x=new WeakMap;let R={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return _.get(e);if("objectStoreNames"===t)return e.objectStoreNames||v.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return T(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function E(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(m||(m=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),T(y.get(this))}:function(...t){return T(e.apply(k(this),t))}:function(t,...s){const n=e.call(k(this),t,...s);return v.set(n,t.sort?t.sort():[t]),T(n)}}function C(e){return"function"===typeof e?E(e):(e instanceof IDBTransaction&&function(e){if(_.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));_.set(e,t)}(e),t=e,(w||(w=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,R):e);var t}function T(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(T(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&y.set(t,e)})).catch((()=>{})),x.set(t,e),t}(e);if(b.has(e))return b.get(e);const t=C(e);return t!==e&&(b.set(e,t),x.set(t,e)),t}const k=e=>x.get(e);const L=["get","getKey","getAll","getAllKeys","count"],q=["put","add","delete","clear"],U=new Map;function D(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(U.get(t))return U.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=q.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!L.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return U.set(t,r),r}R=(e=>({...e,get:(t,s,n)=>D(t,s)||e.get(t,s,n),has:(t,s)=>!!D(t,s)||e.has(t,s)}))(R);s(550);const N="cache-entries",S=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class P{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(N,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),T(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=S(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(N,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(N,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(N).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const o of a)await s.delete(N,o.id),i.push(o.url);return i}_getId(e){return this._cacheName+"|"+S(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),o=T(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(T(i.result),e.oldVersion,e.newVersion,T(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),o.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),o}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class I{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new P(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,l(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);l(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(o){0}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){n.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===o())throw new t("expire-custom-caches-only");let s=this._cacheExpirations.get(e);return s||(s=new I(e,this._config),this._cacheExpirations.set(e,s)),s}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}s(873);function M(e){return"string"===typeof e?new Request(e):e}class O{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new u,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:s}=this;let n=M(e);if("navigate"===n.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))n=await e({request:n.clone(),event:s})}catch(i){if(i instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let e;e=await fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:r,response:e});return e}catch(o){throw a&&await this.runCallbacks("fetchDidFail",{error:o,event:s,originalRequest:a.clone(),request:r.clone()}),o}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=M(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await o({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,s){const a=M(e);await f(0);const r=await this.getCacheKey(a,"write");if(!s)throw new t("cache-put-with-no-response",{url:d(r.url)});const i=await this._ensureResponseSafeToCache(s);if(!i)return!1;const{cacheName:o,matchOptions:h}=this._strategy,l=await self.caches.open(o),u=this.hasCallback("cacheDidUpdate"),p=u?await async function(e,t,s,n){const a=c(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const o of i)if(a===c(o.url,s))return e.match(o,n)}(l,r.clone(),["__WB_REVISION__"],h):null;try{await l.put(r,u?i.clone():i)}catch(g){if(g instanceof Error)throw"QuotaExceededError"===g.name&&await async function(){for(const e of n)await e()}(),g}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:o,oldResponse:p,newResponse:i.clone(),request:r,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=M(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class K{constructor(e={}){this.cacheName=o(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new O(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,s,n){let a;await e.runCallbacks("handlerWillStart",{event:n,request:s});try{if(a=await this._handle(s,e),!a||"error"===a.type)throw new t("no-response",{url:s.url})}catch(r){if(r instanceof Error)for(const t of e.iterateCallbacks("handlerDidError"))if(a=await t({error:r,event:n,request:s}),a)break;if(!a)throw r}for(const t of e.iterateCallbacks("handlerWillRespond"))a=await t({event:n,request:s,response:a});return a}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}const W={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};class j extends K{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(W),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,s){const n=[];const a=[];let r;if(this._networkTimeoutSeconds){const{id:t,promise:i}=this._getTimeoutPromise({request:e,logs:n,handler:s});r=t,a.push(i)}const i=this._getNetworkPromise({timeoutId:r,request:e,logs:n,handler:s});a.push(i);const o=await s.waitUntil((async()=>await s.waitUntil(Promise.race(a))||await i)());if(!o)throw new t("no-response",{url:e.url});return o}_getTimeoutPromise({request:e,logs:t,handler:s}){let n;return{promise:new Promise((t=>{n=setTimeout((async()=>{t(await s.cacheMatch(e))}),1e3*this._networkTimeoutSeconds)})),id:n}}async _getNetworkPromise({timeoutId:e,request:t,logs:s,handler:n}){let a,r;try{r=await n.fetchAndCachePut(t)}catch(i){i instanceof Error&&(a=i)}return e&&clearTimeout(e),!a&&r||(r=await n.cacheMatch(t)),r}}class B extends K{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(W)}async _handle(e,s){const n=s.fetchAndCachePut(e).catch((()=>{}));s.waitUntil(n);let a,r=await s.cacheMatch(e);if(r)0;else{0;try{r=await n}catch(i){i instanceof Error&&(a=i)}}if(!r)throw new t("no-response",{url:e.url,error:a});return r}}s(80);const H=e=>e&&"object"===typeof e?e:{handle:e};class F{constructor(e,t,s="GET"){this.handler=H(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=H(e)}}class $ extends F{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class G{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return void 0;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const o=e.method;if(!i&&this._defaultHandlerMap.has(o)&&(i=this._defaultHandlerMap.get(o)),!i)return void 0;let c;try{c=i.handle({url:s,request:e,event:t,params:a})}catch(l){c=Promise.reject(l)}const h=r&&r.catchHandler;return c instanceof Promise&&(this._catchHandler||h)&&(c=c.catch((async n=>{if(h){0;try{return await h.handle({url:s,request:e,event:t,params:a})}catch(r){r instanceof Error&&(n=r)}}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n}))),c}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"===typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,H(e))}setCatchHandler(e){this._catchHandler=H(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t("unregister-route-but-not-found-with-method",{method:e.method});const s=this._routes.get(e.method).indexOf(e);if(!(s>-1))throw new t("unregister-route-route-not-registered");this._routes.get(e.method).splice(s,1)}}let Q;const V=()=>(Q||(Q=new G,Q.addFetchListener(),Q.addCacheListener()),Q);function J(e,s,n){let a;if("string"===typeof e){const t=new URL(e,location.href);0;a=new F((({url:e})=>e.href===t.href),s,n)}else if(e instanceof RegExp)a=new $(e,s,n);else if("function"===typeof e)a=new F(e,s,n);else{if(!(e instanceof F))throw new t("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=e}return V().registerRoute(a),a}s(977);function z(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:s,url:n}=e;if(!n)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!s){const e=new URL(n,location.href);return{cacheKey:e.href,url:e.href}}const a=new URL(n,location.href),r=new URL(n,location.href);return a.searchParams.set("__WB_REVISION__",s),{cacheKey:a.href,url:r.href}}class X{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class Y{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null===t||void 0===t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}class Z extends K{constructor(e={}){e.cacheName=i(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(Z.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,s){let n;const a=s.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const t=a.integrity,r=e.integrity,i=!r||r===t;if(n=await s.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||t:void 0})),t&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await s.cachePut(e,n.clone());0}}return n}async _handleInstall(e,s){this._useDefaultCacheabilityPluginIfNeeded();const n=await s.fetch(e);if(!(await s.cachePut(e,n.clone())))throw new t("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==Z.copyRedirectedCacheableResponsesPlugin&&(n===Z.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push(Z.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}Z.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},Z.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await g(e):e};class ee{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new Z({cacheName:i(e),plugins:[...t,new Y({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const s=[];for(const n of e){"string"===typeof n?s.push(n):n&&void 0===n.revision&&s.push(n.url);const{cacheKey:e,url:a}=z(n),r="string"!==typeof n&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:e});if("string"!==typeof n&&n.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==n.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(e,n.integrity)}if(this._urlsToCacheKeys.set(a,e),this._urlsToCacheModes.set(a,r),s.length>0){const e=`Workbox is precaching URLs without revision info: ${s.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return p(e,(async()=>{const t=new X;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return p(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const s=this.getCacheKeyForURL(e);if(!s)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:s},t.params),this.strategy.handle(t))}}let te;const se=()=>(te||(te=new ee),te);class ne extends F{constructor(e,t){super((({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}function ae(e){return se().matchPrecache(e)}self.skipWaiting(),self.addEventListener("activate",(()=>self.clients.claim()));var re,ie,oe=[{'revision':'9bbf19a123fd61fe5c210e151c0328cc','url':'/Bioliquid.woff2'},{'revision':'962c1a8b020dac15baf9aa20a07d933c','url':'/Rajdhani.woff2'},{'revision':'ea0d73166b7edccfe1c3c4f75ddae0a3','url':'/Roboto-Mono.woff2'},{'revision':'0667a32587cc27bbdbadc70314c7bb14','url':'/SF-Mono.woff2'},{'revision':'e2fcb2a0f6b0be3fcc78264dbe957f29','url':'/Spotnik.woff2'},{'revision':'04d87f92e05f23c7','url':'/_next/static/chunks/1088.04d87f92e05f23c7.js'},{'revision':'2f1e551b079174d0','url':'/_next/static/chunks/1469-2f1e551b079174d0.js'},{'revision':'ec04f07937386922','url':'/_next/static/chunks/1608.ec04f07937386922.js'},{'revision':'ae2b84d9f5645069','url':'/_next/static/chunks/1711.ae2b84d9f5645069.js'},{'revision':'af62bd633f21ee69','url':'/_next/static/chunks/1727.af62bd633f21ee69.js'},{'revision':'f63b451fd93f590b','url':'/_next/static/chunks/1748.f63b451fd93f590b.js'},{'revision':'cf8bb2590ecc3edc','url':'/_next/static/chunks/1894.cf8bb2590ecc3edc.js'},{'revision':'c8039f3dc9bb92f5','url':'/_next/static/chunks/1950.c8039f3dc9bb92f5.js'},{'revision':'038de301f3a28eb2','url':'/_next/static/chunks/2027.038de301f3a28eb2.js'},{'revision':'f6baa39611ece47e','url':'/_next/static/chunks/2174.f6baa39611ece47e.js'},{'revision':'250be1a3b8354750','url':'/_next/static/chunks/2604.250be1a3b8354750.js'},{'revision':'0a838d09eabc5b43','url':'/_next/static/chunks/2746.0a838d09eabc5b43.js'},{'revision':'f370a64b5af02f0b','url':'/_next/static/chunks/2898.f370a64b5af02f0b.js'},{'revision':'6135ea7388cc6e9c','url':'/_next/static/chunks/3200.6135ea7388cc6e9c.js'},{'revision':'53072abba3ca74b8','url':'/_next/static/chunks/3525.53072abba3ca74b8.js'},{'revision':'111aba596062de80','url':'/_next/static/chunks/3646.111aba596062de80.js'},{'revision':'6be69df622e36e45','url':'/_next/static/chunks/4253.6be69df622e36e45.js'},{'revision':'c4f2007bfe36ec14','url':'/_next/static/chunks/4419.c4f2007bfe36ec14.js'},{'revision':'798aaaf48ec0ce89','url':'/_next/static/chunks/5023.798aaaf48ec0ce89.js'},{'revision':'33e08a0525159056','url':'/_next/static/chunks/5119.33e08a0525159056.js'},{'revision':'d2f047fea62adf58','url':'/_next/static/chunks/514.d2f047fea62adf58.js'},{'revision':'750e02a737a02c02','url':'/_next/static/chunks/5246-750e02a737a02c02.js'},{'revision':'5d8686a37c030aeb','url':'/_next/static/chunks/5289.5d8686a37c030aeb.js'},{'revision':'5993c23b9b319446','url':'/_next/static/chunks/541.5993c23b9b319446.js'},{'revision':'ea86c6ce443ba3bd','url':'/_next/static/chunks/5488.ea86c6ce443ba3bd.js'},{'revision':'bab5f5b7ff8ff120','url':'/_next/static/chunks/556.bab5f5b7ff8ff120.js'},{'revision':'37ea4b85f4bb1a28','url':'/_next/static/chunks/5577.37ea4b85f4bb1a28.js'},{'revision':'294b57e99702d064','url':'/_next/static/chunks/5660.294b57e99702d064.js'},{'revision':'2bee96e50f302d0d','url':'/_next/static/chunks/5670.2bee96e50f302d0d.js'},{'revision':'7abe5840ceba140e','url':'/_next/static/chunks/5806.7abe5840ceba140e.js'},{'revision':'39f4dd66d499574b','url':'/_next/static/chunks/5811.39f4dd66d499574b.js'},{'revision':'0a433dc6f963fc41','url':'/_next/static/chunks/5939.0a433dc6f963fc41.js'},{'revision':'f7b1d24c812922e4','url':'/_next/static/chunks/6237.f7b1d24c812922e4.js'},{'revision':'dcdff54f0dceda1f','url':'/_next/static/chunks/6253.dcdff54f0dceda1f.js'},{'revision':'ea13afa99496d818','url':'/_next/static/chunks/6328.ea13afa99496d818.js'},{'revision':'432f96462db0d036','url':'/_next/static/chunks/6551.432f96462db0d036.js'},{'revision':'b954bf9a27972ff7','url':'/_next/static/chunks/6724-b954bf9a27972ff7.js'},{'revision':'a575059dbc72db1a','url':'/_next/static/chunks/6847.a575059dbc72db1a.js'},{'revision':'484bcd9e0a7f5626','url':'/_next/static/chunks/704.484bcd9e0a7f5626.js'},{'revision':'b0a3567fac8e0052','url':'/_next/static/chunks/7682.b0a3567fac8e0052.js'},{'revision':'91ea02a2812002e1','url':'/_next/static/chunks/7749.91ea02a2812002e1.js'},{'revision':'f18da82915d63734','url':'/_next/static/chunks/794.f18da82915d63734.js'},{'revision':'144fa7e49c07249e','url':'/_next/static/chunks/8109-144fa7e49c07249e.js'},{'revision':'d6c500ddcf42e542','url':'/_next/static/chunks/8137.d6c500ddcf42e542.js'},{'revision':'593a836a579a1569','url':'/_next/static/chunks/8764-593a836a579a1569.js'},{'revision':'984bbfca761cedbf','url':'/_next/static/chunks/8824.984bbfca761cedbf.js'},{'revision':'8c985300b37d631a','url':'/_next/static/chunks/8881.8c985300b37d631a.js'},{'revision':'882cd6b61a640a13','url':'/_next/static/chunks/9223.882cd6b61a640a13.js'},{'revision':'405a73de74b58e27','url':'/_next/static/chunks/934.405a73de74b58e27.js'},{'revision':'f765202d31d21580','url':'/_next/static/chunks/9343.f765202d31d21580.js'},{'revision':'c93f7cb64c560417','url':'/_next/static/chunks/9894.c93f7cb64c560417.js'},{'revision':'44044767831d9eb0','url':'/_next/static/chunks/9941.44044767831d9eb0.js'},{'revision':'639b71474d4cca8e','url':'/_next/static/chunks/de297ff1-639b71474d4cca8e.js'},{'revision':'0d10bf4e9f3c1869','url':'/_next/static/chunks/e97c7a19-0d10bf4e9f3c1869.js'},{'revision':'28712122b8f24e0e','url':'/_next/static/chunks/framework-28712122b8f24e0e.js'},{'revision':'235b4afd80b524a5','url':'/_next/static/chunks/main-235b4afd80b524a5.js'},{'revision':'ae9b86c99babcf6d','url':'/_next/static/chunks/pages/_app-ae9b86c99babcf6d.js'},{'revision':'4a934674346210d3','url':'/_next/static/chunks/pages/_error-4a934674346210d3.js'},{'revision':'ae3559ecb1f387d6','url':'/_next/static/chunks/pages/account-ae3559ecb1f387d6.js'},{'revision':'6fab776daa9ae5fc','url':'/_next/static/chunks/pages/fallback-6fab776daa9ae5fc.js'},{'revision':'547ce76aec519803','url':'/_next/static/chunks/pages/index-547ce76aec519803.js'},{'revision':'99442aec5788bccac9b2f0ead2afdd6b','url':'/_next/static/chunks/polyfills-5cd94c89d3acac5f.js'},{'revision':'8ca24e60d412662e','url':'/_next/static/chunks/webpack-8ca24e60d412662e.js'},{'revision':'3458e6a5de51a375','url':'/_next/static/css/3458e6a5de51a375.css'},{'revision':'f2782572','url':'/_next/static/media/Bioliquid.f2782572.woff2'},{'revision':'34941911','url':'/_next/static/media/Rajdhani.34941911.woff2'},{'revision':'f73e941d','url':'/_next/static/media/Roboto-Mono.f73e941d.woff2'},{'revision':'1ef6859c','url':'/_next/static/media/SF-Mono.1ef6859c.woff2'},{'revision':'464dbd09','url':'/_next/static/media/Spotnik.464dbd09.woff2'},{'revision':'c8fbb4bba90b2bf52b024424a3dedccf','url':'/_next/static/oKEdDSaokOxbKjibcSZIi/_buildManifest.js'},{'revision':'fb2823d66b3e778e04a3f681d0d2fb19','url':'/_next/static/oKEdDSaokOxbKjibcSZIi/_middlewareManifest.js'},{'revision':'b6652df95db52feb4daf4eca35380933','url':'/_next/static/oKEdDSaokOxbKjibcSZIi/_ssgManifest.js'},{'revision':'933c96f543ca515972c6d217d0306c71','url':'/ens-red.png'},{'revision':'aa858b65b4bccd0b8b171b7381782b54','url':'/ens-vision.png'},{'revision':'6d1fe7b883e5cee5559899a921e1191d','url':'/ens-white.png'},{'revision':'649aaa4e91cad7bb65932962cd7df11a','url':'/ens.png'},{'revision':'e21260efeb5ea2999269530516c5d71a','url':'/eth-dark.png'},{'revision':'7871856f87888053a7906446e0bed261','url':'/eth-red.png'},{'revision':'16f3a5485241d8b9e632f2aa53a6512c','url':'/eth.png'},{'revision':'a1bec2f2792cf6cfb340955d6b4cdb24','url':'/godid.svg'},{'revision':'fee4a5f8e0a922dc9b7b86278ade220e','url':'/logo.png'},{'revision':'b1abc504789fbd3d9e0e827c78443322','url':'/manifest.json'},{'revision':'7ac4d0e9806b2dbdc0b08f4c22a5bc35','url':'/readme/GUIDE.md'},{'revision':'ccf294a28856da3ea777c2daef9ef073','url':'/readme/github-markdown.min.css'},{'revision':'201b1c8cd745a48c260d0f57b53f5ce8','url':'/readme/index.js'},{'revision':'cf2fbbf84281d9ecbffb4993203d543b','url':'/readme/jquery.min.js'},{'revision':'ec7a634ecb477777ec6b6ca434b455ae','url':'/readme/query.js'},{'revision':'80362c5a131a99766e04f5ed50fddedf','url':'/readme/readme.htm'},{'revision':'f998a0f83800c6d1a754308b830ee998','url':'/readme/style.css'},{'revision':'77cd19437dced1bc1e3852c71134faaf','url':'/readme/theme.min.css'},{'revision':'06c2ab8e193a2de3408319058e0a7639','url':'/readme/zero-md.min.js'},{'revision':'1ddad315b35daeb40be0f5fd3b3922a6','url':'/shadow.svg'},{'revision':'a9f80d8d245b051a96c9ee42c3cc6316','url':'/sw.js'}];oe.push({url:"/fallback",revision:"1234567890"}),function(e){se().precache(e)}(oe),function(e){const t=se();J(new ne(t,e))}(re),self.addEventListener("activate",(e=>{const t=i();e.waitUntil((async(e,t="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(t)&&s.includes(self.registration.scope)&&s!==e));return await Promise.all(s.map((e=>self.caches.delete(e)))),s})(t).then((e=>{})))})),J("/",new j({cacheName:"start-url",plugins:[new A({maxEntries:1,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/^https:\/\/fonts\.(?:googleapis|gstatic)\.com\/.*/i,new class extends K{async _handle(e,s){let n,a=await s.cacheMatch(e);if(a)0;else{0;try{a=await s.fetchAndCachePut(e)}catch(r){r instanceof Error&&(n=r)}0}if(!a)throw new t("no-response",{url:e.url,error:n});return a}}({cacheName:"google-fonts",plugins:[new A({maxEntries:4,maxAgeSeconds:31536e3,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new B({cacheName:"static-font-assets",plugins:[new A({maxEntries:4,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new class extends K{constructor(e={}){super(e),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,s){let n,a;try{const t=[s.fetch(e)];if(this._networkTimeoutSeconds){const e=f(1e3*this._networkTimeoutSeconds);t.push(e)}if(a=await Promise.race(t),!a)throw new Error(`Timed out the network response after ${this._networkTimeoutSeconds} seconds.`)}catch(r){r instanceof Error&&(n=r)}if(!a)throw new t("no-response",{url:e.url,error:n});return a}}({cacheName:"static-image-assets",plugins:[new A({maxEntries:64,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:js)$/i,new B({cacheName:"static-js-assets",plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:css|less)$/i,new B({cacheName:"static-style-assets",plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\.(?:json|xml|csv)$/i,new j({cacheName:"static-data-assets",plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/\/api\/.*$/i,new j({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new A({maxEntries:16,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),J(/.*/i,new j({cacheName:"others",networkTimeoutSeconds:10,plugins:[new A({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),ie=new B,V().setDefaultHandler(ie),function(e){V().setCatchHandler(e)}((function(e){switch(e.event.request.destination){case"document":return ae("/fallback");case"image":return ae("/static/images/fallback.png");default:return Response.error()}}))}()}(); \ No newline at end of file diff --git a/run_ids.txt b/run_ids.txt deleted file mode 100644 index 4d9393a0..00000000 --- a/run_ids.txt +++ /dev/null @@ -1,25 +0,0 @@ -4819230358 -4806570937 -4795317136 -4793221367 -4754898309 -4754665210 -4753225857 -4752850534 -4734134505 -4731665364 -4729681952 -4713108774 -4712867032 -4712754913 -4708066850 -4707935698 -4707885064 -4707879799 -4707864567 -4707835408 -4707806070 -4707781560 -4707587559 -4707498532 -4707430152 diff --git a/src/worker/worker.ts b/src/worker/worker.ts new file mode 100644 index 00000000..906d8641 --- /dev/null +++ b/src/worker/worker.ts @@ -0,0 +1,18 @@ +import { TWorkerMess } from '../../typings/worker' +import { RSAGEN } from '../../utils/keygen' +// RSA key serialisation +const onmessage = (event: MessageEvent) => { + const variables = event.data + const keygen = async () => { + let _keypair = await RSAGEN( + variables._origin, + variables._caip10, + variables._sigRSA, + variables._salt + ) + postMessage(_keypair) + } + keygen() +} + +addEventListener('message', onmessage) diff --git a/tsconfig.json b/tsconfig.json index 5012069e..d799f9dd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], + "lib": ["dom", "dom.iterable", "esnext", "webworker"], "allowJs": true, "skipLibCheck": true, "strict": true, diff --git a/typings/worker.ts b/typings/worker.ts new file mode 100644 index 00000000..ec8e91a8 --- /dev/null +++ b/typings/worker.ts @@ -0,0 +1,6 @@ +export type TWorkerMess = { + "_origin": string, + "_caip10": string, + "_sigRSA": string, + "_salt": string +} diff --git a/utils/constants.ts b/utils/constants.ts index 9aee082b..5686ae98 100644 --- a/utils/constants.ts +++ b/utils/constants.ts @@ -12,6 +12,7 @@ import iCCIP2Goerli from '../ABI/CCIP2Goerli.json' import iCCIP2Mainnet from '../ABI/CCIP2Mainnet.json' import * as ensContent from '../utils/contenthash' import axios from 'axios' +import * as cryptico from 'cryptico-js/dist/cryptico.browser.js' // Config records export const config = [ @@ -49,10 +50,10 @@ export const typesRecords = [ 'nostr', // Multi-addr 'btc', - 'ltc', - 'doge', - 'sol', - 'atom', + 'ltc', + 'doge', + 'sol', + 'atom', // DNS //'zonehash', // Extradata @@ -84,10 +85,10 @@ export const filesRecords = [ 'text/nostr', // Multi-addr 'address/0', - 'address/2', - 'address/3', - 'address/501', - 'address/118', + 'address/2', + 'address/3', + 'address/501', + 'address/118', // DNS //'dns/zonehash', // Extradata @@ -538,3 +539,27 @@ export async function getABI(contractAddress: string): Promise { } } +/// Stealth +const keyClass = cryptico.generateRSAKey('0', '64') +export const prototypeRSAKey = Object.getPrototypeOf(keyClass) +const BigInteger = Object.getPrototypeOf(keyClass.n).constructor + +/// RSA Key de-serialisation +export function deserialiseRSAKey(serialised: any): any { + return { + ...serialised, + coeff: deserialiseBigInteger(serialised.coeff), + d: deserialiseBigInteger(serialised.d), + dmp1: deserialiseBigInteger(serialised.dmp1), + dmq1: deserialiseBigInteger(serialised.dmq1), + n: deserialiseBigInteger(serialised.n), + p: deserialiseBigInteger(serialised.p), + q: deserialiseBigInteger(serialised.q), + } +} + +/// BigInteger de-serialisation +export function deserialiseBigInteger(serialised: any): any { + let bigInt = Object.assign(Object.create(BigInteger.prototype), serialised) + return bigInt +} \ No newline at end of file