keyring-chatbot-agent 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,22 @@
1
1
  !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".chat-button{cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #00000026;transition:all .3s ease;border-radius:16px}.chat-button:hover{transform:scale(1.1);box-shadow:0 6px 16px #0003}.chat-button:active{transform:scale(.95)}.chat-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:transparent;display:flex;align-items:flex-end;justify-content:flex-end;z-index:9999;pointer-events:all;animation:fadeIn .2s ease}#chat-modal-title{color:#0b3988;font-weight:900;font-style:Regular;font-size:18px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1}.chat-modal-overlay.chat-modal-overlay--left{justify-content:flex-start}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.chat-modal{width:90%;max-width:480px;height:700px;max-height:calc(100dvh - 64px);background:#f5f5f7;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px #0000004d;margin:20px;pointer-events:all;animation:slideUp .3s ease}@keyframes slideUp{0%{transform:translateY(30px);opacity:0}to{transform:translateY(0);opacity:1}}.chat-modal-header{background:#fff;padding:8px 8px 8px 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e5e5e7;flex-flow:column}.chat-modal-header-title{width:100%;display:flex;align-items:center;justify-content:space-between;overflow:hidden}.chat-modal-header-left{display:flex;align-items:center;gap:6px;overflow:hidden}.keyring-logo{width:22px;height:30px;display:flex;align-items:center;justify-content:center}.chat-modal-header h3{margin:0;font-size:18px;font-weight:700;color:#1a1a1d}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;border-radius:8px;color:#666;transition:all .2s}.close-button:hover{background:#f5f5f7;color:#000}.chat-user-info{display:flex;align-items:center;gap:6px;width:100%}.user-wallet,.user-wallet a{font-size:14px;font-weight:500;color:#0b3988}.copy-address-btn{display:flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;padding:3px;color:#999;border-radius:4px;transition:color .15s,background .15s;line-height:0}@media(min-width:640px){.copy-address-btn:hover{color:#1a1a1d;background:#f0f0f0}}.chat-modal-messages-wrapper{position:relative;flex:1;overflow:hidden;display:flex;flex-direction:column}.chat-modal-messages{flex:1;padding:8px 16px;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:8px}.date-separator{text-align:center;font-size:12px;font-weight:600;color:#666;align-self:center;width:fit-content;margin:0 auto 8px}.message{display:flex;animation:messageSlide .3s ease;position:relative}@media(min-width:640px){.message:hover .message-reply-button{opacity:1}}@keyframes messageSlide{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message-reply-button{position:absolute;top:50%;transform:translateY(-50%);background:#fff;border:1px solid #e5e5e7;border-radius:8px;padding:6px;cursor:pointer;opacity:0;transition:all .2s;box-shadow:0 2px 8px #0000001a;z-index:10}.message-bot .message-reply-button{right:20px}.message-user .message-reply-button{left:20px}.message-reply-button:hover{background:#f5f5f7;transform:translateY(-50%) scale(1.1)}.message-reply-button svg{display:block;width:16px;height:16px;color:#666}.message-bot{justify-content:flex-start}.message-user{justify-content:flex-end}.message-bubble{max-width:85%;padding:8px 16px;border-radius:20px}.message-bot .message-bubble{background:#fff;box-shadow:0 2px 8px #0000000f;border-bottom-left-radius:4px}.message-user .message-bubble{background:#5b7fff;color:#fff;border-bottom-right-radius:4px}.message-user .message-bubble a{color:#fff}.message-reply-to{background:#0000000d;padding:8px 12px;border-radius:6px;margin-bottom:8px;border-left:3px solid #5b7fff}.message-bot .message-reply-to{background:#f5f5f7}.message-user .message-reply-to{background:#ffffff26;border-left-color:#ffffff80}.message-reply-to-label{font-size:11px;font-weight:600;margin-bottom:4px}.message-bot .message-reply-to-label{color:#5b7fff}.message-user .message-reply-to-label{color:#ffffffe6}.message-reply-to-text{font-size:12px;opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-text{font-size:14px;line-height:1.5;word-wrap:break-word;white-space:pre-line}.message-bot .message-text{color:#1a1a1d}.message-user .message-text{color:#fff}.message-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;margin-bottom:8px}.message-button{flex:1 1 calc(50% - 4px);min-width:100px;padding:6px 12px;background:#fffffff2;border:1px solid #e0e0e0;border-radius:12px;font-size:13px;font-weight:500;color:#1a1a1d;cursor:pointer;transition:all .2s ease;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-button.full-width{flex:1 1 100%;text-align:center;white-space:normal;font-size:14px}@media(min-width:640px){.message-button:hover{background:#fff;border-color:#007aff;color:#007aff;transform:translateY(-1px);box-shadow:0 2px 8px #007aff26}.message-button:active{transform:translateY(0);box-shadow:0 1px 4px #007aff1a}}.message-user .message-button{background:#fff3;border-color:#ffffff4d;color:#fff}.message-user .message-button:hover{background:#ffffff4d;border-color:#ffffff80}.message-timestamp{line-height:1;font-size:11px;color:#999;display:flex;align-items:center;gap:4px;justify-content:flex-end}.message-user .message-timestamp{color:#ffffffb3}.check-icon{width:14px;height:14px}.typing-indicator .message-bubble{padding:12px 18px;display:flex;gap:6px;min-width:60px}.typing-dot{width:8px;height:8px;border-radius:50%;background:#999;animation:typingDot 1.4s infinite ease-in-out}.typing-dot:nth-child(1){animation-delay:0s}.typing-dot:nth-child(2){animation-delay:.2s}.typing-dot:nth-child(3){animation-delay:.4s}@keyframes typingDot{0%,60%,to{transform:translateY(0);opacity:.7}30%{transform:translateY(-8px);opacity:1}}.suggestions-container{display:flex;flex-direction:column;gap:10px;margin-top:8px}.suggestion-button{background:#d4d8f0;border:none;padding:6px 12px;border-radius:12px;display:flex;gap:12px;cursor:pointer;transition:all .2s;font-size:14px;font-weight:500;color:#1a1a1d;width:100%;text-align:center;align-items:center;justify-content:center}.suggestion-button:hover{background:#c5caeb;transform:translateY(-1px)}.suggestion-icon{font-size:18px}.chat-modal-input{padding:8px 16px;background:#fff;border-top:1px solid #e5e5e7;display:flex;flex-direction:column;gap:8px;box-shadow:0 -5px 8px 4px #0000000d;border-radius:12px 12px 0 0}.reply-preview{background:#f5f5f7;padding:6px 6px 6px 12px;border-radius:6px;border-left:3px solid #5b7fff;display:flex;justify-content:space-between;align-items:flex-start;gap:6px}.reply-preview-content{flex:1;min-width:0}.reply-preview-label{font-size:11px;color:#5b7fff;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reply-preview-text{font-size:13px;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-preview-close{background:transparent;border:none;cursor:pointer;padding:2px;color:#999;transition:color .2s;flex-shrink:0}.reply-preview-close:hover{color:#666}.chat-modal-input-row{display:flex;gap:12px;align-items:center}.chat-modal-input input{flex:1;padding:14px 18px;border:1px solid #e5e5e7;border-radius:12px;outline:none;font-size:16px;color:#1a1a1d;transition:all .2s;height:44px}.chat-modal-input input::placeholder{color:#999}.chat-modal-input input:focus{border-color:#5b7fff;box-shadow:0 0 0 3px #5b7fff1a}.chat-modal-input input:disabled{opacity:.6;cursor:not-allowed;background:#f5f5f7}.send-button{width:40px;height:40px;border-radius:50%;background:#5b7fff;border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}.send-button:hover:not(:disabled){background:#4a6fee;transform:scale(1.05)}.send-button:disabled{opacity:.4;cursor:not-allowed}.chat-modal-messages::-webkit-scrollbar{width:6px}.chat-modal-messages::-webkit-scrollbar-thumb{background:#d1d1d6;border-radius:3px}@media(max-width:640px){.chat-modal{width:100%;height:100dvh;max-height:100dvh;border-radius:12px 12px 0 0;margin:0}}.action-status{margin-top:8px;margin-bottom:4px;padding:6px 10px;border-radius:6px;font-size:.8em;font-weight:500}.action-status-submitted{background:#fef3c7;color:#92400e;border:1px solid #fde68a}.action-status-success{background:#d1fae5;color:#065f46;border:1px solid #a7f3d0}.action-status-fail{background:#fee2e2;color:#991b1b;border:1px solid #fca5a5}.action-form{background:#f8f9fb;border:1px solid #e2e6ea;border-radius:10px;padding:12px;margin-top:8px;margin-bottom:8px}.action-form-title{font-weight:600;font-size:.9em;margin-bottom:10px;color:#1a1a2e;display:flex;align-items:center;gap:6px}.action-form-general-error{background:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:10px 12px;margin-bottom:10px;font-size:.8em;color:#dc2626;font-weight:500;display:flex;align-items:center;gap:6px}.action-form-fields{display:flex;flex-direction:column;gap:8px}.action-form-field{display:flex;flex-direction:column;gap:3px}.action-form-field label{font-size:.75em;font-weight:500;color:#6b7280}.action-form-field input,.action-form-field textarea{padding:8px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:16px;background:#fff;color:#1a1a2e;outline:none;transition:border-color .2s;font-family:inherit}.action-form-field textarea{resize:none;word-break:break-all}.action-form-field input:focus,.action-form-field textarea:focus{border-color:#0b3988;box-shadow:0 0 0 2px #6c5ce726}.action-form-field input.error,.action-form-field textarea.error{border-color:#ef4444}.action-form-field input.readonly,.action-form-field textarea.readonly{background:#f3f4f6;color:#6b7280;cursor:not-allowed;border-color:#e5e7eb}.action-form-field .field-error{font-size:.7em;color:#ef4444;margin-top:1px}.action-form-actions{display:flex;gap:8px;margin-top:10px}.action-form-submit{flex:1;padding:8px 14px;background:#0b3988;color:#fff;border:none;border-radius:6px;font-size:.85em;font-weight:500;cursor:pointer;transition:background .2s}.action-form-submit:hover:not(:disabled){background:#5a4bd1}.action-form-submit:disabled{background:#a5b4fc;cursor:not-allowed}.action-form-cancel{padding:8px 14px;background:transparent;color:#6b7280;border:1px solid #d1d5db;border-radius:6px;font-size:.85em;font-weight:500;cursor:pointer;transition:all .2s}.action-form-cancel:hover{background:#f3f4f6;color:#374151}.action-form-token-info{background:#eef2ff;border:1px solid #c7d2fe;border-radius:8px;padding:8px 10px;margin-bottom:10px}.token-info-row{display:flex;align-items:center;gap:8px}.token-info-logo{border-radius:50%;flex-shrink:0}.token-info-details{display:flex;flex-direction:column;gap:2px;min-width:0}.token-info-name{font-size:.8em;font-weight:600;color:#1a1a2e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.token-info-balance{font-size:.75em;color:#4b5563}.token-info-usd{color:#0b3988;font-weight:500}.action-form-field-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.action-form-field-header .action-form-field-label{margin-bottom:0;font-size:12px}.action-form-pct-btns{display:inline-flex;gap:4px}.action-form-pct-btn{padding:1px 6px;font-size:.7em;font-weight:600;color:#0b3988;background:#eef2ff;border:1px solid #c7d2fe;border-radius:4px;cursor:pointer;transition:all .15s}@media(min-width:640px){.action-form-pct-btn:hover:not(:disabled){background:#0b3988;color:#fff}}.action-form-pct-btn:disabled{opacity:.5;cursor:not-allowed}.action-form-max-btn{font-weight:700}.action-form-nft-info{margin-bottom:10px;text-align:center;display:flex;align-items:center;justify-content:center}.nft-info-image{width:80px;height:80px;border-radius:8px;object-fit:contain;background:#e5e7eb;padding:4px}.scroll-to-bottom-btn{position:absolute;bottom:16px;right:20px;background:#1a1a1dd6;color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:50%;width:36px;height:36px;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #00000040;z-index:20;transition:background .15s,transform .15s,box-shadow .15s;animation:fadeInUp .18s ease}@keyframes fadeInUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(min-width:640px){.scroll-to-bottom-btn:hover{background:#2d2d35;box-shadow:0 6px 16px #0000004d;transform:scale(1.08)}}.scroll-to-bottom-btn:active{transform:scale(.96)}.message-content{display:block;word-wrap:break-word;overflow-wrap:break-word;max-width:100%;overflow:hidden;font-size:inherit;line-height:1.5}.mc-line{min-height:1.2em;word-break:break-word}.mc-empty-line{height:.5em}.mc-heading{font-weight:600;margin:.3em 0;word-break:break-word}.mc-h1{font-size:1.4em}.mc-h2{font-size:1.2em}.mc-h3{font-size:1.05em}.mc-inline-code{background:#afb8c133;padding:1px 5px;border-radius:3px;font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.88em}.mc-codeblock{background:#f6f8fa;border:1px solid #d0d7de;border-radius:6px;margin:6px 0;overflow:hidden;max-width:100%}.mc-codeblock-lang{background:#e8ecf0;padding:3px 10px;font-size:.75em;font-weight:600;color:#57606a;text-transform:uppercase;font-family:Monaco,Menlo,monospace;border-bottom:1px solid #d0d7de}.mc-codeblock pre{margin:0;padding:10px;overflow-x:auto}.mc-codeblock code{font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.85em;line-height:1.5;color:#24292f;white-space:pre}.mc-link{color:#0969da;text-decoration:none;word-break:break-word}.mc-link:hover{text-decoration:underline}.mc-image{max-width:150px;width:150px;height:150px;object-fit:contain;border-radius:8px;margin:8px 0;display:block}.mc-image-inline{width:20px;height:20px;border-radius:50%;margin:0 4px;display:inline-block;vertical-align:middle;object-fit:cover}.mc-blockquote{margin:4px 0;padding:2px 0 2px 12px;color:#57606a;border-left:3px solid #d0d7de}.mc-hr{height:1px;border:0;background:#d0d7de;margin:.4em 0}.message-content strong{font-weight:600}.message-content del{text-decoration:line-through}.mc-link-previews{display:flex;flex-direction:column;gap:6px;margin-top:6px}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
2
- import{jsx as e,Fragment as t,jsxs as n}from"react/jsx-runtime";import r,{useState as o,useEffect as i,useCallback as a,createContext as s,useContext as c,memo as u,useMemo as l,useRef as f}from"react";const d={en:{chatTitle:"Keyring Agent",closeChat:"Close chat",messagePlaceholder:"Message ....",sendMessage:"Send message",botIsTyping:"Bot is typing",canIHelpYou:"Can I help you with anything?",replyToMessage:"Reply to message",replyingTo:"Replying to",replyingToYou:"You",replyingToAgent:"Keyring Agent",cancelReply:"Cancel reply",suggestionAskText:"Ask a question",suggestionAskUserMessage:"I have a question",suggestionAskBotReply:"Ask me anything",suggestionBuyText:"Buy trending token",walletConnectedChainUnsupported:"Your wallet is connected but the chain is not supported for trading. Please switch to a supported chain to see trending tokens.",walletNotConnected:"Please connect your wallet to see trending tokens.",actionProcessing:"⏳ Processing transaction...",actionSuccess:"✅ Transaction completed",actionFail:"❌ Action cancelled or failed",txSubmitted:"⏳ Transaction submitted. Waiting for confirmation...",txConfirmed:"✅ Transaction confirmed!",txReverted:"❌ Transaction reverted on-chain.",txTimeout:"⚠️ Transaction submitted but confirmation timed out. Please check manually.",txSuccessful:"✅ Transaction successful!",txFailed:"❌ Transaction failed. Please try again.",txNoHandler:"⚠️ No transaction handler configured.",txInsufficientGas:"⚠️ **Insufficient {symbol} for gas!** You have {balance} {symbol} but need ~{fee} {symbol} for the transaction fee. Please top up your wallet and try again.",txError:"❌ Error: {message}",swapConfirmButton:"Confirm",swapConfirmValue:"Confirm swap",swapReadyToProceed:"Ready to proceed with the swap?",swapEstimationError:"⚠️ Unable to get swap estimation. Error: {error}",formCancel:"Cancel",formExecute:"Execute",formProcessing:"⏳ Processing...",formBalance:"Balance:",formTokenNotFound:"Token not found in your wallet.",formNoBalance:"You have no {symbol} balance in your wallet.",formInsufficientBalance:"Insufficient balance. Spendable: {balance} {symbol}",formFieldRequired:"{field} is required",formInvalidAddress:"Invalid address (Must contain 0x and 40 hex chars)",formMustBePositive:"Must be a positive number",formMustBeValidNumber:"Must be a valid number",openChat:"Open chat",openChatTitle:"Open chat support",walletBalanceSpendable:"This is the spendable balance of your wallet on {chain} chain. Please choose the coins you want to use for this trade.",walletNoTokensFound:"Sorry, I couldn't find any tokens in your wallet on {chain} chain. Please make sure you have some tokens to trade.",walletFetchFailed:"Sorry, I could not fetch your wallet balance. Please try again.",walletFetchError:"Sorry, I encountered an error fetching your wallet balance.",insufficientFeeToken:"Insufficient fee. Please ensure you have enough {symbol} to cover the transaction fees, or select a different token.",selectAmountOf:"Select the amount of {symbol} to use:\n\nSpendable: {balance} {symbol}",swapFeeWarning:"\n⚠️ **Insufficient {symbol} for fees!**\n You have {balance} {symbol} but need ~{needed} {symbol}.\n",swapNeedApprove:"You need to approve {symbol} first before swapping.",swapApproveButton:"Approve {symbol}",swapApproveValue:"Approve {symbol} for swap",swapNoSourceToken:"⚠️ You don't have the source token in your wallet or balance is 0.",swapSelectAmount:"Swap {from} → {to}\n\nSelect the amount of {from} to swap:\n\nSpendable: {balance} {from}",swapApprovalRequired:"⚠️ Token approval required before swapping.\n\nStep 1: Approve {symbol}\nStep 2: Confirm Swap",swapEstimationFailed:"⚠️ Failed to get swap estimation. Please try again.",swapInsufficientNativeBalance:"⚠️ Insufficient balance! You have {balance} {symbol} but need {amount} {symbol}. Please top up your wallet or reduce the amount.",swapTokenNotInWallet:"⚠️ You don't have {symbol} in your wallet. Please acquire some first before swapping.",swapInsufficientTokenBalance:"⚠️ Insufficient balance! You have {balance} {symbol} but need {amount} {symbol}. Please reduce the amount or add more tokens.",selectAmountToSwap:"Select the amount of {symbol} to swap:\n\nSpendable: {balance} {symbol}",couldNotLoadTokenList:"⚠️ Could not load token list. Please specify the destination token.",trendingTokensForReceive:"📈 Trending tokens on {chain} chain. Pick the token you want to receive or type the token you want to receive:",txProcessing:"⏳ Transaction processing... Please confirm in your wallet.",txConfirmedSwap:"✅ Transaction confirmed! Your swap has been completed.",txRevertedSwap:"❌ Transaction reverted on-chain. Please try again.",txSuccessfulSwap:"✅ Transaction successful! Your swap has been completed.",txSuccessfulSendToken:"✅ Sent successfully **{amount} {symbol}** to {to}",txSuccessfulSendNative:"✅ Sent successfully **{amount} {symbol}** to {to}",txSuccessfulSendNft:"✅ Sent successfully NFT **{name}** (#{tokenId}) to {to}",txSuccessfulWrapNative:"✅ Wrapped successfully **{amount} {from}** → **{to}**",txSuccessfulUnwrapNative:"✅ Unwrapped successfully **{amount} {from}** → **{to}**",txDataNotAvailable:"⚠️ Transaction data not available.",approvalDataNotAvailable:"⚠️ Approval data not available.",approving:"Approving {symbol}... Please confirm in your wallet.",approvalSuccess:"✅ {symbol} approved successfully!",approvalConfirmSwap:"Now you can execute the swap.",confirmSwapButton:"Confirm Swap",approvalFailed:"❌ Approval failed. Please try again.",couldNotFetchBalance:"⚠️ Could not fetch your wallet balance.",couldNotLoadBalance:"⚠️ Could not load balance. Please try again.",couldNotFetchBalanceRetry:"⚠️ Could not fetch your balance. Please try again.",nftSendReview:"📤 Send **{name}** ({standard} #{tokenId})\n\nPlease review and fill in the recipient address below:",nftCollectionHeader:"Your NFTs :\n\n{list}",nftMoreItems:"\n\nAnd {count} more NFTs...",nftSelectBelow:"\n\nSelect an NFT below to send",nftNoCollection:"You don't have any NFTs in your wallet on this chain.",nftMultipleMatchesForTokenId:"I found {count} NFTs with Token ID #{tokenId} in your wallet. Please select the one you want to send:",nftNotFoundInWallet:"I couldn't find \"{name}\" in your NFT collection. You don't own this NFT on this chain.",nftFetchError:"Sorry, I encountered an error fetching your NFTs.",trendingTokensHeader:"📈 Here is the list of tokens that are currently trending upwards on {chain} chain",trendingTokensQuestion:"\nIs there any token you want to buy?",trendingTokensError:"Sorry, I encountered an error fetching trending tokens.",errorProcessingRequest:"Sorry, I encountered an error processing your request.Please try again in a few moments.",buttonBuyWith:"Buy with {symbol}",buttonUsePercent:"Use {percent}% of {symbol}",buttonBuyToken:"Buy {name} ({symbol})",buttonSendNft:"Send {name}",buttonSwapTo:"Swap to {name} ({symbol})",buttonBuySymbol:"Buy {symbol}",viewBalancesLoading:"Fetching your wallet balances...",viewBalancesHeader:"Your token balances on {chain}:\n\n{list}",viewBalancesEmpty:"You don't have any tokens in your wallet on this chain.",viewBalancesFetchError:"Sorry, I encountered an error fetching your balances.",buttonSendToken:"Send {symbol}",formMax:"MAX",buttonSwapToken:"Swap {symbol}",buttonBuyMoreToken:"Buy more {symbol}",actionSendNativeLabel:"Send Native Token",actionSendNativeDesc:"Send native token (ETH, BNB, MATIC, etc.) to an address",actionSendTokenLabel:"Send Token (ERC20)",actionSendTokenDesc:"Send an ERC20 token to an address",actionSwapTokenLabel:"Swap Token",actionSwapTokenDesc:"Swap one token for another",actionApproveTokenLabel:"Approve Token",actionApproveTokenDesc:"Approve a spender to use your tokens",actionWrapNativeLabel:"Wrap Native Token",actionWrapNativeDesc:"Wrap native token (ETH → WETH)",actionUnwrapNativeLabel:"Unwrap Native Token",actionUnwrapNativeDesc:"Unwrap native token (WETH → ETH)",actionSendNftLabel:"Send NFT",actionSendNftDesc:"Transfer an ERC721 or ERC1155 NFT to another address",fieldToAddress:"Recipient Address",fieldAmount:"Amount",fieldTokenContract:"Token Contract",fieldTokenSymbol:"Token Symbol",fieldDecimals:"Decimals",fieldTokenIn:"From Token",fieldTokenInSymbol:"From Symbol",fieldTokenOut:"To Token",fieldTokenOutSymbol:"To Symbol",fieldTokenInDecimals:"From Decimals",fieldTokenOutDecimals:"To Decimals",fieldSpenderAddress:"Spender Address",fieldAmountUnlimited:"Amount (empty = unlimited)",fieldNftContract:"NFT Contract",fieldTokenId:"Token ID",fieldTokenStandard:"Token Standard",fieldNftName:"NFT Name",formMustBePositiveInteger:"Must be a positive integer",formAmountExceedsNft:"Amount cannot exceed available balance {max}",receivedButtonValue:"Received: {value}",actionExecutedFor:'Action "{action}" executed for: {value}',buyTokenHelp:"I'll help you buy {symbol}. Let me show your available tokens to trade with.",tokenNotFoundOnChain:'I couldn\'t find the token "{symbol}" on this chain. Here are the trending tokens you can buy',swapPreparing:"Preparing your swap...",swapConfirmYes:"Yes",swapChooseFrom:"Please choose which token you want to swap from:",swapChooseTo:"You want to swap {symbol}. Please choose which token you want to receive:",swapNeedDetails:'I need more details for your swap. Please specify which tokens you want to swap (e.g. "Swap 1 ETH to USDC").',viewNftsLoading:"Let me show you your NFT collection!",sendTokenNotInWallet:"You don't have {symbol} in your wallet on this chain. Please acquire some first before sending.",sendTokenChoose:"Which token would you like to send?",sendNftChoose:"Which NFT would you like to send?",swapChooseToken:"Which token would you like to swap? Here are your current balances:",spendable:"Spendable",welcomeMessage:"**Welcome! 🚀**\nYou’re now connected and ready to explore the world of Blockchain. I can assist you anytime with NFT insights, trading, price tracking, and portfolio analysis.",sendOtherNfts:"\nIf the NFT you want to send is not in the list above, please visit our website to send it.",sendNftViaWebsite:"Please select the NFT you would like to send from the list and proceed via this website.",sendNftViaWebsiteWithLink:"Please select the NFT you would like to send from the list and proceed via [this website]({link}).",viewNftViaWebsite:"Please view your NFT collection on this website for more details.",viewNftViaWebsiteWithLink:"Please view your NFT collection on [this website]({link}) for more details.",buyingOnChain:"Buying {symbol} on {chain}",viewOnExplorer:"View on Explorer",copyWalletAddress:"Copy wallet address",copied:"Copied!",copyAddress:"Copy address",poolGeneralInfoIntro:"💧 **Liquidity Pools** are smart contracts where users deposit token pairs to provide liquidity for DEX trading (like Uniswap). Liquidity providers (LPs) earn trading fees from each swap.",poolGeneralInfoMetricsTitle:"**Key Metrics:**",poolGeneralInfoMetricTVL:"**TVL** - Total Value Locked in the pool",poolGeneralInfoMetricAPR:"**APR** - Estimated annual return from fees",poolGeneralInfoMetricVol24h:"**Volume 24h** - Trading volume in last 24 hours",poolGeneralInfoMetricFeeTier:"**Fee Tier** - Trading fee (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'Try asking something specific, like: *"ETH/USDC pools on Base"* or *"Highest APR pools"*.',poolNoMatch:"❌ No matching pools found.",poolNoMatchForTokenOnChain:"❌ No matching pools found for **{token}** on **{chain}**.",poolSuggestionsTitle:"💡 **Suggestions:**",poolSuggestionTryChain:"Try a different chain (Ethereum, Base, Arbitrum...)",poolSuggestionTryPair:"Try a more popular pair (ETH/USDC, ETH/USDT)",poolSuggestionRelaxFilters:"Remove filters if too narrow",poolHeaderBest:"🏆 Best Pool",poolHeaderSafe:"🛡️ Safest Pools",poolHeaderTrending:"🔥 Trending Pools",poolHeaderHighApr:"📈 Highest APR Pools",poolHeaderLowFee:"💰 Lowest Fee Pools",poolHeaderCompare:"⚖️ Pool Comparison",poolHeaderDetail:"🔎 Pool Details",poolHeaderGeneral:"💧 Pool Info",poolHeaderSearch:"🔍 Search Results",poolTableMetric:"Metric",poolTableValue:"Value",poolTableLink:"Link",poolLinkView:"View on Uniswap",poolRecommendationHighApr:"👉 **Recommended:** [{pair}]({link}) - Highest APR at **{apr}%**. _Note: Higher APR may come with higher risk._",poolRecommendationLowFee:"👉 **Recommended:** [{pair}]({link}) - Lowest fee at **{fee}%**, ideal for frequent trading.",poolRecommendationSafe:"👉 **Recommended:** [{pair}]({link}) - Highest TVL at **{tvl}**, deep liquidity and stable.",poolRecommendationTrending:"👉 **Most Active:** [{pair}]({link}) - 24h Volume **{volume}**, highest trading activity.",poolRecommendationTopPick:"👉 **Top pick:** [{pair}]({link}) - TVL **{tvl}**, best match for your criteria.",sendPositionNoId:'Please provide your LP position ID to send it. For example: "send position 12345 to 0x...".',sendPositionNotFound:"Position #{id} was not found in your wallet on {chain}. Please make sure you own this position.",sendPositionReview:"📤 Send LP Position **#{positionId}** ({pair})\n\nPlease enter the recipient address below:",sendPositionFetchError:"Error fetching your positions. Please try again.",poolUnsupportedChain:"This chain is not supported for data queries. Sorry for the inconvenience.",poolUniswapV3Only:"I can only get information of pools that is on Subgraph Uniswap V3."},ja:{chatTitle:"Keyring Agent",closeChat:"チャットを閉じる",messagePlaceholder:"メッセージを入力...",sendMessage:"メッセージを送信",botIsTyping:"ボットが入力中...",canIHelpYou:"何かお手伝いできることはございますか?",replyToMessage:"メッセージに返信",replyingTo:"返信先:",replyingToYou:"あなた",replyingToAgent:"Keyring Agent",cancelReply:"返信をキャンセル",suggestionAskText:"質問・調査のお願い",suggestionAskUserMessage:"質問があります",suggestionAskBotReply:"何でも聞いてください",suggestionBuyText:"トレンドトークンを購入",walletConnectedChainUnsupported:"ウォレットは接続されていますが、このチェーンは取引に対応していません。トレンドのトークンを表示するには、対応しているチェーンに切り替えてください。",walletNotConnected:"トレンドのトークンを表示するには、ウォレットを接続してください。",actionProcessing:"⏳ トランザクションを処理中...",actionSuccess:"✅ トランザクションが完了しました",actionFail:"❌ アクションがキャンセルされたか、失敗しました",txSubmitted:"⏳ トランザクションを送信しました。確認を待機中...",txConfirmed:"✅ トランザクションが確認されました!",txReverted:"❌ オンチェーンでトランザクションがリバートされました。",txTimeout:"⚠️ トランザクションは送信されましたが、タイムアウトしました。手動で確認してください。",txSuccessful:"✅ トランザクションに成功しました!",txFailed:"❌ トランザクションに失敗しました。もう一度お試しください。",txNoHandler:"⚠️ トランザクションハンドラーが設定されていません。",txInsufficientGas:"⚠️ **ガス代({symbol})が不足しています!** 保有量は {balance} {symbol} ですが、手数料に約 {fee} {symbol} 必要です。ウォレットにチャージして再試行してください。",txError:"❌ エラー: {message}",swapConfirmButton:"確定",swapConfirmValue:"スワップを確定する",swapReadyToProceed:"スワップを実行しますか?",swapEstimationError:"⚠️ スワップの見積もりを取得できません。エラー: {error}",formCancel:"キャンセル",formExecute:"実行",formProcessing:"⏳ 処理中...",formBalance:"残高:",formTokenNotFound:"ウォレット内にトークンが見つかりません。",formNoBalance:"ウォレットに {symbol} の残高がありません。",formInsufficientBalance:"残高不足です。利用可能: {balance} {symbol}",formFieldRequired:"{field} は必須項目です",formInvalidAddress:"無効なアドレスです(0x + 40文字である必要があります)",formMustBePositive:"正の数値を入力してください",formMustBeValidNumber:"有効な数値を入力してください",openChat:"チャットを開く",openChatTitle:"チャットサポートを開く",walletBalanceSpendable:"これは {chain} チェーン上のウォレットの利用可能な残高です。この取引に使用するコインを選択してください。",walletNoTokensFound:"申し訳ありませんが、{chain} チェーン上のウォレットにトークンが見つかりませんでした。取引するためのトークンを保有しているかご確認ください。",walletFetchFailed:"ウォレット残高を取得できませんでした。もう一度お試しください。",walletFetchError:"ウォレット残高の取得中にエラーが発生しました。",insufficientFeeToken:"手数料が不足しています。取引手数料をカバーするのに十分な {symbol} を保有しているか、別のトークンを選択してください。",selectAmountOf:"使用する {symbol} の数量を選択してください:\n\n利用可能: {balance} {symbol}",swapFeeWarning:"\n⚠️ **手数料の {symbol} が不足しています!**\n 保有量は {balance} {symbol} ですが、~{needed} {symbol} 必要です。\n",swapNeedApprove:"スワップを行う前に、まず {symbol} の承認が必要です。",swapApproveButton:"{symbol} を承認する",swapApproveValue:"スワップのために {symbol} を承認",swapNoSourceToken:"⚠️ ウォレットにソーストークンがないか、残高が 0 です。",swapSelectAmount:"スワップ {from} → {to}\n\nスワップする {from} の数量を選択してください:\n\n利用可能: {balance} {from}",swapApprovalRequired:"⚠️ スワップの前にトークンの承認が必要です。\n\nステップ 1: {symbol} を承認\nステップ 2: スワップを確定",swapEstimationFailed:"⚠️ スワップの見積もり取得に失敗しました。もう一度お試しください。",swapInsufficientNativeBalance:"⚠️ 残高不足です! 保有量は {balance} {symbol} ですが、{amount} {symbol} 必要です。ウォレットにチャージするか、数量を減らしてください。",swapTokenNotInWallet:"⚠️ ウォレットに {symbol} がありません。スワップする前にまず入手してください。",swapInsufficientTokenBalance:"⚠️ 残高不足です! 保有量は {balance} {symbol} ですが、{amount} {symbol} 必要です。数量を減らすか、トークンを追加してください。",selectAmountToSwap:"スwaップする {symbol} の数量を選択してください:\n\n利用可能: {balance} {symbol}",couldNotLoadTokenList:"⚠️ トークンリストを読み込めませんでした。受け取り希望のトークンを指定してください。",trendingTokensForReceive:"📈 {chain} チェーンのトレンドトークン。受け取りたいトークンを選択するか、入力してください:",txProcessing:"⏳ トランザクション処理中... ウォレットで承認してください。",txConfirmedSwap:"✅ トランザクションが確認されました!スワップが完了しました。",txRevertedSwap:"❌ オンチェーンでトランザクションがリバートされました。もう一度お試しください。",txSuccessfulSwap:"✅ トランザクションに成功しました!スワップが完了しました。",txSuccessfulSendToken:"✅ **{amount} {symbol}** を {to} に送信しました",txSuccessfulSendNative:"✅ **{amount} {symbol}** を {to} に送信しました",txSuccessfulWrapNative:"✅ **{amount} {from}** を **{to}** にラップしました",txSuccessfulUnwrapNative:"✅ **{amount} {from}** を **{to}** にアンラップしました",txSuccessfulSendNft:"✅ NFT **{name}** (#{tokenId}) を {to} に送信しました",txDataNotAvailable:"⚠️ トランザクションデータが利用できません。",approvalDataNotAvailable:"⚠️ 承認データが利用できません。",approving:"{symbol} を承認中... ウォレットで確認してください。",approvalSuccess:"✅ {symbol} の承認に成功しました!",approvalConfirmSwap:"これでスワップを実行できます。",confirmSwapButton:"スワップを確定する",approvalFailed:"❌ 承認に失敗しました。もう一度お試しください。",couldNotFetchBalance:"⚠️ ウォレット残高を取得できませんでした。",couldNotLoadBalance:"⚠️ 残高を読み込めませんでした。もう一度お試しください。",couldNotFetchBalanceRetry:"⚠️ 残高を取得できませんでした。もう一度お試しください。",nftSendReview:"📤 **{name}** ({standard} #{tokenId}) を送信\n\n内容を確認し、以下に受信者のアドレスを入力してください:",nftCollectionHeader:"您的 NFT 资产:\n\n{list}",nftMoreItems:"\n\n以及其他 {count} 件 NFT...",nftSelectBelow:"\n\n请在下方选择要发送的 NFT",nftNoCollection:"このチェーン上のウォレットにNFTは見つかりませんでした。",nftMultipleMatchesForTokenId:"ウォレット内にToken ID #{tokenId} のNFTが{count}件見つかりました。送信したいNFTを選択してください:",nftNotFoundInWallet:'あなたのNFTコレクションに "{name}" が見つかりませんでした。このチェーンでこのNFTを所有していません。',nftFetchError:"申し訳ありませんが、NFTの取得中にエラーが発生しました。",trendingTokensHeader:"📈 {chain} チェーンで現在価格が上昇中のトレンドトークン一覧です:",trendingTokensQuestion:"\n購入したいトークンはありますか?",trendingTokensError:"トレンドトークンの取得中にエラーが発生しました。",errorProcessingRequest:"リクエストの処理中にエラーが発生しました。しばらく時間を置いてからもう一度お試しください。",buttonBuyWith:"{symbol} で購入",buttonUsePercent:"{symbol}の{percent}%を使用",buttonBuyToken:"{name} ({symbol}) を購入",buttonSendNft:"{name} を送信",buttonSwapTo:"{name} ({symbol}) にスワップ",buttonBuySymbol:"{symbol} を購入",viewBalancesLoading:"ウォレットの残高を取得中...",viewBalancesHeader:"{chain} 上のトークン残高:\n\n{list}",viewBalancesEmpty:"このチェーン上のウォレットにトークンは見つかりませんでした。",viewBalancesFetchError:"残高の取得中にエラーが発生しました。",buttonSendToken:"{symbol} を送信",formMax:"最大",buttonSwapToken:"{symbol} をスワップ",buttonBuyMoreToken:"{symbol} をさらに入手",actionSendNativeLabel:"ネイティブトークンを送信",actionSendNativeDesc:"ネイティブトークン (ETH, BNB, MATIC など) をアドレスに送信します",actionSendTokenLabel:"トークンを送信 (ERC20)",actionSendTokenDesc:"ERC20トークンをアドレスに送信します",actionSwapTokenLabel:"トークンをスワップ",actionSwapTokenDesc:"トークンを別のトークンに交換します",actionApproveTokenLabel:"トークンを承認",actionApproveTokenDesc:"支出元(Spender)によるトークンの使用を許可します",actionWrapNativeLabel:"ネイティブトークンをラップ",actionWrapNativeDesc:"ネイティブトークンをラップします (ETH → WETH)",actionUnwrapNativeLabel:"ネイティブトークンをアンラップ",actionUnwrapNativeDesc:"ネイティブトークンをアンラップします (WETH → ETH)",actionSendNftLabel:"NFTを送信",actionSendNftDesc:"ERC721またはERC1155 NFTを別のアドレスに転送します",fieldToAddress:"受信者アドレス",fieldAmount:"数量",fieldTokenContract:"トークンコントラクト",fieldTokenSymbol:"トークンシンボル",fieldDecimals:"デシマル (小数桁数)",fieldTokenIn:"元のトークン",fieldTokenInSymbol:"元のシンボル",fieldTokenOut:"先のトークン",fieldTokenOutSymbol:"先のシンボル",fieldTokenInDecimals:"元のデシマル",fieldTokenOutDecimals:"先のデシマル",fieldSpenderAddress:"支出元 (Spender) アドレス",fieldAmountUnlimited:"数量 (空欄 = 無制限)",fieldNftContract:"NFTコントラクト",fieldTokenId:"トークンID",fieldTokenStandard:"トークン規格",fieldNftName:"NFT名",formMustBePositiveInteger:"正の整数を入力してください",formAmountExceedsNft:"数量は利用可能な残高 {max} を超えることはできません",receivedButtonValue:"受取額: {value}",actionExecutedFor:"アクション「{action}」が {value} に対して実行されました",buyTokenHelp:"{symbol} の購入をお手伝いします。まず、交換に使用可能なトークンを表示します。",tokenNotFoundOnChain:"このチェーン上でトークン「{symbol}」が見つかりませんでした。購入可能なトレンドトークンはこちらです",swapPreparing:"スワップの準備中...",swapConfirmYes:"はい",swapChooseFrom:"交換元(支払う)トークンを選択してください:",swapChooseTo:"{symbol} をスワップします。受け取りたいトークンを選択してください:",swapNeedDetails:"スワップの詳細が必要です。交換したいトークンを指定してください(例:「1 ETH を USDC にスワップ」)。",viewNftsLoading:"あなたのNFTコレクションを表示します!",sendTokenNotInWallet:"このチェーンのウォレットに {symbol} がありません。送信する前にまず入手してください。",sendTokenChoose:"どのトークンを送信しますか?",sendNftChoose:"どのNFTを送信しますか?",swapChooseToken:"どのトークンをスワップしますか?現在の残高はこちらです:",spendable:"利用可能",welcomeMessage:"**ようこそ! 🚀**\n次世代のブロックチェーンへ。NFT情報、トレード、価格チェック、ポートフォリオ分析など、いつでもお手伝いします。",sendOtherNfts:"\n送信したいNFTが上記のリストにない場合は、当ウェブサイトにアクセスして送信してください。",sendNftViaWebsite:"送信したいNFTをリストから選択し、当ウェブサイトで手続きを進めてください。",sendNftViaWebsiteWithLink:"送信したいNFTをリストから選択し、[当ウェブサイト]({link})で手続きを進めてください。",viewNftViaWebsite:"NFTコレクションの詳細は、当ウェブサイトでご確認ください。",viewNftViaWebsiteWithLink:"NFTコレクションの詳細は、[当ウェブサイト]({link})でご確認ください。",buyingOnChain:"{chain} チェーンで {symbol} を購入中",viewOnExplorer:"エクスプローラーで見る",copyWalletAddress:"ウォレットアドレスをコピー",copied:"コピーしました!",copyAddress:"アドレスをコピー",poolGeneralInfoIntro:"💧 **流動性プール** は、ユーザーがトークンペアを預けてDEX取引(Uniswap など)の流動性を提供するスマートコントラクトです。LP は各スワップの手数料を獲得します。",poolGeneralInfoMetricsTitle:"**主要メトリクス:**",poolGeneralInfoMetricTVL:"**TVL** - プールにロックされている総価値",poolGeneralInfoMetricAPR:"**APR** - 手数料に基づく年間想定利回り",poolGeneralInfoMetricVol24h:"**24時間出来高** - 直近24時間の取引量",poolGeneralInfoMetricFeeTier:"**手数料ティア** - 取引手数料 (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'例: *"Base の ETH/USDC プール"* や *"APR が高いプール"* のように聞いてみてください。',poolNoMatch:"❌ 条件に一致するプールが見つかりませんでした。",poolNoMatchForTokenOnChain:"❌ **{chain}** 上で **{token}** に一致するプールが見つかりませんでした。",poolSuggestionsTitle:"💡 **提案:**",poolSuggestionTryChain:"別のチェーンを試す (Ethereum, Base, Arbitrum...)",poolSuggestionTryPair:"より一般的なペアを試す (ETH/USDC, ETH/USDT)",poolSuggestionRelaxFilters:"フィルター条件を緩める",poolHeaderBest:"🏆 最適なプール",poolHeaderSafe:"🛡️ 安全性の高いプール",poolHeaderTrending:"🔥 トレンドプール",poolHeaderHighApr:"📈 APRの高いプール",poolHeaderLowFee:"💰 手数料の低いプール",poolHeaderCompare:"⚖️ プール比較",poolHeaderDetail:"🔎 プール詳細",poolHeaderGeneral:"💧 プール情報",poolHeaderSearch:"🔍 検索結果",poolTableMetric:"指標",poolTableValue:"値",poolTableLink:"リンク",poolLinkView:"Uniswapで表示",poolRecommendationHighApr:"👉 **おすすめ:** [{pair}]({link}) - APR は **{apr}%** で最も高いです。_注意: APR が高いほどリスクも高い可能性があります。_",poolRecommendationLowFee:"👉 **おすすめ:** [{pair}]({link}) - 手数料 **{fee}%** で、頻繁な取引に適しています。",poolRecommendationSafe:"👉 **おすすめ:** [{pair}]({link}) - TVL **{tvl}** で流動性が厚く安定しています。",poolRecommendationTrending:"👉 **最も活発:** [{pair}]({link}) - 24時間出来高 **{volume}** で取引が最も活発です。",poolRecommendationTopPick:"👉 **トップ候補:** [{pair}]({link}) - TVL **{tvl}**、条件に最も適合しています。",sendPositionNoId:'LP ポジション ID を提供してください。例:"ポジション 12345 を 0x... に送信"。',sendPositionNotFound:"{chain} 上のウォレットにポジション #{id} が見つかりませんでした。このポジションを所有していることを確認してください。",sendPositionReview:"📤 LP ポジション **#{positionId}** ({pair}) を送信\n\n受取人アドレスを以下に入力してください:",sendPositionFetchError:"ポジションの取得中にエラーが発生しました。もう一度お試しください。",poolUnsupportedChain:"このチェーンはデータクエリに対応していません。ご不便をおかけして申し訳ございません。",poolUniswapV3Only:"Subgraph Uniswap V3 上のプールの情報のみ取得できます。"},cn:{chatTitle:"Keyring Agent",closeChat:"关闭聊天",messagePlaceholder:"请输入消息....",sendMessage:"发送消息",botIsTyping:"机器人正在输入",canIHelpYou:"有什么我可以帮您的吗?",replyToMessage:"回复消息",replyingTo:"正在回复",replyingToYou:"您",replyingToAgent:"Keyring Agent",cancelReply:"取消回复",suggestionAskText:"提问",suggestionAskUserMessage:"我有一个问题",suggestionAskBotReply:"随便问我任何事情",suggestionBuyText:"购买热门代币",walletConnectedChainUnsupported:"您的钱包已连接,但当前链不支持交易。请切换到支持的链以查看热门代币。",walletNotConnected:"请连接您的钱包以查看热门代币。",actionProcessing:"⏳ 正在处理交易...",actionSuccess:"✅ 交易已完成",actionFail:"❌ 操作取消或失败",txSubmitted:"⏳ 交易已提交。正在等待确认...",txConfirmed:"✅ 交易已确认!",txReverted:"❌ 交易在链上被退回(Reverted)。",txTimeout:"⚠️ 交易已提交但确认超时。请手动检查。",txSuccessful:"✅ 交易成功!",txFailed:"❌ 交易失败。请重试。",txNoHandler:"⚠️ 未配置交易处理器。",txInsufficientGas:"⚠️ **{symbol} 余额不足以支付 Gas 费!** 您当前有 {balance} {symbol},但交易费预计需要 ~{fee} {symbol}。请充值钱包后重试。",txError:"❌ 错误: {message}",swapConfirmButton:"确认",swapConfirmValue:"确认兑换",swapReadyToProceed:"准备好进行兑换了吗?",swapEstimationError:"⚠️ 无法获取兑换估算。错误: {error}",formCancel:"取消",formExecute:"执行",formProcessing:"⏳ 正在处理...",formBalance:"余额:",formTokenNotFound:"您的钱包中未找到该代币。",formNoBalance:"您的钱包中没有 {symbol} 余额。",formInsufficientBalance:"余额不足。可用余额: {balance} {symbol}",formFieldRequired:"{field} 是必填项",formInvalidAddress:"无效地址(必须是 0x + 40 个字符)",formMustBePositive:"必须为正数",formMustBeValidNumber:"必须为有效数字",openChat:"打开聊天",openChatTitle:"打开聊天支持",walletBalanceSpendable:"这是您在 {chain} 链上钱包的可选余额。请选择您想用于此次交易的代币。",walletNoTokensFound:"抱歉,我在 {chain} 链上的钱包中没找到任何代币。请确保您有代币可以进行交易。",walletFetchFailed:"抱歉,无法获取您的钱包余额。请重试。",walletFetchError:"抱歉,获取钱包余额时出错。",insufficientFeeToken:"手续费不足。请确保您有足够的 {symbol} 来支付交易费用,或选择其他代币。",selectAmountOf:"选择要使用的 {symbol} 数量:\n\n可用余额: {balance} {symbol}",swapFeeWarning:"\n⚠️ **手续费所需的 {symbol} 不足!**\n 您当前有 {balance} {symbol},但需要 ~{needed} {symbol}。\n",swapNeedApprove:"在兑换之前,您需要先授权 {symbol}。",swapApproveButton:"授权 {symbol}",swapApproveValue:"授权 {symbol} 以进行兑换",swapNoSourceToken:"⚠️ 您的钱包中没有源代币或余额为 0。",swapSelectAmount:"兑换 {from} → {to}\n\n选择要兑换的 {from} 数量:\n\n可用余额: {balance} {from}",swapApprovalRequired:"⚠️ 兑换前需要代币授权。\n\n第 1 步:授权 {symbol}\n第 2 步:确认兑换",swapEstimationFailed:"⚠️ 获取兑换估算失败。请重试。",swapInsufficientNativeBalance:"⚠️ 余额不足!您有 {balance} {symbol} 但需要 {amount} {symbol}。请充值钱包或减少金额。",swapTokenNotInWallet:"⚠️ 您的钱包中没有 {symbol}。请在兑换前先获取一些代币。",swapInsufficientTokenBalance:"⚠️ 余额不足!您有 {balance} {symbol} 但需要 {amount} {symbol}。请减少金额或添加更多代币。",selectAmountToSwap:"选择要兑换的 {symbol} 数量:\n\n可用余额: {balance} {symbol}",couldNotLoadTokenList:"⚠️ 无法加载代币列表。请指定目标代币。",trendingTokensForReceive:"📈 {chain} 链上的热门代币。请选择您想收到的代币或输入代币名称:",txProcessing:"⏳ 交易处理中... 请在钱包中确认。",txConfirmedSwap:"✅ 交易已确认!您的兑换已完成。",txRevertedSwap:"❌ 交易在链上被退回。请重试。",txSuccessfulSwap:"✅ 交易成功!您的兑换已完成。",txSuccessfulSendToken:"✅ 已成功发送 **{amount} {symbol}** 至 {to}",txSuccessfulSendNative:"✅ 已成功发送 **{amount} {symbol}** 至 {to}",txSuccessfulWrapNative:"✅ 成功封装 **{amount} {from}** → **{to}**",txSuccessfulUnwrapNative:"✅ 成功解封装 **{amount} {from}** → **{to}**",txSuccessfulSendNft:"✅ 已成功发送 NFT **{name}** (#{tokenId}) 至 {to}",txDataNotAvailable:"⚠️ 交易数据不可用。",approvalDataNotAvailable:"⚠️ 授权数据不可用。",approving:"正在授权 {symbol}... 请在钱包中确认。",approvalSuccess:"✅ {symbol} 授权成功!",approvalConfirmSwap:"现在您可以执行兑换了。",confirmSwapButton:"确认兑换",approvalFailed:"❌ 授权失败。请重试。",couldNotFetchBalance:"⚠️ 无法获取您的钱包余额。",couldNotLoadBalance:"⚠️ 无法加载余额。请重试。",couldNotFetchBalanceRetry:"⚠️ 无法获取您的余额。请重试。",nftSendReview:"📤 发送 **{name}** ({standard} #{tokenId})\n\n请核对并在下方填写接收者地址:",nftCollectionHeader:"保有中のNFT一覧 :\n\n{list}",nftMoreItems:"\n\n他 {count} 件のNFT...",nftSelectBelow:"\n\n送信するNFTを以下から選択してください",nftNoCollection:"您在该链的钱包中没有任何 NFT。",nftMultipleMatchesForTokenId:"在您的钱包中找到了 {count} 个 Token ID #{tokenId} 的 NFT。请选择您要发送的 NFT:",nftNotFoundInWallet:'我在您的 NFT 收藏中没找到 "{name}"。您在此链上不拥有此 NFT。',nftFetchError:"抱歉,获取您的 NFT 时出错。",trendingTokensHeader:"📈 以下是 {chain} 链上目前呈上升趋势的热门代币列表",trendingTokensQuestion:"\n有您想购买的代币吗?",trendingTokensError:"抱歉,获取热门代币时出错。",errorProcessingRequest:"抱歉,处理您的请求时出错。请稍后再试。",buttonBuyWith:"使用 {symbol} 购买",buttonUsePercent:"使用{percent}%的{symbol}",buttonBuyToken:"购买 {name} ({symbol})",buttonSendNft:"发送 {name}",buttonSwapTo:"兑换为 {name} ({symbol})",buttonBuySymbol:"购买 {symbol}",viewBalancesLoading:"正在获取您的钱包余额...",viewBalancesHeader:"您在 {chain} 上的代币余额:\n\n{list}",viewBalancesEmpty:"您在该链的钱包中没有任何代币。",viewBalancesFetchError:"抱歉,获取您的余额时出错。",buttonSendToken:"发送 {symbol}",formMax:"最多",buttonSwapToken:"兑换 {symbol}",buttonBuyMoreToken:"购买更多 {symbol}",actionSendNativeLabel:"发送原生代币",actionSendNativeDesc:"将原生代币 (ETH, BNB, MATIC 等) 发送到指定地址",actionSendTokenLabel:"发送代币 (ERC20)",actionSendTokenDesc:"将 ERC20 代币发送到指定地址",actionSwapTokenLabel:"兑换代币",actionSwapTokenDesc:"将一种代币兑换为另一种",actionApproveTokenLabel:"授权代币",actionApproveTokenDesc:"授权支出方使用您的代币",actionWrapNativeLabel:"包装 (Wrap) 原生代币",actionWrapNativeDesc:"包装原生代币 (例如 ETH → WETH)",actionUnwrapNativeLabel:"解包 (Unwrap) 原生代币",actionUnwrapNativeDesc:"解包原生代币 (例如 WETH → ETH)",actionSendNftLabel:"发送 NFT",actionSendNftDesc:"将 ERC721 或 ERC1155 NFT 转移到另一个地址",fieldToAddress:"接收者地址",fieldAmount:"金额",fieldTokenContract:"代币合约",fieldTokenSymbol:"代币符号",fieldDecimals:"精度 (Decimals)",fieldTokenIn:"源代币 (From)",fieldTokenInSymbol:"源代币符号",fieldTokenOut:"目标代币 (To)",fieldTokenOutSymbol:"目标代币符号",fieldTokenInDecimals:"源代币精度",fieldTokenOutDecimals:"目标代币精度",fieldSpenderAddress:"支出方 (Spender) 地址",fieldAmountUnlimited:"金额 (留空 = 无限制)",fieldNftContract:"NFT 合约",fieldTokenId:"代币 ID",fieldTokenStandard:"代币标准",fieldNftName:"NFT 名称",formMustBePositiveInteger:"必须为正整数",formAmountExceedsNft:"金额不能超过可用余额 {max}",receivedButtonValue:"收到: {value}",actionExecutedFor:'操作 "{action}" 已执行,对象为: {value}',buyTokenHelp:"我会帮您购买 {symbol}。让我为您显示可用于交易的代币。",tokenNotFoundOnChain:'我在该链上没找到代币 "{symbol}"。以下是您可以购买的热门代币',swapPreparing:"正在准备兑换...",swapConfirmYes:"是",swapChooseFrom:"请选择您想从哪个代币进行兑换:",swapChooseTo:"您想兑换 {symbol}。请选择您想收到的代币:",swapNeedDetails:"我需要更多关于兑换的细节。请指定您想兑换的代币(例如 “将 1 ETH 兑换为 USDC”)。",viewNftsLoading:"正在为您展示 NFT 收藏!",sendTokenNotInWallet:"您的钱包中在此链上没有 {symbol}。请在发送前先获取一些代币。",sendTokenChoose:"您想发送哪个代币?",sendNftChoose:"您想发送哪个 NFT?",swapChooseToken:"您想兑换哪个代币?以下是您的当前余额:",spendable:"可用余额",welcomeMessage:"**欢迎您!🚀**\n带你一起探索新一代区块链世界。我可以随时为您提供NFT资讯、交易支持、价格查询以及投资组合分析等服务。",sendOtherNfts:"\n如果您想发送的NFT不在上述列表中,请访问我们的网站进行发送。",sendNftViaWebsite:"请从列表中选择您想发送的NFT,并通过这个网站继续操作。",sendNftViaWebsiteWithLink:"请从列表中选择您想发送的NFT,并通过[这个网站]({link})继续操作。",viewNftViaWebsite:"如需查看更多详情,请在这个网站查看您的NFT收藏。",viewNftViaWebsiteWithLink:"如需查看更多详情,请在[这个网站]({link})查看您的NFT收藏。",buyingOnChain:"正在 {chain} 链上购买 {symbol}",viewOnExplorer:"在区块浏览器查看",copyWalletAddress:"复制钱包地址",copied:"已复制!",copyAddress:"复制地址",poolGeneralInfoIntro:"💧 **流动性池** 是用户存入代币对、为 DEX(如 Uniswap)提供流动性的智能合约。流动性提供者(LP)可从每笔兑换中获得手续费收益。",poolGeneralInfoMetricsTitle:"**关键指标:**",poolGeneralInfoMetricTVL:"**TVL** - 池中锁仓总价值",poolGeneralInfoMetricAPR:"**APR** - 基于手续费估算的年化收益",poolGeneralInfoMetricVol24h:"**24小时成交量** - 最近24小时交易量",poolGeneralInfoMetricFeeTier:"**费率档位** - 交易费率 (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'你可以更具体地提问,例如:*"Base 上的 ETH/USDC 池"* 或 *"APR 最高的池"*。',poolNoMatch:"❌ 未找到匹配的流动性池。",poolNoMatchForTokenOnChain:"❌ 在 **{chain}** 上未找到 **{token}** 的匹配池。",poolSuggestionsTitle:"💡 **建议:**",poolSuggestionTryChain:"尝试其他链(Ethereum、Base、Arbitrum...)",poolSuggestionTryPair:"尝试更热门的交易对(ETH/USDC、ETH/USDT)",poolSuggestionRelaxFilters:"放宽筛选条件",poolHeaderBest:"🏆 最佳流动性池",poolHeaderSafe:"🛡️ 更稳健的流动性池",poolHeaderTrending:"🔥 热门流动性池",poolHeaderHighApr:"📈 高 APR 流动性池",poolHeaderLowFee:"💰 低费率流动性池",poolHeaderCompare:"⚖️ 流动性池对比",poolHeaderDetail:"🔎 流动性池详情",poolHeaderGeneral:"💧 流动性池信息",poolHeaderSearch:"🔍 搜索结果",poolTableMetric:"指标",poolTableValue:"数值",poolTableLink:"链接",poolLinkView:"在 Uniswap 查看",poolRecommendationHighApr:"👉 **推荐:**[{pair}]({link}) - APR 最高,为 **{apr}%**。_注意:APR 越高通常风险也越高。_",poolRecommendationLowFee:"👉 **推荐:**[{pair}]({link}) - 费率仅 **{fee}%**,适合高频交易。",poolRecommendationSafe:"👉 **推荐:**[{pair}]({link}) - TVL 达 **{tvl}**,流动性更充足且相对稳定。",poolRecommendationTrending:"👉 **最活跃:**[{pair}]({link}) - 24 小时成交量 **{volume}**,交易最活跃。",poolRecommendationTopPick:"👉 **首选:**[{pair}]({link}) - TVL **{tvl}**,最符合你的筛选条件。",sendPositionNoId:'请提供您的 LP 仓位 ID 以便转出。例如:"发送仓位 12345 至 0x..."。',sendPositionNotFound:"在 {chain} 上的钱包中未找到仓位 #{id}。请确认您拥有该仓位。",sendPositionReview:"📤 发送 LP 仓位 **#{positionId}** ({pair})\n\n请在下方填写接收者地址:",sendPositionFetchError:"获取您的仓位时出错。请重试。",poolUnsupportedChain:"该链不支持数据查询,给您带来不便,深表歉意。",poolUniswapV3Only:"我只能获取 Subgraph Uniswap V3 上的流动性池信息。"}};function h(e,t){return d[t]?.[e]??d.en[e]??e}const p=s(void 0),m=({children:t,initialLanguage:n="en"})=>{const[r,s]=o(n);i(()=>{n&&s(n)},[n]);const c=a(e=>h(e,r),[r]),u=a((e,t)=>function(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>t[n]??`{${n}}`)}(h(e,r),t),[r]);/* @__PURE__ */
3
- return e(p.Provider,{value:{language:r,setLanguage:s,t:c,ti:u},children:t})},w=()=>{const e=c(p);if(!e)throw new Error("useLanguage must be used within a LanguageProvider");return e},g=u(({onClick:t,buttonSize:n=56,customIcon:r,customChatButton:o})=>{const{t:i}=w(),a=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())};return o?/* @__PURE__ */e("div",{onClick:t,onKeyDown:a,role:"button",tabIndex:0,children:o}):/* @__PURE__ */e("button",{className:"chat-button",onClick:t,onKeyDown:a,"aria-label":i("openChat"),title:i("openChatTitle"),type:"button",style:{width:n,height:n,aspectRatio:1},children:/* @__PURE__ */e("img",{draggable:!1,style:{width:n,height:n,objectFit:"contain"},src:r||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAYAAADG4PRLAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAfXSURBVHgB7Z1LbFRVGMe/c4YCAmKrEFiQWIIrNm13RE0olLRuTCq4w4C6Mbopo9GltFsVpmxQN1pJ2MkjcSMESrsgYdd2w8rGkrCA8GjFVintzPH878wZjrfzujPTe88p3y+ZzMydOxO4//s9z3dvBTWB7sxsqyTqF2q5k4R8nUh06s2thQeTZyZ4qOwU0bqJFkHjv6fbZqhBBNVJIJqiASFUN94SExl98CeVEsONiBlZQEu4E8QW1kTUSAvJoahCRhLw4OnZkyzc6qItcnD087ahWvevScB3MrPty6QuKaJOYuJgpoXEgVqsUVbboef07PElUhMsXqy045j3ZB72V9uxooCHtMskoUaIXWYS6GMuLyFsVdqprAuFeEqoQWISp1JcLClgz3fadFPy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LmWgWXGSbaH2OnvDWmVG6QhDhOTFMwwi2THC6sDtVMZAENebea7daJ7AAX/nUzprP98XqEM9QtoI0RUyjRqS2zg/Kxsp2YAFhYfnhMTeo3d5RQOsalLtcrms1//TyUbJOo0HUAAAAASUVORK5CYII=",alt:"Ask AI"})})}),y={data:/* @__PURE__ */JSON.parse('[{"question":{"en":"Unveiling the Truth of Liquidity Pools & Earn Over 20% APR. How Is This Possible?"},"answer":{"en":"The high APR of liquidity pools like Uniswap comes from: Trading fees, Compensation for impermanent loss, Yieldfarming incentives, Market volatility in high-trading-volume pools"}},{"question":{"en":"What Is a Liquidity Pool?"},"answer":{"en":"A liquidity pool is a smart contract that holds two tokens and facilitates swaps using an AMM model. Liquidity providers (LPs) deposit tokens and earn trading fees from transactions in the pool."}},{"question":{"en":"What Are the Benefits of Liquidity Providers?"},"answer":{"en":"Liquidity providers (LPs) earn passive income by supplying tokens to pools, benefiting from trading fees, improved capital efficiency, yield farming rewards, and permissionless participation, while also potentially increasing their total coin holdings over time."}},{"question":{"en":"What risks do liquidity providers (LPs) face when providing liquidity?"},"answer":{"en":"Yes. While providing liquidity can generate returns, it also comes with certain risks that users should be aware of.\\nKey Risks\\nOut-of-Range Risk: If the market price moves outside your selected range, your liquidity becomes inactive. You stop earning fees and may end up holding only one asset in the pair. Adjusting or removing liquidity may be necessary.\\nImpermanent Loss: Significant price changes between the paired assets can reduce the value of your position compared to simply holding them.\\nAsset Imbalance: Over time, one asset may dominate the position, leaving you with an uneven or single-token exposure."}},{"question":{"en":"What is CoinPool?"},"answer":{"en":"CoinPool is a platform that provides a streamlined, non-custodial interface for accessing and managing liquidity positions across supported decentralized finance (DeFi) protocols.\\nIt simplifies how users interact with liquidity pools, making it easier to discover, enter, and manage positions, all while maintaining full control of their assets."}},{"question":{"en":"How Do I Get Started with CoinPool?"},"answer":{"en":"For example, if you hold USDC and select the ETH/WBTC pair, CoinPool will automatically swap USDC into ETH and WBTC, then create a liquidity position for you, making it easy to provide liquidity to the pool."}},{"question":{"en":"Why Should You Use CoinPool?"},"answer":{"en":"CoinPool simplifies and optimizes earning potential by prioritizing high-APR pools to maximize returns, while handling all liquidity provisioning automatically—eliminating the need for manual swaps or rebalancing. With just a single asset deposit, CoinPool seamlessly manages the process to generate efficient passive income."}},{"question":{"en":"What does CoinPool allow users to do?"},"answer":{"en":"CoinPool allows users to create an LP position with a single token, eliminating the need for direct access and manual operations on sites like Uniswap."}},{"question":{"en":"How do you manage Liquidity Positions (LPs)?"},"answer":{"en":"You can manage your LP position directly using the KEYRING PRO app. Since your LP NFT is linked to your wallet, CoinPool only provides smooth access to manage your position but does not hold or control your assets."}},{"question":{"en":"Why Should I Use the ‘High APR Pairs’ Feature?"},"answer":{"en":"The ‘High APR Pairs’ feature helps users quickly add liquidity to high-yield pools without needing to create a new pair, streamlining the liquidity provision process. Notice: Always select pairs from verified and reliable creators to ensure the best security and returns."}},{"question":{"en":"What is the Earnings Overview Dashboard?"},"answer":{"en":"The Earnings Overview Dashboard provides a clear summary of your liquidity value and earnings from providing liquidity, along with the average APR. It also allows you to view other users’ LP earnings and follow their strategies for insight and inspiration."}},{"question":{"en":"What tokens can I use to add liquidity?"},"answer":{"en":"CoinPool supports ETH. Users can use any of these assets, and CoinPool will automatically swap them into the required token pairs for liquidity provision."}},{"question":{"en":"How does CoinPool simplify liquidity provision?"},"answer":{"en":"Instead of manually swapping and balancing tokens, CoinPool automates the entire process. Users can simply deposit a single asset, and CoinPool will convert, balance, and provide liquidity in the selected pool, prioritizing those with the best APRs."}},{"question":{"en":"Can I create my own liquidity pool?"},"answer":{"en":"Yes! CoinPool allows users to create custom liquidity pools instead of joining existing ones. Users can also invite others to contribute liquidity to their pools."}},{"question":{"en":"How do I earn from providing liquidity?"},"answer":{"en":"Liquidity providers earn a share of trading fees generated by the pool.\\nTrading volume of the pool – Higher activity means more fees.\\nYour liquidity share – The more you contribute, the more you earn.\\nFee tier selection – Pools with higher fee tiers may generate higher earnings but attract fewer trades."}},{"question":{"en":"How do I choose the right fee tier when adding liquidity?"},"answer":{"en":"0.01% → Best for stablecoin pairs (e.g., USDT/USDC).\\n0.05% → Best for low-volatility tokens.\\n0.3% (Default) → Best for most trading pairs.\\n1% → Best for high-volatility, low-liquidity pairs.\\nIf unsure, check existing pools to see the most commonly used fee rate."}},{"question":{"en":"Can I lose money by providing liquidity?"},"answer":{"en":"Yes, the biggest risk is impermanent loss, which happens when token prices change significantly after you deposit them. However, this loss can be offset by the trading fees earned from the pool."}},{"question":{"en":"What happens if my liquidity goes out of range?"},"answer":{"en":"If you provide liquidity within a specific price range (Uniswap V3 model), your position can become inactive when the market price moves beyond your set range.\\nYou stop earning fees.\\nYour balance shifts toward one of the two tokens in the pair.\\nTo reactivate, you need to remove and re-add liquidity at a new range."}},{"question":{"en":"What is the difference between \'Collect Profit\' and \'Delete the Pair and Collect Profit\'?"},"answer":{"en":"\'Collect Profit\' – Withdraw only profit.\\n\'Delete the Pair and Collect Profit\' – Withdraw both initial liquidity and profit."}},{"question":{"en":"What is the URL of the CoinPool website?"},"answer":{"en":"The official website URL is https://coinpool.app/"}},{"question":{"en":"Where can I find pools with high volume-to-liquidity ratio?"},"answer":{"en":"You can find pools with a high volume-to-liquidity ratio on this page: https://coinpool.app/pool-ranking"}},{"question":{"en":"Where can I see my earnings or liquidity profits?"},"answer":{"en":"You can track your earnings and liquidity performance here: https://coinpool.app/earnings-overview"}},{"question":{"en":"Where can I view my NFT pools?"},"answer":{"en":"You can check your NFT pools on this page:https://coinpool.app/my-liquidity"}},{"question":{"en":"Where can I create or choose a pair to create a pool?"},"answer":{"en":"You can create or choose a pair to create a pool here: https://coinpool.app/pair"}},{"question":{"en":"What are CoinPool fee tiers?"},"answer":{"en":"0.01% - Used for highly stable pairs like stablecoin-to-stablecoin.\\n0.05% - Used for relatively stable pairs such as ETH/stETH.\\n0.3% - Used for most standard trading pairs.\\n1% - Used for minor or highly volatile pairs, such as meme coins."}},{"question":{"en":"What does the Min value mean when providing liquidity?"},"answer":{"en":"Min is the lowest price of Token A in terms of Token B at which you are willing to provide liquidity.If the price drops below this level, your liquidity will not be used in the pool. This helps protect your assets from excessive price drops.\\nExample: You create an ETH/USDC pair and set Min = 2000 USDC/ETH. If ETH\'s price falls below 2000 USDC, your liquidity will no longer be used."}},{"question":{"en":"What does the Max value mean when providing liquidity?"},"answer":{"en":"Max is the highest price of Token A in terms of Token B at which you are willing to provide liquidity. If the market price of Token A exceeds this limit, your liquidity will not be used for transactions. The main purpose of setting a Max value is to protect your liquidity from excessive price fluctuations. \\nExample: You create an ETH/USDC pair and set Max = 4000 USDC/ETH. If ETH\'s price rises above 4000 USDC, your liquidity will no longer be used for trading."}},{"question":{"en":"When should you choose the 0.01% fee tier when creating a pair?"},"answer":{"en":"0.01% - Best for very stable pairs. \\nSuitable for pairs with extremely low volatility, such as USDT/USDC. \\nThese pairs have almost no price fluctuation risk, so a low fee attracts more traders. \\nIdeal for those who want to provide liquidity long-term with stable returns."}},{"question":{"en":"When should you choose the 0.05% fee tier when creating a pair?"},"answer":{"en":"0.05% - Best for stable pairs.\\nWorks well for stablecoin pairs or low volatility pairs like ETH/stETH.\\nOffers a reasonable fee higher than 0.01% while still attracting traders.\\nA great choice for liquidity providers seeking earnings while maintaining low fees to encourage trading."}},{"question":{"en":"When should you choose the 0.3% fee tier when creating a pair?"},"answer":{"en":"0.3% - Best for most pairs.\\nThe standard fee for most trading pairs, including popular ones like ETH/USDC, BTC/ETH.\\nSuitable for high-liquidity pairs with some level of price fluctuation.\\nA balanced choice for liquidity providers who want both trading volume and fee income."}},{"question":{"en":"When should you choose the 1% fee tier when creating a pair?"},"answer":{"en":"1% - Best for exotic pairs. \\nDesigned for low-liquidity or highly volatile trading pairs, such as new or lesser-known tokens.\\nSince these pairs have higher risks, the high fee compensates liquidity providers.\\nA good choice if you are providing liquidity for new tokens and want to earn higher fees."}},{"question":{"en":"Would you like to add more liquidity to this position?"},"answer":{"en":"Select an existing liquidity pair to add more liquidity and increase your potential rewards.\\nYour liquidity will be locked in the pool until you decide to withdraw.\\nAdding liquidity may affect trading fees and rewards earned from swaps in the pool."}},{"question":{"en":"When can I collect earnings in CoinPool?"},"answer":{"en":"You can withdraw your accumulated rewards from the liquidity pool at any time. Collected rewards will be sent directly to your connected wallet."}},{"question":{"en":"Delete your liquidity & collect liquidity and earnings"},"answer":{"en":"This option allows you to withdraw both your initial liquidity and any earned rewards. Once removed, your liquidity will no longer participate in earning trading fees. This action does not burn your NFT, so you can reuse it later if needed."}},{"question":{"en":"What is the Repositioning feature and when should you use it?"},"answer":{"en":"When your liquidity position goes out of range, you can use the Repositioning feature to reconfigure the pair by setting your preferred Max Price and Min Price.\\nA wider price range provides more stable but lower fee income, while a narrower range can increase your potential returns.\\nf you want to adjust your position and narrow your range to boost fee earnings, please use this feature.\\nPlease note that DEX fees will apply each time the pool is reconfigured.\\nUncollected earnings are not added to liquidity but are returned to your wallet."}},{"question":{"en":"How does the auto-repositioning BOT work in CoinPool?"},"answer":{"en":"You can set the BOT to automatically reposition your liquidity pool whenever it goes out of range. When your pool’s liquidity falls outside the preset range, the BOT will automatically reconfigure the pool. Once automatic positioning is enabled, the BOT will continue to reposition based on the same settings until you manually stop it. \\nThis significantly reduces the time your liquidity stays outside the range, helping to maximize your potential fee income. The BOT does not operate in real time — it checks positions once every hour, and repositioning may occasionally fail. Please note that DEX fees apply for each automatic reconfiguration. Frequent reconfigurations may lead to net fee losses. Uncollected earnings are not added to liquidity but are returned to your wallet."}},{"question":{"en":"What is NFT burning?"},"answer":{"en":"Burning an NFT means permanently removing the NFT that represents your liquidity position. Once burned, the NFT cannot be restored, and all associated benefits will be lost. Only burn if you are sure you no longer need the NFT and have already withdrawn all liquidity."}},{"question":{"en":"When is the data updated?"},"answer":{"en":"Data is aggregated and updated at 00:00 UTC.\\nStarting from 23:00 UTC, LP token data is sequentially retrieved from the blockchain. The displayed values are then calculated based on the rates at 00:00 UTC. Please note that discrepancies may occur between the figures shown in the earnings overview and the actual values. The figures presented in the earnings summary are for reference only."}},{"question":{"en":"How can I view and manage my purchased token packages?"},"answer":{"en":"View your purchased token packages here \'https://coinpool.app/package\'. Each package is stored in a Token Bound Account (TBA), where you can easily check the included tokens and their asset value.\\nYou can unpack your package, the unpacked tokens will be sent to your connected wallet. Or you can unpack&Swap USDC, all tokens in your package will be swapped to USDC and sent to your connected wallet."}},{"question":{"en":"Can I create a custom token package?"},"answer":{"en":"You can create a custom package tailored to your investment preferences."}},{"question":{"en":"Token Bound Account 6551 (TBA)"},"answer":{"en":"A Token Bound Account (TBA), defined by the ERC-6551 Ethereum standard, is a smart contract wallet linked to an ERC-721 NFT. Your token package is securely stored in a TBA, which you can manage effortlessly through your account."}},{"question":{"en":"Which company developed the CoinPool website?"},"answer":{"en":"CoinPool is a platform developed by Bacoor Company in 2025"}},{"question":{"en":"How can I find the highest APR pair to start providing liquidity on this site?"},"answer":{"en":"Sorted by the highest APR, you can easily find the most suitable liquidity pool and start providing liquidity on this site!"}},{"question":{"en":"What is the purpose of the pair list section?"},"answer":{"en":"This section displays token pairs created by all this site\'s members.\\n• You can select a pair and add liquidity without creating a new one.\\n• Before adding liquidity, check details such as volume, APR, and current liquidity."}},{"question":{"en":"What is Buy Package on CoinPool?"},"answer":{"en":"Buy Package is a CoinPool feature that lets users purchase multiple tokens in one transaction and store them in a Smart Contract wallet (NFT TBA - ERC-6551). simply select your tokens and pay with ETH."}},{"question":{"en":"How to Buy Package on CoinPool?"},"answer":{"en":"Please check the guide here: https://coinpool.app/top?tab=buypack"}},{"question":{"en":"How To Unpack To Your Wallet on CoinPool?"},"answer":{"en":"Please check the guide here: https://coinpool.app/top?tab=buypack"}},{"question":{"en":"Why do I need to register my Solana Wallet?"},"answer":{"en":"CoinPool automatically recognizes your EVM-compatible wallet addresses.\\nSince Solana operates outside the EVM ecosystem, you must manually register your Solana address with CoinPool.\\nTo use CoinPool features on Solana-such as tracking and adding liquidity-you must also connect your Solana wallet.\\nOnce registered, this address cannot be changed."}},{"question":{"en":"What should I consider on the Pair Selection Screen before providing liquidity?"},"answer":{"en":"On the \'Select Pair\' screen, you\'ll see the total market cap and 24-hour trading volume for each cryptocurrency. The more rocket symbols, the more actively the asset is traded.\\n\\nEach trading pair also displays the available liquidity range and associated fees. Generally, higher fees suggest smaller or more volatile coins — offering higher potential returns, but also higher risk.\\nPlease check the guide here: https://coinpool.app/top?tab=pool"}},{"question":{"en":"Why should I use CoinPool?"},"answer":{"en":"CoinPool streamlines liquidity provision by removing the usual friction of manual swaps and asset balancing. Everything is handled in a single flow, allowing you to participate in high-APR pools more efficiently. With just one asset (such as ETH), CoinPool automatically performs the necessary swaps, balances the pair, and creates an optimized liquidity position on your behalf. It also surfaces high-performing pools, helping you identify better yield opportunities without the need for constant tracking.\\nKey Benefits\\nOptimized APR Selection: Prioritizes high-yield pools to help maximize returns.\\nStreamlined Liquidity Provision: Eliminates manual swaps and rebalancing steps.\\nSeamless Passive Income: Deposit a single asset, and CoinPool manages the rest automatically."}},{"question":{"en":"Is Coinpool Safe?"},"answer":{"en":"CoinPool operates as a non-custodial, interface-only service, meaning you remain in full control of your assets at all times.It does not take custody of funds, store private keys or seed phrases, or manage user wallets. CoinPool also does not deploy or control liquidity pools, bridges, or smart contracts. All transactions are executed directly on public blockchains and must be authorized and signed by your own wallet. Once confirmed on-chain, transactions are final and cannot be reversed.All transactions are executed directly on public blockchains and must be authorized and signed by your own wallet. Once confirmed on-chain, transactions are final and cannot be reversed. As a result, CoinPool does not have the ability to cancel, modify, recover, or refund any transaction or digital asset."}},{"question":{"en":"Is Coinpool Easy to use?"},"answer":{"en":"Ease of use can vary depending on the user, but overall feedback has been positive. Many users find CoinPool intuitive and straightforward to navigate. The interface is clean and well-structured, with clearly organized sections. Each feature includes simple explanations of its purpose, making it easier to understand and use effectively. CoinPool is built with users in mind, and the experience is continuously refined to make interactions as smooth and accessible as possible."}},{"question":{"en":"What is a Sub-Account"},"answer":{"en":"A sub-account is an additional account designed for operational use, allowing activities to be managed from a separate wallet address while remaining under the control of a main account.\\nUnlike a regular wallet, a sub-account is a smart contract address with no private key. It operates based on predefined rules, and only the main account (owner address) has the authority to transfer its assets. No other address can move funds from a sub-account.\\nMain Account (Owner Address)\\nThe primary wallet that has full control, including managing all sub-accounts and their assets.\\nSub-Account\\nA smart contract-based account created by the owner for operational purposes, without its own private key.\\nOperation Address\\nA separate wallet address assigned by the owner to perform operational actions for specific sub-accounts. This address is limited to operations only and cannot transfer assets. It must be a newly created wallet used exclusively for this purpose."}},{"question":{"en":"Why should I create Sub-Account"},"answer":{"en":"A sub-account allows you to entrust liquidity management to a more experienced operator, helping streamline decisions like pool selection and liquidity provision.\\nThis can save time and reduce the need for in-depth research, as operational tasks are handled on your behalf. It’s especially useful for users who prefer a more hands-off approach.\\nAt the same time, you remain in control. You decide how much capital is allocated to the sub-account, allowing you to manage risk while optimizing potential returns.\\nHowever, this setup requires trust, as you are choosing to assign control over operations to an operator."}},{"question":{"en":"What is Operators"},"answer":{"en":"Operators are trusted parties authorized by the user to manage certain activities on their behalf, such as adding liquidity to pools and optimizing yield strategies.\\nThey act through an Operation Address, which is a wallet designated by the owner to handle sub-account operations.\\nOperation-Only Account (Operation Address)\\nThis is a specific wallet assigned by the owner to manage sub-accounts. It is limited to operational tasks, such as pool configuration and swaps, and cannot transfer or withdraw assets."}},{"question":{"en":"Can Operators access my assets?"},"answer":{"en":"No. Operators cannot access or take control of your funds.\\nWhen you deposit assets, they are stored in your sub-account (a smart contract). Operators can use those assets only to perform approved actions, such as adding liquidity to pools.\\nAny LP tokens received are also held within the sub-account. Operators are only able to return assets and LP tokens back to your main wallet—they cannot withdraw them to their own wallet or any other address."}},{"question":{"en":"Can I stop using operator and Sub-Account?"},"answer":{"en":"Yes. You cannot delete a sub‑account in CoinPool, but you can withdraw all funds from it.\\nOperators can only use the money you put into the sub‑account. They cannot add funds themselves. You always keep full control and can withdraw anytime.\\nHow to stop: Move all funds back to your main account. When the balance is zero, the sub‑account still exists but has no assets, so the operator cannot use it."}},{"question":{"en":"Can I trust Operator?"},"answer":{"en":"Using an operator requires a level of trust, as they are authorized to perform actions on your sub-account. The relationship between you and the operator is entirely your own decision and responsibility. It is important to only assign operators you trust, as this is a private arrangement between both parties."}},{"question":{"en":"Why Do Operators Exist? What Do They Gain?"},"answer":{"en":"Operators are typically experienced users who are familiar with liquidity strategies and want to help others manage their positions more effectively.\\nIn return, they can earn a commission based on the profits generated from the sub-account they manage. This creates a shared incentive—when you earn, they earn—aligning both sides toward better performance.\\nA portion of the LP fees generated from sub-account operations can be allocated to the operator. This percentage is fully controlled by the main account owner and can be set anywhere from 0% to 100%.\\nThe rewards are sent to the operator’s designated operation-only account, which can then distribute these earnings to other wallet addresses if needed."}},{"question":{"en":"Can I manage my Sub-Account without an Operator?"},"answer":{"en":"No. A sub-account can only be created with an assigned operator, and all operational activities are managed by that operator.\\nAs the owner, your role is to provide capital for the sub-account, which the operator can then use for liquidity operations. You remain in control of your funds and can withdraw your assets at any time."}},{"question":{"en":"Does CoinPool use Third-party service?"},"answer":{"en":"Yes. CoinPool integrates with well-established third-party DeFi protocols that are widely used and trusted within the industry.\\nThese include, but are not limited to:\\nUniswap for liquidity provision, LP position management, and fee generation.\\ndeBridge & Relay for cross-chain swaps and asset bridging. These protocols operate independently and are not owned or controlled by CoinPool.\\nAll liquidity, swapping, and bridging activities are executed directly through the smart contracts of these third-party protocols, and are governed solely by their respective rules.\\nCoinPool does not act as a counterparty to any transaction, and does not audit, insure, or guarantee the security or performance of these external services."}},{"question":{"en":"Why Should I Become a Liquidity Provider?"},"answer":{"en":"Becoming a liquidity provider (LP) allows you to earn passive income by supplying tokens to liquidity pools and supporting decentralized trading.\\nKey Benefits\\nEarn Trading Fees: Receive a share of fees generated from every swap in the pool.\\nImproved Capital Efficiency: Your assets remain actively utilized, generating returns over time.\\nAdditionalYieldOpportunities: Some pools offer extra rewards, such as governance tokens.\\nDecentralized & Permissionless: Participate freely without relying on intermediaries.\\nGrowing Asset Exposure: Your token balances can increase over time as liquidity is utilized."}},{"question":{"en":"Can CoinPool Refund My Assets If I Incur Losses?"},"answer":{"en":"No. CoinPool cannot refund or recover any assets.\\nDue to its non-custodial and decentralized nature:\\nAll transactions are final once executed on-chain\\nNo refunds are available under any circumstances\\nFunds cannot be recovered or replaced\\nCoinPool cannot intervene in or override the behavior of third-party protocols"}},{"question":{"en":"Can CoinPool Guarantee Profits?"},"answer":{"en":"No. CoinPool cannot guarantee profits.\\nThe crypto market is inherently volatile, and even experienced participants can face both gains and losses. While CoinPool helps streamline access to liquidity strategies, outcomes ultimately depend on market conditions and individual decisions.\\nUsing sub-accounts with experienced operators may help improve efficiency, but it’s still important to do your own research and understand the risks involved."}},{"question":{"en":"Who Is Responsible If I Incur Losses?"},"answer":{"en":"All decisions—whether it’s providing liquidity, creating a sub-account, or selecting an operator—are made by you. Even if an operator does not generate profits, it remains your responsibility as you chose to assign them.\\nTo use CoinPool, you must:\\nBe at least 18 years old\\nHave the legal capacity to enter into binding agreements\\nBy using CoinPool, you confirm that you meet these requirements and that your actions comply with all applicable laws and regulations."}},{"question":{"en":"What assets are supported on CoinPool?"},"answer":{"en":"CoinPool supports a wide range of assets across EVM-compatible chains and Solana.\\nYou can also add custom assets to create liquidity pools, as long as they belong to supported networks."}},{"question":{"en":"Can I withdraw my funds at any time?"},"answer":{"en":"Yes. You can withdraw your funds at any time.\\nCoinPool is a non-custodial platform, meaning you retain full control of your assets. You can remove liquidity, withdraw funds to your wallet, or manage your positions freely at any time."}},{"question":{"en":"Are there any fees when using CoinPool?"},"answer":{"en":"Yes, there are a few fees to consider:\\nSub-Account Creation Fee: A one-time fee required to create a sub-account, depending on the network:\\nEthereum: 0.01 ETH\\nOptimism: 0.01 ETH\\nArbitrum: 0.01 ETH\\nBase: 0.01 ETH\\nBinance Smart Chain: 0.03 BNB\\nUnichain: 0.01 ETH\\nOperator Commission: A percentage of profits shared with the operator when gains are realized.\\nThis rate is fully configurable and based on a private agreement between you and the operator."}},{"question":{"en":"Can I track the performance of my liquidity positions?"},"answer":{"en":"Yes. CoinPool provides dedicated sections such as Earning Overview and My Liquidity, allowing you to monitor performance in detail.\\nYou can track your own positions and also view the performance of other addresses for additional insights."}},{"question":{"en":"Why can\'t I set up bots in My Liquidity?"},"answer":{"en":"Users need to create the two bots by clicking the “Create Bots” button in the My Liquidity section.\\nOnly after creating the bots can you proceed with the setup."}}]')},b={"keyring-chatbot-agent-sdk-test":{name:"keyring-chatbot-agent-sdk-test",webAppUrl:"https://nft-demo.keyring.app",isPackageTest:!0,apiExternal:{baseUrl:"https://api.coinpool.app",keyringPool:"https://pool-data.keyring.app"}},"keyring-chatbot-coinpool-test":{name:"keyring-chatbot-coinpool-test",webAppUrl:"https://nft.keyring.app",faqUrl:"https://api.coinpool.app/faq",faqInternal:y,linkViewNft:"https://nft.keyring.app",linkAddLiquidity:"https://coinpool.app/pair/create",modal:{title:"COINPOOL Agent",icon:"https://coinpool.app/favicon.ico"},apiExternal:{baseUrl:"https://api.coinpool.app",keyringPool:"https://pool-data.keyring.app"}},"keyring-chatbot-coinpool":{name:"keyring-chatbot-coinpool",webAppUrl:"https://nft.keyring.app",faqUrl:"https://api.coinpool.app/faq",faqInternal:y,linkViewNft:"https://nft.keyring.app",linkAddLiquidity:"https://coinpool.app/pair/create",modal:{title:"COINPOOL Agent",icon:"https://coinpool.app/favicon.ico"},apiExternal:{baseUrl:"https://api.coinpool.app",keyringPool:"https://pool-data.keyring.app"}},"keyring-chatbot-agent":{name:"keyring-chatbot-agent",webAppUrl:"https://nft.keyring.app",apiExternal:{baseUrl:"https://api.coinpool.app",keyringPool:"https://pool-data.keyring.app"}}},v=["https://nft-demo.keyring.app","https://nft.keyring.app","https://coinpool.app","https://coinpool-op.bacoor-test001.xyz","https://dev2-coinpool-op.bacoor-test001.xyz","https://rwa.bacoor-test001.xyz","https://test.coinpool.app"],A=/^tuple(?<array>(\[(\d*)\])*)$/;function k(e){let t=e.type;if(A.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let o=0;o<n;o++)t+=k(e.components[o]),o<n-1&&(t+=", ");const r=function(e,t){const n=e.exec(t);return n?.groups}(A,e.type);return t+=`)${r?.array||""}`,k({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function T(e){let t="";const n=e.length;for(let r=0;r<n;r++)t+=k(e[r]),r!==n-1&&(t+=", ");return t}function E(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new q(e.type);return`${e.name}(${x(e.inputs,{includeName:t})})`}function x(e,{includeName:t=!1}={}){return e?e.map(e=>function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${x(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t})).join(t?", ":","):""}function C(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}function I(e){return C(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const S="2.47.0";let N=`viem@${S}`;class B extends Error{constructor(e,t={}){const n=t.cause instanceof B?t.cause.details:t.cause?.message?t.cause.message:t.details,r=t.cause instanceof B&&t.cause.docsPath||t.docsPath,o=(({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0)?.({...t,docsPath:r});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...n?[`Details: ${n}`]:[],...N?[`Version: ${N}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=r,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=S}walk(e){return M(this,e)}}function M(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e&&void 0!==e.cause?M(e.cause,t):t?null:e}class P extends B{constructor({expectedLength:e,givenLength:t,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n"),{name:"AbiEncodingArrayLengthMismatchError"})}}class O extends B{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${I(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class R extends B{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n"),{name:"AbiEncodingLengthMismatchError"})}}class U extends B{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,name:"AbiFunctionNotFoundError"})}}class L extends B{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${E(e.abiItem)}\`, and`,`\`${t.type}\` in \`${E(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class D extends B{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t,name:"InvalidAbiEncodingType"})}}class F extends B{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n"),{name:"InvalidArrayError"})}}class q extends B{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n"),{name:"InvalidDefinitionTypeError"})}}class H extends B{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class V extends B{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function W(e,{dir:t,size:n=32}={}){return"string"==typeof e?j(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new V({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let o=0;o<n;o++){const i="right"===t;r[i?o:n-o-1]=e[i?o:e.length-o-1]}return r}(e,{dir:t,size:n})}function j(e,{dir:t,size:n=32}={}){if(null===n)return e;const r=e.replace("0x","");if(r.length>2*n)throw new V({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r["right"===t?"padEnd":"padStart"](2*n,"0")}`}class Y extends B{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})`}`,{name:"IntegerOutOfRangeError"})}}class z extends B{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function G(e,{dir:t="left"}={}){let n="string"==typeof e?e.replace("0x",""):e,r=0;for(let o=0;o<n.length-1&&"0"===n["left"===t?o:n.length-o-1].toString();o++)r++;return n="left"===t?n.slice(r):n.slice(0,n.length-r),"string"==typeof e?(1===n.length&&"right"===t&&(n=`${n}0`),`0x${n.length%2==1?`0${n}`:n}`):n}function J(e,{size:t}){if(I(e)>t)throw new z({givenSize:I(e),maxSize:t})}function X(e,t={}){const{signed:n}=t;t.size&&J(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 K(e,t={}){const n=X(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new Y({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return r}const Q=/* @__PURE__ */Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Z(e,t={}){return"number"==typeof e||"bigint"==typeof e?ee(e,t):"string"==typeof e?ne(e,t):"boolean"==typeof e?_(e,t):$(e,t)}function _(e,t={}){const n=`0x${Number(e)}`;return"number"==typeof t.size?(J(n,{size:t.size}),W(n,{size:t.size})):n}function $(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=Q[e[o]];const r=`0x${n}`;return"number"==typeof t.size?(J(r,{size:t.size}),W(r,{dir:"right",size:t.size})):r}function ee(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let i;r?i=n?(1n<<8n*BigInt(r)-1n)-1n:2n**(8n*BigInt(r))-1n:"number"==typeof e&&(i=BigInt(Number.MAX_SAFE_INTEGER));const a="bigint"==typeof i&&n?-i-1n:0;if(i&&o>i||o<a){const t="bigint"==typeof e?"n":"";throw new Y({max:i?`${i}${t}`:void 0,min:`${a}${t}`,signed:n,size:r,value:`${e}${t}`})}const s=`0x${(n&&o<0?(1n<<BigInt(8*r))+BigInt(o):o).toString(16)}`;return r?W(s,{size:r}):s}const te=/* @__PURE__ */new TextEncoder;function ne(e,t={}){return $(te.encode(e),t)}const re=/* @__PURE__ */new TextEncoder;function oe(e,t={}){return"number"==typeof e||"bigint"==typeof e?function(e,t){return se(ee(e,t))}(e,t):"boolean"==typeof e?function(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),"number"==typeof t.size?(J(n,{size:t.size}),W(n,{size:t.size})):n}(e,t):C(e)?se(e,t):ce(e,t)}const ie={zero:48,nine:57,A:65,F:70,a:97,f:102};function ae(e){return e>=ie.zero&&e<=ie.nine?e-ie.zero:e>=ie.A&&e<=ie.F?e-(ie.A-10):e>=ie.a&&e<=ie.f?e-(ie.a-10):void 0}function se(e,t={}){let n=e;t.size&&(J(n,{size:t.size}),n=W(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const o=r.length/2,i=new Uint8Array(o);for(let a=0,s=0;a<o;a++){const e=ae(r.charCodeAt(s++)),t=ae(r.charCodeAt(s++));if(void 0===e||void 0===t)throw new B(`Invalid byte sequence ("${r[s-2]}${r[s-1]}" in "${r}").`);i[a]=16*e+t}return i}function ce(e,t={}){const n=re.encode(e);return"number"==typeof t.size?(J(n,{size:t.size}),W(n,{dir:"right",size:t.size})):n}const ue=/* @__PURE__ */BigInt(2**32-1),le=/* @__PURE__ */BigInt(32);function fe(e,t=!1){return t?{h:Number(e&ue),l:Number(e>>le&ue)}:{h:0|Number(e>>le&ue),l:0|Number(e&ue)}}function de(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let i=0;i<n;i++){const{h:n,l:a}=fe(e[i],t);[r[i],o[i]]=[n,a]}return[r,o]}const he=(e,t,n)=>e>>>n,pe=(e,t,n)=>e<<32-n|t>>>n,me=(e,t,n)=>e>>>n|t<<32-n,we=(e,t,n)=>e<<32-n|t>>>n,ge=(e,t,n)=>e<<64-n|t>>>n-32,ye=(e,t,n)=>e>>>n-32|t<<64-n;function be(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}}const ve=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Ae=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,ke=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Te=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,Ee=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0),xe=(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0,Ce="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function Ie(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Se(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Ne(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 Be(e,t){Se(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Me(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Pe(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Oe(e,t){return e<<32-t|e>>>t}function Re(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const Ue=/* @__PURE__ */(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])()?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=Re(e[t]);return e};function Le(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}(e)),Se(e),e}class De{}function Fe(e){const t=t=>e().update(Le(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function qe(e=32){if(Ce&&"function"==typeof Ce.getRandomValues)return Ce.getRandomValues(new Uint8Array(e));if(Ce&&"function"==typeof Ce.randomBytes)return Uint8Array.from(Ce.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const He=BigInt(0),Ve=BigInt(1),We=BigInt(2),je=BigInt(7),Ye=BigInt(256),ze=BigInt(113),Ge=[],Je=[],Xe=[];for(let Gp=0,Jp=Ve,Xp=1,Kp=0;Gp<24;Gp++){[Xp,Kp]=[Kp,(2*Xp+3*Kp)%5],Ge.push(2*(5*Kp+Xp)),Je.push((Gp+1)*(Gp+2)/2%64);let e=He;for(let t=0;t<7;t++)Jp=(Jp<<Ve^(Jp>>je)*ze)%Ye,Jp&We&&(e^=Ve<<(Ve<</* @__PURE__ */BigInt(t))-Ve);Xe.push(e)}const Ke=de(Xe,!0),Qe=Ke[0],Ze=Ke[1],_e=(e,t,n)=>n>32?((e,t,n)=>t<<n-32|e>>>64-n)(e,t,n):((e,t,n)=>e<<n|t>>>32-n)(e,t,n),$e=(e,t,n)=>n>32?((e,t,n)=>e<<n-32|t>>>64-n)(e,t,n):((e,t,n)=>t<<n|e>>>32-n)(e,t,n);class et extends De{constructor(e,t,n,r=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=o,Ie(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");var i;this.state=new Uint8Array(200),this.state32=(i=this.state,new Uint32Array(i.buffer,i.byteOffset,Math.floor(i.byteLength/4)))}clone(){return this.o()}keccak(){Ue(this.state32),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,i=n[o],a=n[o+1],s=_e(i,a,1)^n[t],c=$e(i,a,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=Je[n],i=_e(t,o,r),a=$e(t,o,r),s=Ge[n];t=e[s],o=e[s+1],e[s]=i,e[s+1]=a}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]^=Qe[r],e[1]^=Ze[r]}Me(n)}(this.state32,this.rounds),Ue(this.state32),this.posOut=0,this.pos=0}update(e){Ne(this),Se(e=Le(e));const{blockLen:t,state:n}=this,r=e.length;for(let o=0;o<r;){const i=Math.min(t-this.pos,r-o);for(let t=0;t<i;t++)n[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,128&t&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){Ne(this,!1),Se(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,o=e.length;r<o;){this.posOut>=n&&this.keccak();const i=Math.min(n-this.posOut,o-r);e.set(t.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Ie(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Be(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,Me(this.state)}o(e){const{blockLen:t,suffix:n,outputLen:r,rounds:o,enableXOF:i}=this;return e||(e=new et(t,n,r,i,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=i,e.destroyed=this.destroyed,e}}const tt=/* @__PURE__ */(()=>Fe(()=>new et(136,1,32)))();function nt(e,t){const n=t||"hex",r=tt(C(e,{strict:!1})?oe(e):e);return"bytes"===n?r:Z(r)}function rt(e){return t=function(e){let t=!0,n="",r=0,o="",i=!1;for(let a=0;a<e.length;a++){const s=e[a];if(["(",")",","].includes(s)&&(t=!0),"("===s&&r++,")"===s&&r--,t)if(0!==r)" "!==s?(o+=s,n+=s):","!==e[a-1]&&","!==n&&",("!==n&&(n="",t=!1);else if(" "===s&&["event","function",""].includes(o))o="";else if(o+=s,")"===s){i=!0;break}}if(!i)throw new B("Unable to normalize signature.");return o}("string"==typeof(n=e)?n:"function"===(r=n).type?`function ${r.name}(${T(r.inputs)})${r.stateMutability&&"nonpayable"!==r.stateMutability?` ${r.stateMutability}`:""}${r.outputs?.length?` returns (${T(r.outputs)})`:""}`:"event"===r.type?`event ${r.name}(${T(r.inputs)})`:"error"===r.type?`error ${r.name}(${T(r.inputs)})`:"constructor"===r.type?`constructor(${T(r.inputs)})${"payable"===r.stateMutability?" payable":""}`:"fallback"===r.type?"fallback() external"+("payable"===r.stateMutability?" payable":""):"receive() external payable"),nt(oe(t));var t,n,r}const ot=rt;class it extends B{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class at extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){const e=this.keys().next().value;e&&this.delete(e)}return this}}const st=/* @__PURE__ */new at(8192),ct=/^0x[a-fA-F0-9]{40}$/,ut=/* @__PURE__ */new at(8192);function lt(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(ut.has(r))return ut.get(r);const o=!(!ct.test(e)||e.toLowerCase()!==e&&n&&function(e){if(st.has(`${e}.undefined`))return st.get(`${e}.undefined`);const t=e.substring(2).toLowerCase(),n=nt(ce(t),"bytes"),r=t.split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&r[i]&&(r[i]=r[i].toUpperCase()),(15&n[i>>1])>=8&&r[i+1]&&(r[i+1]=r[i+1].toUpperCase());const o=`0x${r.join("")}`;return st.set(`${e}.undefined`,o),o}(e)!==e);return ut.set(r,o),o}function ft(e){return"string"==typeof e[0]?dt(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 dt(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}function ht(e,t,n,{strict:r}={}){return C(e,{strict:!1})?function(e,t,n,{strict:r}={}){pt(e,t);const o=`0x${e.replace("0x","").slice(2*(t??0),2*(n??e.length))}`;return r&&mt(o,t,n),o}(e,t,n,{strict:r}):function(e,t,n,{strict:r}={}){pt(e,t);const o=e.slice(t,n);return r&&mt(o,t,n),o}(e,t,n,{strict:r})}function pt(e,t){if("number"==typeof t&&t>0&&t>I(e)-1)throw new H({offset:t,position:"start",size:I(e)})}function mt(e,t,n){if("number"==typeof t&&"number"==typeof n&&I(e)!==n-t)throw new H({offset:n,position:"end",size:I(e)})}const wt=/^(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)?$/;function gt(e,t){if(e.length!==t.length)throw new R({expectedLength:e.length,givenLength:t.length});const n=function({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(yt({param:e[r],value:t[r]}));return n}({params:e,values:t}),r=bt(n);return 0===r.length?"0x":r}function yt({param:e,value:t}){const n=function(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}(e.type);if(n){const[r,o]=n;return function(e,{length:t,param:n}){const r=null===t;if(!Array.isArray(e))throw new F(e);if(!r&&e.length!==t)throw new P({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let o=!1;const i=[];for(let a=0;a<e.length;a++){const t=yt({param:n,value:e[a]});t.dynamic&&(o=!0),i.push(t)}if(r||o){const e=bt(i);if(r){const t=ee(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?ft([t,e]):t}}if(o)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:ft(i.map(({encoded:e})=>e))}}(t,{length:r,param:{...e,type:o}})}if("tuple"===e.type)return function(e,{param:t}){let n=!1;const r=[];for(let o=0;o<t.components.length;o++){const i=t.components[o],a=yt({param:i,value:e[Array.isArray(e)?o:i.name]});r.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?bt(r):ft(r.map(({encoded:e})=>e))}}(t,{param:e});if("address"===e.type)return function(e){if(!lt(e))throw new it({address:e});return{dynamic:!1,encoded:j(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){if("boolean"!=typeof e)throw new B(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:j(_(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const n=e.type.startsWith("int"),[,,r="256"]=wt.exec(e.type)??[];return function(e,{signed:t,size:n=256}){if("number"==typeof n){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new Y({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:ee(e,{size:32,signed:t})}}(t,{signed:n,size:Number(r)})}if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,n]=t.type.split("bytes"),r=I(e);if(!n){let t=e;return r%32!=0&&(t=j(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:ft([j(ee(r,{size:32})),t])}}if(r!==Number.parseInt(n,10))throw new O({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:j(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=ne(e),n=Math.ceil(I(t)/32),r=[];for(let o=0;o<n;o++)r.push(j(ht(t,32*o,32*(o+1)),{dir:"right"}));return{dynamic:!0,encoded:ft([j(ee(I(t),{size:32})),...r])}}(t);throw new D(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function bt(e){let t=0;for(let i=0;i<e.length;i++){const{dynamic:n,encoded:r}=e[i];t+=n?32:I(r)}const n=[],r=[];let o=0;for(let i=0;i<e.length;i++){const{dynamic:a,encoded:s}=e[i];a?(n.push(ee(t+o,{size:32})),r.push(s),o+=I(s)):n.push(s)}return ft([...n,...r])}const vt=e=>ht(rt(e),0,4);function At(e,t){const n=typeof e,r=t.type;switch(r){case"address":return lt(e,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:return"tuple"===r&&"components"in t?Object.values(t.components).every((t,r)=>"object"===n&&At(Object.values(e)[r],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(r)?"number"===n||"bigint"===n:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?"string"===n||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)&&Array.isArray(e)&&e.every(e=>At(e,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")}))}}function kt(e,t,n){for(const r in e){const o=e[r],i=t[r];if("tuple"===o.type&&"tuple"===i.type&&"components"in o&&"components"in i)return kt(o.components,i.components,n[r]);const a=[o.type,i.type];if((()=>!(!a.includes("address")||!a.includes("bytes20"))||(a.includes("address")&&a.includes("string")||!(!a.includes("address")||!a.includes("bytes")))&&lt(n[r],{strict:!1}))())return a}}function Tt(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}const Et="/docs/contract/encodeFunctionData";function xt(e){const{args:t}=e,{abi:n,functionName:r}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:function(e){const{abi:t,args:n,functionName:r}=e;let o=t[0];if(r){const e=function(e){const{abi:t,args:n=[],name:r}=e,o=C(r,{strict:!1}),i=t.filter(e=>o?"function"===e.type?vt(e)===r:"event"===e.type&&ot(e)===r:"name"in e&&e.name===r);if(0===i.length)return;if(1===i.length)return i[0];let a;for(const s of i)if("inputs"in s)if(n&&0!==n.length){if(s.inputs&&0!==s.inputs.length&&s.inputs.length===n.length&&n.every((e,t)=>{const n="inputs"in s&&s.inputs[t];return!!n&&At(e,n)})){if(a&&"inputs"in a&&a.inputs){const e=kt(s.inputs,a.inputs,n);if(e)throw new L({abiItem:s,type:e[0]},{abiItem:a,type:e[1]})}a=s}}else if(!s.inputs||0===s.inputs.length)return s;return a||i[0]}({abi:t,args:n,name:r});if(!e)throw new U(r,{docsPath:Et});o=e}if("function"!==o.type)throw new U(void 0,{docsPath:Et});return{abi:[o],functionName:vt(E(o))}}(e),o=n[0];return dt([r,("inputs"in o&&o.inputs?gt(o.inputs,t??[]):void 0)??"0x"])}class Ct extends B{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class It extends B{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class St extends B{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}const Nt={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:/* @__PURE__ */new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new St({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new It({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Ct({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Ct({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this.i();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this.i();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this.i();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this.i();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this.i();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this.i();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},i(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Bt(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Nt);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=/* @__PURE__ */new Map,n.recursiveReadLimit=t,n}const Mt={gwei:9,wei:18},Pt={ether:-9,wei:9};function Ot(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,i]=[n.slice(0,n.length-t),n.slice(n.length-t)];return i=i.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${i?`.${i}`:""}`}function Rt(e,t="wei"){return Ot(e,Mt[t])}function Ut(e,t="wei"){return Ot(e,Pt[t])}function Lt(e){return e.reduce((e,{slot:t,value:n})=>`${e} ${t}: ${n}\n`,"")}function Dt(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 Ft extends B{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class qt extends B{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Dt(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class Ht extends B{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class Vt extends B{constructor(e,{account:t,docsPath:n,chain:r,data:o,gas:i,gasPrice:a,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:f,stateOverride:d}){const h=t?Tt(t):void 0;let p=Dt({from:h?.address,to:l,value:void 0!==f&&`${Rt(f)} ${r?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:i,gasPrice:void 0!==a&&`${Ut(a)} gwei`,maxFeePerGas:void 0!==s&&`${Ut(s)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${Ut(c)} gwei`,nonce:u});d&&(p+=`\n${function(e){return e.reduce((e,{address:t,...n})=>{let r=`${e} ${t}:\n`;return n.nonce&&(r+=` nonce: ${n.nonce}\n`),n.balance&&(r+=` balance: ${n.balance}\n`),n.code&&(r+=` code: ${n.code}\n`),n.state&&(r+=" state:\n",r+=Lt(n.state)),n.stateDiff&&(r+=" stateDiff:\n",r+=Lt(n.stateDiff)),r}," State Override:\n").slice(0,-1)}(d)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",p].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}function Wt(e,t="hex"){const n=jt(e),r=Bt(new Uint8Array(n.length));return n.encode(r),"hex"===t?$(r.bytes):r.bytes}function jt(e){return Array.isArray(e)?function(e){const t=e.reduce((e,t)=>e+t.length,0),n=Yt(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),1===n?r.pushUint8(t):2===n?r.pushUint16(t):3===n?r.pushUint24(t):r.pushUint32(t));for(const{encode:t}of e)t(r)}}}(e.map(e=>jt(e))):function(e){const t="string"==typeof e?se(e):e,n=Yt(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function Yt(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new B("Length is too large.")}class zt extends B{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,name:"ExecutionRevertedError"})}}Object.defineProperty(zt,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(zt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class Gt extends B{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${Ut(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(Gt,"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 Jt extends B{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${Ut(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(Jt,"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 Xt extends B{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(Xt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Kt extends B{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,name:"NonceTooLowError"})}}Object.defineProperty(Kt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class Qt extends B{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(Qt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Zt extends B{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."],name:"InsufficientFundsError"})}}Object.defineProperty(Zt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class _t extends B{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(_t,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class $t extends B{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty($t,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class en extends B{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(en,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class tn extends B{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${Ut(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${Ut(n)} gwei`:""}).`].join("\n"),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(tn,"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 nn extends B{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}function rn(e,{format:t}){if(!t)return{};const n={};return function t(r){const o=Object.keys(r);for(const i of o)i in e&&(n[i]=e[i]),r[i]&&"object"==typeof r[i]&&!Array.isArray(r[i])&&t(r[i])}(t(e||{})),n}function on(e,t){return({exclude:n,format:r})=>({exclude:n,format:(e,o)=>{const i=t(e,o);if(n)for(const t of n)delete i[t];return{...i,...r(e,o)}},type:e})}const an={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function sn(e,t){const n={};return void 0!==e.authorizationList&&(n.authorizationList=e.authorizationList.map(e=>({address:e.address,r:e.r?ee(BigInt(e.r)):e.r,s:e.s?ee(BigInt(e.s)):e.s,chainId:ee(e.chainId),nonce:ee(e.nonce),...void 0!==e.yParity?{yParity:ee(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:ee(e.v)}:{}}))),void 0!==e.accessList&&(n.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(n.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?n.blobs=e.blobs.map(e=>$(e)):n.blobs=e.blobs),void 0!==e.data&&(n.data=e.data),e.account&&(n.from=e.account.address),void 0!==e.from&&(n.from=e.from),void 0!==e.gas&&(n.gas=ee(e.gas)),void 0!==e.gasPrice&&(n.gasPrice=ee(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(n.maxFeePerBlobGas=ee(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(n.maxFeePerGas=ee(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=ee(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(n.nonce=ee(e.nonce)),void 0!==e.to&&(n.to=e.to),void 0!==e.type&&(n.type=an[e.type]),void 0!==e.value&&(n.value=ee(e.value)),n}const cn=2n**256n-1n,un={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function ln(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?K(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?K(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?un[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof n.v){if(0n===n.v||27n===n.v)return 0;if(1n===n.v||28n===n.v)return 1;if(n.v>=35n)return n.v%2n==0n?1:0}})(),"legacy"===n.type&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),"eip2930"===n.type&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),"eip1559"===n.type&&delete n.maxFeePerBlobGas,n}const fn=/* @__PURE__ */on("transaction",ln);function dn(e,t){const n=(e.transactions??[]).map(e=>"string"==typeof e?e:ln(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const hn=/* @__PURE__ */on("block",dn);function pn(e){const{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>se(e)):e.blobs,o=[];for(const i of r)o.push(Uint8Array.from(t.blobToKzgCommitment(i)));return"bytes"===n?o:o.map(e=>$(e))}function mn(e){const{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>se(e)):e.blobs,o="string"==typeof e.commitments[0]?e.commitments.map(e=>se(e)):e.commitments,i=[];for(let a=0;a<r.length;a++){const e=r[a],n=o[a];i.push(Uint8Array.from(t.computeBlobKzgProof(e,n)))}return"bytes"===n?i:i.map(e=>$(e))}function wn(e,t,n){return e&t^~e&n}function gn(e,t,n){return e&t^e&n^t&n}class yn extends De{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=Pe(this.buffer)}update(e){Ne(this),Se(e=Le(e));const{view:t,buffer:n,blockLen:r}=this,o=e.length;for(let i=0;i<o;){const a=Math.min(r-this.pos,o-i);if(a===r){const t=Pe(e);for(;r<=o-i;i+=r)this.process(t,i);continue}n.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ne(this),Be(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:o}=this;let{pos:i}=this;t[i++]=128,Me(this.buffer.subarray(i)),this.padOffset>r-i&&(this.process(n,0),i=0);for(let l=i;l<r;l++)t[l]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),a=Number(n>>o&i),s=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,a,r),e.setUint32(t+u,s,r)}(n,r-8,BigInt(8*this.length),o),this.process(n,0);const a=Pe(e),s=this.outputLen;if(s%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=s/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<c;l++)a.setUint32(4*l,u[l],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}o(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:o,destroyed:i,pos:a}=this;return e.destroyed=i,e.finished=o,e.length=r,e.pos=a,r%t&&e.buffer.set(n),e}clone(){return this.o()}}const bn=/* @__PURE__ */Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),vn=/* @__PURE__ */Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),An=/* @__PURE__ */Uint32Array.from([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]),kn=/* @__PURE__ */new Uint32Array(64);class Tn extends yn{constructor(e=32){super(64,e,8,!1),this.A=0|bn[0],this.B=0|bn[1],this.C=0|bn[2],this.D=0|bn[3],this.E=0|bn[4],this.F=0|bn[5],this.G=0|bn[6],this.H=0|bn[7]}get(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:a,H:s}=this;return[e,t,n,r,o,i,a,s]}set(e,t,n,r,o,i,a,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|a,this.H=0|s}process(e,t){for(let l=0;l<16;l++,t+=4)kn[l]=e.getUint32(t,!1);for(let l=16;l<64;l++){const e=kn[l-15],t=kn[l-2],n=Oe(e,7)^Oe(e,18)^e>>>3,r=Oe(t,17)^Oe(t,19)^t>>>10;kn[l]=r+kn[l-7]+n+kn[l-16]|0}let{A:n,B:r,C:o,D:i,E:a,F:s,G:c,H:u}=this;for(let l=0;l<64;l++){const e=u+(Oe(a,6)^Oe(a,11)^Oe(a,25))+wn(a,s,c)+An[l]+kn[l]|0,t=(Oe(n,2)^Oe(n,13)^Oe(n,22))+gn(n,r,o)|0;u=c,c=s,s=a,a=i+e|0,i=o,o=r,r=n,n=e+t|0}n=n+this.A|0,r=r+this.B|0,o=o+this.C|0,i=i+this.D|0,a=a+this.E|0,s=s+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,o,i,a,s,c,u)}roundClean(){Me(kn)}destroy(){this.set(0,0,0,0,0,0,0,0),Me(this.buffer)}}const En=/* @__PURE__ */(()=>de(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),xn=/* @__PURE__ */(()=>En[0])(),Cn=/* @__PURE__ */(()=>En[1])(),In=/* @__PURE__ */new Uint32Array(80),Sn=/* @__PURE__ */new Uint32Array(80);class Nn extends yn{constructor(e=64){super(128,e,16,!1),this.Ah=0|vn[0],this.Al=0|vn[1],this.Bh=0|vn[2],this.Bl=0|vn[3],this.Ch=0|vn[4],this.Cl=0|vn[5],this.Dh=0|vn[6],this.Dl=0|vn[7],this.Eh=0|vn[8],this.El=0|vn[9],this.Fh=0|vn[10],this.Fl=0|vn[11],this.Gh=0|vn[12],this.Gl=0|vn[13],this.Hh=0|vn[14],this.Hl=0|vn[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:o,Cl:i,Dh:a,Dl:s,Eh:c,El:u,Fh:l,Fl:f,Gh:d,Gl:h,Hh:p,Hl:m}=this;return[e,t,n,r,o,i,a,s,c,u,l,f,d,h,p,m]}set(e,t,n,r,o,i,a,s,c,u,l,f,d,h,p,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|o,this.Cl=0|i,this.Dh=0|a,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|f,this.Gh=0|d,this.Gl=0|h,this.Hh=0|p,this.Hl=0|m}process(e,t){for(let y=0;y<16;y++,t+=4)In[y]=e.getUint32(t),Sn[y]=e.getUint32(t+=4);for(let y=16;y<80;y++){const e=0|In[y-15],t=0|Sn[y-15],n=me(e,t,1)^me(e,t,8)^he(e,0,7),r=we(e,t,1)^we(e,t,8)^pe(e,t,7),o=0|In[y-2],i=0|Sn[y-2],a=me(o,i,19)^ge(o,i,61)^he(o,0,6),s=we(o,i,19)^ye(o,i,61)^pe(o,i,6),c=ke(r,s,Sn[y-7],Sn[y-16]),u=Te(c,n,a,In[y-7],In[y-16]);In[y]=0|u,Sn[y]=0|c}let{Ah:n,Al:r,Bh:o,Bl:i,Ch:a,Cl:s,Dh:c,Dl:u,Eh:l,El:f,Fh:d,Fl:h,Gh:p,Gl:m,Hh:w,Hl:g}=this;for(let y=0;y<80;y++){const e=me(l,f,14)^me(l,f,18)^ge(l,f,41),t=we(l,f,14)^we(l,f,18)^ye(l,f,41),b=l&d^~l&p,v=Ee(g,t,f&h^~f&m,Cn[y],Sn[y]),A=xe(v,w,e,b,xn[y],In[y]),k=0|v,T=me(n,r,28)^ge(n,r,34)^ge(n,r,39),E=we(n,r,28)^ye(n,r,34)^ye(n,r,39),x=n&o^n&a^o&a,C=r&i^r&s^i&s;w=0|p,g=0|m,p=0|d,m=0|h,d=0|l,h=0|f,({h:l,l:f}=be(0|c,0|u,0|A,0|k)),c=0|a,u=0|s,a=0|o,s=0|i,o=0|n,i=0|r;const I=ve(k,E,C);n=Ae(I,A,T,x),r=0|I}({h:n,l:r}=be(0|this.Ah,0|this.Al,0|n,0|r)),({h:o,l:i}=be(0|this.Bh,0|this.Bl,0|o,0|i)),({h:a,l:s}=be(0|this.Ch,0|this.Cl,0|a,0|s)),({h:c,l:u}=be(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:f}=be(0|this.Eh,0|this.El,0|l,0|f)),({h:d,l:h}=be(0|this.Fh,0|this.Fl,0|d,0|h)),({h:p,l:m}=be(0|this.Gh,0|this.Gl,0|p,0|m)),({h:w,l:g}=be(0|this.Hh,0|this.Hl,0|w,0|g)),this.set(n,r,o,i,a,s,c,u,l,f,d,h,p,m,w,g)}roundClean(){Me(In,Sn)}destroy(){Me(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Bn=/* @__PURE__ */Fe(()=>new Tn),Mn=/* @__PURE__ */Fe(()=>new Nn),Pn=Bn;function On(e){const{commitment:t,version:n=1}=e,r=e.to??("string"==typeof t?"hex":"bytes"),o=Pn(C(i=t,{strict:!1})?oe(i):i);var i;return o.set([n],0),"bytes"===r?o:$(o)}const Rn=761855;class Un extends B{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class Ln extends B{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Dn extends B{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class Fn extends B{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:["Expected: 1",`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}const qn=/* @__PURE__ */BigInt(0),Hn=/* @__PURE__ */BigInt(1);function Vn(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function Wn(e){if(!Vn(e))throw new Error("Uint8Array expected")}function jn(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)}function Yn(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function zn(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?qn:BigInt("0x"+e)}const Gn="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,Jn=/* @__PURE__ */Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Xn(e){if(Wn(e),Gn)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=Jn[e[n]];return t}function Kn(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function Qn(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(Gn)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,i=0;o<n;o++,i+=2){const t=Kn(e.charCodeAt(i)),n=Kn(e.charCodeAt(i+1));if(void 0===t||void 0===n){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[o]=16*t+n}return r}function Zn(e){return zn(Xn(e))}function _n(e){return Wn(e),zn(Xn(Uint8Array.from(e).reverse()))}function $n(e,t){return Qn(e.toString(16).padStart(2*t,"0"))}function er(e,t){return $n(e,t).reverse()}function tr(e,t,n){let r;if("string"==typeof t)try{r=Qn(t)}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else{if(!Vn(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+" of length "+n+" expected, got "+o);return r}function nr(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];Wn(n),t+=n.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const t=e[r];n.set(t,o),o+=t.length}return n}const rr=e=>"bigint"==typeof e&&qn<=e;function or(e,t,n){return rr(e)&&rr(t)&&rr(n)&&t<=e&&e<n}function ir(e,t,n,r){if(!or(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}const ar=e=>(Hn<<BigInt(e))-Hn,sr=e=>new Uint8Array(e),cr=e=>Uint8Array.from(e),ur={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||Vn(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 lr(e,t,n={}){const r=(t,n,r)=>{const o=ur[n];if("function"!=typeof o)throw new Error("invalid validator function");const i=e[t];if(!(r&&void 0===i||o(i,e)))throw new Error("param "+String(t)+" is invalid. Expected "+n+", got "+i)};for(const[o,i]of Object.entries(t))r(o,i,!1);for(const[o,i]of Object.entries(n))r(o,i,!0);return e}function fr(e){const t=/* @__PURE__ */new WeakMap;return(n,...r)=>{const o=t.get(n);if(void 0!==o)return o;const i=e(n,...r);return t.set(n,i),i}}class dr extends B{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class hr extends B{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 Client."].join("\n"),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}const pr={"0x0":"reverted","0x1":"success"};function mr(e,t){const n={...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=>function(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):null===e.blockTimestamp?null:void 0,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}:{}}}(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?K(e.transactionIndex):null,status:e.status?pr[e.status]:null,type:e.type?un[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const wr=/* @__PURE__ */on("transactionReceipt",mr);function gr(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:o}=e;if(t<=0)throw new dr({chainId:t});if(o&&!lt(o))throw new it({address:o});if(r&&r>cn)throw new Gt({maxFeePerGas:r});if(n&&r&&n>r)throw new tn({maxFeePerGas:r,maxPriorityFeePerGas:n})}function yr(e){if(!e||0===e.length)return[];const t=[];for(let n=0;n<e.length;n++){const{address:r,storageKeys:o}=e[n];for(let e=0;e<o.length;e++)if(o[e].length-2!=64)throw new Ht({storageKey:o[e]});if(!lt(r,{strict:!1}))throw new it({address:r});t.push([r,o])}return t}function br(e,t){const n=function(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new qt({transaction:e})}(e);return"eip1559"===n?function(e,t){const{chainId:n,gas:r,nonce:o,to:i,value:a,maxFeePerGas:s,maxPriorityFeePerGas:c,accessList:u,data:l}=e;gr(e);const f=yr(u);return dt(["0x02",Wt([ee(n),o?ee(o):"0x",c?ee(c):"0x",s?ee(s):"0x",r?ee(r):"0x",i??"0x",a?ee(a):"0x",l??"0x",f,...vr(e,t)])])}(e,t):"eip2930"===n?function(e,t){const{chainId:n,gas:r,data:o,nonce:i,to:a,value:s,accessList:c,gasPrice:u}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:o,to:i}=e;if(t<=0)throw new dr({chainId:t});if(i&&!lt(i))throw new it({address:i});if(n||o)throw new B("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>cn)throw new Gt({maxFeePerGas:r})}(e);const l=yr(c);return dt(["0x01",Wt([ee(n),i?ee(i):"0x",u?ee(u):"0x",r?ee(r):"0x",a??"0x",s?ee(s):"0x",o??"0x",l,...vr(e,t)])])}(e,t):"eip4844"===n?function(e,t){const{chainId:n,gas:r,nonce:o,to:i,value:a,maxFeePerBlobGas:s,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:f}=e;!function(e){const{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new Ln;for(const e of t){const t=I(e),n=K(ht(e,0,1));if(32!==t)throw new Dn({hash:e,size:t});if(1!==n)throw new Fn({hash:e,version:n})}}gr(e)}(e);let d=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(void 0===d||void 0===h)){const t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>$(e)),n=e.kzg,r=pn({blobs:t,kzg:n});void 0===d&&(d=function(e){const{commitments:t,version:n}=e,r=e.to??("string"==typeof t[0]?"hex":"bytes"),o=[];for(const i of t)o.push(On({commitment:i,to:r,version:n}));return o}({commitments:r})),void 0===h&&(h=function(e){const{data:t,kzg:n,to:r}=e,o=e.blobs??function(e){const t=e.to??("string"==typeof e.data?"hex":"bytes"),n="string"==typeof e.data?se(e.data):e.data,r=I(n);if(!r)throw new Ln;if(r>Rn)throw new Un({maxSize:Rn,size:r});const o=[];let i=!0,a=0;for(;i;){const e=Bt(new Uint8Array(131072));let t=0;for(;t<4096;){const r=n.slice(a,a+31);if(e.pushByte(0),e.pushBytes(r),r.length<31){e.pushByte(128),i=!1;break}t++,a+=31}o.push(e)}return"bytes"===t?o.map(e=>e.bytes):o.map(e=>$(e.bytes))}({data:t,to:r}),i=e.commitments??pn({blobs:o,kzg:n,to:r}),a=e.proofs??mn({blobs:o,commitments:i,kzg:n,to:r}),s=[];for(let c=0;c<o.length;c++)s.push({blob:o[c],commitment:i[c],proof:a[c]});return s}({blobs:t,commitments:r,proofs:mn({blobs:t,commitments:r,kzg:n})}))}const p=yr(l),m=[ee(n),o?ee(o):"0x",u?ee(u):"0x",c?ee(c):"0x",r?ee(r):"0x",i??"0x",a?ee(a):"0x",f??"0x",p,s?ee(s):"0x",d??[],...vr(e,t)],w=[],g=[],y=[];if(h)for(let b=0;b<h.length;b++){const{blob:e,commitment:t,proof:n}=h[b];w.push(e),g.push(t),y.push(n)}return dt(["0x03",Wt(h?[m,w,g,y]:m)])}(e,t):"eip7702"===n?function(e,t){const{authorizationList:n,chainId:r,gas:o,nonce:i,to:a,value:s,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:f}=e;!function(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:e}=n,t=n.address;if(!lt(t))throw new it({address:t});if(e<0)throw new dr({chainId:e})}gr(e)}(e);const d=yr(l),h=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e){const{chainId:e,nonce:r,...o}=n,i=n.address;t.push([e?Z(e):"0x",i,r?Z(r):"0x",...vr({},o)])}return t}(n);return dt(["0x04",Wt([ee(r),i?ee(i):"0x",u?ee(u):"0x",c?ee(c):"0x",o?ee(o):"0x",a??"0x",s?ee(s):"0x",f??"0x",d,h,...vr(e,t)])])}(e,t):function(e,t){const{chainId:n=0,gas:r,data:o,nonce:i,to:a,value:s,gasPrice:c}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:o,to:i}=e;if(i&&!lt(i))throw new it({address:i});if(void 0!==t&&t<=0)throw new dr({chainId:t});if(n||o)throw new B("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>cn)throw new Gt({maxFeePerGas:r})}(e);let u=[i?ee(i):"0x",c?ee(c):"0x",r?ee(r):"0x",a??"0x",s?ee(s):"0x",o??"0x"];if(t){const e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(n>0)return BigInt(2*n)+BigInt(35n+t.v-27n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new Ft({v:t.v});return e})(),r=G(t.r),o=G(t.s);u=[...u,ee(e),"0x00"===r?"0x":r,"0x00"===o?"0x":o]}else n>0&&(u=[...u,ee(n),"0x","0x"]);return Wt(u)}(e,t)}function vr(e,t){const n=t??e,{v:r,yParity:o}=n;if(void 0===n.r)return[];if(void 0===n.s)return[];if(void 0===r&&void 0===o)return[];const i=G(n.r),a=G(n.s);return["number"==typeof o?o?ee(1):"0x":0n===r?"0x":1n===r?ee(1):27n===r?"0x":ee(1),"0x00"===i?"0x":i,"0x00"===a?"0x":a]}function Ar(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};return Object.assign(t,{extend:function e(t){return n=>{const r="function"==typeof n?n(t):n,o={...t,...r};return Object.assign(o,{extend:e(o)})}}(t)})}class kr extends De{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");Ie(e.outputLen),Ie(e.blockLen)}(e);const n=Le(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,o=new Uint8Array(r);o.set(n.length>r?e.create().update(n).digest():n);for(let i=0;i<o.length;i++)o[i]^=54;this.iHash.update(o),this.oHash=e.create();for(let i=0;i<o.length;i++)o[i]^=106;this.oHash.update(o),Me(o)}update(e){return Ne(this),this.iHash.update(e),this}digestInto(e){Ne(this),Se(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}o(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:o,blockLen:i,outputLen:a}=this;return e.finished=r,e.destroyed=o,e.blockLen=i,e.outputLen=a,e.oHash=t.o(e.oHash),e.iHash=n.o(e.iHash),e}clone(){return this.o()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Tr=(e,t,n)=>new kr(e,t).update(n).digest();Tr.create=(e,t)=>new kr(e,t);const Er=BigInt(0),xr=BigInt(1),Cr=/* @__PURE__ */BigInt(2),Ir=/* @__PURE__ */BigInt(3),Sr=/* @__PURE__ */BigInt(4),Nr=/* @__PURE__ */BigInt(5),Br=/* @__PURE__ */BigInt(8);function Mr(e,t){const n=e%t;return n>=Er?n:t+n}function Pr(e,t,n){let r=e;for(;t-- >Er;)r*=r,r%=n;return r}function Or(e,t){if(e===Er)throw new Error("invert: expected non-zero number");if(t<=Er)throw new Error("invert: expected positive modulus, got "+t);let n=Mr(e,t),r=t,o=Er,i=xr;for(;n!==Er;){const e=r%n,t=o-i*(r/n);r=n,n=e,o=i,i=t}if(r!==xr)throw new Error("invert: does not exist");return Mr(o,t)}function Rr(e,t){const n=(e.ORDER+xr)/Sr,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw new Error("Cannot find square root");return r}function Ur(e,t){const n=(e.ORDER-Nr)/Br,r=e.mul(t,Cr),o=e.pow(r,n),i=e.mul(t,o),a=e.mul(e.mul(i,Cr),o),s=e.mul(i,e.sub(a,e.ONE));if(!e.eql(e.sqr(s),t))throw new Error("Cannot find square root");return s}const Lr=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Dr(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n)),e.ONE),i=e.inv(o);return t.reduceRight((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n)),i),r}function Fr(e,t){const n=(e.ORDER-xr)/Cr,r=e.pow(t,n),o=e.eql(r,e.ONE),i=e.eql(r,e.ZERO),a=e.eql(r,e.neg(e.ONE));if(!o&&!i&&!a)throw new Error("invalid Legendre symbol result");return o?1:i?0:-1}function qr(e,t){void 0!==t&&Ie(t);const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function Hr(e,t,n=!1,r={}){if(e<=Er)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:o,nByteLength:i}=qr(e,t);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let a;const s=Object.freeze({ORDER:e,isLE:n,BITS:o,BYTES:i,MASK:ar(o),ZERO:Er,ONE:xr,create:t=>Mr(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return Er<=t&&t<e},is0:e=>e===Er,isOdd:e=>(e&xr)===xr,neg:t=>Mr(-t,e),eql:(e,t)=>e===t,sqr:t=>Mr(t*t,e),add:(t,n)=>Mr(t+n,e),sub:(t,n)=>Mr(t-n,e),mul:(t,n)=>Mr(t*n,e),pow:(e,t)=>function(e,t,n){if(n<Er)throw new Error("invalid exponent, negatives unsupported");if(n===Er)return e.ONE;if(n===xr)return t;let r=e.ONE,o=t;for(;n>Er;)n&xr&&(r=e.mul(r,o)),o=e.sqr(o),n>>=xr;return r}(s,e,t),div:(t,n)=>Mr(t*Or(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>Or(t,e),sqrt:r.sqrt||(t=>{return a||(a=(n=e)%Sr===Ir?Rr:n%Br===Nr?Ur:function(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-xr,n=0;for(;t%Cr===Er;)t/=Cr,n++;let r=Cr;const o=Hr(e);for(;1===Fr(o,r);)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===n)return Rr;let i=o.pow(r,t);const a=(t+xr)/Cr;return function(e,r){if(e.is0(r))return r;if(1!==Fr(e,r))throw new Error("Cannot find square root");let o=n,s=e.mul(e.ONE,i),c=e.pow(r,t),u=e.pow(r,a);for(;!e.eql(c,e.ONE);){if(e.is0(c))return e.ZERO;let t=1,n=e.sqr(c);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===o)throw new Error("Cannot find square root");const r=xr<<BigInt(o-t-1),i=e.pow(s,r);o=t,s=e.sqr(i),c=e.mul(c,s),u=e.mul(u,i)}return u}}(n)),a(s,t);var n}),toBytes:e=>n?er(e,i):$n(e,i),fromBytes:e=>{if(e.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+e.length);return n?_n(e):Zn(e)},invertBatch:e=>Dr(s,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(s)}function Vr(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Wr(e){const t=Vr(e);return t+Math.ceil(t/2)}const jr=BigInt(0),Yr=BigInt(1);function zr(e,t){const n=t.negate();return e?n:t}function Gr(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Jr(e,t){Gr(e,t);const n=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:ar(e),maxNumber:n,shiftBy:BigInt(e)}}function Xr(e,t,n){const{windowSize:r,mask:o,maxNumber:i,shiftBy:a}=n;let s=Number(e&o),c=e>>a;s>r&&(s-=i,c+=Yr);const u=t*r;return{nextN:c,offset:u+Math.abs(s)-1,isZero:0===s,isNeg:s<0,isNegF:t%2!=0,offsetF:u}}const Kr=/* @__PURE__ */new WeakMap,Qr=/* @__PURE__ */new WeakMap;function Zr(e){return Qr.get(e)||1}function _r(e,t){return{constTimeNegate:zr,hasPrecomputes:e=>1!==Zr(e),unsafeLadder(t,n,r=e.ZERO){let o=t;for(;n>jr;)n&Yr&&(r=r.add(o)),o=o.double(),n>>=Yr;return r},precomputeWindow(e,n){const{windows:r,windowSize:o}=Jr(n,t),i=[];let a=e,s=a;for(let t=0;t<r;t++){s=a,i.push(s);for(let e=1;e<o;e++)s=s.add(a),i.push(s);a=s.double()}return i},wNAF(n,r,o){let i=e.ZERO,a=e.BASE;const s=Jr(n,t);for(let e=0;e<s.windows;e++){const{nextN:t,offset:n,isZero:c,isNeg:u,isNegF:l,offsetF:f}=Xr(o,e,s);o=t,c?a=a.add(zr(l,r[f])):i=i.add(zr(u,r[n]))}return{p:i,f:a}},wNAFUnsafe(n,r,o,i=e.ZERO){const a=Jr(n,t);for(let e=0;e<a.windows&&o!==jr;e++){const{nextN:t,offset:n,isZero:s,isNeg:c}=Xr(o,e,a);if(o=t,!s){const e=r[n];i=i.add(c?e.negate():e)}}return i},getPrecomputes(e,t,n){let r=Kr.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&Kr.set(t,n(r))),r},wNAFCached(e,t,n){const r=Zr(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)},wNAFCachedUnsafe(e,t,n,r){const o=Zr(e);return 1===o?this.unsafeLadder(e,t,r):this.wNAFUnsafe(o,this.getPrecomputes(o,e,n),t,r)},setWindowSize(e,n){Gr(n,t),Qr.set(e,n),Kr.delete(e)}}}function $r(e,t,n,r){!function(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)})}(n,e),function(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)})}(r,t);const o=n.length,i=r.length;if(o!==i)throw new Error("arrays of points and scalars must have equal length");const a=e.ZERO,s=function(e){let t;for(t=0;e>qn;e>>=Hn,t+=1);return t}(BigInt(o));let c=1;s>12?c=s-3:s>4?c=s-2:s>0&&(c=2);const u=ar(c),l=new Array(Number(u)+1).fill(a);let f=a;for(let d=Math.floor((t.BITS-1)/c)*c;d>=0;d-=c){l.fill(a);for(let t=0;t<i;t++){const e=r[t],o=Number(e>>BigInt(d)&u);l[o]=l[o].add(n[t])}let e=a;for(let t=l.length-1,n=a;t>0;t--)n=n.add(l[t]),e=e.add(n);if(f=f.add(e),0!==d)for(let t=0;t<c;t++)f=f.double()}return f}function eo(e){return lr(e.Fp,Lr.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),lr(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...qr(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function to(e){void 0!==e.lowS&&jn("lowS",e.lowS),void 0!==e.prehash&&jn("prehash",e.prehash)}class no extends Error{constructor(e=""){super(e)}}const ro={Err:no,u:{encode:(e,t)=>{const{Err:n}=ro;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");const r=t.length/2,o=Yn(r);if(o.length/2&128)throw new n("tlv.encode: long form length too big");const i=r>127?Yn(o.length/2|128):"";return Yn(e)+i+o+t},decode(e,t){const{Err:n}=ro;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const o=t[r++];let i=0;if(128&o){const e=127&o;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");const a=t.subarray(r,r+e);if(a.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===a[0])throw new n("tlv.decode(long): zero leftmost byte");for(const t of a)i=i<<8|t;if(r+=e,i<128)throw new n("tlv.decode(long): not minimal encoding")}else i=o;const a=t.subarray(r,r+i);if(a.length!==i)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+i)}}},T:{encode(e){const{Err:t}=ro;if(e<io)throw new t("integer: negative integers are not allowed");let n=Yn(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=ro;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return Zn(e)}},toSig(e){const{Err:t,T:n,u:r}=ro,o=tr("signature",e),{v:i,l:a}=r.decode(48,o);if(a.length)throw new t("invalid signature: left bytes after parsing");const{v:s,l:c}=r.decode(2,i),{v:u,l:l}=r.decode(2,c);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(s),s:n.decode(u)}},hexFromSig(e){const{u:t,T:n}=ro,r=t.encode(2,n.encode(e.r))+t.encode(2,n.encode(e.s));return t.encode(48,r)}};function oo(e,t){return Xn($n(e,t))}const io=BigInt(0),ao=BigInt(1);BigInt(2);const so=BigInt(3),co=BigInt(4);function uo(e){const t=function(e){const t=eo(e);return lr(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:n,n:r,nByteLength:o,nBitLength:i}=t,a=n.BYTES+1,s=2*n.BYTES+1;function c(e){return Mr(e,r)}function u(e){return Or(e,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:f,weierstrassEquation:d,isWithinCurveOrder:h}=function(e){const t=function(e){const t=eo(e);lr(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:r,a:o}=t;if(n){if(!r.eql(o,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if("object"!=typeof n||"bigint"!=typeof n.beta||"function"!=typeof n.splitScalar)throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}(e),{Fp:n}=t,r=Hr(t.n,t.nBitLength),o=t.toBytes||((e,t,r)=>{const o=t.toAffine();return nr(Uint8Array.from([4]),n.toBytes(o.x),n.toBytes(o.y))}),i=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 a(e){const{a:r,b:o}=t,i=n.sqr(e),a=n.mul(i,e);return n.add(n.add(a,n.mul(e,r)),o)}function s(e,t){const r=n.sqr(t),o=a(e);return n.eql(r,o)}if(!s(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=n.mul(n.pow(t.a,so),co),u=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(c,u)))throw new Error("bad curve params: a or b");function l(e){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:o,n:i}=t;if(n&&"bigint"!=typeof e){if(Vn(e)&&(e=Xn(e)),"string"!=typeof e||!n.includes(e.length))throw new Error("invalid private key");e=e.padStart(2*r,"0")}let a;try{a="bigint"==typeof e?e:Zn(tr("private key",e,r))}catch(s){throw new Error("invalid private key, expected hex or "+r+" bytes, got "+typeof e)}return o&&(a=Mr(a,i)),ir("private key",a,ao,i),a}function f(e){if(!(e instanceof p))throw new Error("ProjectivePoint expected")}const d=fr((e,t)=>{const{px:r,py:o,pz:i}=e;if(n.eql(i,n.ONE))return{x:r,y:o};const a=e.is0();null==t&&(t=a?n.ONE:n.inv(i));const s=n.mul(r,t),c=n.mul(o,t),u=n.mul(i,t);if(a)return{x:n.ZERO,y:n.ZERO};if(!n.eql(u,n.ONE))throw new Error("invZ was invalid");return{x:s,y:c}}),h=fr(e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.py))return;throw new Error("bad point: ZERO")}const{x:r,y:o}=e.toAffine();if(!n.isValid(r)||!n.isValid(o))throw new Error("bad point: x or y not FE");if(!s(r,o))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class p{constructor(e,t,r){if(null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t)||n.is0(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required");this.px=e,this.py=t,this.pz=r,Object.freeze(this)}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof p)throw new Error("projective point not allowed");const o=e=>n.eql(e,n.ZERO);return o(t)&&o(r)?p.ZERO:new p(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=Dr(n,e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(p.fromAffine)}static fromHex(e){const t=p.fromAffine(i(tr("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return p.BASE.multiply(l(e))}static msm(e,t){return $r(p,r,e,t)}I(e){g.setWindowSize(this,e)}assertValidity(){h(this)}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){f(e);const{px:t,py:r,pz:o}=this,{px:i,py:a,pz:s}=e,c=n.eql(n.mul(t,s),n.mul(i,o)),u=n.eql(n.mul(r,s),n.mul(a,o));return c&&u}negate(){return new p(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,o=n.mul(r,so),{px:i,py:a,pz:s}=this;let c=n.ZERO,u=n.ZERO,l=n.ZERO,f=n.mul(i,i),d=n.mul(a,a),h=n.mul(s,s),m=n.mul(i,a);return m=n.add(m,m),l=n.mul(i,s),l=n.add(l,l),c=n.mul(e,l),u=n.mul(o,h),u=n.add(c,u),c=n.sub(d,u),u=n.add(d,u),u=n.mul(c,u),c=n.mul(m,c),l=n.mul(o,l),h=n.mul(e,h),m=n.sub(f,h),m=n.mul(e,m),m=n.add(m,l),l=n.add(f,f),f=n.add(l,f),f=n.add(f,h),f=n.mul(f,m),u=n.add(u,f),h=n.mul(a,s),h=n.add(h,h),f=n.mul(h,m),c=n.sub(c,f),l=n.mul(h,d),l=n.add(l,l),l=n.add(l,l),new p(c,u,l)}add(e){f(e);const{px:r,py:o,pz:i}=this,{px:a,py:s,pz:c}=e;let u=n.ZERO,l=n.ZERO,d=n.ZERO;const h=t.a,m=n.mul(t.b,so);let w=n.mul(r,a),g=n.mul(o,s),y=n.mul(i,c),b=n.add(r,o),v=n.add(a,s);b=n.mul(b,v),v=n.add(w,g),b=n.sub(b,v),v=n.add(r,i);let A=n.add(a,c);return v=n.mul(v,A),A=n.add(w,y),v=n.sub(v,A),A=n.add(o,i),u=n.add(s,c),A=n.mul(A,u),u=n.add(g,y),A=n.sub(A,u),d=n.mul(h,v),u=n.mul(m,y),d=n.add(u,d),u=n.sub(g,d),d=n.add(g,d),l=n.mul(u,d),g=n.add(w,w),g=n.add(g,w),y=n.mul(h,y),v=n.mul(m,v),g=n.add(g,y),y=n.sub(w,y),y=n.mul(h,y),v=n.add(v,y),w=n.mul(g,v),l=n.add(l,w),w=n.mul(A,v),u=n.mul(b,u),u=n.sub(u,w),w=n.mul(b,g),d=n.mul(A,d),d=n.add(d,w),new p(u,l,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(p.ZERO)}wNAF(e){return g.wNAFCached(this,e,p.normalizeZ)}multiplyUnsafe(e){const{endo:r,n:o}=t;ir("scalar",e,io,o);const i=p.ZERO;if(e===io)return i;if(this.is0()||e===ao)return this;if(!r||g.hasPrecomputes(this))return g.wNAFCachedUnsafe(this,e,p.normalizeZ);let{k1neg:a,k1:s,k2neg:c,k2:u}=r.splitScalar(e),l=i,f=i,d=this;for(;s>io||u>io;)s&ao&&(l=l.add(d)),u&ao&&(f=f.add(d)),d=d.double(),s>>=ao,u>>=ao;return a&&(l=l.negate()),c&&(f=f.negate()),f=new p(n.mul(f.px,r.beta),f.py,f.pz),l.add(f)}multiply(e){const{endo:r,n:o}=t;let i,a;if(ir("scalar",e,ao,o),r){const{k1neg:t,k1:o,k2neg:s,k2:c}=r.splitScalar(e);let{p:u,f:l}=this.wNAF(o),{p:f,f:d}=this.wNAF(c);u=g.constTimeNegate(t,u),f=g.constTimeNegate(s,f),f=new p(n.mul(f.px,r.beta),f.py,f.pz),i=u.add(f),a=l.add(d)}else{const{p:t,f:n}=this.wNAF(e);i=t,a=n}return p.normalizeZ([i,a])[0]}multiplyAndAddUnsafe(e,t,n){const r=p.BASE,o=(e,t)=>t!==io&&t!==ao&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),i=o(this,t).add(o(e,n));return i.is0()?void 0:i}toAffine(e){return d(this,e)}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===ao)return!0;if(n)return n(p,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===ao?this:n?n(p,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return jn("isCompressed",e),this.assertValidity(),o(p,this,e)}toHex(e=!0){return jn("isCompressed",e),Xn(this.toRawBytes(e))}}p.BASE=new p(t.Gx,t.Gy,n.ONE),p.ZERO=new p(n.ZERO,n.ONE,n.ZERO);const{endo:m,nBitLength:w}=t,g=_r(p,m?Math.ceil(w/2):w);return{CURVE:t,ProjectivePoint:p,normPrivateKeyToScalar:l,weierstrassEquation:a,isWithinCurveOrder:function(e){return or(e,ao,t.n)}}}({...t,toBytes(e,t,r){const o=t.toAffine(),i=n.toBytes(o.x),a=nr;return jn("isCompressed",r),r?a(Uint8Array.from([t.hasEvenY()?2:3]),i):a(Uint8Array.from([4]),i,n.toBytes(o.y))},fromBytes(e){const t=e.length,r=e[0],o=e.subarray(1);if(t!==a||2!==r&&3!==r){if(t===s&&4===r)return{x:n.fromBytes(o.subarray(0,n.BYTES)),y:n.fromBytes(o.subarray(n.BYTES,2*n.BYTES))};throw new Error("invalid Point, expected length of "+a+", or uncompressed "+s+", got "+t)}{const e=Zn(o);if(!or(e,ao,n.ORDER))throw new Error("Point is not on curve");const t=d(e);let a;try{a=n.sqrt(t)}catch(i){const e=i instanceof Error?": "+i.message:"";throw new Error("Point is not on curve"+e)}return!(1&~r)!=((a&ao)===ao)&&(a=n.neg(a)),{x:e,y:a}}}});function p(e){return e>r>>ao}const m=(e,t,n)=>Zn(e.slice(t,n));class w{constructor(e,t,n){ir("r",e,ao,r),ir("s",t,ao,r),this.r=e,this.s=t,null!=n&&(this.recovery=n),Object.freeze(this)}static fromCompact(e){const t=o;return e=tr("compactSignature",e,2*t),new w(m(e,0,t),m(e,t,2*t))}static fromDER(e){const{r:t,s:n}=ro.toSig(tr("DER",e));return new w(t,n)}assertValidity(){}addRecoveryBit(e){return new w(this.r,this.s,e)}recoverPublicKey(e){const{r:r,s:o,recovery:i}=this,a=v(tr("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const s=2===i||3===i?r+t.n:r;if(s>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const f=1&i?"03":"02",d=l.fromHex(f+oo(s,n.BYTES)),h=u(s),p=c(-a*h),m=c(o*h),w=l.BASE.multiplyAndAddUnsafe(d,p,m);if(!w)throw new Error("point at infinify");return w.assertValidity(),w}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Qn(this.toDERHex())}toDERHex(){return ro.hexFromSig(this)}toCompactRawBytes(){return Qn(this.toCompactHex())}toCompactHex(){const e=o;return oo(this.r,e)+oo(this.s,e)}}const g={isValidPrivateKey(e){try{return f(e),!0}catch(t){return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const e=Wr(t.n);return function(e,t,n=!1){const r=e.length,o=Vr(t),i=Wr(t);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const a=Mr(n?_n(e):Zn(e),t-xr)+xr;return n?er(a,o):$n(a,o)}(t.randomBytes(e),t.n)},precompute:(e=8,t=l.BASE)=>(t.I(e),t.multiply(BigInt(3)),t)};function y(e){if("bigint"==typeof e)return!1;if(e instanceof l)return!0;const r=tr("key",e).length,i=n.BYTES,a=i+1,s=2*i+1;return t.allowedPrivateKeyLengths||o===a?void 0:r===a||r===s}const b=t.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=Zn(e),n=8*e.length-i;return n>0?t>>BigInt(n):t},v=t.bits2int_modN||function(e){return c(b(e))},A=ar(i);function k(e){return ir("num < 2^"+i,e,io,A),$n(e,o)}const T={lowS:t.lowS,prehash:!1},E={lowS:t.lowS,prehash:!1};return l.BASE.I(8),{CURVE:t,getPublicKey:function(e,t=!0){return l.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(!0===y(e))throw new Error("first arg must be private key");if(!1===y(t))throw new Error("second arg must be public key");return l.fromHex(t).multiply(f(e)).toRawBytes(n)},sign:function(e,r,o=T){const{seed:i,k2sig:a}=function(e,r,o=T){if(["recovered","canonical"].some(e=>e in o))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:a}=t;let{lowS:s,prehash:d,extraEntropy:m}=o;null==s&&(s=!0),e=tr("msgHash",e),to(o),d&&(e=tr("prehashed msgHash",i(e)));const g=v(e),y=f(r),A=[k(y),k(g)];if(null!=m&&!1!==m){const e=!0===m?a(n.BYTES):m;A.push(tr("extraEntropy",e))}const E=nr(...A),x=g;return{seed:E,k2sig:function(e){const t=b(e);if(!h(t))return;const n=u(t),r=l.BASE.multiply(t).toAffine(),o=c(r.x);if(o===io)return;const i=c(n*c(x+o*y));if(i===io)return;let a=(r.x===o?0:2)|Number(r.y&ao),f=i;return s&&p(i)&&(f=function(e){return p(e)?c(-e):e}(i),a^=1),new w(o,f,a)}}}(e,r,o),s=t,d=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=sr(e),o=sr(e),i=0;const a=()=>{r.fill(1),o.fill(0),i=0},s=(...e)=>n(o,r,...e),c=(e=sr(0))=>{o=s(cr([0]),e),r=s(),0!==e.length&&(o=s(cr([1]),e),r=s())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){r=s();const t=r.slice();n.push(t),e+=r.length}return nr(...n)};return(e,t)=>{let n;for(a(),c(e);!(n=t(u()));)c();return a(),n}}(s.hash.outputLen,s.nByteLength,s.hmac);return d(i,a)},verify:function(e,n,r,o=E){const i=e;n=tr("msgHash",n),r=tr("publicKey",r);const{lowS:a,prehash:s,format:f}=o;if(to(o),"strict"in o)throw new Error("options.strict was renamed to lowS");if(void 0!==f&&"compact"!==f&&"der"!==f)throw new Error("format must be compact or der");const d="string"==typeof i||Vn(i),h=!d&&!f&&"object"==typeof i&&null!==i&&"bigint"==typeof i.r&&"bigint"==typeof i.s;if(!d&&!h)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let p,m;try{if(h&&(p=new w(i.r,i.s)),d){try{"compact"!==f&&(p=w.fromDER(i))}catch(C){if(!(C instanceof ro.Err))throw C}p||"der"===f||(p=w.fromCompact(i))}m=l.fromHex(r)}catch(I){return!1}if(!p)return!1;if(a&&p.hasHighS())return!1;s&&(n=t.hash(n));const{r:g,s:y}=p,b=v(n),A=u(y),k=c(b*A),T=c(g*A),x=l.BASE.multiplyAndAddUnsafe(m,k,T)?.toAffine();return!!x&&c(x.x)===g},ProjectivePoint:l,Signature:w,utils:g}}function lo(e){return{hash:e,hmac:(t,...n)=>Tr(e,t,function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];Se(n),t+=n.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const t=e[r];n.set(t,o),o+=t.length}return n}(...n)),randomBytes:qe}}const fo=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),ho=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),po=BigInt(0),mo=BigInt(1),wo=BigInt(2),go=(e,t)=>(e+t/wo)/t,yo=Hr(fo,void 0,void 0,{sqrt:function(e){const t=fo,n=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),a=BigInt(23),s=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,f=Pr(l,n,t)*l%t,d=Pr(f,n,t)*l%t,h=Pr(d,wo,t)*u%t,p=Pr(h,o,t)*h%t,m=Pr(p,i,t)*p%t,w=Pr(m,s,t)*m%t,g=Pr(w,c,t)*w%t,y=Pr(g,s,t)*m%t,b=Pr(y,n,t)*l%t,v=Pr(b,a,t)*p%t,A=Pr(v,r,t)*u%t,k=Pr(A,wo,t);if(!yo.eql(yo.sqr(k),e))throw new Error("Cannot find square root");return k}}),bo=function(e){const t=t=>uo({...e,...lo(t)});return{...t(Bn),create:t}}({a:po,b:BigInt(7),Fp:yo,n:ho,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=ho,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-mo*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,a=BigInt("0x100000000000000000000000000000000"),s=go(i*e,t),c=go(-r*e,t);let u=Mr(e-s*n-c*o,t),l=Mr(-s*r-c*i,t);const f=u>a,d=l>a;if(f&&(u=t-u),d&&(l=t-l),u>a||l>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:u,k2neg:d,k2:l}}}});class vo extends B{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Ao(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new vo({value:e});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,i]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],a=Math.round(Number(`${o}.${i}`));r=a>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${a}`,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}`)}const ko="0x0000000000000000000000000000000000000000",To={blockTime:2e3,contracts:{gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},formatters:{block:/* @__PURE__ */hn({format(e){const t=e.transactions?.map(e=>{if("string"==typeof e)return e;const t=ln(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?X(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t});return{transactions:t,stateRoot:e.stateRoot}}}),transaction:/* @__PURE__ */fn({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?X(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:/* @__PURE__ */wr({format:e=>({l1GasPrice:e.l1GasPrice?X(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?X(e.l1GasUsed):null,l1Fee:e.l1Fee?X(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},serializers:{transaction:function(e,t){return function(e){return"deposit"===e.type||void 0!==e.sourceHash}(e)?function(e){!function(e){const{from:t,to:n}=e;if(t&&!lt(t))throw new it({address:t});if(n&&!lt(n))throw new it({address:n})}(e);const{sourceHash:t,data:n,from:r,gas:o,isSystemTx:i,mint:a,to:s,value:c}=e;return dt(["0x7e",Wt([t,r,s??"0x",a?Z(a):"0x",c?Z(c):"0x",o?Z(o):"0x",i?"0x1":"0x",n??"0x"])])}(e):br(e,t)}}},Eo=/* @__PURE__ */Ar({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),xo=/* @__PURE__ */Ar({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),Co=1,Io=/* @__PURE__ */Ar({...To,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...To.contracts,disputeGameFactory:{[Co]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[Co]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[Co]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[Co]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:1}),So=/* @__PURE__ */Ar({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}});async function No(e,t){const{account:n=e.account}=t;if(!n)throw new hr;const r=Tt(n);try{const{accessList:n,blockNumber:o,blockTag:i,data:a,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:f,to:d,value:h,...p}=t,m=("bigint"==typeof o?ee(o):void 0)||i;!function(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:o}=e,i=t?Tt(t):void 0;if(i&&!lt(i.address))throw new it({address:i.address});if(o&&!lt(o))throw new it({address:o});if(n&&n>cn)throw new Gt({maxFeePerGas:n});if(r&&n&&r>n)throw new tn({maxFeePerGas:n,maxPriorityFeePerGas:r})}(t);const w=e.chain?.formatters?.transactionRequest?.format,g=(w||sn)({...rn(p,{format:w}),account:r,accessList:n,data:a,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:f,to:d,value:h},"estimateGas"),{baseFeePerGas:y,gasLimit:b,priorityFeePerGas:v}=await e.request({method:"linea_estimateGas",params:m?[g,m]:[g]});return{baseFeePerGas:BigInt(y),gasLimit:BigInt(b),priorityFeePerGas:BigInt(v)}}catch(o){throw function(e,{docsPath:t,...n}){const r=(()=>{const t=function(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof B?e.walk(e=>e?.code===zt.code):e;return r instanceof B?new zt({cause:e,message:r.details}):zt.nodeMessage.test(n)?new zt({cause:e,message:e.details}):Gt.nodeMessage.test(n)?new Gt({cause:e,maxFeePerGas:t?.maxFeePerGas}):Jt.nodeMessage.test(n)?new Jt({cause:e,maxFeePerGas:t?.maxFeePerGas}):Xt.nodeMessage.test(n)?new Xt({cause:e,nonce:t?.nonce}):Kt.nodeMessage.test(n)?new Kt({cause:e,nonce:t?.nonce}):Qt.nodeMessage.test(n)?new Qt({cause:e,nonce:t?.nonce}):Zt.nodeMessage.test(n)?new Zt({cause:e}):_t.nodeMessage.test(n)?new _t({cause:e,gas:t?.gas}):$t.nodeMessage.test(n)?new $t({cause:e,gas:t?.gas}):en.nodeMessage.test(n)?new en({cause:e}):tn.nodeMessage.test(n)?new tn({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new nn({cause:e})}(e,n);return t instanceof nn?e:t})();return new Vt(r,{docsPath:t,...n})}(o,{...t,account:r,chain:e.chain})}}async function Bo({client:e,multiply:t,request:n,type:r}){try{const o=await No(e,{...n,account:n?.account}),{priorityFeePerGas:i}=o,a=t(BigInt(o.baseFeePerGas))+i;return"legacy"===r?{gasPrice:a}:{maxFeePerGas:a,maxPriorityFeePerGas:i}}catch{return null}}const Mo=/* @__PURE__ */Ar({fees:{estimateFeesPerGas:Bo,async maxPriorityFeePerGas({block:e,client:t,request:n}){const r=await Bo({block:e,client:t,multiply:e=>e,request:n,type:"eip1559"});return r?.maxPriorityFeePerGas?r.maxPriorityFeePerGas:null}},id:59144,name:"Linea Mainnet",blockTime:2e3,nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42},ensRegistry:{address:"0x50130b669B28C339991d8676FA73CF122a121267",blockCreated:6682888},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:22222151}},ensTlds:[".linea.eth"],testnet:!1}),Po=1,Oo=1,Ro={1:{.../* @__PURE__ */Ar({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAABoCAYAAAAdHLWhAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAJalJREFUeAHVfQl4HNWZ4F/V96Vu3ZItS7IlMLLNEWTAGAwGAjmGhJ1JyHwQIGQ3B2ENhOwm2Xgg6xwfJGQIuwMTNiwTjswZhhyETABD4jiEK8YH2JIPWdjWZVmybqmvqnrz/+9Vtaqrq7pbp81vl6r61Tv///3H+99REry/QTLdmSXc+M3gfQwSnP5AdZTufrwrFpHClwOTGyUJGpmmNYDGGpnEYvg+yhjemaankEGSpBHG1FFZ8hyRXS7QNPUdSfZ0qqmJd4bV4T1/v6llSM//tCbg6UggXqf/9aPjy72uwHVMhvOYplyuqUqDpqVBVdOIUgaaquavPYOs90gwkF0ekGU3vyTJddTl8e5mavo5Na3tvm9T5S5TytMGThcCcS6559HBjZLbcx1TlOtUTWlQlAQgApFR7HEmyy5MiP9kmSiA/2UdvZpIQ89MJe5xxLrb7cXLD5LbfdTl8mzT0qmnv/ulim08k9MATjWBpP/+SHtZhXfJnYqmXqcqyXOVVJwj1AxECBkRiQjkxOCcILkccgRbHtCQUAzzRU7kXKjxS8lOiuW4PT7weINHNU37tsbS2753e817cAq56lQQiJe5+ZGBD2DXvVXStJuTqYmYqqSmIyA3UK8mohDCOGcsADDUWVSumk4i0VLTHQPJgeIPPJ4A3n1PK0r8W6eKUItJIF7W3T/saAqFyh9PpxKXp5FbmIEUJIqOECSODwgX2WaZxEMMBsm9S1lpzA0zxwNLXHO4IFYCFLzQ6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NhcRhU+pwCngGCucLgSyAre5W1tb5d7eXk86nXZhj3Zj73ahV8JNx0jje5ff75dxnsUgroQ9XzKO18Rnhs+GvtDQMNFwzKJiHsr4+LhQRvpQALIJcsqJ8n4DiT6lrH/zmrjLMDAC1dXV5DcKo3iM4EieTqktsdzphIygflEa4ka3npcYeJ3mcNpXMA9IDmFOHPC+5Iz/BElwM6GmmQapAAAAAElFTkSuQmCC",chainId:1,chainType:"ether",chainTypeMoralis:"eth",customName:"Ethereum",tokenTrendingDefault:["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"],isSupported:!0},10:{.../* @__PURE__ */Ar({...To,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...To.contracts,disputeGameFactory:{[Po]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[Po]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[Po]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[Po]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:1}),logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACW5JREFUeAHtnT1sHEUUx9+eD0QF14PwpoQCGwkJqtiRgAYJg5KGgo8EiVT5IIgyiYNLiIiTCqR8GAqaRMSR0gRQLqEhAil3KZKCImsJKhonFSI+L+8/u+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FqKtBQwPZFsoJZwwW2xBrYBnSRjRdwqkKxI/4WsPH1V6PFskER+I6Txk/DavA/4AYef6PJLXOU8Kpjnb/SXI8BG5LkHcKUJcPXIz6A+h5w41IXAksAhlb0QkDS39H/yetI4qBpGqu98iHRwuPnyYImz4uSbAzEx7+faPZG3XNeqoicW0IGBwxhNuyI4gqMNY0oI6W2eQf60cMVwiTpsqX4x1yeqoPuMY6QeLrpa3disExQEgXBtc7GR5TX6EL5KiGHp0Y3DQkCCuGfLhNDrtsYB3ALc80KvIszxTvaLE4tc1JsQ6QtcRfK7YStwCmSTS3tUidKKcyrtXhoOMozWzWUrH6dXub/nVyK5Oaou2tBLuydtBPJV2hveQ6i+UJ1dpYe3W7aQVR5uVcV3kasptSiiZbe6sBSiou6yrOPI93iK7lEy/IFGddiCf21kXZigxUc3WIL0dQWdcKvWtkZHG7EKe4ed5S7JZH0VJOrn+SBYJ4z/Itj4D6AE+p7jKvNCIxCt3TsPht86Ib1SOmOEtJ8liM6m6bt/bZTpT1lBQDuFuvmsLQrVdLX/SpDgCZxPbOvjqmbk5s5CpcHEica2/HzuN8fFu8gAxgfKXesOEfZpmxQvbWjiuIFyiHCHvgUqwsnRz3VbC8wTRtTdooFJqyiiRW17KObyp2fMsEfEtWkcT64uJxFjbLn/QhbW4QK2alt1AtSmWrvW9iYay5p42oTJA+m0KYUN0PfYEfF4reqL4olQvSJxZmmuoVY9D4i5hSa9s1pTEyQZKo+2dE92OaqlycaCULTDK/zOPdbRoxtRAkiaqPrfIgmEcz3FiTxgWCAA2OCz22hidpEXckoBpRO0EGiUcqIdIEFhqm/rK20eKdraE1I6PVjZbjRXUCfizxe++rJUR61B6VK5LyPxFwTRTwwp+SAAAAAElFTkSuQmCC",chainId:10,chainType:"optimism",chainTypeMoralis:"optimism",customName:"Optimism",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0x68f180fcce6836688e9084f035309e29bf0a2095","0xc47da4cb96ce65a96844a01bfae509f9d5454534"],isSupported:!0},56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0HdEbki/ZwsuJSBOI2QPIOeGFshhDwF9cJZ8zQJb0IkdRCDTRNh/Bqh9GrTYJCng3chkkxMJJJ+tXJMFzhZ69+DVVvd2LIEE5JnD/cuybbLIOd8y8EvvIpoWANOb8w92e1AYCohJA/WxxhAQoAvi3JEYlvQYD0R6HAg3TiFteOecoMqlROyH9wcPj4GCUSwCIwtwHDR+uHinS1cODL/eD5YTGdnuKjOFjB+Gyi9JeTeTu9BJ1RTpMqXLiNpVjp6y9MAAAAASUVORK5CYII=",chainId:56,chainType:"bsc",chainTypeMoralis:"bsc",customName:"BNB Chain",tokenTrendingDefault:["0x2170ed0880ac9a755fd29b2688956bd959f933f8","0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c"],isSupported:!0},137:{.../* @__PURE__ */Ar({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon.drpc.org"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),rpcUrls:{default:{http:["https://polygon-bor-rpc.publicnode.com"]}},logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAC61JREFUeAHtnU9sFNcdx39vdmNMbbATQHZSEOtQieYSO5dYzQHbBzDqAcyhOSUBDimRooSkVLkFL84tbRRHUaqklVpIeuLCn14wqMKOVCoiVVmnJypRrwVN7DYpCzHJ2njn5X3f7phde3bnzcyb2Z1hP9LKa7PGu/N97/f3zXuMGpz03q9SZN7rS7DkdpMKPYwS2znxFCPqJC4eTDzK4ZQTP8txYtniDwrTBiVmCqwwTfnlTHqyJ0cNDKMGAw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vEKOLy6nuei9UxO3ZFXFAOrnh0z2CBtoHKCYdBZDQoa4bn6heeRRcHg6Rs/1ol78AZPzoaiU6esCl4eCeTposnlsnm4gBg/52DyLpiir8CkG8H/0akDHWkSQ+h+9CqRPKUYSWXpAweHEOsQAWu7UkaIsLj2FBIgeMPCZ+eKSFjGA9taaLLNwNhp7vyLvzeQnjk9s1XokVCC9Tnm+ummeYTHay7EcVG05SxzWNSvKCXTnsrG9Nw/J2RIXhx/QrCgn8K3kirOlkGaMHaQIU/QVy+lqh3npIrS9/aIqTJDmyY7QN1uMhDBoJjHzFGfJ8bCEsKjb7pcyoaTCYCP5GDEbMsJHnOP55fGgTVM16iZIOVgtieMySic0pChcsrg/A7djlO4AqCsNIUg5qI8lDGOAFxdWBHFqQ1Y8JhmxTIGxc2GbJCcaTpDVyK3QW5N9CZ7oNanQQ6VN68UFTZX2i6xMQIub6eREdzMn8iCM/lmDEjMFvjxLS4XJepkiVX4AbuLqSV+48XkAAAAASUVORK5CYII=",chainId:137,chainType:"matic",chainTypeMoralis:"polygon",tokenTrendingDefault:["0x7ceb23fd6bc0add59e62ac25578270cff1b9f619","0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6"],isSupported:!0},8453:{...Io,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACFhJREFUeAHtnT1sHEUUx/+7pCJIuAltzjVIdppQ+lwT5A8kKG3TIYESSwhKn0sQUhwpiDJ2SSRiI5Ha55YmjpTUXrehuQY6e5j/zq19n769eTP7dfuTLne52Lm9/e97b2b2zXsBis6qmtN/NvEe7uIS8wj0s0JDP/P95NFLJ34oRN2/v0aIM1zoZ+AUR0EHBSZA0VhVDX3yV/QJXQSFgD75bolAYQIcxSIdBacoEMUQZFU19ZGs6scK3Asw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01SRgYtjxJy6tDGLccUhpvz5+8AH942Gyx7SbYCnL/rJq6d55JdmWFTsIS6h+E4cmibl1CLMkiOjSUT6tarCU5ar8o3ffIAeCCCvK7Sw+QQR82J3ezC5YFwrO1oyb5U8DsrN2IQucsaxLT04e3/qscVsxqeovPaNLgXhJiWF89crhIXCq7acqHQkVX04keQBDYVM9bSQDXwYhW9+BWEGGtpuWgSkysmVrTStlC1xb8gCWUVxqN7GkV2giSUQxiTMKjiZARRvvO0ZC9IgplQNlGkGMP5BPObmVLr2TWNIz9BemH/DLbLMB0aGsiWKN4bw+0YPVnoeVEMQXox62O8CcZ69KKuDWOIwA0y3Fd5oYXIKDakpXiCDGJKoS/iPSzEDbSSsrameOcchiegHZgY0ImLIrB0CBudXcQlRNp5uaK0/A/QqtacrEVArQAAAABJRU5ErkJggg==",chainId:8453,chainType:"base",chainTypeMoralis:"base",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf","0xc47da4cb96ce65a96844a01bfae509f9d5454534"],isSupported:!0},42161:{...Eo,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAEuFJREFUeAHlXQ1sFOeZfmd2ba+NbWwwBv8QbAjY/BuKayeQsE5Acmp0NiRcepe0IVV71zvpjnA65VRdq8JdTydFOsXRnYh6rZqgUpoqTbDbEJwG4qUtDcZOMBiojQleEv5iSGPw7/7MfP3ez5717O7MzuzszOw6fSKz49lvN+N55n2f932/+d7hIMVR5m7KyxnzuQlxLBJ5sZwHWATAlXFA8gjh8oCDvLAPEBjiODJEgPPiryKQs7zIDwAJnh3JdnV7PS1DkMLgIMVQWVtf5hScjYQnVTwQNz2xZWAiCICXktlNyWwhxH/2Yue73ZBCSAlCVtXWu0X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ovWnRLLs+EBeOt/xtq7WV7oJmYq62u16sjOS4Vtcy/r8qkEiZn6Wg/VXwUkjtAo1i0BIRNj1rCqMqi50vF2ud3ycD3SpL3MQvh2X74JN0KMvemCLTkRAK8RVgoFHHlkv8krQcmNqYE/WoVMDZucTmtAp4pGYUQ8FQ+glxn6dkIGSIRKbHgomIdmPzcNuoNjYXyiYds9IAn/3JovYMLFLyjMNEyADMeMfLInAMBl/kvTcQtmBJEYGwoRHr9ov9KkIIwKuhIQXfeIB4IEQi+4PngmgKWq3GWQgzGu0CPYmj6kD8tJI5ther87H4mnB1AfcD16/1EbLLHdphbjWyI0SMwpUL7AcQpO+vUNer2nRg6kWImFqxhGfXeWGLyY8dMbvWTNcVCQsIUTCitqv7KJFye9/YQR/0ir2Xeg40gwWwVSXFYnb1/q75y5c0soRPp+zqQZmHahWZI1t7z/5rgcshKUWIgcLj0XHXkrMMzCzYJl7UoJthEiYEcRggseRAyDCq4kkeUZgOyESkBgeeHeKaQytt3CtI66RZrPC2HiRNELkWFW7zU1Esgs4stlucnChEp3GauU5voWtAEgyUoIQObA+RkONKl7kGwknVplNEBIgAueh39sd5Jyt8Tx83g6kHCGRKHO787InsquoX18rgljOT7W1xeadrF9kZGGT+n/scDTZVIfzipx4lbrGAeoarw5njXiS5Yr04s84I4HsxczfIwAAAABJRU5ErkJggg==",chainId:42161,chainType:"arbitrum",chainTypeMoralis:"arbitrum",customName:"Arbitrum",tokenTrendingDefault:["0x82af49447d8a07e3bd95bd0d56f35241523fbab1","0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f"],isSupported:!0},43114:{...xo,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGUAAABkCAYAAACfIP5qAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACQJJREFUeAHtnc9zk0UYx7+7Kdo2VePFghfC4J14xhlecEY8o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zlQjbOj+EvTHsz206vgmh58L6R08GqZ5lpM31e72Gy4I07iY++/Ap5CdekWBAmuwGh1qLvD6WL2H2JN0+e3Mi6MHWu2w8QVT0Ddc//+AO76gPVVd6j+/wi+Dz5i8nRnAUSuHJofX158P5YUboXpdnAFENQa4fo3VHT8bHVLHlyy5T0cC6Jq48YW2KUNbdMScvoXBIxVhSOFjV6fB1TtKK+7CfHPZ5YjPcUbNnMFVa8bASg60kXJEgUJRyoJDqPKRqg1tMR/ZJBUpWtTpsxPXCzlab4MXUt8dv+xkX1skaqXl4Gwj5JyuuoZCrwVkp/NM0v2QnzyIhOYhyZRGGlpRKm6AzlywU10+SRfjIvhXjL95sqv3yBKSmgFrcuWYvoc18oTQ3DnHPlahFuEgqS60JpuRcNqTdbIcK0xz+S/IIwhS++OY2YQYoJwhReXscRIyiYJv8QahYVhNGy5lENrq2p5P/uy2yXCbS6o0EQZnrpcw3ETVblRasoEfe9U8uuXOrDLGH+OD9Y+FAUI6Iw3ajZKGvbKtNwL/3pmImqIhgTJWL/RY2Z6OjH+OYGh/z1ZaLgiPpDMhf5uQS7S+6X8by6SUE672WRvzyvMSPE1UkyAixGQOL6LoJrNvYc6LxnCXQvnKM6neVfFiSOMsR48d4lEl5HEoJzzglnDAGRLyHXnqC9aluMiFJF6edF9JQgkBKCIO4oT7Wio/NXFGdE6adzNerKCeJtxgV5vDEZ9NJSXXAlBO6o5mmtrIiIw0lRBmGR1AdYF6gcfo7gSLiPMqEGIWqq7a8NihY6JYgtFQHqwxZN1af4p7OBQ9Di5emuiTDI/4Da9NgV2sBcAAAAAElFTkSuQmCC",chainId:43114,chainType:"avax",chainTypeMoralis:"avalanche",tokenTrendingDefault:["0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB","0x0555E30da8f98308EdB960aa94C0Db47230d2B9c"],isSupported:!0},59144:{...Mo,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAABkCAYAAACWy14QAAAACXBIWXMAABYlAAA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dO72HuvtVrUxABFbZS9LAHRthVwK4Wvqh/w1steak5oWTjIkAxRwXNcLkjKUVvF9+sSgGjdHv7y8vITHTYu+9KWuITmB//Tz6hs7+APS6IRrSIQOmz0JTiRjONNqcivx3EgHN9DgE8SAqHmXWt2p61sP53vmoRIJMnvIMYYhJhuFjGU6VnAEMT7RjtC6STSDIRJFyPqwreJJQ0kM6arXUsSsWmGsvmzdhb3qIk1F6favSSH2jca9cwOFjx+53bUtb4eiUmIqnJ2s4UMo4BeVSf01kQRh1Xw5XJ5Le6CryaxWWmrEqm/gjDPmURXbjYUzTo9pz7vKOK+A9RyblfG8a1Ckgq9lv8B/ms5OCQW+c4AAAAASUVORK5CYII=",chainId:59144,chainType:"linea",chainTypeMoralis:"linea",customName:"Linea",tokenTrendingDefault:["0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f","0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4"],isSupported:!0},130:{.../* @__PURE__ */Ar({...To,id:130,name:"Unichain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://mainnet.unichain.org/"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz",apiUrl:"https://api.uniscan.xyz/api"}},contracts:{...To.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Oo]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[Oo]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[Oo]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:1}),logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABkCAYAAAB5CTUuAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAN7ZJREFUeAHNfQ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w51vvPWRdZ8/X7pmtOGFtedDRwW9tDWBeTJLUM7nixg9u7bb41DAoeWFIcLWGCM7VR8b3ZKlsnFdQa0hJX+IDhAFsafojfpRxxcf5yA9rRHZ0KZiCpQNoD669u7zrS18vL/36e2c+u+mR5vJUE+lnur0KDl36+uKkk0/uHn3iUrfP8RBm9qr4F1LlabPjgHa621G0NOYnmPBTzqF+Rpb0qyL1upmYFtKAKEUUM1mRlv9wdSsyA4hR5XCIpoWeF1FoN3OOl568657yx5d9t7zu/KrjLv2N6U9sgZ/h9jNngG1nw9l+urjx8KP8umNPaZ9wDCL7F7Rje280CG3X6zDsHM9s1VKgh+bvBXCen4jdzSQs7dfPIbVjIv8MBiKqrIB8cqnIb5/x5XDox7ciurzunNF/XL4hrv/+5cONd1wKl5bwDGzPGAOaG/1s7mGwZPffzk9du4dbfsiWYvjcdsz33aNYsbJXdLtYB+jgSNtorilUoh/UbUXCox0veH4UIqYMKGzGgDqO8PshpubHiN2H24fb5+6vtjyIKOmO5ePeTbfGe274RHn+HSOYWP9MEb25/VwwYMftBbDfosWwdPGHDnvX7geu2H/dtmJuHchvpC5Dek9hjXkVeu4J1BVJZaDdwr9Yna+GWBLdgJ77p3mWbVpdLb77e3dfcfOZt/3dfYshm74UfjwLP2fb/wd5ICT31PZzFAAAAABJRU5ErkJggg==",chainId:130,chainType:"unichain",chainTypeMoralis:"unichain",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0x0555e30da8f98308edb960aa94c0db47230d2b9c"],isSupported:!1},7565164:{id:7565164,name:"Solana",nativeCurrency:{decimals:18,name:"Solana",symbol:"SOL"},rpcUrls:{default:{http:[""]}},logo:"https://ipfs.pantograph.app/ipfs/QmZhKcFZVvw5r3cGLfSLsLcd1GzbQK5Vf7aoVYvgktzUUA?filename=Solana_logo.png",chainId:7565164,isSupported:!1}},Uo=e=>{const t=Object.values(Ro).find(t=>t.chainTypeMoralis===e);return t?.chainType||null};var Lo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Do(e){return e&&e.S&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fo(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"S",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var qo,Ho,Vo,Wo={},jo={},Yo={};function zo(){return Vo||(Vo=1,function(e){const t=function(){if(qo)return jo;qo=1,jo.byteLength=function(e){var t=i(e),n=t[0],r=t[1];return 3*(n+r)/4-r},jo.toByteArray=function(e){var r,o,a=i(e),s=a[0],c=a[1],u=new n(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),l=0,f=c>0?s-4:s;for(o=0;o<f;o+=4)r=t[e.charCodeAt(o)]<<18|t[e.charCodeAt(o+1)]<<12|t[e.charCodeAt(o+2)]<<6|t[e.charCodeAt(o+3)],u[l++]=r>>16&255,u[l++]=r>>8&255,u[l++]=255&r;return 2===c&&(r=t[e.charCodeAt(o)]<<2|t[e.charCodeAt(o+1)]>>4,u[l++]=255&r),1===c&&(r=t[e.charCodeAt(o)]<<10|t[e.charCodeAt(o+1)]<<4|t[e.charCodeAt(o+2)]>>2,u[l++]=r>>8&255,u[l++]=255&r),u},jo.fromByteArray=function(t){for(var n,r=t.length,o=r%3,i=[],a=16383,c=0,u=r-o;c<u;c+=a)i.push(s(t,c,c+a>u?u:c+a));return 1===o?(n=t[r-1],i.push(e[n>>2]+e[n<<4&63]+"==")):2===o&&(n=(t[r-2]<<8)+t[r-1],i.push(e[n>>10]+e[n>>4&63]+e[n<<2&63]+"=")),i.join("")};for(var e=[],t=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)e[o]=r[o],t[r.charCodeAt(o)]=o;function i(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function a(t){return e[t>>18&63]+e[t>>12&63]+e[t>>6&63]+e[63&t]}function s(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(a(r));return o.join("")}return t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63,jo}(),n=(Ho||(Ho=1,Yo.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,u=c>>1,l=-7,f=n?o-1:0,d=n?-1:1,h=e[t+f];for(f+=d,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=u}return(h?-1:1)*a*Math.pow(2,i-r)},Yo.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?d/c:d*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=p,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[n+h]=255&a,h+=p,a/=256,u-=8);e[n+h-p]|=128*m}),Yo),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},e.INSPECT_MAX_BYTES=50;const o=2147483647;function i(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return s(e,t,n)}function s(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|h(e,t);let r=i(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return a.from(r,t,n);const o=function(e){if(a.isBuffer(e)){const t=0|d(e.length),n=i(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?i(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),i(e<0?0:0|d(e))}function l(e){const t=e.length<0?0:0|d(e.length),n=i(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,a.prototype),r}function d(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function h(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(o)return r?-1:Y(e).length;t=(""+t).toLowerCase(),o=!0}}function p(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){let i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let r=-1;for(i=n;i<s;i++)if(u(e,i)===u(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===c)return r*a}else-1!==r&&(i-=i-r),r=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){let n=!0;for(let r=0;r<c;r++)if(u(e,i+r)!==u(t,r)){n=!1;break}if(n)return i}return-1}function y(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(X(r))return a;e[n+a]=r}return a}function b(e,t,n,r){return G(Y(t,e.length-n),e,n,r)}function v(e,t,n,r){return G(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function A(e,t,n,r){return G(z(t),e,n,r)}function k(e,t,n,r){return G(function(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function T(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function E(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=x));return n}(r)}e.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"undefined"!=typeof console&&console.error,Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,n){return s(e,t,n)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,n){return function(e,t,n){return c(e),e<=0?i(e):void 0!==t?"string"==typeof n?i(e).fill(t,n):i(e).fill(t):i(e)}(e,t,n)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e.N&&e!==a.prototype},a.compare=function(e,t){if(J(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=a.allocUnsafe(t);let o=0;for(n=0;n<e.length;++n){let t=e[n];if(J(t,Uint8Array))o+t.length>r.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!a.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},a.byteLength=h,a.prototype.N=!0,a.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){let t="";const n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(e,t,n,r,o){if(J(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const c=Math.min(i,s),u=this.slice(r,o),l=e.slice(t,n);for(let a=0;a<c;++a)if(u[a]!==l[a]){i=u[a],s=l[a];break}return i<s?-1:s<i?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return v(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this.M||this,0)}};const x=4096;function C(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function I(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function S(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let i=t;i<n;++i)o+=K[e[i]];return o}function N(e,t,n){const r=e.slice(t,n);let o="";for(let i=0;i<r.length-1;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function B(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,o,i){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r,o){H(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function O(e,t,n,r,o){H(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function R(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,r,o,i){return t=+t,r>>>=0,i||R(e,0,r,4),n.write(e,t,r,o,23,4),r+4}function L(e,t,r,o,i){return t=+t,r>>>=0,i||R(e,0,r,8),n.write(e,t,r,o,52,8),r+8}a.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,a.prototype),r},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e],o=1,i=0;for(;++i<t&&(o*=256);)r+=this[e+i]*o;return r},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=Q(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<<BigInt(32))}),a.prototype.readBigUInt64BE=Q(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(o)}),a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e],o=1,i=0;for(;++i<t&&(o*=256);)r+=this[e+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},a.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=Q(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),a.prototype.readBigInt64BE=Q(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),n.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),n.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),n.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),n.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=Q(function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Q(function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let o=0,i=1,a=0;for(this[t]=255&e;++o<n&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=Q(function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Q(function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const o=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),o},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{const i=a.isBuffer(e)?e:a.from(e,r),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=i[o%s]}return this};const D={};function F(e,t,n){D[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function H(e,t,n,r,o,i){if(e>n||e<t){const n="bigint"==typeof t?"n":"";let r;throw r=0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`,new D.ERR_OUT_OF_RANGE("value",r,e)}!function(e,t,n){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||W(t,e.length-(n+1))}(r,o,i)}function V(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,n){if(Math.floor(e)!==e)throw V(e,n),new D.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),F("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),F("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=q(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r},RangeError);const j=/[^+/0-9A-Za-z-_]/g;function Y(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function z(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}}(Wo)),Wo}var Go=zo();const Jo=BigInt(0),Xo=BigInt(1),Ko=BigInt(2),Qo=BigInt(8),Zo={zip215:!0};const _o=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),$o=/* @__PURE__ */BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const ei=BigInt(1),ti=BigInt(2);BigInt(3);const ni=BigInt(5),ri=BigInt(8);function oi(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function ii(e,t){const n=_o,r=Mr(t*t*t,n),o=function(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),i=_o,a=e*e%i*e%i,s=Pr(a,ti,i)*a%i,c=Pr(s,ei,i)*e%i,u=Pr(c,ni,i)*c%i,l=Pr(u,t,i)*u%i,f=Pr(l,n,i)*l%i,d=Pr(f,r,i)*f%i,h=Pr(d,o,i)*d%i,p=Pr(h,o,i)*d%i,m=Pr(p,t,i)*u%i;return{pow_p_5_8:Pr(m,ti,i)*e%i,b2:a}}(e*Mr(r*r*t,n)).pow_p_5_8;let i=Mr(e*r*o,n);const a=Mr(t*i*i,n),s=i,c=Mr(i*$o,n),u=a===e,l=a===Mr(-e,n),f=a===Mr(-e*$o,n);return u&&(i=s),(l||f)&&(i=c),(Mr(i,n)&xr)===xr&&(i=Mr(-i,n)),{isValid:u||l,value:i}}const ai=/* @__PURE__ */(()=>Hr(_o,void 0,!0))(),si=/* @__PURE__ */(()=>({a:ai.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:ai,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:ri,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:Mn,randomBytes:qe,adjustScalarBytes:oi,uvRatio:ii}))(),ci=/* @__PURE__ */(()=>function(e){const t=function(e){const t=eo(e);return lr(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}(e),{Fp:n,n:r,prehash:o,hash:i,randomBytes:a,nByteLength:s,h:c}=t,u=Ko<<BigInt(8*s)-Xo,l=n.create,f=Hr(t.n,t.nBitLength);if(!function(e,r){const o=n.sqr(e),i=n.sqr(r),a=n.add(n.mul(t.a,o),i),s=n.add(n.ONE,n.mul(t.d,n.mul(o,i)));return n.eql(a,s)}(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const d=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:n.sqrt(e*n.inv(t))}}catch(r){return{isValid:!1,value:Jo}}}),h=t.adjustScalarBytes||(e=>e),p=t.domain||((e,t,n)=>{if(jn("phflag",n),t.length||n)throw new Error("Contexts/pre-hash are not supported");return e});function m(e,t,n=!1){ir("coordinate "+e,t,n?Xo:Jo,u)}function w(e){if(!(e instanceof b))throw new Error("ExtendedPoint expected")}const g=fr((e,t)=>{const{ex:r,ey:o,ez:i}=e,a=e.is0();null==t&&(t=a?Qo:n.inv(i));const s=l(r*t),c=l(o*t),u=l(i*t);if(a)return{x:Jo,y:Xo};if(u!==Xo)throw new Error("invZ was invalid");return{x:s,y:c}}),y=fr(e=>{const{a:n,d:r}=t;if(e.is0())throw new Error("bad point: ZERO");const{ex:o,ey:i,ez:a,et:s}=e,c=l(o*o),u=l(i*i),f=l(a*a),d=l(f*f),h=l(c*n);if(l(f*l(h+u))!==l(d+l(r*l(c*u))))throw new Error("bad point: equation left != right (1)");if(l(o*i)!==l(a*s))throw new Error("bad point: equation left != right (2)");return!0});class b{constructor(e,t,n,r){m("x",e),m("y",t),m("z",n,!0),m("t",r),this.ex=e,this.ey=t,this.ez=n,this.et=r,Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof b)throw new Error("extended point not allowed");const{x:t,y:n}=e||{};return m("x",t),m("y",n),new b(t,n,Xo,l(t*n))}static normalizeZ(e){const t=Dr(n,e.map(e=>e.ez));return e.map((e,n)=>e.toAffine(t[n])).map(b.fromAffine)}static msm(e,t){return $r(b,f,e,t)}I(e){k.setWindowSize(this,e)}assertValidity(){y(this)}equals(e){w(e);const{ex:t,ey:n,ez:r}=this,{ex:o,ey:i,ez:a}=e,s=l(t*a),c=l(o*r),u=l(n*a),f=l(i*r);return s===c&&u===f}is0(){return this.equals(b.ZERO)}negate(){return new b(l(-this.ex),this.ey,this.ez,l(-this.et))}double(){const{a:e}=t,{ex:n,ey:r,ez:o}=this,i=l(n*n),a=l(r*r),s=l(Ko*l(o*o)),c=l(e*i),u=n+r,f=l(l(u*u)-i-a),d=c+a,h=d-s,p=c-a,m=l(f*h),w=l(d*p),g=l(f*p),y=l(h*d);return new b(m,w,y,g)}add(e){w(e);const{a:n,d:r}=t,{ex:o,ey:i,ez:a,et:s}=this,{ex:c,ey:u,ez:f,et:d}=e,h=l(o*c),p=l(i*u),m=l(s*r*d),g=l(a*f),y=l((o+i)*(c+u)-h-p),v=g-m,A=g+m,k=l(p-n*h),T=l(y*v),E=l(A*k),x=l(y*k),C=l(v*A);return new b(T,E,C,x)}subtract(e){return this.add(e.negate())}wNAF(e){return k.wNAFCached(this,e,b.normalizeZ)}multiply(e){const t=e;ir("scalar",t,Xo,r);const{p:n,f:o}=this.wNAF(t);return b.normalizeZ([n,o])[0]}multiplyUnsafe(e,t=b.ZERO){const n=e;return ir("scalar",n,Jo,r),n===Jo?A:this.is0()||n===Xo?this:k.wNAFCachedUnsafe(this,n,b.normalizeZ,t)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return k.unsafeLadder(this,r).is0()}toAffine(e){return g(this,e)}clearCofactor(){const{h:e}=t;return e===Xo?this:this.multiplyUnsafe(e)}static fromHex(e,r=!1){const{d:o,a:i}=t,a=n.BYTES;e=tr("pointHex",e,a),jn("zip215",r);const s=e.slice(),c=e[a-1];s[a-1]=-129&c;const f=_n(s),h=r?u:n.ORDER;ir("pointHex.y",f,Jo,h);const p=l(f*f),m=l(p-Xo),w=l(o*p-i);let{isValid:g,value:y}=d(m,w);if(!g)throw new Error("Point.fromHex: invalid y coordinate");const v=(y&Xo)===Xo,A=!!(128&c);if(!r&&y===Jo&&A)throw new Error("Point.fromHex: x=0 and x_0=1");return A!==v&&(y=l(-y)),b.fromAffine({x:y,y:f})}static fromPrivateKey(e){const{scalar:t}=x(e);return v.multiply(t)}toRawBytes(){const{x:e,y:t}=this.toAffine(),r=er(t,n.BYTES);return r[r.length-1]|=e&Xo?128:0,r}toHex(){return Xn(this.toRawBytes())}}b.BASE=new b(t.Gx,t.Gy,Xo,l(t.Gx*t.Gy)),b.ZERO=new b(Jo,Xo,Xo,Jo);const{BASE:v,ZERO:A}=b,k=_r(b,8*s);function T(e){return Mr(e,r)}function E(e){return T(_n(e))}function x(e){const t=n.BYTES;e=tr("private key",e,t);const r=tr("hashed private key",i(e),2*t),o=h(r.slice(0,t));return{head:o,prefix:r.slice(t,2*t),scalar:E(o)}}function C(e){const{head:t,prefix:n,scalar:r}=x(e),o=v.multiply(r),i=o.toRawBytes();return{head:t,prefix:n,scalar:r,point:o,pointBytes:i}}function I(e=Uint8Array.of(),...t){const n=nr(...t);return E(i(p(n,tr("context",e),!!o)))}const S=Zo;return v.I(8),{CURVE:t,getPublicKey:function(e){return C(e).pointBytes},sign:function(e,t,i={}){e=tr("message",e),o&&(e=o(e));const{prefix:a,scalar:s,pointBytes:c}=C(t),u=I(i.context,a,e),l=v.multiply(u).toRawBytes(),f=T(u+I(i.context,l,c,e)*s);return ir("signature.s",f,Jo,r),tr("result",nr(l,er(f,n.BYTES)),2*n.BYTES)},verify:function(e,t,r,i=S){const{context:a,zip215:s}=i,c=n.BYTES;e=tr("signature",e,2*c),t=tr("message",t),r=tr("publicKey",r,c),void 0!==s&&jn("zip215",s),o&&(t=o(t));const u=_n(e.slice(c,2*c));let l,f,d;try{l=b.fromHex(r,s),f=b.fromHex(e.slice(0,c),s),d=v.multiplyUnsafe(u)}catch(p){return!1}if(!s&&l.isSmallOrder())return!1;const h=I(a,f.toRawBytes(),l.toRawBytes(),t);return f.add(l.multiplyUnsafe(h)).subtract(d).clearCofactor().equals(b.ZERO)},ExtendedPoint:b,utils:{getExtendedPublicKey:C,randomPrivateKey:()=>a(n.BYTES),precompute:(e=8,t=b.BASE)=>(t.I(e),t.multiply(BigInt(3)),t)}}}(si))();var ui={exports:{}};const li=/* @__PURE__ */Fo(/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var fi,di=ui.exports;function hi(){return fi||(fi=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this.P(e||0,t||10,n||"be"))}var i;"object"==typeof ui?ui.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{i="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:li.Buffer}catch(C){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function s(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function c(e,t,r,o){for(var i=0,a=0,s=Math.min(e.length,r),c=t;c<s;c++){var u=e.charCodeAt(c)-48;i*=o,a=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&a<o,"Invalid character"),i+=a}return i}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype.P=function(e,t,r){if("number"==typeof e)return this.O(e,t,r);if("object"==typeof e)return this.R(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o<e.length&&(16===t?this.U(e,o,r):(this.L(e,t,o),"le"===r&&this.R(this.toArray(),t,r)))},o.prototype.O=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this.R(this.toArray(),t,r)},o.prototype.R=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var i,a,s=0;if("be"===r)for(o=e.length-1,i=0;o>=0;o-=3)a=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(o=0,i=0;o<e.length;o+=3)a=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.q()},o.prototype.U=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var o,i=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)o=s(e,t,r)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)o=s(e,t,r)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this.q()},o.prototype.L=function(e,t,n){this.words=[0],this.length=1;for(var r=0,o=1;o<=67108863;o*=t)r++;r--,o=o/t|0;for(var i=e.length-n,a=i%r,s=Math.min(i,i-a)+n,u=0,l=n;l<s;l+=r)u=c(e,l,l+r,t),this.imuln(o),this.words[0]+u<67108864?this.words[0]+=u:this.V(u);if(0!==a){var f=1;for(u=c(e,l,e.length,t),l=0;l<a;l++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this.V(u)}this.q()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.W=function(e){u(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype.j=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.q=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this.Y()},o.prototype.Y=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[/* @__PURE__ */Symbol.for("nodejs.util.inspect.custom")]=l}catch(C){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var o=0|e.words[0],i=0|t.words[0],a=o*i,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var u=1;u<r;u++){for(var l=c>>>26,f=67108863&c,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;l+=(a=(o=0|e.words[p])*(i=0|t.words[h])+f)/67108864|0,f=67108863&a}n.words[u]=0|f,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.q()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var o=0,i=0,a=0;a<this.length;a++){var s=this.words[a],c=(16777215&(s<<o|i)).toString(16);i=s>>>24-o&16777215,(o+=2)>=26&&(o-=26,a--),r=0!==i||a!==this.length-1?f[6-c.length]+c+r:c+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=d[e],l=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(l).toString(e);r=(p=p.idivn(l)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},i&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(i,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this.q();var o=this.byteLength(),i=r||Math.max(1,o);n(o<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,o),a},o.prototype.J=function(e,t){for(var n=0,r=0,o=0,i=0;o<this.length;o++){var a=this.words[o]<<i|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===i?(n<e.length&&(e[n++]=a>>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},o.prototype.X=function(e,t){for(var n=e.length-1,r=0,o=0,i=0;o<this.length;o++){var a=this.words[o]<<i|r;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===i?(n>=0&&(e[n--]=a>>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype.K=function(e){return 32-Math.clz32(e)}:o.prototype.K=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype.Z=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this.K(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this.Z(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.q()},o.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.q()},o.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.q()},o.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this.j(t),r>0&&t--;for(var o=0;o<t;o++)this.words[o]=67108863&~this.words[o];return r>0&&(this.words[o]=~this.words[o]&67108863>>26-r),this.q()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this.j(r+1),this.words[r]=t?this.words[r]|1<<o:this.words[r]&~(1<<o),this.q()},o.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this.Y();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t.Y();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var o=0,i=0;i<r.length;i++)t=(0|n.words[i])+(0|r.words[i])+o,this.words[i]=67108863&t,o=t>>>26;for(;0!==o&&i<n.length;i++)t=(0|n.words[i])+o,this.words[i]=67108863&t,o=t>>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;i<n.length;i++)this.words[i]=n.words[i];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t.Y()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this.Y();var n,r,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)i=(t=(0|n.words[a])-(0|r.words[a])+i)>>26,this.words[a]=67108863&t;for(;0!==i&&a<n.length;a++)i=(t=(0|n.words[a])+i)>>26,this.words[a]=67108863&t;if(0===i&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.q()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,o,i,a=e.words,s=t.words,c=n.words,u=0,l=0|a[0],f=8191&l,d=l>>>13,h=0|a[1],p=8191&h,m=h>>>13,w=0|a[2],g=8191&w,y=w>>>13,b=0|a[3],v=8191&b,A=b>>>13,k=0|a[4],T=8191&k,E=k>>>13,x=0|a[5],C=8191&x,I=x>>>13,S=0|a[6],N=8191&S,B=S>>>13,M=0|a[7],P=8191&M,O=M>>>13,R=0|a[8],U=8191&R,L=R>>>13,D=0|a[9],F=8191&D,q=D>>>13,H=0|s[0],V=8191&H,W=H>>>13,j=0|s[1],Y=8191&j,z=j>>>13,G=0|s[2],J=8191&G,X=G>>>13,K=0|s[3],Q=8191&K,Z=K>>>13,_=0|s[4],$=8191&_,ee=_>>>13,te=0|s[5],ne=8191&te,re=te>>>13,oe=0|s[6],ie=8191&oe,ae=oe>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var we=(u+(r=Math.imul(f,V))|0)+((8191&(o=(o=Math.imul(f,W))+Math.imul(d,V)|0))<<13)|0;u=((i=Math.imul(d,W))+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(p,V),o=(o=Math.imul(p,W))+Math.imul(m,V)|0,i=Math.imul(m,W);var ge=(u+(r=r+Math.imul(f,Y)|0)|0)+((8191&(o=(o=o+Math.imul(f,z)|0)+Math.imul(d,Y)|0))<<13)|0;u=((i=i+Math.imul(d,z)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,V),o=(o=Math.imul(g,W))+Math.imul(y,V)|0,i=Math.imul(y,W),r=r+Math.imul(p,Y)|0,o=(o=o+Math.imul(p,z)|0)+Math.imul(m,Y)|0,i=i+Math.imul(m,z)|0;var ye=(u+(r=r+Math.imul(f,J)|0)|0)+((8191&(o=(o=o+Math.imul(f,X)|0)+Math.imul(d,J)|0))<<13)|0;u=((i=i+Math.imul(d,X)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(v,V),o=(o=Math.imul(v,W))+Math.imul(A,V)|0,i=Math.imul(A,W),r=r+Math.imul(g,Y)|0,o=(o=o+Math.imul(g,z)|0)+Math.imul(y,Y)|0,i=i+Math.imul(y,z)|0,r=r+Math.imul(p,J)|0,o=(o=o+Math.imul(p,X)|0)+Math.imul(m,J)|0,i=i+Math.imul(m,X)|0;var be=(u+(r=r+Math.imul(f,Q)|0)|0)+((8191&(o=(o=o+Math.imul(f,Z)|0)+Math.imul(d,Q)|0))<<13)|0;u=((i=i+Math.imul(d,Z)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(T,V),o=(o=Math.imul(T,W))+Math.imul(E,V)|0,i=Math.imul(E,W),r=r+Math.imul(v,Y)|0,o=(o=o+Math.imul(v,z)|0)+Math.imul(A,Y)|0,i=i+Math.imul(A,z)|0,r=r+Math.imul(g,J)|0,o=(o=o+Math.imul(g,X)|0)+Math.imul(y,J)|0,i=i+Math.imul(y,X)|0,r=r+Math.imul(p,Q)|0,o=(o=o+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,i=i+Math.imul(m,Z)|0;var ve=(u+(r=r+Math.imul(f,$)|0)|0)+((8191&(o=(o=o+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;u=((i=i+Math.imul(d,ee)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(C,V),o=(o=Math.imul(C,W))+Math.imul(I,V)|0,i=Math.imul(I,W),r=r+Math.imul(T,Y)|0,o=(o=o+Math.imul(T,z)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,z)|0,r=r+Math.imul(v,J)|0,o=(o=o+Math.imul(v,X)|0)+Math.imul(A,J)|0,i=i+Math.imul(A,X)|0,r=r+Math.imul(g,Q)|0,o=(o=o+Math.imul(g,Z)|0)+Math.imul(y,Q)|0,i=i+Math.imul(y,Z)|0,r=r+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(f,ne)|0)|0)+((8191&(o=(o=o+Math.imul(f,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((i=i+Math.imul(d,re)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(N,V),o=(o=Math.imul(N,W))+Math.imul(B,V)|0,i=Math.imul(B,W),r=r+Math.imul(C,Y)|0,o=(o=o+Math.imul(C,z)|0)+Math.imul(I,Y)|0,i=i+Math.imul(I,z)|0,r=r+Math.imul(T,J)|0,o=(o=o+Math.imul(T,X)|0)+Math.imul(E,J)|0,i=i+Math.imul(E,X)|0,r=r+Math.imul(v,Q)|0,o=(o=o+Math.imul(v,Z)|0)+Math.imul(A,Q)|0,i=i+Math.imul(A,Z)|0,r=r+Math.imul(g,$)|0,o=(o=o+Math.imul(g,ee)|0)+Math.imul(y,$)|0,i=i+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,re)|0)+Math.imul(m,ne)|0,i=i+Math.imul(m,re)|0;var ke=(u+(r=r+Math.imul(f,ie)|0)|0)+((8191&(o=(o=o+Math.imul(f,ae)|0)+Math.imul(d,ie)|0))<<13)|0;u=((i=i+Math.imul(d,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(P,V),o=(o=Math.imul(P,W))+Math.imul(O,V)|0,i=Math.imul(O,W),r=r+Math.imul(N,Y)|0,o=(o=o+Math.imul(N,z)|0)+Math.imul(B,Y)|0,i=i+Math.imul(B,z)|0,r=r+Math.imul(C,J)|0,o=(o=o+Math.imul(C,X)|0)+Math.imul(I,J)|0,i=i+Math.imul(I,X)|0,r=r+Math.imul(T,Q)|0,o=(o=o+Math.imul(T,Z)|0)+Math.imul(E,Q)|0,i=i+Math.imul(E,Z)|0,r=r+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(A,$)|0,i=i+Math.imul(A,ee)|0,r=r+Math.imul(g,ne)|0,o=(o=o+Math.imul(g,re)|0)+Math.imul(y,ne)|0,i=i+Math.imul(y,re)|0,r=r+Math.imul(p,ie)|0,o=(o=o+Math.imul(p,ae)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,ae)|0;var Te=(u+(r=r+Math.imul(f,ce)|0)|0)+((8191&(o=(o=o+Math.imul(f,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((i=i+Math.imul(d,ue)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(U,V),o=(o=Math.imul(U,W))+Math.imul(L,V)|0,i=Math.imul(L,W),r=r+Math.imul(P,Y)|0,o=(o=o+Math.imul(P,z)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,z)|0,r=r+Math.imul(N,J)|0,o=(o=o+Math.imul(N,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,r=r+Math.imul(C,Q)|0,o=(o=o+Math.imul(C,Z)|0)+Math.imul(I,Q)|0,i=i+Math.imul(I,Z)|0,r=r+Math.imul(T,$)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,r=r+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,re)|0)+Math.imul(A,ne)|0,i=i+Math.imul(A,re)|0,r=r+Math.imul(g,ie)|0,o=(o=o+Math.imul(g,ae)|0)+Math.imul(y,ie)|0,i=i+Math.imul(y,ae)|0,r=r+Math.imul(p,ce)|0,o=(o=o+Math.imul(p,ue)|0)+Math.imul(m,ce)|0,i=i+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(f,fe)|0)|0)+((8191&(o=(o=o+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;u=((i=i+Math.imul(d,de)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(F,V),o=(o=Math.imul(F,W))+Math.imul(q,V)|0,i=Math.imul(q,W),r=r+Math.imul(U,Y)|0,o=(o=o+Math.imul(U,z)|0)+Math.imul(L,Y)|0,i=i+Math.imul(L,z)|0,r=r+Math.imul(P,J)|0,o=(o=o+Math.imul(P,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,r=r+Math.imul(N,Q)|0,o=(o=o+Math.imul(N,Z)|0)+Math.imul(B,Q)|0,i=i+Math.imul(B,Z)|0,r=r+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(E,ne)|0,i=i+Math.imul(E,re)|0,r=r+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(A,ie)|0,i=i+Math.imul(A,ae)|0,r=r+Math.imul(g,ce)|0,o=(o=o+Math.imul(g,ue)|0)+Math.imul(y,ce)|0,i=i+Math.imul(y,ue)|0,r=r+Math.imul(p,fe)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(m,fe)|0,i=i+Math.imul(m,de)|0;var xe=(u+(r=r+Math.imul(f,pe)|0)|0)+((8191&(o=(o=o+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((i=i+Math.imul(d,me)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(F,Y),o=(o=Math.imul(F,z))+Math.imul(q,Y)|0,i=Math.imul(q,z),r=r+Math.imul(U,J)|0,o=(o=o+Math.imul(U,X)|0)+Math.imul(L,J)|0,i=i+Math.imul(L,X)|0,r=r+Math.imul(P,Q)|0,o=(o=o+Math.imul(P,Z)|0)+Math.imul(O,Q)|0,i=i+Math.imul(O,Z)|0,r=r+Math.imul(N,$)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,r=r+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,re)|0)+Math.imul(I,ne)|0,i=i+Math.imul(I,re)|0,r=r+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,ae)|0,r=r+Math.imul(v,ce)|0,o=(o=o+Math.imul(v,ue)|0)+Math.imul(A,ce)|0,i=i+Math.imul(A,ue)|0,r=r+Math.imul(g,fe)|0,o=(o=o+Math.imul(g,de)|0)+Math.imul(y,fe)|0,i=i+Math.imul(y,de)|0;var Ce=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((i=i+Math.imul(m,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(F,J),o=(o=Math.imul(F,X))+Math.imul(q,J)|0,i=Math.imul(q,X),r=r+Math.imul(U,Q)|0,o=(o=o+Math.imul(U,Z)|0)+Math.imul(L,Q)|0,i=i+Math.imul(L,Z)|0,r=r+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,r=r+Math.imul(N,ne)|0,o=(o=o+Math.imul(N,re)|0)+Math.imul(B,ne)|0,i=i+Math.imul(B,re)|0,r=r+Math.imul(C,ie)|0,o=(o=o+Math.imul(C,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0,r=r+Math.imul(T,ce)|0,o=(o=o+Math.imul(T,ue)|0)+Math.imul(E,ce)|0,i=i+Math.imul(E,ue)|0,r=r+Math.imul(v,fe)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(A,fe)|0,i=i+Math.imul(A,de)|0;var Ie=(u+(r=r+Math.imul(g,pe)|0)|0)+((8191&(o=(o=o+Math.imul(g,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((i=i+Math.imul(y,me)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(F,Q),o=(o=Math.imul(F,Z))+Math.imul(q,Q)|0,i=Math.imul(q,Z),r=r+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,ee)|0,r=r+Math.imul(P,ne)|0,o=(o=o+Math.imul(P,re)|0)+Math.imul(O,ne)|0,i=i+Math.imul(O,re)|0,r=r+Math.imul(N,ie)|0,o=(o=o+Math.imul(N,ae)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,ae)|0,r=r+Math.imul(C,ce)|0,o=(o=o+Math.imul(C,ue)|0)+Math.imul(I,ce)|0,i=i+Math.imul(I,ue)|0,r=r+Math.imul(T,fe)|0,o=(o=o+Math.imul(T,de)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,de)|0;var Se=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((i=i+Math.imul(A,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(F,$),o=(o=Math.imul(F,ee))+Math.imul(q,$)|0,i=Math.imul(q,ee),r=r+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,re)|0)+Math.imul(L,ne)|0,i=i+Math.imul(L,re)|0,r=r+Math.imul(P,ie)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,ae)|0,r=r+Math.imul(N,ce)|0,o=(o=o+Math.imul(N,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,r=r+Math.imul(C,fe)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(I,fe)|0,i=i+Math.imul(I,de)|0;var Ne=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(o=(o=o+Math.imul(T,me)|0)+Math.imul(E,pe)|0))<<13)|0;u=((i=i+Math.imul(E,me)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(F,ne),o=(o=Math.imul(F,re))+Math.imul(q,ne)|0,i=Math.imul(q,re),r=r+Math.imul(U,ie)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(L,ie)|0,i=i+Math.imul(L,ae)|0,r=r+Math.imul(P,ce)|0,o=(o=o+Math.imul(P,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,r=r+Math.imul(N,fe)|0,o=(o=o+Math.imul(N,de)|0)+Math.imul(B,fe)|0,i=i+Math.imul(B,de)|0;var Be=(u+(r=r+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,me)|0)+Math.imul(I,pe)|0))<<13)|0;u=((i=i+Math.imul(I,me)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(F,ie),o=(o=Math.imul(F,ae))+Math.imul(q,ie)|0,i=Math.imul(q,ae),r=r+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,ue)|0)+Math.imul(L,ce)|0,i=i+Math.imul(L,ue)|0,r=r+Math.imul(P,fe)|0,o=(o=o+Math.imul(P,de)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,de)|0;var Me=(u+(r=r+Math.imul(N,pe)|0)|0)+((8191&(o=(o=o+Math.imul(N,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(F,ce),o=(o=Math.imul(F,ue))+Math.imul(q,ce)|0,i=Math.imul(q,ue),r=r+Math.imul(U,fe)|0,o=(o=o+Math.imul(U,de)|0)+Math.imul(L,fe)|0,i=i+Math.imul(L,de)|0;var Pe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(o=(o=o+Math.imul(P,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(F,fe),o=(o=Math.imul(F,de))+Math.imul(q,fe)|0,i=Math.imul(q,de);var Oe=(u+(r=r+Math.imul(U,pe)|0)|0)+((8191&(o=(o=o+Math.imul(U,me)|0)+Math.imul(L,pe)|0))<<13)|0;u=((i=i+Math.imul(L,me)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Re=(u+(r=Math.imul(F,pe))|0)+((8191&(o=(o=Math.imul(F,me))+Math.imul(q,pe)|0))<<13)|0;return u=((i=Math.imul(q,me))+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,c[0]=we,c[1]=ge,c[2]=ye,c[3]=be,c[4]=ve,c[5]=Ae,c[6]=ke,c[7]=Te,c[8]=Ee,c[9]=xe,c[10]=Ce,c[11]=Ie,c[12]=Se,c[13]=Ne,c[14]=Be,c[15]=Me,c[16]=Pe,c[17]=Oe,c[18]=Re,0!==u&&(c[19]=u,n.length++),n};function w(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,i=0;i<n.length-1;i++){var a=o;o=0;for(var s=67108863&r,c=Math.min(i,t.length-1),u=Math.max(0,i-e.length+1);u<=c;u++){var l=i-u,f=(0|e.words[l])*(0|t.words[u]),d=67108863&f;s=67108863&(d=d+s|0),o+=(a=(a=a+(f/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}n.words[i]=s,r=a,a=o}return 0!==r?n.words[i]=r:n.length--,n.q()}function g(e,t,n){return w(e,t,n)}Math.imul||(m=p),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?p(this,e,t):n<1024?w(this,e,t):g(this,e,t)},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),g(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,o=0;o<this.length;o++){var i=(0|this.words[o])*e,a=(67108863&i)+(67108863&r);r>>=26,r+=i/67108864|0,r+=a>>>26,this.words[o]=67108863&a}return 0!==r&&(this.words[o]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,o=n%26;t[n]=e.words[r]>>>o&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,o=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&i,c=(0|this.words[t])-s<<r;this.words[t]=c|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t<o;t++)this.words[t]=0;this.length+=o}return this.q()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var o;n("number"==typeof e&&e>=0),o=t?(t-t%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<<i,c=r;if(o-=a,o=Math.max(0,o),c){for(var u=0;u<a;u++)c.words[u]=this.words[u];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=o);u--){var f=0|this.words[u];this.words[u]=l<<26-i|f>>>i,l=f&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.q()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,o=1<<t;return!(this.length<=r||!(this.words[r]&o))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var o=67108863^67108863>>>t<<t;this.words[this.length-1]&=o}return 0===this.length&&(this.words[0]=0,this.length=1),this.q()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this.V(e)},o.prototype.V=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.q()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._=function(e,t,r){var o,i,a=e.length+r;this.j(a);var s=0;for(o=0;o<e.length;o++){i=(0|this.words[o+r])+s;var c=(0|e.words[o])*t;s=((i-=67108863&c)>>26)-(c/67108864|0),this.words[o+r]=67108863&i}for(;o<this.length-r;o++)s=(i=(0|this.words[o+r])+s)>>26,this.words[o+r]=67108863&i;if(0===s)return this.q();for(n(-1===s),s=0,o=0;o<this.length;o++)s=(i=-(0|this.words[o])+s)>>26,this.words[o]=67108863&i;return this.negative=1,this.q()},o.prototype.$=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!=(n=26-this.K(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,c=r.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=r.clone()._(i,1,c);0===l.negative&&(r=l,s&&(s.words[c]=1));for(var f=c-1;f>=0;f--){var d=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),r._(i,d,f);0!==r.negative;)d--,r.negative=0,r._(i,1,f),r.isZero()||(r.negative^=1);s&&(s.words[f]=d)}return s&&s.q(),r.q(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this.$(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),i=n.cmp(r);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,o=0,i=this.length-1;i>=0;i--)o=(r*o+(0|this.words[i]))%e;return t?-o:o},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,o=this.length-1;o>=0;o--){var i=(0|this.words[o])+67108864*r;this.words[o]=i/e|0,r=i%e}return this.q(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0===(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(f)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(u)}},o.prototype.ee=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;0===(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var f=0,d=1;0===(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var i=t;t=n,n=i}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,o=1<<t;if(this.length<=r)return this.j(r+1),this.words[r]|=o,this;for(var i=o,a=r;0!==i&&a<this.length;a++){var s=0|this.words[a];i=(s+=i)>>>26,s&=67108863,this.words[a]=s}return 0!==i&&(this.words[a]=i,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.q(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],o=0|e.words[n];if(r!==o){r<o?t=-1:r>o&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this).te(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype.te=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this.te(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red.ne(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red.ne(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red.re(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red.re(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red.re(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red.re(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red.re(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red.re(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this.oe()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o.ie(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r.ee(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype.oe=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n.q(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},r(v,b),v.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),o=0;o<r;o++)t.words[o]=e.words[o];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=i&n,o=10;o<e.length;o++){var a=0|e.words[o];e.words[o-10]=(a&n)<<4|i>>>22,i=a}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(A,b),r(k,b),r(T,b),T.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,o=67108863&r;r>>>=26,e.words[n]=o,t=r}return 0!==t&&(e.words[e.length++]=t),e},o.ie=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new A;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return y[e]=t,t},E.prototype.re=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype.ne=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e).te(this):(u(e,e.umod(this.m).te(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e).te(this)},E.prototype.add=function(e,t){this.ne(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n.te(this)},E.prototype.iadd=function(e,t){this.ne(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this.ne(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n.te(this)},E.prototype.isub=function(e,t){this.ne(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this.re(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this.ne(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this.ne(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,w=0;0!==m.cmp(s);w++)m=m.redSqr();n(w<p);var g=this.pow(f,new o(1).iushln(p-w-1));d=d.redMul(g),f=g.redSqr(),h=h.redMul(f),p=w}return d},E.prototype.invm=function(e){var t=e.ee(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],a=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var f=u>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},r(x,E),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i.te(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0).te(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a.te(this)},x.prototype.invm=function(e){return this.imod(e.ee(this.m).mul(this.r2)).te(this)}}(0,di)),ui.exports}const pi=/* @__PURE__ */Do(hi());var mi,wi,gi,yi,bi,vi={exports:{}};function Ai(){if(bi)return yi;bi=1;var e=function(){if(gi)return wi;gi=1;var e=(mi||(mi=1,function(e,t){var n=zo(),r=n.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=i),i.prototype=Object.create(r.prototype),o(r,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var o=r(e);return void 0!==t?"string"==typeof n?o.fill(t,n):o.fill(t):o.fill(0),o},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(vi,vi.exports)),vi.exports).Buffer;return wi=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var o=0;o<t.length;o++){var i=t.charAt(o),a=i.charCodeAt(0);if(255!==n[a])throw new TypeError(i+" is ambiguous");n[a]=o}var s=t.length,c=t.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function f(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return e.alloc(0);for(var r=0,o=0,i=0;t[r]===c;)o++,r++;for(var a=(t.length-r)*u+1>>>0,l=new Uint8Array(a);r<t.length;){var f=t.charCodeAt(r);if(f>255)return;var d=n[f];if(255===d)return;for(var h=0,p=a-1;(0!==d||h<i)&&-1!==p;p--,h++)d+=s*l[p]>>>0,l[p]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");i=h,r++}for(var m=a-i;m!==a&&0===l[m];)m++;var w=e.allocUnsafe(o+(a-m));w.fill(0,0,o);for(var g=o;m!==a;)w[g++]=l[m++];return w}return{encode:function(n){if((Array.isArray(n)||n instanceof Uint8Array)&&(n=e.from(n)),!e.isBuffer(n))throw new TypeError("Expected Buffer");if(0===n.length)return"";for(var r=0,o=0,i=0,a=n.length;i!==a&&0===n[i];)i++,r++;for(var u=(a-i)*l+1>>>0,f=new Uint8Array(u);i!==a;){for(var d=n[i],h=0,p=u-1;(0!==d||h<o)&&-1!==p;p--,h++)d+=256*f[p]>>>0,f[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");o=h,i++}for(var m=u-o;m!==u&&0===f[m];)m++;for(var w=c.repeat(r);m<u;++m)w+=t.charAt(f[m]);return w},decodeUnsafe:f,decode:function(e){var t=f(e);if(t)return t;throw new Error("Non-base"+s+" character")}}},wi}();return yi=e("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")}const ki=/* @__PURE__ */Do(Ai());var Ti={};function Ei(e,t,n){return t<=e&&e<=n}function xi(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function Ci(e){this.tokens=[].slice.call(e)}Ci.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var Ii=-1;function Si(e,t){if(e)throw TypeError("Decoder error");return t||65533}var Ni="utf-8";function Bi(e,t){if(!(this instanceof Bi))return new Bi(e,t);if((e=void 0!==e?String(e).toLowerCase():Ni)!==Ni)throw new Error("Encoding not supported. Only utf-8 is supported");t=xi(t),this.ae=!1,this.se=!1,this.ce=null,this.ue=Boolean(t.fatal),this.le=Boolean(t.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this.ue}),Object.defineProperty(this,"ignoreBOM",{value:this.le})}function Mi(e,t){if(!(this instanceof Mi))return new Mi(e,t);if((e=void 0!==e?String(e).toLowerCase():Ni)!==Ni)throw new Error("Encoding not supported. Only utf-8 is supported");t=xi(t),this.ae=!1,this.fe=null,this.de={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function Pi(e){var t=e.fatal,n=0,r=0,o=0,i=128,a=191;this.handler=function(e,s){if(-1===s&&0!==o)return o=0,Si(t);if(-1===s)return Ii;if(0===o){if(Ei(s,0,127))return s;if(Ei(s,194,223))o=1,n=s-192;else if(Ei(s,224,239))224===s&&(i=160),237===s&&(a=159),o=2,n=s-224;else{if(!Ei(s,240,244))return Si(t);240===s&&(i=144),244===s&&(a=143),o=3,n=s-240}return n<<=6*o,null}if(!Ei(s,i,a))return n=o=r=0,i=128,a=191,e.prepend(s),Si(t);if(i=128,a=191,n+=s-128<<6*(o-(r+=1)),r!==o)return null;var c=n;return n=o=r=0,c}}function Oi(e){e.fatal,this.handler=function(e,t){if(-1===t)return Ii;if(Ei(t,0,127))return t;var n,r;Ei(t,128,2047)?(n=1,r=192):Ei(t,2048,65535)?(n=2,r=224):Ei(t,65536,1114111)&&(n=3,r=240);for(var o=[(t>>6*n)+r];n>0;){var i=t>>6*(n-1);o.push(128|63&i),n-=1}return o}}Bi.prototype={decode:function(e,t){var n;n="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=xi(t),this.ae||(this.ce=new Pi({fatal:this.ue}),this.se=!1),this.ae=Boolean(t.stream);for(var r,o=new Ci(n),i=[];!o.endOfStream()&&(r=this.ce.handler(o,o.read()))!==Ii;)null!==r&&(Array.isArray(r)?i.push.apply(i,r):i.push(r));if(!this.ae){do{if((r=this.ce.handler(o,o.read()))===Ii)break;null!==r&&(Array.isArray(r)?i.push.apply(i,r):i.push(r))}while(!o.endOfStream());this.ce=null}return i.length&&(-1===["utf-8"].indexOf(this.encoding)||this.le||this.se||(65279===i[0]?(this.se=!0,i.shift()):this.se=!0)),function(e){for(var t="",n=0;n<e.length;++n){var r=e[n];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode(55296+(r>>10),56320+(1023&r)))}return t}(i)}},Mi.prototype={encode:function(e,t){e=e?String(e):"",t=xi(t),this.ae||(this.fe=new Oi(this.de)),this.ae=Boolean(t.stream);for(var n,r=[],o=new Ci(function(e){for(var t=String(e),n=t.length,r=0,o=[];r<n;){var i=t.charCodeAt(r);if(i<55296||i>57343)o.push(i);else if(56320<=i&&i<=57343)o.push(65533);else if(55296<=i&&i<=56319)if(r===n-1)o.push(65533);else{var a=e.charCodeAt(r+1);if(56320<=a&&a<=57343){var s=1023&i,c=1023&a;o.push(65536+(s<<10)+c),r+=1}else o.push(65533)}r+=1}return o}(e));!o.endOfStream()&&(n=this.fe.handler(o,o.read()))!==Ii;)Array.isArray(n)?r.push.apply(r,n):r.push(n);if(!this.ae){for(;(n=this.fe.handler(o,o.read()))!==Ii;)Array.isArray(n)?r.push.apply(r,n):r.push(n);this.fe=null}return new Uint8Array(r)}};const Ri=/* @__PURE__ */Fo(/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,TextDecoder:Bi,TextEncoder:Mi},Symbol.toStringTag,{value:"Module"})));var Ui,Li,Di=function(){if(Ui)return Ti;Ui=1;var e=Ti&&Ti.he||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=Ti&&Ti.pe||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Ti&&Ti.me||function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=Ti&&Ti.we||function(n){if(n&&n.S)return n;var r={};if(null!=n)for(var o in n)"default"!==o&&Object.hasOwnProperty.call(n,o)&&e(r,n,o);return t(r,n),r},o=Ti&&Ti.ge||function(e){return e&&e.S?e:{default:e}};Object.defineProperty(Ti,"S",{value:!0}),Ti.deserializeUnchecked=Ti.deserialize=Ti.serialize=Ti.BinaryReader=Ti.BinaryWriter=Ti.BorshError=Ti.baseDecode=Ti.baseEncode=void 0;const i=o(hi()),a=o(Ai()),s=r(Ri),c=new("function"!=typeof TextDecoder?s.TextDecoder:TextDecoder)("utf-8",{fatal:!0});Ti.baseEncode=function(e){return"string"==typeof e&&(e=Buffer.from(e,"utf8")),a.default.encode(Buffer.from(e))},Ti.baseDecode=function(e){return Buffer.from(a.default.decode(e))};const u=1024;class l extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}Ti.BorshError=l;class f{constructor(){this.buf=Buffer.alloc(u),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(u)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(Buffer.from(new i.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Buffer.from(new i.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Buffer.from(new i.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Buffer.from(new i.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),e,Buffer.alloc(u)]),this.length+=e.length}writeString(e){this.maybeResize();const t=Buffer.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(Buffer.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(const n of e)this.maybeResize(),t(n)}toArray(){return this.buf.subarray(0,this.length)}}function d(e,t,n){const r=n.value;n.value=function(...e){try{return r.apply(this,e)}catch(t){if(t instanceof RangeError){const e=t.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e)>=0)throw new l("Reached the end of buffer when deserializing")}throw t}}}Ti.BinaryWriter=f;class h{constructor(e){this.buf=e,this.offset=0}readU8(){const e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){const e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){const e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){const e=this.readBuffer(8);return new i.default(e,"le")}readU128(){const e=this.readBuffer(16);return new i.default(e,"le")}readU256(){const e=this.readBuffer(32);return new i.default(e,"le")}readU512(){const e=this.readBuffer(64);return new i.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new l(`Expected buffer length ${e} isn't within bounds`);const t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){const e=this.readU32(),t=this.readBuffer(e);try{return c.decode(t)}catch(n){throw new l(`Error decoding UTF-8 string: ${n}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const t=this.readU32(),n=Array();for(let r=0;r<t;++r)n.push(e());return n}}function p(e){return e.charAt(0).toUpperCase()+e.slice(1)}function m(e,t,n,r,o){try{if("string"==typeof r)o[`write${p(r)}`](n);else if(r instanceof Array)if("number"==typeof r[0]){if(n.length!==r[0])throw new l(`Expecting byte array of length ${r[0]}, but got ${n.length} bytes`);o.writeFixedArray(n)}else if(2===r.length&&"number"==typeof r[1]){if(n.length!==r[1])throw new l(`Expecting byte array of length ${r[1]}, but got ${n.length} bytes`);for(let t=0;t<r[1];t++)m(e,null,n[t],r[0],o)}else o.writeArray(n,n=>{m(e,t,n,r[0],o)});else if(void 0!==r.kind)switch(r.kind){case"option":null==n?o.writeU8(0):(o.writeU8(1),m(e,t,n,r.type,o));break;case"map":o.writeU32(n.size),n.forEach((n,i)=>{m(e,t,i,r.key,o),m(e,t,n,r.value,o)});break;default:throw new l(`FieldType ${r} unrecognized`)}else w(e,n,o)}catch(i){throw i instanceof l&&i.addToFieldPath(t),i}}function w(e,t,n){if("function"==typeof t.borshSerialize)return void t.borshSerialize(n);const r=e.get(t.constructor);if(!r)throw new l(`Class ${t.constructor.name} is missing in schema`);if("struct"===r.kind)r.fields.map(([r,o])=>{m(e,r,t[r],o,n)});else{if("enum"!==r.kind)throw new l(`Unexpected schema kind: ${r.kind} for ${t.constructor.name}`);{const o=t[r.field];for(let i=0;i<r.values.length;++i){const[a,s]=r.values[i];if(a===o){n.writeU8(i),m(e,a,t[a],s,n);break}}}}}function g(e,t,n,r){try{if("string"==typeof n)return r[`read${p(n)}`]();if(n instanceof Array){if("number"==typeof n[0])return r.readFixedArray(n[0]);if("number"==typeof n[1]){const t=[];for(let o=0;o<n[1];o++)t.push(g(e,null,n[0],r));return t}return r.readArray(()=>g(e,t,n[0],r))}if("option"===n.kind)return r.readU8()?g(e,t,n.type,r):void 0;if("map"===n.kind){let o=/* @__PURE__ */new Map;const i=r.readU32();for(let a=0;a<i;a++){const i=g(e,t,n.key,r),a=g(e,t,n.value,r);o.set(i,a)}return o}return y(e,n,r)}catch(o){throw o instanceof l&&o.addToFieldPath(t),o}}function y(e,t,n){if("function"==typeof t.borshDeserialize)return t.borshDeserialize(n);const r=e.get(t);if(!r)throw new l(`Class ${t.name} is missing in schema`);if("struct"===r.kind){const r={};for(const[o,i]of e.get(t).fields)r[o]=g(e,o,i,n);return new t(r)}if("enum"===r.kind){const o=n.readU8();if(o>=r.values.length)throw new l(`Enum index: ${o} is out of range`);const[i,a]=r.values[o],s=g(e,i,a,n);return new t({[i]:s})}throw new l(`Unexpected schema kind: ${r.kind} for ${t.constructor.name}`)}return n([d],h.prototype,"readU8",null),n([d],h.prototype,"readU16",null),n([d],h.prototype,"readU32",null),n([d],h.prototype,"readU64",null),n([d],h.prototype,"readU128",null),n([d],h.prototype,"readU256",null),n([d],h.prototype,"readU512",null),n([d],h.prototype,"readString",null),n([d],h.prototype,"readFixedArray",null),n([d],h.prototype,"readArray",null),Ti.BinaryReader=h,Ti.serialize=function(e,t,n=f){const r=new n;return w(e,t,r),r.toArray()},Ti.deserialize=function(e,t,n,r=h){const o=new r(n),i=y(e,t,o);if(o.offset<n.length)throw new l(`Unexpected ${n.length-o.offset} bytes after deserialized data`);return i},Ti.deserializeUnchecked=function(e,t,n,r=h){return y(e,t,new r(n))},Ti}(),Fi={},qi=function(){if(Li)return Fi;Li=1,Object.defineProperty(Fi,"S",{value:!0}),Fi.s16=Fi.s8=Fi.nu64be=Fi.u48be=Fi.u40be=Fi.u32be=Fi.u24be=Fi.u16be=Fi.nu64=Fi.u48=Fi.u40=Fi.u32=Fi.u24=Fi.u16=Fi.u8=Fi.offset=Fi.greedy=Fi.Constant=Fi.UTF8=Fi.CString=Fi.Blob=Fi.Boolean=Fi.BitField=Fi.BitStructure=Fi.VariantLayout=Fi.Union=Fi.UnionLayoutDiscriminator=Fi.UnionDiscriminator=Fi.Structure=Fi.Sequence=Fi.DoubleBE=Fi.Double=Fi.FloatBE=Fi.Float=Fi.NearInt64BE=Fi.NearInt64=Fi.NearUInt64BE=Fi.NearUInt64=Fi.IntBE=Fi.Int=Fi.UIntBE=Fi.UInt=Fi.OffsetLayout=Fi.GreedyCount=Fi.ExternalLayout=Fi.bindConstructorLayout=Fi.nameWithProperty=Fi.Layout=Fi.uint8ArrayToBuffer=Fi.checkUint8Array=void 0,Fi.constant=Fi.utf8=Fi.cstr=Fi.blob=Fi.unionLayoutDiscriminator=Fi.union=Fi.seq=Fi.bits=Fi.struct=Fi.f64be=Fi.f64=Fi.f32be=Fi.f32=Fi.ns64be=Fi.s48be=Fi.s40be=Fi.s32be=Fi.s24be=Fi.s16be=Fi.ns64=Fi.s48=Fi.s40=Fi.s32=Fi.s24=void 0;const e=zo();function t(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}function n(n){return t(n),e.Buffer.from(n.buffer,n.byteOffset,n.length)}Fi.checkUint8Array=t,Fi.uint8ArrayToBuffer=n;let r=class{constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}};function o(e,t){return t.property?e+"["+t.property+"]":e}Fi.Layout=r,Fi.nameWithProperty=o,Fi.bindConstructorLayout=function(e,t){if("function"!=typeof e)throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof r))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=()=>new e,Object.defineProperty(e.prototype,"encode",{value(e,n){return t.encode(this,e,n)},writable:!0}),Object.defineProperty(e,"decode",{value:(e,n)=>t.decode(e,n),writable:!0})};class i extends r{isCount(){throw new Error("ExternalLayout is abstract")}}Fi.ExternalLayout=i;class a extends i{constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,n=0){t(e);const r=e.length-n;return Math.floor(r/this.elementSpan)}encode(e,t,n){return 0}}Fi.GreedyCount=a;class s extends i{constructor(e,t=0,n){if(!(e instanceof r))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,n||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof c||this.layout instanceof u}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,n=0){return this.layout.encode(e,t,n+this.offset)}}Fi.OffsetLayout=s;class c extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readUIntLE(t,this.span)}encode(e,t,r=0){return n(t).writeUIntLE(e,r,this.span),this.span}}Fi.UInt=c;class u extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readUIntBE(t,this.span)}encode(e,t,r=0){return n(t).writeUIntBE(e,r,this.span),this.span}}Fi.UIntBE=u;class l extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readIntLE(t,this.span)}encode(e,t,r=0){return n(t).writeIntLE(e,r,this.span),this.span}}Fi.Int=l;class f extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readIntBE(t,this.span)}encode(e,t,r=0){return n(t).writeIntBE(e,r,this.span),this.span}}Fi.IntBE=f;const d=Math.pow(2,32);function h(e){const t=Math.floor(e/d);return{hi32:t,lo32:e-t*d}}function p(e,t){return e*d+t}class m extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e),o=r.readUInt32LE(t);return p(r.readUInt32LE(t+4),o)}encode(e,t,r=0){const o=h(e),i=n(t);return i.writeUInt32LE(o.lo32,r),i.writeUInt32LE(o.hi32,r+4),8}}Fi.NearUInt64=m;class w extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e);return p(r.readUInt32BE(t),r.readUInt32BE(t+4))}encode(e,t,r=0){const o=h(e),i=n(t);return i.writeUInt32BE(o.hi32,r),i.writeUInt32BE(o.lo32,r+4),8}}Fi.NearUInt64BE=w;class g extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e),o=r.readUInt32LE(t);return p(r.readInt32LE(t+4),o)}encode(e,t,r=0){const o=h(e),i=n(t);return i.writeUInt32LE(o.lo32,r),i.writeInt32LE(o.hi32,r+4),8}}Fi.NearInt64=g;class y extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e);return p(r.readInt32BE(t),r.readUInt32BE(t+4))}encode(e,t,r=0){const o=h(e),i=n(t);return i.writeInt32BE(o.hi32,r),i.writeUInt32BE(o.lo32,r+4),8}}Fi.NearInt64BE=y;class b extends r{constructor(e){super(4,e)}decode(e,t=0){return n(e).readFloatLE(t)}encode(e,t,r=0){return n(t).writeFloatLE(e,r),4}}Fi.Float=b;class v extends r{constructor(e){super(4,e)}decode(e,t=0){return n(e).readFloatBE(t)}encode(e,t,r=0){return n(t).writeFloatBE(e,r),4}}Fi.FloatBE=v;class A extends r{constructor(e){super(8,e)}decode(e,t=0){return n(e).readDoubleLE(t)}encode(e,t,r=0){return n(t).writeDoubleLE(e,r),8}}Fi.Double=A;class k extends r{constructor(e){super(8,e)}decode(e,t=0){return n(e).readDoubleBE(t)}encode(e,t,r=0){return n(t).writeDoubleBE(e,r),8}}Fi.DoubleBE=k;class T extends r{constructor(e,t,n){if(!(e instanceof r))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof i&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let o=-1;!(t instanceof i)&&0<e.span&&(o=t*e.span),super(o,n),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0,r=this.count;if(r instanceof i&&(r=r.decode(e,t)),0<this.elementLayout.span)n=r*this.elementLayout.span;else{let o=0;for(;o<r;)n+=this.elementLayout.getSpan(e,t+n),++o}return n}decode(e,t=0){const n=[];let r=0,o=this.count;for(o instanceof i&&(o=o.decode(e,t));r<o;)n.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),r+=1;return n}encode(e,t,n=0){const r=this.elementLayout,o=e.reduce((e,o)=>e+r.encode(o,t,n+e),0);return this.count instanceof i&&this.count.encode(e.length,t,n),o}}Fi.Sequence=T;class E extends r{constructor(e,t,n){if(!Array.isArray(e)||!e.reduce((e,t)=>e&&t instanceof r,!0))throw new TypeError("fields must be array of Layout instances");"boolean"==typeof t&&void 0===n&&(n=t,t=void 0);for(const r of e)if(0>r.span&&void 0===r.property)throw new Error("fields cannot contain unnamed variable-length layout");let o=-1;try{o=e.reduce((e,t)=>e+t.getSpan(),0)}catch(i){}super(o,t),this.fields=e,this.decodePrefixes=!!n}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;try{n=this.fields.reduce((n,r)=>{const o=r.getSpan(e,t);return t+=o,n+o},0)}catch(r){throw new RangeError("indeterminate span")}return n}decode(e,n=0){t(e);const r=this.makeDestinationObject();for(const t of this.fields)if(void 0!==t.property&&(r[t.property]=t.decode(e,n)),n+=t.getSpan(e,n),this.decodePrefixes&&e.length===n)break;return r}encode(e,t,n=0){const r=n;let o=0,i=0;for(const a of this.fields){let r=a.span;if(i=0<r?r:0,void 0!==a.property){const o=e[a.property];void 0!==o&&(i=a.encode(o,t,n),0>r&&(r=a.getSpan(t,n)))}o=n,n+=r}return o+i-r}fromArray(e){const t=this.makeDestinationObject();for(const n of this.fields)void 0!==n.property&&0<e.length&&(t[n.property]=e.shift());return t}layoutFor(e){if("string"!=typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!=typeof e)throw new TypeError("property must be string");let t=0;for(const n of this.fields){if(n.property===e)return t;0>n.span?t=-1:0<=t&&(t+=n.span)}}}Fi.Structure=E;class x{constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,n){throw new Error("UnionDiscriminator is abstract")}}Fi.UnionDiscriminator=x;class C extends x{constructor(e,t){if(!(e instanceof i&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,n){return this.layout.encode(e,t,n)}}Fi.UnionLayoutDiscriminator=C;class I extends r{constructor(e,t,n){let o;if(e instanceof c||e instanceof u)o=new C(new s(e));else if(e instanceof i&&e.isCount())o=new C(e);else{if(!(e instanceof x))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");o=e}if(void 0===t&&(t=null),!(null===t||t instanceof r))throw new TypeError("defaultLayout must be null or a Layout");if(null!==t){if(0>t.span)throw new Error("defaultLayout must have constant span");void 0===t.property&&(t=t.replicate("content"))}let a=-1;t&&(a=t.span,0<=a&&(e instanceof c||e instanceof u)&&(a+=o.layout.span)),super(a,n),this.discriminator=o,this.usesPrefixDiscriminator=e instanceof c||e instanceof u,this.defaultLayout=t,this.registry={};let l=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return l(e)},this.configGetSourceVariant=function(e){l=e.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;const n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;const t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(const t in this.registry){const n=this.registry[t];if(n.property&&Object.prototype.hasOwnProperty.call(e,n.property))return n}throw new Error("unable to infer src variant")}decode(e,t=0){let n;const r=this.discriminator,o=r.decode(e,t),i=this.registry[o];if(void 0===i){const i=this.defaultLayout;let a=0;this.usesPrefixDiscriminator&&(a=r.layout.span),n=this.makeDestinationObject(),n[r.property]=o,n[i.property]=i.decode(e,t+a)}else n=i.decode(e,t);return n}encode(e,t,n=0){const r=this.getSourceVariant(e);if(void 0===r){const r=this.discriminator,o=this.defaultLayout;let i=0;return this.usesPrefixDiscriminator&&(i=r.layout.span),r.encode(e[r.property],t,n),i+o.encode(e[o.property],t,n+i)}return r.encode(e,t,n)}addVariant(e,t,n){const r=new S(this,e,t,n);return this.registry[e]=r,r}getVariant(e,t=0){let n;return n=e instanceof Uint8Array?this.discriminator.decode(e,t):e,this.registry[n]}}Fi.Union=I;class S extends r{constructor(e,t,n,o){if(!(e instanceof I))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if("string"==typeof n&&void 0===o&&(o=n,n=null),n){if(!(n instanceof r))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=n.span&&n.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!=typeof o)throw new TypeError("variant must have a String property")}let i=e.span;0>e.span&&(i=n?n.span:0,0<=i&&e.usesPrefixDiscriminator&&(i+=e.discriminator.layout.span)),super(i,o),this.union=e,this.variant=t,this.layout=n||null}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span);let r=0;return this.layout&&(r=this.layout.getSpan(e,t+n)),n+r}decode(e,t=0){const n=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+r):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(e,t,n=0){let r=0;if(this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);let o=r;if(this.layout&&(this.layout.encode(e[this.property],t,n+r),o+=this.layout.getSpan(t,n+r),0<=this.union.span&&o>this.union.span))throw new Error("encoded variant overruns containing union");return o}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}function N(e){return 0>e&&(e+=4294967296),e}Fi.VariantLayout=S;class B extends r{constructor(e,t,n){if(!(e instanceof c||e instanceof u))throw new TypeError("word must be a UInt or UIntBE layout");if("string"==typeof t&&void 0===n&&(n=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,n),this.word=e,this.msb=!!t,this.fields=[];let r=0;this.ye=function(e){return r=N(e),this},this.be=function(){return r}}decode(e,t=0){const n=this.makeDestinationObject(),r=this.word.decode(e,t);this.ye(r);for(const o of this.fields)void 0!==o.property&&(n[o.property]=o.decode(e));return n}encode(e,t,n=0){const r=this.word.decode(t,n);this.ye(r);for(const o of this.fields)if(void 0!==o.property){const t=e[o.property];void 0!==t&&o.encode(t)}return this.word.encode(this.be(),t,n)}addField(e,t){const n=new M(this,e,t);return this.fields.push(n),n}addBoolean(e){const t=new P(this,e);return this.fields.push(t),t}fieldFor(e){if("string"!=typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}}Fi.BitStructure=B;class M{constructor(e,t,n){if(!(e instanceof B))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");const r=8*e.span,o=e.fields.reduce((e,t)=>e+t.bits,0);if(t+o>r)throw new Error("bits too long for span remainder ("+(r-o)+" of "+r+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=4294967295),this.start=o,this.container.msb&&(this.start=r-o-t),this.wordMask=N(this.valueMask<<this.start),this.property=n}decode(e,t){return N(this.container.be()&this.wordMask)>>>this.start}encode(e){if("number"!=typeof e||!Number.isInteger(e)||e!==N(e&this.valueMask))throw new TypeError(o("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const t=this.container.be(),n=N(e<<this.start);this.container.ye(N(t&~this.wordMask)|n)}}Fi.BitField=M;class P extends M{constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){"boolean"==typeof e&&(e=+e),super.encode(e)}}Fi.Boolean=P;class O extends r{constructor(e,t){if(!(e instanceof i&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let n=-1;e instanceof i||(n=e),super(n,t),this.length=e}getSpan(e,t){let n=this.span;return 0>n&&(n=this.length.decode(e,t)),n}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),n(e).slice(t,t+r)}encode(e,t,r){let a=this.length;if(this.length instanceof i&&(a=e.length),!(e instanceof Uint8Array&&a===e.length))throw new TypeError(o("Blob.encode",this)+" requires (length "+a+") Uint8Array as src");if(r+a>t.length)throw new RangeError("encoding overruns Uint8Array");const s=n(e);return n(t).write(s.toString("hex"),r,a,"hex"),this.length instanceof i&&this.length.encode(a,t,r),a}}Fi.Blob=O;class R extends r{constructor(e){super(-1,e)}getSpan(e,n=0){t(e);let r=n;for(;r<e.length&&0!==e[r];)r+=1;return 1+r-n}decode(e,t=0){const r=this.getSpan(e,t);return n(e).slice(t,t+r-1).toString("utf-8")}encode(t,r,o=0){"string"!=typeof t&&(t=String(t));const i=e.Buffer.from(t,"utf8"),a=i.length;if(o+a>r.length)throw new RangeError("encoding overruns Buffer");const s=n(r);return i.copy(s,o),s[o+a]=0,a+1}}Fi.CString=R;class U extends r{constructor(e,t){if("string"==typeof e&&void 0===t&&(t=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,n=0){return t(e),e.length-n}decode(e,t=0){const r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return n(e).slice(t,t+r).toString("utf-8")}encode(t,r,o=0){"string"!=typeof t&&(t=String(t));const i=e.Buffer.from(t,"utf8"),a=i.length;if(0<=this.maxSpan&&this.maxSpan<a)throw new RangeError("text length exceeds maxSpan");if(o+a>r.length)throw new RangeError("encoding overruns Buffer");return i.copy(n(r),o),a}}Fi.UTF8=U;class L extends r{constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,n){return 0}}return Fi.Constant=L,Fi.greedy=(e,t)=>new a(e,t),Fi.offset=(e,t,n)=>new s(e,t,n),Fi.u8=e=>new c(1,e),Fi.u16=e=>new c(2,e),Fi.u24=e=>new c(3,e),Fi.u32=e=>new c(4,e),Fi.u40=e=>new c(5,e),Fi.u48=e=>new c(6,e),Fi.nu64=e=>new m(e),Fi.u16be=e=>new u(2,e),Fi.u24be=e=>new u(3,e),Fi.u32be=e=>new u(4,e),Fi.u40be=e=>new u(5,e),Fi.u48be=e=>new u(6,e),Fi.nu64be=e=>new w(e),Fi.s8=e=>new l(1,e),Fi.s16=e=>new l(2,e),Fi.s24=e=>new l(3,e),Fi.s32=e=>new l(4,e),Fi.s40=e=>new l(5,e),Fi.s48=e=>new l(6,e),Fi.ns64=e=>new g(e),Fi.s16be=e=>new f(2,e),Fi.s24be=e=>new f(3,e),Fi.s32be=e=>new f(4,e),Fi.s40be=e=>new f(5,e),Fi.s48be=e=>new f(6,e),Fi.ns64be=e=>new y(e),Fi.f32=e=>new b(e),Fi.f32be=e=>new v(e),Fi.f64=e=>new A(e),Fi.f64be=e=>new k(e),Fi.struct=(e,t,n)=>new E(e,t,n),Fi.bits=(e,t,n)=>new B(e,t,n),Fi.seq=(e,t,n)=>new T(e,t,n),Fi.union=(e,t,n)=>new I(e,t,n),Fi.unionLayoutDiscriminator=(e,t)=>new C(e,t),Fi.blob=(e,t)=>new O(e,t),Fi.cstr=e=>new R(e),Fi.utf8=(e,t)=>new U(e,t),Fi.constant=(e,t)=>new L(e,t),Fi}(),Hi=1,Vi=2,Wi=3,ji=4,Yi=5,zi=6,Gi=7,Ji=8,Xi=9,Ki=10,Qi=-32700,Zi=-32603,_i=-32602,$i=-32601,ea=-32600,ta=-32016,na=-32015,ra=-32014,oa=-32013,ia=-32012,aa=-32011,sa=-32010,ca=-32009,ua=-32008,la=-32007,fa=-32006,da=-32005,ha=-32004,pa=-32003,ma=-32002,wa=-32001,ga=28e5,ya=2800001,ba=2800002,va=2800003,Aa=2800004,ka=2800005,Ta=2800006,Ea=2800007,xa=2800008,Ca=2800009,Ia=2800010,Sa=2800011,Na=323e4,Ba=32300001,Ma=3230002,Pa=3230003,Oa=3230004,Ra=361e4,Ua=3610001,La=3610002,Da=3610003,Fa=3610004,qa=3610005,Ha=3610006,Va=3610007,Wa=3611e3,ja=3704e3,Ya=3704001,za=3704002,Ga=3704003,Ja=3704004,Xa=4128e3,Ka=4128001,Qa=4128002,Za=4615e3,_a=4615001,$a=4615002,es=4615003,ts=4615004,ns=4615005,rs=4615006,os=4615007,is=4615008,as=4615009,ss=4615010,cs=4615011,us=4615012,ls=4615013,fs=4615014,ds=4615015,hs=4615016,ps=4615017,ms=4615018,ws=4615019,gs=4615020,ys=4615021,bs=4615022,vs=4615023,As=4615024,ks=4615025,Ts=4615026,Es=4615027,xs=4615028,Cs=4615029,Is=4615030,Ss=4615031,Ns=4615032,Bs=4615033,Ms=4615034,Ps=4615035,Os=4615036,Rs=4615037,Us=4615038,Ls=4615039,Ds=4615040,Fs=4615041,qs=4615042,Hs=4615043,Vs=4615044,Ws=4615045,js=4615046,Ys=4615047,zs=4615048,Gs=4615049,Js=4615050,Xs=4615051,Ks=4615052,Qs=4615053,Zs=4615054,_s=5508e3,$s=5508001,ec=5508002,tc=5508003,nc=5508004,rc=5508005,oc=5508006,ic=5508007,ac=5508008,sc=5508009,cc=5508010,uc=5508011,lc=5663e3,fc=5663001,dc=5663002,hc=5663003,pc=5663004,mc=5663005,wc=5663006,gc=5663007,yc=5663008,bc=5663009,vc=5663010,Ac=5663011,kc=5663012,Tc=5663013,Ec=5663014,xc=5663015,Cc=5663016,Ic=5663017,Sc=5663018,Nc=5663019,Bc=5663020,Mc=705e4,Pc=7050001,Oc=7050002,Rc=7050003,Uc=7050004,Lc=7050005,Dc=7050006,Fc=7050007,qc=7050008,Hc=7050009,Vc=7050010,Wc=7050011,jc=7050012,Yc=7050013,zc=7050014,Gc=7050015,Jc=7050016,Xc=7050017,Kc=7050018,Qc=7050019,Zc=7050020,_c=7050021,$c=7050022,eu=7050023,tu=7050024,nu=7050025,ru=7050026,ou=7050027,iu=7050028,au=7050029,su=7050030,cu=7050031,uu=7050032,lu=7050033,fu=7050034,du=7050035,hu=7050036,pu=8078e3,mu=8078001,wu=8078002,gu=8078003,yu=8078004,bu=8078005,vu=8078006,Au=8078007,ku=8078008,Tu=8078009,Eu=8078010,xu=8078011,Cu=8078012,Iu=8078013,Su=8078014,Nu=8078015,Bu=8078016,Mu=8078017,Pu=8078018,Ou=8078019,Ru=8078020,Uu=8078021,Lu=8078022,Du=81e5,Fu=8100001,qu=8100002,Hu=8100003,Vu=819e4,Wu=8190001,ju=8190002,Yu=8190003,zu=8190004,Gu=99e5,Ju=9900001,Xu=9900002,Ku=9900003,Qu=9900004;function Zu(e){return Array.isArray(e)?"%5B"+e.map(Zu).join("%2C%20")+"%5D":"bigint"==typeof e?`${e}n`:encodeURIComponent(String(null!=e&&null===Object.getPrototypeOf(e)?{...e}:e))}function _u([e,t]){return`${e}=${Zu(t)}`}var $u={[Na]:"Account not found at address: $address",[Oa]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[Pa]:"Expected decoded account at address: $address",[Ma]:"Failed to decode account data at address: $address",[Ba]:"Accounts not found at addresses: $addresses",[Ca]:"Unable to find a viable program address bump seed.",[ba]:"$putativeAddress is not a base58-encoded address.",[ga]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[va]:"The `CryptoKey` must be an `Ed25519` public key.",[Sa]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[xa]:"Invalid seeds; point must fall off the Ed25519 curve.",[Aa]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[Ta]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[Ea]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[ka]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[Ia]:"Program address cannot end with PDA marker.",[ya]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[ji]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[Hi]:"The network has progressed past the last block for which this transaction could have been committed.",[pu]:"Codec [$codecDescription] cannot decode empty byte arrays.",[Lu]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[Ru]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[bu]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[vu]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[yu]:"Encoder and decoder must either both be fixed-size or variable-size.",[ku]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[wu]:"Expected a fixed-size codec, got a variable-size one.",[Iu]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[gu]:"Expected a variable-size codec, got a fixed-size one.",[Ou]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[mu]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[Pu]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[Tu]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[Eu]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[Nu]:"Invalid literal union variant. Expected one of [$variants], got $value.",[Au]:"Expected [$codecDescription] to have $expected items, got $actual.",[Cu]:"Invalid value $value for base $base with alphabet $alphabet.",[Bu]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[xu]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[Su]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[Uu]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[Mu]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[Wa]:"No random values implementation could be found.",[as]:"instruction requires an uninitialized account",[vs]:"instruction tries to borrow reference for an account which is already borrowed",[As]:"instruction left account with an outstanding borrowed reference",[ys]:"program other than the account's owner changed the size of the account data",[ns]:"account data too small for instruction",[bs]:"instruction expected an executable account",[js]:"An account does not have enough lamports to be rent-exempt",[zs]:"Program arithmetic overflowed",[Ws]:"Failed to serialize or deserialize account data: $encodedData",[Zs]:"Builtin programs must consume compute units",[Ns]:"Cross-program invocation call depth too deep",[Us]:"Computational budget exceeded",[Ts]:"custom program error: #$code",[ps]:"instruction contains duplicate accounts",[ks]:"instruction modifications of multiply-passed account differ",[Is]:"executable accounts must be rent exempt",[xs]:"instruction changed executable accounts data",[Cs]:"instruction changed the balance of an executable account",[ms]:"instruction changed executable bit of an account",[fs]:"instruction modified data of an account it does not own",[ls]:"instruction spent from the balance of an account it does not own",[_a]:"generic instruction error",[Js]:"Provided owner is not allowed",[Hs]:"Account is immutable",[Vs]:"Incorrect authority provided",[os]:"incorrect program id for instruction",[rs]:"insufficient funds for instruction",[ts]:"invalid account data for instruction",[Ys]:"Invalid account owner",[$a]:"invalid program argument",[Es]:"program returned invalid error code",[es]:"invalid instruction data",[Rs]:"Failed to reallocate account data",[Os]:"Provided seeds do not result in a valid address",[Xs]:"Accounts data allocations exceeded the maximum allowed per transaction",[Ks]:"Max accounts exceeded",[Qs]:"Max instruction trace length exceeded",[Ps]:"Length of the seed is too long for address generation",[Bs]:"An account required by the instruction is missing",[is]:"missing required signature for instruction",[us]:"instruction illegally modified the program id of an account",[gs]:"insufficient account keys for instruction",[Ls]:"Cross-program invocation with unauthorized signer or writable account",[Ds]:"Failed to create program execution environment",[qs]:"Program failed to compile",[Fs]:"Program failed to complete",[hs]:"instruction modified data of a read-only account",[ds]:"instruction changed the balance of a read-only account",[Ms]:"Cross-program invocation reentrancy not allowed for this instruction",[ws]:"instruction modified rent epoch of an account",[cs]:"sum of account balances before and after instruction do not match",[ss]:"instruction requires an initialized account",[Za]:"",[Ss]:"Unsupported program id",[Gs]:"Unsupported sysvar",[Xa]:"The instruction does not have any accounts.",[Ka]:"The instruction does not have any data.",[Qa]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[Yi]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[Vi]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[Xu]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Qu]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[Ju]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Gu]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Ku]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Zi]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[_i]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[ea]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[$i]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[Qi]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[ia]:"$__serverMessage",[wa]:"$__serverMessage",[ha]:"$__serverMessage",[ra]:"$__serverMessage",[sa]:"$__serverMessage",[ca]:"$__serverMessage",[ta]:"Minimum context slot has not been reached",[da]:"Node is unhealthy; behind by $numSlotsBehind slots",[ua]:"No snapshot",[ma]:"Transaction simulation failed",[la]:"$__serverMessage",[aa]:"Transaction history is not available from this node",[fa]:"$__serverMessage",[oa]:"Transaction signature length mismatch",[pa]:"Transaction signature verification failure",[na]:"$__serverMessage",[ja]:"Key pair bytes must be of length 64, got $byteLength.",[Ya]:"Expected private key bytes with length 32. Actual length: $actualLength.",[za]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[Ja]:"The provided private key does not match the provided public key.",[Ga]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[zi]:"Lamports value must be in the range [0, 2e64-1]",[Gi]:"`$value` cannot be parsed as a `BigInt`",[Ki]:"$message",[Ji]:"`$value` cannot be parsed as a `Number`",[Wi]:"No nonce account could be found at address `$nonceAccountAddress`",[Vu]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[ju]:"WebSocket was closed before payload could be added to the send buffer",[Yu]:"WebSocket connection closed",[zu]:"WebSocket failed to connect",[Wu]:"Failed to obtain a subscription id from the server",[Hu]:"Could not find an API plan for RPC method: `$method`",[Du]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[qu]:"HTTP error ($statusCode): $message",[Fu]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[_s]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[$s]:"The provided value does not implement the `KeyPairSigner` interface",[tc]:"The provided value does not implement the `MessageModifyingSigner` interface",[nc]:"The provided value does not implement the `MessagePartialSigner` interface",[ec]:"The provided value does not implement any of the `MessageSigner` interfaces",[oc]:"The provided value does not implement the `TransactionModifyingSigner` interface",[ic]:"The provided value does not implement the `TransactionPartialSigner` interface",[ac]:"The provided value does not implement the `TransactionSendingSigner` interface",[rc]:"The provided value does not implement any of the `TransactionSigner` interfaces",[sc]:"More than one `TransactionSendingSigner` was identified.",[cc]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[uc]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[Va]:"Cannot export a non-extractable key.",[Ua]:"No digest implementation could be found.",[Ra]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[La]:"This runtime does not support the generation of Ed25519 key pairs.\n\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\n\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.",[Da]:"No signature verification implementation could be found.",[Fa]:"No key generation implementation could be found.",[qa]:"No signing implementation could be found.",[Ha]:"No key export implementation could be found.",[Xi]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[Jc]:"Transaction processing left an account with an outstanding borrowed reference",[Pc]:"Account in use",[Oc]:"Account loaded twice",[Rc]:"Attempt to debit an account but found no record of a prior credit.",[eu]:"Transaction loads an address table account that doesn't exist",[Fc]:"This transaction has already been processed",[qc]:"Blockhash not found",[Hc]:"Loader call chain is too deep",[Gc]:"Transactions are currently disabled due to cluster maintenance",[su]:"Transaction contains a duplicate instruction ($index) that is not allowed",[Lc]:"Insufficient funds for fee",[cu]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[Dc]:"This account may not be used to pay transaction fees",[Wc]:"Transaction contains an invalid account reference",[nu]:"Transaction loads an address table account with invalid data",[ru]:"Transaction address table lookup uses an invalid index",[tu]:"Transaction loads an address table account with an invalid owner",[lu]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[Yc]:"This program may not be used for executing instructions",[ou]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[Qc]:"Transaction loads a writable account that cannot be written",[uu]:"Transaction exceeded max loaded accounts data size cap",[Vc]:"Transaction requires a fee but has no signature present",[Uc]:"Attempt to load a program that does not exist",[du]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[fu]:"ResanitizationNeeded",[zc]:"Transaction failed to sanitize accounts offsets correctly",[jc]:"Transaction did not pass signature verification",[$c]:"Transaction locked too many accounts",[hu]:"Sum of account balances before and after transaction do not match",[Mc]:"The transaction failed with the error `$errorName`",[Kc]:"Transaction version is unsupported",[_c]:"Transaction would exceed account data limit within the block",[au]:"Transaction would exceed total account data limit",[Zc]:"Transaction would exceed max account limit within the block",[Xc]:"Transaction would exceed max Block Cost Limit",[iu]:"Transaction would exceed max Vote Cost Limit",[xc]:"Attempted to sign a transaction with an address that is not a signer for it",[vc]:"Transaction is missing an address at index: $index.",[Cc]:"Transaction has no expected signers therefore it cannot be encoded",[Bc]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[dc]:"Transaction does not have a blockhash lifetime",[hc]:"Transaction is not a durable nonce transaction",[mc]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[wc]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[yc]:"No fee payer set in CompiledTransaction",[gc]:"Could not find program address at index $index",[Sc]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[Nc]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[Ac]:"Transaction is missing a fee payer.",[kc]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[Ec]:"Transaction first instruction is not advance nonce account instruction.",[Tc]:"Transaction with no instructions cannot be durable nonce transaction.",[lc]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[fc]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Ic]:"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.",[bc]:"Transaction is missing signatures for addresses: $addresses.",[pc]:"Transaction version must be in the range [0, 127]. `$actualVersion` given"},el="i",tl="t";var nl=class extends Error{cause=this.cause;context;constructor(...[e,t]){let n,r;if(t){const{cause:e,...o}=t;e&&(r={cause:e}),Object.keys(o).length>0&&(n=o)}super(function(e,t={}){if("production"!==process.env.NODE_ENV)return function(e,t={}){const n=$u[e];if(0===n.length)return"";let r;function o(e){if(2===r[tl]){const o=n.slice(r[el]+1,e);i.push(o in t?`${t[o]}`:`$${o}`)}else 1===r[tl]&&i.push(n.slice(r[el],e))}const i=[];return n.split("").forEach((e,t)=>{if(0===t)return void(r={[el]:0,[tl]:"\\"===n[0]?0:"$"===n[0]?2:1});let i;switch(r[tl]){case 0:i={[el]:t,[tl]:1};break;case 1:"\\"===e?i={[el]:t,[tl]:0}:"$"===e&&(i={[el]:t,[tl]:2});break;case 2:"\\"===e?i={[el]:t,[tl]:0}:"$"===e?i={[el]:t,[tl]:2}:e.match(/\w/)||(i={[el]:t,[tl]:1})}i&&(r!==i&&o(t),r=i)}),o(),i.join("")}(e,t);{let n=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(n+=` '${function(e){const t=Object.entries(e).map(_u).join("&");return btoa(t)}(t)}'`),`${n}\``}}(e,n),r),this.context={ve:e,...n},this.name="SolanaError"}};function rl(e){return"fixedSize"in e&&"number"==typeof e.fixedSize}function ol(e){return 1!==e?.endian}var il=(e={})=>function(e,t){if(rl(e)!==rl(t))throw new nl(yu);if(rl(e)&&rl(t)&&e.fixedSize!==t.fixedSize)throw new nl(bu,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!rl(e)&&!rl(t)&&e.maxSize!==t.maxSize)throw new nl(vu,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return{...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}(((e={})=>{return t={config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(e,t,n)=>e.setBigUint64(0,BigInt(t),n),size:8},n={fixedSize:t.size,write(e,n,r){t.range&&function(e,t,n,r){if(r<t||r>n)throw new nl(xu,{codecDescription:e,max:n,min:t,value:r})}(t.name,t.range[0],t.range[1],e);const o=new ArrayBuffer(t.size);return t.set(new DataView(o),e,ol(t.config)),n.set(new Uint8Array(o),r),r+t.size}},Object.freeze({...n,encode:e=>{const t=new Uint8Array(function(e,t){return"fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}(e,n));return n.write(e,t,0),t}});var t,n})(e),((e={})=>{return n={fixedSize:(t={config:e,get:(e,t)=>e.getBigUint64(0,t),name:"u64",size:8}).size,read(e,n=0){!function(e,t,n=0){if(t.length-n<=0)throw new nl(pu,{codecDescription:e})}(t.name,e,n),function(e,t,n,r=0){const o=n.length-r;if(o<t)throw new nl(mu,{bytesLength:o,codecDescription:e,expected:t})}(t.name,t.size,e,n);const r=new DataView(function(e,t,n){const r=e.byteOffset+(t??0),o=n??e.byteLength;return e.buffer.slice(r,r+o)}(e,n,t.size));return[t.get(r,ol(t.config)),n+t.size]}},Object.freeze({...n,decode:(e,t=0)=>n.read(e,t)[0]});var t,n})(e));class al extends TypeError{constructor(e,t){let n;const{message:r,explanation:o,...i}=e,{path:a}=e,s=0===a.length?r:`At path: ${a.join(".")} -- ${r}`;super(o??s),null!=o&&(this.cause=s),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function sl(e){return"object"==typeof e&&null!=e}function cl(e){return sl(e)&&!Array.isArray(e)}function ul(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function ll(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:a}=n,{refinement:s,message:c=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${ul(r)}\``}=e;return{value:r,type:a,refinement:s,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*fl(e,t,n,r){var o;sl(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const i of e){const e=ll(i,t,n,r);e&&(yield e)}}function*dl(e,t,n={}){const{path:r=[],branch:o=[e],coerce:i=!1,mask:a=!1}=n,s={path:r,branch:o,mask:a};i&&(e=t.coercer(e,s));let c="valid";for(const u of t.validator(e,s))u.explanation=n.message,c="not_valid",yield[u,void 0];for(let[u,l,f]of t.entries(e,s)){const t=dl(l,f,{path:void 0===u?r:[...r,u],branch:void 0===u?o:[...o,l],coerce:i,mask:a,message:n.message});for(const n of t)n[0]?(c=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],void 0]):i&&(l=n[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):sl(e)&&(void 0!==l||u in e)&&(e[u]=l))}if("not_valid"!==c)for(const u of t.refiner(e,s))u.explanation=n.message,c="not_refined",yield[u,void 0];"valid"===c&&(yield[void 0,e])}let hl=class{constructor(e){const{type:t,schema:n,validator:r,refiner:o,coercer:i=e=>e,entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=i,this.validator=r?(e,t)=>fl(r(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>fl(o(e,t),t,this,e):()=>[]}assert(e,t){return function(e,t,n){const r=wl(e,t,{message:n});if(r[0])throw r[0]}(e,this,t)}create(e,t){return pl(e,this,t)}is(e){return ml(e,this)}mask(e,t){return function(e,t,n){const r=wl(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e,t={}){return wl(e,this,t)}};function pl(e,t,n){const r=wl(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function ml(e,t){return!wl(e,t)[0]}function wl(e,t,n={}){const r=dl(e,t,n),o=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(r);return o[0]?[new al(o[0],function*(){for(const e of r)e[0]&&(yield e[0])}),void 0]:[void 0,o[1]]}function gl(e,t){return new hl({type:e,schema:null,validator:t})}function yl(e){return new hl({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${ul(e)}`})}function bl(){return gl("boolean",e=>"boolean"==typeof e)}function vl(e){return gl("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${ul(t)}`)}function Al(e){const t=ul(e),n=typeof e;return new hl({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${ul(n)}`})}function kl(e){return new hl({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}function Tl(){return gl("number",e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${ul(e)}`)}function El(e){return new hl({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function xl(e,t){return new hl({type:"record",schema:null,*entries(n){if(sl(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator:e=>cl(e)||`Expected an object, but received: ${ul(e)}`,coercer:e=>cl(e)?{...e}:e})}function Cl(){return gl("string",e=>"string"==typeof e||`Expected a string, but received: ${ul(e)}`)}function Il(e){const t=gl("never",()=>!1);return new hl({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let o=0;o<r;o++)yield[o,n[o],e[o]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${ul(e)}`,coercer:e=>Array.isArray(e)?e.slice():e})}function Sl(e){const t=Object.keys(e);return new hl({type:"type",schema:e,*entries(n){if(sl(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>cl(e)||`Expected an object, but received: ${ul(e)}`,coercer:e=>cl(e)?{...e}:e})}function Nl(e){const t=e.map(e=>e.type).join(" | ");return new hl({type:"union",schema:null,coercer(t,n){for(const r of e){const[e,o]=r.validate(t,{coerce:!0,mask:n.mask});if(!e)return o}return t},validator(n,r){const o=[];for(const t of e){const[...e]=dl(n,t,r),[i]=e;if(!i[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${ul(n)}`,...o]}})}function Bl(){return gl("unknown",()=>!0)}function Ml(e,t,n){return new hl({...e,coercer:(r,o)=>ml(r,t)?e.coercer(n(r,o),o):e.coercer(r,o)})}var Pl,Ol=new Uint8Array(16);function Rl(){if(!Pl&&!(Pl="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pl(Ol)}const Ul=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ll(e){return"string"==typeof e&&Ul.test(e)}for(var Dl,Fl,ql=[],Hl=0;Hl<256;++Hl)ql.push((Hl+256).toString(16).substr(1));function Vl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ql[e[t+0]]+ql[e[t+1]]+ql[e[t+2]]+ql[e[t+3]]+"-"+ql[e[t+4]]+ql[e[t+5]]+"-"+ql[e[t+6]]+ql[e[t+7]]+"-"+ql[e[t+8]]+ql[e[t+9]]+"-"+ql[e[t+10]]+ql[e[t+11]]+ql[e[t+12]]+ql[e[t+13]]+ql[e[t+14]]+ql[e[t+15]]).toLowerCase();if(!Ll(n))throw TypeError("Stringified UUID is invalid");return n}var Wl=0,jl=0;function Yl(e){if(!Ll(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function zl(e,t,n){function r(e,r,o,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=Yl(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),(a=n(a))[6]=15&a[6]|t,a[8]=63&a[8]|128,o){i=i||0;for(var s=0;s<16;++s)o[i+s]=a[s];return o}return Vl(a)}try{r.name=e}catch(o){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Gl(e){return 14+(e+64>>>9<<4)+1}function Jl(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function Xl(e,t,n,r,o,i){return Jl((a=Jl(Jl(t,e),Jl(r,i)))<<(s=o)|a>>>32-s,n);var a,s}function Kl(e,t,n,r,o,i,a){return Xl(t&n|~t&r,e,t,o,i,a)}function Ql(e,t,n,r,o,i,a){return Xl(t&r|n&~r,e,t,o,i,a)}function Zl(e,t,n,r,o,i,a){return Xl(t^n^r,e,t,o,i,a)}function _l(e,t,n,r,o,i,a){return Xl(n^(t|~r),e,t,o,i,a)}var $l=zl("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",o=0;o<n;o+=8){var i=e[o>>5]>>>o%32&255,a=parseInt(r.charAt(i>>>4&15)+r.charAt(15&i),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Gl(t)-1]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,a=0;a<e.length;a+=16){var s=n,c=r,u=o,l=i;n=Kl(n,r,o,i,e[a],7,-680876936),i=Kl(i,n,r,o,e[a+1],12,-389564586),o=Kl(o,i,n,r,e[a+2],17,606105819),r=Kl(r,o,i,n,e[a+3],22,-1044525330),n=Kl(n,r,o,i,e[a+4],7,-176418897),i=Kl(i,n,r,o,e[a+5],12,1200080426),o=Kl(o,i,n,r,e[a+6],17,-1473231341),r=Kl(r,o,i,n,e[a+7],22,-45705983),n=Kl(n,r,o,i,e[a+8],7,1770035416),i=Kl(i,n,r,o,e[a+9],12,-1958414417),o=Kl(o,i,n,r,e[a+10],17,-42063),r=Kl(r,o,i,n,e[a+11],22,-1990404162),n=Kl(n,r,o,i,e[a+12],7,1804603682),i=Kl(i,n,r,o,e[a+13],12,-40341101),o=Kl(o,i,n,r,e[a+14],17,-1502002290),n=Ql(n,r=Kl(r,o,i,n,e[a+15],22,1236535329),o,i,e[a+1],5,-165796510),i=Ql(i,n,r,o,e[a+6],9,-1069501632),o=Ql(o,i,n,r,e[a+11],14,643717713),r=Ql(r,o,i,n,e[a],20,-373897302),n=Ql(n,r,o,i,e[a+5],5,-701558691),i=Ql(i,n,r,o,e[a+10],9,38016083),o=Ql(o,i,n,r,e[a+15],14,-660478335),r=Ql(r,o,i,n,e[a+4],20,-405537848),n=Ql(n,r,o,i,e[a+9],5,568446438),i=Ql(i,n,r,o,e[a+14],9,-1019803690),o=Ql(o,i,n,r,e[a+3],14,-187363961),r=Ql(r,o,i,n,e[a+8],20,1163531501),n=Ql(n,r,o,i,e[a+13],5,-1444681467),i=Ql(i,n,r,o,e[a+2],9,-51403784),o=Ql(o,i,n,r,e[a+7],14,1735328473),n=Zl(n,r=Ql(r,o,i,n,e[a+12],20,-1926607734),o,i,e[a+5],4,-378558),i=Zl(i,n,r,o,e[a+8],11,-2022574463),o=Zl(o,i,n,r,e[a+11],16,1839030562),r=Zl(r,o,i,n,e[a+14],23,-35309556),n=Zl(n,r,o,i,e[a+1],4,-1530992060),i=Zl(i,n,r,o,e[a+4],11,1272893353),o=Zl(o,i,n,r,e[a+7],16,-155497632),r=Zl(r,o,i,n,e[a+10],23,-1094730640),n=Zl(n,r,o,i,e[a+13],4,681279174),i=Zl(i,n,r,o,e[a],11,-358537222),o=Zl(o,i,n,r,e[a+3],16,-722521979),r=Zl(r,o,i,n,e[a+6],23,76029189),n=Zl(n,r,o,i,e[a+9],4,-640364487),i=Zl(i,n,r,o,e[a+12],11,-421815835),o=Zl(o,i,n,r,e[a+15],16,530742520),n=_l(n,r=Zl(r,o,i,n,e[a+2],23,-995338651),o,i,e[a],6,-198630844),i=_l(i,n,r,o,e[a+7],10,1126891415),o=_l(o,i,n,r,e[a+14],15,-1416354905),r=_l(r,o,i,n,e[a+5],21,-57434055),n=_l(n,r,o,i,e[a+12],6,1700485571),i=_l(i,n,r,o,e[a+3],10,-1894986606),o=_l(o,i,n,r,e[a+10],15,-1051523),r=_l(r,o,i,n,e[a+1],21,-2054922799),n=_l(n,r,o,i,e[a+8],6,1873313359),i=_l(i,n,r,o,e[a+15],10,-30611744),o=_l(o,i,n,r,e[a+6],15,-1560198380),r=_l(r,o,i,n,e[a+13],21,1309151649),n=_l(n,r,o,i,e[a+4],6,-145523070),i=_l(i,n,r,o,e[a+11],10,-1120210379),o=_l(o,i,n,r,e[a+2],15,718787259),r=_l(r,o,i,n,e[a+9],21,-343485551),n=Jl(n,s),r=Jl(r,c),o=Jl(o,u),i=Jl(i,l)}return[n,r,o,i]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(Gl(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))});function ef(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function tf(e,t){return e<<t|e>>>32-t}var nf=zl("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var o=0;o<r.length;++o)e.push(r.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,a=Math.ceil(i/16),s=new Array(a),c=0;c<a;++c){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=e[64*c+4*l]<<24|e[64*c+4*l+1]<<16|e[64*c+4*l+2]<<8|e[64*c+4*l+3];s[c]=u}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(var f=0;f<a;++f){for(var d=new Uint32Array(80),h=0;h<16;++h)d[h]=s[f][h];for(var p=16;p<80;++p)d[p]=tf(d[p-3]^d[p-8]^d[p-14]^d[p-16],1);for(var m=n[0],w=n[1],g=n[2],y=n[3],b=n[4],v=0;v<80;++v){var A=Math.floor(v/20),k=tf(m,5)+ef(A,w,g,y)+b+t[A]+d[v]>>>0;b=y,y=g,g=tf(w,30)>>>0,w=m,m=k}n[0]=n[0]+m>>>0,n[1]=n[1]+w>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+b>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]});const rf=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:Yl,stringify:Vl,v1:function(e,t,n){var r=t&&n||0,o=t||new Array(16),i=(e=e||{}).node||Dl,a=void 0!==e.clockseq?e.clockseq:Fl;if(null==i||null==a){var s=e.random||(e.rng||Rl)();null==i&&(i=Dl=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=Fl=16383&(s[6]<<8|s[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:jl+1,l=c-Wl+(u-jl)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),(l<0||c>Wl)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Wl=c,jl=u,Fl=a;var f=(1e4*(268435455&(c+=122192928e5))+u)%4294967296;o[r++]=f>>>24&255,o[r++]=f>>>16&255,o[r++]=f>>>8&255,o[r++]=255&f;var d=c/4294967296*1e4&268435455;o[r++]=d>>>8&255,o[r++]=255&d,o[r++]=d>>>24&15|16,o[r++]=d>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var h=0;h<6;++h)o[r+h]=i[h];return t||Vl(o)},v3:$l,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||Rl)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return Vl(r)},v5:nf,validate:Ll,version:function(e){if(!Ll(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),of=/* @__PURE__ */Fo(rf);var af,sf,cf,uf;!function(){if(uf)return cf;uf=1;const e=of.v4,t=function(){if(sf)return af;sf=1;const e=of.v4;return af=function(t,n,r,o){if("string"!=typeof t)throw new TypeError(t+" must be a string");const i="number"==typeof(o=o||{}).version?o.version:2;if(1!==i&&2!==i)throw new TypeError(i+" must be 1 or 2");const a={method:t};if(2===i&&(a.jsonrpc="2.0"),n){if("object"!=typeof n&&!Array.isArray(n))throw new TypeError(n+" must be an object, array or omitted");a.params=n}if(void 0===r){const t="function"==typeof o.generator?o.generator:function(){return e()};a.id=t(a,o)}else 2===i&&null===r?o.notificationIdNull&&(a.id=null):a.id=r;return a}}(),n=function(t,r){if(!(this instanceof n))return new n(t,r);r||(r={}),this.options={reviver:void 0!==r.reviver?r.reviver:null,replacer:void 0!==r.replacer?r.replacer:null,generator:void 0!==r.generator?r.generator:function(){return e()},version:void 0!==r.version?r.version:2,notificationIdNull:"boolean"==typeof r.notificationIdNull&&r.notificationIdNull},this.callServer=t};cf=n,n.prototype.request=function(e,n,r,o){const i=this;let a=null;const s=Array.isArray(e)&&"function"==typeof n;if(1===this.options.version&&s)throw new TypeError("JSON-RPC 1.0 does not support batching");if(s||!s&&e&&"object"==typeof e&&"function"==typeof n)o=n,a=e;else{"function"==typeof r&&(o=r,r=void 0);const i="function"==typeof o;try{a=t(e,n,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(u){if(i)return void o(u);throw u}if(!i)return a}let c;try{c=JSON.stringify(a,this.options.replacer)}catch(u){return void o(u)}return this.callServer(c,function(e,t){i.Ae(e,t,o)}),a},n.prototype.Ae=function(e,t,n){if(e)return void n(e);if(!t)return void n();let r;try{r=JSON.parse(t,this.options.reviver)}catch(o){return void n(o)}if(3!==n.length)n(null,r);else{if(Array.isArray(r)){const e=function(e){return void 0!==e.error},t=function(t){return!e(t)};return void n(null,r.filter(e),r.filter(t))}n(null,r.error,r.result)}}}();var lf;function ff(e){try{return ci.ExtendedPoint.fromHex(e),!0}catch{return!1}}lf||(lf=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||e,a),c=n?n+t:t;return e.ke[c]?e.ke[c].fn?e.ke[c]=[e.ke[c],s]:e.ke[c].push(s):(e.ke[c]=s,e.Te++),e}function a(e,t){0===--e.Te?e.ke=new r:delete e.ke[t]}function s(){this.ke=new r,this.Te=0}Object.create&&(r.prototype=/* @__PURE__ */Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this.Te)return o;for(r in e=this.ke)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.ke[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this.ke[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,i,a){var s=n?n+e:e;if(!this.ke[s])return!1;var c,u,l=this.ke[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,o),!0;case 5:return l.fn.call(l.context,t,r,o,i),!0;case 6:return l.fn.call(l.context,t,r,o,i,a),!0}for(u=1,c=new Array(f-1);u<f;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,h=l.length;for(u=0;u<h;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,o);break;default:if(!c)for(d=1,c=new Array(f-1);d<f;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this.ke[i])return this;if(!t)return a(this,i),this;var s=this.ke[i];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||a(this,i);else{for(var c=0,u=[],l=s.length;c<l;c++)(s[c].fn!==t||o&&!s[c].once||r&&s[c].context!==r)&&u.push(s[c]);u.length?this.ke[i]=1===u.length?u[0]:u:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this.ke[t]&&a(this,t)):(this.ke=new r,this.Te=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}({exports:{}}));class df{constructor(e){Object.assign(this,e)}encode(){return Go.Buffer.from(Di.serialize(hf,this))}static decode(e){return Di.deserialize(hf,this,e)}static decodeUnchecked(e){return Di.deserializeUnchecked(hf,this,e)}}const hf=/* @__PURE__ */new Map;var pf;let mf=1;class wf extends df{constructor(e){if(super({}),this.Ee=void 0,function(e){return void 0!==e.Ee}(e))this.Ee=e.Ee;else{if("string"==typeof e){const t=ki.decode(e);if(32!=t.length)throw new Error("Invalid public key input");this.Ee=new pi(t)}else this.Ee=new pi(e);if(this.Ee.byteLength()>32)throw new Error("Invalid public key input")}}static unique(){const e=new wf(mf);return mf+=1,new wf(e.toBuffer())}equals(e){return this.Ee.eq(e.Ee)}toBase58(){return ki.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}toBuffer(){const e=this.Ee.toArrayLike(Go.Buffer);if(32===e.length)return e;const t=Go.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,t,n){const r=Go.Buffer.concat([e.toBuffer(),Go.Buffer.from(t),n.toBuffer()]),o=Pn(r);return new wf(o)}static createProgramAddressSync(e,t){let n=Go.Buffer.alloc(0);e.forEach(function(e){if(e.length>32)throw new TypeError("Max seed length exceeded");var t;n=Go.Buffer.concat([n,(t=e,Go.Buffer.isBuffer(t)?t:t instanceof Uint8Array?Go.Buffer.from(t.buffer,t.byteOffset,t.byteLength):Go.Buffer.from(t))])}),n=Go.Buffer.concat([n,t.toBuffer(),Go.Buffer.from("ProgramDerivedAddress")]);const r=Pn(n);if(ff(r))throw new Error("Invalid seeds, address must fall off the curve");return new wf(r)}static async createProgramAddress(e,t){return this.createProgramAddressSync(e,t)}static findProgramAddressSync(e,t){let n,r=255;for(;0!=r;){try{const o=e.concat(Go.Buffer.from([r]));n=this.createProgramAddressSync(o,t)}catch(o){if(o instanceof TypeError)throw o;r--;continue}return[n,r]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,t){return this.findProgramAddressSync(e,t)}static isOnCurve(e){return ff(new wf(e).toBytes())}}pf=wf,wf.default=new pf("11111111111111111111111111111111"),hf.set(wf,{kind:"struct",fields:[["_bn","u256"]]}),new wf("BPFLoader1111111111111111111111111111111111");const gf=(e="publicKey")=>qi.blob(32,e),yf=(e="string")=>{const t=qi.struct([qi.u32("length"),qi.u32("lengthPadding"),qi.blob(qi.offset(qi.u32(),-8),"chars")],e),n=t.decode.bind(t),r=t.encode.bind(t),o=t;return o.decode=(e,t)=>n(e,t).chars.toString(),o.encode=(e,t,n)=>{const o={chars:Go.Buffer.from(e,"utf8")};return r(o,t,n)},o.alloc=e=>qi.u32().span+qi.u32().span+Go.Buffer.from(e,"utf8").length,o};Go.Buffer.alloc(64).fill(0),new wf("SysvarC1ock11111111111111111111111111111111"),new wf("SysvarEpochSchedu1e111111111111111111111111"),new wf("Sysvar1nstructions1111111111111111111111111"),new wf("SysvarRecentB1ockHashes11111111111111111111"),new wf("SysvarRent111111111111111111111111111111111"),new wf("SysvarRewards111111111111111111111111111111"),new wf("SysvarS1otHashes111111111111111111111111111"),new wf("SysvarS1otHistory11111111111111111111111111"),new wf("SysvarStakeHistory1111111111111111111111111");const bf=qi.nu64("lamportsPerSignature");function vf(e){const t=qi.blob(8,e),n=t.decode.bind(t),r=t.encode.bind(t),o=t,i=il();return o.decode=(e,t)=>{const r=n(e,t);return i.decode(r)},o.encode=(e,t,n)=>{const o=i.encode(e);return r(o,t,n)},o}qi.struct([qi.u32("version"),qi.u32("state"),gf("authorizedPubkey"),gf("nonce"),qi.struct([bf],"feeCalculator")]).span,Object.freeze({Create:{index:0,layout:qi.struct([qi.u32("instruction"),qi.ns64("lamports"),qi.ns64("space"),gf("programId")])},Assign:{index:1,layout:qi.struct([qi.u32("instruction"),gf("programId")])},Transfer:{index:2,layout:qi.struct([qi.u32("instruction"),vf("lamports")])},CreateWithSeed:{index:3,layout:qi.struct([qi.u32("instruction"),gf("base"),yf("seed"),qi.ns64("lamports"),qi.ns64("space"),gf("programId")])},AdvanceNonceAccount:{index:4,layout:qi.struct([qi.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:qi.struct([qi.u32("instruction"),qi.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:qi.struct([qi.u32("instruction"),gf("authorized")])},AuthorizeNonceAccount:{index:7,layout:qi.struct([qi.u32("instruction"),gf("authorized")])},Allocate:{index:8,layout:qi.struct([qi.u32("instruction"),qi.ns64("space")])},AllocateWithSeed:{index:9,layout:qi.struct([qi.u32("instruction"),gf("base"),yf("seed"),qi.ns64("space"),gf("programId")])},AssignWithSeed:{index:10,layout:qi.struct([qi.u32("instruction"),gf("base"),yf("seed"),gf("programId")])},TransferWithSeed:{index:11,layout:qi.struct([qi.u32("instruction"),vf("lamports"),yf("seed"),gf("programId")])},UpgradeNonceAccount:{index:12,layout:qi.struct([qi.u32("instruction")])}}),new wf("11111111111111111111111111111111"),new wf("BPFLoader2111111111111111111111111111111111"),qi.struct([qi.u32("typeIndex"),vf("deactivationSlot"),qi.nu64("lastExtendedSlot"),qi.u8("lastExtendedStartIndex"),qi.u8(),qi.seq(gf(),qi.offset(qi.u8(),-1),"authority")]);const Af=Ml(vl(wf),Cl(),e=>new wf(e)),kf=Il([Cl(),Al("base64")]),Tf=Ml(vl(Go.Buffer),kf,e=>Go.Buffer.from(e[0],"base64"));function Ef(e){return Nl([Sl({jsonrpc:Al("2.0"),id:Cl(),result:e}),Sl({jsonrpc:Al("2.0"),id:Cl(),error:Sl({code:Bl(),message:Cl(),data:El(gl("any",()=>!0))})})])}const xf=Ef(Bl());function Cf(e){return Ml(Ef(e),xf,t=>"error"in t?t:{...t,result:pl(t.result,e)})}function If(e){return Cf(Sl({context:Sl({slot:Tl()}),value:e}))}function Sf(e){return Sl({context:Sl({slot:Tl()}),value:e})}const Nf=Sl({foundation:Tl(),foundationTerm:Tl(),initial:Tl(),taper:Tl(),terminal:Tl()});Cf(yl(kl(Sl({epoch:Tl(),effectiveSlot:Tl(),amount:Tl(),postBalance:Tl(),commission:El(kl(Tl()))}))));const Bf=yl(Sl({slot:Tl(),prioritizationFee:Tl()})),Mf=Sl({total:Tl(),validator:Tl(),foundation:Tl(),epoch:Tl()}),Pf=Sl({epoch:Tl(),slotIndex:Tl(),slotsInEpoch:Tl(),absoluteSlot:Tl(),blockHeight:El(Tl()),transactionCount:El(Tl())}),Of=Sl({slotsPerEpoch:Tl(),leaderScheduleSlotOffset:Tl(),warmup:bl(),firstNormalEpoch:Tl(),firstNormalSlot:Tl()}),Rf=xl(Cl(),yl(Tl())),Uf=kl(Nl([Sl({}),Cl()])),Lf=Sl({err:Uf}),Df=Al("receivedSignature");Sl({"solana-core":Cl(),"feature-set":El(Tl())});const Ff=Sl({program:Cl(),programId:Af,parsed:Bl()}),qf=Sl({programId:Af,accounts:yl(Af),data:Cl()});If(Sl({err:kl(Nl([Sl({}),Cl()])),logs:kl(yl(Cl())),accounts:El(kl(yl(kl(Sl({executable:bl(),owner:Cl(),lamports:Tl(),data:yl(Cl()),rentEpoch:El(Tl())}))))),unitsConsumed:El(Tl()),returnData:El(kl(Sl({programId:Cl(),data:Il([Cl(),Al("base64")])}))),innerInstructions:El(kl(yl(Sl({index:Tl(),instructions:yl(Nl([Ff,qf]))}))))})),If(Sl({byIdentity:xl(Cl(),yl(Tl())),range:Sl({firstSlot:Tl(),lastSlot:Tl()})})),Cf(Nf),Cf(Mf),Cf(Bf),Cf(Pf),Cf(Of),Cf(Rf),Cf(Tl()),If(Sl({total:Tl(),circulating:Tl(),nonCirculating:Tl(),nonCirculatingAccounts:yl(Af)}));const Hf=Sl({amount:Cl(),uiAmount:kl(Tl()),decimals:Tl(),uiAmountString:El(Cl())});If(yl(Sl({address:Af,amount:Cl(),uiAmount:kl(Tl()),decimals:Tl(),uiAmountString:El(Cl())}))),If(yl(Sl({pubkey:Af,account:Sl({executable:bl(),owner:Af,lamports:Tl(),data:Tf,rentEpoch:Tl()})})));const Vf=Sl({program:Cl(),parsed:Bl(),space:Tl()});If(yl(Sl({pubkey:Af,account:Sl({executable:bl(),owner:Af,lamports:Tl(),data:Vf,rentEpoch:Tl()})}))),If(yl(Sl({lamports:Tl(),address:Af})));const Wf=Sl({executable:bl(),owner:Af,lamports:Tl(),data:Tf,rentEpoch:Tl()});Sl({pubkey:Af,account:Wf});const jf=Ml(Nl([vl(Go.Buffer),Vf]),Nl([kf,Vf]),e=>Array.isArray(e)?pl(e,Tf):e),Yf=Sl({executable:bl(),owner:Af,lamports:Tl(),data:jf,rentEpoch:Tl()});Sl({pubkey:Af,account:Yf}),Sl({state:Nl([Al("active"),Al("inactive"),Al("activating"),Al("deactivating")]),active:Tl(),inactive:Tl()}),Cf(yl(Sl({signature:Cl(),slot:Tl(),err:Uf,memo:kl(Cl()),blockTime:El(kl(Tl()))}))),Cf(yl(Sl({signature:Cl(),slot:Tl(),err:Uf,memo:kl(Cl()),blockTime:El(kl(Tl()))}))),Sl({subscription:Tl(),result:Sf(Wf)});const zf=Sl({pubkey:Af,account:Wf});Sl({subscription:Tl(),result:Sf(zf)});const Gf=Sl({parent:Tl(),slot:Tl(),root:Tl()});Sl({subscription:Tl(),result:Gf});const Jf=Nl([Sl({type:Nl([Al("firstShredReceived"),Al("completed"),Al("optimisticConfirmation"),Al("root")]),slot:Tl(),timestamp:Tl()}),Sl({type:Al("createdBank"),parent:Tl(),slot:Tl(),timestamp:Tl()}),Sl({type:Al("frozen"),slot:Tl(),timestamp:Tl(),stats:Sl({numTransactionEntries:Tl(),numSuccessfulTransactions:Tl(),numFailedTransactions:Tl(),maxTransactionsPerEntry:Tl()})}),Sl({type:Al("dead"),slot:Tl(),timestamp:Tl(),err:Cl()})]);Sl({subscription:Tl(),result:Jf}),Sl({subscription:Tl(),result:Sf(Nl([Lf,Df]))}),Sl({subscription:Tl(),result:Tl()}),Sl({pubkey:Cl(),gossip:kl(Cl()),tpu:kl(Cl()),rpc:kl(Cl()),version:kl(Cl())});const Xf=Sl({votePubkey:Cl(),nodePubkey:Cl(),activatedStake:Tl(),epochVoteAccount:bl(),epochCredits:yl(Il([Tl(),Tl(),Tl()])),commission:Tl(),lastVote:Tl(),rootSlot:kl(Tl())});Cf(Sl({current:yl(Xf),delinquent:yl(Xf)}));const Kf=Nl([Al("processed"),Al("confirmed"),Al("finalized")]),Qf=Sl({slot:Tl(),confirmations:kl(Tl()),err:Uf,confirmationStatus:El(Kf)});If(yl(kl(Qf))),Cf(Tl());const Zf=Sl({accountKey:Af,writableIndexes:yl(Tl()),readonlyIndexes:yl(Tl())}),_f=Sl({signatures:yl(Cl()),message:Sl({accountKeys:yl(Cl()),header:Sl({numRequiredSignatures:Tl(),numReadonlySignedAccounts:Tl(),numReadonlyUnsignedAccounts:Tl()}),instructions:yl(Sl({accounts:yl(Tl()),data:Cl(),programIdIndex:Tl()})),recentBlockhash:Cl(),addressTableLookups:El(yl(Zf))})}),$f=Sl({pubkey:Af,signer:bl(),writable:bl(),source:El(Nl([Al("transaction"),Al("lookupTable")]))}),ed=Sl({accountKeys:yl($f),signatures:yl(Cl())}),td=Sl({parsed:Bl(),program:Cl(),programId:Af}),nd=Sl({accounts:yl(Af),data:Cl(),programId:Af}),rd=Ml(Nl([nd,td]),Nl([Sl({parsed:Bl(),program:Cl(),programId:Cl()}),Sl({accounts:yl(Cl()),data:Cl(),programId:Cl()})]),e=>pl(e,"accounts"in e?nd:td)),od=Sl({signatures:yl(Cl()),message:Sl({accountKeys:yl($f),instructions:yl(rd),recentBlockhash:Cl(),addressTableLookups:El(kl(yl(Zf)))})}),id=Sl({accountIndex:Tl(),mint:Cl(),owner:El(Cl()),programId:El(Cl()),uiTokenAmount:Hf}),ad=Sl({writable:yl(Af),readonly:yl(Af)}),sd=Sl({err:Uf,fee:Tl(),innerInstructions:El(kl(yl(Sl({index:Tl(),instructions:yl(Sl({accounts:yl(Tl()),data:Cl(),programIdIndex:Tl()}))})))),preBalances:yl(Tl()),postBalances:yl(Tl()),logMessages:El(kl(yl(Cl()))),preTokenBalances:El(kl(yl(id))),postTokenBalances:El(kl(yl(id))),loadedAddresses:El(ad),computeUnitsConsumed:El(Tl()),costUnits:El(Tl())}),cd=Sl({err:Uf,fee:Tl(),innerInstructions:El(kl(yl(Sl({index:Tl(),instructions:yl(rd)})))),preBalances:yl(Tl()),postBalances:yl(Tl()),logMessages:El(kl(yl(Cl()))),preTokenBalances:El(kl(yl(id))),postTokenBalances:El(kl(yl(id))),loadedAddresses:El(ad),computeUnitsConsumed:El(Tl()),costUnits:El(Tl())}),ud=Nl([Al(0),Al("legacy")]),ld=Sl({pubkey:Cl(),lamports:Tl(),postBalance:kl(Tl()),rewardType:kl(Cl()),commission:El(kl(Tl()))});Cf(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),transactions:yl(Sl({transaction:_f,meta:kl(sd),version:El(ud)})),rewards:El(yl(ld)),blockTime:kl(Tl()),blockHeight:kl(Tl())}))),Cf(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),rewards:El(yl(ld)),blockTime:kl(Tl()),blockHeight:kl(Tl())}))),Cf(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),transactions:yl(Sl({transaction:ed,meta:kl(sd),version:El(ud)})),rewards:El(yl(ld)),blockTime:kl(Tl()),blockHeight:kl(Tl())}))),Cf(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),transactions:yl(Sl({transaction:od,meta:kl(cd),version:El(ud)})),rewards:El(yl(ld)),blockTime:kl(Tl()),blockHeight:kl(Tl())}))),Cf(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),transactions:yl(Sl({transaction:ed,meta:kl(cd),version:El(ud)})),rewards:El(yl(ld)),blockTime:kl(Tl()),blockHeight:kl(Tl())}))),Cf(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),rewards:El(yl(ld)),blockTime:kl(Tl()),blockHeight:kl(Tl())}))),Cf(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),transactions:yl(Sl({transaction:_f,meta:kl(sd)})),rewards:El(yl(ld)),blockTime:kl(Tl())}))),Cf(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),signatures:yl(Cl()),blockTime:kl(Tl())}))),Cf(kl(Sl({slot:Tl(),meta:kl(sd),blockTime:El(kl(Tl())),transaction:_f,version:El(ud)}))),Cf(kl(Sl({slot:Tl(),transaction:od,meta:kl(cd),blockTime:El(kl(Tl())),version:El(ud)}))),If(Sl({blockhash:Cl(),lastValidBlockHeight:Tl()})),If(bl()),Cf(yl(Sl({slot:Tl(),numTransactions:Tl(),numSlots:Tl(),samplePeriodSecs:Tl()}))),If(kl(Sl({feeCalculator:Sl({lamportsPerSignature:Tl()})}))),Cf(Cl()),Cf(Cl());const fd=Sl({err:Uf,logs:yl(Cl()),signature:Cl()});var dd;Sl({result:Sf(fd),subscription:Tl()}),Object.freeze({CreateLookupTable:{index:0,layout:qi.struct([qi.u32("instruction"),vf("recentSlot"),qi.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:qi.struct([qi.u32("instruction")])},ExtendLookupTable:{index:2,layout:qi.struct([qi.u32("instruction"),vf(),qi.seq(gf(),qi.offset(qi.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:qi.struct([qi.u32("instruction")])},CloseLookupTable:{index:4,layout:qi.struct([qi.u32("instruction")])}}),new wf("AddressLookupTab1e1111111111111111111111111"),Object.freeze({RequestUnits:{index:0,layout:qi.struct([qi.u8("instruction"),qi.u32("units"),qi.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:qi.struct([qi.u8("instruction"),qi.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:qi.struct([qi.u8("instruction"),qi.u32("units")])},SetComputeUnitPrice:{index:3,layout:qi.struct([qi.u8("instruction"),vf("microLamports")])}}),new wf("ComputeBudget111111111111111111111111111111"),qi.struct([qi.u8("numSignatures"),qi.u8("padding"),qi.u16("signatureOffset"),qi.u16("signatureInstructionIndex"),qi.u16("publicKeyOffset"),qi.u16("publicKeyInstructionIndex"),qi.u16("messageDataOffset"),qi.u16("messageDataSize"),qi.u16("messageInstructionIndex")]),new wf("Ed25519SigVerify111111111111111111111111111"),bo.utils.isValidPrivateKey,qi.struct([qi.u8("numSignatures"),qi.u16("signatureOffset"),qi.u8("signatureInstructionIndex"),qi.u16("ethAddressOffset"),qi.u8("ethAddressInstructionIndex"),qi.u16("messageDataOffset"),qi.u16("messageDataSize"),qi.u8("messageInstructionIndex"),qi.blob(20,"ethAddress"),qi.blob(64,"signature"),qi.u8("recoveryId")]),new wf("KeccakSecp256k11111111111111111111111111111"),new wf("StakeConfig11111111111111111111111111111111");class hd{constructor(e,t,n){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=t,this.custodian=n}}dd=hd,hd.default=new dd(0,0,wf.default),Object.freeze({Initialize:{index:0,layout:qi.struct([qi.u32("instruction"),((e="authorized")=>qi.struct([gf("staker"),gf("withdrawer")],e))(),((e="lockup")=>qi.struct([qi.ns64("unixTimestamp"),qi.ns64("epoch"),gf("custodian")],e))()])},Authorize:{index:1,layout:qi.struct([qi.u32("instruction"),gf("newAuthorized"),qi.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:qi.struct([qi.u32("instruction")])},Split:{index:3,layout:qi.struct([qi.u32("instruction"),qi.ns64("lamports")])},Withdraw:{index:4,layout:qi.struct([qi.u32("instruction"),qi.ns64("lamports")])},Deactivate:{index:5,layout:qi.struct([qi.u32("instruction")])},Merge:{index:7,layout:qi.struct([qi.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:qi.struct([qi.u32("instruction"),gf("newAuthorized"),qi.u32("stakeAuthorizationType"),yf("authoritySeed"),gf("authorityOwner")])}}),new wf("Stake11111111111111111111111111111111111111"),Object.freeze({InitializeAccount:{index:0,layout:qi.struct([qi.u32("instruction"),((e="voteInit")=>qi.struct([gf("nodePubkey"),gf("authorizedVoter"),gf("authorizedWithdrawer"),qi.u8("commission")],e))()])},Authorize:{index:1,layout:qi.struct([qi.u32("instruction"),gf("newAuthorized"),qi.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:qi.struct([qi.u32("instruction"),qi.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:qi.struct([qi.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:qi.struct([qi.u32("instruction"),((e="voteAuthorizeWithSeedArgs")=>qi.struct([qi.u32("voteAuthorizationType"),gf("currentAuthorityDerivedKeyOwnerPubkey"),yf("currentAuthorityDerivedKeySeed"),gf("newAuthorized")],e))()])}}),new wf("Vote111111111111111111111111111111111111111"),new wf("Va1idator1nfo111111111111111111111111111111"),Sl({name:Cl(),website:El(Cl()),details:El(Cl()),iconUrl:El(Cl()),keybaseUsername:El(Cl())}),new wf("Vote111111111111111111111111111111111111111"),qi.struct([gf("nodePubkey"),gf("authorizedWithdrawer"),qi.u8("commission"),qi.nu64(),qi.seq(qi.struct([qi.nu64("slot"),qi.u32("confirmationCount")]),qi.offset(qi.u32(),-8),"votes"),qi.u8("rootSlotValid"),qi.nu64("rootSlot"),qi.nu64(),qi.seq(qi.struct([qi.nu64("epoch"),gf("authorizedVoter")]),qi.offset(qi.u32(),-8),"authorizedVoters"),qi.struct([qi.seq(qi.struct([gf("authorizedPubkey"),qi.nu64("epochOfLastAuthorizedSwitch"),qi.nu64("targetEpoch")]),32,"buf"),qi.nu64("idx"),qi.u8("isEmpty")],"priorVoters"),qi.nu64(),qi.seq(qi.struct([qi.nu64("epoch"),qi.nu64("credits"),qi.nu64("prevCredits")]),qi.offset(qi.u32(),-8),"epochCredits"),qi.struct([qi.nu64("slot"),qi.nu64("timestamp")],"lastTimestamp")]);const pd=e=>{const t=/* @__PURE__ */new Date,n=new Date(t);n.setDate(n.getDate()-1);const r=new Date(e);return r.setHours(0,0,0,0),t.setHours(0,0,0,0),n.setHours(0,0,0,0),r.getTime()===t.getTime()?"Today":r.getTime()===n.getTime()?"Yesterday":r.toLocaleDateString("en-US",{month:"short",day:"numeric",year:r.getFullYear()!==t.getFullYear()?"numeric":void 0})},md=e=>new Promise(t=>setTimeout(t,e||0)),wd=(e,t=5,n=5)=>(e=e||"",e?.length<=t+n?e:`${e.substr(0,t)}...${e.substr(e.length-n,n)}`),gd=e=>{if(!e)return"";const t=Ro[e];return t?t.chainTypeMoralis:""},yd=e=>{if(!e)return"";const t=Ro[e];return t?t.chainType:""},bd={getItem(e){if("undefined"==typeof window)return null;try{return window.localStorage.getItem(e)}catch{return null}},setItem(e,t){if("undefined"!=typeof window)try{window.localStorage.setItem(e,t)}catch{}},removeItem(e){if("undefined"!=typeof window)try{window.localStorage.removeItem(e)}catch{}},get length(){if("undefined"==typeof window)return 0;try{return window.localStorage.length}catch{return 0}},key(e){if("undefined"==typeof window)return null;try{return window.localStorage.key(e)}catch{return null}}};function vd(e){if(lt(e))return!0;try{return new wf(e),!0}catch{return!1}}function Ad(){const e=String("keyring-chatbot-agent").trim().replace(/^['"]|['"]$/g,"").replace(/^['"]|['"]$/g,"").replace(/[;,]$/,"");return b[e||"keyring-chatbot-agent"]||b["keyring-chatbot-agent"]}const kd=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,ellipsisAddress:wd,formatDate:pd,getChainType:yd,getChainTypeMoralis:gd,getDataPackage:Ad,isValidAddress:vd,safeStorage:bd,sleep:md},Symbol.toStringTag,{value:"Module"})),Td=s(void 0),Ed=()=>{const e=c(Td);if(!e)throw new Error("useConnect must be used within ConnectProvider");return{...e,chainData:Ro[e?.account?.chainId]||void 0,chainId:e.account?.chainId||void 0,chainType:yd(e.account?.chainId||void 0),chainTypeMoralis:gd(e.account?.chainId||void 0),isChainSupported:!!Ro[e?.account?.chainId]?.isSupported||!1}},xd=({children:t,initialAccount:n})=>/* @__PURE__ */e(Td.Provider,{value:{account:n||null},children:t}),Cd=({address:r,chainId:i})=>{const[s,c]=o(!1),{isChainSupported:u}=Ed(),{t:l}=w(),f=a(()=>{if(!r)return;const e=r,t=()=>{c(!0),setTimeout(()=>c(!1),2e3)};try{navigator.clipboard.writeText(e).then(t).catch(()=>{const n=document.createElement("input");n.value=e,document.body.appendChild(n),n.select(),document.execCommand("copy"),n.remove(),t()})}catch{const n=document.createElement("input");n.value=e,document.body.appendChild(n),n.select(),document.execCommand("copy"),n.remove(),t()}},[r]);/* @__PURE__ */
4
- return e(t,{children:vd(r||"")&&/* @__PURE__ */n("div",{className:"chat-user-info",children:[
2
+ import{jsx as e,Fragment as t,jsxs as n}from"react/jsx-runtime";import r,{useState as o,useEffect as i,useCallback as a,createContext as s,useContext as c,memo as u,useMemo as l,useRef as d}from"react";const f={en:{chatTitle:"Keyring Agent",closeChat:"Close chat",messagePlaceholder:"Message ....",sendMessage:"Send message",botIsTyping:"Bot is typing",canIHelpYou:"Can I help you with anything?",replyToMessage:"Reply to message",replyingTo:"Replying to",replyingToYou:"You",replyingToAgent:"Keyring Agent",cancelReply:"Cancel reply",suggestionAskText:"Ask a question",suggestionAskUserMessage:"I have a question",suggestionAskBotReply:"Ask me anything",suggestionBuyText:"Buy trending token",walletConnectedChainUnsupported:"Your wallet is connected but the chain is not supported for trading. Please switch to a supported chain to see trending tokens.",walletNotConnected:"Please connect your wallet to see trending tokens.",actionProcessing:"⏳ Processing transaction...",actionSuccess:"✅ Transaction completed",actionFail:"❌ Action cancelled or failed",txSubmitted:"⏳ Transaction submitted. Waiting for confirmation...",txConfirmed:"✅ Transaction confirmed!",txReverted:"❌ Transaction reverted on-chain.",txTimeout:"⚠️ Transaction submitted but confirmation timed out. Please check manually.",txSuccessful:"✅ Transaction successful!",txFailed:"❌ Transaction failed. Please try again.",txNoHandler:"⚠️ No transaction handler configured.",txInsufficientGas:"⚠️ **Insufficient {symbol} for gas!** You have {balance} {symbol} but need ~{fee} {symbol} for the transaction fee. Please top up your wallet and try again.",txError:"❌ Error: {message}",swapConfirmButton:"Confirm",swapConfirmValue:"Confirm swap",swapReadyToProceed:"Ready to proceed with the swap?",swapEstimationError:"⚠️ Unable to get swap estimation. Error: {error}",formCancel:"Cancel",formExecute:"Execute",formProcessing:"⏳ Processing...",formBalance:"Balance:",formTokenNotFound:"Token not found in your wallet.",formNoBalance:"You have no {symbol} balance in your wallet.",formInsufficientBalance:"Insufficient balance. Spendable: {balance} {symbol}",formFieldRequired:"{field} is required",formInvalidAddress:"Invalid address (Must contain 0x and 40 hex chars)",formMustBePositive:"Must be a positive number",formMustBeValidNumber:"Must be a valid number",openChat:"Open chat",openChatTitle:"Open chat support",walletBalanceSpendable:"This is the spendable balance of your wallet on {chain} chain. Please choose the coins you want to use for this trade.",walletNoTokensFound:"Sorry, I couldn't find any tokens in your wallet on {chain} chain. Please make sure you have some tokens to trade.",walletFetchFailed:"Sorry, I could not fetch your wallet balance. Please try again.",walletFetchError:"Sorry, I encountered an error fetching your wallet balance.",insufficientFeeToken:"Insufficient fee. Please ensure you have enough {symbol} to cover the transaction fees, or select a different token.",selectAmountOf:"Select the amount of {symbol} to use:\n\nSpendable: {balance} {symbol}",swapFeeWarning:"\n⚠️ **Insufficient {symbol} for fees!**\n You have {balance} {symbol} but need ~{needed} {symbol}.\n",swapNeedApprove:"You need to approve {symbol} first before swapping.",swapApproveButton:"Approve {symbol}",swapApproveValue:"Approve {symbol} for swap",swapNoSourceToken:"⚠️ You don't have the source token in your wallet or balance is 0.",swapSelectAmount:"Swap {from} → {to}\n\nSelect the amount of {from} to swap:\n\nSpendable: {balance} {from}",swapApprovalRequired:"⚠️ Token approval required before swapping.\n\nStep 1: Approve {symbol}\nStep 2: Confirm Swap",swapEstimationFailed:"⚠️ Failed to get swap estimation. Please try again.",swapInsufficientNativeBalance:"⚠️ Insufficient balance! You have {balance} {symbol} but need {amount} {symbol}. Please top up your wallet or reduce the amount.",swapTokenNotInWallet:"⚠️ You don't have {symbol} in your wallet. Please acquire some first before swapping.",swapInsufficientTokenBalance:"⚠️ Insufficient balance! You have {balance} {symbol} but need {amount} {symbol}. Please reduce the amount or add more tokens.",selectAmountToSwap:"Select the amount of {symbol} to swap:\n\nSpendable: {balance} {symbol}",couldNotLoadTokenList:"⚠️ Could not load token list. Please specify the destination token.",trendingTokensForReceive:"📈 Trending tokens on {chain} chain. Pick the token you want to receive or type the token you want to receive:",txProcessing:"⏳ Transaction processing... Please confirm in your wallet.",txConfirmedSwap:"✅ Transaction confirmed! Your swap has been completed.",txRevertedSwap:"❌ Transaction reverted on-chain. Please try again.",txSuccessfulSwap:"✅ Transaction successful! Your swap has been completed.",txSuccessfulSendToken:"✅ Sent successfully **{amount} {symbol}** to {to}",txSuccessfulSendNative:"✅ Sent successfully **{amount} {symbol}** to {to}",txSuccessfulSendNft:"✅ Sent successfully NFT **{name}** (#{tokenId}) to {to}",txSuccessfulWrapNative:"✅ Wrapped successfully **{amount} {from}** → **{to}**",txSuccessfulUnwrapNative:"✅ Unwrapped successfully **{amount} {from}** → **{to}**",txDataNotAvailable:"⚠️ Transaction data not available.",approvalDataNotAvailable:"⚠️ Approval data not available.",approving:"Approving {symbol}... Please confirm in your wallet.",approvalSuccess:"✅ {symbol} approved successfully!",approvalConfirmSwap:"Now you can execute the swap.",confirmSwapButton:"Confirm Swap",approvalFailed:"❌ Approval failed. Please try again.",couldNotFetchBalance:"⚠️ Could not fetch your wallet balance.",couldNotLoadBalance:"⚠️ Could not load balance. Please try again.",couldNotFetchBalanceRetry:"⚠️ Could not fetch your balance. Please try again.",nftSendReview:"📤 Send **{name}** ({standard} #{tokenId})\n\nPlease review and fill in the recipient address below:",nftCollectionHeader:"Your NFTs :\n\n{list}",nftMoreItems:"\n\nAnd {count} more NFTs...",nftSelectBelow:"\n\nSelect an NFT below to send",nftNoCollection:"You don't have any NFTs in your wallet on this chain.",nftMultipleMatchesForTokenId:"I found {count} NFTs with Token ID #{tokenId} in your wallet. Please select the one you want to send:",nftNotFoundInWallet:"I couldn't find \"{name}\" in your NFT collection. You don't own this NFT on this chain.",nftFetchError:"Sorry, I encountered an error fetching your NFTs.",trendingTokensHeader:"📈 Here is the list of tokens that are currently trending upwards on {chain} chain",trendingTokensQuestion:"\nIs there any token you want to buy?",trendingTokensError:"Sorry, I encountered an error fetching trending tokens.",errorProcessingRequest:"Sorry, I encountered an error processing your request.Please try again in a few moments.",buttonBuyWith:"Buy with {symbol}",buttonUsePercent:"Use {percent}% of {symbol}",buttonBuyToken:"Buy {name} ({symbol})",buttonSendNft:"Send {name}",buttonSwapTo:"Swap to {name} ({symbol})",buttonBuySymbol:"Buy {symbol}",viewBalancesLoading:"Fetching your wallet balances...",viewBalancesHeader:"Your token balances on {chain}:\n\n{list}",viewBalancesEmpty:"You don't have any tokens in your wallet on this chain.",viewBalancesFetchError:"Sorry, I encountered an error fetching your balances.",buttonSendToken:"Send {symbol}",formMax:"MAX",buttonSwapToken:"Swap {symbol}",buttonBuyMoreToken:"Buy more {symbol}",actionSendNativeLabel:"Send Native Token",actionSendNativeDesc:"Send native token (ETH, BNB, MATIC, etc.) to an address",actionSendTokenLabel:"Send Token (ERC20)",actionSendTokenDesc:"Send an ERC20 token to an address",actionSwapTokenLabel:"Swap Token",actionSwapTokenDesc:"Swap one token for another",actionApproveTokenLabel:"Approve Token",actionApproveTokenDesc:"Approve a spender to use your tokens",actionWrapNativeLabel:"Wrap Native Token",actionWrapNativeDesc:"Wrap native token (ETH → WETH)",actionUnwrapNativeLabel:"Unwrap Native Token",actionUnwrapNativeDesc:"Unwrap native token (WETH → ETH)",actionSendNftLabel:"Send NFT",actionSendNftDesc:"Transfer an ERC721 or ERC1155 NFT to another address",fieldToAddress:"Recipient Address",fieldAmount:"Amount",fieldTokenContract:"Token Contract",fieldTokenSymbol:"Token Symbol",fieldDecimals:"Decimals",fieldTokenIn:"From Token",fieldTokenInSymbol:"From Symbol",fieldTokenOut:"To Token",fieldTokenOutSymbol:"To Symbol",fieldTokenInDecimals:"From Decimals",fieldTokenOutDecimals:"To Decimals",fieldSpenderAddress:"Spender Address",fieldAmountUnlimited:"Amount (empty = unlimited)",fieldNftContract:"NFT Contract",fieldTokenId:"Token ID",fieldTokenStandard:"Token Standard",fieldNftName:"NFT Name",formMustBePositiveInteger:"Must be a positive integer",formAmountExceedsNft:"Amount cannot exceed available balance {max}",receivedButtonValue:"Received: {value}",actionExecutedFor:'Action "{action}" executed for: {value}',buyTokenHelp:"I'll help you buy {symbol}. Let me show your available tokens to trade with.",tokenNotFoundOnChain:'I couldn\'t find the token "{symbol}" on this chain. Here are the trending tokens you can buy',swapPreparing:"Preparing your swap...",swapConfirmYes:"Yes",swapChooseFrom:"Please choose which token you want to swap from:",swapChooseTo:"You want to swap {symbol}. Please choose which token you want to receive:",swapNeedDetails:'I need more details for your swap. Please specify which tokens you want to swap (e.g. "Swap 1 ETH to USDC").',viewNftsLoading:"Let me show you your NFT collection!",sendTokenNotInWallet:"You don't have {symbol} in your wallet on this chain. Please acquire some first before sending.",sendTokenChoose:"Which token would you like to send?",sendNftChoose:"Which NFT would you like to send?",swapChooseToken:"Which token would you like to swap? Here are your current balances:",spendable:"Spendable",welcomeMessage:"**Welcome! 🚀**\nYou’re now connected and ready to explore the world of Blockchain. I can assist you anytime with NFT insights, trading, price tracking, and portfolio analysis.",sendOtherNfts:"\nIf the NFT you want to send is not in the list above, please visit our website to send it.",sendNftViaWebsite:"Please select the NFT you would like to send from the list and proceed via this website.",sendNftViaWebsiteWithLink:"Please select the NFT you would like to send from the list and proceed via [this website]({link}).",viewNftViaWebsite:"Please view your NFT collection on this website for more details.",viewNftViaWebsiteWithLink:"Please view your NFT collection on [this website]({link}) for more details.",buyingOnChain:"Buying {symbol} on {chain}",viewOnExplorer:"View on Explorer",copyWalletAddress:"Copy wallet address",copied:"Copied!",copyAddress:"Copy address",poolGeneralInfoIntro:"💧 **Liquidity Pools** are smart contracts where users deposit token pairs to provide liquidity for DEX trading (like Uniswap). Liquidity providers (LPs) earn trading fees from each swap.",poolGeneralInfoMetricsTitle:"**Key Metrics:**",poolGeneralInfoMetricTVL:"**TVL** - Total Value Locked in the pool",poolGeneralInfoMetricAPR:"**APR** - Estimated annual return from fees",poolGeneralInfoMetricVol24h:"**Volume 24h** - Trading volume in last 24 hours",poolGeneralInfoMetricFeeTier:"**Fee Tier** - Trading fee (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'Try asking something specific, like: *"ETH/USDC pools on Base"* or *"Highest APR pools"*.',poolNoMatch:"❌ No matching pools found.",poolNoMatchForTokenOnChain:"❌ No matching pools found for **{token}** on **{chain}**.",poolSuggestionsTitle:"💡 **Suggestions:**",poolSuggestionTryChain:"Try a different chain (Ethereum, Base, Arbitrum...)",poolSuggestionTryPair:"Try a more popular pair (ETH/USDC, ETH/USDT)",poolSuggestionRelaxFilters:"Remove filters if too narrow",poolHeaderBest:"🏆 Best Pool",poolHeaderSafe:"🛡️ Safest Pools",poolHeaderTrending:"🔥 Trending Pools",poolHeaderHighApr:"📈 Highest APR Pools",poolHeaderLowFee:"💰 Lowest Fee Pools",poolHeaderCompare:"⚖️ Pool Comparison",poolHeaderDetail:"🔎 Pool Details",poolHeaderGeneral:"💧 Pool Info",poolHeaderSearch:"🔍 Search Results",poolTableMetric:"Metric",poolTableValue:"Value",poolTableLink:"Link",poolLinkView:"View on Uniswap",poolRecommendationHighApr:"👉 **Recommended:** [{pair}]({link}) - Highest APR at **{apr}%**. _Note: Higher APR may come with higher risk._",poolRecommendationLowFee:"👉 **Recommended:** [{pair}]({link}) - Lowest fee at **{fee}%**, ideal for frequent trading.",poolRecommendationSafe:"👉 **Recommended:** [{pair}]({link}) - Highest TVL at **{tvl}**, deep liquidity and stable.",poolRecommendationTrending:"👉 **Most Active:** [{pair}]({link}) - 24h Volume **{volume}**, highest trading activity.",poolRecommendationTopPick:"👉 **Top pick:** [{pair}]({link}) - TVL **{tvl}**, best match for your criteria.",sendPositionNoId:'Please provide your LP position ID to send it. For example: "send position 12345 to 0x...".',sendPositionNotFound:"Position #{id} was not found in your wallet on {chain}. Please make sure you own this position.",sendPositionReview:"📤 Send LP Position **#{positionId}** ({pair})\n\nPlease enter the recipient address below:",sendPositionFetchError:"Error fetching your positions. Please try again.",poolUnsupportedChain:"This chain is not supported for data queries. Sorry for the inconvenience.",poolUniswapV3Only:"I can only get information of pools that is on Subgraph Uniswap V3."},ja:{chatTitle:"Keyring Agent",closeChat:"チャットを閉じる",messagePlaceholder:"メッセージを入力...",sendMessage:"メッセージを送信",botIsTyping:"ボットが入力中...",canIHelpYou:"何かお手伝いできることはございますか?",replyToMessage:"メッセージに返信",replyingTo:"返信先:",replyingToYou:"あなた",replyingToAgent:"Keyring Agent",cancelReply:"返信をキャンセル",suggestionAskText:"質問・調査のお願い",suggestionAskUserMessage:"質問があります",suggestionAskBotReply:"何でも聞いてください",suggestionBuyText:"トレンドトークンを購入",walletConnectedChainUnsupported:"ウォレットは接続されていますが、このチェーンは取引に対応していません。トレンドのトークンを表示するには、対応しているチェーンに切り替えてください。",walletNotConnected:"トレンドのトークンを表示するには、ウォレットを接続してください。",actionProcessing:"⏳ トランザクションを処理中...",actionSuccess:"✅ トランザクションが完了しました",actionFail:"❌ アクションがキャンセルされたか、失敗しました",txSubmitted:"⏳ トランザクションを送信しました。確認を待機中...",txConfirmed:"✅ トランザクションが確認されました!",txReverted:"❌ オンチェーンでトランザクションがリバートされました。",txTimeout:"⚠️ トランザクションは送信されましたが、タイムアウトしました。手動で確認してください。",txSuccessful:"✅ トランザクションに成功しました!",txFailed:"❌ トランザクションに失敗しました。もう一度お試しください。",txNoHandler:"⚠️ トランザクションハンドラーが設定されていません。",txInsufficientGas:"⚠️ **ガス代({symbol})が不足しています!** 保有量は {balance} {symbol} ですが、手数料に約 {fee} {symbol} 必要です。ウォレットにチャージして再試行してください。",txError:"❌ エラー: {message}",swapConfirmButton:"確定",swapConfirmValue:"スワップを確定する",swapReadyToProceed:"スワップを実行しますか?",swapEstimationError:"⚠️ スワップの見積もりを取得できません。エラー: {error}",formCancel:"キャンセル",formExecute:"実行",formProcessing:"⏳ 処理中...",formBalance:"残高:",formTokenNotFound:"ウォレット内にトークンが見つかりません。",formNoBalance:"ウォレットに {symbol} の残高がありません。",formInsufficientBalance:"残高不足です。利用可能: {balance} {symbol}",formFieldRequired:"{field} は必須項目です",formInvalidAddress:"無効なアドレスです(0x + 40文字である必要があります)",formMustBePositive:"正の数値を入力してください",formMustBeValidNumber:"有効な数値を入力してください",openChat:"チャットを開く",openChatTitle:"チャットサポートを開く",walletBalanceSpendable:"これは {chain} チェーン上のウォレットの利用可能な残高です。この取引に使用するコインを選択してください。",walletNoTokensFound:"申し訳ありませんが、{chain} チェーン上のウォレットにトークンが見つかりませんでした。取引するためのトークンを保有しているかご確認ください。",walletFetchFailed:"ウォレット残高を取得できませんでした。もう一度お試しください。",walletFetchError:"ウォレット残高の取得中にエラーが発生しました。",insufficientFeeToken:"手数料が不足しています。取引手数料をカバーするのに十分な {symbol} を保有しているか、別のトークンを選択してください。",selectAmountOf:"使用する {symbol} の数量を選択してください:\n\n利用可能: {balance} {symbol}",swapFeeWarning:"\n⚠️ **手数料の {symbol} が不足しています!**\n 保有量は {balance} {symbol} ですが、~{needed} {symbol} 必要です。\n",swapNeedApprove:"スワップを行う前に、まず {symbol} の承認が必要です。",swapApproveButton:"{symbol} を承認する",swapApproveValue:"スワップのために {symbol} を承認",swapNoSourceToken:"⚠️ ウォレットにソーストークンがないか、残高が 0 です。",swapSelectAmount:"スワップ {from} → {to}\n\nスワップする {from} の数量を選択してください:\n\n利用可能: {balance} {from}",swapApprovalRequired:"⚠️ スワップの前にトークンの承認が必要です。\n\nステップ 1: {symbol} を承認\nステップ 2: スワップを確定",swapEstimationFailed:"⚠️ スワップの見積もり取得に失敗しました。もう一度お試しください。",swapInsufficientNativeBalance:"⚠️ 残高不足です! 保有量は {balance} {symbol} ですが、{amount} {symbol} 必要です。ウォレットにチャージするか、数量を減らしてください。",swapTokenNotInWallet:"⚠️ ウォレットに {symbol} がありません。スワップする前にまず入手してください。",swapInsufficientTokenBalance:"⚠️ 残高不足です! 保有量は {balance} {symbol} ですが、{amount} {symbol} 必要です。数量を減らすか、トークンを追加してください。",selectAmountToSwap:"スwaップする {symbol} の数量を選択してください:\n\n利用可能: {balance} {symbol}",couldNotLoadTokenList:"⚠️ トークンリストを読み込めませんでした。受け取り希望のトークンを指定してください。",trendingTokensForReceive:"📈 {chain} チェーンのトレンドトークン。受け取りたいトークンを選択するか、入力してください:",txProcessing:"⏳ トランザクション処理中... ウォレットで承認してください。",txConfirmedSwap:"✅ トランザクションが確認されました!スワップが完了しました。",txRevertedSwap:"❌ オンチェーンでトランザクションがリバートされました。もう一度お試しください。",txSuccessfulSwap:"✅ トランザクションに成功しました!スワップが完了しました。",txSuccessfulSendToken:"✅ **{amount} {symbol}** を {to} に送信しました",txSuccessfulSendNative:"✅ **{amount} {symbol}** を {to} に送信しました",txSuccessfulWrapNative:"✅ **{amount} {from}** を **{to}** にラップしました",txSuccessfulUnwrapNative:"✅ **{amount} {from}** を **{to}** にアンラップしました",txSuccessfulSendNft:"✅ NFT **{name}** (#{tokenId}) を {to} に送信しました",txDataNotAvailable:"⚠️ トランザクションデータが利用できません。",approvalDataNotAvailable:"⚠️ 承認データが利用できません。",approving:"{symbol} を承認中... ウォレットで確認してください。",approvalSuccess:"✅ {symbol} の承認に成功しました!",approvalConfirmSwap:"これでスワップを実行できます。",confirmSwapButton:"スワップを確定する",approvalFailed:"❌ 承認に失敗しました。もう一度お試しください。",couldNotFetchBalance:"⚠️ ウォレット残高を取得できませんでした。",couldNotLoadBalance:"⚠️ 残高を読み込めませんでした。もう一度お試しください。",couldNotFetchBalanceRetry:"⚠️ 残高を取得できませんでした。もう一度お試しください。",nftSendReview:"📤 **{name}** ({standard} #{tokenId}) を送信\n\n内容を確認し、以下に受信者のアドレスを入力してください:",nftCollectionHeader:"您的 NFT 资产:\n\n{list}",nftMoreItems:"\n\n以及其他 {count} 件 NFT...",nftSelectBelow:"\n\n请在下方选择要发送的 NFT",nftNoCollection:"このチェーン上のウォレットにNFTは見つかりませんでした。",nftMultipleMatchesForTokenId:"ウォレット内にToken ID #{tokenId} のNFTが{count}件見つかりました。送信したいNFTを選択してください:",nftNotFoundInWallet:'あなたのNFTコレクションに "{name}" が見つかりませんでした。このチェーンでこのNFTを所有していません。',nftFetchError:"申し訳ありませんが、NFTの取得中にエラーが発生しました。",trendingTokensHeader:"📈 {chain} チェーンで現在価格が上昇中のトレンドトークン一覧です:",trendingTokensQuestion:"\n購入したいトークンはありますか?",trendingTokensError:"トレンドトークンの取得中にエラーが発生しました。",errorProcessingRequest:"リクエストの処理中にエラーが発生しました。しばらく時間を置いてからもう一度お試しください。",buttonBuyWith:"{symbol} で購入",buttonUsePercent:"{symbol}の{percent}%を使用",buttonBuyToken:"{name} ({symbol}) を購入",buttonSendNft:"{name} を送信",buttonSwapTo:"{name} ({symbol}) にスワップ",buttonBuySymbol:"{symbol} を購入",viewBalancesLoading:"ウォレットの残高を取得中...",viewBalancesHeader:"{chain} 上のトークン残高:\n\n{list}",viewBalancesEmpty:"このチェーン上のウォレットにトークンは見つかりませんでした。",viewBalancesFetchError:"残高の取得中にエラーが発生しました。",buttonSendToken:"{symbol} を送信",formMax:"最大",buttonSwapToken:"{symbol} をスワップ",buttonBuyMoreToken:"{symbol} をさらに入手",actionSendNativeLabel:"ネイティブトークンを送信",actionSendNativeDesc:"ネイティブトークン (ETH, BNB, MATIC など) をアドレスに送信します",actionSendTokenLabel:"トークンを送信 (ERC20)",actionSendTokenDesc:"ERC20トークンをアドレスに送信します",actionSwapTokenLabel:"トークンをスワップ",actionSwapTokenDesc:"トークンを別のトークンに交換します",actionApproveTokenLabel:"トークンを承認",actionApproveTokenDesc:"支出元(Spender)によるトークンの使用を許可します",actionWrapNativeLabel:"ネイティブトークンをラップ",actionWrapNativeDesc:"ネイティブトークンをラップします (ETH → WETH)",actionUnwrapNativeLabel:"ネイティブトークンをアンラップ",actionUnwrapNativeDesc:"ネイティブトークンをアンラップします (WETH → ETH)",actionSendNftLabel:"NFTを送信",actionSendNftDesc:"ERC721またはERC1155 NFTを別のアドレスに転送します",fieldToAddress:"受信者アドレス",fieldAmount:"数量",fieldTokenContract:"トークンコントラクト",fieldTokenSymbol:"トークンシンボル",fieldDecimals:"デシマル (小数桁数)",fieldTokenIn:"元のトークン",fieldTokenInSymbol:"元のシンボル",fieldTokenOut:"先のトークン",fieldTokenOutSymbol:"先のシンボル",fieldTokenInDecimals:"元のデシマル",fieldTokenOutDecimals:"先のデシマル",fieldSpenderAddress:"支出元 (Spender) アドレス",fieldAmountUnlimited:"数量 (空欄 = 無制限)",fieldNftContract:"NFTコントラクト",fieldTokenId:"トークンID",fieldTokenStandard:"トークン規格",fieldNftName:"NFT名",formMustBePositiveInteger:"正の整数を入力してください",formAmountExceedsNft:"数量は利用可能な残高 {max} を超えることはできません",receivedButtonValue:"受取額: {value}",actionExecutedFor:"アクション「{action}」が {value} に対して実行されました",buyTokenHelp:"{symbol} の購入をお手伝いします。まず、交換に使用可能なトークンを表示します。",tokenNotFoundOnChain:"このチェーン上でトークン「{symbol}」が見つかりませんでした。購入可能なトレンドトークンはこちらです",swapPreparing:"スワップの準備中...",swapConfirmYes:"はい",swapChooseFrom:"交換元(支払う)トークンを選択してください:",swapChooseTo:"{symbol} をスワップします。受け取りたいトークンを選択してください:",swapNeedDetails:"スワップの詳細が必要です。交換したいトークンを指定してください(例:「1 ETH を USDC にスワップ」)。",viewNftsLoading:"あなたのNFTコレクションを表示します!",sendTokenNotInWallet:"このチェーンのウォレットに {symbol} がありません。送信する前にまず入手してください。",sendTokenChoose:"どのトークンを送信しますか?",sendNftChoose:"どのNFTを送信しますか?",swapChooseToken:"どのトークンをスワップしますか?現在の残高はこちらです:",spendable:"利用可能",welcomeMessage:"**ようこそ! 🚀**\n次世代のブロックチェーンへ。NFT情報、トレード、価格チェック、ポートフォリオ分析など、いつでもお手伝いします。",sendOtherNfts:"\n送信したいNFTが上記のリストにない場合は、当ウェブサイトにアクセスして送信してください。",sendNftViaWebsite:"送信したいNFTをリストから選択し、当ウェブサイトで手続きを進めてください。",sendNftViaWebsiteWithLink:"送信したいNFTをリストから選択し、[当ウェブサイト]({link})で手続きを進めてください。",viewNftViaWebsite:"NFTコレクションの詳細は、当ウェブサイトでご確認ください。",viewNftViaWebsiteWithLink:"NFTコレクションの詳細は、[当ウェブサイト]({link})でご確認ください。",buyingOnChain:"{chain} チェーンで {symbol} を購入中",viewOnExplorer:"エクスプローラーで見る",copyWalletAddress:"ウォレットアドレスをコピー",copied:"コピーしました!",copyAddress:"アドレスをコピー",poolGeneralInfoIntro:"💧 **流動性プール** は、ユーザーがトークンペアを預けてDEX取引(Uniswap など)の流動性を提供するスマートコントラクトです。LP は各スワップの手数料を獲得します。",poolGeneralInfoMetricsTitle:"**主要メトリクス:**",poolGeneralInfoMetricTVL:"**TVL** - プールにロックされている総価値",poolGeneralInfoMetricAPR:"**APR** - 手数料に基づく年間想定利回り",poolGeneralInfoMetricVol24h:"**24時間出来高** - 直近24時間の取引量",poolGeneralInfoMetricFeeTier:"**手数料ティア** - 取引手数料 (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'例: *"Base の ETH/USDC プール"* や *"APR が高いプール"* のように聞いてみてください。',poolNoMatch:"❌ 条件に一致するプールが見つかりませんでした。",poolNoMatchForTokenOnChain:"❌ **{chain}** 上で **{token}** に一致するプールが見つかりませんでした。",poolSuggestionsTitle:"💡 **提案:**",poolSuggestionTryChain:"別のチェーンを試す (Ethereum, Base, Arbitrum...)",poolSuggestionTryPair:"より一般的なペアを試す (ETH/USDC, ETH/USDT)",poolSuggestionRelaxFilters:"フィルター条件を緩める",poolHeaderBest:"🏆 最適なプール",poolHeaderSafe:"🛡️ 安全性の高いプール",poolHeaderTrending:"🔥 トレンドプール",poolHeaderHighApr:"📈 APRの高いプール",poolHeaderLowFee:"💰 手数料の低いプール",poolHeaderCompare:"⚖️ プール比較",poolHeaderDetail:"🔎 プール詳細",poolHeaderGeneral:"💧 プール情報",poolHeaderSearch:"🔍 検索結果",poolTableMetric:"指標",poolTableValue:"値",poolTableLink:"リンク",poolLinkView:"Uniswapで表示",poolRecommendationHighApr:"👉 **おすすめ:** [{pair}]({link}) - APR は **{apr}%** で最も高いです。_注意: APR が高いほどリスクも高い可能性があります。_",poolRecommendationLowFee:"👉 **おすすめ:** [{pair}]({link}) - 手数料 **{fee}%** で、頻繁な取引に適しています。",poolRecommendationSafe:"👉 **おすすめ:** [{pair}]({link}) - TVL **{tvl}** で流動性が厚く安定しています。",poolRecommendationTrending:"👉 **最も活発:** [{pair}]({link}) - 24時間出来高 **{volume}** で取引が最も活発です。",poolRecommendationTopPick:"👉 **トップ候補:** [{pair}]({link}) - TVL **{tvl}**、条件に最も適合しています。",sendPositionNoId:'LP ポジション ID を提供してください。例:"ポジション 12345 を 0x... に送信"。',sendPositionNotFound:"{chain} 上のウォレットにポジション #{id} が見つかりませんでした。このポジションを所有していることを確認してください。",sendPositionReview:"📤 LP ポジション **#{positionId}** ({pair}) を送信\n\n受取人アドレスを以下に入力してください:",sendPositionFetchError:"ポジションの取得中にエラーが発生しました。もう一度お試しください。",poolUnsupportedChain:"このチェーンはデータクエリに対応していません。ご不便をおかけして申し訳ございません。",poolUniswapV3Only:"Subgraph Uniswap V3 上のプールの情報のみ取得できます。"},cn:{chatTitle:"Keyring Agent",closeChat:"关闭聊天",messagePlaceholder:"请输入消息....",sendMessage:"发送消息",botIsTyping:"机器人正在输入",canIHelpYou:"有什么我可以帮您的吗?",replyToMessage:"回复消息",replyingTo:"正在回复",replyingToYou:"您",replyingToAgent:"Keyring Agent",cancelReply:"取消回复",suggestionAskText:"提问",suggestionAskUserMessage:"我有一个问题",suggestionAskBotReply:"随便问我任何事情",suggestionBuyText:"购买热门代币",walletConnectedChainUnsupported:"您的钱包已连接,但当前链不支持交易。请切换到支持的链以查看热门代币。",walletNotConnected:"请连接您的钱包以查看热门代币。",actionProcessing:"⏳ 正在处理交易...",actionSuccess:"✅ 交易已完成",actionFail:"❌ 操作取消或失败",txSubmitted:"⏳ 交易已提交。正在等待确认...",txConfirmed:"✅ 交易已确认!",txReverted:"❌ 交易在链上被退回(Reverted)。",txTimeout:"⚠️ 交易已提交但确认超时。请手动检查。",txSuccessful:"✅ 交易成功!",txFailed:"❌ 交易失败。请重试。",txNoHandler:"⚠️ 未配置交易处理器。",txInsufficientGas:"⚠️ **{symbol} 余额不足以支付 Gas 费!** 您当前有 {balance} {symbol},但交易费预计需要 ~{fee} {symbol}。请充值钱包后重试。",txError:"❌ 错误: {message}",swapConfirmButton:"确认",swapConfirmValue:"确认兑换",swapReadyToProceed:"准备好进行兑换了吗?",swapEstimationError:"⚠️ 无法获取兑换估算。错误: {error}",formCancel:"取消",formExecute:"执行",formProcessing:"⏳ 正在处理...",formBalance:"余额:",formTokenNotFound:"您的钱包中未找到该代币。",formNoBalance:"您的钱包中没有 {symbol} 余额。",formInsufficientBalance:"余额不足。可用余额: {balance} {symbol}",formFieldRequired:"{field} 是必填项",formInvalidAddress:"无效地址(必须是 0x + 40 个字符)",formMustBePositive:"必须为正数",formMustBeValidNumber:"必须为有效数字",openChat:"打开聊天",openChatTitle:"打开聊天支持",walletBalanceSpendable:"这是您在 {chain} 链上钱包的可选余额。请选择您想用于此次交易的代币。",walletNoTokensFound:"抱歉,我在 {chain} 链上的钱包中没找到任何代币。请确保您有代币可以进行交易。",walletFetchFailed:"抱歉,无法获取您的钱包余额。请重试。",walletFetchError:"抱歉,获取钱包余额时出错。",insufficientFeeToken:"手续费不足。请确保您有足够的 {symbol} 来支付交易费用,或选择其他代币。",selectAmountOf:"选择要使用的 {symbol} 数量:\n\n可用余额: {balance} {symbol}",swapFeeWarning:"\n⚠️ **手续费所需的 {symbol} 不足!**\n 您当前有 {balance} {symbol},但需要 ~{needed} {symbol}。\n",swapNeedApprove:"在兑换之前,您需要先授权 {symbol}。",swapApproveButton:"授权 {symbol}",swapApproveValue:"授权 {symbol} 以进行兑换",swapNoSourceToken:"⚠️ 您的钱包中没有源代币或余额为 0。",swapSelectAmount:"兑换 {from} → {to}\n\n选择要兑换的 {from} 数量:\n\n可用余额: {balance} {from}",swapApprovalRequired:"⚠️ 兑换前需要代币授权。\n\n第 1 步:授权 {symbol}\n第 2 步:确认兑换",swapEstimationFailed:"⚠️ 获取兑换估算失败。请重试。",swapInsufficientNativeBalance:"⚠️ 余额不足!您有 {balance} {symbol} 但需要 {amount} {symbol}。请充值钱包或减少金额。",swapTokenNotInWallet:"⚠️ 您的钱包中没有 {symbol}。请在兑换前先获取一些代币。",swapInsufficientTokenBalance:"⚠️ 余额不足!您有 {balance} {symbol} 但需要 {amount} {symbol}。请减少金额或添加更多代币。",selectAmountToSwap:"选择要兑换的 {symbol} 数量:\n\n可用余额: {balance} {symbol}",couldNotLoadTokenList:"⚠️ 无法加载代币列表。请指定目标代币。",trendingTokensForReceive:"📈 {chain} 链上的热门代币。请选择您想收到的代币或输入代币名称:",txProcessing:"⏳ 交易处理中... 请在钱包中确认。",txConfirmedSwap:"✅ 交易已确认!您的兑换已完成。",txRevertedSwap:"❌ 交易在链上被退回。请重试。",txSuccessfulSwap:"✅ 交易成功!您的兑换已完成。",txSuccessfulSendToken:"✅ 已成功发送 **{amount} {symbol}** 至 {to}",txSuccessfulSendNative:"✅ 已成功发送 **{amount} {symbol}** 至 {to}",txSuccessfulWrapNative:"✅ 成功封装 **{amount} {from}** → **{to}**",txSuccessfulUnwrapNative:"✅ 成功解封装 **{amount} {from}** → **{to}**",txSuccessfulSendNft:"✅ 已成功发送 NFT **{name}** (#{tokenId}) 至 {to}",txDataNotAvailable:"⚠️ 交易数据不可用。",approvalDataNotAvailable:"⚠️ 授权数据不可用。",approving:"正在授权 {symbol}... 请在钱包中确认。",approvalSuccess:"✅ {symbol} 授权成功!",approvalConfirmSwap:"现在您可以执行兑换了。",confirmSwapButton:"确认兑换",approvalFailed:"❌ 授权失败。请重试。",couldNotFetchBalance:"⚠️ 无法获取您的钱包余额。",couldNotLoadBalance:"⚠️ 无法加载余额。请重试。",couldNotFetchBalanceRetry:"⚠️ 无法获取您的余额。请重试。",nftSendReview:"📤 发送 **{name}** ({standard} #{tokenId})\n\n请核对并在下方填写接收者地址:",nftCollectionHeader:"保有中のNFT一覧 :\n\n{list}",nftMoreItems:"\n\n他 {count} 件のNFT...",nftSelectBelow:"\n\n送信するNFTを以下から選択してください",nftNoCollection:"您在该链的钱包中没有任何 NFT。",nftMultipleMatchesForTokenId:"在您的钱包中找到了 {count} 个 Token ID #{tokenId} 的 NFT。请选择您要发送的 NFT:",nftNotFoundInWallet:'我在您的 NFT 收藏中没找到 "{name}"。您在此链上不拥有此 NFT。',nftFetchError:"抱歉,获取您的 NFT 时出错。",trendingTokensHeader:"📈 以下是 {chain} 链上目前呈上升趋势的热门代币列表",trendingTokensQuestion:"\n有您想购买的代币吗?",trendingTokensError:"抱歉,获取热门代币时出错。",errorProcessingRequest:"抱歉,处理您的请求时出错。请稍后再试。",buttonBuyWith:"使用 {symbol} 购买",buttonUsePercent:"使用{percent}%的{symbol}",buttonBuyToken:"购买 {name} ({symbol})",buttonSendNft:"发送 {name}",buttonSwapTo:"兑换为 {name} ({symbol})",buttonBuySymbol:"购买 {symbol}",viewBalancesLoading:"正在获取您的钱包余额...",viewBalancesHeader:"您在 {chain} 上的代币余额:\n\n{list}",viewBalancesEmpty:"您在该链的钱包中没有任何代币。",viewBalancesFetchError:"抱歉,获取您的余额时出错。",buttonSendToken:"发送 {symbol}",formMax:"最多",buttonSwapToken:"兑换 {symbol}",buttonBuyMoreToken:"购买更多 {symbol}",actionSendNativeLabel:"发送原生代币",actionSendNativeDesc:"将原生代币 (ETH, BNB, MATIC 等) 发送到指定地址",actionSendTokenLabel:"发送代币 (ERC20)",actionSendTokenDesc:"将 ERC20 代币发送到指定地址",actionSwapTokenLabel:"兑换代币",actionSwapTokenDesc:"将一种代币兑换为另一种",actionApproveTokenLabel:"授权代币",actionApproveTokenDesc:"授权支出方使用您的代币",actionWrapNativeLabel:"包装 (Wrap) 原生代币",actionWrapNativeDesc:"包装原生代币 (例如 ETH → WETH)",actionUnwrapNativeLabel:"解包 (Unwrap) 原生代币",actionUnwrapNativeDesc:"解包原生代币 (例如 WETH → ETH)",actionSendNftLabel:"发送 NFT",actionSendNftDesc:"将 ERC721 或 ERC1155 NFT 转移到另一个地址",fieldToAddress:"接收者地址",fieldAmount:"金额",fieldTokenContract:"代币合约",fieldTokenSymbol:"代币符号",fieldDecimals:"精度 (Decimals)",fieldTokenIn:"源代币 (From)",fieldTokenInSymbol:"源代币符号",fieldTokenOut:"目标代币 (To)",fieldTokenOutSymbol:"目标代币符号",fieldTokenInDecimals:"源代币精度",fieldTokenOutDecimals:"目标代币精度",fieldSpenderAddress:"支出方 (Spender) 地址",fieldAmountUnlimited:"金额 (留空 = 无限制)",fieldNftContract:"NFT 合约",fieldTokenId:"代币 ID",fieldTokenStandard:"代币标准",fieldNftName:"NFT 名称",formMustBePositiveInteger:"必须为正整数",formAmountExceedsNft:"金额不能超过可用余额 {max}",receivedButtonValue:"收到: {value}",actionExecutedFor:'操作 "{action}" 已执行,对象为: {value}',buyTokenHelp:"我会帮您购买 {symbol}。让我为您显示可用于交易的代币。",tokenNotFoundOnChain:'我在该链上没找到代币 "{symbol}"。以下是您可以购买的热门代币',swapPreparing:"正在准备兑换...",swapConfirmYes:"是",swapChooseFrom:"请选择您想从哪个代币进行兑换:",swapChooseTo:"您想兑换 {symbol}。请选择您想收到的代币:",swapNeedDetails:"我需要更多关于兑换的细节。请指定您想兑换的代币(例如 “将 1 ETH 兑换为 USDC”)。",viewNftsLoading:"正在为您展示 NFT 收藏!",sendTokenNotInWallet:"您的钱包中在此链上没有 {symbol}。请在发送前先获取一些代币。",sendTokenChoose:"您想发送哪个代币?",sendNftChoose:"您想发送哪个 NFT?",swapChooseToken:"您想兑换哪个代币?以下是您的当前余额:",spendable:"可用余额",welcomeMessage:"**欢迎您!🚀**\n带你一起探索新一代区块链世界。我可以随时为您提供NFT资讯、交易支持、价格查询以及投资组合分析等服务。",sendOtherNfts:"\n如果您想发送的NFT不在上述列表中,请访问我们的网站进行发送。",sendNftViaWebsite:"请从列表中选择您想发送的NFT,并通过这个网站继续操作。",sendNftViaWebsiteWithLink:"请从列表中选择您想发送的NFT,并通过[这个网站]({link})继续操作。",viewNftViaWebsite:"如需查看更多详情,请在这个网站查看您的NFT收藏。",viewNftViaWebsiteWithLink:"如需查看更多详情,请在[这个网站]({link})查看您的NFT收藏。",buyingOnChain:"正在 {chain} 链上购买 {symbol}",viewOnExplorer:"在区块浏览器查看",copyWalletAddress:"复制钱包地址",copied:"已复制!",copyAddress:"复制地址",poolGeneralInfoIntro:"💧 **流动性池** 是用户存入代币对、为 DEX(如 Uniswap)提供流动性的智能合约。流动性提供者(LP)可从每笔兑换中获得手续费收益。",poolGeneralInfoMetricsTitle:"**关键指标:**",poolGeneralInfoMetricTVL:"**TVL** - 池中锁仓总价值",poolGeneralInfoMetricAPR:"**APR** - 基于手续费估算的年化收益",poolGeneralInfoMetricVol24h:"**24小时成交量** - 最近24小时交易量",poolGeneralInfoMetricFeeTier:"**费率档位** - 交易费率 (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'你可以更具体地提问,例如:*"Base 上的 ETH/USDC 池"* 或 *"APR 最高的池"*。',poolNoMatch:"❌ 未找到匹配的流动性池。",poolNoMatchForTokenOnChain:"❌ 在 **{chain}** 上未找到 **{token}** 的匹配池。",poolSuggestionsTitle:"💡 **建议:**",poolSuggestionTryChain:"尝试其他链(Ethereum、Base、Arbitrum...)",poolSuggestionTryPair:"尝试更热门的交易对(ETH/USDC、ETH/USDT)",poolSuggestionRelaxFilters:"放宽筛选条件",poolHeaderBest:"🏆 最佳流动性池",poolHeaderSafe:"🛡️ 更稳健的流动性池",poolHeaderTrending:"🔥 热门流动性池",poolHeaderHighApr:"📈 高 APR 流动性池",poolHeaderLowFee:"💰 低费率流动性池",poolHeaderCompare:"⚖️ 流动性池对比",poolHeaderDetail:"🔎 流动性池详情",poolHeaderGeneral:"💧 流动性池信息",poolHeaderSearch:"🔍 搜索结果",poolTableMetric:"指标",poolTableValue:"数值",poolTableLink:"链接",poolLinkView:"在 Uniswap 查看",poolRecommendationHighApr:"👉 **推荐:**[{pair}]({link}) - APR 最高,为 **{apr}%**。_注意:APR 越高通常风险也越高。_",poolRecommendationLowFee:"👉 **推荐:**[{pair}]({link}) - 费率仅 **{fee}%**,适合高频交易。",poolRecommendationSafe:"👉 **推荐:**[{pair}]({link}) - TVL 达 **{tvl}**,流动性更充足且相对稳定。",poolRecommendationTrending:"👉 **最活跃:**[{pair}]({link}) - 24 小时成交量 **{volume}**,交易最活跃。",poolRecommendationTopPick:"👉 **首选:**[{pair}]({link}) - TVL **{tvl}**,最符合你的筛选条件。",sendPositionNoId:'请提供您的 LP 仓位 ID 以便转出。例如:"发送仓位 12345 至 0x..."。',sendPositionNotFound:"在 {chain} 上的钱包中未找到仓位 #{id}。请确认您拥有该仓位。",sendPositionReview:"📤 发送 LP 仓位 **#{positionId}** ({pair})\n\n请在下方填写接收者地址:",sendPositionFetchError:"获取您的仓位时出错。请重试。",poolUnsupportedChain:"该链不支持数据查询,给您带来不便,深表歉意。",poolUniswapV3Only:"我只能获取 Subgraph Uniswap V3 上的流动性池信息。"}};function h(e,t){return f[t]?.[e]??f.en[e]??e}const p=s(void 0),m=({children:t,initialLanguage:n="en"})=>{const[r,s]=o(n);i(()=>{n&&s(n)},[n]);const c=a(e=>h(e,r),[r]),u=a((e,t)=>function(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>t[n]??`{${n}}`)}(h(e,r),t),[r]);/* @__PURE__ */
3
+ return e(p.Provider,{value:{language:r,setLanguage:s,t:c,ti:u},children:t})},w=()=>{const e=c(p);if(!e)throw new Error("useLanguage must be used within a LanguageProvider");return e},g=u(({onClick:t,buttonSize:n=56,customIcon:r,customChatButton:o})=>{const{t:i}=w(),a=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())};return o?/* @__PURE__ */e("div",{onClick:t,onKeyDown:a,role:"button",tabIndex:0,children:o}):/* @__PURE__ */e("button",{className:"chat-button",onClick:t,onKeyDown:a,"aria-label":i("openChat"),title:i("openChatTitle"),type:"button",style:{width:n,height:n,aspectRatio:1},children:/* @__PURE__ */e("img",{draggable:!1,style:{width:n,height:n,objectFit:"contain"},src:r||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAYAAADG4PRLAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAfXSURBVHgB7Z1LbFRVGMe/c4YCAmKrEFiQWIIrNm13RE0olLRuTCq4w4C6Mbopo9GltFsVpmxQN1pJ2MkjcSMESrsgYdd2w8rGkrCA8GjFVintzPH878wZjrfzujPTe88p3y+ZzMydOxO4//s9z3dvBTWB7sxsqyTqF2q5k4R8nUh06s2thQeTZyZ4qOwU0bqJFkHjv6fbZqhBBNVJIJqiASFUN94SExl98CeVEsONiBlZQEu4E8QW1kTUSAvJoahCRhLw4OnZkyzc6qItcnD087ahWvevScB3MrPty6QuKaJOYuJgpoXEgVqsUVbboef07PElUhMsXqy045j3ZB72V9uxooCHtMskoUaIXWYS6GMuLyFsVdqprAuFeEqoQWISp1JcLClgz3fadFPyEjHuIMWH1wfafglvXiEgEhb4X2K36RpzOrHpCic2K2KgFu8GsXgu0opKILzxfwIeygfMdmKcBJXAwVOPBu1tRRdacJ1/EuM6c1kSu8fSbXN4U7TAJZUdJMYHWmUud8K8CSyQrc87ilYYWOCzXLabGJ8oWmEgoJRygBivEFLsD57ZffqLdqNt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JSON.parse('[{"question":{"en":"Unveiling the Truth of Liquidity Pools & Earn Over 20% APR. How Is This Possible?"},"answer":{"en":"The high APR of liquidity pools like Uniswap comes from: Trading fees, Compensation for impermanent loss, Yieldfarming incentives, Market volatility in high-trading-volume pools"}},{"question":{"en":"What Is a Liquidity Pool?"},"answer":{"en":"A liquidity pool is a smart contract that holds two tokens and facilitates swaps using an AMM model. Liquidity providers (LPs) deposit tokens and earn trading fees from transactions in the pool."}},{"question":{"en":"What Are the Benefits of Liquidity Providers?"},"answer":{"en":"Liquidity providers (LPs) earn passive income by supplying tokens to pools, benefiting from trading fees, improved capital efficiency, yield farming rewards, and permissionless participation, while also potentially increasing their total coin holdings over time."}},{"question":{"en":"What risks do liquidity providers (LPs) face when providing liquidity?"},"answer":{"en":"Yes. While providing liquidity can generate returns, it also comes with certain risks that users should be aware of.\\nKey Risks\\nOut-of-Range Risk: If the market price moves outside your selected range, your liquidity becomes inactive. You stop earning fees and may end up holding only one asset in the pair. Adjusting or removing liquidity may be necessary.\\nImpermanent Loss: Significant price changes between the paired assets can reduce the value of your position compared to simply holding them.\\nAsset Imbalance: Over time, one asset may dominate the position, leaving you with an uneven or single-token exposure."}},{"question":{"en":"What is CoinPool?"},"answer":{"en":"CoinPool is a platform that provides a streamlined, non-custodial interface for accessing and managing liquidity positions across supported decentralized finance (DeFi) protocols.\\nIt simplifies how users interact with liquidity pools, making it easier to discover, enter, and manage positions, all while maintaining full control of their assets."}},{"question":{"en":"How Do I Get Started with CoinPool?"},"answer":{"en":"For example, if you hold USDC and select the ETH/WBTC pair, CoinPool will automatically swap USDC into ETH and WBTC, then create a liquidity position for you, making it easy to provide liquidity to the pool."}},{"question":{"en":"Why Should You Use CoinPool?"},"answer":{"en":"CoinPool simplifies and optimizes earning potential by prioritizing high-APR pools to maximize returns, while handling all liquidity provisioning automatically—eliminating the need for manual swaps or rebalancing. With just a single asset deposit, CoinPool seamlessly manages the process to generate efficient passive income."}},{"question":{"en":"What does CoinPool allow users to do?"},"answer":{"en":"CoinPool allows users to create an LP position with a single token, eliminating the need for direct access and manual operations on sites like Uniswap."}},{"question":{"en":"How do you manage Liquidity Positions (LPs)?"},"answer":{"en":"You can manage your LP position directly using the KEYRING PRO app. Since your LP NFT is linked to your wallet, CoinPool only provides smooth access to manage your position but does not hold or control your assets."}},{"question":{"en":"Why Should I Use the ‘High APR Pairs’ Feature?"},"answer":{"en":"The ‘High APR Pairs’ feature helps users quickly add liquidity to high-yield pools without needing to create a new pair, streamlining the liquidity provision process. Notice: Always select pairs from verified and reliable creators to ensure the best security and returns."}},{"question":{"en":"What is the Earnings Overview Dashboard?"},"answer":{"en":"The Earnings Overview Dashboard provides a clear summary of your liquidity value and earnings from providing liquidity, along with the average APR. It also allows you to view other users’ LP earnings and follow their strategies for insight and inspiration."}},{"question":{"en":"What tokens can I use to add liquidity?"},"answer":{"en":"CoinPool supports ETH. Users can use any of these assets, and CoinPool will automatically swap them into the required token pairs for liquidity provision."}},{"question":{"en":"How does CoinPool simplify liquidity provision?"},"answer":{"en":"Instead of manually swapping and balancing tokens, CoinPool automates the entire process. Users can simply deposit a single asset, and CoinPool will convert, balance, and provide liquidity in the selected pool, prioritizing those with the best APRs."}},{"question":{"en":"Can I create my own liquidity pool?"},"answer":{"en":"Yes! CoinPool allows users to create custom liquidity pools instead of joining existing ones. Users can also invite others to contribute liquidity to their pools."}},{"question":{"en":"How do I earn from providing liquidity?"},"answer":{"en":"Liquidity providers earn a share of trading fees generated by the pool.\\nTrading volume of the pool – Higher activity means more fees.\\nYour liquidity share – The more you contribute, the more you earn.\\nFee tier selection – Pools with higher fee tiers may generate higher earnings but attract fewer trades."}},{"question":{"en":"How do I choose the right fee tier when adding liquidity?"},"answer":{"en":"0.01% → Best for stablecoin pairs (e.g., USDT/USDC).\\n0.05% → Best for low-volatility tokens.\\n0.3% (Default) → Best for most trading pairs.\\n1% → Best for high-volatility, low-liquidity pairs.\\nIf unsure, check existing pools to see the most commonly used fee rate."}},{"question":{"en":"Can I lose money by providing liquidity?"},"answer":{"en":"Yes, the biggest risk is impermanent loss, which happens when token prices change significantly after you deposit them. However, this loss can be offset by the trading fees earned from the pool."}},{"question":{"en":"What happens if my liquidity goes out of range?"},"answer":{"en":"If you provide liquidity within a specific price range (Uniswap V3 model), your position can become inactive when the market price moves beyond your set range.\\nYou stop earning fees.\\nYour balance shifts toward one of the two tokens in the pair.\\nTo reactivate, you need to remove and re-add liquidity at a new range."}},{"question":{"en":"What is the difference between \'Collect Profit\' and \'Delete the Pair and Collect Profit\'?"},"answer":{"en":"\'Collect Profit\' – Withdraw only profit.\\n\'Delete the Pair and Collect Profit\' – Withdraw both initial liquidity and profit."}},{"question":{"en":"What is the URL of the CoinPool website?"},"answer":{"en":"The official website URL is https://coinpool.app/"}},{"question":{"en":"Where can I find pools with high volume-to-liquidity ratio?"},"answer":{"en":"You can find pools with a high volume-to-liquidity ratio on this page: https://coinpool.app/pool-ranking"}},{"question":{"en":"Where can I see my earnings or liquidity profits?"},"answer":{"en":"You can track your earnings and liquidity performance here: https://coinpool.app/earnings-overview"}},{"question":{"en":"Where can I view my NFT pools?"},"answer":{"en":"You can check your NFT pools on this page:https://coinpool.app/my-liquidity"}},{"question":{"en":"Where can I create or choose a pair to create a pool?"},"answer":{"en":"You can create or choose a pair to create a pool here: https://coinpool.app/pair"}},{"question":{"en":"What are CoinPool fee tiers?"},"answer":{"en":"0.01% - Used for highly stable pairs like stablecoin-to-stablecoin.\\n0.05% - Used for relatively stable pairs such as ETH/stETH.\\n0.3% - Used for most standard trading pairs.\\n1% - Used for minor or highly volatile pairs, such as meme coins."}},{"question":{"en":"What does the Min value mean when providing liquidity?"},"answer":{"en":"Min is the lowest price of Token A in terms of Token B at which you are willing to provide liquidity.If the price drops below this level, your liquidity will not be used in the pool. This helps protect your assets from excessive price drops.\\nExample: You create an ETH/USDC pair and set Min = 2000 USDC/ETH. If ETH\'s price falls below 2000 USDC, your liquidity will no longer be used."}},{"question":{"en":"What does the Max value mean when providing liquidity?"},"answer":{"en":"Max is the highest price of Token A in terms of Token B at which you are willing to provide liquidity. If the market price of Token A exceeds this limit, your liquidity will not be used for transactions. The main purpose of setting a Max value is to protect your liquidity from excessive price fluctuations. \\nExample: You create an ETH/USDC pair and set Max = 4000 USDC/ETH. If ETH\'s price rises above 4000 USDC, your liquidity will no longer be used for trading."}},{"question":{"en":"When should you choose the 0.01% fee tier when creating a pair?"},"answer":{"en":"0.01% - Best for very stable pairs. \\nSuitable for pairs with extremely low volatility, such as USDT/USDC. \\nThese pairs have almost no price fluctuation risk, so a low fee attracts more traders. \\nIdeal for those who want to provide liquidity long-term with stable returns."}},{"question":{"en":"When should you choose the 0.05% fee tier when creating a pair?"},"answer":{"en":"0.05% - Best for stable pairs.\\nWorks well for stablecoin pairs or low volatility pairs like ETH/stETH.\\nOffers a reasonable fee higher than 0.01% while still attracting traders.\\nA great choice for liquidity providers seeking earnings while maintaining low fees to encourage trading."}},{"question":{"en":"When should you choose the 0.3% fee tier when creating a pair?"},"answer":{"en":"0.3% - Best for most pairs.\\nThe standard fee for most trading pairs, including popular ones like ETH/USDC, BTC/ETH.\\nSuitable for high-liquidity pairs with some level of price fluctuation.\\nA balanced choice for liquidity providers who want both trading volume and fee income."}},{"question":{"en":"When should you choose the 1% fee tier when creating a pair?"},"answer":{"en":"1% - Best for exotic pairs. \\nDesigned for low-liquidity or highly volatile trading pairs, such as new or lesser-known tokens.\\nSince these pairs have higher risks, the high fee compensates liquidity providers.\\nA good choice if you are providing liquidity for new tokens and want to earn higher fees."}},{"question":{"en":"Would you like to add more liquidity to this position?"},"answer":{"en":"Select an existing liquidity pair to add more liquidity and increase your potential rewards.\\nYour liquidity will be locked in the pool until you decide to withdraw.\\nAdding liquidity may affect trading fees and rewards earned from swaps in the pool."}},{"question":{"en":"When can I collect earnings in CoinPool?"},"answer":{"en":"You can withdraw your accumulated rewards from the liquidity pool at any time. Collected rewards will be sent directly to your connected wallet."}},{"question":{"en":"Delete your liquidity & collect liquidity and earnings"},"answer":{"en":"This option allows you to withdraw both your initial liquidity and any earned rewards. Once removed, your liquidity will no longer participate in earning trading fees. This action does not burn your NFT, so you can reuse it later if needed."}},{"question":{"en":"What is the Repositioning feature and when should you use it?"},"answer":{"en":"When your liquidity position goes out of range, you can use the Repositioning feature to reconfigure the pair by setting your preferred Max Price and Min Price.\\nA wider price range provides more stable but lower fee income, while a narrower range can increase your potential returns.\\nf you want to adjust your position and narrow your range to boost fee earnings, please use this feature.\\nPlease note that DEX fees will apply each time the pool is reconfigured.\\nUncollected earnings are not added to liquidity but are returned to your wallet."}},{"question":{"en":"How does the auto-repositioning BOT work in CoinPool?"},"answer":{"en":"You can set the BOT to automatically reposition your liquidity pool whenever it goes out of range. When your pool’s liquidity falls outside the preset range, the BOT will automatically reconfigure the pool. Once automatic positioning is enabled, the BOT will continue to reposition based on the same settings until you manually stop it. \\nThis significantly reduces the time your liquidity stays outside the range, helping to maximize your potential fee income. The BOT does not operate in real time — it checks positions once every hour, and repositioning may occasionally fail. Please note that DEX fees apply for each automatic reconfiguration. Frequent reconfigurations may lead to net fee losses. Uncollected earnings are not added to liquidity but are returned to your wallet."}},{"question":{"en":"What is NFT burning?"},"answer":{"en":"Burning an NFT means permanently removing the NFT that represents your liquidity position. Once burned, the NFT cannot be restored, and all associated benefits will be lost. Only burn if you are sure you no longer need the NFT and have already withdrawn all liquidity."}},{"question":{"en":"When is the data updated?"},"answer":{"en":"Data is aggregated and updated at 00:00 UTC.\\nStarting from 23:00 UTC, LP token data is sequentially retrieved from the blockchain. The displayed values are then calculated based on the rates at 00:00 UTC. Please note that discrepancies may occur between the figures shown in the earnings overview and the actual values. The figures presented in the earnings summary are for reference only."}},{"question":{"en":"How can I view and manage my purchased token packages?"},"answer":{"en":"View your purchased token packages here \'https://coinpool.app/package\'. Each package is stored in a Token Bound Account (TBA), where you can easily check the included tokens and their asset value.\\nYou can unpack your package, the unpacked tokens will be sent to your connected wallet. Or you can unpack&Swap USDC, all tokens in your package will be swapped to USDC and sent to your connected wallet."}},{"question":{"en":"Can I create a custom token package?"},"answer":{"en":"You can create a custom package tailored to your investment preferences."}},{"question":{"en":"Token Bound Account 6551 (TBA)"},"answer":{"en":"A Token Bound Account (TBA), defined by the ERC-6551 Ethereum standard, is a smart contract wallet linked to an ERC-721 NFT. Your token package is securely stored in a TBA, which you can manage effortlessly through your account."}},{"question":{"en":"Which company developed the CoinPool website?"},"answer":{"en":"CoinPool is a platform developed by Bacoor Company in 2025"}},{"question":{"en":"How can I find the highest APR pair to start providing liquidity on this site?"},"answer":{"en":"Sorted by the highest APR, you can easily find the most suitable liquidity pool and start providing liquidity on this site!"}},{"question":{"en":"What is the purpose of the pair list section?"},"answer":{"en":"This section displays token pairs created by all this site\'s members.\\n• You can select a pair and add liquidity without creating a new one.\\n• Before adding liquidity, check details such as volume, APR, and current liquidity."}},{"question":{"en":"What is Buy Package on CoinPool?"},"answer":{"en":"Buy Package is a CoinPool feature that lets users purchase multiple tokens in one transaction and store them in a Smart Contract wallet (NFT TBA - ERC-6551). simply select your tokens and pay with ETH."}},{"question":{"en":"How to Buy Package on CoinPool?"},"answer":{"en":"Please check the guide here: https://coinpool.app/top?tab=buypack"}},{"question":{"en":"How To Unpack To Your Wallet on CoinPool?"},"answer":{"en":"Please check the guide here: https://coinpool.app/top?tab=buypack"}},{"question":{"en":"Why do I need to register my Solana Wallet?"},"answer":{"en":"CoinPool automatically recognizes your EVM-compatible wallet addresses.\\nSince Solana operates outside the EVM ecosystem, you must manually register your Solana address with CoinPool.\\nTo use CoinPool features on Solana-such as tracking and adding liquidity-you must also connect your Solana wallet.\\nOnce registered, this address cannot be changed."}},{"question":{"en":"What should I consider on the Pair Selection Screen before providing liquidity?"},"answer":{"en":"On the \'Select Pair\' screen, you\'ll see the total market cap and 24-hour trading volume for each cryptocurrency. The more rocket symbols, the more actively the asset is traded.\\n\\nEach trading pair also displays the available liquidity range and associated fees. Generally, higher fees suggest smaller or more volatile coins — offering higher potential returns, but also higher risk.\\nPlease check the guide here: https://coinpool.app/top?tab=pool"}},{"question":{"en":"Why should I use CoinPool?"},"answer":{"en":"CoinPool streamlines liquidity provision by removing the usual friction of manual swaps and asset balancing. Everything is handled in a single flow, allowing you to participate in high-APR pools more efficiently. With just one asset (such as ETH), CoinPool automatically performs the necessary swaps, balances the pair, and creates an optimized liquidity position on your behalf. It also surfaces high-performing pools, helping you identify better yield opportunities without the need for constant tracking.\\nKey Benefits\\nOptimized APR Selection: Prioritizes high-yield pools to help maximize returns.\\nStreamlined Liquidity Provision: Eliminates manual swaps and rebalancing steps.\\nSeamless Passive Income: Deposit a single asset, and CoinPool manages the rest automatically."}},{"question":{"en":"Is Coinpool Safe?"},"answer":{"en":"CoinPool operates as a non-custodial, interface-only service, meaning you remain in full control of your assets at all times.It does not take custody of funds, store private keys or seed phrases, or manage user wallets. CoinPool also does not deploy or control liquidity pools, bridges, or smart contracts. All transactions are executed directly on public blockchains and must be authorized and signed by your own wallet. Once confirmed on-chain, transactions are final and cannot be reversed.All transactions are executed directly on public blockchains and must be authorized and signed by your own wallet. Once confirmed on-chain, transactions are final and cannot be reversed. As a result, CoinPool does not have the ability to cancel, modify, recover, or refund any transaction or digital asset."}},{"question":{"en":"Is Coinpool Easy to use?"},"answer":{"en":"Ease of use can vary depending on the user, but overall feedback has been positive. Many users find CoinPool intuitive and straightforward to navigate. The interface is clean and well-structured, with clearly organized sections. Each feature includes simple explanations of its purpose, making it easier to understand and use effectively. CoinPool is built with users in mind, and the experience is continuously refined to make interactions as smooth and accessible as possible."}},{"question":{"en":"What is a Sub-Account"},"answer":{"en":"A sub-account is an additional account designed for operational use, allowing activities to be managed from a separate wallet address while remaining under the control of a main account.\\nUnlike a regular wallet, a sub-account is a smart contract address with no private key. It operates based on predefined rules, and only the main account (owner address) has the authority to transfer its assets. No other address can move funds from a sub-account.\\nMain Account (Owner Address)\\nThe primary wallet that has full control, including managing all sub-accounts and their assets.\\nSub-Account\\nA smart contract-based account created by the owner for operational purposes, without its own private key.\\nOperation Address\\nA separate wallet address assigned by the owner to perform operational actions for specific sub-accounts. This address is limited to operations only and cannot transfer assets. It must be a newly created wallet used exclusively for this purpose."}},{"question":{"en":"Why should I create Sub-Account"},"answer":{"en":"A sub-account allows you to entrust liquidity management to a more experienced operator, helping streamline decisions like pool selection and liquidity provision.\\nThis can save time and reduce the need for in-depth research, as operational tasks are handled on your behalf. It’s especially useful for users who prefer a more hands-off approach.\\nAt the same time, you remain in control. You decide how much capital is allocated to the sub-account, allowing you to manage risk while optimizing potential returns.\\nHowever, this setup requires trust, as you are choosing to assign control over operations to an operator."}},{"question":{"en":"What is Operators"},"answer":{"en":"Operators are trusted parties authorized by the user to manage certain activities on their behalf, such as adding liquidity to pools and optimizing yield strategies.\\nThey act through an Operation Address, which is a wallet designated by the owner to handle sub-account operations.\\nOperation-Only Account (Operation Address)\\nThis is a specific wallet assigned by the owner to manage sub-accounts. It is limited to operational tasks, such as pool configuration and swaps, and cannot transfer or withdraw assets."}},{"question":{"en":"Can Operators access my assets?"},"answer":{"en":"No. Operators cannot access or take control of your funds.\\nWhen you deposit assets, they are stored in your sub-account (a smart contract). Operators can use those assets only to perform approved actions, such as adding liquidity to pools.\\nAny LP tokens received are also held within the sub-account. Operators are only able to return assets and LP tokens back to your main wallet—they cannot withdraw them to their own wallet or any other address."}},{"question":{"en":"Can I stop using operator and Sub-Account?"},"answer":{"en":"Yes. You cannot delete a sub‑account in CoinPool, but you can withdraw all funds from it.\\nOperators can only use the money you put into the sub‑account. They cannot add funds themselves. You always keep full control and can withdraw anytime.\\nHow to stop: Move all funds back to your main account. When the balance is zero, the sub‑account still exists but has no assets, so the operator cannot use it."}},{"question":{"en":"Can I trust Operator?"},"answer":{"en":"Using an operator requires a level of trust, as they are authorized to perform actions on your sub-account. The relationship between you and the operator is entirely your own decision and responsibility. It is important to only assign operators you trust, as this is a private arrangement between both parties."}},{"question":{"en":"Why Do Operators Exist? What Do They Gain?"},"answer":{"en":"Operators are typically experienced users who are familiar with liquidity strategies and want to help others manage their positions more effectively.\\nIn return, they can earn a commission based on the profits generated from the sub-account they manage. This creates a shared incentive—when you earn, they earn—aligning both sides toward better performance.\\nA portion of the LP fees generated from sub-account operations can be allocated to the operator. This percentage is fully controlled by the main account owner and can be set anywhere from 0% to 100%.\\nThe rewards are sent to the operator’s designated operation-only account, which can then distribute these earnings to other wallet addresses if needed."}},{"question":{"en":"Can I manage my Sub-Account without an Operator?"},"answer":{"en":"No. A sub-account can only be created with an assigned operator, and all operational activities are managed by that operator.\\nAs the owner, your role is to provide capital for the sub-account, which the operator can then use for liquidity operations. You remain in control of your funds and can withdraw your assets at any time."}},{"question":{"en":"Does CoinPool use Third-party service?"},"answer":{"en":"Yes. CoinPool integrates with well-established third-party DeFi protocols that are widely used and trusted within the industry.\\nThese include, but are not limited to:\\nUniswap for liquidity provision, LP position management, and fee generation.\\ndeBridge & Relay for cross-chain swaps and asset bridging. These protocols operate independently and are not owned or controlled by CoinPool.\\nAll liquidity, swapping, and bridging activities are executed directly through the smart contracts of these third-party protocols, and are governed solely by their respective rules.\\nCoinPool does not act as a counterparty to any transaction, and does not audit, insure, or guarantee the security or performance of these external services."}},{"question":{"en":"Why Should I Become a Liquidity Provider?"},"answer":{"en":"Becoming a liquidity provider (LP) allows you to earn passive income by supplying tokens to liquidity pools and supporting decentralized trading.\\nKey Benefits\\nEarn Trading Fees: Receive a share of fees generated from every swap in the pool.\\nImproved Capital Efficiency: Your assets remain actively utilized, generating returns over time.\\nAdditionalYieldOpportunities: Some pools offer extra rewards, such as governance tokens.\\nDecentralized & Permissionless: Participate freely without relying on intermediaries.\\nGrowing Asset Exposure: Your token balances can increase over time as liquidity is utilized."}},{"question":{"en":"Can CoinPool Refund My Assets If I Incur Losses?"},"answer":{"en":"No. CoinPool cannot refund or recover any assets.\\nDue to its non-custodial and decentralized nature:\\nAll transactions are final once executed on-chain\\nNo refunds are available under any circumstances\\nFunds cannot be recovered or replaced\\nCoinPool cannot intervene in or override the behavior of third-party protocols"}},{"question":{"en":"Can CoinPool Guarantee Profits?"},"answer":{"en":"No. CoinPool cannot guarantee profits.\\nThe crypto market is inherently volatile, and even experienced participants can face both gains and losses. While CoinPool helps streamline access to liquidity strategies, outcomes ultimately depend on market conditions and individual decisions.\\nUsing sub-accounts with experienced operators may help improve efficiency, but it’s still important to do your own research and understand the risks involved."}},{"question":{"en":"Who Is Responsible If I Incur Losses?"},"answer":{"en":"All decisions—whether it’s providing liquidity, creating a sub-account, or selecting an operator—are made by you. Even if an operator does not generate profits, it remains your responsibility as you chose to assign them.\\nTo use CoinPool, you must:\\nBe at least 18 years old\\nHave the legal capacity to enter into binding agreements\\nBy using CoinPool, you confirm that you meet these requirements and that your actions comply with all applicable laws and regulations."}},{"question":{"en":"What assets are supported on CoinPool?"},"answer":{"en":"CoinPool supports a wide range of assets across EVM-compatible chains and Solana.\\nYou can also add custom assets to create liquidity pools, as long as they belong to supported networks."}},{"question":{"en":"Can I withdraw my funds at any time?"},"answer":{"en":"Yes. You can withdraw your funds at any time.\\nCoinPool is a non-custodial platform, meaning you retain full control of your assets. You can remove liquidity, withdraw funds to your wallet, or manage your positions freely at any time."}},{"question":{"en":"Are there any fees when using CoinPool?"},"answer":{"en":"Yes, there are a few fees to consider:\\nSub-Account Creation Fee: A one-time fee required to create a sub-account, depending on the network:\\nEthereum: 0.01 ETH\\nOptimism: 0.01 ETH\\nArbitrum: 0.01 ETH\\nBase: 0.01 ETH\\nBinance Smart Chain: 0.03 BNB\\nUnichain: 0.01 ETH\\nOperator Commission: A percentage of profits shared with the operator when gains are realized.\\nThis rate is fully configurable and based on a private agreement between you and the operator."}},{"question":{"en":"Can I track the performance of my liquidity positions?"},"answer":{"en":"Yes. CoinPool provides dedicated sections such as Earning Overview and My Liquidity, allowing you to monitor performance in detail.\\nYou can track your own positions and also view the performance of other addresses for additional insights."}},{"question":{"en":"Why can\'t I set up bots in My Liquidity?"},"answer":{"en":"Users need to create the two bots by clicking the “Create Bots” button in the My Liquidity section.\\nOnly after creating the bots can you proceed with the setup."}},{"question":{"en":"How I create pairs or add pools on Unichain network?"},"answer":{"en":"Coinpool supports many networks, including Unichain, so you can create pairs and add pools there."}},{"question":{"en":"Please provide information on some high-yield pools on Unichain network."},"answer":{"en":"Currently, querying information on the Unichain network is not supported here."}},{"question":{"en":"How I create pairs or add pools on Solana network?"},"answer":{"en":"Coinpool supports many networks, including Solana, so you can create pairs and add pools there."}},{"question":{"en":"Please provide information on some high-yield pools on Solana network."},"answer":{"en":"Currently, querying information on the Solana network is not supported here."}},{"question":{"en":"Please show my liquidity."},"answer":{"en":"Please check your liquidity at https://coinpool.app/my-liquidity"}}]')},b={"keyring-chatbot-agent-sdk-test":{name:"keyring-chatbot-agent-sdk-test",webAppUrl:"https://nft-demo.keyring.app",isPackageTest:!0,apiExternal:{baseUrl:"https://api.coinpool.app",keyringPool:"https://pool-data.keyring.app"}},"keyring-chatbot-coinpool-test":{name:"keyring-chatbot-coinpool-test",webAppUrl:"https://nft.keyring.app",faqUrl:"https://api.coinpool.app/faq",faqInternal:y,linkViewNft:"https://nft.keyring.app",linkAddLiquidity:"https://coinpool.app/pair/create",modal:{title:"COINPOOL Agent",icon:"https://coinpool.app/favicon.ico"},apiExternal:{baseUrl:"https://api.coinpool.app",keyringPool:"https://pool-data.keyring.app"}},"keyring-chatbot-coinpool":{name:"keyring-chatbot-coinpool",webAppUrl:"https://nft.keyring.app",faqUrl:"https://api.coinpool.app/faq",faqInternal:y,linkViewNft:"https://nft.keyring.app",linkAddLiquidity:"https://coinpool.app/pair/create",modal:{title:"COINPOOL Agent",icon:"https://coinpool.app/favicon.ico"},apiExternal:{baseUrl:"https://api.coinpool.app",keyringPool:"https://pool-data.keyring.app"}},"keyring-chatbot-agent":{name:"keyring-chatbot-agent",webAppUrl:"https://nft.keyring.app",apiExternal:{baseUrl:"https://api.coinpool.app",keyringPool:"https://pool-data.keyring.app"}}},v=["https://nft-demo.keyring.app","https://nft.keyring.app","https://coinpool.app","https://coinpool-op.bacoor-test001.xyz","https://dev2-coinpool-op.bacoor-test001.xyz","https://rwa.bacoor-test001.xyz","https://test.coinpool.app"],A=/^tuple(?<array>(\[(\d*)\])*)$/;function k(e){let t=e.type;if(A.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let o=0;o<n;o++)t+=k(e.components[o]),o<n-1&&(t+=", ");const r=function(e,t){const n=e.exec(t);return n?.groups}(A,e.type);return t+=`)${r?.array||""}`,k({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function T(e){let t="";const n=e.length;for(let r=0;r<n;r++)t+=k(e[r]),r!==n-1&&(t+=", ");return t}function E(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new q(e.type);return`${e.name}(${x(e.inputs,{includeName:t})})`}function x(e,{includeName:t=!1}={}){return e?e.map(e=>function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${x(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t})).join(t?", ":","):""}function C(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}function I(e){return C(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const S="2.47.0";let N=`viem@${S}`;class B extends Error{constructor(e,t={}){const n=t.cause instanceof B?t.cause.details:t.cause?.message?t.cause.message:t.details,r=t.cause instanceof B&&t.cause.docsPath||t.docsPath,o=(({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0)?.({...t,docsPath:r});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...n?[`Details: ${n}`]:[],...N?[`Version: ${N}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=r,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=S}walk(e){return M(this,e)}}function M(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e&&void 0!==e.cause?M(e.cause,t):t?null:e}class P extends B{constructor({expectedLength:e,givenLength:t,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n"),{name:"AbiEncodingArrayLengthMismatchError"})}}class O extends B{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${I(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class R extends B{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n"),{name:"AbiEncodingLengthMismatchError"})}}class U extends B{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,name:"AbiFunctionNotFoundError"})}}class L extends B{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${E(e.abiItem)}\`, and`,`\`${t.type}\` in \`${E(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class D extends B{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t,name:"InvalidAbiEncodingType"})}}class F extends B{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n"),{name:"InvalidArrayError"})}}class q extends B{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n"),{name:"InvalidDefinitionTypeError"})}}class H extends B{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class V extends B{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function W(e,{dir:t,size:n=32}={}){return"string"==typeof e?j(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new V({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let o=0;o<n;o++){const i="right"===t;r[i?o:n-o-1]=e[i?o:e.length-o-1]}return r}(e,{dir:t,size:n})}function j(e,{dir:t,size:n=32}={}){if(null===n)return e;const r=e.replace("0x","");if(r.length>2*n)throw new V({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r["right"===t?"padEnd":"padStart"](2*n,"0")}`}class Y extends B{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})`}`,{name:"IntegerOutOfRangeError"})}}class z extends B{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function G(e,{dir:t="left"}={}){let n="string"==typeof e?e.replace("0x",""):e,r=0;for(let o=0;o<n.length-1&&"0"===n["left"===t?o:n.length-o-1].toString();o++)r++;return n="left"===t?n.slice(r):n.slice(0,n.length-r),"string"==typeof e?(1===n.length&&"right"===t&&(n=`${n}0`),`0x${n.length%2==1?`0${n}`:n}`):n}function J(e,{size:t}){if(I(e)>t)throw new z({givenSize:I(e),maxSize:t})}function X(e,t={}){const{signed:n}=t;t.size&&J(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 K(e,t={}){const n=X(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new Y({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return r}const Q=/* @__PURE__ */Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Z(e,t={}){return"number"==typeof e||"bigint"==typeof e?ee(e,t):"string"==typeof e?ne(e,t):"boolean"==typeof e?_(e,t):$(e,t)}function _(e,t={}){const n=`0x${Number(e)}`;return"number"==typeof t.size?(J(n,{size:t.size}),W(n,{size:t.size})):n}function $(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=Q[e[o]];const r=`0x${n}`;return"number"==typeof t.size?(J(r,{size:t.size}),W(r,{dir:"right",size:t.size})):r}function ee(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let i;r?i=n?(1n<<8n*BigInt(r)-1n)-1n:2n**(8n*BigInt(r))-1n:"number"==typeof e&&(i=BigInt(Number.MAX_SAFE_INTEGER));const a="bigint"==typeof i&&n?-i-1n:0;if(i&&o>i||o<a){const t="bigint"==typeof e?"n":"";throw new Y({max:i?`${i}${t}`:void 0,min:`${a}${t}`,signed:n,size:r,value:`${e}${t}`})}const s=`0x${(n&&o<0?(1n<<BigInt(8*r))+BigInt(o):o).toString(16)}`;return r?W(s,{size:r}):s}const te=/* @__PURE__ */new TextEncoder;function ne(e,t={}){return $(te.encode(e),t)}const re=/* @__PURE__ */new TextEncoder;function oe(e,t={}){return"number"==typeof e||"bigint"==typeof e?function(e,t){return se(ee(e,t))}(e,t):"boolean"==typeof e?function(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),"number"==typeof t.size?(J(n,{size:t.size}),W(n,{size:t.size})):n}(e,t):C(e)?se(e,t):ce(e,t)}const ie={zero:48,nine:57,A:65,F:70,a:97,f:102};function ae(e){return e>=ie.zero&&e<=ie.nine?e-ie.zero:e>=ie.A&&e<=ie.F?e-(ie.A-10):e>=ie.a&&e<=ie.f?e-(ie.a-10):void 0}function se(e,t={}){let n=e;t.size&&(J(n,{size:t.size}),n=W(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const o=r.length/2,i=new Uint8Array(o);for(let a=0,s=0;a<o;a++){const e=ae(r.charCodeAt(s++)),t=ae(r.charCodeAt(s++));if(void 0===e||void 0===t)throw new B(`Invalid byte sequence ("${r[s-2]}${r[s-1]}" in "${r}").`);i[a]=16*e+t}return i}function ce(e,t={}){const n=re.encode(e);return"number"==typeof t.size?(J(n,{size:t.size}),W(n,{dir:"right",size:t.size})):n}const ue=/* @__PURE__ */BigInt(2**32-1),le=/* @__PURE__ */BigInt(32);function de(e,t=!1){return t?{h:Number(e&ue),l:Number(e>>le&ue)}:{h:0|Number(e>>le&ue),l:0|Number(e&ue)}}function fe(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let i=0;i<n;i++){const{h:n,l:a}=de(e[i],t);[r[i],o[i]]=[n,a]}return[r,o]}const he=(e,t,n)=>e>>>n,pe=(e,t,n)=>e<<32-n|t>>>n,me=(e,t,n)=>e>>>n|t<<32-n,we=(e,t,n)=>e<<32-n|t>>>n,ge=(e,t,n)=>e<<64-n|t>>>n-32,ye=(e,t,n)=>e>>>n-32|t<<64-n;function be(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}}const ve=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Ae=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,ke=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Te=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,Ee=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0),xe=(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0,Ce="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function Ie(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Se(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Ne(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 Be(e,t){Se(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Me(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Pe(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Oe(e,t){return e<<32-t|e>>>t}function Re(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const Ue=/* @__PURE__ */(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])()?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=Re(e[t]);return e};function Le(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}(e)),Se(e),e}class De{}function Fe(e){const t=t=>e().update(Le(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function qe(e=32){if(Ce&&"function"==typeof Ce.getRandomValues)return Ce.getRandomValues(new Uint8Array(e));if(Ce&&"function"==typeof Ce.randomBytes)return Uint8Array.from(Ce.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const He=BigInt(0),Ve=BigInt(1),We=BigInt(2),je=BigInt(7),Ye=BigInt(256),ze=BigInt(113),Ge=[],Je=[],Xe=[];for(let Gp=0,Jp=Ve,Xp=1,Kp=0;Gp<24;Gp++){[Xp,Kp]=[Kp,(2*Xp+3*Kp)%5],Ge.push(2*(5*Kp+Xp)),Je.push((Gp+1)*(Gp+2)/2%64);let e=He;for(let t=0;t<7;t++)Jp=(Jp<<Ve^(Jp>>je)*ze)%Ye,Jp&We&&(e^=Ve<<(Ve<</* @__PURE__ */BigInt(t))-Ve);Xe.push(e)}const Ke=fe(Xe,!0),Qe=Ke[0],Ze=Ke[1],_e=(e,t,n)=>n>32?((e,t,n)=>t<<n-32|e>>>64-n)(e,t,n):((e,t,n)=>e<<n|t>>>32-n)(e,t,n),$e=(e,t,n)=>n>32?((e,t,n)=>e<<n-32|t>>>64-n)(e,t,n):((e,t,n)=>t<<n|e>>>32-n)(e,t,n);class et extends De{constructor(e,t,n,r=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=o,Ie(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");var i;this.state=new Uint8Array(200),this.state32=(i=this.state,new Uint32Array(i.buffer,i.byteOffset,Math.floor(i.byteLength/4)))}clone(){return this.o()}keccak(){Ue(this.state32),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,i=n[o],a=n[o+1],s=_e(i,a,1)^n[t],c=$e(i,a,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=Je[n],i=_e(t,o,r),a=$e(t,o,r),s=Ge[n];t=e[s],o=e[s+1],e[s]=i,e[s+1]=a}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]^=Qe[r],e[1]^=Ze[r]}Me(n)}(this.state32,this.rounds),Ue(this.state32),this.posOut=0,this.pos=0}update(e){Ne(this),Se(e=Le(e));const{blockLen:t,state:n}=this,r=e.length;for(let o=0;o<r;){const i=Math.min(t-this.pos,r-o);for(let t=0;t<i;t++)n[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,128&t&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){Ne(this,!1),Se(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,o=e.length;r<o;){this.posOut>=n&&this.keccak();const i=Math.min(n-this.posOut,o-r);e.set(t.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Ie(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Be(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,Me(this.state)}o(e){const{blockLen:t,suffix:n,outputLen:r,rounds:o,enableXOF:i}=this;return e||(e=new et(t,n,r,i,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=i,e.destroyed=this.destroyed,e}}const tt=/* @__PURE__ */(()=>Fe(()=>new et(136,1,32)))();function nt(e,t){const n=t||"hex",r=tt(C(e,{strict:!1})?oe(e):e);return"bytes"===n?r:Z(r)}function rt(e){return t=function(e){let t=!0,n="",r=0,o="",i=!1;for(let a=0;a<e.length;a++){const s=e[a];if(["(",")",","].includes(s)&&(t=!0),"("===s&&r++,")"===s&&r--,t)if(0!==r)" "!==s?(o+=s,n+=s):","!==e[a-1]&&","!==n&&",("!==n&&(n="",t=!1);else if(" "===s&&["event","function",""].includes(o))o="";else if(o+=s,")"===s){i=!0;break}}if(!i)throw new B("Unable to normalize signature.");return o}("string"==typeof(n=e)?n:"function"===(r=n).type?`function ${r.name}(${T(r.inputs)})${r.stateMutability&&"nonpayable"!==r.stateMutability?` ${r.stateMutability}`:""}${r.outputs?.length?` returns (${T(r.outputs)})`:""}`:"event"===r.type?`event ${r.name}(${T(r.inputs)})`:"error"===r.type?`error ${r.name}(${T(r.inputs)})`:"constructor"===r.type?`constructor(${T(r.inputs)})${"payable"===r.stateMutability?" payable":""}`:"fallback"===r.type?"fallback() external"+("payable"===r.stateMutability?" payable":""):"receive() external payable"),nt(oe(t));var t,n,r}const ot=rt;class it extends B{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class at extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){const e=this.keys().next().value;e&&this.delete(e)}return this}}const st=/* @__PURE__ */new at(8192),ct=/^0x[a-fA-F0-9]{40}$/,ut=/* @__PURE__ */new at(8192);function lt(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(ut.has(r))return ut.get(r);const o=!(!ct.test(e)||e.toLowerCase()!==e&&n&&function(e){if(st.has(`${e}.undefined`))return st.get(`${e}.undefined`);const t=e.substring(2).toLowerCase(),n=nt(ce(t),"bytes"),r=t.split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&r[i]&&(r[i]=r[i].toUpperCase()),(15&n[i>>1])>=8&&r[i+1]&&(r[i+1]=r[i+1].toUpperCase());const o=`0x${r.join("")}`;return st.set(`${e}.undefined`,o),o}(e)!==e);return ut.set(r,o),o}function dt(e){return"string"==typeof e[0]?ft(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 ft(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}function ht(e,t,n,{strict:r}={}){return C(e,{strict:!1})?function(e,t,n,{strict:r}={}){pt(e,t);const o=`0x${e.replace("0x","").slice(2*(t??0),2*(n??e.length))}`;return r&&mt(o,t,n),o}(e,t,n,{strict:r}):function(e,t,n,{strict:r}={}){pt(e,t);const o=e.slice(t,n);return r&&mt(o,t,n),o}(e,t,n,{strict:r})}function pt(e,t){if("number"==typeof t&&t>0&&t>I(e)-1)throw new H({offset:t,position:"start",size:I(e)})}function mt(e,t,n){if("number"==typeof t&&"number"==typeof n&&I(e)!==n-t)throw new H({offset:n,position:"end",size:I(e)})}const wt=/^(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)?$/;function gt(e,t){if(e.length!==t.length)throw new R({expectedLength:e.length,givenLength:t.length});const n=function({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(yt({param:e[r],value:t[r]}));return n}({params:e,values:t}),r=bt(n);return 0===r.length?"0x":r}function yt({param:e,value:t}){const n=function(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}(e.type);if(n){const[r,o]=n;return function(e,{length:t,param:n}){const r=null===t;if(!Array.isArray(e))throw new F(e);if(!r&&e.length!==t)throw new P({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let o=!1;const i=[];for(let a=0;a<e.length;a++){const t=yt({param:n,value:e[a]});t.dynamic&&(o=!0),i.push(t)}if(r||o){const e=bt(i);if(r){const t=ee(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?dt([t,e]):t}}if(o)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:dt(i.map(({encoded:e})=>e))}}(t,{length:r,param:{...e,type:o}})}if("tuple"===e.type)return function(e,{param:t}){let n=!1;const r=[];for(let o=0;o<t.components.length;o++){const i=t.components[o],a=yt({param:i,value:e[Array.isArray(e)?o:i.name]});r.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?bt(r):dt(r.map(({encoded:e})=>e))}}(t,{param:e});if("address"===e.type)return function(e){if(!lt(e))throw new it({address:e});return{dynamic:!1,encoded:j(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){if("boolean"!=typeof e)throw new B(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:j(_(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const n=e.type.startsWith("int"),[,,r="256"]=wt.exec(e.type)??[];return function(e,{signed:t,size:n=256}){if("number"==typeof n){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new Y({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:ee(e,{size:32,signed:t})}}(t,{signed:n,size:Number(r)})}if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,n]=t.type.split("bytes"),r=I(e);if(!n){let t=e;return r%32!=0&&(t=j(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:dt([j(ee(r,{size:32})),t])}}if(r!==Number.parseInt(n,10))throw new O({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:j(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=ne(e),n=Math.ceil(I(t)/32),r=[];for(let o=0;o<n;o++)r.push(j(ht(t,32*o,32*(o+1)),{dir:"right"}));return{dynamic:!0,encoded:dt([j(ee(I(t),{size:32})),...r])}}(t);throw new D(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function bt(e){let t=0;for(let i=0;i<e.length;i++){const{dynamic:n,encoded:r}=e[i];t+=n?32:I(r)}const n=[],r=[];let o=0;for(let i=0;i<e.length;i++){const{dynamic:a,encoded:s}=e[i];a?(n.push(ee(t+o,{size:32})),r.push(s),o+=I(s)):n.push(s)}return dt([...n,...r])}const vt=e=>ht(rt(e),0,4);function At(e,t){const n=typeof e,r=t.type;switch(r){case"address":return lt(e,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:return"tuple"===r&&"components"in t?Object.values(t.components).every((t,r)=>"object"===n&&At(Object.values(e)[r],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(r)?"number"===n||"bigint"===n:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?"string"===n||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)&&Array.isArray(e)&&e.every(e=>At(e,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")}))}}function kt(e,t,n){for(const r in e){const o=e[r],i=t[r];if("tuple"===o.type&&"tuple"===i.type&&"components"in o&&"components"in i)return kt(o.components,i.components,n[r]);const a=[o.type,i.type];if((()=>!(!a.includes("address")||!a.includes("bytes20"))||(a.includes("address")&&a.includes("string")||!(!a.includes("address")||!a.includes("bytes")))&&lt(n[r],{strict:!1}))())return a}}function Tt(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}const Et="/docs/contract/encodeFunctionData";function xt(e){const{args:t}=e,{abi:n,functionName:r}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:function(e){const{abi:t,args:n,functionName:r}=e;let o=t[0];if(r){const e=function(e){const{abi:t,args:n=[],name:r}=e,o=C(r,{strict:!1}),i=t.filter(e=>o?"function"===e.type?vt(e)===r:"event"===e.type&&ot(e)===r:"name"in e&&e.name===r);if(0===i.length)return;if(1===i.length)return i[0];let a;for(const s of i)if("inputs"in s)if(n&&0!==n.length){if(s.inputs&&0!==s.inputs.length&&s.inputs.length===n.length&&n.every((e,t)=>{const n="inputs"in s&&s.inputs[t];return!!n&&At(e,n)})){if(a&&"inputs"in a&&a.inputs){const e=kt(s.inputs,a.inputs,n);if(e)throw new L({abiItem:s,type:e[0]},{abiItem:a,type:e[1]})}a=s}}else if(!s.inputs||0===s.inputs.length)return s;return a||i[0]}({abi:t,args:n,name:r});if(!e)throw new U(r,{docsPath:Et});o=e}if("function"!==o.type)throw new U(void 0,{docsPath:Et});return{abi:[o],functionName:vt(E(o))}}(e),o=n[0];return ft([r,("inputs"in o&&o.inputs?gt(o.inputs,t??[]):void 0)??"0x"])}class Ct extends B{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class It extends B{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class St extends B{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}const Nt={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:/* @__PURE__ */new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new St({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new It({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Ct({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Ct({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this.i();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this.i();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this.i();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this.i();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this.i();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this.i();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},i(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Bt(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Nt);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=/* @__PURE__ */new Map,n.recursiveReadLimit=t,n}const Mt={gwei:9,wei:18},Pt={ether:-9,wei:9};function Ot(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,i]=[n.slice(0,n.length-t),n.slice(n.length-t)];return i=i.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${i?`.${i}`:""}`}function Rt(e,t="wei"){return Ot(e,Mt[t])}function Ut(e,t="wei"){return Ot(e,Pt[t])}function Lt(e){return e.reduce((e,{slot:t,value:n})=>`${e} ${t}: ${n}\n`,"")}function Dt(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 Ft extends B{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class qt extends B{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Dt(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class Ht extends B{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class Vt extends B{constructor(e,{account:t,docsPath:n,chain:r,data:o,gas:i,gasPrice:a,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:d,stateOverride:f}){const h=t?Tt(t):void 0;let p=Dt({from:h?.address,to:l,value:void 0!==d&&`${Rt(d)} ${r?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:i,gasPrice:void 0!==a&&`${Ut(a)} gwei`,maxFeePerGas:void 0!==s&&`${Ut(s)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${Ut(c)} gwei`,nonce:u});f&&(p+=`\n${function(e){return e.reduce((e,{address:t,...n})=>{let r=`${e} ${t}:\n`;return n.nonce&&(r+=` nonce: ${n.nonce}\n`),n.balance&&(r+=` balance: ${n.balance}\n`),n.code&&(r+=` code: ${n.code}\n`),n.state&&(r+=" state:\n",r+=Lt(n.state)),n.stateDiff&&(r+=" stateDiff:\n",r+=Lt(n.stateDiff)),r}," State Override:\n").slice(0,-1)}(f)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",p].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}function Wt(e,t="hex"){const n=jt(e),r=Bt(new Uint8Array(n.length));return n.encode(r),"hex"===t?$(r.bytes):r.bytes}function jt(e){return Array.isArray(e)?function(e){const t=e.reduce((e,t)=>e+t.length,0),n=Yt(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),1===n?r.pushUint8(t):2===n?r.pushUint16(t):3===n?r.pushUint24(t):r.pushUint32(t));for(const{encode:t}of e)t(r)}}}(e.map(e=>jt(e))):function(e){const t="string"==typeof e?se(e):e,n=Yt(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function Yt(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new B("Length is too large.")}class zt extends B{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,name:"ExecutionRevertedError"})}}Object.defineProperty(zt,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(zt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class Gt extends B{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${Ut(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(Gt,"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 Jt extends B{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${Ut(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(Jt,"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 Xt extends B{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(Xt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Kt extends B{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,name:"NonceTooLowError"})}}Object.defineProperty(Kt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class Qt extends B{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(Qt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Zt extends B{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."],name:"InsufficientFundsError"})}}Object.defineProperty(Zt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class _t extends B{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(_t,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class $t extends B{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty($t,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class en extends B{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(en,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class tn extends B{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${Ut(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${Ut(n)} gwei`:""}).`].join("\n"),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(tn,"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 nn extends B{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}function rn(e,{format:t}){if(!t)return{};const n={};return function t(r){const o=Object.keys(r);for(const i of o)i in e&&(n[i]=e[i]),r[i]&&"object"==typeof r[i]&&!Array.isArray(r[i])&&t(r[i])}(t(e||{})),n}function on(e,t){return({exclude:n,format:r})=>({exclude:n,format:(e,o)=>{const i=t(e,o);if(n)for(const t of n)delete i[t];return{...i,...r(e,o)}},type:e})}const an={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function sn(e,t){const n={};return void 0!==e.authorizationList&&(n.authorizationList=e.authorizationList.map(e=>({address:e.address,r:e.r?ee(BigInt(e.r)):e.r,s:e.s?ee(BigInt(e.s)):e.s,chainId:ee(e.chainId),nonce:ee(e.nonce),...void 0!==e.yParity?{yParity:ee(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:ee(e.v)}:{}}))),void 0!==e.accessList&&(n.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(n.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?n.blobs=e.blobs.map(e=>$(e)):n.blobs=e.blobs),void 0!==e.data&&(n.data=e.data),e.account&&(n.from=e.account.address),void 0!==e.from&&(n.from=e.from),void 0!==e.gas&&(n.gas=ee(e.gas)),void 0!==e.gasPrice&&(n.gasPrice=ee(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(n.maxFeePerBlobGas=ee(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(n.maxFeePerGas=ee(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=ee(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(n.nonce=ee(e.nonce)),void 0!==e.to&&(n.to=e.to),void 0!==e.type&&(n.type=an[e.type]),void 0!==e.value&&(n.value=ee(e.value)),n}const cn=2n**256n-1n,un={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function ln(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?K(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?K(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?un[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof n.v){if(0n===n.v||27n===n.v)return 0;if(1n===n.v||28n===n.v)return 1;if(n.v>=35n)return n.v%2n==0n?1:0}})(),"legacy"===n.type&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),"eip2930"===n.type&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),"eip1559"===n.type&&delete n.maxFeePerBlobGas,n}const dn=/* @__PURE__ */on("transaction",ln);function fn(e,t){const n=(e.transactions??[]).map(e=>"string"==typeof e?e:ln(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const hn=/* @__PURE__ */on("block",fn);function pn(e){const{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>se(e)):e.blobs,o=[];for(const i of r)o.push(Uint8Array.from(t.blobToKzgCommitment(i)));return"bytes"===n?o:o.map(e=>$(e))}function mn(e){const{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>se(e)):e.blobs,o="string"==typeof e.commitments[0]?e.commitments.map(e=>se(e)):e.commitments,i=[];for(let a=0;a<r.length;a++){const e=r[a],n=o[a];i.push(Uint8Array.from(t.computeBlobKzgProof(e,n)))}return"bytes"===n?i:i.map(e=>$(e))}function wn(e,t,n){return e&t^~e&n}function gn(e,t,n){return e&t^e&n^t&n}class yn extends De{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=Pe(this.buffer)}update(e){Ne(this),Se(e=Le(e));const{view:t,buffer:n,blockLen:r}=this,o=e.length;for(let i=0;i<o;){const a=Math.min(r-this.pos,o-i);if(a===r){const t=Pe(e);for(;r<=o-i;i+=r)this.process(t,i);continue}n.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ne(this),Be(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:o}=this;let{pos:i}=this;t[i++]=128,Me(this.buffer.subarray(i)),this.padOffset>r-i&&(this.process(n,0),i=0);for(let l=i;l<r;l++)t[l]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),a=Number(n>>o&i),s=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,a,r),e.setUint32(t+u,s,r)}(n,r-8,BigInt(8*this.length),o),this.process(n,0);const a=Pe(e),s=this.outputLen;if(s%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=s/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<c;l++)a.setUint32(4*l,u[l],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}o(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:o,destroyed:i,pos:a}=this;return e.destroyed=i,e.finished=o,e.length=r,e.pos=a,r%t&&e.buffer.set(n),e}clone(){return this.o()}}const bn=/* @__PURE__ */Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),vn=/* @__PURE__ */Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),An=/* @__PURE__ */Uint32Array.from([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]),kn=/* @__PURE__ */new Uint32Array(64);class Tn extends yn{constructor(e=32){super(64,e,8,!1),this.A=0|bn[0],this.B=0|bn[1],this.C=0|bn[2],this.D=0|bn[3],this.E=0|bn[4],this.F=0|bn[5],this.G=0|bn[6],this.H=0|bn[7]}get(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:a,H:s}=this;return[e,t,n,r,o,i,a,s]}set(e,t,n,r,o,i,a,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|a,this.H=0|s}process(e,t){for(let l=0;l<16;l++,t+=4)kn[l]=e.getUint32(t,!1);for(let l=16;l<64;l++){const e=kn[l-15],t=kn[l-2],n=Oe(e,7)^Oe(e,18)^e>>>3,r=Oe(t,17)^Oe(t,19)^t>>>10;kn[l]=r+kn[l-7]+n+kn[l-16]|0}let{A:n,B:r,C:o,D:i,E:a,F:s,G:c,H:u}=this;for(let l=0;l<64;l++){const e=u+(Oe(a,6)^Oe(a,11)^Oe(a,25))+wn(a,s,c)+An[l]+kn[l]|0,t=(Oe(n,2)^Oe(n,13)^Oe(n,22))+gn(n,r,o)|0;u=c,c=s,s=a,a=i+e|0,i=o,o=r,r=n,n=e+t|0}n=n+this.A|0,r=r+this.B|0,o=o+this.C|0,i=i+this.D|0,a=a+this.E|0,s=s+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,o,i,a,s,c,u)}roundClean(){Me(kn)}destroy(){this.set(0,0,0,0,0,0,0,0),Me(this.buffer)}}const En=/* @__PURE__ */(()=>fe(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),xn=/* @__PURE__ */(()=>En[0])(),Cn=/* @__PURE__ */(()=>En[1])(),In=/* @__PURE__ */new Uint32Array(80),Sn=/* @__PURE__ */new Uint32Array(80);class Nn extends yn{constructor(e=64){super(128,e,16,!1),this.Ah=0|vn[0],this.Al=0|vn[1],this.Bh=0|vn[2],this.Bl=0|vn[3],this.Ch=0|vn[4],this.Cl=0|vn[5],this.Dh=0|vn[6],this.Dl=0|vn[7],this.Eh=0|vn[8],this.El=0|vn[9],this.Fh=0|vn[10],this.Fl=0|vn[11],this.Gh=0|vn[12],this.Gl=0|vn[13],this.Hh=0|vn[14],this.Hl=0|vn[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:o,Cl:i,Dh:a,Dl:s,Eh:c,El:u,Fh:l,Fl:d,Gh:f,Gl:h,Hh:p,Hl:m}=this;return[e,t,n,r,o,i,a,s,c,u,l,d,f,h,p,m]}set(e,t,n,r,o,i,a,s,c,u,l,d,f,h,p,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|o,this.Cl=0|i,this.Dh=0|a,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|h,this.Hh=0|p,this.Hl=0|m}process(e,t){for(let y=0;y<16;y++,t+=4)In[y]=e.getUint32(t),Sn[y]=e.getUint32(t+=4);for(let y=16;y<80;y++){const e=0|In[y-15],t=0|Sn[y-15],n=me(e,t,1)^me(e,t,8)^he(e,0,7),r=we(e,t,1)^we(e,t,8)^pe(e,t,7),o=0|In[y-2],i=0|Sn[y-2],a=me(o,i,19)^ge(o,i,61)^he(o,0,6),s=we(o,i,19)^ye(o,i,61)^pe(o,i,6),c=ke(r,s,Sn[y-7],Sn[y-16]),u=Te(c,n,a,In[y-7],In[y-16]);In[y]=0|u,Sn[y]=0|c}let{Ah:n,Al:r,Bh:o,Bl:i,Ch:a,Cl:s,Dh:c,Dl:u,Eh:l,El:d,Fh:f,Fl:h,Gh:p,Gl:m,Hh:w,Hl:g}=this;for(let y=0;y<80;y++){const e=me(l,d,14)^me(l,d,18)^ge(l,d,41),t=we(l,d,14)^we(l,d,18)^ye(l,d,41),b=l&f^~l&p,v=Ee(g,t,d&h^~d&m,Cn[y],Sn[y]),A=xe(v,w,e,b,xn[y],In[y]),k=0|v,T=me(n,r,28)^ge(n,r,34)^ge(n,r,39),E=we(n,r,28)^ye(n,r,34)^ye(n,r,39),x=n&o^n&a^o&a,C=r&i^r&s^i&s;w=0|p,g=0|m,p=0|f,m=0|h,f=0|l,h=0|d,({h:l,l:d}=be(0|c,0|u,0|A,0|k)),c=0|a,u=0|s,a=0|o,s=0|i,o=0|n,i=0|r;const I=ve(k,E,C);n=Ae(I,A,T,x),r=0|I}({h:n,l:r}=be(0|this.Ah,0|this.Al,0|n,0|r)),({h:o,l:i}=be(0|this.Bh,0|this.Bl,0|o,0|i)),({h:a,l:s}=be(0|this.Ch,0|this.Cl,0|a,0|s)),({h:c,l:u}=be(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:d}=be(0|this.Eh,0|this.El,0|l,0|d)),({h:f,l:h}=be(0|this.Fh,0|this.Fl,0|f,0|h)),({h:p,l:m}=be(0|this.Gh,0|this.Gl,0|p,0|m)),({h:w,l:g}=be(0|this.Hh,0|this.Hl,0|w,0|g)),this.set(n,r,o,i,a,s,c,u,l,d,f,h,p,m,w,g)}roundClean(){Me(In,Sn)}destroy(){Me(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Bn=/* @__PURE__ */Fe(()=>new Tn),Mn=/* @__PURE__ */Fe(()=>new Nn),Pn=Bn;function On(e){const{commitment:t,version:n=1}=e,r=e.to??("string"==typeof t?"hex":"bytes"),o=Pn(C(i=t,{strict:!1})?oe(i):i);var i;return o.set([n],0),"bytes"===r?o:$(o)}const Rn=761855;class Un extends B{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class Ln extends B{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Dn extends B{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class Fn extends B{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:["Expected: 1",`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}const qn=/* @__PURE__ */BigInt(0),Hn=/* @__PURE__ */BigInt(1);function Vn(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function Wn(e){if(!Vn(e))throw new Error("Uint8Array expected")}function jn(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)}function Yn(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function zn(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?qn:BigInt("0x"+e)}const Gn="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,Jn=/* @__PURE__ */Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Xn(e){if(Wn(e),Gn)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=Jn[e[n]];return t}function Kn(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function Qn(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(Gn)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,i=0;o<n;o++,i+=2){const t=Kn(e.charCodeAt(i)),n=Kn(e.charCodeAt(i+1));if(void 0===t||void 0===n){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[o]=16*t+n}return r}function Zn(e){return zn(Xn(e))}function _n(e){return Wn(e),zn(Xn(Uint8Array.from(e).reverse()))}function $n(e,t){return Qn(e.toString(16).padStart(2*t,"0"))}function er(e,t){return $n(e,t).reverse()}function tr(e,t,n){let r;if("string"==typeof t)try{r=Qn(t)}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else{if(!Vn(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+" of length "+n+" expected, got "+o);return r}function nr(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];Wn(n),t+=n.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const t=e[r];n.set(t,o),o+=t.length}return n}const rr=e=>"bigint"==typeof e&&qn<=e;function or(e,t,n){return rr(e)&&rr(t)&&rr(n)&&t<=e&&e<n}function ir(e,t,n,r){if(!or(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}const ar=e=>(Hn<<BigInt(e))-Hn,sr=e=>new Uint8Array(e),cr=e=>Uint8Array.from(e),ur={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||Vn(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 lr(e,t,n={}){const r=(t,n,r)=>{const o=ur[n];if("function"!=typeof o)throw new Error("invalid validator function");const i=e[t];if(!(r&&void 0===i||o(i,e)))throw new Error("param "+String(t)+" is invalid. Expected "+n+", got "+i)};for(const[o,i]of Object.entries(t))r(o,i,!1);for(const[o,i]of Object.entries(n))r(o,i,!0);return e}function dr(e){const t=/* @__PURE__ */new WeakMap;return(n,...r)=>{const o=t.get(n);if(void 0!==o)return o;const i=e(n,...r);return t.set(n,i),i}}class fr extends B{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class hr extends B{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 Client."].join("\n"),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}const pr={"0x0":"reverted","0x1":"success"};function mr(e,t){const n={...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=>function(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):null===e.blockTimestamp?null:void 0,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}:{}}}(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?K(e.transactionIndex):null,status:e.status?pr[e.status]:null,type:e.type?un[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const wr=/* @__PURE__ */on("transactionReceipt",mr);function gr(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:o}=e;if(t<=0)throw new fr({chainId:t});if(o&&!lt(o))throw new it({address:o});if(r&&r>cn)throw new Gt({maxFeePerGas:r});if(n&&r&&n>r)throw new tn({maxFeePerGas:r,maxPriorityFeePerGas:n})}function yr(e){if(!e||0===e.length)return[];const t=[];for(let n=0;n<e.length;n++){const{address:r,storageKeys:o}=e[n];for(let e=0;e<o.length;e++)if(o[e].length-2!=64)throw new Ht({storageKey:o[e]});if(!lt(r,{strict:!1}))throw new it({address:r});t.push([r,o])}return t}function br(e,t){const n=function(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new qt({transaction:e})}(e);return"eip1559"===n?function(e,t){const{chainId:n,gas:r,nonce:o,to:i,value:a,maxFeePerGas:s,maxPriorityFeePerGas:c,accessList:u,data:l}=e;gr(e);const d=yr(u);return ft(["0x02",Wt([ee(n),o?ee(o):"0x",c?ee(c):"0x",s?ee(s):"0x",r?ee(r):"0x",i??"0x",a?ee(a):"0x",l??"0x",d,...vr(e,t)])])}(e,t):"eip2930"===n?function(e,t){const{chainId:n,gas:r,data:o,nonce:i,to:a,value:s,accessList:c,gasPrice:u}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:o,to:i}=e;if(t<=0)throw new fr({chainId:t});if(i&&!lt(i))throw new it({address:i});if(n||o)throw new B("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>cn)throw new Gt({maxFeePerGas:r})}(e);const l=yr(c);return ft(["0x01",Wt([ee(n),i?ee(i):"0x",u?ee(u):"0x",r?ee(r):"0x",a??"0x",s?ee(s):"0x",o??"0x",l,...vr(e,t)])])}(e,t):"eip4844"===n?function(e,t){const{chainId:n,gas:r,nonce:o,to:i,value:a,maxFeePerBlobGas:s,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:d}=e;!function(e){const{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new Ln;for(const e of t){const t=I(e),n=K(ht(e,0,1));if(32!==t)throw new Dn({hash:e,size:t});if(1!==n)throw new Fn({hash:e,version:n})}}gr(e)}(e);let f=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(void 0===f||void 0===h)){const t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>$(e)),n=e.kzg,r=pn({blobs:t,kzg:n});void 0===f&&(f=function(e){const{commitments:t,version:n}=e,r=e.to??("string"==typeof t[0]?"hex":"bytes"),o=[];for(const i of t)o.push(On({commitment:i,to:r,version:n}));return o}({commitments:r})),void 0===h&&(h=function(e){const{data:t,kzg:n,to:r}=e,o=e.blobs??function(e){const t=e.to??("string"==typeof e.data?"hex":"bytes"),n="string"==typeof e.data?se(e.data):e.data,r=I(n);if(!r)throw new Ln;if(r>Rn)throw new Un({maxSize:Rn,size:r});const o=[];let i=!0,a=0;for(;i;){const e=Bt(new Uint8Array(131072));let t=0;for(;t<4096;){const r=n.slice(a,a+31);if(e.pushByte(0),e.pushBytes(r),r.length<31){e.pushByte(128),i=!1;break}t++,a+=31}o.push(e)}return"bytes"===t?o.map(e=>e.bytes):o.map(e=>$(e.bytes))}({data:t,to:r}),i=e.commitments??pn({blobs:o,kzg:n,to:r}),a=e.proofs??mn({blobs:o,commitments:i,kzg:n,to:r}),s=[];for(let c=0;c<o.length;c++)s.push({blob:o[c],commitment:i[c],proof:a[c]});return s}({blobs:t,commitments:r,proofs:mn({blobs:t,commitments:r,kzg:n})}))}const p=yr(l),m=[ee(n),o?ee(o):"0x",u?ee(u):"0x",c?ee(c):"0x",r?ee(r):"0x",i??"0x",a?ee(a):"0x",d??"0x",p,s?ee(s):"0x",f??[],...vr(e,t)],w=[],g=[],y=[];if(h)for(let b=0;b<h.length;b++){const{blob:e,commitment:t,proof:n}=h[b];w.push(e),g.push(t),y.push(n)}return ft(["0x03",Wt(h?[m,w,g,y]:m)])}(e,t):"eip7702"===n?function(e,t){const{authorizationList:n,chainId:r,gas:o,nonce:i,to:a,value:s,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:d}=e;!function(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:e}=n,t=n.address;if(!lt(t))throw new it({address:t});if(e<0)throw new fr({chainId:e})}gr(e)}(e);const f=yr(l),h=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e){const{chainId:e,nonce:r,...o}=n,i=n.address;t.push([e?Z(e):"0x",i,r?Z(r):"0x",...vr({},o)])}return t}(n);return ft(["0x04",Wt([ee(r),i?ee(i):"0x",u?ee(u):"0x",c?ee(c):"0x",o?ee(o):"0x",a??"0x",s?ee(s):"0x",d??"0x",f,h,...vr(e,t)])])}(e,t):function(e,t){const{chainId:n=0,gas:r,data:o,nonce:i,to:a,value:s,gasPrice:c}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:o,to:i}=e;if(i&&!lt(i))throw new it({address:i});if(void 0!==t&&t<=0)throw new fr({chainId:t});if(n||o)throw new B("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>cn)throw new Gt({maxFeePerGas:r})}(e);let u=[i?ee(i):"0x",c?ee(c):"0x",r?ee(r):"0x",a??"0x",s?ee(s):"0x",o??"0x"];if(t){const e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(n>0)return BigInt(2*n)+BigInt(35n+t.v-27n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new Ft({v:t.v});return e})(),r=G(t.r),o=G(t.s);u=[...u,ee(e),"0x00"===r?"0x":r,"0x00"===o?"0x":o]}else n>0&&(u=[...u,ee(n),"0x","0x"]);return Wt(u)}(e,t)}function vr(e,t){const n=t??e,{v:r,yParity:o}=n;if(void 0===n.r)return[];if(void 0===n.s)return[];if(void 0===r&&void 0===o)return[];const i=G(n.r),a=G(n.s);return["number"==typeof o?o?ee(1):"0x":0n===r?"0x":1n===r?ee(1):27n===r?"0x":ee(1),"0x00"===i?"0x":i,"0x00"===a?"0x":a]}function Ar(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};return Object.assign(t,{extend:function e(t){return n=>{const r="function"==typeof n?n(t):n,o={...t,...r};return Object.assign(o,{extend:e(o)})}}(t)})}class kr extends De{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");Ie(e.outputLen),Ie(e.blockLen)}(e);const n=Le(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,o=new Uint8Array(r);o.set(n.length>r?e.create().update(n).digest():n);for(let i=0;i<o.length;i++)o[i]^=54;this.iHash.update(o),this.oHash=e.create();for(let i=0;i<o.length;i++)o[i]^=106;this.oHash.update(o),Me(o)}update(e){return Ne(this),this.iHash.update(e),this}digestInto(e){Ne(this),Se(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}o(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:o,blockLen:i,outputLen:a}=this;return e.finished=r,e.destroyed=o,e.blockLen=i,e.outputLen=a,e.oHash=t.o(e.oHash),e.iHash=n.o(e.iHash),e}clone(){return this.o()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Tr=(e,t,n)=>new kr(e,t).update(n).digest();Tr.create=(e,t)=>new kr(e,t);const Er=BigInt(0),xr=BigInt(1),Cr=/* @__PURE__ */BigInt(2),Ir=/* @__PURE__ */BigInt(3),Sr=/* @__PURE__ */BigInt(4),Nr=/* @__PURE__ */BigInt(5),Br=/* @__PURE__ */BigInt(8);function Mr(e,t){const n=e%t;return n>=Er?n:t+n}function Pr(e,t,n){let r=e;for(;t-- >Er;)r*=r,r%=n;return r}function Or(e,t){if(e===Er)throw new Error("invert: expected non-zero number");if(t<=Er)throw new Error("invert: expected positive modulus, got "+t);let n=Mr(e,t),r=t,o=Er,i=xr;for(;n!==Er;){const e=r%n,t=o-i*(r/n);r=n,n=e,o=i,i=t}if(r!==xr)throw new Error("invert: does not exist");return Mr(o,t)}function Rr(e,t){const n=(e.ORDER+xr)/Sr,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw new Error("Cannot find square root");return r}function Ur(e,t){const n=(e.ORDER-Nr)/Br,r=e.mul(t,Cr),o=e.pow(r,n),i=e.mul(t,o),a=e.mul(e.mul(i,Cr),o),s=e.mul(i,e.sub(a,e.ONE));if(!e.eql(e.sqr(s),t))throw new Error("Cannot find square root");return s}const Lr=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Dr(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n)),e.ONE),i=e.inv(o);return t.reduceRight((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n)),i),r}function Fr(e,t){const n=(e.ORDER-xr)/Cr,r=e.pow(t,n),o=e.eql(r,e.ONE),i=e.eql(r,e.ZERO),a=e.eql(r,e.neg(e.ONE));if(!o&&!i&&!a)throw new Error("invalid Legendre symbol result");return o?1:i?0:-1}function qr(e,t){void 0!==t&&Ie(t);const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function Hr(e,t,n=!1,r={}){if(e<=Er)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:o,nByteLength:i}=qr(e,t);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let a;const s=Object.freeze({ORDER:e,isLE:n,BITS:o,BYTES:i,MASK:ar(o),ZERO:Er,ONE:xr,create:t=>Mr(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return Er<=t&&t<e},is0:e=>e===Er,isOdd:e=>(e&xr)===xr,neg:t=>Mr(-t,e),eql:(e,t)=>e===t,sqr:t=>Mr(t*t,e),add:(t,n)=>Mr(t+n,e),sub:(t,n)=>Mr(t-n,e),mul:(t,n)=>Mr(t*n,e),pow:(e,t)=>function(e,t,n){if(n<Er)throw new Error("invalid exponent, negatives unsupported");if(n===Er)return e.ONE;if(n===xr)return t;let r=e.ONE,o=t;for(;n>Er;)n&xr&&(r=e.mul(r,o)),o=e.sqr(o),n>>=xr;return r}(s,e,t),div:(t,n)=>Mr(t*Or(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>Or(t,e),sqrt:r.sqrt||(t=>{return a||(a=(n=e)%Sr===Ir?Rr:n%Br===Nr?Ur:function(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-xr,n=0;for(;t%Cr===Er;)t/=Cr,n++;let r=Cr;const o=Hr(e);for(;1===Fr(o,r);)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===n)return Rr;let i=o.pow(r,t);const a=(t+xr)/Cr;return function(e,r){if(e.is0(r))return r;if(1!==Fr(e,r))throw new Error("Cannot find square root");let o=n,s=e.mul(e.ONE,i),c=e.pow(r,t),u=e.pow(r,a);for(;!e.eql(c,e.ONE);){if(e.is0(c))return e.ZERO;let t=1,n=e.sqr(c);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===o)throw new Error("Cannot find square root");const r=xr<<BigInt(o-t-1),i=e.pow(s,r);o=t,s=e.sqr(i),c=e.mul(c,s),u=e.mul(u,i)}return u}}(n)),a(s,t);var n}),toBytes:e=>n?er(e,i):$n(e,i),fromBytes:e=>{if(e.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+e.length);return n?_n(e):Zn(e)},invertBatch:e=>Dr(s,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(s)}function Vr(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Wr(e){const t=Vr(e);return t+Math.ceil(t/2)}const jr=BigInt(0),Yr=BigInt(1);function zr(e,t){const n=t.negate();return e?n:t}function Gr(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Jr(e,t){Gr(e,t);const n=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:ar(e),maxNumber:n,shiftBy:BigInt(e)}}function Xr(e,t,n){const{windowSize:r,mask:o,maxNumber:i,shiftBy:a}=n;let s=Number(e&o),c=e>>a;s>r&&(s-=i,c+=Yr);const u=t*r;return{nextN:c,offset:u+Math.abs(s)-1,isZero:0===s,isNeg:s<0,isNegF:t%2!=0,offsetF:u}}const Kr=/* @__PURE__ */new WeakMap,Qr=/* @__PURE__ */new WeakMap;function Zr(e){return Qr.get(e)||1}function _r(e,t){return{constTimeNegate:zr,hasPrecomputes:e=>1!==Zr(e),unsafeLadder(t,n,r=e.ZERO){let o=t;for(;n>jr;)n&Yr&&(r=r.add(o)),o=o.double(),n>>=Yr;return r},precomputeWindow(e,n){const{windows:r,windowSize:o}=Jr(n,t),i=[];let a=e,s=a;for(let t=0;t<r;t++){s=a,i.push(s);for(let e=1;e<o;e++)s=s.add(a),i.push(s);a=s.double()}return i},wNAF(n,r,o){let i=e.ZERO,a=e.BASE;const s=Jr(n,t);for(let e=0;e<s.windows;e++){const{nextN:t,offset:n,isZero:c,isNeg:u,isNegF:l,offsetF:d}=Xr(o,e,s);o=t,c?a=a.add(zr(l,r[d])):i=i.add(zr(u,r[n]))}return{p:i,f:a}},wNAFUnsafe(n,r,o,i=e.ZERO){const a=Jr(n,t);for(let e=0;e<a.windows&&o!==jr;e++){const{nextN:t,offset:n,isZero:s,isNeg:c}=Xr(o,e,a);if(o=t,!s){const e=r[n];i=i.add(c?e.negate():e)}}return i},getPrecomputes(e,t,n){let r=Kr.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&Kr.set(t,n(r))),r},wNAFCached(e,t,n){const r=Zr(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)},wNAFCachedUnsafe(e,t,n,r){const o=Zr(e);return 1===o?this.unsafeLadder(e,t,r):this.wNAFUnsafe(o,this.getPrecomputes(o,e,n),t,r)},setWindowSize(e,n){Gr(n,t),Qr.set(e,n),Kr.delete(e)}}}function $r(e,t,n,r){!function(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)})}(n,e),function(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)})}(r,t);const o=n.length,i=r.length;if(o!==i)throw new Error("arrays of points and scalars must have equal length");const a=e.ZERO,s=function(e){let t;for(t=0;e>qn;e>>=Hn,t+=1);return t}(BigInt(o));let c=1;s>12?c=s-3:s>4?c=s-2:s>0&&(c=2);const u=ar(c),l=new Array(Number(u)+1).fill(a);let d=a;for(let f=Math.floor((t.BITS-1)/c)*c;f>=0;f-=c){l.fill(a);for(let t=0;t<i;t++){const e=r[t],o=Number(e>>BigInt(f)&u);l[o]=l[o].add(n[t])}let e=a;for(let t=l.length-1,n=a;t>0;t--)n=n.add(l[t]),e=e.add(n);if(d=d.add(e),0!==f)for(let t=0;t<c;t++)d=d.double()}return d}function eo(e){return lr(e.Fp,Lr.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),lr(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...qr(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function to(e){void 0!==e.lowS&&jn("lowS",e.lowS),void 0!==e.prehash&&jn("prehash",e.prehash)}class no extends Error{constructor(e=""){super(e)}}const ro={Err:no,u:{encode:(e,t)=>{const{Err:n}=ro;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");const r=t.length/2,o=Yn(r);if(o.length/2&128)throw new n("tlv.encode: long form length too big");const i=r>127?Yn(o.length/2|128):"";return Yn(e)+i+o+t},decode(e,t){const{Err:n}=ro;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const o=t[r++];let i=0;if(128&o){const e=127&o;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");const a=t.subarray(r,r+e);if(a.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===a[0])throw new n("tlv.decode(long): zero leftmost byte");for(const t of a)i=i<<8|t;if(r+=e,i<128)throw new n("tlv.decode(long): not minimal encoding")}else i=o;const a=t.subarray(r,r+i);if(a.length!==i)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+i)}}},T:{encode(e){const{Err:t}=ro;if(e<io)throw new t("integer: negative integers are not allowed");let n=Yn(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=ro;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return Zn(e)}},toSig(e){const{Err:t,T:n,u:r}=ro,o=tr("signature",e),{v:i,l:a}=r.decode(48,o);if(a.length)throw new t("invalid signature: left bytes after parsing");const{v:s,l:c}=r.decode(2,i),{v:u,l:l}=r.decode(2,c);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(s),s:n.decode(u)}},hexFromSig(e){const{u:t,T:n}=ro,r=t.encode(2,n.encode(e.r))+t.encode(2,n.encode(e.s));return t.encode(48,r)}};function oo(e,t){return Xn($n(e,t))}const io=BigInt(0),ao=BigInt(1);BigInt(2);const so=BigInt(3),co=BigInt(4);function uo(e){const t=function(e){const t=eo(e);return lr(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:n,n:r,nByteLength:o,nBitLength:i}=t,a=n.BYTES+1,s=2*n.BYTES+1;function c(e){return Mr(e,r)}function u(e){return Or(e,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:d,weierstrassEquation:f,isWithinCurveOrder:h}=function(e){const t=function(e){const t=eo(e);lr(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:r,a:o}=t;if(n){if(!r.eql(o,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if("object"!=typeof n||"bigint"!=typeof n.beta||"function"!=typeof n.splitScalar)throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}(e),{Fp:n}=t,r=Hr(t.n,t.nBitLength),o=t.toBytes||((e,t,r)=>{const o=t.toAffine();return nr(Uint8Array.from([4]),n.toBytes(o.x),n.toBytes(o.y))}),i=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 a(e){const{a:r,b:o}=t,i=n.sqr(e),a=n.mul(i,e);return n.add(n.add(a,n.mul(e,r)),o)}function s(e,t){const r=n.sqr(t),o=a(e);return n.eql(r,o)}if(!s(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=n.mul(n.pow(t.a,so),co),u=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(c,u)))throw new Error("bad curve params: a or b");function l(e){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:o,n:i}=t;if(n&&"bigint"!=typeof e){if(Vn(e)&&(e=Xn(e)),"string"!=typeof e||!n.includes(e.length))throw new Error("invalid private key");e=e.padStart(2*r,"0")}let a;try{a="bigint"==typeof e?e:Zn(tr("private key",e,r))}catch(s){throw new Error("invalid private key, expected hex or "+r+" bytes, got "+typeof e)}return o&&(a=Mr(a,i)),ir("private key",a,ao,i),a}function d(e){if(!(e instanceof p))throw new Error("ProjectivePoint expected")}const f=dr((e,t)=>{const{px:r,py:o,pz:i}=e;if(n.eql(i,n.ONE))return{x:r,y:o};const a=e.is0();null==t&&(t=a?n.ONE:n.inv(i));const s=n.mul(r,t),c=n.mul(o,t),u=n.mul(i,t);if(a)return{x:n.ZERO,y:n.ZERO};if(!n.eql(u,n.ONE))throw new Error("invZ was invalid");return{x:s,y:c}}),h=dr(e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.py))return;throw new Error("bad point: ZERO")}const{x:r,y:o}=e.toAffine();if(!n.isValid(r)||!n.isValid(o))throw new Error("bad point: x or y not FE");if(!s(r,o))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class p{constructor(e,t,r){if(null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t)||n.is0(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required");this.px=e,this.py=t,this.pz=r,Object.freeze(this)}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof p)throw new Error("projective point not allowed");const o=e=>n.eql(e,n.ZERO);return o(t)&&o(r)?p.ZERO:new p(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=Dr(n,e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(p.fromAffine)}static fromHex(e){const t=p.fromAffine(i(tr("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return p.BASE.multiply(l(e))}static msm(e,t){return $r(p,r,e,t)}I(e){g.setWindowSize(this,e)}assertValidity(){h(this)}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){d(e);const{px:t,py:r,pz:o}=this,{px:i,py:a,pz:s}=e,c=n.eql(n.mul(t,s),n.mul(i,o)),u=n.eql(n.mul(r,s),n.mul(a,o));return c&&u}negate(){return new p(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,o=n.mul(r,so),{px:i,py:a,pz:s}=this;let c=n.ZERO,u=n.ZERO,l=n.ZERO,d=n.mul(i,i),f=n.mul(a,a),h=n.mul(s,s),m=n.mul(i,a);return m=n.add(m,m),l=n.mul(i,s),l=n.add(l,l),c=n.mul(e,l),u=n.mul(o,h),u=n.add(c,u),c=n.sub(f,u),u=n.add(f,u),u=n.mul(c,u),c=n.mul(m,c),l=n.mul(o,l),h=n.mul(e,h),m=n.sub(d,h),m=n.mul(e,m),m=n.add(m,l),l=n.add(d,d),d=n.add(l,d),d=n.add(d,h),d=n.mul(d,m),u=n.add(u,d),h=n.mul(a,s),h=n.add(h,h),d=n.mul(h,m),c=n.sub(c,d),l=n.mul(h,f),l=n.add(l,l),l=n.add(l,l),new p(c,u,l)}add(e){d(e);const{px:r,py:o,pz:i}=this,{px:a,py:s,pz:c}=e;let u=n.ZERO,l=n.ZERO,f=n.ZERO;const h=t.a,m=n.mul(t.b,so);let w=n.mul(r,a),g=n.mul(o,s),y=n.mul(i,c),b=n.add(r,o),v=n.add(a,s);b=n.mul(b,v),v=n.add(w,g),b=n.sub(b,v),v=n.add(r,i);let A=n.add(a,c);return v=n.mul(v,A),A=n.add(w,y),v=n.sub(v,A),A=n.add(o,i),u=n.add(s,c),A=n.mul(A,u),u=n.add(g,y),A=n.sub(A,u),f=n.mul(h,v),u=n.mul(m,y),f=n.add(u,f),u=n.sub(g,f),f=n.add(g,f),l=n.mul(u,f),g=n.add(w,w),g=n.add(g,w),y=n.mul(h,y),v=n.mul(m,v),g=n.add(g,y),y=n.sub(w,y),y=n.mul(h,y),v=n.add(v,y),w=n.mul(g,v),l=n.add(l,w),w=n.mul(A,v),u=n.mul(b,u),u=n.sub(u,w),w=n.mul(b,g),f=n.mul(A,f),f=n.add(f,w),new p(u,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(p.ZERO)}wNAF(e){return g.wNAFCached(this,e,p.normalizeZ)}multiplyUnsafe(e){const{endo:r,n:o}=t;ir("scalar",e,io,o);const i=p.ZERO;if(e===io)return i;if(this.is0()||e===ao)return this;if(!r||g.hasPrecomputes(this))return g.wNAFCachedUnsafe(this,e,p.normalizeZ);let{k1neg:a,k1:s,k2neg:c,k2:u}=r.splitScalar(e),l=i,d=i,f=this;for(;s>io||u>io;)s&ao&&(l=l.add(f)),u&ao&&(d=d.add(f)),f=f.double(),s>>=ao,u>>=ao;return a&&(l=l.negate()),c&&(d=d.negate()),d=new p(n.mul(d.px,r.beta),d.py,d.pz),l.add(d)}multiply(e){const{endo:r,n:o}=t;let i,a;if(ir("scalar",e,ao,o),r){const{k1neg:t,k1:o,k2neg:s,k2:c}=r.splitScalar(e);let{p:u,f:l}=this.wNAF(o),{p:d,f:f}=this.wNAF(c);u=g.constTimeNegate(t,u),d=g.constTimeNegate(s,d),d=new p(n.mul(d.px,r.beta),d.py,d.pz),i=u.add(d),a=l.add(f)}else{const{p:t,f:n}=this.wNAF(e);i=t,a=n}return p.normalizeZ([i,a])[0]}multiplyAndAddUnsafe(e,t,n){const r=p.BASE,o=(e,t)=>t!==io&&t!==ao&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),i=o(this,t).add(o(e,n));return i.is0()?void 0:i}toAffine(e){return f(this,e)}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===ao)return!0;if(n)return n(p,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===ao?this:n?n(p,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return jn("isCompressed",e),this.assertValidity(),o(p,this,e)}toHex(e=!0){return jn("isCompressed",e),Xn(this.toRawBytes(e))}}p.BASE=new p(t.Gx,t.Gy,n.ONE),p.ZERO=new p(n.ZERO,n.ONE,n.ZERO);const{endo:m,nBitLength:w}=t,g=_r(p,m?Math.ceil(w/2):w);return{CURVE:t,ProjectivePoint:p,normPrivateKeyToScalar:l,weierstrassEquation:a,isWithinCurveOrder:function(e){return or(e,ao,t.n)}}}({...t,toBytes(e,t,r){const o=t.toAffine(),i=n.toBytes(o.x),a=nr;return jn("isCompressed",r),r?a(Uint8Array.from([t.hasEvenY()?2:3]),i):a(Uint8Array.from([4]),i,n.toBytes(o.y))},fromBytes(e){const t=e.length,r=e[0],o=e.subarray(1);if(t!==a||2!==r&&3!==r){if(t===s&&4===r)return{x:n.fromBytes(o.subarray(0,n.BYTES)),y:n.fromBytes(o.subarray(n.BYTES,2*n.BYTES))};throw new Error("invalid Point, expected length of "+a+", or uncompressed "+s+", got "+t)}{const e=Zn(o);if(!or(e,ao,n.ORDER))throw new Error("Point is not on curve");const t=f(e);let a;try{a=n.sqrt(t)}catch(i){const e=i instanceof Error?": "+i.message:"";throw new Error("Point is not on curve"+e)}return!(1&~r)!=((a&ao)===ao)&&(a=n.neg(a)),{x:e,y:a}}}});function p(e){return e>r>>ao}const m=(e,t,n)=>Zn(e.slice(t,n));class w{constructor(e,t,n){ir("r",e,ao,r),ir("s",t,ao,r),this.r=e,this.s=t,null!=n&&(this.recovery=n),Object.freeze(this)}static fromCompact(e){const t=o;return e=tr("compactSignature",e,2*t),new w(m(e,0,t),m(e,t,2*t))}static fromDER(e){const{r:t,s:n}=ro.toSig(tr("DER",e));return new w(t,n)}assertValidity(){}addRecoveryBit(e){return new w(this.r,this.s,e)}recoverPublicKey(e){const{r:r,s:o,recovery:i}=this,a=v(tr("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const s=2===i||3===i?r+t.n:r;if(s>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=1&i?"03":"02",f=l.fromHex(d+oo(s,n.BYTES)),h=u(s),p=c(-a*h),m=c(o*h),w=l.BASE.multiplyAndAddUnsafe(f,p,m);if(!w)throw new Error("point at infinify");return w.assertValidity(),w}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Qn(this.toDERHex())}toDERHex(){return ro.hexFromSig(this)}toCompactRawBytes(){return Qn(this.toCompactHex())}toCompactHex(){const e=o;return oo(this.r,e)+oo(this.s,e)}}const g={isValidPrivateKey(e){try{return d(e),!0}catch(t){return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const e=Wr(t.n);return function(e,t,n=!1){const r=e.length,o=Vr(t),i=Wr(t);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const a=Mr(n?_n(e):Zn(e),t-xr)+xr;return n?er(a,o):$n(a,o)}(t.randomBytes(e),t.n)},precompute:(e=8,t=l.BASE)=>(t.I(e),t.multiply(BigInt(3)),t)};function y(e){if("bigint"==typeof e)return!1;if(e instanceof l)return!0;const r=tr("key",e).length,i=n.BYTES,a=i+1,s=2*i+1;return t.allowedPrivateKeyLengths||o===a?void 0:r===a||r===s}const b=t.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=Zn(e),n=8*e.length-i;return n>0?t>>BigInt(n):t},v=t.bits2int_modN||function(e){return c(b(e))},A=ar(i);function k(e){return ir("num < 2^"+i,e,io,A),$n(e,o)}const T={lowS:t.lowS,prehash:!1},E={lowS:t.lowS,prehash:!1};return l.BASE.I(8),{CURVE:t,getPublicKey:function(e,t=!0){return l.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(!0===y(e))throw new Error("first arg must be private key");if(!1===y(t))throw new Error("second arg must be public key");return l.fromHex(t).multiply(d(e)).toRawBytes(n)},sign:function(e,r,o=T){const{seed:i,k2sig:a}=function(e,r,o=T){if(["recovered","canonical"].some(e=>e in o))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:a}=t;let{lowS:s,prehash:f,extraEntropy:m}=o;null==s&&(s=!0),e=tr("msgHash",e),to(o),f&&(e=tr("prehashed msgHash",i(e)));const g=v(e),y=d(r),A=[k(y),k(g)];if(null!=m&&!1!==m){const e=!0===m?a(n.BYTES):m;A.push(tr("extraEntropy",e))}const E=nr(...A),x=g;return{seed:E,k2sig:function(e){const t=b(e);if(!h(t))return;const n=u(t),r=l.BASE.multiply(t).toAffine(),o=c(r.x);if(o===io)return;const i=c(n*c(x+o*y));if(i===io)return;let a=(r.x===o?0:2)|Number(r.y&ao),d=i;return s&&p(i)&&(d=function(e){return p(e)?c(-e):e}(i),a^=1),new w(o,d,a)}}}(e,r,o),s=t,f=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=sr(e),o=sr(e),i=0;const a=()=>{r.fill(1),o.fill(0),i=0},s=(...e)=>n(o,r,...e),c=(e=sr(0))=>{o=s(cr([0]),e),r=s(),0!==e.length&&(o=s(cr([1]),e),r=s())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){r=s();const t=r.slice();n.push(t),e+=r.length}return nr(...n)};return(e,t)=>{let n;for(a(),c(e);!(n=t(u()));)c();return a(),n}}(s.hash.outputLen,s.nByteLength,s.hmac);return f(i,a)},verify:function(e,n,r,o=E){const i=e;n=tr("msgHash",n),r=tr("publicKey",r);const{lowS:a,prehash:s,format:d}=o;if(to(o),"strict"in o)throw new Error("options.strict was renamed to lowS");if(void 0!==d&&"compact"!==d&&"der"!==d)throw new Error("format must be compact or der");const f="string"==typeof i||Vn(i),h=!f&&!d&&"object"==typeof i&&null!==i&&"bigint"==typeof i.r&&"bigint"==typeof i.s;if(!f&&!h)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let p,m;try{if(h&&(p=new w(i.r,i.s)),f){try{"compact"!==d&&(p=w.fromDER(i))}catch(C){if(!(C instanceof ro.Err))throw C}p||"der"===d||(p=w.fromCompact(i))}m=l.fromHex(r)}catch(I){return!1}if(!p)return!1;if(a&&p.hasHighS())return!1;s&&(n=t.hash(n));const{r:g,s:y}=p,b=v(n),A=u(y),k=c(b*A),T=c(g*A),x=l.BASE.multiplyAndAddUnsafe(m,k,T)?.toAffine();return!!x&&c(x.x)===g},ProjectivePoint:l,Signature:w,utils:g}}function lo(e){return{hash:e,hmac:(t,...n)=>Tr(e,t,function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];Se(n),t+=n.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const t=e[r];n.set(t,o),o+=t.length}return n}(...n)),randomBytes:qe}}const fo=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),ho=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),po=BigInt(0),mo=BigInt(1),wo=BigInt(2),go=(e,t)=>(e+t/wo)/t,yo=Hr(fo,void 0,void 0,{sqrt:function(e){const t=fo,n=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),a=BigInt(23),s=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=Pr(l,n,t)*l%t,f=Pr(d,n,t)*l%t,h=Pr(f,wo,t)*u%t,p=Pr(h,o,t)*h%t,m=Pr(p,i,t)*p%t,w=Pr(m,s,t)*m%t,g=Pr(w,c,t)*w%t,y=Pr(g,s,t)*m%t,b=Pr(y,n,t)*l%t,v=Pr(b,a,t)*p%t,A=Pr(v,r,t)*u%t,k=Pr(A,wo,t);if(!yo.eql(yo.sqr(k),e))throw new Error("Cannot find square root");return k}}),bo=function(e){const t=t=>uo({...e,...lo(t)});return{...t(Bn),create:t}}({a:po,b:BigInt(7),Fp:yo,n:ho,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=ho,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-mo*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,a=BigInt("0x100000000000000000000000000000000"),s=go(i*e,t),c=go(-r*e,t);let u=Mr(e-s*n-c*o,t),l=Mr(-s*r-c*i,t);const d=u>a,f=l>a;if(d&&(u=t-u),f&&(l=t-l),u>a||l>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}}});class vo extends B{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Ao(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new vo({value:e});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,i]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],a=Math.round(Number(`${o}.${i}`));r=a>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${a}`,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}`)}const ko="0x0000000000000000000000000000000000000000",To={blockTime:2e3,contracts:{gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},formatters:{block:/* @__PURE__ */hn({format(e){const t=e.transactions?.map(e=>{if("string"==typeof e)return e;const t=ln(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?X(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t});return{transactions:t,stateRoot:e.stateRoot}}}),transaction:/* @__PURE__ */dn({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?X(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:/* @__PURE__ */wr({format:e=>({l1GasPrice:e.l1GasPrice?X(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?X(e.l1GasUsed):null,l1Fee:e.l1Fee?X(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},serializers:{transaction:function(e,t){return function(e){return"deposit"===e.type||void 0!==e.sourceHash}(e)?function(e){!function(e){const{from:t,to:n}=e;if(t&&!lt(t))throw new it({address:t});if(n&&!lt(n))throw new it({address:n})}(e);const{sourceHash:t,data:n,from:r,gas:o,isSystemTx:i,mint:a,to:s,value:c}=e;return ft(["0x7e",Wt([t,r,s??"0x",a?Z(a):"0x",c?Z(c):"0x",o?Z(o):"0x",i?"0x1":"0x",n??"0x"])])}(e):br(e,t)}}},Eo=/* @__PURE__ */Ar({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),xo=/* @__PURE__ */Ar({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),Co=1,Io=/* @__PURE__ */Ar({...To,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...To.contracts,disputeGameFactory:{[Co]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[Co]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[Co]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[Co]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:1}),So=/* @__PURE__ */Ar({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}});async function No(e,t){const{account:n=e.account}=t;if(!n)throw new hr;const r=Tt(n);try{const{accessList:n,blockNumber:o,blockTag:i,data:a,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,to:f,value:h,...p}=t,m=("bigint"==typeof o?ee(o):void 0)||i;!function(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:o}=e,i=t?Tt(t):void 0;if(i&&!lt(i.address))throw new it({address:i.address});if(o&&!lt(o))throw new it({address:o});if(n&&n>cn)throw new Gt({maxFeePerGas:n});if(r&&n&&r>n)throw new tn({maxFeePerGas:n,maxPriorityFeePerGas:r})}(t);const w=e.chain?.formatters?.transactionRequest?.format,g=(w||sn)({...rn(p,{format:w}),account:r,accessList:n,data:a,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,to:f,value:h},"estimateGas"),{baseFeePerGas:y,gasLimit:b,priorityFeePerGas:v}=await e.request({method:"linea_estimateGas",params:m?[g,m]:[g]});return{baseFeePerGas:BigInt(y),gasLimit:BigInt(b),priorityFeePerGas:BigInt(v)}}catch(o){throw function(e,{docsPath:t,...n}){const r=(()=>{const t=function(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof B?e.walk(e=>e?.code===zt.code):e;return r instanceof B?new zt({cause:e,message:r.details}):zt.nodeMessage.test(n)?new zt({cause:e,message:e.details}):Gt.nodeMessage.test(n)?new Gt({cause:e,maxFeePerGas:t?.maxFeePerGas}):Jt.nodeMessage.test(n)?new Jt({cause:e,maxFeePerGas:t?.maxFeePerGas}):Xt.nodeMessage.test(n)?new Xt({cause:e,nonce:t?.nonce}):Kt.nodeMessage.test(n)?new Kt({cause:e,nonce:t?.nonce}):Qt.nodeMessage.test(n)?new Qt({cause:e,nonce:t?.nonce}):Zt.nodeMessage.test(n)?new Zt({cause:e}):_t.nodeMessage.test(n)?new _t({cause:e,gas:t?.gas}):$t.nodeMessage.test(n)?new $t({cause:e,gas:t?.gas}):en.nodeMessage.test(n)?new en({cause:e}):tn.nodeMessage.test(n)?new tn({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new nn({cause:e})}(e,n);return t instanceof nn?e:t})();return new Vt(r,{docsPath:t,...n})}(o,{...t,account:r,chain:e.chain})}}async function Bo({client:e,multiply:t,request:n,type:r}){try{const o=await No(e,{...n,account:n?.account}),{priorityFeePerGas:i}=o,a=t(BigInt(o.baseFeePerGas))+i;return"legacy"===r?{gasPrice:a}:{maxFeePerGas:a,maxPriorityFeePerGas:i}}catch{return null}}const Mo=/* @__PURE__ */Ar({fees:{estimateFeesPerGas:Bo,async maxPriorityFeePerGas({block:e,client:t,request:n}){const r=await Bo({block:e,client:t,multiply:e=>e,request:n,type:"eip1559"});return r?.maxPriorityFeePerGas?r.maxPriorityFeePerGas:null}},id:59144,name:"Linea Mainnet",blockTime:2e3,nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42},ensRegistry:{address:"0x50130b669B28C339991d8676FA73CF122a121267",blockCreated:6682888},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:22222151}},ensTlds:[".linea.eth"],testnet:!1}),Po=1,Oo=1,Ro={1:{.../* @__PURE__ */Ar({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAABoCAYAAAAdHLWhAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAJalJREFUeAHVfQl4HNWZ4F/V96Vu3ZItS7IlMLLNEWTAGAwGAjmGhJ1JyHwQIGQ3B2ENhOwm2Xgg6xwfJGQIuwMTNiwTjswZhhyETABD4jiEK8YH2JIPWdjWZVmybqmvqnrz/+9Vtaqrq7pbp81vl6r61Tv///3H+99REry/QTLdmSXc+M3gfQwSnP5AdZTufrwrFpHClwOTGyUJGpmmNYDGGpnEYvg+yhjemaankEGSpBHG1FFZ8hyRXS7QNPUdSfZ0qqmJd4bV4T1/v6llSM//tCbg6UggXqf/9aPjy72uwHVMhvOYplyuqUqDpqVBVdOIUgaaquavPYOs90gwkF0ekGU3vyTJddTl8e5mavo5Na3tvm9T5S5TytMGThcCcS6559HBjZLbcx1TlOtUTWlQlAQgApFR7HEmyy5MiP9kmSiA/2UdvZpIQ89MJe5xxLrb7cXLD5LbfdTl8mzT0qmnv/ulim08k9MATjWBpP/+SHtZhXfJnYqmXqcqyXOVVJwj1AxECBkRiQjkxOCcILkccgRbHtCQUAzzRU7kXKjxS8lOiuW4PT7weINHNU37tsbS2753e817cAq56lQQiJe5+ZGBD2DXvVXSt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x4NHMFo6EokkfD5fanBwkIhi7BVdNI7JqTecHiDpFycWXSUlJV5VVb04tiAl5Kmov6Z0WcsNq/yR5S0eT3gpWlQt4gO87qWI8QgawJFpPNLKGW1cYto4HbOGYrMXuRE5ZLxbSQ93d7f95M2+w7+hww/SNhcRhU+pwCngGCucLgSyAre5W1tb5d7eXk86nXZhj3Zj73ahV8JNx0jje5ff75dxnsUgroQ9XzKO18Rnhs+GvtDQMNFwzKJiHsr4+LhQRvpQALIJcsqJ8n4DiT6lrH/zmrjLMDAC1dXV5DcKo3iM4EieTqktsdzphIygflEa4ka3npcYeJ3mcNpXMA9IDmFOHPC+5Iz/BElwM6GmmQapAAAAAElFTkSuQmCC",chainId:1,chainType:"ether",chainTypeMoralis:"eth",customName:"Ethereum",tokenTrendingDefault:["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"],isSupported:!0},10:{.../* @__PURE__ */Ar({...To,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...To.contracts,disputeGameFactory:{[Po]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[Po]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[Po]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[Po]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:1}),logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAO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AElFTkSuQmCC",chainId:10,chainType:"optimism",chainTypeMoralis:"optimism",customName:"Optimism",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0x68f180fcce6836688e9084f035309e29bf0a2095","0xc47da4cb96ce65a96844a01bfae509f9d5454534"],isSupported:!0},56:{...So,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACcRJREFUeAHlnU2IHMcVgF9V9+iPWTMbSJyIEGmTgwOJtR3QIZegWYgVmUBWOoQEQmIZcsjNziEHX6KNIaccvL75EIh0yCEnaQOJ7ZVhxxfjg8GzBoNtsLW66GBjdrVrS5Zmusr1eqbGPbszPdX1273+YFczy/z09KdXr+p1TRWBirN9PWnBCWjHETsFfVgASk6JP5/mAC1CoAVc/OQhsMM57BCArew+45sQw60+p5vwGXTnL3V3oMIQqBjbLyen4wZbJowkDKAtDvA0WARFCZldQvmNHqOb8+e7XagQlRCyfTNpxym7yClZti1gFsNI6vQIuTb/RLcDgQkmBJuiuMmeAU4uirsJVIBMDuUrvR59ff7J7hYEwLuQ7fUkiRm7DBF56kD7XyHEibnaS8nffIvxJiTLDRH/l7jZhhrhW4xzIdg0RU12hXDyLNQYX2KcCtl77QzmiJUqN01lkDmm+fN3roEjnAipa/NUgk4/JU+7iBYKlsGoiGP+NhxeGYgYqPK3775yxnozbC1CDkuuKAshfLX5xDt/BktYEYJNVCPi13lFxhO+wdwiEv6SjSbMWMhQxgb3PMLOc+QHf8r+ffjhSxAKW1KMhGSDPMI3QvaiUMaR7w+FfPRSUCkCUdQkS02D+pi2kKrJkNRdipaQqsqQ1FlKaSHZGAO7tRWVIamCFDFW+UnZnFJqHCITeNVlZI8Tj5HJPhAtPFd4zso8qZSQKvSmVGSMHh9YCp4rMYC8nl31VERZyO7NMy/UScboeeE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UjA/alyO32GQibwoFuvSqogJSgcun1GLlVic+I8oQePQRCDvv59WJm2QUtZrApB7r6SPEsjfiVkXvEB5gsshzQvdFfBItaFIMNF/XF/jDYcTjpYKLTRRO3HiRDJ7npyWWS7K4clt7iKijzG62UV8cj57lXseXDOr0HdEbki/ZwsuJSBOI2QPIOeGFshhDwF9cJZ8zQJb0IkdRCDTRNh/Bqh9GrTYJCng3chkkxMJJJ+tXJMFzhZ69+DVVvd2LIEE5JnD/cuybbLIOd8y8EvvIpoWANOb8w92e1AYCohJA/WxxhAQoAvi3JEYlvQYD0R6HAg3TiFteOecoMqlROyH9wcPj4GCUSwCIwtwHDR+uHinS1cODL/eD5YTGdnuKjOFjB+Gyi9JeTeTu9BJ1RTpMqXLiNpVjp6y9MAAAAASUVORK5CYII=",chainId:56,chainType:"bsc",chainTypeMoralis:"bsc",customName:"BNB Chain",tokenTrendingDefault:["0x2170ed0880ac9a755fd29b2688956bd959f933f8","0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c"],isSupported:!0},137:{.../* @__PURE__ */Ar({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon.drpc.org"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),rpcUrls:{default:{http:["https://polygon-bor-rpc.publicnode.com"]}},logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAC61JREFUeAHtnU9sFNcdx39vdmNMbbATQHZSEOtQieYSO5dYzQHbBzDqAcyhOSUBDimRooSkVLkFL84tbRRHUaqklVpIeuLCn14wqMKOV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aZO/9iiUVzISLH+Y8VaGdcNq/19H7RdXB2yFvVRP5RbX1XqqNMa9w4pOjE1uHar3GMYCXDt7ksTgNwdqBzs6M6Vx+aotIuLmROOz0MqX4MC6mazXIygEy/qBXqmjbatwi6lFXPRHl9fdGJ7YpnV6nvEKOLy6nuei9UxO3ZFXFAOrnh0z2CBtoHKCYdBZDQoa4bn6heeRRcHg6Rs/1ol78AZPzoaiU6esCl4eCeTposnlsnm4gBg/52DyLpiir8CkG8H/0akDHWkSQ+h+9CqRPKUYSWXpAweHEOsQAWu7UkaIsLj2FBIgeMPCZ+eKSFjGA9taaLLNwNhp7vyLvzeQnjk9s1XokVCC9Tnm+ummeYTHay7EcVG05SxzWNSvKCXTnsrG9Nw/J2RIXhx/QrCgn8K3kirOlkGaMHaQIU/QVy+lqh3npIrS9/aIqTJDmyY7QN1uMhDBoJjHzFGfJ8bCEsKjb7pcyoaTCYCP5GDEbMsJHnOP55fGgTVM16iZIOVgtieMySic0pChcsrg/A7djlO4AqCsNIUg5qI8lDGOAFxdWBHFqQ1Y8JhmxTIGxc2GbJCcaTpDVyK3QW5N9CZ7oNanQQ6VN68UFTZX2i6xMQIub6eREdzMn8iCM/lmDEjMFvjxLS4XJepkiVX4AbuLqSV+48XkAAAAASUVORK5CYII=",chainId:137,chainType:"matic",chainTypeMoralis:"polygon",tokenTrendingDefault:["0x7ceb23fd6bc0add59e62ac25578270cff1b9f619","0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6"],isSupported:!0},8453:{...Io,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACFhJREFUeAHtnT1sHEUUx/+7pCJIuAltzjVIdppQ+lwT5A8kKG3TIYESSwhKn0sQUhwpiDJ2SSRiI5Ha55YmjpTUXrehuQY6e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GpKOdllJaypPf3TD+EYui5uoHFWrNgSxgrGOC85AhyxHgapGhmkF4QFBgIcw1MnNgrDEuQr97ONL16FMER4EaTem5teEJJRRzYWs9lo+stSZ4xIGrkI03Ym4bmhC8mo5RGhpbBcBa2GmzRtLSfpRXXyppslk01SRgYtjxJy6tDGLccUhpvz5+8AH942Gyx7SbYCnL/rJq6d55JdmWFTsIS6h+E4cmibl1CLMkiOjSUT6tarCU5ar8o3ffIAeCCCvK7Sw+QQR82J3ezC5YFwrO1oyb5U8DsrN2IQucsaxLT04e3/qscVsxqeovPaNLgXhJiWF89crhIXCq7acqHQkVX04keQBDYVM9bSQDXwYhW9+BWEGGtpuWgSkysmVrTStlC1xb8gCWUVxqN7GkV2giSUQxiTMKjiZARRvvO0ZC9IgplQNlGkGMP5BPObmVLr2TWNIz9BemH/DLbLMB0aGsiWKN4bw+0YPVnoeVEMQXox62O8CcZ69KKuDWOIwA0y3Fd5oYXIKDakpXiCDGJKoS/iPSzEDbSSsrameOcchiegHZgY0ImLIrB0CBudXcQlRNp5uaK0/A/QqtacrEVArQAAAABJRU5ErkJggg==",chainId:8453,chainType:"base",chainTypeMoralis:"base",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf","0xc47da4cb96ce65a96844a01bfae509f9d5454534"],isSupported:!0},42161:{...Eo,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAEuFJREFUeAHlXQ1sFOeZfmd2ba+NbWwwBv8QbAjY/BuKayeQsE5Acmp0NiRcepe0IVV71zvpjnA65VRdq8JdTydFOsXRnYh6rZqgUpoqTbDbEJwG4qUtDcZOMBiojQleEv5iSGPw7/7MfP3ez5717O7MzuzszOw6fSKz49lvN+N55n2f932/+d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mxtpEygaEgL6xTc1WhYwENoMDPu2+ZjyPW9X3HKxKLc1g1FvIXKobJ2KdKOqnL5qSDIGo3OsDxb9LkTs0qMI/I+uB1phVWP5mHuqrvUCHXvI9Vdz+NVTXbmunXGk4Y40Gi+oI6cZy6J7We7yxPovWnRLLs+EBeOt/xtq7WV7oJmYq62u16sjOS4Vtcy/r8qkEiZn6Wg/VXwUkjtAo1i0BIRNj1rCqMqi50vF2ud3ycD3SpL3MQvh2X74JN0KMvemCLTkRAK8RVgoFHHlkv8krQcmNqYE/WoVMDZucTmtAp4pGYUQ8FQ+glxn6dkIGSIRKbHgomIdmPzcNuoNjYXyiYds9IAn/3JovYMLFLyjMNEyADMeMfLInAMBl/kvTcQtmBJEYGwoRHr9ov9KkIIwKuhIQXfeIB4IEQi+4PngmgKWq3GWQgzGu0CPYmj6kD8tJI5ther87H4mnB1AfcD16/1EbLLHdphbjWyI0SMwpUL7AcQpO+vUNer2nRg6kWImFqxhGfXeWGLyY8dMbvWTNcVCQsIUTCitqv7KJFye9/YQR/0ir2Xeg40gwWwVSXFYnb1/q75y5c0soRPp+zqQZmHahWZI1t7z/5rgcshKUWIgcLj0XHXkrMMzCzYJl7UoJthEiYEcRggseRAyDCq4kkeUZgOyESkBgeeHeKaQytt3CtI66RZrPC2HiRNELkWFW7zU1Esgs4stlucnChEp3GauU5voWtAEgyUoIQObA+RkONKl7kGwknVplNEBIgAueh39sd5Jyt8Tx83g6kHCGRKHO787InsquoX18rgljOT7W1xeadrF9kZGGT+n/scDTZVIfzipx4lbrGAeoarw5njXiS5Yr04s84I4HsxczfIwAAAABJRU5ErkJggg==",chainId:42161,chainType:"arbitrum",chainTypeMoralis:"arbitrum",customName:"Arbitrum",tokenTrendingDefault:["0x82af49447d8a07e3bd95bd0d56f35241523fbab1","0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f"],isSupported:!0},43114:{...xo,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGUAAABkCAYAAACfIP5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dFfac6CE2BFdB6640F4F80f226bc10bAB","0x0555E30da8f98308EdB960aa94C0Db47230d2B9c"],isSupported:!0},59144:{...Mo,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAABkCAYAAACWy14QAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAABydJREFUeAHtnT1MHEcUxx8HEuAGYxdOY+fcpbBl6CJR+NI5FAR3oQJ6irhBiiiAKoEmRkIKXQgN7gwUyB1HgZLOh0SND2iSgs+GS3GQ/3+ZPR3H3bIfsx+3Nz9p2b1jl4/5z7z3Zm7mTZsklIcAp2x7e3vf9fV1H657cPD8sOqo5owH7i3y3NbWdoDzl6urq12cC2dAEkqbJAQWOgo8h0LM4eVruSlwnRR4QJx8uVzehiZFSQixisCCz2Qyoyj4YRROTiIEvzOP372cBEFiEQFln0OhT+OwzUus2IIcHx//KTEQqQiPHz8eg40ejbrWe6CIv20majEiEYGFj9o2jcusNAeRihGqCFVmJyfNSSRihCKCcris+T9JCkArXsPxLiwH3i6aYe2HAH/hMicpAa3hGxxj3d3d/11eXv4tmtEmAmv/gwcPfsEfu4SXXZI++D+9gRDZzs7O3VKppK3zp8UcofyzqP0fRX8HK6kUEeV9p8s8ZSQgEKAPAmxJ6whAWOk+I+obFg0EMkcQYBR/zAdcfiWtB83TjzBPAj+xLQHwLYISYFnSaf+9kAsqhC8RqgQw3BBICM8i0A4iAvoghlp8C+FJBDphCMAoqNVNUCNyCF+LCF93vTzkOkRVYSijoKwYnDhT4WvB7QOuQ1QjgGs4ZPORldbtA65EePTo0W9iBPBCFmb7D7c33+sTOAyN069i8AREyMJRn7sZa3L0CcYPBIb+of++4Q1HcwQBZsQIEISHbsxSQ3OkwtHfxRAIN2apoTmCM/4iphXogmbpeaO5T3XNkXLGWUkhIyMjsrGxIfv7+4KPLa0zX/P9Z8+eSUgwbG34KWPdl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qzZMaVXKKiIVcCEE+bWCBk3TKrPe9HZXwsur3f9axs/lD6B+OonYEA4143wfO0pw78wz9dXV3/ojWkMj+SBmbhB96LRzzvLgUhCp2dnQdGiDvMnpyczIgPfO2zZoS4g28BiO8dB5UQnEH2BmK08pZfgQQggdO72HuvtVrUxABFbZS9LAHRthVwK4Wvqh/w1steak5oWTjIkAxRwXNcLkjKUVvF9+sSgGjdHv7y8vITHTYu+9KWuITmB//Tz6hs7+APS6IRrSIQOmz0JTiRjONNqcivx3EgHN9DgE8SAqHmXWt2p61sP53vmoRIJMnvIMYYhJhuFjGU6VnAEMT7RjtC6STSDIRJFyPqwreJJQ0kM6arXUsSsWmGsvmzdhb3qIk1F6favSSH2jca9cwOFjx+53bUtb4eiUmIqnJ2s4UMo4BeVSf01kQRh1Xw5XJ5Le6CryaxWWmrEqm/gjDPmURXbjYUzTo9pz7vKOK+A9RyblfG8a1Ckgq9lv8B/ms5OCQW+c4AAAAASUVORK5CYII=",chainId:59144,chainType:"linea",chainTypeMoralis:"linea",customName:"Linea",tokenTrendingDefault:["0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f","0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4"],isSupported:!0},130:{.../* @__PURE__ */Ar({...To,id:130,name:"Unichain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://mainnet.unichain.org/"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz",apiUrl:"https://api.uniscan.xyz/api"}},contracts:{...To.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Oo]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[Oo]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[Oo]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:1}),logo:"data:image/png;base64,iVBORw0KGgo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11a51W9xk8v3gDgNs/PbOO0shUqnP0csuRf6kYOs2xYGDMZsgvi5c9oFIcwQ5+w74qBJYi2SdmAtjF6TbLRivSXn9cUEBT1CCU/pLX4iQTGRQzsuL6v56Wvuh/Wf/wr84BsfnPn05p3N66kk1tO1LRjw51vvPWRdZ8/X7pmtOGFtedDRwW9tDWBeTJLUM7nixg9u7bb41DAoeWFIcLWGCM7VR8b3ZKlsnFdQa0hJX+IDhAFsafojfpRxxcf5yA9rRHZ0KZiCpQNoD669u7zrS18vL/36e2c+u+mR5vJUE+lnur0KDl36+uKkk0/uHn3iUrfP8RBm9qr4F1LlabPjgHa621G0NOYnmPBTzqF+Rpb0qyL1upmYFtKAKEUUM1mRlv9wdSsyA4hR5XCIpoWeF1FoN3OOl568657yx5d9t7zu/KrjLv2N6U9sgZ/h9jNngG1nw9l+urjx8KP8umNPaZ9wDCL7F7Rje280CG3X6zDsHM9s1VKgh+bvBXCen4jdzSQs7dfPIbVjIv8MBiKqrIB8cqnIb5/x5XDox7ciurzunNF/XL4hrv/+5cONd1wKl5bwDGzPGAOaG/1s7mGwZPffzk9du4dbfsiWYvjcdsz33aNYsbJXdLtYB+jgSNtorilUoh/UbUXCox0veH4UIqYMKGzGgDqO8PshpubHiN2H24fb5+6vtjyIKOmO5ePeTbfGe274RHn+HSOYWP9MEb25/VwwYMftBbDfosWwdPGHDnvX7geu2H/dtmJuHchvpC5Dek9hjXkVeu4J1BVJZaDdwr9Yna+GWBLdgJ77p3mWbVpdLb77e3dfcfOZt/3dfYshm74UfjwLP2fb/wd5ICT31PZzFAAAAABJRU5ErkJggg==",chainId:130,chainType:"unichain",chainTypeMoralis:"unichain",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0x0555e30da8f98308edb960aa94c0db47230d2b9c"],isSupported:!1},7565164:{id:7565164,name:"Solana",nativeCurrency:{decimals:18,name:"Solana",symbol:"SOL"},rpcUrls:{default:{http:[""]}},logo:"https://ipfs.pantograph.app/ipfs/QmZhKcFZVvw5r3cGLfSLsLcd1GzbQK5Vf7aoVYvgktzUUA?filename=Solana_logo.png",chainId:7565164,isSupported:!1}},Uo=e=>{const t=Object.values(Ro).find(t=>t.chainTypeMoralis===e);return t?.chainType||null};var Lo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Do(e){return e&&e.S&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fo(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"S",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var qo,Ho,Vo,Wo={},jo={},Yo={};function zo(){return Vo||(Vo=1,function(e){const t=function(){if(qo)return jo;qo=1,jo.byteLength=function(e){var t=i(e),n=t[0],r=t[1];return 3*(n+r)/4-r},jo.toByteArray=function(e){var r,o,a=i(e),s=a[0],c=a[1],u=new n(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),l=0,d=c>0?s-4:s;for(o=0;o<d;o+=4)r=t[e.charCodeAt(o)]<<18|t[e.charCodeAt(o+1)]<<12|t[e.charCodeAt(o+2)]<<6|t[e.charCodeAt(o+3)],u[l++]=r>>16&255,u[l++]=r>>8&255,u[l++]=255&r;return 2===c&&(r=t[e.charCodeAt(o)]<<2|t[e.charCodeAt(o+1)]>>4,u[l++]=255&r),1===c&&(r=t[e.charCodeAt(o)]<<10|t[e.charCodeAt(o+1)]<<4|t[e.charCodeAt(o+2)]>>2,u[l++]=r>>8&255,u[l++]=255&r),u},jo.fromByteArray=function(t){for(var n,r=t.length,o=r%3,i=[],a=16383,c=0,u=r-o;c<u;c+=a)i.push(s(t,c,c+a>u?u:c+a));return 1===o?(n=t[r-1],i.push(e[n>>2]+e[n<<4&63]+"==")):2===o&&(n=(t[r-2]<<8)+t[r-1],i.push(e[n>>10]+e[n>>4&63]+e[n<<2&63]+"=")),i.join("")};for(var e=[],t=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)e[o]=r[o],t[r.charCodeAt(o)]=o;function i(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function a(t){return e[t>>18&63]+e[t>>12&63]+e[t>>6&63]+e[63&t]}function s(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(a(r));return o.join("")}return t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63,jo}(),n=(Ho||(Ho=1,Yo.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,u=c>>1,l=-7,d=n?o-1:0,f=n?-1:1,h=e[t+d];for(d+=f,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+d],d+=f,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+d],d+=f,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=u}return(h?-1:1)*a*Math.pow(2,i-r)},Yo.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,d=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,o),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=p,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[n+h]=255&a,h+=p,a/=256,u-=8);e[n+h-p]|=128*m}),Yo),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},e.INSPECT_MAX_BYTES=50;const o=2147483647;function i(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return s(e,t,n)}function s(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|h(e,t);let r=i(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return d(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return d(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return a.from(r,t,n);const o=function(e){if(a.isBuffer(e)){const t=0|f(e.length),n=i(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?i(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),i(e<0?0:0|f(e))}function l(e){const t=e.length<0?0:0|f(e.length),n=i(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function d(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,a.prototype),r}function f(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function h(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(o)return r?-1:Y(e).length;t=(""+t).toLowerCase(),o=!0}}function p(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){let i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let r=-1;for(i=n;i<s;i++)if(u(e,i)===u(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===c)return r*a}else-1!==r&&(i-=i-r),r=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){let n=!0;for(let r=0;r<c;r++)if(u(e,i+r)!==u(t,r)){n=!1;break}if(n)return i}return-1}function y(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(X(r))return a;e[n+a]=r}return a}function b(e,t,n,r){return G(Y(t,e.length-n),e,n,r)}function v(e,t,n,r){return G(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function A(e,t,n,r){return G(z(t),e,n,r)}function k(e,t,n,r){return G(function(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function T(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function E(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=x));return n}(r)}e.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"undefined"!=typeof console&&console.error,Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,n){return s(e,t,n)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,n){return function(e,t,n){return c(e),e<=0?i(e):void 0!==t?"string"==typeof n?i(e).fill(t,n):i(e).fill(t):i(e)}(e,t,n)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e.N&&e!==a.prototype},a.compare=function(e,t){if(J(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=a.allocUnsafe(t);let o=0;for(n=0;n<e.length;++n){let t=e[n];if(J(t,Uint8Array))o+t.length>r.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!a.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},a.byteLength=h,a.prototype.N=!0,a.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){let t="";const n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(e,t,n,r,o){if(J(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const c=Math.min(i,s),u=this.slice(r,o),l=e.slice(t,n);for(let a=0;a<c;++a)if(u[a]!==l[a]){i=u[a],s=l[a];break}return i<s?-1:s<i?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return v(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this.M||this,0)}};const x=4096;function C(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function I(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function S(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let i=t;i<n;++i)o+=K[e[i]];return o}function N(e,t,n){const r=e.slice(t,n);let o="";for(let i=0;i<r.length-1;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function B(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,o,i){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r,o){H(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function O(e,t,n,r,o){H(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function R(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,r,o,i){return t=+t,r>>>=0,i||R(e,0,r,4),n.write(e,t,r,o,23,4),r+4}function L(e,t,r,o,i){return t=+t,r>>>=0,i||R(e,0,r,8),n.write(e,t,r,o,52,8),r+8}a.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,a.prototype),r},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e],o=1,i=0;for(;++i<t&&(o*=256);)r+=this[e+i]*o;return r},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=Q(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<<BigInt(32))}),a.prototype.readBigUInt64BE=Q(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(o)}),a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e],o=1,i=0;for(;++i<t&&(o*=256);)r+=this[e+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},a.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=Q(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),a.prototype.readBigInt64BE=Q(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),n.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),n.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),n.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),n.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=Q(function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Q(function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let o=0,i=1,a=0;for(this[t]=255&e;++o<n&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=Q(function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Q(function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const o=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),o},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{const i=a.isBuffer(e)?e:a.from(e,r),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=i[o%s]}return this};const D={};function F(e,t,n){D[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function H(e,t,n,r,o,i){if(e>n||e<t){const n="bigint"==typeof t?"n":"";let r;throw r=0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`,new D.ERR_OUT_OF_RANGE("value",r,e)}!function(e,t,n){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||W(t,e.length-(n+1))}(r,o,i)}function V(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,n){if(Math.floor(e)!==e)throw V(e,n),new D.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),F("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),F("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=q(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r},RangeError);const j=/[^+/0-9A-Za-z-_]/g;function Y(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function z(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}}(Wo)),Wo}var Go=zo();const Jo=BigInt(0),Xo=BigInt(1),Ko=BigInt(2),Qo=BigInt(8),Zo={zip215:!0};const _o=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),$o=/* @__PURE__ */BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const ei=BigInt(1),ti=BigInt(2);BigInt(3);const ni=BigInt(5),ri=BigInt(8);function oi(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function ii(e,t){const n=_o,r=Mr(t*t*t,n),o=function(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),i=_o,a=e*e%i*e%i,s=Pr(a,ti,i)*a%i,c=Pr(s,ei,i)*e%i,u=Pr(c,ni,i)*c%i,l=Pr(u,t,i)*u%i,d=Pr(l,n,i)*l%i,f=Pr(d,r,i)*d%i,h=Pr(f,o,i)*f%i,p=Pr(h,o,i)*f%i,m=Pr(p,t,i)*u%i;return{pow_p_5_8:Pr(m,ti,i)*e%i,b2:a}}(e*Mr(r*r*t,n)).pow_p_5_8;let i=Mr(e*r*o,n);const a=Mr(t*i*i,n),s=i,c=Mr(i*$o,n),u=a===e,l=a===Mr(-e,n),d=a===Mr(-e*$o,n);return u&&(i=s),(l||d)&&(i=c),(Mr(i,n)&xr)===xr&&(i=Mr(-i,n)),{isValid:u||l,value:i}}const ai=/* @__PURE__ */(()=>Hr(_o,void 0,!0))(),si=/* @__PURE__ */(()=>({a:ai.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:ai,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:ri,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:Mn,randomBytes:qe,adjustScalarBytes:oi,uvRatio:ii}))(),ci=/* @__PURE__ */(()=>function(e){const t=function(e){const t=eo(e);return lr(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}(e),{Fp:n,n:r,prehash:o,hash:i,randomBytes:a,nByteLength:s,h:c}=t,u=Ko<<BigInt(8*s)-Xo,l=n.create,d=Hr(t.n,t.nBitLength);if(!function(e,r){const o=n.sqr(e),i=n.sqr(r),a=n.add(n.mul(t.a,o),i),s=n.add(n.ONE,n.mul(t.d,n.mul(o,i)));return n.eql(a,s)}(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const f=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:n.sqrt(e*n.inv(t))}}catch(r){return{isValid:!1,value:Jo}}}),h=t.adjustScalarBytes||(e=>e),p=t.domain||((e,t,n)=>{if(jn("phflag",n),t.length||n)throw new Error("Contexts/pre-hash are not supported");return e});function m(e,t,n=!1){ir("coordinate "+e,t,n?Xo:Jo,u)}function w(e){if(!(e instanceof b))throw new Error("ExtendedPoint expected")}const g=dr((e,t)=>{const{ex:r,ey:o,ez:i}=e,a=e.is0();null==t&&(t=a?Qo:n.inv(i));const s=l(r*t),c=l(o*t),u=l(i*t);if(a)return{x:Jo,y:Xo};if(u!==Xo)throw new Error("invZ was invalid");return{x:s,y:c}}),y=dr(e=>{const{a:n,d:r}=t;if(e.is0())throw new Error("bad point: ZERO");const{ex:o,ey:i,ez:a,et:s}=e,c=l(o*o),u=l(i*i),d=l(a*a),f=l(d*d),h=l(c*n);if(l(d*l(h+u))!==l(f+l(r*l(c*u))))throw new Error("bad point: equation left != right (1)");if(l(o*i)!==l(a*s))throw new Error("bad point: equation left != right (2)");return!0});class b{constructor(e,t,n,r){m("x",e),m("y",t),m("z",n,!0),m("t",r),this.ex=e,this.ey=t,this.ez=n,this.et=r,Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof b)throw new Error("extended point not allowed");const{x:t,y:n}=e||{};return m("x",t),m("y",n),new b(t,n,Xo,l(t*n))}static normalizeZ(e){const t=Dr(n,e.map(e=>e.ez));return e.map((e,n)=>e.toAffine(t[n])).map(b.fromAffine)}static msm(e,t){return $r(b,d,e,t)}I(e){k.setWindowSize(this,e)}assertValidity(){y(this)}equals(e){w(e);const{ex:t,ey:n,ez:r}=this,{ex:o,ey:i,ez:a}=e,s=l(t*a),c=l(o*r),u=l(n*a),d=l(i*r);return s===c&&u===d}is0(){return this.equals(b.ZERO)}negate(){return new b(l(-this.ex),this.ey,this.ez,l(-this.et))}double(){const{a:e}=t,{ex:n,ey:r,ez:o}=this,i=l(n*n),a=l(r*r),s=l(Ko*l(o*o)),c=l(e*i),u=n+r,d=l(l(u*u)-i-a),f=c+a,h=f-s,p=c-a,m=l(d*h),w=l(f*p),g=l(d*p),y=l(h*f);return new b(m,w,y,g)}add(e){w(e);const{a:n,d:r}=t,{ex:o,ey:i,ez:a,et:s}=this,{ex:c,ey:u,ez:d,et:f}=e,h=l(o*c),p=l(i*u),m=l(s*r*f),g=l(a*d),y=l((o+i)*(c+u)-h-p),v=g-m,A=g+m,k=l(p-n*h),T=l(y*v),E=l(A*k),x=l(y*k),C=l(v*A);return new b(T,E,C,x)}subtract(e){return this.add(e.negate())}wNAF(e){return k.wNAFCached(this,e,b.normalizeZ)}multiply(e){const t=e;ir("scalar",t,Xo,r);const{p:n,f:o}=this.wNAF(t);return b.normalizeZ([n,o])[0]}multiplyUnsafe(e,t=b.ZERO){const n=e;return ir("scalar",n,Jo,r),n===Jo?A:this.is0()||n===Xo?this:k.wNAFCachedUnsafe(this,n,b.normalizeZ,t)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return k.unsafeLadder(this,r).is0()}toAffine(e){return g(this,e)}clearCofactor(){const{h:e}=t;return e===Xo?this:this.multiplyUnsafe(e)}static fromHex(e,r=!1){const{d:o,a:i}=t,a=n.BYTES;e=tr("pointHex",e,a),jn("zip215",r);const s=e.slice(),c=e[a-1];s[a-1]=-129&c;const d=_n(s),h=r?u:n.ORDER;ir("pointHex.y",d,Jo,h);const p=l(d*d),m=l(p-Xo),w=l(o*p-i);let{isValid:g,value:y}=f(m,w);if(!g)throw new Error("Point.fromHex: invalid y coordinate");const v=(y&Xo)===Xo,A=!!(128&c);if(!r&&y===Jo&&A)throw new Error("Point.fromHex: x=0 and x_0=1");return A!==v&&(y=l(-y)),b.fromAffine({x:y,y:d})}static fromPrivateKey(e){const{scalar:t}=x(e);return v.multiply(t)}toRawBytes(){const{x:e,y:t}=this.toAffine(),r=er(t,n.BYTES);return r[r.length-1]|=e&Xo?128:0,r}toHex(){return Xn(this.toRawBytes())}}b.BASE=new b(t.Gx,t.Gy,Xo,l(t.Gx*t.Gy)),b.ZERO=new b(Jo,Xo,Xo,Jo);const{BASE:v,ZERO:A}=b,k=_r(b,8*s);function T(e){return Mr(e,r)}function E(e){return T(_n(e))}function x(e){const t=n.BYTES;e=tr("private key",e,t);const r=tr("hashed private key",i(e),2*t),o=h(r.slice(0,t));return{head:o,prefix:r.slice(t,2*t),scalar:E(o)}}function C(e){const{head:t,prefix:n,scalar:r}=x(e),o=v.multiply(r),i=o.toRawBytes();return{head:t,prefix:n,scalar:r,point:o,pointBytes:i}}function I(e=Uint8Array.of(),...t){const n=nr(...t);return E(i(p(n,tr("context",e),!!o)))}const S=Zo;return v.I(8),{CURVE:t,getPublicKey:function(e){return C(e).pointBytes},sign:function(e,t,i={}){e=tr("message",e),o&&(e=o(e));const{prefix:a,scalar:s,pointBytes:c}=C(t),u=I(i.context,a,e),l=v.multiply(u).toRawBytes(),d=T(u+I(i.context,l,c,e)*s);return ir("signature.s",d,Jo,r),tr("result",nr(l,er(d,n.BYTES)),2*n.BYTES)},verify:function(e,t,r,i=S){const{context:a,zip215:s}=i,c=n.BYTES;e=tr("signature",e,2*c),t=tr("message",t),r=tr("publicKey",r,c),void 0!==s&&jn("zip215",s),o&&(t=o(t));const u=_n(e.slice(c,2*c));let l,d,f;try{l=b.fromHex(r,s),d=b.fromHex(e.slice(0,c),s),f=v.multiplyUnsafe(u)}catch(p){return!1}if(!s&&l.isSmallOrder())return!1;const h=I(a,d.toRawBytes(),l.toRawBytes(),t);return d.add(l.multiplyUnsafe(h)).subtract(f).clearCofactor().equals(b.ZERO)},ExtendedPoint:b,utils:{getExtendedPublicKey:C,randomPrivateKey:()=>a(n.BYTES),precompute:(e=8,t=b.BASE)=>(t.I(e),t.multiply(BigInt(3)),t)}}}(si))();var ui={exports:{}};const li=/* @__PURE__ */Fo(/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var di,fi=ui.exports;function hi(){return di||(di=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this.P(e||0,t||10,n||"be"))}var i;"object"==typeof ui?ui.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{i="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:li.Buffer}catch(C){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function s(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function c(e,t,r,o){for(var i=0,a=0,s=Math.min(e.length,r),c=t;c<s;c++){var u=e.charCodeAt(c)-48;i*=o,a=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&a<o,"Invalid character"),i+=a}return i}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype.P=function(e,t,r){if("number"==typeof e)return this.O(e,t,r);if("object"==typeof e)return this.R(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o<e.length&&(16===t?this.U(e,o,r):(this.L(e,t,o),"le"===r&&this.R(this.toArray(),t,r)))},o.prototype.O=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this.R(this.toArray(),t,r)},o.prototype.R=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var i,a,s=0;if("be"===r)for(o=e.length-1,i=0;o>=0;o-=3)a=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(o=0,i=0;o<e.length;o+=3)a=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.q()},o.prototype.U=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var o,i=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)o=s(e,t,r)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)o=s(e,t,r)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this.q()},o.prototype.L=function(e,t,n){this.words=[0],this.length=1;for(var r=0,o=1;o<=67108863;o*=t)r++;r--,o=o/t|0;for(var i=e.length-n,a=i%r,s=Math.min(i,i-a)+n,u=0,l=n;l<s;l+=r)u=c(e,l,l+r,t),this.imuln(o),this.words[0]+u<67108864?this.words[0]+=u:this.V(u);if(0!==a){var d=1;for(u=c(e,l,e.length,t),l=0;l<a;l++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this.V(u)}this.q()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.W=function(e){u(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype.j=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.q=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this.Y()},o.prototype.Y=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[/* @__PURE__ */Symbol.for("nodejs.util.inspect.custom")]=l}catch(C){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var o=0|e.words[0],i=0|t.words[0],a=o*i,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var u=1;u<r;u++){for(var l=c>>>26,d=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;l+=(a=(o=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[u]=0|d,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.q()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var o=0,i=0,a=0;a<this.length;a++){var s=this.words[a],c=(16777215&(s<<o|i)).toString(16);i=s>>>24-o&16777215,(o+=2)>=26&&(o-=26,a--),r=0!==i||a!==this.length-1?d[6-c.length]+c+r:c+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],l=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(l).toString(e);r=(p=p.idivn(l)).isZero()?m+r:d[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},i&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(i,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this.q();var o=this.byteLength(),i=r||Math.max(1,o);n(o<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,o),a},o.prototype.J=function(e,t){for(var n=0,r=0,o=0,i=0;o<this.length;o++){var a=this.words[o]<<i|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===i?(n<e.length&&(e[n++]=a>>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},o.prototype.X=function(e,t){for(var n=e.length-1,r=0,o=0,i=0;o<this.length;o++){var a=this.words[o]<<i|r;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===i?(n>=0&&(e[n--]=a>>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype.K=function(e){return 32-Math.clz32(e)}:o.prototype.K=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype.Z=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this.K(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this.Z(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.q()},o.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.q()},o.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.q()},o.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this.j(t),r>0&&t--;for(var o=0;o<t;o++)this.words[o]=67108863&~this.words[o];return r>0&&(this.words[o]=~this.words[o]&67108863>>26-r),this.q()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this.j(r+1),this.words[r]=t?this.words[r]|1<<o:this.words[r]&~(1<<o),this.q()},o.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this.Y();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t.Y();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var o=0,i=0;i<r.length;i++)t=(0|n.words[i])+(0|r.words[i])+o,this.words[i]=67108863&t,o=t>>>26;for(;0!==o&&i<n.length;i++)t=(0|n.words[i])+o,this.words[i]=67108863&t,o=t>>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;i<n.length;i++)this.words[i]=n.words[i];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t.Y()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this.Y();var n,r,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)i=(t=(0|n.words[a])-(0|r.words[a])+i)>>26,this.words[a]=67108863&t;for(;0!==i&&a<n.length;a++)i=(t=(0|n.words[a])+i)>>26,this.words[a]=67108863&t;if(0===i&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.q()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,o,i,a=e.words,s=t.words,c=n.words,u=0,l=0|a[0],d=8191&l,f=l>>>13,h=0|a[1],p=8191&h,m=h>>>13,w=0|a[2],g=8191&w,y=w>>>13,b=0|a[3],v=8191&b,A=b>>>13,k=0|a[4],T=8191&k,E=k>>>13,x=0|a[5],C=8191&x,I=x>>>13,S=0|a[6],N=8191&S,B=S>>>13,M=0|a[7],P=8191&M,O=M>>>13,R=0|a[8],U=8191&R,L=R>>>13,D=0|a[9],F=8191&D,q=D>>>13,H=0|s[0],V=8191&H,W=H>>>13,j=0|s[1],Y=8191&j,z=j>>>13,G=0|s[2],J=8191&G,X=G>>>13,K=0|s[3],Q=8191&K,Z=K>>>13,_=0|s[4],$=8191&_,ee=_>>>13,te=0|s[5],ne=8191&te,re=te>>>13,oe=0|s[6],ie=8191&oe,ae=oe>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],de=8191&le,fe=le>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var we=(u+(r=Math.imul(d,V))|0)+((8191&(o=(o=Math.imul(d,W))+Math.imul(f,V)|0))<<13)|0;u=((i=Math.imul(f,W))+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(p,V),o=(o=Math.imul(p,W))+Math.imul(m,V)|0,i=Math.imul(m,W);var ge=(u+(r=r+Math.imul(d,Y)|0)|0)+((8191&(o=(o=o+Math.imul(d,z)|0)+Math.imul(f,Y)|0))<<13)|0;u=((i=i+Math.imul(f,z)|0)+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,V),o=(o=Math.imul(g,W))+Math.imul(y,V)|0,i=Math.imul(y,W),r=r+Math.imul(p,Y)|0,o=(o=o+Math.imul(p,z)|0)+Math.imul(m,Y)|0,i=i+Math.imul(m,z)|0;var ye=(u+(r=r+Math.imul(d,J)|0)|0)+((8191&(o=(o=o+Math.imul(d,X)|0)+Math.imul(f,J)|0))<<13)|0;u=((i=i+Math.imul(f,X)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(v,V),o=(o=Math.imul(v,W))+Math.imul(A,V)|0,i=Math.imul(A,W),r=r+Math.imul(g,Y)|0,o=(o=o+Math.imul(g,z)|0)+Math.imul(y,Y)|0,i=i+Math.imul(y,z)|0,r=r+Math.imul(p,J)|0,o=(o=o+Math.imul(p,X)|0)+Math.imul(m,J)|0,i=i+Math.imul(m,X)|0;var be=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(o=(o=o+Math.imul(d,Z)|0)+Math.imul(f,Q)|0))<<13)|0;u=((i=i+Math.imul(f,Z)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(T,V),o=(o=Math.imul(T,W))+Math.imul(E,V)|0,i=Math.imul(E,W),r=r+Math.imul(v,Y)|0,o=(o=o+Math.imul(v,z)|0)+Math.imul(A,Y)|0,i=i+Math.imul(A,z)|0,r=r+Math.imul(g,J)|0,o=(o=o+Math.imul(g,X)|0)+Math.imul(y,J)|0,i=i+Math.imul(y,X)|0,r=r+Math.imul(p,Q)|0,o=(o=o+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,i=i+Math.imul(m,Z)|0;var ve=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((i=i+Math.imul(f,ee)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(C,V),o=(o=Math.imul(C,W))+Math.imul(I,V)|0,i=Math.imul(I,W),r=r+Math.imul(T,Y)|0,o=(o=o+Math.imul(T,z)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,z)|0,r=r+Math.imul(v,J)|0,o=(o=o+Math.imul(v,X)|0)+Math.imul(A,J)|0,i=i+Math.imul(A,X)|0,r=r+Math.imul(g,Q)|0,o=(o=o+Math.imul(g,Z)|0)+Math.imul(y,Q)|0,i=i+Math.imul(y,Z)|0,r=r+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(d,ne)|0)|0)+((8191&(o=(o=o+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;u=((i=i+Math.imul(f,re)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(N,V),o=(o=Math.imul(N,W))+Math.imul(B,V)|0,i=Math.imul(B,W),r=r+Math.imul(C,Y)|0,o=(o=o+Math.imul(C,z)|0)+Math.imul(I,Y)|0,i=i+Math.imul(I,z)|0,r=r+Math.imul(T,J)|0,o=(o=o+Math.imul(T,X)|0)+Math.imul(E,J)|0,i=i+Math.imul(E,X)|0,r=r+Math.imul(v,Q)|0,o=(o=o+Math.imul(v,Z)|0)+Math.imul(A,Q)|0,i=i+Math.imul(A,Z)|0,r=r+Math.imul(g,$)|0,o=(o=o+Math.imul(g,ee)|0)+Math.imul(y,$)|0,i=i+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,re)|0)+Math.imul(m,ne)|0,i=i+Math.imul(m,re)|0;var ke=(u+(r=r+Math.imul(d,ie)|0)|0)+((8191&(o=(o=o+Math.imul(d,ae)|0)+Math.imul(f,ie)|0))<<13)|0;u=((i=i+Math.imul(f,ae)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(P,V),o=(o=Math.imul(P,W))+Math.imul(O,V)|0,i=Math.imul(O,W),r=r+Math.imul(N,Y)|0,o=(o=o+Math.imul(N,z)|0)+Math.imul(B,Y)|0,i=i+Math.imul(B,z)|0,r=r+Math.imul(C,J)|0,o=(o=o+Math.imul(C,X)|0)+Math.imul(I,J)|0,i=i+Math.imul(I,X)|0,r=r+Math.imul(T,Q)|0,o=(o=o+Math.imul(T,Z)|0)+Math.imul(E,Q)|0,i=i+Math.imul(E,Z)|0,r=r+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(A,$)|0,i=i+Math.imul(A,ee)|0,r=r+Math.imul(g,ne)|0,o=(o=o+Math.imul(g,re)|0)+Math.imul(y,ne)|0,i=i+Math.imul(y,re)|0,r=r+Math.imul(p,ie)|0,o=(o=o+Math.imul(p,ae)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,ae)|0;var Te=(u+(r=r+Math.imul(d,ce)|0)|0)+((8191&(o=(o=o+Math.imul(d,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((i=i+Math.imul(f,ue)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(U,V),o=(o=Math.imul(U,W))+Math.imul(L,V)|0,i=Math.imul(L,W),r=r+Math.imul(P,Y)|0,o=(o=o+Math.imul(P,z)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,z)|0,r=r+Math.imul(N,J)|0,o=(o=o+Math.imul(N,X)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,X)|0,r=r+Math.imul(C,Q)|0,o=(o=o+Math.imul(C,Z)|0)+Math.imul(I,Q)|0,i=i+Math.imul(I,Z)|0,r=r+Math.imul(T,$)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,r=r+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,re)|0)+Math.imul(A,ne)|0,i=i+Math.imul(A,re)|0,r=r+Math.imul(g,ie)|0,o=(o=o+Math.imul(g,ae)|0)+Math.imul(y,ie)|0,i=i+Math.imul(y,ae)|0,r=r+Math.imul(p,ce)|0,o=(o=o+Math.imul(p,ue)|0)+Math.imul(m,ce)|0,i=i+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(d,de)|0)|0)+((8191&(o=(o=o+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((i=i+Math.imul(f,fe)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(F,V),o=(o=Math.imul(F,W))+Math.imul(q,V)|0,i=Math.imul(q,W),r=r+Math.imul(U,Y)|0,o=(o=o+Math.imul(U,z)|0)+Math.imul(L,Y)|0,i=i+Math.imul(L,z)|0,r=r+Math.imul(P,J)|0,o=(o=o+Math.imul(P,X)|0)+Math.imul(O,J)|0,i=i+Math.imul(O,X)|0,r=r+Math.imul(N,Q)|0,o=(o=o+Math.imul(N,Z)|0)+Math.imul(B,Q)|0,i=i+Math.imul(B,Z)|0,r=r+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(E,ne)|0,i=i+Math.imul(E,re)|0,r=r+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(A,ie)|0,i=i+Math.imul(A,ae)|0,r=r+Math.imul(g,ce)|0,o=(o=o+Math.imul(g,ue)|0)+Math.imul(y,ce)|0,i=i+Math.imul(y,ue)|0,r=r+Math.imul(p,de)|0,o=(o=o+Math.imul(p,fe)|0)+Math.imul(m,de)|0,i=i+Math.imul(m,fe)|0;var xe=(u+(r=r+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;u=((i=i+Math.imul(f,me)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(F,Y),o=(o=Math.imul(F,z))+Math.imul(q,Y)|0,i=Math.imul(q,z),r=r+Math.imul(U,J)|0,o=(o=o+Math.imul(U,X)|0)+Math.imul(L,J)|0,i=i+Math.imul(L,X)|0,r=r+Math.imul(P,Q)|0,o=(o=o+Math.imul(P,Z)|0)+Math.imul(O,Q)|0,i=i+Math.imul(O,Z)|0,r=r+Math.imul(N,$)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,ee)|0,r=r+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,re)|0)+Math.imul(I,ne)|0,i=i+Math.imul(I,re)|0,r=r+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,ae)|0,r=r+Math.imul(v,ce)|0,o=(o=o+Math.imul(v,ue)|0)+Math.imul(A,ce)|0,i=i+Math.imul(A,ue)|0,r=r+Math.imul(g,de)|0,o=(o=o+Math.imul(g,fe)|0)+Math.imul(y,de)|0,i=i+Math.imul(y,fe)|0;var Ce=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((i=i+Math.imul(m,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(F,J),o=(o=Math.imul(F,X))+Math.imul(q,J)|0,i=Math.imul(q,X),r=r+Math.imul(U,Q)|0,o=(o=o+Math.imul(U,Z)|0)+Math.imul(L,Q)|0,i=i+Math.imul(L,Z)|0,r=r+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,r=r+Math.imul(N,ne)|0,o=(o=o+Math.imul(N,re)|0)+Math.imul(B,ne)|0,i=i+Math.imul(B,re)|0,r=r+Math.imul(C,ie)|0,o=(o=o+Math.imul(C,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0,r=r+Math.imul(T,ce)|0,o=(o=o+Math.imul(T,ue)|0)+Math.imul(E,ce)|0,i=i+Math.imul(E,ue)|0,r=r+Math.imul(v,de)|0,o=(o=o+Math.imul(v,fe)|0)+Math.imul(A,de)|0,i=i+Math.imul(A,fe)|0;var Ie=(u+(r=r+Math.imul(g,pe)|0)|0)+((8191&(o=(o=o+Math.imul(g,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((i=i+Math.imul(y,me)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(F,Q),o=(o=Math.imul(F,Z))+Math.imul(q,Q)|0,i=Math.imul(q,Z),r=r+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,ee)|0,r=r+Math.imul(P,ne)|0,o=(o=o+Math.imul(P,re)|0)+Math.imul(O,ne)|0,i=i+Math.imul(O,re)|0,r=r+Math.imul(N,ie)|0,o=(o=o+Math.imul(N,ae)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,ae)|0,r=r+Math.imul(C,ce)|0,o=(o=o+Math.imul(C,ue)|0)+Math.imul(I,ce)|0,i=i+Math.imul(I,ue)|0,r=r+Math.imul(T,de)|0,o=(o=o+Math.imul(T,fe)|0)+Math.imul(E,de)|0,i=i+Math.imul(E,fe)|0;var Se=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((i=i+Math.imul(A,me)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(F,$),o=(o=Math.imul(F,ee))+Math.imul(q,$)|0,i=Math.imul(q,ee),r=r+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,re)|0)+Math.imul(L,ne)|0,i=i+Math.imul(L,re)|0,r=r+Math.imul(P,ie)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,ae)|0,r=r+Math.imul(N,ce)|0,o=(o=o+Math.imul(N,ue)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,ue)|0,r=r+Math.imul(C,de)|0,o=(o=o+Math.imul(C,fe)|0)+Math.imul(I,de)|0,i=i+Math.imul(I,fe)|0;var Ne=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(o=(o=o+Math.imul(T,me)|0)+Math.imul(E,pe)|0))<<13)|0;u=((i=i+Math.imul(E,me)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(F,ne),o=(o=Math.imul(F,re))+Math.imul(q,ne)|0,i=Math.imul(q,re),r=r+Math.imul(U,ie)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(L,ie)|0,i=i+Math.imul(L,ae)|0,r=r+Math.imul(P,ce)|0,o=(o=o+Math.imul(P,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,r=r+Math.imul(N,de)|0,o=(o=o+Math.imul(N,fe)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,fe)|0;var Be=(u+(r=r+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,me)|0)+Math.imul(I,pe)|0))<<13)|0;u=((i=i+Math.imul(I,me)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(F,ie),o=(o=Math.imul(F,ae))+Math.imul(q,ie)|0,i=Math.imul(q,ae),r=r+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,ue)|0)+Math.imul(L,ce)|0,i=i+Math.imul(L,ue)|0,r=r+Math.imul(P,de)|0,o=(o=o+Math.imul(P,fe)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,fe)|0;var Me=(u+(r=r+Math.imul(N,pe)|0)|0)+((8191&(o=(o=o+Math.imul(N,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((i=i+Math.imul(B,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(F,ce),o=(o=Math.imul(F,ue))+Math.imul(q,ce)|0,i=Math.imul(q,ue),r=r+Math.imul(U,de)|0,o=(o=o+Math.imul(U,fe)|0)+Math.imul(L,de)|0,i=i+Math.imul(L,fe)|0;var Pe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(o=(o=o+Math.imul(P,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((i=i+Math.imul(O,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(F,de),o=(o=Math.imul(F,fe))+Math.imul(q,de)|0,i=Math.imul(q,fe);var Oe=(u+(r=r+Math.imul(U,pe)|0)|0)+((8191&(o=(o=o+Math.imul(U,me)|0)+Math.imul(L,pe)|0))<<13)|0;u=((i=i+Math.imul(L,me)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Re=(u+(r=Math.imul(F,pe))|0)+((8191&(o=(o=Math.imul(F,me))+Math.imul(q,pe)|0))<<13)|0;return u=((i=Math.imul(q,me))+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,c[0]=we,c[1]=ge,c[2]=ye,c[3]=be,c[4]=ve,c[5]=Ae,c[6]=ke,c[7]=Te,c[8]=Ee,c[9]=xe,c[10]=Ce,c[11]=Ie,c[12]=Se,c[13]=Ne,c[14]=Be,c[15]=Me,c[16]=Pe,c[17]=Oe,c[18]=Re,0!==u&&(c[19]=u,n.length++),n};function w(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,i=0;i<n.length-1;i++){var a=o;o=0;for(var s=67108863&r,c=Math.min(i,t.length-1),u=Math.max(0,i-e.length+1);u<=c;u++){var l=i-u,d=(0|e.words[l])*(0|t.words[u]),f=67108863&d;s=67108863&(f=f+s|0),o+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}n.words[i]=s,r=a,a=o}return 0!==r?n.words[i]=r:n.length--,n.q()}function g(e,t,n){return w(e,t,n)}Math.imul||(m=p),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?p(this,e,t):n<1024?w(this,e,t):g(this,e,t)},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),g(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,o=0;o<this.length;o++){var i=(0|this.words[o])*e,a=(67108863&i)+(67108863&r);r>>=26,r+=i/67108864|0,r+=a>>>26,this.words[o]=67108863&a}return 0!==r&&(this.words[o]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,o=n%26;t[n]=e.words[r]>>>o&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,o=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&i,c=(0|this.words[t])-s<<r;this.words[t]=c|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t<o;t++)this.words[t]=0;this.length+=o}return this.q()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var o;n("number"==typeof e&&e>=0),o=t?(t-t%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<<i,c=r;if(o-=a,o=Math.max(0,o),c){for(var u=0;u<a;u++)c.words[u]=this.words[u];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=o);u--){var d=0|this.words[u];this.words[u]=l<<26-i|d>>>i,l=d&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.q()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,o=1<<t;return!(this.length<=r||!(this.words[r]&o))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var o=67108863^67108863>>>t<<t;this.words[this.length-1]&=o}return 0===this.length&&(this.words[0]=0,this.length=1),this.q()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this.V(e)},o.prototype.V=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.q()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._=function(e,t,r){var o,i,a=e.length+r;this.j(a);var s=0;for(o=0;o<e.length;o++){i=(0|this.words[o+r])+s;var c=(0|e.words[o])*t;s=((i-=67108863&c)>>26)-(c/67108864|0),this.words[o+r]=67108863&i}for(;o<this.length-r;o++)s=(i=(0|this.words[o+r])+s)>>26,this.words[o+r]=67108863&i;if(0===s)return this.q();for(n(-1===s),s=0,o=0;o<this.length;o++)s=(i=-(0|this.words[o])+s)>>26,this.words[o]=67108863&i;return this.negative=1,this.q()},o.prototype.$=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!=(n=26-this.K(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,c=r.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=r.clone()._(i,1,c);0===l.negative&&(r=l,s&&(s.words[c]=1));for(var d=c-1;d>=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),r._(i,f,d);0!==r.negative;)f--,r.negative=0,r._(i,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.q(),r.q(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this.$(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),i=n.cmp(r);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,o=0,i=this.length-1;i>=0;i--)o=(r*o+(0|this.words[i]))%e;return t?-o:o},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,o=this.length-1;o>=0;o--){var i=(0|this.words[o])+67108864*r;this.words[o]=i/e|0,r=i%e}return this.q(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(u)}},o.prototype.ee=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;0===(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var i=t;t=n,n=i}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,o=1<<t;if(this.length<=r)return this.j(r+1),this.words[r]|=o,this;for(var i=o,a=r;0!==i&&a<this.length;a++){var s=0|this.words[a];i=(s+=i)>>>26,s&=67108863,this.words[a]=s}return 0!==i&&(this.words[a]=i,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.q(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],o=0|e.words[n];if(r!==o){r<o?t=-1:r>o&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this).te(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype.te=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this.te(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red.ne(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red.ne(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red.re(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red.re(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red.re(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red.re(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red.re(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red.re(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this.oe()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o.ie(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r.ee(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype.oe=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n.q(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},r(v,b),v.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),o=0;o<r;o++)t.words[o]=e.words[o];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=i&n,o=10;o<e.length;o++){var a=0|e.words[o];e.words[o-10]=(a&n)<<4|i>>>22,i=a}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(A,b),r(k,b),r(T,b),T.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,o=67108863&r;r>>>=26,e.words[n]=o,t=r}return 0!==t&&(e.words[e.length++]=t),e},o.ie=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new A;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return y[e]=t,t},E.prototype.re=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype.ne=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e).te(this):(u(e,e.umod(this.m).te(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e).te(this)},E.prototype.add=function(e,t){this.ne(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n.te(this)},E.prototype.iadd=function(e,t){this.ne(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this.ne(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n.te(this)},E.prototype.isub=function(e,t){this.ne(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this.re(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this.ne(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this.ne(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,w=0;0!==m.cmp(s);w++)m=m.redSqr();n(w<p);var g=this.pow(d,new o(1).iushln(p-w-1));f=f.redMul(g),d=g.redSqr(),h=h.redMul(d),p=w}return f},E.prototype.invm=function(e){var t=e.ee(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],a=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var d=u>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},r(x,E),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i.te(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0).te(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a.te(this)},x.prototype.invm=function(e){return this.imod(e.ee(this.m).mul(this.r2)).te(this)}}(0,fi)),ui.exports}const pi=/* @__PURE__ */Do(hi());var mi,wi,gi,yi,bi,vi={exports:{}};function Ai(){if(bi)return yi;bi=1;var e=function(){if(gi)return wi;gi=1;var e=(mi||(mi=1,function(e,t){var n=zo(),r=n.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=i),i.prototype=Object.create(r.prototype),o(r,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var o=r(e);return void 0!==t?"string"==typeof n?o.fill(t,n):o.fill(t):o.fill(0),o},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(vi,vi.exports)),vi.exports).Buffer;return wi=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var o=0;o<t.length;o++){var i=t.charAt(o),a=i.charCodeAt(0);if(255!==n[a])throw new TypeError(i+" is ambiguous");n[a]=o}var s=t.length,c=t.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function d(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return e.alloc(0);for(var r=0,o=0,i=0;t[r]===c;)o++,r++;for(var a=(t.length-r)*u+1>>>0,l=new Uint8Array(a);r<t.length;){var d=t.charCodeAt(r);if(d>255)return;var f=n[d];if(255===f)return;for(var h=0,p=a-1;(0!==f||h<i)&&-1!==p;p--,h++)f+=s*l[p]>>>0,l[p]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");i=h,r++}for(var m=a-i;m!==a&&0===l[m];)m++;var w=e.allocUnsafe(o+(a-m));w.fill(0,0,o);for(var g=o;m!==a;)w[g++]=l[m++];return w}return{encode:function(n){if((Array.isArray(n)||n instanceof Uint8Array)&&(n=e.from(n)),!e.isBuffer(n))throw new TypeError("Expected Buffer");if(0===n.length)return"";for(var r=0,o=0,i=0,a=n.length;i!==a&&0===n[i];)i++,r++;for(var u=(a-i)*l+1>>>0,d=new Uint8Array(u);i!==a;){for(var f=n[i],h=0,p=u-1;(0!==f||h<o)&&-1!==p;p--,h++)f+=256*d[p]>>>0,d[p]=f%s>>>0,f=f/s>>>0;if(0!==f)throw new Error("Non-zero carry");o=h,i++}for(var m=u-o;m!==u&&0===d[m];)m++;for(var w=c.repeat(r);m<u;++m)w+=t.charAt(d[m]);return w},decodeUnsafe:d,decode:function(e){var t=d(e);if(t)return t;throw new Error("Non-base"+s+" character")}}},wi}();return yi=e("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")}const ki=/* @__PURE__ */Do(Ai());var Ti={};function Ei(e,t,n){return t<=e&&e<=n}function xi(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function Ci(e){this.tokens=[].slice.call(e)}Ci.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var Ii=-1;function Si(e,t){if(e)throw TypeError("Decoder error");return t||65533}var Ni="utf-8";function Bi(e,t){if(!(this instanceof Bi))return new Bi(e,t);if((e=void 0!==e?String(e).toLowerCase():Ni)!==Ni)throw new Error("Encoding not supported. Only utf-8 is supported");t=xi(t),this.ae=!1,this.se=!1,this.ce=null,this.ue=Boolean(t.fatal),this.le=Boolean(t.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this.ue}),Object.defineProperty(this,"ignoreBOM",{value:this.le})}function Mi(e,t){if(!(this instanceof Mi))return new Mi(e,t);if((e=void 0!==e?String(e).toLowerCase():Ni)!==Ni)throw new Error("Encoding not supported. Only utf-8 is supported");t=xi(t),this.ae=!1,this.de=null,this.fe={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function Pi(e){var t=e.fatal,n=0,r=0,o=0,i=128,a=191;this.handler=function(e,s){if(-1===s&&0!==o)return o=0,Si(t);if(-1===s)return Ii;if(0===o){if(Ei(s,0,127))return s;if(Ei(s,194,223))o=1,n=s-192;else if(Ei(s,224,239))224===s&&(i=160),237===s&&(a=159),o=2,n=s-224;else{if(!Ei(s,240,244))return Si(t);240===s&&(i=144),244===s&&(a=143),o=3,n=s-240}return n<<=6*o,null}if(!Ei(s,i,a))return n=o=r=0,i=128,a=191,e.prepend(s),Si(t);if(i=128,a=191,n+=s-128<<6*(o-(r+=1)),r!==o)return null;var c=n;return n=o=r=0,c}}function Oi(e){e.fatal,this.handler=function(e,t){if(-1===t)return Ii;if(Ei(t,0,127))return t;var n,r;Ei(t,128,2047)?(n=1,r=192):Ei(t,2048,65535)?(n=2,r=224):Ei(t,65536,1114111)&&(n=3,r=240);for(var o=[(t>>6*n)+r];n>0;){var i=t>>6*(n-1);o.push(128|63&i),n-=1}return o}}Bi.prototype={decode:function(e,t){var n;n="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=xi(t),this.ae||(this.ce=new Pi({fatal:this.ue}),this.se=!1),this.ae=Boolean(t.stream);for(var r,o=new Ci(n),i=[];!o.endOfStream()&&(r=this.ce.handler(o,o.read()))!==Ii;)null!==r&&(Array.isArray(r)?i.push.apply(i,r):i.push(r));if(!this.ae){do{if((r=this.ce.handler(o,o.read()))===Ii)break;null!==r&&(Array.isArray(r)?i.push.apply(i,r):i.push(r))}while(!o.endOfStream());this.ce=null}return i.length&&(-1===["utf-8"].indexOf(this.encoding)||this.le||this.se||(65279===i[0]?(this.se=!0,i.shift()):this.se=!0)),function(e){for(var t="",n=0;n<e.length;++n){var r=e[n];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode(55296+(r>>10),56320+(1023&r)))}return t}(i)}},Mi.prototype={encode:function(e,t){e=e?String(e):"",t=xi(t),this.ae||(this.de=new Oi(this.fe)),this.ae=Boolean(t.stream);for(var n,r=[],o=new Ci(function(e){for(var t=String(e),n=t.length,r=0,o=[];r<n;){var i=t.charCodeAt(r);if(i<55296||i>57343)o.push(i);else if(56320<=i&&i<=57343)o.push(65533);else if(55296<=i&&i<=56319)if(r===n-1)o.push(65533);else{var a=e.charCodeAt(r+1);if(56320<=a&&a<=57343){var s=1023&i,c=1023&a;o.push(65536+(s<<10)+c),r+=1}else o.push(65533)}r+=1}return o}(e));!o.endOfStream()&&(n=this.de.handler(o,o.read()))!==Ii;)Array.isArray(n)?r.push.apply(r,n):r.push(n);if(!this.ae){for(;(n=this.de.handler(o,o.read()))!==Ii;)Array.isArray(n)?r.push.apply(r,n):r.push(n);this.de=null}return new Uint8Array(r)}};const Ri=/* @__PURE__ */Fo(/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,TextDecoder:Bi,TextEncoder:Mi},Symbol.toStringTag,{value:"Module"})));var Ui,Li,Di=function(){if(Ui)return Ti;Ui=1;var e=Ti&&Ti.he||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=Ti&&Ti.pe||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Ti&&Ti.me||function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=Ti&&Ti.we||function(n){if(n&&n.S)return n;var r={};if(null!=n)for(var o in n)"default"!==o&&Object.hasOwnProperty.call(n,o)&&e(r,n,o);return t(r,n),r},o=Ti&&Ti.ge||function(e){return e&&e.S?e:{default:e}};Object.defineProperty(Ti,"S",{value:!0}),Ti.deserializeUnchecked=Ti.deserialize=Ti.serialize=Ti.BinaryReader=Ti.BinaryWriter=Ti.BorshError=Ti.baseDecode=Ti.baseEncode=void 0;const i=o(hi()),a=o(Ai()),s=r(Ri),c=new("function"!=typeof TextDecoder?s.TextDecoder:TextDecoder)("utf-8",{fatal:!0});Ti.baseEncode=function(e){return"string"==typeof e&&(e=Buffer.from(e,"utf8")),a.default.encode(Buffer.from(e))},Ti.baseDecode=function(e){return Buffer.from(a.default.decode(e))};const u=1024;class l extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}Ti.BorshError=l;class d{constructor(){this.buf=Buffer.alloc(u),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(u)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(Buffer.from(new i.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Buffer.from(new i.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Buffer.from(new i.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Buffer.from(new i.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),e,Buffer.alloc(u)]),this.length+=e.length}writeString(e){this.maybeResize();const t=Buffer.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(Buffer.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(const n of e)this.maybeResize(),t(n)}toArray(){return this.buf.subarray(0,this.length)}}function f(e,t,n){const r=n.value;n.value=function(...e){try{return r.apply(this,e)}catch(t){if(t instanceof RangeError){const e=t.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e)>=0)throw new l("Reached the end of buffer when deserializing")}throw t}}}Ti.BinaryWriter=d;class h{constructor(e){this.buf=e,this.offset=0}readU8(){const e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){const e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){const e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){const e=this.readBuffer(8);return new i.default(e,"le")}readU128(){const e=this.readBuffer(16);return new i.default(e,"le")}readU256(){const e=this.readBuffer(32);return new i.default(e,"le")}readU512(){const e=this.readBuffer(64);return new i.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new l(`Expected buffer length ${e} isn't within bounds`);const t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){const e=this.readU32(),t=this.readBuffer(e);try{return c.decode(t)}catch(n){throw new l(`Error decoding UTF-8 string: ${n}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const t=this.readU32(),n=Array();for(let r=0;r<t;++r)n.push(e());return n}}function p(e){return e.charAt(0).toUpperCase()+e.slice(1)}function m(e,t,n,r,o){try{if("string"==typeof r)o[`write${p(r)}`](n);else if(r instanceof Array)if("number"==typeof r[0]){if(n.length!==r[0])throw new l(`Expecting byte array of length ${r[0]}, but got ${n.length} bytes`);o.writeFixedArray(n)}else if(2===r.length&&"number"==typeof r[1]){if(n.length!==r[1])throw new l(`Expecting byte array of length ${r[1]}, but got ${n.length} bytes`);for(let t=0;t<r[1];t++)m(e,null,n[t],r[0],o)}else o.writeArray(n,n=>{m(e,t,n,r[0],o)});else if(void 0!==r.kind)switch(r.kind){case"option":null==n?o.writeU8(0):(o.writeU8(1),m(e,t,n,r.type,o));break;case"map":o.writeU32(n.size),n.forEach((n,i)=>{m(e,t,i,r.key,o),m(e,t,n,r.value,o)});break;default:throw new l(`FieldType ${r} unrecognized`)}else w(e,n,o)}catch(i){throw i instanceof l&&i.addToFieldPath(t),i}}function w(e,t,n){if("function"==typeof t.borshSerialize)return void t.borshSerialize(n);const r=e.get(t.constructor);if(!r)throw new l(`Class ${t.constructor.name} is missing in schema`);if("struct"===r.kind)r.fields.map(([r,o])=>{m(e,r,t[r],o,n)});else{if("enum"!==r.kind)throw new l(`Unexpected schema kind: ${r.kind} for ${t.constructor.name}`);{const o=t[r.field];for(let i=0;i<r.values.length;++i){const[a,s]=r.values[i];if(a===o){n.writeU8(i),m(e,a,t[a],s,n);break}}}}}function g(e,t,n,r){try{if("string"==typeof n)return r[`read${p(n)}`]();if(n instanceof Array){if("number"==typeof n[0])return r.readFixedArray(n[0]);if("number"==typeof n[1]){const t=[];for(let o=0;o<n[1];o++)t.push(g(e,null,n[0],r));return t}return r.readArray(()=>g(e,t,n[0],r))}if("option"===n.kind)return r.readU8()?g(e,t,n.type,r):void 0;if("map"===n.kind){let o=/* @__PURE__ */new Map;const i=r.readU32();for(let a=0;a<i;a++){const i=g(e,t,n.key,r),a=g(e,t,n.value,r);o.set(i,a)}return o}return y(e,n,r)}catch(o){throw o instanceof l&&o.addToFieldPath(t),o}}function y(e,t,n){if("function"==typeof t.borshDeserialize)return t.borshDeserialize(n);const r=e.get(t);if(!r)throw new l(`Class ${t.name} is missing in schema`);if("struct"===r.kind){const r={};for(const[o,i]of e.get(t).fields)r[o]=g(e,o,i,n);return new t(r)}if("enum"===r.kind){const o=n.readU8();if(o>=r.values.length)throw new l(`Enum index: ${o} is out of range`);const[i,a]=r.values[o],s=g(e,i,a,n);return new t({[i]:s})}throw new l(`Unexpected schema kind: ${r.kind} for ${t.constructor.name}`)}return n([f],h.prototype,"readU8",null),n([f],h.prototype,"readU16",null),n([f],h.prototype,"readU32",null),n([f],h.prototype,"readU64",null),n([f],h.prototype,"readU128",null),n([f],h.prototype,"readU256",null),n([f],h.prototype,"readU512",null),n([f],h.prototype,"readString",null),n([f],h.prototype,"readFixedArray",null),n([f],h.prototype,"readArray",null),Ti.BinaryReader=h,Ti.serialize=function(e,t,n=d){const r=new n;return w(e,t,r),r.toArray()},Ti.deserialize=function(e,t,n,r=h){const o=new r(n),i=y(e,t,o);if(o.offset<n.length)throw new l(`Unexpected ${n.length-o.offset} bytes after deserialized data`);return i},Ti.deserializeUnchecked=function(e,t,n,r=h){return y(e,t,new r(n))},Ti}(),Fi={},qi=function(){if(Li)return Fi;Li=1,Object.defineProperty(Fi,"S",{value:!0}),Fi.s16=Fi.s8=Fi.nu64be=Fi.u48be=Fi.u40be=Fi.u32be=Fi.u24be=Fi.u16be=Fi.nu64=Fi.u48=Fi.u40=Fi.u32=Fi.u24=Fi.u16=Fi.u8=Fi.offset=Fi.greedy=Fi.Constant=Fi.UTF8=Fi.CString=Fi.Blob=Fi.Boolean=Fi.BitField=Fi.BitStructure=Fi.VariantLayout=Fi.Union=Fi.UnionLayoutDiscriminator=Fi.UnionDiscriminator=Fi.Structure=Fi.Sequence=Fi.DoubleBE=Fi.Double=Fi.FloatBE=Fi.Float=Fi.NearInt64BE=Fi.NearInt64=Fi.NearUInt64BE=Fi.NearUInt64=Fi.IntBE=Fi.Int=Fi.UIntBE=Fi.UInt=Fi.OffsetLayout=Fi.GreedyCount=Fi.ExternalLayout=Fi.bindConstructorLayout=Fi.nameWithProperty=Fi.Layout=Fi.uint8ArrayToBuffer=Fi.checkUint8Array=void 0,Fi.constant=Fi.utf8=Fi.cstr=Fi.blob=Fi.unionLayoutDiscriminator=Fi.union=Fi.seq=Fi.bits=Fi.struct=Fi.f64be=Fi.f64=Fi.f32be=Fi.f32=Fi.ns64be=Fi.s48be=Fi.s40be=Fi.s32be=Fi.s24be=Fi.s16be=Fi.ns64=Fi.s48=Fi.s40=Fi.s32=Fi.s24=void 0;const e=zo();function t(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}function n(n){return t(n),e.Buffer.from(n.buffer,n.byteOffset,n.length)}Fi.checkUint8Array=t,Fi.uint8ArrayToBuffer=n;let r=class{constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}};function o(e,t){return t.property?e+"["+t.property+"]":e}Fi.Layout=r,Fi.nameWithProperty=o,Fi.bindConstructorLayout=function(e,t){if("function"!=typeof e)throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof r))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=()=>new e,Object.defineProperty(e.prototype,"encode",{value(e,n){return t.encode(this,e,n)},writable:!0}),Object.defineProperty(e,"decode",{value:(e,n)=>t.decode(e,n),writable:!0})};class i extends r{isCount(){throw new Error("ExternalLayout is abstract")}}Fi.ExternalLayout=i;class a extends i{constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,n=0){t(e);const r=e.length-n;return Math.floor(r/this.elementSpan)}encode(e,t,n){return 0}}Fi.GreedyCount=a;class s extends i{constructor(e,t=0,n){if(!(e instanceof r))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,n||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof c||this.layout instanceof u}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,n=0){return this.layout.encode(e,t,n+this.offset)}}Fi.OffsetLayout=s;class c extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readUIntLE(t,this.span)}encode(e,t,r=0){return n(t).writeUIntLE(e,r,this.span),this.span}}Fi.UInt=c;class u extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readUIntBE(t,this.span)}encode(e,t,r=0){return n(t).writeUIntBE(e,r,this.span),this.span}}Fi.UIntBE=u;class l extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readIntLE(t,this.span)}encode(e,t,r=0){return n(t).writeIntLE(e,r,this.span),this.span}}Fi.Int=l;class d extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readIntBE(t,this.span)}encode(e,t,r=0){return n(t).writeIntBE(e,r,this.span),this.span}}Fi.IntBE=d;const f=Math.pow(2,32);function h(e){const t=Math.floor(e/f);return{hi32:t,lo32:e-t*f}}function p(e,t){return e*f+t}class m extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e),o=r.readUInt32LE(t);return p(r.readUInt32LE(t+4),o)}encode(e,t,r=0){const o=h(e),i=n(t);return i.writeUInt32LE(o.lo32,r),i.writeUInt32LE(o.hi32,r+4),8}}Fi.NearUInt64=m;class w extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e);return p(r.readUInt32BE(t),r.readUInt32BE(t+4))}encode(e,t,r=0){const o=h(e),i=n(t);return i.writeUInt32BE(o.hi32,r),i.writeUInt32BE(o.lo32,r+4),8}}Fi.NearUInt64BE=w;class g extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e),o=r.readUInt32LE(t);return p(r.readInt32LE(t+4),o)}encode(e,t,r=0){const o=h(e),i=n(t);return i.writeUInt32LE(o.lo32,r),i.writeInt32LE(o.hi32,r+4),8}}Fi.NearInt64=g;class y extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e);return p(r.readInt32BE(t),r.readUInt32BE(t+4))}encode(e,t,r=0){const o=h(e),i=n(t);return i.writeInt32BE(o.hi32,r),i.writeUInt32BE(o.lo32,r+4),8}}Fi.NearInt64BE=y;class b extends r{constructor(e){super(4,e)}decode(e,t=0){return n(e).readFloatLE(t)}encode(e,t,r=0){return n(t).writeFloatLE(e,r),4}}Fi.Float=b;class v extends r{constructor(e){super(4,e)}decode(e,t=0){return n(e).readFloatBE(t)}encode(e,t,r=0){return n(t).writeFloatBE(e,r),4}}Fi.FloatBE=v;class A extends r{constructor(e){super(8,e)}decode(e,t=0){return n(e).readDoubleLE(t)}encode(e,t,r=0){return n(t).writeDoubleLE(e,r),8}}Fi.Double=A;class k extends r{constructor(e){super(8,e)}decode(e,t=0){return n(e).readDoubleBE(t)}encode(e,t,r=0){return n(t).writeDoubleBE(e,r),8}}Fi.DoubleBE=k;class T extends r{constructor(e,t,n){if(!(e instanceof r))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof i&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let o=-1;!(t instanceof i)&&0<e.span&&(o=t*e.span),super(o,n),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0,r=this.count;if(r instanceof i&&(r=r.decode(e,t)),0<this.elementLayout.span)n=r*this.elementLayout.span;else{let o=0;for(;o<r;)n+=this.elementLayout.getSpan(e,t+n),++o}return n}decode(e,t=0){const n=[];let r=0,o=this.count;for(o instanceof i&&(o=o.decode(e,t));r<o;)n.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),r+=1;return n}encode(e,t,n=0){const r=this.elementLayout,o=e.reduce((e,o)=>e+r.encode(o,t,n+e),0);return this.count instanceof i&&this.count.encode(e.length,t,n),o}}Fi.Sequence=T;class E extends r{constructor(e,t,n){if(!Array.isArray(e)||!e.reduce((e,t)=>e&&t instanceof r,!0))throw new TypeError("fields must be array of Layout instances");"boolean"==typeof t&&void 0===n&&(n=t,t=void 0);for(const r of e)if(0>r.span&&void 0===r.property)throw new Error("fields cannot contain unnamed variable-length layout");let o=-1;try{o=e.reduce((e,t)=>e+t.getSpan(),0)}catch(i){}super(o,t),this.fields=e,this.decodePrefixes=!!n}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;try{n=this.fields.reduce((n,r)=>{const o=r.getSpan(e,t);return t+=o,n+o},0)}catch(r){throw new RangeError("indeterminate span")}return n}decode(e,n=0){t(e);const r=this.makeDestinationObject();for(const t of this.fields)if(void 0!==t.property&&(r[t.property]=t.decode(e,n)),n+=t.getSpan(e,n),this.decodePrefixes&&e.length===n)break;return r}encode(e,t,n=0){const r=n;let o=0,i=0;for(const a of this.fields){let r=a.span;if(i=0<r?r:0,void 0!==a.property){const o=e[a.property];void 0!==o&&(i=a.encode(o,t,n),0>r&&(r=a.getSpan(t,n)))}o=n,n+=r}return o+i-r}fromArray(e){const t=this.makeDestinationObject();for(const n of this.fields)void 0!==n.property&&0<e.length&&(t[n.property]=e.shift());return t}layoutFor(e){if("string"!=typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!=typeof e)throw new TypeError("property must be string");let t=0;for(const n of this.fields){if(n.property===e)return t;0>n.span?t=-1:0<=t&&(t+=n.span)}}}Fi.Structure=E;class x{constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,n){throw new Error("UnionDiscriminator is abstract")}}Fi.UnionDiscriminator=x;class C extends x{constructor(e,t){if(!(e instanceof i&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,n){return this.layout.encode(e,t,n)}}Fi.UnionLayoutDiscriminator=C;class I extends r{constructor(e,t,n){let o;if(e instanceof c||e instanceof u)o=new C(new s(e));else if(e instanceof i&&e.isCount())o=new C(e);else{if(!(e instanceof x))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");o=e}if(void 0===t&&(t=null),!(null===t||t instanceof r))throw new TypeError("defaultLayout must be null or a Layout");if(null!==t){if(0>t.span)throw new Error("defaultLayout must have constant span");void 0===t.property&&(t=t.replicate("content"))}let a=-1;t&&(a=t.span,0<=a&&(e instanceof c||e instanceof u)&&(a+=o.layout.span)),super(a,n),this.discriminator=o,this.usesPrefixDiscriminator=e instanceof c||e instanceof u,this.defaultLayout=t,this.registry={};let l=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return l(e)},this.configGetSourceVariant=function(e){l=e.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;const n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;const t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(const t in this.registry){const n=this.registry[t];if(n.property&&Object.prototype.hasOwnProperty.call(e,n.property))return n}throw new Error("unable to infer src variant")}decode(e,t=0){let n;const r=this.discriminator,o=r.decode(e,t),i=this.registry[o];if(void 0===i){const i=this.defaultLayout;let a=0;this.usesPrefixDiscriminator&&(a=r.layout.span),n=this.makeDestinationObject(),n[r.property]=o,n[i.property]=i.decode(e,t+a)}else n=i.decode(e,t);return n}encode(e,t,n=0){const r=this.getSourceVariant(e);if(void 0===r){const r=this.discriminator,o=this.defaultLayout;let i=0;return this.usesPrefixDiscriminator&&(i=r.layout.span),r.encode(e[r.property],t,n),i+o.encode(e[o.property],t,n+i)}return r.encode(e,t,n)}addVariant(e,t,n){const r=new S(this,e,t,n);return this.registry[e]=r,r}getVariant(e,t=0){let n;return n=e instanceof Uint8Array?this.discriminator.decode(e,t):e,this.registry[n]}}Fi.Union=I;class S extends r{constructor(e,t,n,o){if(!(e instanceof I))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if("string"==typeof n&&void 0===o&&(o=n,n=null),n){if(!(n instanceof r))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=n.span&&n.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!=typeof o)throw new TypeError("variant must have a String property")}let i=e.span;0>e.span&&(i=n?n.span:0,0<=i&&e.usesPrefixDiscriminator&&(i+=e.discriminator.layout.span)),super(i,o),this.union=e,this.variant=t,this.layout=n||null}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span);let r=0;return this.layout&&(r=this.layout.getSpan(e,t+n)),n+r}decode(e,t=0){const n=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+r):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(e,t,n=0){let r=0;if(this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);let o=r;if(this.layout&&(this.layout.encode(e[this.property],t,n+r),o+=this.layout.getSpan(t,n+r),0<=this.union.span&&o>this.union.span))throw new Error("encoded variant overruns containing union");return o}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}function N(e){return 0>e&&(e+=4294967296),e}Fi.VariantLayout=S;class B extends r{constructor(e,t,n){if(!(e instanceof c||e instanceof u))throw new TypeError("word must be a UInt or UIntBE layout");if("string"==typeof t&&void 0===n&&(n=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,n),this.word=e,this.msb=!!t,this.fields=[];let r=0;this.ye=function(e){return r=N(e),this},this.be=function(){return r}}decode(e,t=0){const n=this.makeDestinationObject(),r=this.word.decode(e,t);this.ye(r);for(const o of this.fields)void 0!==o.property&&(n[o.property]=o.decode(e));return n}encode(e,t,n=0){const r=this.word.decode(t,n);this.ye(r);for(const o of this.fields)if(void 0!==o.property){const t=e[o.property];void 0!==t&&o.encode(t)}return this.word.encode(this.be(),t,n)}addField(e,t){const n=new M(this,e,t);return this.fields.push(n),n}addBoolean(e){const t=new P(this,e);return this.fields.push(t),t}fieldFor(e){if("string"!=typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}}Fi.BitStructure=B;class M{constructor(e,t,n){if(!(e instanceof B))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");const r=8*e.span,o=e.fields.reduce((e,t)=>e+t.bits,0);if(t+o>r)throw new Error("bits too long for span remainder ("+(r-o)+" of "+r+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=4294967295),this.start=o,this.container.msb&&(this.start=r-o-t),this.wordMask=N(this.valueMask<<this.start),this.property=n}decode(e,t){return N(this.container.be()&this.wordMask)>>>this.start}encode(e){if("number"!=typeof e||!Number.isInteger(e)||e!==N(e&this.valueMask))throw new TypeError(o("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const t=this.container.be(),n=N(e<<this.start);this.container.ye(N(t&~this.wordMask)|n)}}Fi.BitField=M;class P extends M{constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){"boolean"==typeof e&&(e=+e),super.encode(e)}}Fi.Boolean=P;class O extends r{constructor(e,t){if(!(e instanceof i&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let n=-1;e instanceof i||(n=e),super(n,t),this.length=e}getSpan(e,t){let n=this.span;return 0>n&&(n=this.length.decode(e,t)),n}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),n(e).slice(t,t+r)}encode(e,t,r){let a=this.length;if(this.length instanceof i&&(a=e.length),!(e instanceof Uint8Array&&a===e.length))throw new TypeError(o("Blob.encode",this)+" requires (length "+a+") Uint8Array as src");if(r+a>t.length)throw new RangeError("encoding overruns Uint8Array");const s=n(e);return n(t).write(s.toString("hex"),r,a,"hex"),this.length instanceof i&&this.length.encode(a,t,r),a}}Fi.Blob=O;class R extends r{constructor(e){super(-1,e)}getSpan(e,n=0){t(e);let r=n;for(;r<e.length&&0!==e[r];)r+=1;return 1+r-n}decode(e,t=0){const r=this.getSpan(e,t);return n(e).slice(t,t+r-1).toString("utf-8")}encode(t,r,o=0){"string"!=typeof t&&(t=String(t));const i=e.Buffer.from(t,"utf8"),a=i.length;if(o+a>r.length)throw new RangeError("encoding overruns Buffer");const s=n(r);return i.copy(s,o),s[o+a]=0,a+1}}Fi.CString=R;class U extends r{constructor(e,t){if("string"==typeof e&&void 0===t&&(t=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,n=0){return t(e),e.length-n}decode(e,t=0){const r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return n(e).slice(t,t+r).toString("utf-8")}encode(t,r,o=0){"string"!=typeof t&&(t=String(t));const i=e.Buffer.from(t,"utf8"),a=i.length;if(0<=this.maxSpan&&this.maxSpan<a)throw new RangeError("text length exceeds maxSpan");if(o+a>r.length)throw new RangeError("encoding overruns Buffer");return i.copy(n(r),o),a}}Fi.UTF8=U;class L extends r{constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,n){return 0}}return Fi.Constant=L,Fi.greedy=(e,t)=>new a(e,t),Fi.offset=(e,t,n)=>new s(e,t,n),Fi.u8=e=>new c(1,e),Fi.u16=e=>new c(2,e),Fi.u24=e=>new c(3,e),Fi.u32=e=>new c(4,e),Fi.u40=e=>new c(5,e),Fi.u48=e=>new c(6,e),Fi.nu64=e=>new m(e),Fi.u16be=e=>new u(2,e),Fi.u24be=e=>new u(3,e),Fi.u32be=e=>new u(4,e),Fi.u40be=e=>new u(5,e),Fi.u48be=e=>new u(6,e),Fi.nu64be=e=>new w(e),Fi.s8=e=>new l(1,e),Fi.s16=e=>new l(2,e),Fi.s24=e=>new l(3,e),Fi.s32=e=>new l(4,e),Fi.s40=e=>new l(5,e),Fi.s48=e=>new l(6,e),Fi.ns64=e=>new g(e),Fi.s16be=e=>new d(2,e),Fi.s24be=e=>new d(3,e),Fi.s32be=e=>new d(4,e),Fi.s40be=e=>new d(5,e),Fi.s48be=e=>new d(6,e),Fi.ns64be=e=>new y(e),Fi.f32=e=>new b(e),Fi.f32be=e=>new v(e),Fi.f64=e=>new A(e),Fi.f64be=e=>new k(e),Fi.struct=(e,t,n)=>new E(e,t,n),Fi.bits=(e,t,n)=>new B(e,t,n),Fi.seq=(e,t,n)=>new T(e,t,n),Fi.union=(e,t,n)=>new I(e,t,n),Fi.unionLayoutDiscriminator=(e,t)=>new C(e,t),Fi.blob=(e,t)=>new O(e,t),Fi.cstr=e=>new R(e),Fi.utf8=(e,t)=>new U(e,t),Fi.constant=(e,t)=>new L(e,t),Fi}(),Hi=1,Vi=2,Wi=3,ji=4,Yi=5,zi=6,Gi=7,Ji=8,Xi=9,Ki=10,Qi=-32700,Zi=-32603,_i=-32602,$i=-32601,ea=-32600,ta=-32016,na=-32015,ra=-32014,oa=-32013,ia=-32012,aa=-32011,sa=-32010,ca=-32009,ua=-32008,la=-32007,da=-32006,fa=-32005,ha=-32004,pa=-32003,ma=-32002,wa=-32001,ga=28e5,ya=2800001,ba=2800002,va=2800003,Aa=2800004,ka=2800005,Ta=2800006,Ea=2800007,xa=2800008,Ca=2800009,Ia=2800010,Sa=2800011,Na=323e4,Ba=32300001,Ma=3230002,Pa=3230003,Oa=3230004,Ra=361e4,Ua=3610001,La=3610002,Da=3610003,Fa=3610004,qa=3610005,Ha=3610006,Va=3610007,Wa=3611e3,ja=3704e3,Ya=3704001,za=3704002,Ga=3704003,Ja=3704004,Xa=4128e3,Ka=4128001,Qa=4128002,Za=4615e3,_a=4615001,$a=4615002,es=4615003,ts=4615004,ns=4615005,rs=4615006,os=4615007,is=4615008,as=4615009,ss=4615010,cs=4615011,us=4615012,ls=4615013,ds=4615014,fs=4615015,hs=4615016,ps=4615017,ms=4615018,ws=4615019,gs=4615020,ys=4615021,bs=4615022,vs=4615023,As=4615024,ks=4615025,Ts=4615026,Es=4615027,xs=4615028,Cs=4615029,Is=4615030,Ss=4615031,Ns=4615032,Bs=4615033,Ms=4615034,Ps=4615035,Os=4615036,Rs=4615037,Us=4615038,Ls=4615039,Ds=4615040,Fs=4615041,qs=4615042,Hs=4615043,Vs=4615044,Ws=4615045,js=4615046,Ys=4615047,zs=4615048,Gs=4615049,Js=4615050,Xs=4615051,Ks=4615052,Qs=4615053,Zs=4615054,_s=5508e3,$s=5508001,ec=5508002,tc=5508003,nc=5508004,rc=5508005,oc=5508006,ic=5508007,ac=5508008,sc=5508009,cc=5508010,uc=5508011,lc=5663e3,dc=5663001,fc=5663002,hc=5663003,pc=5663004,mc=5663005,wc=5663006,gc=5663007,yc=5663008,bc=5663009,vc=5663010,Ac=5663011,kc=5663012,Tc=5663013,Ec=5663014,xc=5663015,Cc=5663016,Ic=5663017,Sc=5663018,Nc=5663019,Bc=5663020,Mc=705e4,Pc=7050001,Oc=7050002,Rc=7050003,Uc=7050004,Lc=7050005,Dc=7050006,Fc=7050007,qc=7050008,Hc=7050009,Vc=7050010,Wc=7050011,jc=7050012,Yc=7050013,zc=7050014,Gc=7050015,Jc=7050016,Xc=7050017,Kc=7050018,Qc=7050019,Zc=7050020,_c=7050021,$c=7050022,eu=7050023,tu=7050024,nu=7050025,ru=7050026,ou=7050027,iu=7050028,au=7050029,su=7050030,cu=7050031,uu=7050032,lu=7050033,du=7050034,fu=7050035,hu=7050036,pu=8078e3,mu=8078001,wu=8078002,gu=8078003,yu=8078004,bu=8078005,vu=8078006,Au=8078007,ku=8078008,Tu=8078009,Eu=8078010,xu=8078011,Cu=8078012,Iu=8078013,Su=8078014,Nu=8078015,Bu=8078016,Mu=8078017,Pu=8078018,Ou=8078019,Ru=8078020,Uu=8078021,Lu=8078022,Du=81e5,Fu=8100001,qu=8100002,Hu=8100003,Vu=819e4,Wu=8190001,ju=8190002,Yu=8190003,zu=8190004,Gu=99e5,Ju=9900001,Xu=9900002,Ku=9900003,Qu=9900004;function Zu(e){return Array.isArray(e)?"%5B"+e.map(Zu).join("%2C%20")+"%5D":"bigint"==typeof e?`${e}n`:encodeURIComponent(String(null!=e&&null===Object.getPrototypeOf(e)?{...e}:e))}function _u([e,t]){return`${e}=${Zu(t)}`}var $u={[Na]:"Account not found at address: $address",[Oa]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[Pa]:"Expected decoded account at address: $address",[Ma]:"Failed to decode account data at address: $address",[Ba]:"Accounts not found at addresses: $addresses",[Ca]:"Unable to find a viable program address bump seed.",[ba]:"$putativeAddress is not a base58-encoded address.",[ga]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[va]:"The `CryptoKey` must be an `Ed25519` public key.",[Sa]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[xa]:"Invalid seeds; point must fall off the Ed25519 curve.",[Aa]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[Ta]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[Ea]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[ka]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[Ia]:"Program address cannot end with PDA marker.",[ya]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[ji]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[Hi]:"The network has progressed past the last block for which this transaction could have been committed.",[pu]:"Codec [$codecDescription] cannot decode empty byte arrays.",[Lu]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[Ru]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[bu]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[vu]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[yu]:"Encoder and decoder must either both be fixed-size or variable-size.",[ku]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[wu]:"Expected a fixed-size codec, got a variable-size one.",[Iu]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[gu]:"Expected a variable-size codec, got a fixed-size one.",[Ou]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[mu]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[Pu]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[Tu]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[Eu]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[Nu]:"Invalid literal union variant. Expected one of [$variants], got $value.",[Au]:"Expected [$codecDescription] to have $expected items, got $actual.",[Cu]:"Invalid value $value for base $base with alphabet $alphabet.",[Bu]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[xu]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[Su]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[Uu]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[Mu]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[Wa]:"No random values implementation could be found.",[as]:"instruction requires an uninitialized account",[vs]:"instruction tries to borrow reference for an account which is already borrowed",[As]:"instruction left account with an outstanding borrowed reference",[ys]:"program other than the account's owner changed the size of the account data",[ns]:"account data too small for instruction",[bs]:"instruction expected an executable account",[js]:"An account does not have enough lamports to be rent-exempt",[zs]:"Program arithmetic overflowed",[Ws]:"Failed to serialize or deserialize account data: $encodedData",[Zs]:"Builtin programs must consume compute units",[Ns]:"Cross-program invocation call depth too deep",[Us]:"Computational budget exceeded",[Ts]:"custom program error: #$code",[ps]:"instruction contains duplicate accounts",[ks]:"instruction modifications of multiply-passed account differ",[Is]:"executable accounts must be rent exempt",[xs]:"instruction changed executable accounts data",[Cs]:"instruction changed the balance of an executable account",[ms]:"instruction changed executable bit of an account",[ds]:"instruction modified data of an account it does not own",[ls]:"instruction spent from the balance of an account it does not own",[_a]:"generic instruction error",[Js]:"Provided owner is not allowed",[Hs]:"Account is immutable",[Vs]:"Incorrect authority provided",[os]:"incorrect program id for instruction",[rs]:"insufficient funds for instruction",[ts]:"invalid account data for instruction",[Ys]:"Invalid account owner",[$a]:"invalid program argument",[Es]:"program returned invalid error code",[es]:"invalid instruction data",[Rs]:"Failed to reallocate account data",[Os]:"Provided seeds do not result in a valid address",[Xs]:"Accounts data allocations exceeded the maximum allowed per transaction",[Ks]:"Max accounts exceeded",[Qs]:"Max instruction trace length exceeded",[Ps]:"Length of the seed is too long for address generation",[Bs]:"An account required by the instruction is missing",[is]:"missing required signature for instruction",[us]:"instruction illegally modified the program id of an account",[gs]:"insufficient account keys for instruction",[Ls]:"Cross-program invocation with unauthorized signer or writable account",[Ds]:"Failed to create program execution environment",[qs]:"Program failed to compile",[Fs]:"Program failed to complete",[hs]:"instruction modified data of a read-only account",[fs]:"instruction changed the balance of a read-only account",[Ms]:"Cross-program invocation reentrancy not allowed for this instruction",[ws]:"instruction modified rent epoch of an account",[cs]:"sum of account balances before and after instruction do not match",[ss]:"instruction requires an initialized account",[Za]:"",[Ss]:"Unsupported program id",[Gs]:"Unsupported sysvar",[Xa]:"The instruction does not have any accounts.",[Ka]:"The instruction does not have any data.",[Qa]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[Yi]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[Vi]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[Xu]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Qu]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[Ju]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Gu]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Ku]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Zi]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[_i]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[ea]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[$i]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[Qi]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[ia]:"$__serverMessage",[wa]:"$__serverMessage",[ha]:"$__serverMessage",[ra]:"$__serverMessage",[sa]:"$__serverMessage",[ca]:"$__serverMessage",[ta]:"Minimum context slot has not been reached",[fa]:"Node is unhealthy; behind by $numSlotsBehind slots",[ua]:"No snapshot",[ma]:"Transaction simulation failed",[la]:"$__serverMessage",[aa]:"Transaction history is not available from this node",[da]:"$__serverMessage",[oa]:"Transaction signature length mismatch",[pa]:"Transaction signature verification failure",[na]:"$__serverMessage",[ja]:"Key pair bytes must be of length 64, got $byteLength.",[Ya]:"Expected private key bytes with length 32. Actual length: $actualLength.",[za]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[Ja]:"The provided private key does not match the provided public key.",[Ga]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[zi]:"Lamports value must be in the range [0, 2e64-1]",[Gi]:"`$value` cannot be parsed as a `BigInt`",[Ki]:"$message",[Ji]:"`$value` cannot be parsed as a `Number`",[Wi]:"No nonce account could be found at address `$nonceAccountAddress`",[Vu]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[ju]:"WebSocket was closed before payload could be added to the send buffer",[Yu]:"WebSocket connection closed",[zu]:"WebSocket failed to connect",[Wu]:"Failed to obtain a subscription id from the server",[Hu]:"Could not find an API plan for RPC method: `$method`",[Du]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[qu]:"HTTP error ($statusCode): $message",[Fu]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[_s]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[$s]:"The provided value does not implement the `KeyPairSigner` interface",[tc]:"The provided value does not implement the `MessageModifyingSigner` interface",[nc]:"The provided value does not implement the `MessagePartialSigner` interface",[ec]:"The provided value does not implement any of the `MessageSigner` interfaces",[oc]:"The provided value does not implement the `TransactionModifyingSigner` interface",[ic]:"The provided value does not implement the `TransactionPartialSigner` interface",[ac]:"The provided value does not implement the `TransactionSendingSigner` interface",[rc]:"The provided value does not implement any of the `TransactionSigner` interfaces",[sc]:"More than one `TransactionSendingSigner` was identified.",[cc]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[uc]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[Va]:"Cannot export a non-extractable key.",[Ua]:"No digest implementation could be found.",[Ra]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[La]:"This runtime does not support the generation of Ed25519 key pairs.\n\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\n\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.",[Da]:"No signature verification implementation could be found.",[Fa]:"No key generation implementation could be found.",[qa]:"No signing implementation could be found.",[Ha]:"No key export implementation could be found.",[Xi]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[Jc]:"Transaction processing left an account with an outstanding borrowed reference",[Pc]:"Account in use",[Oc]:"Account loaded twice",[Rc]:"Attempt to debit an account but found no record of a prior credit.",[eu]:"Transaction loads an address table account that doesn't exist",[Fc]:"This transaction has already been processed",[qc]:"Blockhash not found",[Hc]:"Loader call chain is too deep",[Gc]:"Transactions are currently disabled due to cluster maintenance",[su]:"Transaction contains a duplicate instruction ($index) that is not allowed",[Lc]:"Insufficient funds for fee",[cu]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[Dc]:"This account may not be used to pay transaction fees",[Wc]:"Transaction contains an invalid account reference",[nu]:"Transaction loads an address table account with invalid data",[ru]:"Transaction address table lookup uses an invalid index",[tu]:"Transaction loads an address table account with an invalid owner",[lu]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[Yc]:"This program may not be used for executing instructions",[ou]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[Qc]:"Transaction loads a writable account that cannot be written",[uu]:"Transaction exceeded max loaded accounts data size cap",[Vc]:"Transaction requires a fee but has no signature present",[Uc]:"Attempt to load a program that does not exist",[fu]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[du]:"ResanitizationNeeded",[zc]:"Transaction failed to sanitize accounts offsets correctly",[jc]:"Transaction did not pass signature verification",[$c]:"Transaction locked too many accounts",[hu]:"Sum of account balances before and after transaction do not match",[Mc]:"The transaction failed with the error `$errorName`",[Kc]:"Transaction version is unsupported",[_c]:"Transaction would exceed account data limit within the block",[au]:"Transaction would exceed total account data limit",[Zc]:"Transaction would exceed max account limit within the block",[Xc]:"Transaction would exceed max Block Cost Limit",[iu]:"Transaction would exceed max Vote Cost Limit",[xc]:"Attempted to sign a transaction with an address that is not a signer for it",[vc]:"Transaction is missing an address at index: $index.",[Cc]:"Transaction has no expected signers therefore it cannot be encoded",[Bc]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[fc]:"Transaction does not have a blockhash lifetime",[hc]:"Transaction is not a durable nonce transaction",[mc]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[wc]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[yc]:"No fee payer set in CompiledTransaction",[gc]:"Could not find program address at index $index",[Sc]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[Nc]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[Ac]:"Transaction is missing a fee payer.",[kc]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[Ec]:"Transaction first instruction is not advance nonce account instruction.",[Tc]:"Transaction with no instructions cannot be durable nonce transaction.",[lc]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[dc]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Ic]:"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.",[bc]:"Transaction is missing signatures for addresses: $addresses.",[pc]:"Transaction version must be in the range [0, 127]. `$actualVersion` given"},el="i",tl="t";var nl=class extends Error{cause=this.cause;context;constructor(...[e,t]){let n,r;if(t){const{cause:e,...o}=t;e&&(r={cause:e}),Object.keys(o).length>0&&(n=o)}super(function(e,t={}){if("production"!==process.env.NODE_ENV)return function(e,t={}){const n=$u[e];if(0===n.length)return"";let r;function o(e){if(2===r[tl]){const o=n.slice(r[el]+1,e);i.push(o in t?`${t[o]}`:`$${o}`)}else 1===r[tl]&&i.push(n.slice(r[el],e))}const i=[];return n.split("").forEach((e,t)=>{if(0===t)return void(r={[el]:0,[tl]:"\\"===n[0]?0:"$"===n[0]?2:1});let i;switch(r[tl]){case 0:i={[el]:t,[tl]:1};break;case 1:"\\"===e?i={[el]:t,[tl]:0}:"$"===e&&(i={[el]:t,[tl]:2});break;case 2:"\\"===e?i={[el]:t,[tl]:0}:"$"===e?i={[el]:t,[tl]:2}:e.match(/\w/)||(i={[el]:t,[tl]:1})}i&&(r!==i&&o(t),r=i)}),o(),i.join("")}(e,t);{let n=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(n+=` '${function(e){const t=Object.entries(e).map(_u).join("&");return btoa(t)}(t)}'`),`${n}\``}}(e,n),r),this.context={ve:e,...n},this.name="SolanaError"}};function rl(e){return"fixedSize"in e&&"number"==typeof e.fixedSize}function ol(e){return 1!==e?.endian}var il=(e={})=>function(e,t){if(rl(e)!==rl(t))throw new nl(yu);if(rl(e)&&rl(t)&&e.fixedSize!==t.fixedSize)throw new nl(bu,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!rl(e)&&!rl(t)&&e.maxSize!==t.maxSize)throw new nl(vu,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return{...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}(((e={})=>{return t={config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(e,t,n)=>e.setBigUint64(0,BigInt(t),n),size:8},n={fixedSize:t.size,write(e,n,r){t.range&&function(e,t,n,r){if(r<t||r>n)throw new nl(xu,{codecDescription:e,max:n,min:t,value:r})}(t.name,t.range[0],t.range[1],e);const o=new ArrayBuffer(t.size);return t.set(new DataView(o),e,ol(t.config)),n.set(new Uint8Array(o),r),r+t.size}},Object.freeze({...n,encode:e=>{const t=new Uint8Array(function(e,t){return"fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}(e,n));return n.write(e,t,0),t}});var t,n})(e),((e={})=>{return n={fixedSize:(t={config:e,get:(e,t)=>e.getBigUint64(0,t),name:"u64",size:8}).size,read(e,n=0){!function(e,t,n=0){if(t.length-n<=0)throw new nl(pu,{codecDescription:e})}(t.name,e,n),function(e,t,n,r=0){const o=n.length-r;if(o<t)throw new nl(mu,{bytesLength:o,codecDescription:e,expected:t})}(t.name,t.size,e,n);const r=new DataView(function(e,t,n){const r=e.byteOffset+(t??0),o=n??e.byteLength;return e.buffer.slice(r,r+o)}(e,n,t.size));return[t.get(r,ol(t.config)),n+t.size]}},Object.freeze({...n,decode:(e,t=0)=>n.read(e,t)[0]});var t,n})(e));class al extends TypeError{constructor(e,t){let n;const{message:r,explanation:o,...i}=e,{path:a}=e,s=0===a.length?r:`At path: ${a.join(".")} -- ${r}`;super(o??s),null!=o&&(this.cause=s),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function sl(e){return"object"==typeof e&&null!=e}function cl(e){return sl(e)&&!Array.isArray(e)}function ul(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function ll(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:a}=n,{refinement:s,message:c=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${ul(r)}\``}=e;return{value:r,type:a,refinement:s,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*dl(e,t,n,r){var o;sl(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const i of e){const e=ll(i,t,n,r);e&&(yield e)}}function*fl(e,t,n={}){const{path:r=[],branch:o=[e],coerce:i=!1,mask:a=!1}=n,s={path:r,branch:o,mask:a};i&&(e=t.coercer(e,s));let c="valid";for(const u of t.validator(e,s))u.explanation=n.message,c="not_valid",yield[u,void 0];for(let[u,l,d]of t.entries(e,s)){const t=fl(l,d,{path:void 0===u?r:[...r,u],branch:void 0===u?o:[...o,l],coerce:i,mask:a,message:n.message});for(const n of t)n[0]?(c=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],void 0]):i&&(l=n[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):sl(e)&&(void 0!==l||u in e)&&(e[u]=l))}if("not_valid"!==c)for(const u of t.refiner(e,s))u.explanation=n.message,c="not_refined",yield[u,void 0];"valid"===c&&(yield[void 0,e])}let hl=class{constructor(e){const{type:t,schema:n,validator:r,refiner:o,coercer:i=e=>e,entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=i,this.validator=r?(e,t)=>dl(r(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>dl(o(e,t),t,this,e):()=>[]}assert(e,t){return function(e,t,n){const r=wl(e,t,{message:n});if(r[0])throw r[0]}(e,this,t)}create(e,t){return pl(e,this,t)}is(e){return ml(e,this)}mask(e,t){return function(e,t,n){const r=wl(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e,t={}){return wl(e,this,t)}};function pl(e,t,n){const r=wl(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function ml(e,t){return!wl(e,t)[0]}function wl(e,t,n={}){const r=fl(e,t,n),o=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(r);return o[0]?[new al(o[0],function*(){for(const e of r)e[0]&&(yield e[0])}),void 0]:[void 0,o[1]]}function gl(e,t){return new hl({type:e,schema:null,validator:t})}function yl(e){return new hl({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${ul(e)}`})}function bl(){return gl("boolean",e=>"boolean"==typeof e)}function vl(e){return gl("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${ul(t)}`)}function Al(e){const t=ul(e),n=typeof e;return new hl({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${ul(n)}`})}function kl(e){return new hl({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}function Tl(){return gl("number",e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${ul(e)}`)}function El(e){return new hl({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function xl(e,t){return new hl({type:"record",schema:null,*entries(n){if(sl(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator:e=>cl(e)||`Expected an object, but received: ${ul(e)}`,coercer:e=>cl(e)?{...e}:e})}function Cl(){return gl("string",e=>"string"==typeof e||`Expected a string, but received: ${ul(e)}`)}function Il(e){const t=gl("never",()=>!1);return new hl({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let o=0;o<r;o++)yield[o,n[o],e[o]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${ul(e)}`,coercer:e=>Array.isArray(e)?e.slice():e})}function Sl(e){const t=Object.keys(e);return new hl({type:"type",schema:e,*entries(n){if(sl(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>cl(e)||`Expected an object, but received: ${ul(e)}`,coercer:e=>cl(e)?{...e}:e})}function Nl(e){const t=e.map(e=>e.type).join(" | ");return new hl({type:"union",schema:null,coercer(t,n){for(const r of e){const[e,o]=r.validate(t,{coerce:!0,mask:n.mask});if(!e)return o}return t},validator(n,r){const o=[];for(const t of e){const[...e]=fl(n,t,r),[i]=e;if(!i[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${ul(n)}`,...o]}})}function Bl(){return gl("unknown",()=>!0)}function Ml(e,t,n){return new hl({...e,coercer:(r,o)=>ml(r,t)?e.coercer(n(r,o),o):e.coercer(r,o)})}var Pl,Ol=new Uint8Array(16);function Rl(){if(!Pl&&!(Pl="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pl(Ol)}const Ul=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ll(e){return"string"==typeof e&&Ul.test(e)}for(var Dl,Fl,ql=[],Hl=0;Hl<256;++Hl)ql.push((Hl+256).toString(16).substr(1));function Vl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ql[e[t+0]]+ql[e[t+1]]+ql[e[t+2]]+ql[e[t+3]]+"-"+ql[e[t+4]]+ql[e[t+5]]+"-"+ql[e[t+6]]+ql[e[t+7]]+"-"+ql[e[t+8]]+ql[e[t+9]]+"-"+ql[e[t+10]]+ql[e[t+11]]+ql[e[t+12]]+ql[e[t+13]]+ql[e[t+14]]+ql[e[t+15]]).toLowerCase();if(!Ll(n))throw TypeError("Stringified UUID is invalid");return n}var Wl=0,jl=0;function Yl(e){if(!Ll(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function zl(e,t,n){function r(e,r,o,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=Yl(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),(a=n(a))[6]=15&a[6]|t,a[8]=63&a[8]|128,o){i=i||0;for(var s=0;s<16;++s)o[i+s]=a[s];return o}return Vl(a)}try{r.name=e}catch(o){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Gl(e){return 14+(e+64>>>9<<4)+1}function Jl(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function Xl(e,t,n,r,o,i){return Jl((a=Jl(Jl(t,e),Jl(r,i)))<<(s=o)|a>>>32-s,n);var a,s}function Kl(e,t,n,r,o,i,a){return Xl(t&n|~t&r,e,t,o,i,a)}function Ql(e,t,n,r,o,i,a){return Xl(t&r|n&~r,e,t,o,i,a)}function Zl(e,t,n,r,o,i,a){return Xl(t^n^r,e,t,o,i,a)}function _l(e,t,n,r,o,i,a){return Xl(n^(t|~r),e,t,o,i,a)}var $l=zl("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",o=0;o<n;o+=8){var i=e[o>>5]>>>o%32&255,a=parseInt(r.charAt(i>>>4&15)+r.charAt(15&i),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Gl(t)-1]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,a=0;a<e.length;a+=16){var s=n,c=r,u=o,l=i;n=Kl(n,r,o,i,e[a],7,-680876936),i=Kl(i,n,r,o,e[a+1],12,-389564586),o=Kl(o,i,n,r,e[a+2],17,606105819),r=Kl(r,o,i,n,e[a+3],22,-1044525330),n=Kl(n,r,o,i,e[a+4],7,-176418897),i=Kl(i,n,r,o,e[a+5],12,1200080426),o=Kl(o,i,n,r,e[a+6],17,-1473231341),r=Kl(r,o,i,n,e[a+7],22,-45705983),n=Kl(n,r,o,i,e[a+8],7,1770035416),i=Kl(i,n,r,o,e[a+9],12,-1958414417),o=Kl(o,i,n,r,e[a+10],17,-42063),r=Kl(r,o,i,n,e[a+11],22,-1990404162),n=Kl(n,r,o,i,e[a+12],7,1804603682),i=Kl(i,n,r,o,e[a+13],12,-40341101),o=Kl(o,i,n,r,e[a+14],17,-1502002290),n=Ql(n,r=Kl(r,o,i,n,e[a+15],22,1236535329),o,i,e[a+1],5,-165796510),i=Ql(i,n,r,o,e[a+6],9,-1069501632),o=Ql(o,i,n,r,e[a+11],14,643717713),r=Ql(r,o,i,n,e[a],20,-373897302),n=Ql(n,r,o,i,e[a+5],5,-701558691),i=Ql(i,n,r,o,e[a+10],9,38016083),o=Ql(o,i,n,r,e[a+15],14,-660478335),r=Ql(r,o,i,n,e[a+4],20,-405537848),n=Ql(n,r,o,i,e[a+9],5,568446438),i=Ql(i,n,r,o,e[a+14],9,-1019803690),o=Ql(o,i,n,r,e[a+3],14,-187363961),r=Ql(r,o,i,n,e[a+8],20,1163531501),n=Ql(n,r,o,i,e[a+13],5,-1444681467),i=Ql(i,n,r,o,e[a+2],9,-51403784),o=Ql(o,i,n,r,e[a+7],14,1735328473),n=Zl(n,r=Ql(r,o,i,n,e[a+12],20,-1926607734),o,i,e[a+5],4,-378558),i=Zl(i,n,r,o,e[a+8],11,-2022574463),o=Zl(o,i,n,r,e[a+11],16,1839030562),r=Zl(r,o,i,n,e[a+14],23,-35309556),n=Zl(n,r,o,i,e[a+1],4,-1530992060),i=Zl(i,n,r,o,e[a+4],11,1272893353),o=Zl(o,i,n,r,e[a+7],16,-155497632),r=Zl(r,o,i,n,e[a+10],23,-1094730640),n=Zl(n,r,o,i,e[a+13],4,681279174),i=Zl(i,n,r,o,e[a],11,-358537222),o=Zl(o,i,n,r,e[a+3],16,-722521979),r=Zl(r,o,i,n,e[a+6],23,76029189),n=Zl(n,r,o,i,e[a+9],4,-640364487),i=Zl(i,n,r,o,e[a+12],11,-421815835),o=Zl(o,i,n,r,e[a+15],16,530742520),n=_l(n,r=Zl(r,o,i,n,e[a+2],23,-995338651),o,i,e[a],6,-198630844),i=_l(i,n,r,o,e[a+7],10,1126891415),o=_l(o,i,n,r,e[a+14],15,-1416354905),r=_l(r,o,i,n,e[a+5],21,-57434055),n=_l(n,r,o,i,e[a+12],6,1700485571),i=_l(i,n,r,o,e[a+3],10,-1894986606),o=_l(o,i,n,r,e[a+10],15,-1051523),r=_l(r,o,i,n,e[a+1],21,-2054922799),n=_l(n,r,o,i,e[a+8],6,1873313359),i=_l(i,n,r,o,e[a+15],10,-30611744),o=_l(o,i,n,r,e[a+6],15,-1560198380),r=_l(r,o,i,n,e[a+13],21,1309151649),n=_l(n,r,o,i,e[a+4],6,-145523070),i=_l(i,n,r,o,e[a+11],10,-1120210379),o=_l(o,i,n,r,e[a+2],15,718787259),r=_l(r,o,i,n,e[a+9],21,-343485551),n=Jl(n,s),r=Jl(r,c),o=Jl(o,u),i=Jl(i,l)}return[n,r,o,i]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(Gl(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))});function ed(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function td(e,t){return e<<t|e>>>32-t}var nd=zl("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var o=0;o<r.length;++o)e.push(r.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,a=Math.ceil(i/16),s=new Array(a),c=0;c<a;++c){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=e[64*c+4*l]<<24|e[64*c+4*l+1]<<16|e[64*c+4*l+2]<<8|e[64*c+4*l+3];s[c]=u}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<a;++d){for(var f=new Uint32Array(80),h=0;h<16;++h)f[h]=s[d][h];for(var p=16;p<80;++p)f[p]=td(f[p-3]^f[p-8]^f[p-14]^f[p-16],1);for(var m=n[0],w=n[1],g=n[2],y=n[3],b=n[4],v=0;v<80;++v){var A=Math.floor(v/20),k=td(m,5)+ed(A,w,g,y)+b+t[A]+f[v]>>>0;b=y,y=g,g=td(w,30)>>>0,w=m,m=k}n[0]=n[0]+m>>>0,n[1]=n[1]+w>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+b>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]});const rd=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:Yl,stringify:Vl,v1:function(e,t,n){var r=t&&n||0,o=t||new Array(16),i=(e=e||{}).node||Dl,a=void 0!==e.clockseq?e.clockseq:Fl;if(null==i||null==a){var s=e.random||(e.rng||Rl)();null==i&&(i=Dl=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=Fl=16383&(s[6]<<8|s[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:jl+1,l=c-Wl+(u-jl)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),(l<0||c>Wl)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Wl=c,jl=u,Fl=a;var d=(1e4*(268435455&(c+=122192928e5))+u)%4294967296;o[r++]=d>>>24&255,o[r++]=d>>>16&255,o[r++]=d>>>8&255,o[r++]=255&d;var f=c/4294967296*1e4&268435455;o[r++]=f>>>8&255,o[r++]=255&f,o[r++]=f>>>24&15|16,o[r++]=f>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var h=0;h<6;++h)o[r+h]=i[h];return t||Vl(o)},v3:$l,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||Rl)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return Vl(r)},v5:nd,validate:Ll,version:function(e){if(!Ll(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),od=/* @__PURE__ */Fo(rd);var id,ad,sd,cd;!function(){if(cd)return sd;cd=1;const e=od.v4,t=function(){if(ad)return id;ad=1;const e=od.v4;return id=function(t,n,r,o){if("string"!=typeof t)throw new TypeError(t+" must be a string");const i="number"==typeof(o=o||{}).version?o.version:2;if(1!==i&&2!==i)throw new TypeError(i+" must be 1 or 2");const a={method:t};if(2===i&&(a.jsonrpc="2.0"),n){if("object"!=typeof n&&!Array.isArray(n))throw new TypeError(n+" must be an object, array or omitted");a.params=n}if(void 0===r){const t="function"==typeof o.generator?o.generator:function(){return e()};a.id=t(a,o)}else 2===i&&null===r?o.notificationIdNull&&(a.id=null):a.id=r;return a}}(),n=function(t,r){if(!(this instanceof n))return new n(t,r);r||(r={}),this.options={reviver:void 0!==r.reviver?r.reviver:null,replacer:void 0!==r.replacer?r.replacer:null,generator:void 0!==r.generator?r.generator:function(){return e()},version:void 0!==r.version?r.version:2,notificationIdNull:"boolean"==typeof r.notificationIdNull&&r.notificationIdNull},this.callServer=t};sd=n,n.prototype.request=function(e,n,r,o){const i=this;let a=null;const s=Array.isArray(e)&&"function"==typeof n;if(1===this.options.version&&s)throw new TypeError("JSON-RPC 1.0 does not support batching");if(s||!s&&e&&"object"==typeof e&&"function"==typeof n)o=n,a=e;else{"function"==typeof r&&(o=r,r=void 0);const i="function"==typeof o;try{a=t(e,n,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(u){if(i)return void o(u);throw u}if(!i)return a}let c;try{c=JSON.stringify(a,this.options.replacer)}catch(u){return void o(u)}return this.callServer(c,function(e,t){i.Ae(e,t,o)}),a},n.prototype.Ae=function(e,t,n){if(e)return void n(e);if(!t)return void n();let r;try{r=JSON.parse(t,this.options.reviver)}catch(o){return void n(o)}if(3!==n.length)n(null,r);else{if(Array.isArray(r)){const e=function(e){return void 0!==e.error},t=function(t){return!e(t)};return void n(null,r.filter(e),r.filter(t))}n(null,r.error,r.result)}}}();var ud;function ld(e){try{return ci.ExtendedPoint.fromHex(e),!0}catch{return!1}}ud||(ud=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||e,a),c=n?n+t:t;return e.ke[c]?e.ke[c].fn?e.ke[c]=[e.ke[c],s]:e.ke[c].push(s):(e.ke[c]=s,e.Te++),e}function a(e,t){0===--e.Te?e.ke=new r:delete e.ke[t]}function s(){this.ke=new r,this.Te=0}Object.create&&(r.prototype=/* @__PURE__ */Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this.Te)return o;for(r in e=this.ke)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.ke[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this.ke[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,i,a){var s=n?n+e:e;if(!this.ke[s])return!1;var c,u,l=this.ke[s],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,o),!0;case 5:return l.fn.call(l.context,t,r,o,i),!0;case 6:return l.fn.call(l.context,t,r,o,i,a),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var f,h=l.length;for(u=0;u<h;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,o);break;default:if(!c)for(f=1,c=new Array(d-1);f<d;f++)c[f-1]=arguments[f];l[u].fn.apply(l[u].context,c)}}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this.ke[i])return this;if(!t)return a(this,i),this;var s=this.ke[i];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||a(this,i);else{for(var c=0,u=[],l=s.length;c<l;c++)(s[c].fn!==t||o&&!s[c].once||r&&s[c].context!==r)&&u.push(s[c]);u.length?this.ke[i]=1===u.length?u[0]:u:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this.ke[t]&&a(this,t)):(this.ke=new r,this.Te=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}({exports:{}}));class dd{constructor(e){Object.assign(this,e)}encode(){return Go.Buffer.from(Di.serialize(fd,this))}static decode(e){return Di.deserialize(fd,this,e)}static decodeUnchecked(e){return Di.deserializeUnchecked(fd,this,e)}}const fd=/* @__PURE__ */new Map;var hd;let pd=1;class md extends dd{constructor(e){if(super({}),this.Ee=void 0,function(e){return void 0!==e.Ee}(e))this.Ee=e.Ee;else{if("string"==typeof e){const t=ki.decode(e);if(32!=t.length)throw new Error("Invalid public key input");this.Ee=new pi(t)}else this.Ee=new pi(e);if(this.Ee.byteLength()>32)throw new Error("Invalid public key input")}}static unique(){const e=new md(pd);return pd+=1,new md(e.toBuffer())}equals(e){return this.Ee.eq(e.Ee)}toBase58(){return ki.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}toBuffer(){const e=this.Ee.toArrayLike(Go.Buffer);if(32===e.length)return e;const t=Go.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,t,n){const r=Go.Buffer.concat([e.toBuffer(),Go.Buffer.from(t),n.toBuffer()]),o=Pn(r);return new md(o)}static createProgramAddressSync(e,t){let n=Go.Buffer.alloc(0);e.forEach(function(e){if(e.length>32)throw new TypeError("Max seed length exceeded");var t;n=Go.Buffer.concat([n,(t=e,Go.Buffer.isBuffer(t)?t:t instanceof Uint8Array?Go.Buffer.from(t.buffer,t.byteOffset,t.byteLength):Go.Buffer.from(t))])}),n=Go.Buffer.concat([n,t.toBuffer(),Go.Buffer.from("ProgramDerivedAddress")]);const r=Pn(n);if(ld(r))throw new Error("Invalid seeds, address must fall off the curve");return new md(r)}static async createProgramAddress(e,t){return this.createProgramAddressSync(e,t)}static findProgramAddressSync(e,t){let n,r=255;for(;0!=r;){try{const o=e.concat(Go.Buffer.from([r]));n=this.createProgramAddressSync(o,t)}catch(o){if(o instanceof TypeError)throw o;r--;continue}return[n,r]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,t){return this.findProgramAddressSync(e,t)}static isOnCurve(e){return ld(new md(e).toBytes())}}hd=md,md.default=new hd("11111111111111111111111111111111"),fd.set(md,{kind:"struct",fields:[["_bn","u256"]]}),new md("BPFLoader1111111111111111111111111111111111");const wd=(e="publicKey")=>qi.blob(32,e),gd=(e="string")=>{const t=qi.struct([qi.u32("length"),qi.u32("lengthPadding"),qi.blob(qi.offset(qi.u32(),-8),"chars")],e),n=t.decode.bind(t),r=t.encode.bind(t),o=t;return o.decode=(e,t)=>n(e,t).chars.toString(),o.encode=(e,t,n)=>{const o={chars:Go.Buffer.from(e,"utf8")};return r(o,t,n)},o.alloc=e=>qi.u32().span+qi.u32().span+Go.Buffer.from(e,"utf8").length,o};Go.Buffer.alloc(64).fill(0),new md("SysvarC1ock11111111111111111111111111111111"),new md("SysvarEpochSchedu1e111111111111111111111111"),new md("Sysvar1nstructions1111111111111111111111111"),new md("SysvarRecentB1ockHashes11111111111111111111"),new md("SysvarRent111111111111111111111111111111111"),new md("SysvarRewards111111111111111111111111111111"),new md("SysvarS1otHashes111111111111111111111111111"),new md("SysvarS1otHistory11111111111111111111111111"),new md("SysvarStakeHistory1111111111111111111111111");const yd=qi.nu64("lamportsPerSignature");function bd(e){const t=qi.blob(8,e),n=t.decode.bind(t),r=t.encode.bind(t),o=t,i=il();return o.decode=(e,t)=>{const r=n(e,t);return i.decode(r)},o.encode=(e,t,n)=>{const o=i.encode(e);return r(o,t,n)},o}qi.struct([qi.u32("version"),qi.u32("state"),wd("authorizedPubkey"),wd("nonce"),qi.struct([yd],"feeCalculator")]).span,Object.freeze({Create:{index:0,layout:qi.struct([qi.u32("instruction"),qi.ns64("lamports"),qi.ns64("space"),wd("programId")])},Assign:{index:1,layout:qi.struct([qi.u32("instruction"),wd("programId")])},Transfer:{index:2,layout:qi.struct([qi.u32("instruction"),bd("lamports")])},CreateWithSeed:{index:3,layout:qi.struct([qi.u32("instruction"),wd("base"),gd("seed"),qi.ns64("lamports"),qi.ns64("space"),wd("programId")])},AdvanceNonceAccount:{index:4,layout:qi.struct([qi.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:qi.struct([qi.u32("instruction"),qi.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:qi.struct([qi.u32("instruction"),wd("authorized")])},AuthorizeNonceAccount:{index:7,layout:qi.struct([qi.u32("instruction"),wd("authorized")])},Allocate:{index:8,layout:qi.struct([qi.u32("instruction"),qi.ns64("space")])},AllocateWithSeed:{index:9,layout:qi.struct([qi.u32("instruction"),wd("base"),gd("seed"),qi.ns64("space"),wd("programId")])},AssignWithSeed:{index:10,layout:qi.struct([qi.u32("instruction"),wd("base"),gd("seed"),wd("programId")])},TransferWithSeed:{index:11,layout:qi.struct([qi.u32("instruction"),bd("lamports"),gd("seed"),wd("programId")])},UpgradeNonceAccount:{index:12,layout:qi.struct([qi.u32("instruction")])}}),new md("11111111111111111111111111111111"),new md("BPFLoader2111111111111111111111111111111111"),qi.struct([qi.u32("typeIndex"),bd("deactivationSlot"),qi.nu64("lastExtendedSlot"),qi.u8("lastExtendedStartIndex"),qi.u8(),qi.seq(wd(),qi.offset(qi.u8(),-1),"authority")]);const vd=Ml(vl(md),Cl(),e=>new md(e)),Ad=Il([Cl(),Al("base64")]),kd=Ml(vl(Go.Buffer),Ad,e=>Go.Buffer.from(e[0],"base64"));function Td(e){return Nl([Sl({jsonrpc:Al("2.0"),id:Cl(),result:e}),Sl({jsonrpc:Al("2.0"),id:Cl(),error:Sl({code:Bl(),message:Cl(),data:El(gl("any",()=>!0))})})])}const Ed=Td(Bl());function xd(e){return Ml(Td(e),Ed,t=>"error"in t?t:{...t,result:pl(t.result,e)})}function Cd(e){return xd(Sl({context:Sl({slot:Tl()}),value:e}))}function Id(e){return Sl({context:Sl({slot:Tl()}),value:e})}const Sd=Sl({foundation:Tl(),foundationTerm:Tl(),initial:Tl(),taper:Tl(),terminal:Tl()});xd(yl(kl(Sl({epoch:Tl(),effectiveSlot:Tl(),amount:Tl(),postBalance:Tl(),commission:El(kl(Tl()))}))));const Nd=yl(Sl({slot:Tl(),prioritizationFee:Tl()})),Bd=Sl({total:Tl(),validator:Tl(),foundation:Tl(),epoch:Tl()}),Md=Sl({epoch:Tl(),slotIndex:Tl(),slotsInEpoch:Tl(),absoluteSlot:Tl(),blockHeight:El(Tl()),transactionCount:El(Tl())}),Pd=Sl({slotsPerEpoch:Tl(),leaderScheduleSlotOffset:Tl(),warmup:bl(),firstNormalEpoch:Tl(),firstNormalSlot:Tl()}),Od=xl(Cl(),yl(Tl())),Rd=kl(Nl([Sl({}),Cl()])),Ud=Sl({err:Rd}),Ld=Al("receivedSignature");Sl({"solana-core":Cl(),"feature-set":El(Tl())});const Dd=Sl({program:Cl(),programId:vd,parsed:Bl()}),Fd=Sl({programId:vd,accounts:yl(vd),data:Cl()});Cd(Sl({err:kl(Nl([Sl({}),Cl()])),logs:kl(yl(Cl())),accounts:El(kl(yl(kl(Sl({executable:bl(),owner:Cl(),lamports:Tl(),data:yl(Cl()),rentEpoch:El(Tl())}))))),unitsConsumed:El(Tl()),returnData:El(kl(Sl({programId:Cl(),data:Il([Cl(),Al("base64")])}))),innerInstructions:El(kl(yl(Sl({index:Tl(),instructions:yl(Nl([Dd,Fd]))}))))})),Cd(Sl({byIdentity:xl(Cl(),yl(Tl())),range:Sl({firstSlot:Tl(),lastSlot:Tl()})})),xd(Sd),xd(Bd),xd(Nd),xd(Md),xd(Pd),xd(Od),xd(Tl()),Cd(Sl({total:Tl(),circulating:Tl(),nonCirculating:Tl(),nonCirculatingAccounts:yl(vd)}));const qd=Sl({amount:Cl(),uiAmount:kl(Tl()),decimals:Tl(),uiAmountString:El(Cl())});Cd(yl(Sl({address:vd,amount:Cl(),uiAmount:kl(Tl()),decimals:Tl(),uiAmountString:El(Cl())}))),Cd(yl(Sl({pubkey:vd,account:Sl({executable:bl(),owner:vd,lamports:Tl(),data:kd,rentEpoch:Tl()})})));const Hd=Sl({program:Cl(),parsed:Bl(),space:Tl()});Cd(yl(Sl({pubkey:vd,account:Sl({executable:bl(),owner:vd,lamports:Tl(),data:Hd,rentEpoch:Tl()})}))),Cd(yl(Sl({lamports:Tl(),address:vd})));const Vd=Sl({executable:bl(),owner:vd,lamports:Tl(),data:kd,rentEpoch:Tl()});Sl({pubkey:vd,account:Vd});const Wd=Ml(Nl([vl(Go.Buffer),Hd]),Nl([Ad,Hd]),e=>Array.isArray(e)?pl(e,kd):e),jd=Sl({executable:bl(),owner:vd,lamports:Tl(),data:Wd,rentEpoch:Tl()});Sl({pubkey:vd,account:jd}),Sl({state:Nl([Al("active"),Al("inactive"),Al("activating"),Al("deactivating")]),active:Tl(),inactive:Tl()}),xd(yl(Sl({signature:Cl(),slot:Tl(),err:Rd,memo:kl(Cl()),blockTime:El(kl(Tl()))}))),xd(yl(Sl({signature:Cl(),slot:Tl(),err:Rd,memo:kl(Cl()),blockTime:El(kl(Tl()))}))),Sl({subscription:Tl(),result:Id(Vd)});const Yd=Sl({pubkey:vd,account:Vd});Sl({subscription:Tl(),result:Id(Yd)});const zd=Sl({parent:Tl(),slot:Tl(),root:Tl()});Sl({subscription:Tl(),result:zd});const Gd=Nl([Sl({type:Nl([Al("firstShredReceived"),Al("completed"),Al("optimisticConfirmation"),Al("root")]),slot:Tl(),timestamp:Tl()}),Sl({type:Al("createdBank"),parent:Tl(),slot:Tl(),timestamp:Tl()}),Sl({type:Al("frozen"),slot:Tl(),timestamp:Tl(),stats:Sl({numTransactionEntries:Tl(),numSuccessfulTransactions:Tl(),numFailedTransactions:Tl(),maxTransactionsPerEntry:Tl()})}),Sl({type:Al("dead"),slot:Tl(),timestamp:Tl(),err:Cl()})]);Sl({subscription:Tl(),result:Gd}),Sl({subscription:Tl(),result:Id(Nl([Ud,Ld]))}),Sl({subscription:Tl(),result:Tl()}),Sl({pubkey:Cl(),gossip:kl(Cl()),tpu:kl(Cl()),rpc:kl(Cl()),version:kl(Cl())});const Jd=Sl({votePubkey:Cl(),nodePubkey:Cl(),activatedStake:Tl(),epochVoteAccount:bl(),epochCredits:yl(Il([Tl(),Tl(),Tl()])),commission:Tl(),lastVote:Tl(),rootSlot:kl(Tl())});xd(Sl({current:yl(Jd),delinquent:yl(Jd)}));const Xd=Nl([Al("processed"),Al("confirmed"),Al("finalized")]),Kd=Sl({slot:Tl(),confirmations:kl(Tl()),err:Rd,confirmationStatus:El(Xd)});Cd(yl(kl(Kd))),xd(Tl());const Qd=Sl({accountKey:vd,writableIndexes:yl(Tl()),readonlyIndexes:yl(Tl())}),Zd=Sl({signatures:yl(Cl()),message:Sl({accountKeys:yl(Cl()),header:Sl({numRequiredSignatures:Tl(),numReadonlySignedAccounts:Tl(),numReadonlyUnsignedAccounts:Tl()}),instructions:yl(Sl({accounts:yl(Tl()),data:Cl(),programIdIndex:Tl()})),recentBlockhash:Cl(),addressTableLookups:El(yl(Qd))})}),_d=Sl({pubkey:vd,signer:bl(),writable:bl(),source:El(Nl([Al("transaction"),Al("lookupTable")]))}),$d=Sl({accountKeys:yl(_d),signatures:yl(Cl())}),ef=Sl({parsed:Bl(),program:Cl(),programId:vd}),tf=Sl({accounts:yl(vd),data:Cl(),programId:vd}),nf=Ml(Nl([tf,ef]),Nl([Sl({parsed:Bl(),program:Cl(),programId:Cl()}),Sl({accounts:yl(Cl()),data:Cl(),programId:Cl()})]),e=>pl(e,"accounts"in e?tf:ef)),rf=Sl({signatures:yl(Cl()),message:Sl({accountKeys:yl(_d),instructions:yl(nf),recentBlockhash:Cl(),addressTableLookups:El(kl(yl(Qd)))})}),of=Sl({accountIndex:Tl(),mint:Cl(),owner:El(Cl()),programId:El(Cl()),uiTokenAmount:qd}),af=Sl({writable:yl(vd),readonly:yl(vd)}),sf=Sl({err:Rd,fee:Tl(),innerInstructions:El(kl(yl(Sl({index:Tl(),instructions:yl(Sl({accounts:yl(Tl()),data:Cl(),programIdIndex:Tl()}))})))),preBalances:yl(Tl()),postBalances:yl(Tl()),logMessages:El(kl(yl(Cl()))),preTokenBalances:El(kl(yl(of))),postTokenBalances:El(kl(yl(of))),loadedAddresses:El(af),computeUnitsConsumed:El(Tl()),costUnits:El(Tl())}),cf=Sl({err:Rd,fee:Tl(),innerInstructions:El(kl(yl(Sl({index:Tl(),instructions:yl(nf)})))),preBalances:yl(Tl()),postBalances:yl(Tl()),logMessages:El(kl(yl(Cl()))),preTokenBalances:El(kl(yl(of))),postTokenBalances:El(kl(yl(of))),loadedAddresses:El(af),computeUnitsConsumed:El(Tl()),costUnits:El(Tl())}),uf=Nl([Al(0),Al("legacy")]),lf=Sl({pubkey:Cl(),lamports:Tl(),postBalance:kl(Tl()),rewardType:kl(Cl()),commission:El(kl(Tl()))});xd(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),transactions:yl(Sl({transaction:Zd,meta:kl(sf),version:El(uf)})),rewards:El(yl(lf)),blockTime:kl(Tl()),blockHeight:kl(Tl())}))),xd(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),rewards:El(yl(lf)),blockTime:kl(Tl()),blockHeight:kl(Tl())}))),xd(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),transactions:yl(Sl({transaction:$d,meta:kl(sf),version:El(uf)})),rewards:El(yl(lf)),blockTime:kl(Tl()),blockHeight:kl(Tl())}))),xd(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),transactions:yl(Sl({transaction:rf,meta:kl(cf),version:El(uf)})),rewards:El(yl(lf)),blockTime:kl(Tl()),blockHeight:kl(Tl())}))),xd(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),transactions:yl(Sl({transaction:$d,meta:kl(cf),version:El(uf)})),rewards:El(yl(lf)),blockTime:kl(Tl()),blockHeight:kl(Tl())}))),xd(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),rewards:El(yl(lf)),blockTime:kl(Tl()),blockHeight:kl(Tl())}))),xd(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),transactions:yl(Sl({transaction:Zd,meta:kl(sf)})),rewards:El(yl(lf)),blockTime:kl(Tl())}))),xd(kl(Sl({blockhash:Cl(),previousBlockhash:Cl(),parentSlot:Tl(),signatures:yl(Cl()),blockTime:kl(Tl())}))),xd(kl(Sl({slot:Tl(),meta:kl(sf),blockTime:El(kl(Tl())),transaction:Zd,version:El(uf)}))),xd(kl(Sl({slot:Tl(),transaction:rf,meta:kl(cf),blockTime:El(kl(Tl())),version:El(uf)}))),Cd(Sl({blockhash:Cl(),lastValidBlockHeight:Tl()})),Cd(bl()),xd(yl(Sl({slot:Tl(),numTransactions:Tl(),numSlots:Tl(),samplePeriodSecs:Tl()}))),Cd(kl(Sl({feeCalculator:Sl({lamportsPerSignature:Tl()})}))),xd(Cl()),xd(Cl());const df=Sl({err:Rd,logs:yl(Cl()),signature:Cl()});var ff;Sl({result:Id(df),subscription:Tl()}),Object.freeze({CreateLookupTable:{index:0,layout:qi.struct([qi.u32("instruction"),bd("recentSlot"),qi.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:qi.struct([qi.u32("instruction")])},ExtendLookupTable:{index:2,layout:qi.struct([qi.u32("instruction"),bd(),qi.seq(wd(),qi.offset(qi.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:qi.struct([qi.u32("instruction")])},CloseLookupTable:{index:4,layout:qi.struct([qi.u32("instruction")])}}),new md("AddressLookupTab1e1111111111111111111111111"),Object.freeze({RequestUnits:{index:0,layout:qi.struct([qi.u8("instruction"),qi.u32("units"),qi.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:qi.struct([qi.u8("instruction"),qi.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:qi.struct([qi.u8("instruction"),qi.u32("units")])},SetComputeUnitPrice:{index:3,layout:qi.struct([qi.u8("instruction"),bd("microLamports")])}}),new md("ComputeBudget111111111111111111111111111111"),qi.struct([qi.u8("numSignatures"),qi.u8("padding"),qi.u16("signatureOffset"),qi.u16("signatureInstructionIndex"),qi.u16("publicKeyOffset"),qi.u16("publicKeyInstructionIndex"),qi.u16("messageDataOffset"),qi.u16("messageDataSize"),qi.u16("messageInstructionIndex")]),new md("Ed25519SigVerify111111111111111111111111111"),bo.utils.isValidPrivateKey,qi.struct([qi.u8("numSignatures"),qi.u16("signatureOffset"),qi.u8("signatureInstructionIndex"),qi.u16("ethAddressOffset"),qi.u8("ethAddressInstructionIndex"),qi.u16("messageDataOffset"),qi.u16("messageDataSize"),qi.u8("messageInstructionIndex"),qi.blob(20,"ethAddress"),qi.blob(64,"signature"),qi.u8("recoveryId")]),new md("KeccakSecp256k11111111111111111111111111111"),new md("StakeConfig11111111111111111111111111111111");class hf{constructor(e,t,n){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=t,this.custodian=n}}ff=hf,hf.default=new ff(0,0,md.default),Object.freeze({Initialize:{index:0,layout:qi.struct([qi.u32("instruction"),((e="authorized")=>qi.struct([wd("staker"),wd("withdrawer")],e))(),((e="lockup")=>qi.struct([qi.ns64("unixTimestamp"),qi.ns64("epoch"),wd("custodian")],e))()])},Authorize:{index:1,layout:qi.struct([qi.u32("instruction"),wd("newAuthorized"),qi.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:qi.struct([qi.u32("instruction")])},Split:{index:3,layout:qi.struct([qi.u32("instruction"),qi.ns64("lamports")])},Withdraw:{index:4,layout:qi.struct([qi.u32("instruction"),qi.ns64("lamports")])},Deactivate:{index:5,layout:qi.struct([qi.u32("instruction")])},Merge:{index:7,layout:qi.struct([qi.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:qi.struct([qi.u32("instruction"),wd("newAuthorized"),qi.u32("stakeAuthorizationType"),gd("authoritySeed"),wd("authorityOwner")])}}),new md("Stake11111111111111111111111111111111111111"),Object.freeze({InitializeAccount:{index:0,layout:qi.struct([qi.u32("instruction"),((e="voteInit")=>qi.struct([wd("nodePubkey"),wd("authorizedVoter"),wd("authorizedWithdrawer"),qi.u8("commission")],e))()])},Authorize:{index:1,layout:qi.struct([qi.u32("instruction"),wd("newAuthorized"),qi.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:qi.struct([qi.u32("instruction"),qi.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:qi.struct([qi.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:qi.struct([qi.u32("instruction"),((e="voteAuthorizeWithSeedArgs")=>qi.struct([qi.u32("voteAuthorizationType"),wd("currentAuthorityDerivedKeyOwnerPubkey"),gd("currentAuthorityDerivedKeySeed"),wd("newAuthorized")],e))()])}}),new md("Vote111111111111111111111111111111111111111"),new md("Va1idator1nfo111111111111111111111111111111"),Sl({name:Cl(),website:El(Cl()),details:El(Cl()),iconUrl:El(Cl()),keybaseUsername:El(Cl())}),new md("Vote111111111111111111111111111111111111111"),qi.struct([wd("nodePubkey"),wd("authorizedWithdrawer"),qi.u8("commission"),qi.nu64(),qi.seq(qi.struct([qi.nu64("slot"),qi.u32("confirmationCount")]),qi.offset(qi.u32(),-8),"votes"),qi.u8("rootSlotValid"),qi.nu64("rootSlot"),qi.nu64(),qi.seq(qi.struct([qi.nu64("epoch"),wd("authorizedVoter")]),qi.offset(qi.u32(),-8),"authorizedVoters"),qi.struct([qi.seq(qi.struct([wd("authorizedPubkey"),qi.nu64("epochOfLastAuthorizedSwitch"),qi.nu64("targetEpoch")]),32,"buf"),qi.nu64("idx"),qi.u8("isEmpty")],"priorVoters"),qi.nu64(),qi.seq(qi.struct([qi.nu64("epoch"),qi.nu64("credits"),qi.nu64("prevCredits")]),qi.offset(qi.u32(),-8),"epochCredits"),qi.struct([qi.nu64("slot"),qi.nu64("timestamp")],"lastTimestamp")]);const pf=e=>{const t=/* @__PURE__ */new Date,n=new Date(t);n.setDate(n.getDate()-1);const r=new Date(e);return r.setHours(0,0,0,0),t.setHours(0,0,0,0),n.setHours(0,0,0,0),r.getTime()===t.getTime()?"Today":r.getTime()===n.getTime()?"Yesterday":r.toLocaleDateString("en-US",{month:"short",day:"numeric",year:r.getFullYear()!==t.getFullYear()?"numeric":void 0})},mf=e=>new Promise(t=>setTimeout(t,e||0)),wf=(e,t=5,n=5)=>(e=e||"",e?.length<=t+n?e:`${e.substr(0,t)}...${e.substr(e.length-n,n)}`),gf=e=>{if(!e)return"";const t=Ro[e];return t?t.chainTypeMoralis:""},yf=e=>{if(!e)return"";const t=Ro[e];return t?t.chainType:""},bf={getItem(e){if("undefined"==typeof window)return null;try{return window.localStorage.getItem(e)}catch{return null}},setItem(e,t){if("undefined"!=typeof window)try{window.localStorage.setItem(e,t)}catch{}},removeItem(e){if("undefined"!=typeof window)try{window.localStorage.removeItem(e)}catch{}},get length(){if("undefined"==typeof window)return 0;try{return window.localStorage.length}catch{return 0}},key(e){if("undefined"==typeof window)return null;try{return window.localStorage.key(e)}catch{return null}}};function vf(e){if(lt(e))return!0;try{return new md(e),!0}catch{return!1}}function Af(){const e=String("keyring-chatbot-agent").trim().replace(/^['"]|['"]$/g,"").replace(/^['"]|['"]$/g,"").replace(/[;,]$/,"");return b[e||"keyring-chatbot-agent"]||b["keyring-chatbot-agent"]}const kf=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,ellipsisAddress:wf,formatDate:pf,getChainType:yf,getChainTypeMoralis:gf,getDataPackage:Af,isValidAddress:vf,safeStorage:bf,sleep:mf},Symbol.toStringTag,{value:"Module"})),Tf=s(void 0),Ef=()=>{const e=c(Tf);if(!e)throw new Error("useConnect must be used within ConnectProvider");return{...e,chainData:Ro[e?.account?.chainId]||void 0,chainId:e.account?.chainId||void 0,chainType:yf(e.account?.chainId||void 0),chainTypeMoralis:gf(e.account?.chainId||void 0),isChainSupported:!!Ro[e?.account?.chainId]?.isSupported||!1}},xf=({children:t,initialAccount:n})=>/* @__PURE__ */e(Tf.Provider,{value:{account:n||null},children:t}),Cf=({address:r,chainId:i})=>{const[s,c]=o(!1),{isChainSupported:u}=Ef(),{t:l}=w(),d=a(()=>{if(!r)return;const e=r,t=()=>{c(!0),setTimeout(()=>c(!1),2e3)};try{navigator.clipboard.writeText(e).then(t).catch(()=>{const n=document.createElement("input");n.value=e,document.body.appendChild(n),n.select(),document.execCommand("copy"),n.remove(),t()})}catch{const n=document.createElement("input");n.value=e,document.body.appendChild(n),n.select(),document.execCommand("copy"),n.remove(),t()}},[r]);/* @__PURE__ */
4
+ return e(t,{children:vf(r||"")&&/* @__PURE__ */n("div",{className:"chat-user-info",children:[
5
5
  /* @__PURE__ */n("span",{className:"user-wallet",children:[
6
6
  /* @__PURE__ */n("span",{style:{marginRight:8},children:[Ro[i]?.customName||Ro[i]?.name||`Chain ${i}`,":"]}),
7
- /* @__PURE__ */e("a",{title:l("viewOnExplorer"),style:{pointerEvents:u?"auto":"none"},href:Ro[i]?.blockExplorers?.default?.url+"/address/"+r,target:"_blank",rel:"noopener noreferrer",children:wd(r)||"Not connected"})]}),
8
- /* @__PURE__ */e("button",{className:"copy-address-btn",onClick:f,"aria-label":l("copyWalletAddress"),type:"button",title:l(s?"copied":"copyAddress"),children:/* @__PURE__ */e("svg",s?{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:/* @__PURE__ */e("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"#0B3988",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}:{width:"14",height:"14",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:/* @__PURE__ */e("path",{d:"M8.1 15.75H13.23C12.9638 16.4152 12.5041 16.9852 11.9105 17.3863C11.3168 17.7874 10.6165 18.0012 9.9 18H3.6C2.64522 18 1.72955 17.6207 1.05442 16.9456C0.379285 16.2704 0 15.3548 0 14.4V7.2C0.00104929 6.32332 0.321408 5.47704 0.901163 4.81944C1.48092 4.16183 2.28037 3.73792 3.15 3.627V10.8C3.15238 12.1121 3.67466 13.3698 4.60245 14.2975C5.53024 15.2253 6.78791 15.7476 8.1 15.75ZM15.75 3.825H17.658C17.6027 3.74389 17.5393 3.66852 17.469 3.6L14.4 0.531C14.3337 0.460854 14.258 0.400274 14.175 0.351V2.25C14.1769 2.66713 14.3434 3.06664 14.6384 3.3616C14.9334 3.65656 15.3329 3.8231 15.75 3.825ZM15.75 5.175C14.9747 5.17357 14.2315 4.86494 13.6833 4.31671C13.1351 3.76847 12.8264 3.02532 12.825 2.25V0H8.1C7.14522 0 6.22955 0.379285 5.55442 1.05442C4.87928 1.72955 4.5 2.64522 4.5 3.6V10.8C4.5 11.7548 4.87928 12.6704 5.55442 13.3456C6.22955 14.0207 7.14522 14.4 8.1 14.4H14.4C15.3548 14.4 16.2705 14.0207 16.9456 13.3456C17.6207 12.6704 18 11.7548 18 10.8V5.175H15.75Z",fill:"#0B3988"})})})]})})},Id="chat_widget_messages",Sd=200,Nd=()=>Math.random().toString(36).substring(2,12),Bd="welcome-message";function Md(e){return[{id:Bd,text:e,sender:"bot",timestamp:/* @__PURE__ */new Date}]}function Pd(e){return e.map(e=>({...e,timestamp:new Date(e.timestamp)}))}function Od(){const e=bd.getItem(Id);if(!e)return null;try{const t=JSON.parse(e);if(t&&void 0!==t.owner&&Array.isArray(t.messages))return{owner:t.owner,messages:Pd(t.messages)};if(Array.isArray(t))return{owner:"",messages:Pd(t)}}catch{}return null}function Rd(e,t){bd.setItem(Id,JSON.stringify({owner:e,messages:t}))}const Ud=s(void 0),Ld=({children:t,initialConfig:n})=>/* @__PURE__ */e(Ud.Provider,{value:{config:n||null},children:t}),Dd={send_native:{label:"actionSendNativeLabel",description:"actionSendNativeDesc",fields:[{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_token:{label:"actionSendTokenLabel",description:"actionSendTokenDesc",fields:[{key:"contract_address",label:"fieldTokenContract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"fieldTokenSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"decimals",label:"fieldDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},swap_token:{label:"actionSwapTokenLabel",description:"actionSwapTokenDesc",fields:[{key:"token_in",label:"fieldTokenIn",type:"address",placeholder:"0x... or native",required:!0,editable:!1},{key:"token_in_symbol",label:"fieldTokenInSymbol",type:"text",placeholder:"e.g. ETH",required:!1,editable:!1},{key:"token_out",label:"fieldTokenOut",type:"address",placeholder:"0x...",required:!0,editable:!1},{key:"token_out_symbol",label:"fieldTokenOutSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"token_in_decimals",label:"fieldTokenInDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"token_out_decimals",label:"fieldTokenOutDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},approve_token:{label:"actionApproveTokenLabel",description:"actionApproveTokenDesc",fields:[{key:"contract_address",label:"fieldTokenContract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"fieldTokenSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"spender_address",label:"fieldSpenderAddress",type:"address",placeholder:"0x... spender contract",required:!0,validation:"address",editable:!1},{key:"amount",label:"fieldAmountUnlimited",type:"amount",placeholder:"0.0 or leave empty for max",required:!1,validation:"amount"},{key:"decimals",label:"fieldDecimals",type:"number",placeholder:"18",required:!1,editable:!1}]},wrap_native:{label:"actionWrapNativeLabel",description:"actionWrapNativeDesc",fields:[{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},unwrap_native:{label:"actionUnwrapNativeLabel",description:"actionUnwrapNativeDesc",fields:[{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_nft:{label:"actionSendNftLabel",description:"actionSendNftDesc",fields:[{key:"contract_address",label:"fieldNftContract",type:"address",placeholder:"0x... NFT contract",required:!0,validation:"address",editable:!1},{key:"token_id",label:"fieldTokenId",type:"text",placeholder:"e.g. 1234",required:!0,editable:!1},{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"token_standard",label:"fieldTokenStandard",type:"text",placeholder:"ERC721 or ERC1155",required:!0,editable:!1},{key:"amount",label:"fieldAmount",type:"text",placeholder:"1",required:!0},{key:"maxAmount",label:"fieldMaxAmount",type:"text",placeholder:"",required:!1,editable:!1,hidden:!0},{key:"nft_name",label:"fieldNftName",type:"text",placeholder:"e.g. Bored Ape #1234",required:!1,editable:!1}]}};function Fd(e){if(!e||""===e?.trim())return!1;const t=parseFloat(e);return!isNaN(t)&&t>0}var qd=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Hd=Math.ceil,Vd=Math.floor,Wd="[BigNumber Error] ",jd=Wd+"Number primitive has more than 15 significant digits: ",Yd=1e14,zd=14,Gd=9007199254740991,Jd=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Xd=1e7,Kd=1e9;function Qd(e){var t=0|e;return e>0||e===t?t:t-1}function Zd(e){for(var t,n,r=1,o=e.length,i=e[0]+"";r<o;){for(t=e[r++]+"",n=zd-t.length;n--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function _d(e,t){var n,r,o=e.c,i=t.c,a=e.s,s=t.s,c=e.e,u=t.e;if(!a||!s)return null;if(n=o&&!o[0],r=i&&!i[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=a<0,r=c==u,!o||!i)return r?0:!o^n?1:-1;if(!r)return c>u^n?1:-1;for(s=(c=o.length)<(u=i.length)?c:u,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^n?1:-1;return c==u?0:c>u^n?1:-1}function $d(e,t,n,r){if(e<t||e>n||e!==Vd(e))throw Error(Wd+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function eh(e){var t=e.c.length-1;return Qd(e.e/zd)==t&&e.c[t]%2!=0}function th(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function nh(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(++t>(r=e.length)){for(o=n,t-=r;--t;o+=n);e+=o}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var rh=function e(t){var n,r,o,i,a,s=A.prototype={constructor:A,toString:null,valueOf:null},c=new A(1),u=20,l=4,f=-7,d=21,h=-1e7,p=1e7,m=!1,w=1,g=0,y={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},b="0123456789abcdefghijklmnopqrstuvwxyz",v=!0;function A(e,t){var n,i,a,s,c,f,d,m,w=this;if(!(w instanceof A))return new A(e,t);if(null==t){if(e&&!0===e.xe)return w.s=e.s,void(!e.c||e.e>p?w.c=w.e=null:e.e<h?w.c=[w.e=0]:(w.e=e.e,w.c=e.c.slice()));if((f="number"==typeof e)&&0*e==0){if(w.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>p?w.c=w.e=null:(w.e=s,w.c=[e]))}m=String(e)}else{if(!qd.test(m=String(e)))return o(w,m,f);w.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(s=m.indexOf("."))>-1&&(m=m.replace(".","")),(c=m.search(/e/i))>0?(s<0&&(s=c),s+=+m.slice(c+1),m=m.substring(0,c)):s<0&&(s=m.length)}else{if($d(t,2,b.length,"Base"),10==t&&v)return x(w=new A(e),u+w.e+1,l);if(m=String(e),f="number"==typeof e){if(0*e!=0)return o(w,m,f,t);if(w.s=1/e<0?(m=m.slice(1),-1):1,A.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(jd+e)}else w.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=b.slice(0,t),s=c=0,d=m.length;c<d;c++)if(n.indexOf(i=m.charAt(c))<0){if("."==i){if(c>s){s=d;continue}}else if(!a&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){a=!0,c=-1,s=0;continue}return o(w,String(e),f,t)}f=!1,(s=(m=r(m,t,10,w.s)).indexOf("."))>-1?m=m.replace(".",""):s=m.length}for(c=0;48===m.charCodeAt(c);c++);for(d=m.length;48===m.charCodeAt(--d););if(m=m.slice(c,++d)){if(d-=c,f&&A.DEBUG&&d>15&&(e>Gd||e!==Vd(e)))throw Error(jd+w.s*e);if((s=s-c-1)>p)w.c=w.e=null;else if(s<h)w.c=[w.e=0];else{if(w.e=s,w.c=[],c=(s+1)%zd,s<0&&(c+=zd),c<d){for(c&&w.c.push(+m.slice(0,c)),d-=zd;c<d;)w.c.push(+m.slice(c,c+=zd));c=zd-(m=m.slice(c)).length}else c-=d;for(;c--;m+="0");w.c.push(+m)}}else w.c=[w.e=0]}function k(e,t,n,r){var o,i,a,s,c;if(null==n?n=l:$d(n,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=Zd(e.c),c=1==r||2==r&&(a<=f||a>=d)?th(c,a):nh(c,a,"0");else if(i=(e=x(new A(e),t,n)).e,s=(c=Zd(e.c)).length,1==r||2==r&&(t<=i||i<=f)){for(;s<t;c+="0",s++);c=th(c,i)}else if(t-=a+(2===r&&i>a),c=nh(c,i,"0"),i+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-s)>0)for(i+1==s&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function T(e,t){for(var n,r,o=1,i=new A(e[0]);o<e.length;o++)(!(r=new A(e[o])).s||(n=_d(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function E(e,t,n){for(var r=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,r++);return(n=r+n*zd-1)>p?e.c=e.e=null:n<h?e.c=[e.e=0]:(e.e=n,e.c=t),e}function x(e,t,n,r){var o,i,a,s,c,u,l,f=e.c,d=Jd;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=zd,a=t,c=f[u=0],l=Vd(c/d[o-a-1]%10);else if((u=Hd((i+1)/zd))>=f.length){if(!r)break e;for(;f.length<=u;f.push(0));c=l=0,o=1,a=(i%=zd)-zd+1}else{for(c=s=f[u],o=1;s>=10;s/=10,o++);l=(a=(i%=zd)-zd+o)<0?0:Vd(c/d[o-a-1]%10)}if(r=r||t<0||null!=f[u+1]||(a<0?c:c%d[o-a-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(i>0?a>0?c/d[o-a]:0:f[u-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=d[(zd-t%zd)%zd],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=u,s=1,u--):(f.length=u+1,s=d[zd-i],f[u]=a>0?Vd(c/d[o-a]%d[a])*s:0),r)for(;;){if(0==u){for(i=1,a=f[0];a>=10;a/=10,i++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,f[0]==Yd&&(f[0]=1));break}if(f[u]+=s,f[u]!=Yd)break;f[u--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>p?e.c=e.e=null:e.e<h&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return null===n?e.toString():(t=Zd(e.c),t=n<=f||n>=d?th(t,n):nh(t,n,"0"),e.s<0?"-"+t:t)}return A.clone=e,A.ROUND_UP=0,A.ROUND_DOWN=1,A.ROUND_CEIL=2,A.ROUND_FLOOR=3,A.ROUND_HALF_UP=4,A.ROUND_HALF_DOWN=5,A.ROUND_HALF_EVEN=6,A.ROUND_HALF_CEIL=7,A.ROUND_HALF_FLOOR=8,A.EUCLID=9,A.config=A.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(Wd+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&($d(n=e[t],0,Kd,t),u=n),e.hasOwnProperty(t="ROUNDING_MODE")&&($d(n=e[t],0,8,t),l=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?($d(n[0],-Kd,0,t),$d(n[1],0,Kd,t),f=n[0],d=n[1]):($d(n,-Kd,Kd,t),f=-(d=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)$d(n[0],-Kd,-1,t),$d(n[1],1,Kd,t),h=n[0],p=n[1];else{if($d(n,-Kd,Kd,t),!n)throw Error(Wd+t+" cannot be zero: "+n);h=-(p=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(Wd+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw m=!n,Error(Wd+"crypto unavailable");m=n}else m=n}if(e.hasOwnProperty(t="MODULO_MODE")&&($d(n=e[t],0,9,t),w=n),e.hasOwnProperty(t="POW_PRECISION")&&($d(n=e[t],0,Kd,t),g=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(Wd+t+" not an object: "+n);y=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(Wd+t+" invalid: "+n);v="0123456789"==n.slice(0,10),b=n}}return{DECIMAL_PLACES:u,ROUNDING_MODE:l,EXPONENTIAL_AT:[f,d],RANGE:[h,p],CRYPTO:m,MODULO_MODE:w,POW_PRECISION:g,FORMAT:y,ALPHABET:b}},A.isBigNumber=function(e){if(!e||!0!==e.xe)return!1;if(!A.DEBUG)return!0;var t,n,r=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&o>=-Kd&&o<=Kd&&o===Vd(o)){if(0===r[0]){if(0===o&&1===r.length)return!0;break e}if((t=(o+1)%zd)<1&&(t+=zd),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=Yd||n!==Vd(n))break e;if(0!==n)return!0}}}else if(null===r&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(Wd+"Invalid BigNumber: "+e)},A.maximum=A.max=function(){return T(arguments,-1)},A.minimum=A.min=function(){return T(arguments,1)},A.random=(i=9007199254740992,a=Math.random()*i&2097151?function(){return Vd(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,o,i,s=0,l=[],f=new A(c);if(null==e?e=u:$d(e,0,Kd),o=Hd(e/zd),m)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(i=131072*t[s]+(t[s+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[s]=n[0],t[s+1]=n[1]):(l.push(i%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw m=!1,Error(Wd+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(i=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(l.push(i%1e14),s+=7);s=o/7}if(!m)for(;s<o;)(i=a())<9e15&&(l[s++]=i%1e14);for(o=l[--s],e%=zd,o&&e&&(i=Jd[zd-e],l[s]=Vd(o/i)*i);0===l[s];l.pop(),s--);if(s<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=zd);for(s=1,i=l[0];i>=10;i/=10,s++);s<zd&&(r-=zd-s)}return f.e=r,f.c=l,f}),A.sum=function(){for(var e=1,t=arguments,n=new A(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=/* @__PURE__ */function(){var e="0123456789";function t(e,t,n,r){for(var o,i,a=[0],s=0,c=e.length;s<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>n-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/n|0,a[o]%=n)}return a.reverse()}return function(r,o,i,a,s){var c,f,d,h,p,m,w,y,v=r.indexOf("."),k=u,T=l;for(v>=0&&(h=g,g=0,r=r.replace(".",""),m=(y=new A(o)).pow(r.length-v),g=h,y.c=t(nh(Zd(m.c),m.e,"0"),10,i,e),y.e=y.c.length),d=h=(w=t(r,o,i,s?(c=b,e):(c=e,b))).length;0==w[--h];w.pop());if(!w[0])return c.charAt(0);if(v<0?--d:(m.c=w,m.e=d,m.s=a,w=(m=n(m,y,k,T,i)).c,p=m.r,d=m.e),v=w[f=d+k+1],h=i/2,p=p||f<0||null!=w[f+1],p=T<4?(null!=v||p)&&(0==T||T==(m.s<0?3:2)):v>h||v==h&&(4==T||p||6==T&&1&w[f-1]||T==(m.s<0?8:7)),f<1||!w[0])r=p?nh(c.charAt(1),-k,c.charAt(0)):c.charAt(0);else{if(w.length=f,p)for(--i;++w[--f]>i;)w[f]=0,f||(++d,w=[1].concat(w));for(h=w.length;!w[--h];);for(v=0,r="";v<=h;r+=c.charAt(w[v++]));r=nh(r,d,c.charAt(0))}return r}}(),n=/* @__PURE__ */function(){function e(e,t,n){var r,o,i,a,s=0,c=e.length,u=t%Xd,l=t/Xd|0;for(e=e.slice();c--;)s=((o=u*(i=e[c]%Xd)+(r=l*i+(a=e[c]/Xd|0)*u)%Xd*Xd+s)/n|0)+(r/Xd|0)+l*a,e[c]=o%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n,r){for(var o=0;n--;)e[n]-=o,o=e[n]<t[n]?1:0,e[n]=o*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,o,i,a,s){var c,u,l,f,d,h,p,m,w,g,y,b,v,k,T,E,C,I=r.s==o.s?1:-1,S=r.c,N=o.c;if(!(S&&S[0]&&N&&N[0]))return new A(r.s&&o.s&&(S?!N||S[0]!=N[0]:N)?S&&0==S[0]||!N?0*I:I/0:NaN);for(w=(m=new A(I)).c=[],I=i+(u=r.e-o.e)+1,s||(s=Yd,u=Qd(r.e/zd)-Qd(o.e/zd),I=I/zd|0),l=0;N[l]==(S[l]||0);l++);if(N[l]>(S[l]||0)&&u--,I<0)w.push(1),f=!0;else{for(k=S.length,E=N.length,l=0,I+=2,(d=Vd(s/(N[0]+1)))>1&&(N=e(N,d,s),S=e(S,d,s),E=N.length,k=S.length),v=E,y=(g=S.slice(0,E)).length;y<E;g[y++]=0);C=N.slice(),C=[0].concat(C),T=N[0],N[1]>=s/2&&T++;do{if(d=0,(c=t(N,g,E,y))<0){if(b=g[0],E!=y&&(b=b*s+(g[1]||0)),(d=Vd(b/T))>1)for(d>=s&&(d=s-1),p=(h=e(N,d,s)).length,y=g.length;1==t(h,g,p,y);)d--,n(h,E<p?C:N,p,s),p=h.length,c=1;else 0==d&&(c=d=1),p=(h=N.slice()).length;if(p<y&&(h=[0].concat(h)),n(g,h,y,s),y=g.length,-1==c)for(;t(N,g,E,y)<1;)d++,n(g,E<y?C:N,y,s),y=g.length}else 0===c&&(d++,g=[0]);w[l++]=d,g[0]?g[y++]=S[v]||0:(g=[S[v]],y=1)}while((v++<k||null!=g[0])&&I--);f=null!=g[0],w[0]||w.splice(0,1)}if(s==Yd){for(l=1,I=w[0];I>=10;I/=10,l++);x(m,i+(m.e=l+u*zd-1)+1,a,f)}else m.e=u,m.r=+f;return m}}(),o=/* @__PURE__ */function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,o=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(i,a,s,c){var u,l=s?a:a.replace(o,"");if(r.test(l))i.s=isNaN(l)?null:l<0?-1:1;else{if(!s&&(l=l.replace(e,function(e,t,n){return u="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=u?e:t}),c&&(u=c,l=l.replace(t,"$1").replace(n,"0.$1")),a!=l))return new A(l,u);if(A.DEBUG)throw Error(Wd+"Not a"+(c?" base "+c:"")+" number: "+a);i.s=null}i.c=i.e=null}}(),s.absoluteValue=s.abs=function(){var e=new A(this);return e.s<0&&(e.s=1),e},s.comparedTo=function(e,t){return _d(this,new A(e,t))},s.decimalPlaces=s.dp=function(e,t){var n,r,o,i=this;if(null!=e)return $d(e,0,Kd),null==t?t=l:$d(t,0,8),x(new A(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((o=n.length-1)-Qd(this.e/zd))*zd,o=n[o])for(;o%10==0;o/=10,r--);return r<0&&(r=0),r},s.dividedBy=s.div=function(e,t){return n(this,new A(e,t),u,l)},s.dividedToIntegerBy=s.idiv=function(e,t){return n(this,new A(e,t),0,1)},s.exponentiatedBy=s.pow=function(e,t){var n,r,o,i,a,s,u,f,d=this;if((e=new A(e)).c&&!e.isInteger())throw Error(Wd+"Exponent not an integer: "+C(e));if(null!=t&&(t=new A(t)),a=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return f=new A(Math.pow(+C(d),a?e.s*(2-eh(e)):+C(e))),t?f.mod(t):f;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new A(NaN);(r=!s&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||a&&d.c[1]>=24e7:d.c[0]<8e13||a&&d.c[0]<=9999975e7)))return i=d.s<0&&eh(e)?-0:0,d.e>-1&&(i=1/i),new A(s?1/i:i);g&&(i=Hd(g/zd+2))}for(a?(n=new A(.5),s&&(e.s=1),u=eh(e)):u=(o=Math.abs(+C(e)))%2,f=new A(c);;){if(u){if(!(f=f.times(d)).c)break;i?f.c.length>i&&(f.c.length=i):r&&(f=f.mod(t))}if(o){if(0===(o=Vd(o/2)))break;u=o%2}else if(x(e=e.times(n),e.e+1,1),e.e>14)u=eh(e);else{if(0===(o=+C(e)))break;u=o%2}d=d.times(d),i?d.c&&d.c.length>i&&(d.c.length=i):r&&(d=d.mod(t))}return r?f:(s&&(f=c.div(f)),t?f.mod(t):i?x(f,g,l,void 0):f)},s.integerValue=function(e){var t=new A(this);return null==e?e=l:$d(e,0,8),x(t,t.e+1,e)},s.isEqualTo=s.eq=function(e,t){return 0===_d(this,new A(e,t))},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(e,t){return _d(this,new A(e,t))>0},s.isGreaterThanOrEqualTo=s.gte=function(e,t){return 1===(t=_d(this,new A(e,t)))||0===t},s.isInteger=function(){return!!this.c&&Qd(this.e/zd)>this.c.length-2},s.isLessThan=s.lt=function(e,t){return _d(this,new A(e,t))<0},s.isLessThanOrEqualTo=s.lte=function(e,t){return-1===(t=_d(this,new A(e,t)))||0===t},s.isNaN=function(){return!this.s},s.isNegative=function(){return this.s<0},s.isPositive=function(){return this.s>0},s.isZero=function(){return!!this.c&&0==this.c[0]},s.minus=function(e,t){var n,r,o,i,a=this,s=a.s;if(t=(e=new A(e,t)).s,!s||!t)return new A(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/zd,u=e.e/zd,f=a.c,d=e.c;if(!c||!u){if(!f||!d)return f?(e.s=-t,e):new A(d?a:NaN);if(!f[0]||!d[0])return d[0]?(e.s=-t,e):new A(f[0]?a:3==l?-0:0)}if(c=Qd(c),u=Qd(u),f=f.slice(),s=c-u){for((i=s<0)?(s=-s,o=f):(u=c,o=d),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(r=(i=(s=f.length)<(t=d.length))?s:t,s=t=0;t<r;t++)if(f[t]!=d[t]){i=f[t]<d[t];break}if(i&&(o=f,f=d,d=o,e.s=-e.s),(t=(r=d.length)-(n=f.length))>0)for(;t--;f[n++]=0);for(t=Yd-1;r>s;){if(f[--r]<d[r]){for(n=r;n&&!f[--n];f[n]=t);--f[n],f[r]+=Yd}f[r]-=d[r]}for(;0==f[0];f.splice(0,1),--u);return f[0]?E(e,f,u):(e.s=3==l?-1:1,e.c=[e.e=0],e)},s.modulo=s.mod=function(e,t){var r,o,i=this;return e=new A(e,t),!i.c||!e.s||e.c&&!e.c[0]?new A(NaN):!e.c||i.c&&!i.c[0]?new A(i):(9==w?(o=e.s,e.s=1,r=n(i,e,0,3),e.s=o,r.s*=o):r=n(i,e,0,w),(e=i.minus(r.times(e))).c[0]||1!=w||(e.s=i.s),e)},s.multipliedBy=s.times=function(e,t){var n,r,o,i,a,s,c,u,l,f,d,h,p,m,w,g=this,y=g.c,b=(e=new A(e,t)).c;if(!(y&&b&&y[0]&&b[0]))return!g.s||!e.s||y&&!y[0]&&!b||b&&!b[0]&&!y?e.c=e.e=e.s=null:(e.s*=g.s,y&&b?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=Qd(g.e/zd)+Qd(e.e/zd),e.s*=g.s,(c=y.length)<(f=b.length)&&(p=y,y=b,b=p,o=c,c=f,f=o),o=c+f,p=[];o--;p.push(0));for(m=Yd,w=Xd,o=f;--o>=0;){for(n=0,d=b[o]%w,h=b[o]/w|0,i=o+(a=c);i>o;)n=((u=d*(u=y[--a]%w)+(s=h*u+(l=y[a]/w|0)*d)%w*w+p[i]+n)/m|0)+(s/w|0)+h*l,p[i--]=u%m;p[i]=n}return n?++r:p.splice(0,1),E(e,p,r)},s.negated=function(){var e=new A(this);return e.s=-e.s||null,e},s.plus=function(e,t){var n,r=this,o=r.s;if(t=(e=new A(e,t)).s,!o||!t)return new A(NaN);if(o!=t)return e.s=-t,r.minus(e);var i=r.e/zd,a=e.e/zd,s=r.c,c=e.c;if(!i||!a){if(!s||!c)return new A(o/0);if(!s[0]||!c[0])return c[0]?e:new A(s[0]?r:0*o)}if(i=Qd(i),a=Qd(a),s=s.slice(),o=i-a){for(o>0?(a=i,n=c):(o=-o,n=s),n.reverse();o--;n.push(0));n.reverse()}for((o=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/Yd|0,s[t]=Yd===s[t]?0:s[t]%Yd;return o&&(s=[o].concat(s),++a),E(e,s,a)},s.precision=s.sd=function(e,t){var n,r,o,i=this;if(null!=e&&e!==!!e)return $d(e,1,Kd),null==t?t=l:$d(t,0,8),x(new A(i),e,t);if(!(n=i.c))return null;if(r=(o=n.length-1)*zd+1,o=n[o]){for(;o%10==0;o/=10,r--);for(o=n[0];o>=10;o/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},s.shiftedBy=function(e){return $d(e,-9007199254740991,Gd),this.times("1e"+e)},s.squareRoot=s.sqrt=function(){var e,t,r,o,i,a=this,s=a.c,c=a.s,f=a.e,d=u+4,h=new A("0.5");if(1!==c||!s||!s[0])return new A(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+C(a)))||c==1/0?(((t=Zd(s)).length+f)%2==0&&(t+="0"),c=Math.sqrt(+t),f=Qd((f+1)/2)-(f<0||f%2),r=new A(t=c==1/0?"5e"+f:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+f)):r=new A(c+""),r.c[0])for((c=(f=r.e)+d)<3&&(c=0);;)if(i=r,r=h.times(i.plus(n(a,i,d,1))),Zd(i.c).slice(0,c)===(t=Zd(r.c)).slice(0,c)){if(r.e<f&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(x(r,r.e+u+2,1),e=!r.times(r).eq(a));break}if(!o&&(x(i,i.e+u+2,0),i.times(i).eq(a))){r=i;break}d+=4,c+=4,o=1}return x(r,r.e+u+1,l,e)},s.toExponential=function(e,t){return null!=e&&($d(e,0,Kd),e++),k(this,e,t,1)},s.toFixed=function(e,t){return null!=e&&($d(e,0,Kd),e=e+this.e+1),k(this,e,t)},s.toFormat=function(e,t,n){var r,o=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=y;else if("object"!=typeof n)throw Error(Wd+"Argument not an object: "+n);if(r=o.toFixed(e,t),o.c){var i,a=r.split("."),s=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=a[0],f=a[1],d=o.s<0,h=d?l.slice(1):l,p=h.length;if(c&&(i=s,s=c,c=i,p-=i),s>0&&p>0){for(i=p%s||s,l=h.substr(0,i);i<p;i+=s)l+=u+h.substr(i,s);c>0&&(l+=u+h.slice(i)),d&&(l="-"+l)}r=f?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):f):l}return(n.prefix||"")+r+(n.suffix||"")},s.toFraction=function(e){var t,r,o,i,a,s,u,f,d,h,m,w,g=this,y=g.c;if(null!=e&&(!(u=new A(e)).isInteger()&&(u.c||1!==u.s)||u.lt(c)))throw Error(Wd+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+C(u));if(!y)return new A(g);for(t=new A(c),d=r=new A(c),o=f=new A(c),w=Zd(y),a=t.e=w.length-g.e-1,t.c[0]=Jd[(s=a%zd)<0?zd+s:s],e=!e||u.comparedTo(t)>0?a>0?t:d:u,s=p,p=1/0,u=new A(w),f.c[0]=0;h=n(u,t,0,1),1!=(i=r.plus(h.times(o))).comparedTo(e);)r=o,o=i,d=f.plus(h.times(i=d)),f=i,t=u.minus(h.times(i=t)),u=i;return i=n(e.minus(r),o,0,1),f=f.plus(i.times(d)),r=r.plus(i.times(o)),f.s=d.s=g.s,m=n(d,o,a*=2,l).minus(g).abs().comparedTo(n(f,r,a,l).minus(g).abs())<1?[d,o]:[f,r],p=s,m},s.toNumber=function(){return+C(this)},s.toPrecision=function(e,t){return null!=e&&$d(e,1,Kd),k(this,e,t,2)},s.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=f||i>=d?th(Zd(n.c),i):nh(Zd(n.c),i,"0"):10===e&&v?t=nh(Zd((n=x(new A(n),u+i+1,l)).c),n.e,"0"):($d(e,2,b.length,"Base"),t=r(nh(Zd(n.c),i,"0"),10,e,o,!0)),o<0&&n.c[0]&&(t="-"+t)),t},s.valueOf=s.toJSON=function(){return C(this)},s.xe=!0,s[Symbol.toStringTag]="BigNumber",s[/* @__PURE__ */Symbol.for("nodejs.util.inspect.custom")]=s.valueOf,null!=t&&A.set(t),A}();const oh=({action:t,initialValues:r,onSubmit:i,onCancel:s,isSubmitting:c=!1,tokenInfo:u,nftInfo:l,disabled:f=!1})=>{const{t:d,ti:h}=w(),p=Dd[t],[m,g]=o(()=>{if(!p)return{};const e={};return p.fields.forEach(t=>{e[t.key]=r[t.key]||""}),e}),[y]=o(()=>["send_native","send_token","swap_token"].includes(t)&&!u&&m.contract_address?d("formTokenNotFound"):null),[b,v]=o(()=>{const e={};if(["send_native","send_token","swap_token"].includes(t)&&u){const t=parseFloat(u.balanceFormatted||"0");if(t<=0)e.amount=h("formNoBalance",{symbol:u.symbol??""});else{const n=r.amount?.trim();n&&Fd(n)&&parseFloat(n)>t&&(e.amount=h("formInsufficientBalance",{balance:u.balanceFormatted,symbol:u.symbol??""}))}}return e}),A=a((e,t)=>{g(n=>({...n,[e]:t})),b[e]&&v(t=>{const n={...t};return delete n[e],n})},[b]),k=a(()=>{if(!p)return!1;const e={};if(p.fields.forEach(n=>{const r=m[n.key]?.trim()||"";!n.required||r||"send_nft"===t&&"amount"===n.key?r&&("address"!==n.validation||lt(r)||(e[n.key]=d("formInvalidAddress")),"amount"!==n.validation||Fd(r)||(e[n.key]=d("formMustBePositive")),"amount"===n.key&&r&&Fd(r)&&u?.balanceFormatted&&parseFloat(r)>parseFloat(u.balanceFormatted)&&(e[n.key]=h("formInsufficientBalance",{balance:u.balanceFormatted,symbol:u.symbol??""})),"positive_number"===n.validation&&(isNaN(Number(r))||Number(r)<0)&&(e[n.key]=d("formMustBeValidNumber"))):e[n.key]=h("formFieldRequired",{field:d(n.label)})}),"send_nft"===t&&"ERC1155"===m.token_standard?.toUpperCase()){const t=m.amount?.trim();if(t)if(!/^\d+$/.test(t)||parseInt(t,10)<1)e.amount=d("formMustBePositiveInteger");else{const n=parseInt(r.maxAmount||"0",10);n>0&&parseInt(t,10)>n&&(e.amount=h("formAmountExceedsNft",{max:String(n)}))}else e.amount=h("formFieldRequired",{field:d("fieldAmount")})}return v(e),0===Object.keys(e).length},[p,m,u,t,r,d,h]),T=a(()=>{k()&&i(t,m)},[k,i,t,m]);return p?/* @__PURE__ */n("div",{className:"action-form",children:[
9
- /* @__PURE__ */e("div",{className:"action-form-title",children:/* @__PURE__ */e("span",{children:d(p.label)})}),y&&/* @__PURE__ */n("div",{className:"action-form-general-error",children:["⚠️ ",y]}),u&&/* @__PURE__ */e("div",{className:"action-form-token-info",children:/* @__PURE__ */n("div",{className:"token-info-row",children:[u.logo&&/* @__PURE__ */e("img",{src:u.logo,alt:u.symbol,className:"token-info-logo",width:20,height:20}),
7
+ /* @__PURE__ */e("a",{title:l("viewOnExplorer"),style:{pointerEvents:u?"auto":"none"},href:Ro[i]?.blockExplorers?.default?.url+"/address/"+r,target:"_blank",rel:"noopener noreferrer",children:wf(r)||"Not connected"})]}),
8
+ /* @__PURE__ */e("button",{className:"copy-address-btn",onClick:d,"aria-label":l("copyWalletAddress"),type:"button",title:l(s?"copied":"copyAddress"),children:/* @__PURE__ */e("svg",s?{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:/* @__PURE__ */e("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"#0B3988",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}:{width:"14",height:"14",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:/* @__PURE__ */e("path",{d:"M8.1 15.75H13.23C12.9638 16.4152 12.5041 16.9852 11.9105 17.3863C11.3168 17.7874 10.6165 18.0012 9.9 18H3.6C2.64522 18 1.72955 17.6207 1.05442 16.9456C0.379285 16.2704 0 15.3548 0 14.4V7.2C0.00104929 6.32332 0.321408 5.47704 0.901163 4.81944C1.48092 4.16183 2.28037 3.73792 3.15 3.627V10.8C3.15238 12.1121 3.67466 13.3698 4.60245 14.2975C5.53024 15.2253 6.78791 15.7476 8.1 15.75ZM15.75 3.825H17.658C17.6027 3.74389 17.5393 3.66852 17.469 3.6L14.4 0.531C14.3337 0.460854 14.258 0.400274 14.175 0.351V2.25C14.1769 2.66713 14.3434 3.06664 14.6384 3.3616C14.9334 3.65656 15.3329 3.8231 15.75 3.825ZM15.75 5.175C14.9747 5.17357 14.2315 4.86494 13.6833 4.31671C13.1351 3.76847 12.8264 3.02532 12.825 2.25V0H8.1C7.14522 0 6.22955 0.379285 5.55442 1.05442C4.87928 1.72955 4.5 2.64522 4.5 3.6V10.8C4.5 11.7548 4.87928 12.6704 5.55442 13.3456C6.22955 14.0207 7.14522 14.4 8.1 14.4H14.4C15.3548 14.4 16.2705 14.0207 16.9456 13.3456C17.6207 12.6704 18 11.7548 18 10.8V5.175H15.75Z",fill:"#0B3988"})})})]})})},If="chat_widget_messages",Sf=200,Nf=()=>Math.random().toString(36).substring(2,12),Bf="welcome-message";function Mf(e){return[{id:Bf,text:e,sender:"bot",timestamp:/* @__PURE__ */new Date}]}function Pf(e){return e.map(e=>({...e,timestamp:new Date(e.timestamp)}))}function Of(){const e=bf.getItem(If);if(!e)return null;try{const t=JSON.parse(e);if(t&&void 0!==t.owner&&Array.isArray(t.messages))return{owner:t.owner,messages:Pf(t.messages)};if(Array.isArray(t))return{owner:"",messages:Pf(t)}}catch{}return null}function Rf(e,t){bf.setItem(If,JSON.stringify({owner:e,messages:t}))}const Uf=s(void 0),Lf=({children:t,initialConfig:n})=>/* @__PURE__ */e(Uf.Provider,{value:{config:n||null},children:t}),Df={send_native:{label:"actionSendNativeLabel",description:"actionSendNativeDesc",fields:[{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_token:{label:"actionSendTokenLabel",description:"actionSendTokenDesc",fields:[{key:"contract_address",label:"fieldTokenContract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"fieldTokenSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"decimals",label:"fieldDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},swap_token:{label:"actionSwapTokenLabel",description:"actionSwapTokenDesc",fields:[{key:"token_in",label:"fieldTokenIn",type:"address",placeholder:"0x... or native",required:!0,editable:!1},{key:"token_in_symbol",label:"fieldTokenInSymbol",type:"text",placeholder:"e.g. ETH",required:!1,editable:!1},{key:"token_out",label:"fieldTokenOut",type:"address",placeholder:"0x...",required:!0,editable:!1},{key:"token_out_symbol",label:"fieldTokenOutSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"token_in_decimals",label:"fieldTokenInDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"token_out_decimals",label:"fieldTokenOutDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},approve_token:{label:"actionApproveTokenLabel",description:"actionApproveTokenDesc",fields:[{key:"contract_address",label:"fieldTokenContract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"fieldTokenSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"spender_address",label:"fieldSpenderAddress",type:"address",placeholder:"0x... spender contract",required:!0,validation:"address",editable:!1},{key:"amount",label:"fieldAmountUnlimited",type:"amount",placeholder:"0.0 or leave empty for max",required:!1,validation:"amount"},{key:"decimals",label:"fieldDecimals",type:"number",placeholder:"18",required:!1,editable:!1}]},wrap_native:{label:"actionWrapNativeLabel",description:"actionWrapNativeDesc",fields:[{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},unwrap_native:{label:"actionUnwrapNativeLabel",description:"actionUnwrapNativeDesc",fields:[{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_nft:{label:"actionSendNftLabel",description:"actionSendNftDesc",fields:[{key:"contract_address",label:"fieldNftContract",type:"address",placeholder:"0x... NFT contract",required:!0,validation:"address",editable:!1},{key:"token_id",label:"fieldTokenId",type:"text",placeholder:"e.g. 1234",required:!0,editable:!1},{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"token_standard",label:"fieldTokenStandard",type:"text",placeholder:"ERC721 or ERC1155",required:!0,editable:!1},{key:"amount",label:"fieldAmount",type:"text",placeholder:"1",required:!0},{key:"maxAmount",label:"fieldMaxAmount",type:"text",placeholder:"",required:!1,editable:!1,hidden:!0},{key:"nft_name",label:"fieldNftName",type:"text",placeholder:"e.g. Bored Ape #1234",required:!1,editable:!1}]}};function Ff(e){if(!e||""===e?.trim())return!1;const t=parseFloat(e);return!isNaN(t)&&t>0}var qf=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Hf=Math.ceil,Vf=Math.floor,Wf="[BigNumber Error] ",jf=Wf+"Number primitive has more than 15 significant digits: ",Yf=1e14,zf=14,Gf=9007199254740991,Jf=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Xf=1e7,Kf=1e9;function Qf(e){var t=0|e;return e>0||e===t?t:t-1}function Zf(e){for(var t,n,r=1,o=e.length,i=e[0]+"";r<o;){for(t=e[r++]+"",n=zf-t.length;n--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function _f(e,t){var n,r,o=e.c,i=t.c,a=e.s,s=t.s,c=e.e,u=t.e;if(!a||!s)return null;if(n=o&&!o[0],r=i&&!i[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=a<0,r=c==u,!o||!i)return r?0:!o^n?1:-1;if(!r)return c>u^n?1:-1;for(s=(c=o.length)<(u=i.length)?c:u,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^n?1:-1;return c==u?0:c>u^n?1:-1}function $f(e,t,n,r){if(e<t||e>n||e!==Vf(e))throw Error(Wf+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function eh(e){var t=e.c.length-1;return Qf(e.e/zf)==t&&e.c[t]%2!=0}function th(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function nh(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(++t>(r=e.length)){for(o=n,t-=r;--t;o+=n);e+=o}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var rh=function e(t){var n,r,o,i,a,s=A.prototype={constructor:A,toString:null,valueOf:null},c=new A(1),u=20,l=4,d=-7,f=21,h=-1e7,p=1e7,m=!1,w=1,g=0,y={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},b="0123456789abcdefghijklmnopqrstuvwxyz",v=!0;function A(e,t){var n,i,a,s,c,d,f,m,w=this;if(!(w instanceof A))return new A(e,t);if(null==t){if(e&&!0===e.xe)return w.s=e.s,void(!e.c||e.e>p?w.c=w.e=null:e.e<h?w.c=[w.e=0]:(w.e=e.e,w.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(w.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>p?w.c=w.e=null:(w.e=s,w.c=[e]))}m=String(e)}else{if(!qf.test(m=String(e)))return o(w,m,d);w.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(s=m.indexOf("."))>-1&&(m=m.replace(".","")),(c=m.search(/e/i))>0?(s<0&&(s=c),s+=+m.slice(c+1),m=m.substring(0,c)):s<0&&(s=m.length)}else{if($f(t,2,b.length,"Base"),10==t&&v)return x(w=new A(e),u+w.e+1,l);if(m=String(e),d="number"==typeof e){if(0*e!=0)return o(w,m,d,t);if(w.s=1/e<0?(m=m.slice(1),-1):1,A.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(jf+e)}else w.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=b.slice(0,t),s=c=0,f=m.length;c<f;c++)if(n.indexOf(i=m.charAt(c))<0){if("."==i){if(c>s){s=f;continue}}else if(!a&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){a=!0,c=-1,s=0;continue}return o(w,String(e),d,t)}d=!1,(s=(m=r(m,t,10,w.s)).indexOf("."))>-1?m=m.replace(".",""):s=m.length}for(c=0;48===m.charCodeAt(c);c++);for(f=m.length;48===m.charCodeAt(--f););if(m=m.slice(c,++f)){if(f-=c,d&&A.DEBUG&&f>15&&(e>Gf||e!==Vf(e)))throw Error(jf+w.s*e);if((s=s-c-1)>p)w.c=w.e=null;else if(s<h)w.c=[w.e=0];else{if(w.e=s,w.c=[],c=(s+1)%zf,s<0&&(c+=zf),c<f){for(c&&w.c.push(+m.slice(0,c)),f-=zf;c<f;)w.c.push(+m.slice(c,c+=zf));c=zf-(m=m.slice(c)).length}else c-=f;for(;c--;m+="0");w.c.push(+m)}}else w.c=[w.e=0]}function k(e,t,n,r){var o,i,a,s,c;if(null==n?n=l:$f(n,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=Zf(e.c),c=1==r||2==r&&(a<=d||a>=f)?th(c,a):nh(c,a,"0");else if(i=(e=x(new A(e),t,n)).e,s=(c=Zf(e.c)).length,1==r||2==r&&(t<=i||i<=d)){for(;s<t;c+="0",s++);c=th(c,i)}else if(t-=a+(2===r&&i>a),c=nh(c,i,"0"),i+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-s)>0)for(i+1==s&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function T(e,t){for(var n,r,o=1,i=new A(e[0]);o<e.length;o++)(!(r=new A(e[o])).s||(n=_f(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function E(e,t,n){for(var r=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,r++);return(n=r+n*zf-1)>p?e.c=e.e=null:n<h?e.c=[e.e=0]:(e.e=n,e.c=t),e}function x(e,t,n,r){var o,i,a,s,c,u,l,d=e.c,f=Jf;if(d){e:{for(o=1,s=d[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=zf,a=t,c=d[u=0],l=Vf(c/f[o-a-1]%10);else if((u=Hf((i+1)/zf))>=d.length){if(!r)break e;for(;d.length<=u;d.push(0));c=l=0,o=1,a=(i%=zf)-zf+1}else{for(c=s=d[u],o=1;s>=10;s/=10,o++);l=(a=(i%=zf)-zf+o)<0?0:Vf(c/f[o-a-1]%10)}if(r=r||t<0||null!=d[u+1]||(a<0?c:c%f[o-a-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(i>0?a>0?c/f[o-a]:0:d[u-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,r?(t-=e.e+1,d[0]=f[(zf-t%zf)%zf],e.e=-t||0):d[0]=e.e=0,e;if(0==i?(d.length=u,s=1,u--):(d.length=u+1,s=f[zf-i],d[u]=a>0?Vf(c/f[o-a]%f[a])*s:0),r)for(;;){if(0==u){for(i=1,a=d[0];a>=10;a/=10,i++);for(a=d[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,d[0]==Yf&&(d[0]=1));break}if(d[u]+=s,d[u]!=Yf)break;d[u--]=0,s=1}for(i=d.length;0===d[--i];d.pop());}e.e>p?e.c=e.e=null:e.e<h&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return null===n?e.toString():(t=Zf(e.c),t=n<=d||n>=f?th(t,n):nh(t,n,"0"),e.s<0?"-"+t:t)}return A.clone=e,A.ROUND_UP=0,A.ROUND_DOWN=1,A.ROUND_CEIL=2,A.ROUND_FLOOR=3,A.ROUND_HALF_UP=4,A.ROUND_HALF_DOWN=5,A.ROUND_HALF_EVEN=6,A.ROUND_HALF_CEIL=7,A.ROUND_HALF_FLOOR=8,A.EUCLID=9,A.config=A.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(Wf+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&($f(n=e[t],0,Kf,t),u=n),e.hasOwnProperty(t="ROUNDING_MODE")&&($f(n=e[t],0,8,t),l=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?($f(n[0],-Kf,0,t),$f(n[1],0,Kf,t),d=n[0],f=n[1]):($f(n,-Kf,Kf,t),d=-(f=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)$f(n[0],-Kf,-1,t),$f(n[1],1,Kf,t),h=n[0],p=n[1];else{if($f(n,-Kf,Kf,t),!n)throw Error(Wf+t+" cannot be zero: "+n);h=-(p=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(Wf+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw m=!n,Error(Wf+"crypto unavailable");m=n}else m=n}if(e.hasOwnProperty(t="MODULO_MODE")&&($f(n=e[t],0,9,t),w=n),e.hasOwnProperty(t="POW_PRECISION")&&($f(n=e[t],0,Kf,t),g=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(Wf+t+" not an object: "+n);y=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(Wf+t+" invalid: "+n);v="0123456789"==n.slice(0,10),b=n}}return{DECIMAL_PLACES:u,ROUNDING_MODE:l,EXPONENTIAL_AT:[d,f],RANGE:[h,p],CRYPTO:m,MODULO_MODE:w,POW_PRECISION:g,FORMAT:y,ALPHABET:b}},A.isBigNumber=function(e){if(!e||!0!==e.xe)return!1;if(!A.DEBUG)return!0;var t,n,r=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&o>=-Kf&&o<=Kf&&o===Vf(o)){if(0===r[0]){if(0===o&&1===r.length)return!0;break e}if((t=(o+1)%zf)<1&&(t+=zf),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=Yf||n!==Vf(n))break e;if(0!==n)return!0}}}else if(null===r&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(Wf+"Invalid BigNumber: "+e)},A.maximum=A.max=function(){return T(arguments,-1)},A.minimum=A.min=function(){return T(arguments,1)},A.random=(i=9007199254740992,a=Math.random()*i&2097151?function(){return Vf(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,o,i,s=0,l=[],d=new A(c);if(null==e?e=u:$f(e,0,Kf),o=Hf(e/zf),m)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(i=131072*t[s]+(t[s+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[s]=n[0],t[s+1]=n[1]):(l.push(i%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw m=!1,Error(Wf+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(i=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(l.push(i%1e14),s+=7);s=o/7}if(!m)for(;s<o;)(i=a())<9e15&&(l[s++]=i%1e14);for(o=l[--s],e%=zf,o&&e&&(i=Jf[zf-e],l[s]=Vf(o/i)*i);0===l[s];l.pop(),s--);if(s<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=zf);for(s=1,i=l[0];i>=10;i/=10,s++);s<zf&&(r-=zf-s)}return d.e=r,d.c=l,d}),A.sum=function(){for(var e=1,t=arguments,n=new A(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=/* @__PURE__ */function(){var e="0123456789";function t(e,t,n,r){for(var o,i,a=[0],s=0,c=e.length;s<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>n-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/n|0,a[o]%=n)}return a.reverse()}return function(r,o,i,a,s){var c,d,f,h,p,m,w,y,v=r.indexOf("."),k=u,T=l;for(v>=0&&(h=g,g=0,r=r.replace(".",""),m=(y=new A(o)).pow(r.length-v),g=h,y.c=t(nh(Zf(m.c),m.e,"0"),10,i,e),y.e=y.c.length),f=h=(w=t(r,o,i,s?(c=b,e):(c=e,b))).length;0==w[--h];w.pop());if(!w[0])return c.charAt(0);if(v<0?--f:(m.c=w,m.e=f,m.s=a,w=(m=n(m,y,k,T,i)).c,p=m.r,f=m.e),v=w[d=f+k+1],h=i/2,p=p||d<0||null!=w[d+1],p=T<4?(null!=v||p)&&(0==T||T==(m.s<0?3:2)):v>h||v==h&&(4==T||p||6==T&&1&w[d-1]||T==(m.s<0?8:7)),d<1||!w[0])r=p?nh(c.charAt(1),-k,c.charAt(0)):c.charAt(0);else{if(w.length=d,p)for(--i;++w[--d]>i;)w[d]=0,d||(++f,w=[1].concat(w));for(h=w.length;!w[--h];);for(v=0,r="";v<=h;r+=c.charAt(w[v++]));r=nh(r,f,c.charAt(0))}return r}}(),n=/* @__PURE__ */function(){function e(e,t,n){var r,o,i,a,s=0,c=e.length,u=t%Xf,l=t/Xf|0;for(e=e.slice();c--;)s=((o=u*(i=e[c]%Xf)+(r=l*i+(a=e[c]/Xf|0)*u)%Xf*Xf+s)/n|0)+(r/Xf|0)+l*a,e[c]=o%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n,r){for(var o=0;n--;)e[n]-=o,o=e[n]<t[n]?1:0,e[n]=o*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,o,i,a,s){var c,u,l,d,f,h,p,m,w,g,y,b,v,k,T,E,C,I=r.s==o.s?1:-1,S=r.c,N=o.c;if(!(S&&S[0]&&N&&N[0]))return new A(r.s&&o.s&&(S?!N||S[0]!=N[0]:N)?S&&0==S[0]||!N?0*I:I/0:NaN);for(w=(m=new A(I)).c=[],I=i+(u=r.e-o.e)+1,s||(s=Yf,u=Qf(r.e/zf)-Qf(o.e/zf),I=I/zf|0),l=0;N[l]==(S[l]||0);l++);if(N[l]>(S[l]||0)&&u--,I<0)w.push(1),d=!0;else{for(k=S.length,E=N.length,l=0,I+=2,(f=Vf(s/(N[0]+1)))>1&&(N=e(N,f,s),S=e(S,f,s),E=N.length,k=S.length),v=E,y=(g=S.slice(0,E)).length;y<E;g[y++]=0);C=N.slice(),C=[0].concat(C),T=N[0],N[1]>=s/2&&T++;do{if(f=0,(c=t(N,g,E,y))<0){if(b=g[0],E!=y&&(b=b*s+(g[1]||0)),(f=Vf(b/T))>1)for(f>=s&&(f=s-1),p=(h=e(N,f,s)).length,y=g.length;1==t(h,g,p,y);)f--,n(h,E<p?C:N,p,s),p=h.length,c=1;else 0==f&&(c=f=1),p=(h=N.slice()).length;if(p<y&&(h=[0].concat(h)),n(g,h,y,s),y=g.length,-1==c)for(;t(N,g,E,y)<1;)f++,n(g,E<y?C:N,y,s),y=g.length}else 0===c&&(f++,g=[0]);w[l++]=f,g[0]?g[y++]=S[v]||0:(g=[S[v]],y=1)}while((v++<k||null!=g[0])&&I--);d=null!=g[0],w[0]||w.splice(0,1)}if(s==Yf){for(l=1,I=w[0];I>=10;I/=10,l++);x(m,i+(m.e=l+u*zf-1)+1,a,d)}else m.e=u,m.r=+d;return m}}(),o=/* @__PURE__ */function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,o=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(i,a,s,c){var u,l=s?a:a.replace(o,"");if(r.test(l))i.s=isNaN(l)?null:l<0?-1:1;else{if(!s&&(l=l.replace(e,function(e,t,n){return u="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=u?e:t}),c&&(u=c,l=l.replace(t,"$1").replace(n,"0.$1")),a!=l))return new A(l,u);if(A.DEBUG)throw Error(Wf+"Not a"+(c?" base "+c:"")+" number: "+a);i.s=null}i.c=i.e=null}}(),s.absoluteValue=s.abs=function(){var e=new A(this);return e.s<0&&(e.s=1),e},s.comparedTo=function(e,t){return _f(this,new A(e,t))},s.decimalPlaces=s.dp=function(e,t){var n,r,o,i=this;if(null!=e)return $f(e,0,Kf),null==t?t=l:$f(t,0,8),x(new A(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((o=n.length-1)-Qf(this.e/zf))*zf,o=n[o])for(;o%10==0;o/=10,r--);return r<0&&(r=0),r},s.dividedBy=s.div=function(e,t){return n(this,new A(e,t),u,l)},s.dividedToIntegerBy=s.idiv=function(e,t){return n(this,new A(e,t),0,1)},s.exponentiatedBy=s.pow=function(e,t){var n,r,o,i,a,s,u,d,f=this;if((e=new A(e)).c&&!e.isInteger())throw Error(Wf+"Exponent not an integer: "+C(e));if(null!=t&&(t=new A(t)),a=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return d=new A(Math.pow(+C(f),a?e.s*(2-eh(e)):+C(e))),t?d.mod(t):d;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new A(NaN);(r=!s&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||a&&f.c[1]>=24e7:f.c[0]<8e13||a&&f.c[0]<=9999975e7)))return i=f.s<0&&eh(e)?-0:0,f.e>-1&&(i=1/i),new A(s?1/i:i);g&&(i=Hf(g/zf+2))}for(a?(n=new A(.5),s&&(e.s=1),u=eh(e)):u=(o=Math.abs(+C(e)))%2,d=new A(c);;){if(u){if(!(d=d.times(f)).c)break;i?d.c.length>i&&(d.c.length=i):r&&(d=d.mod(t))}if(o){if(0===(o=Vf(o/2)))break;u=o%2}else if(x(e=e.times(n),e.e+1,1),e.e>14)u=eh(e);else{if(0===(o=+C(e)))break;u=o%2}f=f.times(f),i?f.c&&f.c.length>i&&(f.c.length=i):r&&(f=f.mod(t))}return r?d:(s&&(d=c.div(d)),t?d.mod(t):i?x(d,g,l,void 0):d)},s.integerValue=function(e){var t=new A(this);return null==e?e=l:$f(e,0,8),x(t,t.e+1,e)},s.isEqualTo=s.eq=function(e,t){return 0===_f(this,new A(e,t))},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(e,t){return _f(this,new A(e,t))>0},s.isGreaterThanOrEqualTo=s.gte=function(e,t){return 1===(t=_f(this,new A(e,t)))||0===t},s.isInteger=function(){return!!this.c&&Qf(this.e/zf)>this.c.length-2},s.isLessThan=s.lt=function(e,t){return _f(this,new A(e,t))<0},s.isLessThanOrEqualTo=s.lte=function(e,t){return-1===(t=_f(this,new A(e,t)))||0===t},s.isNaN=function(){return!this.s},s.isNegative=function(){return this.s<0},s.isPositive=function(){return this.s>0},s.isZero=function(){return!!this.c&&0==this.c[0]},s.minus=function(e,t){var n,r,o,i,a=this,s=a.s;if(t=(e=new A(e,t)).s,!s||!t)return new A(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/zf,u=e.e/zf,d=a.c,f=e.c;if(!c||!u){if(!d||!f)return d?(e.s=-t,e):new A(f?a:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new A(d[0]?a:3==l?-0:0)}if(c=Qf(c),u=Qf(u),d=d.slice(),s=c-u){for((i=s<0)?(s=-s,o=d):(u=c,o=f),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(r=(i=(s=d.length)<(t=f.length))?s:t,s=t=0;t<r;t++)if(d[t]!=f[t]){i=d[t]<f[t];break}if(i&&(o=d,d=f,f=o,e.s=-e.s),(t=(r=f.length)-(n=d.length))>0)for(;t--;d[n++]=0);for(t=Yf-1;r>s;){if(d[--r]<f[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=Yf}d[r]-=f[r]}for(;0==d[0];d.splice(0,1),--u);return d[0]?E(e,d,u):(e.s=3==l?-1:1,e.c=[e.e=0],e)},s.modulo=s.mod=function(e,t){var r,o,i=this;return e=new A(e,t),!i.c||!e.s||e.c&&!e.c[0]?new A(NaN):!e.c||i.c&&!i.c[0]?new A(i):(9==w?(o=e.s,e.s=1,r=n(i,e,0,3),e.s=o,r.s*=o):r=n(i,e,0,w),(e=i.minus(r.times(e))).c[0]||1!=w||(e.s=i.s),e)},s.multipliedBy=s.times=function(e,t){var n,r,o,i,a,s,c,u,l,d,f,h,p,m,w,g=this,y=g.c,b=(e=new A(e,t)).c;if(!(y&&b&&y[0]&&b[0]))return!g.s||!e.s||y&&!y[0]&&!b||b&&!b[0]&&!y?e.c=e.e=e.s=null:(e.s*=g.s,y&&b?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=Qf(g.e/zf)+Qf(e.e/zf),e.s*=g.s,(c=y.length)<(d=b.length)&&(p=y,y=b,b=p,o=c,c=d,d=o),o=c+d,p=[];o--;p.push(0));for(m=Yf,w=Xf,o=d;--o>=0;){for(n=0,f=b[o]%w,h=b[o]/w|0,i=o+(a=c);i>o;)n=((u=f*(u=y[--a]%w)+(s=h*u+(l=y[a]/w|0)*f)%w*w+p[i]+n)/m|0)+(s/w|0)+h*l,p[i--]=u%m;p[i]=n}return n?++r:p.splice(0,1),E(e,p,r)},s.negated=function(){var e=new A(this);return e.s=-e.s||null,e},s.plus=function(e,t){var n,r=this,o=r.s;if(t=(e=new A(e,t)).s,!o||!t)return new A(NaN);if(o!=t)return e.s=-t,r.minus(e);var i=r.e/zf,a=e.e/zf,s=r.c,c=e.c;if(!i||!a){if(!s||!c)return new A(o/0);if(!s[0]||!c[0])return c[0]?e:new A(s[0]?r:0*o)}if(i=Qf(i),a=Qf(a),s=s.slice(),o=i-a){for(o>0?(a=i,n=c):(o=-o,n=s),n.reverse();o--;n.push(0));n.reverse()}for((o=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/Yf|0,s[t]=Yf===s[t]?0:s[t]%Yf;return o&&(s=[o].concat(s),++a),E(e,s,a)},s.precision=s.sd=function(e,t){var n,r,o,i=this;if(null!=e&&e!==!!e)return $f(e,1,Kf),null==t?t=l:$f(t,0,8),x(new A(i),e,t);if(!(n=i.c))return null;if(r=(o=n.length-1)*zf+1,o=n[o]){for(;o%10==0;o/=10,r--);for(o=n[0];o>=10;o/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},s.shiftedBy=function(e){return $f(e,-9007199254740991,Gf),this.times("1e"+e)},s.squareRoot=s.sqrt=function(){var e,t,r,o,i,a=this,s=a.c,c=a.s,d=a.e,f=u+4,h=new A("0.5");if(1!==c||!s||!s[0])return new A(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+C(a)))||c==1/0?(((t=Zf(s)).length+d)%2==0&&(t+="0"),c=Math.sqrt(+t),d=Qf((d+1)/2)-(d<0||d%2),r=new A(t=c==1/0?"5e"+d:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+d)):r=new A(c+""),r.c[0])for((c=(d=r.e)+f)<3&&(c=0);;)if(i=r,r=h.times(i.plus(n(a,i,f,1))),Zf(i.c).slice(0,c)===(t=Zf(r.c)).slice(0,c)){if(r.e<d&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(x(r,r.e+u+2,1),e=!r.times(r).eq(a));break}if(!o&&(x(i,i.e+u+2,0),i.times(i).eq(a))){r=i;break}f+=4,c+=4,o=1}return x(r,r.e+u+1,l,e)},s.toExponential=function(e,t){return null!=e&&($f(e,0,Kf),e++),k(this,e,t,1)},s.toFixed=function(e,t){return null!=e&&($f(e,0,Kf),e=e+this.e+1),k(this,e,t)},s.toFormat=function(e,t,n){var r,o=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=y;else if("object"!=typeof n)throw Error(Wf+"Argument not an object: "+n);if(r=o.toFixed(e,t),o.c){var i,a=r.split("."),s=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=a[0],d=a[1],f=o.s<0,h=f?l.slice(1):l,p=h.length;if(c&&(i=s,s=c,c=i,p-=i),s>0&&p>0){for(i=p%s||s,l=h.substr(0,i);i<p;i+=s)l+=u+h.substr(i,s);c>0&&(l+=u+h.slice(i)),f&&(l="-"+l)}r=d?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):l}return(n.prefix||"")+r+(n.suffix||"")},s.toFraction=function(e){var t,r,o,i,a,s,u,d,f,h,m,w,g=this,y=g.c;if(null!=e&&(!(u=new A(e)).isInteger()&&(u.c||1!==u.s)||u.lt(c)))throw Error(Wf+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+C(u));if(!y)return new A(g);for(t=new A(c),f=r=new A(c),o=d=new A(c),w=Zf(y),a=t.e=w.length-g.e-1,t.c[0]=Jf[(s=a%zf)<0?zf+s:s],e=!e||u.comparedTo(t)>0?a>0?t:f:u,s=p,p=1/0,u=new A(w),d.c[0]=0;h=n(u,t,0,1),1!=(i=r.plus(h.times(o))).comparedTo(e);)r=o,o=i,f=d.plus(h.times(i=f)),d=i,t=u.minus(h.times(i=t)),u=i;return i=n(e.minus(r),o,0,1),d=d.plus(i.times(f)),r=r.plus(i.times(o)),d.s=f.s=g.s,m=n(f,o,a*=2,l).minus(g).abs().comparedTo(n(d,r,a,l).minus(g).abs())<1?[f,o]:[d,r],p=s,m},s.toNumber=function(){return+C(this)},s.toPrecision=function(e,t){return null!=e&&$f(e,1,Kf),k(this,e,t,2)},s.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=d||i>=f?th(Zf(n.c),i):nh(Zf(n.c),i,"0"):10===e&&v?t=nh(Zf((n=x(new A(n),u+i+1,l)).c),n.e,"0"):($f(e,2,b.length,"Base"),t=r(nh(Zf(n.c),i,"0"),10,e,o,!0)),o<0&&n.c[0]&&(t="-"+t)),t},s.valueOf=s.toJSON=function(){return C(this)},s.xe=!0,s[Symbol.toStringTag]="BigNumber",s[/* @__PURE__ */Symbol.for("nodejs.util.inspect.custom")]=s.valueOf,null!=t&&A.set(t),A}();const oh=({action:t,initialValues:r,onSubmit:i,onCancel:s,isSubmitting:c=!1,tokenInfo:u,nftInfo:l,disabled:d=!1})=>{const{t:f,ti:h}=w(),p=Df[t],[m,g]=o(()=>{if(!p)return{};const e={};return p.fields.forEach(t=>{e[t.key]=r[t.key]||""}),e}),[y]=o(()=>["send_native","send_token","swap_token"].includes(t)&&!u&&m.contract_address?f("formTokenNotFound"):null),[b,v]=o(()=>{const e={};if(["send_native","send_token","swap_token"].includes(t)&&u){const t=parseFloat(u.balanceFormatted||"0");if(t<=0)e.amount=h("formNoBalance",{symbol:u.symbol??""});else{const n=r.amount?.trim();n&&Ff(n)&&parseFloat(n)>t&&(e.amount=h("formInsufficientBalance",{balance:u.balanceFormatted,symbol:u.symbol??""}))}}return e}),A=a((e,t)=>{g(n=>({...n,[e]:t})),b[e]&&v(t=>{const n={...t};return delete n[e],n})},[b]),k=a(()=>{if(!p)return!1;const e={};if(p.fields.forEach(n=>{const r=m[n.key]?.trim()||"";!n.required||r||"send_nft"===t&&"amount"===n.key?r&&("address"!==n.validation||lt(r)||(e[n.key]=f("formInvalidAddress")),"amount"!==n.validation||Ff(r)||(e[n.key]=f("formMustBePositive")),"amount"===n.key&&r&&Ff(r)&&u?.balanceFormatted&&parseFloat(r)>parseFloat(u.balanceFormatted)&&(e[n.key]=h("formInsufficientBalance",{balance:u.balanceFormatted,symbol:u.symbol??""})),"positive_number"===n.validation&&(isNaN(Number(r))||Number(r)<0)&&(e[n.key]=f("formMustBeValidNumber"))):e[n.key]=h("formFieldRequired",{field:f(n.label)})}),"send_nft"===t&&"ERC1155"===m.token_standard?.toUpperCase()){const t=m.amount?.trim();if(t)if(!/^\d+$/.test(t)||parseInt(t,10)<1)e.amount=f("formMustBePositiveInteger");else{const n=parseInt(r.maxAmount||"0",10);n>0&&parseInt(t,10)>n&&(e.amount=h("formAmountExceedsNft",{max:String(n)}))}else e.amount=h("formFieldRequired",{field:f("fieldAmount")})}return v(e),0===Object.keys(e).length},[p,m,u,t,r,f,h]),T=a(()=>{k()&&i(t,m)},[k,i,t,m]);return p?/* @__PURE__ */n("div",{className:"action-form",children:[
9
+ /* @__PURE__ */e("div",{className:"action-form-title",children:/* @__PURE__ */e("span",{children:f(p.label)})}),y&&/* @__PURE__ */n("div",{className:"action-form-general-error",children:["⚠️ ",y]}),u&&/* @__PURE__ */e("div",{className:"action-form-token-info",children:/* @__PURE__ */n("div",{className:"token-info-row",children:[u.logo&&/* @__PURE__ */e("img",{src:u.logo,alt:u.symbol,className:"token-info-logo",width:20,height:20}),
10
10
  /* @__PURE__ */n("div",{className:"token-info-details",children:[
11
11
  /* @__PURE__ */n("span",{className:"token-info-name",children:[u.name," (",u.symbol,")"]}),
12
- /* @__PURE__ */n("span",{className:"token-info-balance",children:[d("spendable"),": ",rh(u.balanceFormatted).decimalPlaces(8,rh.ROUND_DOWN).toFormat()," ",u.symbol,void 0!==u.usdValue&&/* @__PURE__ */n("span",{className:"token-info-usd",children:[" ","≈ $",u.usdValue.toFixed(2)]})]})]})]})}),l?.image&&/* @__PURE__ */e("div",{className:"action-form-nft-info",children:/* @__PURE__ */e("img",{src:l.image,alt:l.name,className:"nft-info-image",onError:e=>{e.target.style.display="none"}})}),
12
+ /* @__PURE__ */n("span",{className:"token-info-balance",children:[f("spendable"),": ",rh(u.balanceFormatted).decimalPlaces(8,rh.ROUND_DOWN).toFormat()," ",u.symbol,void 0!==u.usdValue&&/* @__PURE__ */n("span",{className:"token-info-usd",children:[" ","≈ $",u.usdValue.toFixed(2)]})]})]})]})}),l?.image&&/* @__PURE__ */e("div",{className:"action-form-nft-info",children:/* @__PURE__ */e("img",{src:l.image,alt:l.name,className:"nft-info-image",onError:e=>{e.target.style.display="none"}})}),
13
13
  /* @__PURE__ */e("div",{className:"action-form-fields",children:p.fields.map(o=>o.hidden||"amount"===o.key&&"send_nft"===t&&"ERC1155"!==m.token_standard?.toUpperCase()||["decimals"].includes(o.key)&&"send_token"===t&&r.decimals?null:/* @__PURE__ */n("div",{className:"action-form-field",children:[
14
14
  /* @__PURE__ */n("div",{className:"action-form-field-header",children:[
15
- /* @__PURE__ */n("div",{className:"action-form-field-label",children:[d(o.label),o.required&&" *"]}),"amount"===o.key&&u&&"send_nft"!==t&&/* @__PURE__ */n("div",{className:"action-form-pct-btns",children:[[25,50,75].map(e=>/* @__PURE__ */n("button",{type:"button",className:"action-form-pct-btn",onClick:()=>A("amount",rh(u.balanceFormatted).multipliedBy(e).dividedBy(100).decimalPlaces(u.decimals,rh.ROUND_DOWN).toFixed()),disabled:c||f,children:[e,"%"]},e)),
16
- /* @__PURE__ */e("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>A("amount",u.balanceFormatted),disabled:c||f,children:d("formMax")})]}),"amount"===o.key&&"send_nft"===t&&l&&/* @__PURE__ */e("div",{className:"action-form-pct-btns",children:/* @__PURE__ */e("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>A("amount",r.maxAmount||""),disabled:c||f,children:d("formMax")})})]}),(()=>{const t=!1===o.editable&&!!r[o.key]||f,n=c||t,i=[b[o.key]?"error":"",t?"readonly":""].filter(Boolean).join(" ");return"address"===o.type?/* @__PURE__ */e("textarea",{rows:2,placeholder:o.placeholder,value:m[o.key]||"",onChange:e=>A(o.key,e.target.value),className:i,disabled:n||f}):/* @__PURE__ */e("input",{type:"number"===o.type?"number":"text",placeholder:o.placeholder,value:m[o.key]||"",onChange:e=>A(o.key,e.target.value),className:i,disabled:n||f})})(),b[o.key]&&/* @__PURE__ */e("span",{className:"field-error",children:b[o.key]})]},o.key))}),!f&&/* @__PURE__ */n("div",{className:"action-form-actions",children:[
17
- /* @__PURE__ */e("button",{className:"message-button",onClick:s,type:"button",disabled:c,children:d("formCancel")}),
18
- /* @__PURE__ */e("button",{className:"message-button",onClick:T,type:"button",disabled:c,children:d(c?"formProcessing":"formExecute")})]})]}):null},ih=({scrollContainerRef:t,threshold:n=200})=>{const[r,a]=o(!1);return i(()=>{const e=t.current;if(!e)return;const r=()=>{const{scrollTop:t,scrollHeight:r,clientHeight:o}=e;a(r-t-o>n)};return e.addEventListener("scroll",r,{passive:!0}),r(),()=>{e.removeEventListener("scroll",r)}},[t,n]),r?/* @__PURE__ */e("button",{className:"scroll-to-bottom-btn",onClick:()=>{t.current?.scrollTo({top:t.current.scrollHeight,behavior:"smooth"})},"aria-label":"Scroll to bottom",type:"button",children:/* @__PURE__ */e("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:/* @__PURE__ */e("path",{d:"M9 3V15M9 15L4 10M9 15L14 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}):null};var ah,sh,ch={},uh={exports:{}},lh=uh.exports;var fh=function(){if(sh)return ch;sh=1,Object.defineProperty(ch,"S",{value:!0});var e,t=r,n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,o=function(){return ah||(ah=1,e=uh,t=uh.exports,function(n,r){var o="function",i="undefined",a="object",s="string",c="major",u="model",l="name",f="type",d="vendor",h="version",p="architecture",m="console",w="mobile",g="tablet",y="smarttv",b="wearable",v="embedded",A="Amazon",k="Apple",T="ASUS",E="BlackBerry",x="Browser",C="Chrome",I="Firefox",S="Google",N="Honor",B="Huawei",M="LG",P="Microsoft",O="Motorola",R="Nvidia",U="OnePlus",L="Opera",D="OPPO",F="Samsung",q="Sharp",H="Sony",V="Xiaomi",W="Zebra",j="Facebook",Y="Chromium OS",z="Mac OS",G=" Browser",J=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},X=function(e,t){return typeof e===s&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},Q=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===i?e:e.substring(0,500)},Z=function(e,t){for(var n,i,s,c,u,l,f=0;f<t.length&&!u;){var d=t[f],h=t[f+1];for(n=i=0;n<d.length&&!u&&d[n];)if(u=d[n++].exec(e))for(s=0;s<h.length;s++)l=u[++i],typeof(c=h[s])===a&&c.length>0?2===c.length?typeof c[1]==o?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:3===c.length?typeof c[1]!==o||c[1].exec&&c[1].test?this[c[0]]=l?l.replace(c[1],c[2]):r:this[c[0]]=l?c[1].call(this,l,c[2]):r:4===c.length&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):r):this[c]=l||r;f+=2}},_=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var o=0;o<t[n].length;o++)if(X(t[n][o],e))return"?"===n?r:n}else if(X(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},$={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ee={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,h],[/opios[\/ ]+([\w\.]+)/i],[h,[l,L+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[l,L+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[l,L]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[l,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[l,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[h,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[l,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[l,"Smart Lenovo "+x]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+x],h],[/\bfocus\/([\w\.]+)/i],[h,[l,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[l,L+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[l,L+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[l,"MIUI"+G]],[/fxios\/([\w\.-]+)/i],[h,[l,I]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[l,"360"]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+G],h],[/samsungbrowser\/([\w\.]+)/i],[h,[l,F+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[h,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[l,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,j],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[l,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[l,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,C+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[l,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[h,_,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[l,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[l,I+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[l,[h,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[h,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[p,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[p,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[p,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[p,/ower/,"",K]],[/ sun4\w[;\)]/i],[[p,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[p,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,F],[f,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,F],[f,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[d,k],[f,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,k],[f,g]],[/(macintosh);/i],[u,[d,k]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,q],[f,w]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[u,[d,N],[f,g]],[/honor([-\w ]+)[;\)]/i],[u,[d,N],[f,w]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[u,[d,B],[f,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,B],[f,w]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[u,/_/g," "],[d,V],[f,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[u,/_/g," "],[d,V],[f,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[d,D],[f,w]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[u,[d,_,{OnePlus:["304","403","203"],"*":D}],[f,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[f,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[f,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[d,O],[f,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,O],[f,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,M],[f,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[d,M],[f,w]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[u,[d,"Lenovo"],[f,g]],[/(nokia) (t[12][01])/i],[d,u,[f,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[u,/_/g," "],[f,w],[d,"Nokia"]],[/(pixel (c|tablet))\b/i],[u,[d,S],[f,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,S],[f,w]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,H],[f,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,H],[f,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,U],[f,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,A],[f,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,A],[f,w]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[f,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,E],[f,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,T],[f,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,T],[f,w]],[/(nexus 9)/i],[u,[d,"HTC"],[f,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[u,/_/g," "],[f,w]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[u,[d,"TCL"],[f,g]],[/(itel) ((\w+))/i],[[d,K],u,[f,_,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[d,"Acer"],[f,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[d,"Meizu"],[f,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[d,"Ulefone"],[f,w]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[u,[d,"Energizer"],[f,w]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[u,[d,"Cat"],[f,w]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[u,[d,"Smartfren"],[f,w]],[/droid.+; (a(?:015|06[35]|142p?))/i],[u,[d,"Nothing"],[f,w]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[u,[d,"Archos"],[f,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[u,[d,"Archos"],[f,w]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[d,u,[f,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[d,u,[f,w]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,u,[f,g]],[/(surface duo)/i],[u,[d,P],[f,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[f,w]],[/(u304aa)/i],[u,[d,"AT&T"],[f,w]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[f,w]],[/\b(rct\w+) b/i],[u,[d,"RCA"],[f,g]],[/\b(venue[\d ]{2,7}) b/i],[u,[d,"Dell"],[f,g]],[/\b(q(?:mv|ta)\w+) b/i],[u,[d,"Verizon"],[f,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[d,"Barnes & Noble"],[f,g]],[/\b(tm\d{3}\w+) b/i],[u,[d,"NuVision"],[f,g]],[/\b(k88) b/i],[u,[d,"ZTE"],[f,g]],[/\b(nx\d{3}j) b/i],[u,[d,"ZTE"],[f,w]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[f,w]],[/\b(zur\d{3}) b/i],[u,[d,"Swiss"],[f,g]],[/\b((zeki)?tb.*\b) b/i],[u,[d,"Zeki"],[f,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],u,[f,g]],[/\b(ns-?\w{0,9}) b/i],[u,[d,"Insignia"],[f,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[d,"NextBook"],[f,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],u,[f,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[f,w]],[/\b(ph-1) /i],[u,[d,"Essential"],[f,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[d,"Envizen"],[f,g]],[/\b(trio[-\w\. ]+) b/i],[u,[d,"MachSpeed"],[f,g]],[/\btu_(1491) b/i],[u,[d,"Rotor"],[f,g]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[u,[d,R],[f,g]],[/(sprint) (\w+)/i],[d,u,[f,w]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,P],[f,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,W],[f,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,W],[f,w]],[/smart-tv.+(samsung)/i],[d,[f,y]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,F],[f,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,M],[f,y]],[/(apple) ?tv/i],[d,[u,k+" TV"],[f,y]],[/crkey/i],[[u,C+"cast"],[d,S],[f,y]],[/droid.+aft(\w+)( bui|\))/i],[u,[d,A],[f,y]],[/(shield \w+ tv)/i],[u,[d,R],[f,y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[d,q],[f,y]],[/(bravia[\w ]+)( bui|\))/i],[u,[d,H],[f,y]],[/(mi(tv|box)-?\w+) bui/i],[u,[d,V],[f,y]],[/Hbbtv.*(technisat) (.*);/i],[d,u,[f,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d,Q],[u,Q],[f,y]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[u,[f,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[f,m]],[/droid.+; (shield)( bui|\))/i],[u,[d,R],[f,m]],[/(playstation \w+)/i],[u,[d,H],[f,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,P],[f,m]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[u,[d,F],[f,b]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[d,u,[f,b]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[u,[d,D],[f,b]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[d,k],[f,b]],[/(opwwe\d{3})/i],[u,[d,U],[f,b]],[/(moto 360)/i],[u,[d,O],[f,b]],[/(smartwatch 3)/i],[u,[d,H],[f,b]],[/(g watch r)/i],[u,[d,M],[f,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,W],[f,b]],[/droid.+; (glass) \d/i],[u,[d,S],[f,b]],[/(pico) (4|neo3(?: link|pro)?)/i],[d,u,[f,b]],[/; (quest( \d| pro)?)/i],[u,[d,j],[f,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[f,v]],[/(aeobc)\b/i],[u,[d,A],[f,v]],[/(homepod).+mac os/i],[u,[d,k],[f,v]],[/windows iot/i],[[f,v]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[f,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[f,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,w]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[u,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[l,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[l,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,h],[/ladybird\//i],[[l,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,h],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[l,[h,_,$]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,_,$],[l,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,z],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,l],[/(ubuntu) ([\w\.]+) like android/i],[[l,/(.+)/,"$1 Touch"],h],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[l,h],[/\(bb(10);/i],[h,[l,E]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[h,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[l,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[l,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,Y],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,h],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,h]]},te=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof te))return new te(e,t).getResult();var m=typeof n!==i&&n.navigator?n.navigator:r,y=e||(m&&m.userAgent?m.userAgent:""),b=m&&m.userAgentData?m.userAgentData:r,v=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(ee,t):ee,A=m&&m.userAgent==y;return this.getBrowser=function(){var e,t={};return t[l]=r,t[h]=r,Z.call(t,y,v.browser),t[c]=typeof(e=t[h])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r,A&&m&&m.brave&&typeof m.brave.isBrave==o&&(t[l]="Brave"),t},this.getCPU=function(){var e={};return e[p]=r,Z.call(e,y,v.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[f]=r,Z.call(e,y,v.device),A&&!e[f]&&b&&b.mobile&&(e[f]=w),A&&"Macintosh"==e[u]&&m&&typeof m.standalone!==i&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[u]="iPad",e[f]=g),e},this.getEngine=function(){var e={};return e[l]=r,e[h]=r,Z.call(e,y,v.engine),e},this.getOS=function(){var e={};return e[l]=r,e[h]=r,Z.call(e,y,v.os),A&&!e[l]&&b&&b.platform&&"Unknown"!=b.platform&&(e[l]=b.platform.replace(/chrome os/i,Y).replace(/macos/i,z)),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 y},this.setUA=function(e){return y=typeof e===s&&e.length>500?Q(e,500):e,this},this.setUA(y),this};te.VERSION="1.0.41",te.BROWSER=J([l,h,c]),te.CPU=J([p]),te.DEVICE=J([u,d,f,m,w,y,g,b,v]),te.ENGINE=te.OS=J([l,h]),e.exports&&(t=e.exports=te),t.UAParser=te;var ne=typeof n!==i&&(n.jQuery||n.Zepto);if(ne&&!ne.ua){var re=new te;ne.ua=re.getResult(),ne.ua.get=function(){return re.getUA()},ne.ua.set=function(e){re.setUA(e);var t=re.getResult();for(var n in t)ne.ua[n]=t[n]}}}("object"==typeof window?window:lh)),uh.exports;var e,t}(),i=new o,a=i.getBrowser(),s=i.getCPU(),c=i.getDevice(),u=i.getEngine(),l=i.getOS(),f=i.getUA(),d=function(e){return i.setUA(e)},h=function(e){if(e){var t=new o(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}},p=/* @__PURE__ */Object.freeze({ClientUAInstance:i,browser:a,cpu:s,device:c,engine:u,os:l,ua:f,setUa:d,parseUserAgent:h});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 w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E="mobile",x="tablet",C="smarttv",I="console",S="wearable",N="embedded",B=void 0,M={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},P={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},O={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},R=function(e){return e||(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none")},U=function(){return!("undefined"==typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},L=function(e){var t=U();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},D=function(e){return e.type===E},F=function(e){return e.type===x},q=function(e){var t=e.type;return t===E||t===x},H=function(e){return e.type===C},V=function(e){return e.type===B},W=function(e){return e.type===S},j=function(e){return e.type===I},Y=function(e){return e.type===N},z=function(e){var t=e.vendor;return R(t)},G=function(e){var t=e.model;return R(t)},J=function(e){var t=e.type;return R(t,"browser")},X=function(e){return e.name===P.Android},K=function(e){return e.name===P.Windows},Q=function(e){return e.name===P.MAC_OS},Z=function(e){return e.name===P.WindowsPhone},_=function(e){return e.name===P.IOS},$=function(e){var t=e.version;return R(t)},ee=function(e){var t=e.name;return R(t)},te=function(e){return e.name===M.Chrome},ne=function(e){return e.name===M.Firefox},re=function(e){return e.name===M.Chromium},oe=function(e){return e.name===M.Edge},ie=function(e){return e.name===M.Yandex},ae=function(e){var t=e.name;return t===M.Safari||t===M.MobileSafari},se=function(e){return e.name===M.MobileSafari},ce=function(e){return e.name===M.Opera},ue=function(e){var t=e.name;return t===M.InternetExplorer||t===M.Ie},le=function(e){return e.name===M.MIUI},fe=function(e){return e.name===M.SamsungBrowser},de=function(e){var t=e.version;return R(t)},he=function(e){var t=e.major;return R(t)},pe=function(e){var t=e.name;return R(t)},me=function(e){var t=e.name;return R(t)},we=function(e){var t=e.version;return R(t)},ge=function(){var e=U(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"==typeof t&&/electron/.test(t)},ye=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},be=function(){var e=U();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream},ve=function(){return L("iPad")},Ae=function(){return L("iPhone")},ke=function(){return L("iPod")},Te=function(e){return R(e)};function Ee(e){var t=e||p,n=t.device,r=t.browser,o=t.os,i=t.engine,a=t.ua;return{isSmartTV:H(n),isConsole:j(n),isWearable:W(n),isEmbedded:Y(n),isMobileSafari:se(r)||ve(),isChromium:re(r),isMobile:q(n)||ve(),isMobileOnly:D(n),isTablet:F(n)||ve(),isBrowser:V(n),isDesktop:V(n),isAndroid:X(o),isWinPhone:Z(o),isIOS:_(o)||ve(),isChrome:te(r),isFirefox:ne(r),isSafari:ae(r),isOpera:ce(r),isIE:ue(r),osVersion:$(o),osName:ee(o),fullBrowserVersion:de(r),browserVersion:he(r),browserName:pe(r),mobileVendor:z(n),mobileModel:G(n),engineName:me(i),engineVersion:we(i),getUA:Te(a),isEdge:oe(r)||ye(a),isYandex:ie(r),deviceType:J(n),isIOS13:be(),isIPad13:ve(),isIPhone13:Ae(),isIPod13:ke(),isElectron:ge(),isEdgeChromium:ye(a),isLegacyEdge:oe(r)&&!ye(a),isWindows:K(o),isMacOs:Q(o),isMIUI:le(r),isSamsungBrowser:fe(r)}}var xe=H(c),Ce=j(c),Ie=W(c),Se=Y(c),Ne=se(a)||ve(),Be=re(a),Me=q(c)||ve(),Pe=D(c),Oe=F(c)||ve(),Re=V(c),Ue=V(c),Le=X(l),De=Z(l),Fe=_(l)||ve(),qe=te(a),He=ne(a),Ve=ae(a),We=ce(a),je=ue(a),Ye=$(l),ze=ee(l),Ge=de(a),Je=he(a),Xe=pe(a),Ke=z(c),Qe=G(c),Ze=me(u),_e=we(u),$e=Te(f),et=oe(a)||ye(f),tt=ie(a),nt=J(c),rt=be(),ot=ve(),it=Ae(),at=ke(),st=ge(),ct=ye(f),ut=oe(a)&&!ye(f),lt=K(l),ft=Q(l),dt=le(a),ht=fe(a);function pt(e){var t=e||window.navigator.userAgent;return h(t)}return ch.AndroidView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Le?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.BrowserTypes=M,ch.BrowserView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Re?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.ConsoleView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Ce?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.CustomView=function(e){var r=e.renderWithFragment,o=e.children;e.viewClassName,e.style;var i=e.condition,a=A(e,["renderWithFragment","children","viewClassName","style","condition"]);return i?r?n.createElement(t.Fragment,null,o):n.createElement("div",a,o):null},ch.IEView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return je?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.IOSView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Fe?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.MobileOnlyView=function(e){var r=e.renderWithFragment,o=e.children;e.viewClassName,e.style;var i=A(e,["renderWithFragment","children","viewClassName","style"]);return Pe?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.MobileView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Me?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.OsTypes=P,ch.SmartTVView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return xe?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.TabletView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Oe?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.WearableView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Ie?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.WinPhoneView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return De?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.browserName=Xe,ch.browserVersion=Je,ch.deviceDetect=function(e){var t=e?h(e):p,n=t.device,r=t.browser,o=t.engine,i=t.os,a=t.ua,s=function(e){switch(e){case E:return{isMobile:!0};case x:return{isTablet:!0};case C:return{isSmartTV:!0};case I:return{isConsole:!0};case S:return{isWearable:!0};case B:return{isBrowser:!0};case N:return{isEmbedded:!0};default:return O}}(n.type),c=s.isBrowser,u=s.isMobile,l=s.isTablet,f=s.isSmartTV,d=s.isConsole,w=s.isWearable,y=s.isEmbedded;return c?function(e,t,n,r,o){return{isBrowser:e,browserMajorVersion:R(t.major),browserFullVersion:R(t.version),browserName:R(t.name),engineName:R(n.name),engineVersion:R(n.version),osName:R(r.name),osVersion:R(r.version),userAgent:R(o)}}(c,r,o,i,a):f?function(e,t,n,r){return{isSmartTV:e,engineName:R(t.name),engineVersion:R(t.version),osName:R(n.name),osVersion:R(n.version),userAgent:R(r)}}(f,o,i,a):d?function(e,t,n,r){return{isConsole:e,engineName:R(t.name),engineVersion:R(t.version),osName:R(n.name),osVersion:R(n.version),userAgent:R(r)}}(d,o,i,a):u||l?function(e,t,n,r){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e,{vendor:R(t.vendor),model:R(t.model),os:R(n.name),osVersion:R(n.version),ua:R(r)})}(s,n,i,a):w?function(e,t,n,r){return{isWearable:e,engineName:R(t.name),engineVersion:R(t.version),osName:R(n.name),osVersion:R(n.version),userAgent:R(r)}}(w,o,i,a):y?function(e,t,n,r,o){return{isEmbedded:e,vendor:R(t.vendor),model:R(t.model),engineName:R(n.name),engineVersion:R(n.version),osName:R(r.name),osVersion:R(r.version),userAgent:R(o)}}(y,n,o,i,a):void 0},ch.deviceType=nt,ch.engineName=Ze,ch.engineVersion=_e,ch.fullBrowserVersion=Ge,ch.getSelectorsByUserAgent=function(e){if(e&&"string"==typeof e){var t=h(e);return Ee({device:t.device,browser:t.browser,os:t.os,engine:t.engine,ua:t.ua})}},ch.getUA=$e,ch.isAndroid=Le,ch.isBrowser=Re,ch.isChrome=qe,ch.isChromium=Be,ch.isConsole=Ce,ch.isDesktop=Ue,ch.isEdge=et,ch.isEdgeChromium=ct,ch.isElectron=st,ch.isEmbedded=Se,ch.isFirefox=He,ch.isIE=je,ch.isIOS=Fe,ch.isIOS13=rt,ch.isIPad13=ot,ch.isIPhone13=it,ch.isIPod13=at,ch.isLegacyEdge=ut,ch.isMIUI=dt,ch.isMacOs=ft,ch.isMobile=Me,ch.isMobileOnly=Pe,ch.isMobileSafari=Ne,ch.isOpera=We,ch.isSafari=Ve,ch.isSamsungBrowser=ht,ch.isSmartTV=xe,ch.isTablet=Oe,ch.isWearable=Ie,ch.isWinPhone=De,ch.isWindows=lt,ch.isYandex=tt,ch.mobileModel=Qe,ch.mobileVendor=Ke,ch.osName=ze,ch.osVersion=Ye,ch.parseUserAgent=h,ch.setUserAgent=function(e){return d(e)},ch.useDeviceData=pt,ch.useDeviceSelectors=function(e){var t=pt(e||window.navigator.userAgent);return[Ee(t),t]},ch.useMobileOrientation=function(){var e=function(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){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(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.")}()}(t.useState(function(){var e=window.innerWidth>window.innerHeight?90:0;return{isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"}}),2),n=e[0],r=e[1],o=t.useCallback(function(){var e=window.innerWidth>window.innerHeight?90:0,t={isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"};n.orientation!==t.orientation&&r(t)},[n.orientation]);return t.useEffect(function(){return void 0!==("undefined"==typeof window?"undefined":w(window))&&Me&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),n},ch.withOrientationChange=function(e){/* @__PURE__ */
19
- return function(t){function r(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(t=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}(this,b(r).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(k(t)),t.onOrientationChange=t.onOrientationChange.bind(k(t)),t.onPageLoad=t.onPageLoad.bind(k(t)),t.state={isLandscape:!1,isPortrait:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(r,t),o=r,(i=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"==typeof window?"undefined":w(window))&&Me&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return n.createElement(e,y({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,i),r;var o,i}(n.Component)},ch}();let dh=null;function hh(){dh?.()}function ph(e){dh=e}const mh="dataBuyToken",wh={srcTokenAddress:"",descTokenAddress:"",amount:"",srcTokenDecimals:18,descTokenDecimals:18};class gh{baseUrl;constructor(e){this.baseUrl=e}buildUrl(e,t){const n=new URL(e,this.baseUrl);return t&&Object.entries(t).forEach(([e,t])=>{null!=t&&n.searchParams.append(e,String(t))}),n.toString()}async get(e,t={}){const n=this.buildUrl(e,t.query),r=await fetch(n,{method:"GET",headers:t.headers||{},signal:t.signal});if(!r.ok){let e=null;try{e=await r.json()}catch{try{const t=await r.text();t&&(e={message:t})}catch{}}const t=new Error(e?.message||e?.errorMessage||`HTTP ${r.status}: ${r.statusText}`);throw t.status=r.status,t.statusText=r.statusText,e&&(t.data=e),t}return{data:await r.json(),status:r.status}}async post(e,t,n={}){const r=this.buildUrl(e,n.query),o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",...n.headers},body:JSON.stringify(t),signal:n.signal});if(!o.ok){let e=null;try{e=await o.json()}catch{try{const t=await o.text();t&&(e={message:t})}catch{}}const t=new Error(e?.message||e?.errorMessage||`HTTP ${o.status}: ${o.statusText}`);throw t.status=o.status,t.statusText=o.statusText,e&&(t.data=e),t}return{data:await o.json(),status:o.status}}}const yh=new class extends gh{constructor(){super("https://wallet-api.pantograph.app")}async getTokensDetails(e,t="base"){try{if(!e||!Array.isArray(e)||0===e.length)throw new Error("Addresses must be a non-empty array");const n=e.join(","),r=await this.get(`/keyrings/tokens/${t}/v2`,{query:{addresses:n}});return Array.isArray(r.data)&&(r.data=r.data.filter((e,t,n)=>t===n.findIndex(t=>t.address.toLowerCase()===e.address.toLowerCase())),Array.isArray(e)&&e.length>0&&(r.data=r.data.filter(t=>e.some(e=>e.toLowerCase()===t.address.toLowerCase())),r.data.sort((t,n)=>e.findIndex(e=>e.toLowerCase()===t.address.toLowerCase())-e.findIndex(e=>e.toLowerCase()===n.address.toLowerCase())))),r}catch(n){throw n}}async getTokenDetail(e,t="base"){try{if(!e)throw new Error("Address is required");const n=await this.getTokensDetails([e],t);return{data:n.data[0]||null,status:n.status}}catch(n){throw n}}async getTopGainers(e="base",t="24h",n=3){try{return await this.get(`/token-list/top-gainers/${e}`,{query:{duration:t,limit:n}})}catch(r){throw r}}async searchTokensByKey(e,t){try{if(!e)throw new Error("key is required");const n=await this.get("/token-list",{query:{chainId:t,key:e}});let r=n.data;return r=Object.values(r).flat(),Array.isArray(r)&&(r=r.map(e=>({...e,decimals:null!=e.decimals?Number(e.decimals):18,price:null!=e.price?Number(e.price):void 0}))),n.data=r,n}catch(n){throw n}}};function bh(e,t){return new Promise(n=>{const r=setTimeout(n,e);t?.addEventListener("abort",()=>{clearTimeout(r),n()},{once:!0})})}const vh=Ad()?.webAppUrl||"https://nft.keyring.app",Ah=new gh("https://wallet-api.pantograph.app"),kh=vh,Th=new gh(kh);async function Eh(e){const{address:t,chain:n="base",token_addresses:r,exclude_spam:o,exclude_unverified_contracts:i}=e;if(!t)throw new Error("Address is required");let a="Unknown error";for(let u=1;u<=5;u++)try{const e={chain:n,exclude_spam:o??!1,exclude_unverified_contracts:i??!1};r&&(e.token_addresses=r);const a=(await Th.get(`api/moralis/proxy/wallets/${encodeURIComponent(t)}/tokens`,{query:e})).data;if(a?.result?.length>0){a.result=a.result.filter(e=>new rh(e?.balance||0).gt(0)),a.result=a.result.map(e=>({...e,token_address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"===e.token_address?ko:e.token_address}));try{if(a.result.length>0){const e=Uo(n)??n,t=a.result.map(e=>e.token_address),r=await Ah.get(`/keyrings/tokens/${e}/v2`,{query:{addresses:t.join(",")}});if(Array.isArray(r.data)){const e=/* @__PURE__ */new Map;for(const t of r.data)t.address&&e.set(t.address.toLowerCase(),{price:null!=t.price?parseFloat(String(t.price)):NaN,icon_image:t.icon_image});a.result=a.result.map(t=>{const n=e.get(t.token_address.toLowerCase());if(!n)return t;const r={...t};return n.icon_image&&(r.logo=n.icon_image,r.thumbnail=n.icon_image),isNaN(n.price)||(r.usd_price=n.price,r.usd_value=rh(t.balance_formatted||"0").multipliedBy(n.price).toNumber()),r}),a.result=a.result.filter(e=>null==e.usd_value||new rh(e.usd_value).gte(.01))}}}catch(s){}}return{success:!0,data:a}}catch(c){a=c instanceof Error?c.message:"Unknown error",u<5&&await bh(1e3)}return{success:!1,error:a}}async function xh(e){const{address:t,chain:n="base",signal:r}=e;if(!t)throw new Error("Token address is required");let o="Unknown error";for(let a=1;a<=5;a++){if(r?.aborted)return{success:!1,error:"Request cancelled"};try{const e=Uo(n)??n,i=await Ah.get(`/keyrings/tokens/${e}/v2`,{query:{addresses:t},signal:r}),s=t===ko,c=(Array.isArray(i.data)?i.data:[]).find(e=>e.address?.toLowerCase()===t.toLowerCase()||s&&""===e.address)??null;if(c)return{success:!0,data:{token_address:c.address??t,name:c.name??"",symbol:c.symbol??"",decimals:null!=c.decimals?Number(c.decimals):18,logo:c.icon_image||c.logo,thumbnail:c.icon_image||c.logo,usd_price:null!=c.price?parseFloat(c.price):void 0,usd_price_24hr_percent_change:c.price_change_percentage_24h??void 0,usd_price_24hr_usd_change:c.price_change_24h??void 0}};const[u,l]=await Promise.allSettled([Th.get("api/moralis/proxy/erc20/metadata",{query:{chain:n,addresses:[t]},signal:r}),Th.get(`api/moralis/proxy/erc20/${encodeURIComponent(t)}/price`,{query:{chain:n,include:"percent_change"},signal:r})]),f="fulfilled"===u.status?u.value.data:[];if(!f||0===f.length){if(o="Token metadata not found",a<5&&await bh(1e3,r),r?.aborted)return{success:!1,error:"Request cancelled"};continue}const d=f[0],h="fulfilled"===l.status?l.value.data:void 0;return{success:!0,data:{token_address:d.token_address,name:d.name,symbol:d.symbol,decimals:d.decimals,logo:d.logo||d.thumbnail,thumbnail:d.thumbnail,usd_price:h?.usdPrice??void 0,usd_price_24hr_percent_change:h?.["24hrPercentChange"]?parseFloat(h["24hrPercentChange"]):void 0,usd_price_24hr_usd_change:h?.usdPriceChange24hr??void 0}}}catch(i){if(r?.aborted)return{success:!1,error:"Request cancelled"};if(o=i instanceof Error?i.message:"Unknown error",a<5&&await bh(1e3,r),r?.aborted)return{success:!1,error:"Request cancelled"}}}return{success:!1,error:o}}async function Ch(e){const{prompt:t,model:n="gpt-4.1-mini",stream:r=!1,systemPrompt:o,signal:i}=e;if(!t)throw new Error("Prompt is required");const a=new gh(kh),s=o?`${o}\n\n---\n\n Current User's question: ${t}`:t;let c="Unknown error";for(let l=1;l<=5;l++){if(i?.aborted)return{success:!1,error:"Request cancelled"};try{const e=(await a.post("api/moralis-cortex/proxy/chat",{prompt:s,model:n,stream:r},{headers:{Accept:"application/json","Content-Type":"application/json"},signal:i})).data;if(!e?.text?.trim()){if(c="Empty response from Cortex AI",l<5&&await bh(1e3,i),i?.aborted)return{success:!1,error:"Request cancelled"};continue}return{success:!0,data:e}}catch(u){if(i?.aborted)return{success:!1,error:"Request cancelled"};if(c=u instanceof Error?u.message:"Unknown error",l<5&&await bh(1e3,i),i?.aborted)return{success:!1,error:"Request cancelled"}}}return{success:!1,error:c}}async function Ih(e){const{address:t,chain:n="base",limit:r=100,exclude_spam:o=!0,cursor:i,signal:a}=e;if(!t)throw new Error("Address is required");let s="Unknown error";for(let u=1;u<=5;u++){if(a?.aborted)return{success:!1,error:"Request cancelled"};try{const e={chain:n,format:"decimal",limit:r,exclude_spam:o,media_items:!0,normalizeMetadata:!0};i&&(e.cursor=i);return{success:!0,data:(await Th.get(`api/moralis/proxy/${encodeURIComponent(t)}/nft`,{query:e,signal:a})).data}}catch(c){if(a?.aborted)return{success:!1,error:"Request cancelled"};if(s=c instanceof Error?c.message:"Unknown error",u<5&&await bh(1e3,a),a?.aborted)return{success:!1,error:"Request cancelled"}}}return{success:!1,error:s}}const Sh=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,chatWithCortex:Ch,getNftContractMetadata:async function(e){const{address:t,chain:n="base"}=e;if(!t)throw new Error("Contract address is required");try{return{success:!0,data:(await Th.get(`api/moralis/proxy/nft/${encodeURIComponent(t)}/metadata`,{query:{chain:n}})).data}}catch(r){return{success:!1,error:r instanceof Error?r.message:"Unknown error"}}},getTokenMetadata:xh,getWalletNFTs:Ih,getWalletTokenBalances:Eh,moralisApi:Th},Symbol.toStringTag,{value:"Module"})),Nh=new gh("https://dln.debridge.finance");async function Bh(e){const{chainId:t,tokenIn:n,tokenInAmount:r,tokenOut:o,accesstoken:i,slippage:a="auto",tokenOutRecipient:s}=e;if(!(t&&n&&r&&o))throw new Error("Missing required parameters: chainId, tokenIn, tokenInAmount, tokenOut");try{const e=await fetch("https://exchange-api.keyring.app/admin/setting?configs=others",{method:"GET"}),c=await e.json(),u=c?.others||{},l=u?.AFFILIATE_FEE_PERENT,f=u?.AFFILIATE_FEE_RECIPIENT,d=await Nh.get("/v1.0/chain/transaction",{query:{chainId:String(t),tokenIn:n,tokenInAmount:r,tokenOut:o,slippage:String(a),tokenOutRecipient:s,accesstoken:i,affiliateFeePercent:l,affiliateFeeRecipient:f}});if(d.data?.error)throw new Error(`DeBridge API Error: ${d.data.error}`);return{success:!0,data:d.data}}catch(c){let e=c instanceof Error?c.message:"Unknown error";const t=c;t.data?.errorMessage?e=t.data.errorMessage:t.response?.data?.errorMessage?e=t.response.data.errorMessage:t.data?.message?e=t.data.message:t.response?.data?.message&&(e=t.response.data.message);const n=t.status||t.response?.status||t.statusCode||t.data?.status;return{success:!1,error:c instanceof Error?c.message:"Unknown error",status:n,errorMessage:e,errorCode:t.data?.errorCode,errorId:t.data?.errorId}}}const Mh={1:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",10:"0x4200000000000000000000000000000000000006",56:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",137:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",8453:"0x4200000000000000000000000000000000000006",42161:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"},Ph=[{name:"transfer",type:"function",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"approve",type:"function",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"allowance",type:"function",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]}],Oh=[{name:"deposit",type:"function",stateMutability:"payable",inputs:[],outputs:[]},{name:"withdraw",type:"function",stateMutability:"nonpayable",inputs:[{name:"wad",type:"uint256"}],outputs:[]}],Rh=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],Uh=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"amount",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]}];function Lh(e,t){if(t)return t;const n=Ro[e];return n?.rpcUrls?.default?.http?.[0]}function Dh(e){const{action:t,parameters:n,fromAddress:r,chainId:o}=e;switch(t){case"send_native":return function(e,t,n){const{to_address:r,amount:o}=e;if(!r)throw new Error("Recipient address is required");if(!o)throw new Error("Amount is required");return{from:t,to:r,data:"0x",value:Ao(rh(o).decimalPlaces(18,rh.ROUND_DOWN).toFixed(),18).toString(),chainId:n,description:`Send ${o} native token to ${r}`}}(n,r,o);case"send_token":return function(e,t,n){const{contract_address:r,to_address:o,amount:i,decimals:a,token_symbol:s}=e;if(!r)throw new Error("Token contract address is required");if(!o)throw new Error("Recipient address is required");if(!i)throw new Error("Amount is required");const c=parseInt(a)||18,u=Ao(rh(i).decimalPlaces(c,rh.ROUND_DOWN).toFixed(),c);return{from:t,to:r,data:xt({abi:Ph,functionName:"transfer",args:[o,u]}),value:"0",chainId:n,description:`Send ${i} ${s||"tokens"} to ${o}`}}(n,r,o);case"approve_token":return function(e,t,n){const{contract_address:r,spender_address:o,amount:i,decimals:a,token_symbol:s}=e;if(!r)throw new Error("Token contract address is required");if(!o)throw new Error("Spender address is required");const c=parseInt(a)||18,u=i&&""!==i?.trim()?Ao(rh(i).decimalPlaces(c,rh.ROUND_DOWN).toFixed(),c):cn;return{from:t,to:r,data:xt({abi:Ph,functionName:"approve",args:[o,u]}),value:"0",chainId:n,description:`Approve ${i||"unlimited"} ${s||"tokens"} for ${o}`}}(n,r,o);case"wrap_native":return function(e,t,n){const{amount:r}=e;if(!r)throw new Error("Amount is required");const o=Mh[n];if(!o)throw new Error(`WETH not supported on chain ${n}`);const i=Ao(rh(r).decimalPlaces(18,rh.ROUND_DOWN).toFixed(),18).toString();return{from:t,to:o,data:xt({abi:Oh,functionName:"deposit"}),value:i,chainId:n,description:`Wrap ${r} native token`}}(n,r,o);case"unwrap_native":return function(e,t,n){const{amount:r}=e;if(!r)throw new Error("Amount is required");const o=Mh[n];if(!o)throw new Error(`WETH not supported on chain ${n}`);const i=Ao(rh(r).decimalPlaces(18,rh.ROUND_DOWN).toFixed(),18);return{from:t,to:o,data:xt({abi:Oh,functionName:"withdraw",args:[i]}),value:"0",chainId:n,description:`Unwrap ${r} WETH`}}(n,r,o);case"send_nft":return function(e,t,n){const{contract_address:r,token_id:o,to_address:i,token_standard:a,amount:s,nft_name:c}=e;if(!r)throw new Error("NFT contract address is required");if(!o)throw new Error("Token ID is required");if(!i)throw new Error("Recipient address is required");const u=(a||"ERC721").toUpperCase(),l=BigInt(o);let f,d;if("ERC1155"===u){const e=BigInt(s||"1");f=xt({abi:Uh,functionName:"safeTransferFrom",args:[t,i,l,e,"0x"]}),d=`Send ${e>1n?e.toString()+"x ":""}${c||"NFT"} (ERC1155 #${o}) to ${i}`}else f=xt({abi:Rh,functionName:"safeTransferFrom",args:[t,i,l]}),d=`Send ${c||"NFT"} (ERC721 #${o}) to ${i}`;return{from:t,to:r,data:f,value:"0",chainId:n,description:d}}(n,r,o);default:throw new Error(`Action "${t}" does not produce a transaction`)}}async function Fh(e){const{transactionHash:t,chainId:n,pollingInterval:r=3e3,timeout:o=12e4,rpcUrl:i}=e,a=Lh(n,i);if(!a)throw new Error(`No RPC endpoint for chain ${n}`);const s=Date.now();for(;Date.now()-s<o;){try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getTransactionReceipt",params:[t]})}),n=await e.json();if(n.result){const e=n.result;return{status:"0x1"===e.status?"success":"fail",blockNumber:e.blockNumber,gasUsed:e.gasUsed,effectiveGasPrice:e.effectiveGasPrice}}}catch(c){}await new Promise(e=>setTimeout(e,r))}throw new Error(`Transaction ${t} was not mined within ${o/1e3}s`)}async function qh(e){const{tokenAddress:t,ownerAddress:n,spenderAddress:r,chainId:o,rpcUrl:i}=e,a=Lh(o,i);if(!a)return BigInt(0);try{const e=xt({abi:Ph,functionName:"allowance",args:[n,r]}),o=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_call",params:[{to:t,data:e},"latest"]})}),i=await o.json();return i.result&&"0x"!==i.result?BigInt(i.result):BigInt(0)}catch(s){return BigInt(0)}}function Hh(e){const{tokenAddress:t,spenderAddress:n,fromAddress:r,chainId:o,tokenSymbol:i,amount:a}=e,s=a&&BigInt(a)>0n?BigInt(a):cn;return{from:r,to:t,data:xt({abi:Ph,functionName:"approve",args:[n,s]}),value:"0",chainId:o,description:`Approve ${i||"token"} for swap`}}async function Vh(e){const{address:t,chainId:n,rpcUrl:r}=e,o=Lh(n,r);if(!o)return new rh(0);try{const e=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getBalance",params:[t,"latest"]})}),n=await e.json();return n.result&&"0x"!==n.result?new rh(BigInt(n.result).toString()):new rh(0)}catch(i){return new rh(0)}}async function Wh(e){const{from:t,to:n,data:r,value:o,chainId:i,rpcUrl:a}=e,s=Lh(i,a);if(!s)return new rh(0);try{const[e,i]=await Promise.all([fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_estimateGas",params:[{from:t,to:n,data:r,...o&&"0"!==o?{value:o}:{}}]})}),fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:2,method:"eth_gasPrice",params:[]})})]),[a,c]=await Promise.all([e.json(),i.json()]),u=a.result?new rh(BigInt(a.result).toString()):new rh(0),l=c.result?new rh(BigInt(c.result).toString()):new rh(0);return u.times(l).times(1.1)}catch(c){return new rh(0)}}async function jh(e){const{chainId:t,rpcUrl:n}=e,r=Lh(t,n);if(!r)return new rh(0);try{const e=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_gasPrice",params:[]})}),t=await e.json();return t.result&&"0x"!==t.result?new rh(BigInt(t.result).toString()):new rh(0)}catch(o){return new rh(0)}}const Yh=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,buildApproveForSwap:Hh,buildTransaction:Dh,checkAllowance:qh,estimateTransactionFee:Wh,getGasPrice:jh,getNativeBalance:Vh,getRpcUrl:Lh,isTransactionAction:function(e){return["send_native","send_token","approve_token","wrap_native","unwrap_native","send_nft"].includes(e)},waitForTransactionReceipt:Fh},Symbol.toStringTag,{value:"Module"})),zh="gemini-2.5-flash-lite";let Gh=null,Jh=null;const Xh=Ad()?.webAppUrl||"https://nft.keyring.app",Kh=["faq","pool","general","crypto"],Qh=new class extends gh{enableGoogleSearch=!0;constructor(){super(Xh)}getRuleLanguage(e){return e?`**LANGUAGE ADHERENCE**: You MUST respond ONLY in the language specified as: "${e||"the language of the user's current question"}". Ignore any language bias from context or history. If no language is explicitly provided, detect and follow the current question's language.`:'\n **LANGUAGE ADHERENCE**:\n - **DETECT** the language of the section labeled "CURRENT USER QUESTION" below.\n - **RESPOND ONLY** in that same language.\n - **IGNORE** any language bias from the context or history.\n '}async generateContent(e,t,n){try{const r=`\nBelow is the system context and conversation history. Use it for context but prioritize the instructions at the end.\n---\nSYSTEM CONTEXT & HISTORY:\n${t}\n---\n\n---\nCURRENT USER QUESTION:\n${e}\n---\n\n---\n### MANDATORY RULES:\n1. ${this.getRuleLanguage(n)}\n2. **FOLLOW-UP / CONTINUATION**: If CURRENT USER QUESTION is a short follow-up (e.g. "yes", "ok", "sure", "tell me more", "details", "go ahead", "why?", "how?"), look at the CONVERSATION HISTORY above to understand what the user is responding to. Provide a relevant, detailed follow-up answer based on the LAST assistant message. NEVER say "too vague" or "please clarify" when history clearly shows the context.\n3. **HISTORY CLEANING**:\n - If any assistant response in the conversation history says it **"doesn't know"**, **"doesn't have data"**, **"cannot find info"**, or similar, you MUST **IGNORE that specific history segment**. \n - Do not let previous data failures prevent you from answering the CURRENT USER QUESTION if the information is available now or in your core knowledge.\n4. **BREVITY**: Keep your answer extremely concise (under 3000 characters).\n5. **DATA INTEGRITY**: Do not mention data gaps or historical missing info; just answer based on available info.\n---\n`,o="/api/gemini-cortex/proxy",i={model:zh,data:{contents:[{parts:[{text:r}]}],tools:[{googleSearch:{}}]}};this.enableGoogleSearch||delete i.data.tools;const a=await this.post(o,i);return a?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||a?.data?.candidates?.[0]?.content?.parts?.[0]?.text}catch(r){if((r?.message?.includes("search_grounding_request_per_project_per_day")||r?.data?.error?.message?.includes("search_grounding_request_per_project_per_day"))&&this.enableGoogleSearch)return this.enableGoogleSearch=!1,await this.generateContent(e,t,n);throw r}}async checkInfoQuestion(e,t){try{const r=await async function(){if(null!==Gh)return Gh;const e=await async function(){if(Jh)return Jh;const e=Ad(),t=[],n=e?.faqInternal;n&&Array.isArray(n.data)&&t.push(...n.data);const r=e?.faqUrl||"";if(r)try{const e=await fetch(r),n=await e.json();Array.isArray(n?.data)&&t.push(...n.data)}catch(o){}return Jh=t,t}();return 0===e.length?(Gh="",""):(Gh=e.map((e,t)=>{const n=Object.keys(e.question),r=n.map(t=>e.question[t]?.trim()).filter(Boolean),o=n.map(t=>e.answer[t]?.trim()).filter(Boolean),i=r.join(" | ")||"",a=o[0]||"";return i?`[${t}] Q: ${i}\n A: ${a}`:""}).filter(Boolean).join("\n"),Gh)}(),o=t+`---\nCURRENT USER QUESTION:\n${e}\n---`+(r?`\n\n## FAQ KNOWLEDGE BASE\n${r}\n\n`:"\n\n")+'Classify this question. Return ONLY a JSON object — no markdown, no explanation.\n\n## OUTPUT FORMAT\n{\n "model": "faq" | "pool" | "general" | "crypto",\n "language": "<ISO 639-1 code>",\n "faqAnswer": "<string>" | null\n}\n\n## FIELD DEFINITIONS\n- **model**: The AI pipeline route for this question (see classification steps below).\n- **language**: ISO 639-1 code detected from CURRENT USER QUESTION text only (en, vi, ja, zh, ko, es, fr, id, th, ru, etc.).\n- **faqAnswer**: Translated FAQ answer when model="faq"; always null otherwise.\n\n## CLASSIFICATION STEPS (follow in order)\n\n**Step 1 — Detect language**: Detect from CURRENT USER QUESTION text ONLY. Ignore language from history, system prompt, or FAQ data. For very short follow-ups (e.g. "yes", "ok"), detect language from the LAST user message in CONVERSATION HISTORY instead.\n\n**Step 1.5 — Detect Follow-up / Continuation**: If CURRENT USER QUESTION is a very short or vague follow-up that CANNOT stand alone (e.g., "yes", "no", "sure", "ok", "go ahead", "tell me more", "details", "please", "continue", "explain", "why?", "how?", "what about that?", "vâng", "ừ", "có", "tiếp", "はい", "對", single-word confirmations, affirmations, emojis, or any message that clearly references the previous assistant reply rather than introducing a new topic), then:\n - Look at the LAST assistant message in CONVERSATION HISTORY to determine the topic.\n - Route to the model that matches that topic: pool/liquidity/APR/positions → "pool", crypto/token/wallet/DeFi → "crypto", non-crypto topic → "general".\n - Do NOT classify the follow-up independently — the user is continuing the previous conversation.\n - Set faqAnswer = null (follow-ups are never FAQ).\n - STOP here, do not proceed to Step 2.\n - If there is NO CONVERSATION HISTORY, skip this step and proceed to Step 2.\n\n**Step 2 — Check FAQ FIRST**: Compare the CURRENT USER QUESTION against the FAQ KNOWLEDGE BASE above. Match by MEANING, not exact words — if the user asks in any language but a FAQ entry covers the same topic, it counts as a match. If the question semantically matches a FAQ entry:\n - Set model = "faq"\n - Set faqAnswer = the FAQ answer, translated/rewritten naturally into the user\'s detected language. Never output Vietnamese when language is "en".\n - STOP here, do not proceed further.\n\n**Step 3 — Check Pool (only if Step 2 did not match)**: Set model = "pool" ONLY when the user wants LIVE/REAL-TIME pool data that FAQ cannot answer:\n - Search/list/show actual pools with live data\n - Personal LP positions ("my pools", "my positions", "my liquidity")\n - Trending pools, pool by address/id, compare actual pool data\n - Live APR/TVL/volume numbers for specific pools\n - Send/transfer an LP position NFT ("send position 12345", "transfer my position to 0x...", "gửi position", "chuyển LP position")\n **NOT pool**: "show my NFTs", "view my NFTs", "what NFTs do I have", "xem NFT" — these are regular NFT collection queries → use "crypto".\n Use "general" or "crypto" for: token prices, swap/send/buy regular tokens, general wallet questions, educational pool questions already in FAQ, viewing/sending regular NFTs (non-LP-position).\n\n**Step 4 — Check if non-crypto (only if Steps 2 and 3 did not match)**: Set model = "general" ONLY if the question is completely unrelated to crypto, DeFi, NFT, wallet, blockchain, tokens, greetings, or financial topics (e.g. pure cooking, sports, unrelated coding).\n\n**Step 5 — Default**: Set model = "crypto" for everything crypto-related (tokens, DeFi, NFT, wallet, blockchain, greetings, chains, gas, smart contracts, send/swap/bridge/buy).\n\n## VALIDATION RULES\n- model="faq" requires faqAnswer != null\n- model != "faq" requires faqAnswer = null\n- If FAQ KNOWLEDGE BASE is empty, model must NOT be "faq"\n\nReturn only the JSON object.',i="/api/gemini-cortex/proxy",a={model:zh,data:{contents:[{parts:[{text:o}]}],generationConfig:{responseMimeType:"application/json"}}},s=await this.post(i,a),c=s?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||s?.data?.candidates?.[0]?.content?.parts?.[0]?.text;let u={model:"crypto",language:"en",faqAnswer:null};try{let e=c?.trim()||"";e.startsWith("```json")?e=e.replace(/^```json\s*/,"").replace(/\s*```$/,""):e.startsWith("```")&&(e=e.replace(/^```\s*/,"").replace(/\s*```$/,""));const t=e.match(/\{[\s\S]*\}/);t&&(u=function(e){const t=Kh.includes(e?.model)?e.model:"crypto",n="string"==typeof e?.language&&e.language.trim().length>0?e.language.trim().toLowerCase():"en",r="string"==typeof e?.faqAnswer&&e.faqAnswer.trim().length>0?e.faqAnswer.trim():null;return"faq"!==t||r?"faq"!==t?{model:t,language:n,faqAnswer:null}:{model:t,language:n,faqAnswer:r}:{model:"crypto",language:n,faqAnswer:null}}(JSON.parse(t[0])))}catch(n){}return u}catch(r){throw r}}async checkIsQuestionActionWeb3(e,t){try{const n=t+`---\nCURRENT USER QUESTION:\n${e}\n---\n\n #### Analyze this question and determine its category.\nIMPORTANT: The following topics should ALWAYS be classified as "yes" (action-oriented):\n- Greetings (in ANY language): hello, hi, xin chào, bonjour, etc.\n- Action phrases (in ANY language): send token, swap token, buy token, bridge token, send nft, burn nft, mint nft.\n- Wallet/Account questions (in ANY language): account, wallet, address, balance, portfolio, holdings\n- Registration/Sign-up questions (in ANY language): register, sign up, create account, create wallet, new account, new wallet, registration\n- Wallet access questions (in ANY language): open wallet, open account, start wallet, launch wallet, access wallet, access account\n\nIMPORTANT: The user may ask in their native language, so recognize the MEANING, not just specific words.\n\nOtherwise, respond with ONLY the word "no" (lowercase, nothing else).\nDo not provide any explanation or additional text.`,r="/api/gemini-cortex/proxy",o={model:zh,data:{contents:[{parts:[{text:n}]}]}},i=await this.post(r,o),a=i?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||i?.data?.candidates?.[0]?.content?.parts?.[0]?.text;return a?.toLowerCase()?.startsWith("yes")}catch(n){throw n}}};var Zh,_h,$h,ep={exports:{}},tp=(Zh||(Zh=1,_h=ep,$h=ep.exports,function(){var e,t="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",o=32,i=128,a=1/0,s=9007199254740991,c=NaN,u=4294967295,l=[["ary",i],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",o],["partialRight",64],["rearg",256]],f="[object Arguments]",d="[object Array]",h="[object Boolean]",p="[object Date]",m="[object Error]",w="[object Function]",g="[object GeneratorFunction]",y="[object Map]",b="[object Number]",v="[object Object]",A="[object Promise]",k="[object RegExp]",T="[object Set]",E="[object String]",x="[object Symbol]",C="[object WeakMap]",I="[object ArrayBuffer]",S="[object DataView]",N="[object Float32Array]",B="[object Float64Array]",M="[object Int8Array]",P="[object Int16Array]",O="[object Int32Array]",R="[object Uint8Array]",U="[object Uint8ClampedArray]",L="[object Uint16Array]",D="[object Uint32Array]",F=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,j=RegExp(V.source),Y=RegExp(W.source),z=/<%-([\s\S]+?)%>/g,G=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,_=RegExp(Z.source),$=/^\s+/,ee=/\s/,te=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ne=/\{\n\/\* \[wrapped with (.+)\] \*/,re=/,? & /,oe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ie=/[()=,{}\[\]\/\s]/,ae=/\\(\\)?/g,se=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ce=/\w*$/,ue=/^[-+]0x[0-9a-f]+$/i,le=/^0b[01]+$/i,fe=/^\[object .+?Constructor\]$/,de=/^0o[0-7]+$/i,he=/^(?:0|[1-9]\d*)$/,pe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,me=/($^)/,we=/['\n\r\u2028\u2029\\]/g,ge="\\ud800-\\udfff",ye="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",be="\\u2700-\\u27bf",ve="a-z\\xdf-\\xf6\\xf8-\\xff",Ae="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\ufe0e\\ufe0f",Te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="["+ge+"]",xe="["+Te+"]",Ce="["+ye+"]",Ie="\\d+",Se="["+be+"]",Ne="["+ve+"]",Be="[^"+ge+Te+Ie+be+ve+Ae+"]",Me="\\ud83c[\\udffb-\\udfff]",Pe="[^"+ge+"]",Oe="(?:\\ud83c[\\udde6-\\uddff]){2}",Re="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Ae+"]",Le="\\u200d",De="(?:"+Ne+"|"+Be+")",Fe="(?:"+Ue+"|"+Be+")",qe="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ve="(?:"+Ce+"|"+Me+")?",We="["+ke+"]?",je=We+Ve+"(?:"+Le+"(?:"+[Pe,Oe,Re].join("|")+")"+We+Ve+")*",Ye="(?:"+[Se,Oe,Re].join("|")+")"+je,ze="(?:"+[Pe+Ce+"?",Ce,Oe,Re,Ee].join("|")+")",Ge=RegExp("['’]","g"),Je=RegExp(Ce,"g"),Xe=RegExp(Me+"(?="+Me+")|"+ze+je,"g"),Ke=RegExp([Ue+"?"+Ne+"+"+qe+"(?="+[xe,Ue,"$"].join("|")+")",Fe+"+"+He+"(?="+[xe,Ue+De,"$"].join("|")+")",Ue+"?"+De+"+"+qe,Ue+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Ye].join("|"),"g"),Qe=RegExp("["+Le+ge+ye+ke+"]"),Ze=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_e=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],$e=-1,et={};et[N]=et[B]=et[M]=et[P]=et[O]=et[R]=et[U]=et[L]=et[D]=!0,et[f]=et[d]=et[I]=et[h]=et[S]=et[p]=et[m]=et[w]=et[y]=et[b]=et[v]=et[k]=et[T]=et[E]=et[C]=!1;var tt={};tt[f]=tt[d]=tt[I]=tt[S]=tt[h]=tt[p]=tt[N]=tt[B]=tt[M]=tt[P]=tt[O]=tt[y]=tt[b]=tt[v]=tt[k]=tt[T]=tt[E]=tt[x]=tt[R]=tt[U]=tt[L]=tt[D]=!0,tt[m]=tt[w]=tt[C]=!1;var nt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rt=parseFloat,ot=parseInt,it="object"==typeof Lo&&Lo&&Lo.Object===Object&&Lo,at="object"==typeof self&&self&&self.Object===Object&&self,st=it||at||Function("return this")(),ct=$h&&!$h.nodeType&&$h,ut=ct&&_h&&!_h.nodeType&&_h,lt=ut&&ut.exports===ct,ft=lt&&it.process,dt=function(){try{return ut&&ut.require&&ut.require("util").types||ft&&ft.binding&&ft.binding("util")}catch(e){}}(),ht=dt&&dt.isArrayBuffer,pt=dt&&dt.isDate,mt=dt&&dt.isMap,wt=dt&&dt.isRegExp,gt=dt&&dt.isSet,yt=dt&&dt.isTypedArray;function bt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function vt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function kt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Et(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function xt(e,t){return!(null==e||!e.length)&&Ut(e,t,0)>-1}function Ct(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function It(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function St(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Nt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Bt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Mt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Pt=qt("length");function Ot(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function Rt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Ut(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Rt(e,Dt,n)}function Lt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Dt(e){return e!=e}function Ft(e,t){var n=null==e?0:e.length;return n?Wt(e,t)/n:c}function qt(t){return function(n){return null==n?e:n[t]}}function Ht(t){return function(n){return null==t?e:t[n]}}function Vt(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function Wt(t,n){for(var r,o=-1,i=t.length;++o<i;){var a=n(t[o]);a!==e&&(r=r===e?a:r+a)}return r}function jt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Yt(e){return e?e.slice(0,sn(e)+1).replace($,""):e}function zt(e){return function(t){return e(t)}}function Gt(e,t){return It(t,function(t){return e[t]})}function Jt(e,t){return e.has(t)}function Xt(e,t){for(var n=-1,r=e.length;++n<r&&Ut(t,e[n],0)>-1;);return n}function Kt(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var Qt=Ht({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Zt=Ht({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function _t(e){return"\\"+nt[e]}function $t(e){return Qe.test(e)}function en(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function tn(e,t){return function(n){return e(t(n))}}function nn(e,t){for(var n=-1,o=e.length,i=0,a=[];++n<o;){var s=e[n];s!==t&&s!==r||(e[n]=r,a[i++]=n)}return a}function rn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function on(e){return $t(e)?function(e){for(var t=Xe.lastIndex=0;Xe.test(e);)++t;return t}(e):Pt(e)}function an(e){return $t(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.split("")}(e)}function sn(e){for(var t=e.length;t--&&ee.test(e.charAt(t)););return t}var cn=Ht({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),un=function ee(ge){var ye,be=(ge=null==ge?st:un.defaults(st.Object(),ge,un.pick(st,_e))).Array,ve=ge.Date,Ae=ge.Error,ke=ge.Function,Te=ge.Math,Ee=ge.Object,xe=ge.RegExp,Ce=ge.String,Ie=ge.TypeError,Se=be.prototype,Ne=ke.prototype,Be=Ee.prototype,Me=ge["Ce"],Pe=Ne.toString,Oe=Be.hasOwnProperty,Re=0,Ue=(ye=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(src)_1."+ye:"",Le=Be.toString,De=Pe.call(Ee),Fe=st.Se,qe=xe("^"+Pe.call(Oe).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=lt?ge.Buffer:e,Ve=ge.Symbol,We=ge.Uint8Array,je=He?He.allocUnsafe:e,Ye=tn(Ee.getPrototypeOf,Ee),ze=Ee.create,Xe=Be.propertyIsEnumerable,Qe=Se.splice,nt=Ve?Ve.isConcatSpreadable:e,it=Ve?Ve.iterator:e,at=Ve?Ve.toStringTag:e,ct=function(){try{var e=ci(Ee,"defineProperty");return e({},"",{}),e}catch(t){}}(),ut=ge.clearTimeout!==st.clearTimeout&&ge.clearTimeout,ft=ve&&ve.now!==st.Date.now&&ve.now,dt=ge.setTimeout!==st.setTimeout&&ge.setTimeout,Pt=Te.ceil,Ht=Te.floor,ln=Ee.getOwnPropertySymbols,fn=He?He.isBuffer:e,dn=ge.isFinite,hn=Se.join,pn=tn(Ee.keys,Ee),mn=Te.max,wn=Te.min,gn=ve.now,yn=ge.parseInt,bn=Te.random,vn=Se.reverse,An=ci(ge,"DataView"),kn=ci(ge,"Map"),Tn=ci(ge,"Promise"),En=ci(ge,"Set"),xn=ci(ge,"WeakMap"),Cn=ci(Ee,"create"),In=xn&&new xn,Sn={},Nn=Di(An),Bn=Di(kn),Mn=Di(Tn),Pn=Di(En),On=Di(xn),Rn=Ve?Ve.prototype:e,Un=Rn?Rn.valueOf:e,Ln=Rn?Rn.toString:e;function Dn(e){if(es(e)&&!ja(e)&&!(e instanceof Vn)){if(e instanceof Hn)return e;if(Oe.call(e,"__wrapped__"))return Fi(e)}return new Hn(e)}var Fn=/* @__PURE__ */function(){function t(){}return function(n){if(!$a(n))return{};if(ze)return ze(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function qn(){}function Hn(t,n){this.Ne=t,this.Be=[],this.Me=!!n,this.Pe=0,this.Oe=e}function Vn(e){this.Ne=e,this.Be=[],this.Re=1,this.Ue=!1,this.Le=[],this.De=u,this.Fe=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function jn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.qe=new Yn;++t<n;)this.add(e[t])}function Gn(e){var t=this.qe=new jn(e);this.size=t.size}function Jn(e,t){var n=ja(e),r=!n&&Wa(e),o=!n&&!r&&Ja(e),i=!n&&!r&&!o&&cs(e),a=n||r||o||i,s=a?jt(e.length,Ce):[],c=s.length;for(var u in e)!t&&!Oe.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||mi(u,c))||s.push(u);return s}function Xn(t){var n=t.length;return n?t[Yr(0,n-1)]:e}function Kn(e,t){return Mi(Co(e),or(t,0,e.length))}function Qn(e){return Mi(Co(e))}function Zn(t,n,r){(r!==e&&!qa(t[n],r)||r===e&&!(n in t))&&nr(t,n,r)}function _n(t,n,r){var o=t[n];Oe.call(t,n)&&qa(o,r)&&(r!==e||n in t)||nr(t,n,r)}function $n(e,t){for(var n=e.length;n--;)if(qa(e[n][0],t))return n;return-1}function er(e,t,n,r){return ur(e,function(e,o,i){t(r,e,n(e),i)}),r}function tr(e,t){return e&&Io(t,Bs(t),e)}function nr(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function rr(t,n){for(var r=-1,o=n.length,i=be(o),a=null==t;++r<o;)i[r]=a?e:xs(t,n[r]);return i}function or(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function ir(t,n,r,o,i,a){var s,c=1&n,u=2&n,l=4&n;if(r&&(s=i?r(t,o,i,a):r(t)),s!==e)return s;if(!$a(t))return t;var d=ja(t);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!c)return Co(t,s)}else{var m=fi(t),A=m==w||m==g;if(Ja(t))return vo(t,c);if(m==v||m==f||A&&!i){if(s=u||A?{}:hi(t),!c)return u?function(e,t){return Io(e,li(e),t)}(t,function(e,t){return e&&Io(t,Ms(t),e)}(s,t)):function(e,t){return Io(e,ui(e),t)}(t,tr(s,t))}else{if(!tt[m])return i?t:{};s=function(e,t,n){var r,o=e.constructor;switch(t){case I:return Ao(e);case h:case p:return new o(+e);case S:return function(e,t){var n=t?Ao(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case B:case M:case P:case O:case R:case U:case L:case D:return ko(e,n);case y:return new o;case b:case E:return new o(e);case k:return function(e){var t=new e.constructor(e.source,ce.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new o;case x:return r=e,Un?Ee(Un.call(r)):{}}}(t,m,c)}}a||(a=new Gn);var C=a.get(t);if(C)return C;a.set(t,s),is(t)?t.forEach(function(e){s.add(ir(e,n,r,e,t,a))}):ts(t)&&t.forEach(function(e,o){s.set(o,ir(e,n,r,o,t,a))});var F=d?e:(l?u?ti:ei:u?Ms:Bs)(t);return At(F||t,function(e,o){F&&(e=t[o=e]),_n(s,o,ir(e,n,r,o,t,a))}),s}function ar(t,n,r){var o=r.length;if(null==t)return!o;for(t=Ee(t);o--;){var i=r[o],a=n[i],s=t[i];if(s===e&&!(i in t)||!a(s))return!1}return!0}function sr(n,r,o){if("function"!=typeof n)throw new Ie(t);return Ii(function(){n.apply(e,o)},r)}function cr(e,t,n,r){var o=-1,i=xt,a=!0,s=e.length,c=[],u=t.length;if(!s)return c;n&&(t=It(t,zt(n))),r?(i=Ct,a=!1):t.length>=200&&(i=Jt,a=!1,t=new zn(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var d=u;d--;)if(t[d]===f)continue e;c.push(l)}else i(t,f,r)||c.push(l)}return c}Dn.templateSettings={escape:z,evaluate:G,interpolate:J,variable:"",imports:{Se:Dn}},Dn.prototype=qn.prototype,Dn.prototype.constructor=Dn,Hn.prototype=Fn(qn.prototype),Hn.prototype.constructor=Hn,Vn.prototype=Fn(qn.prototype),Vn.prototype.constructor=Vn,Wn.prototype.clear=function(){this.qe=Cn?Cn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.qe[e];return this.size-=t?1:0,t},Wn.prototype.get=function(t){var r=this.qe;if(Cn){var o=r[t];return o===n?e:o}return Oe.call(r,t)?r[t]:e},Wn.prototype.has=function(t){var n=this.qe;return Cn?n[t]!==e:Oe.call(n,t)},Wn.prototype.set=function(t,r){var o=this.qe;return this.size+=this.has(t)?0:1,o[t]=Cn&&r===e?n:r,this},jn.prototype.clear=function(){this.qe=[],this.size=0},jn.prototype.delete=function(e){var t=this.qe,n=$n(t,e);return!(n<0||(n==t.length-1?t.pop():Qe.call(t,n,1),--this.size,0))},jn.prototype.get=function(t){var n=this.qe,r=$n(n,t);return r<0?e:n[r][1]},jn.prototype.has=function(e){return $n(this.qe,e)>-1},jn.prototype.set=function(e,t){var n=this.qe,r=$n(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Yn.prototype.clear=function(){this.size=0,this.qe={hash:new Wn,map:new(kn||jn),string:new Wn}},Yn.prototype.delete=function(e){var t=ai(this,e).delete(e);return this.size-=t?1:0,t},Yn.prototype.get=function(e){return ai(this,e).get(e)},Yn.prototype.has=function(e){return ai(this,e).has(e)},Yn.prototype.set=function(e,t){var n=ai(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},zn.prototype.add=zn.prototype.push=function(e){return this.qe.set(e,n),this},zn.prototype.has=function(e){return this.qe.has(e)},Gn.prototype.clear=function(){this.qe=new jn,this.size=0},Gn.prototype.delete=function(e){var t=this.qe,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.qe.get(e)},Gn.prototype.has=function(e){return this.qe.has(e)},Gn.prototype.set=function(e,t){var n=this.qe;if(n instanceof jn){var r=n.qe;if(!kn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.qe=new Yn(r)}return n.set(e,t),this.size=n.size,this};var ur=Bo(gr),lr=Bo(yr,!0);function fr(e,t){var n=!0;return ur(e,function(e,r,o){return n=!!t(e,r,o)}),n}function dr(t,n,r){for(var o=-1,i=t.length;++o<i;){var a=t[o],s=n(a);if(null!=s&&(c===e?s==s&&!ss(s):r(s,c)))var c=s,u=a}return u}function hr(e,t){var n=[];return ur(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function pr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=pi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?pr(s,t-1,n,r,o):St(o,s):r||(o[o.length]=s)}return o}var mr=Mo(),wr=Mo(!0);function gr(e,t){return e&&mr(e,t,Bs)}function yr(e,t){return e&&wr(e,t,Bs)}function br(e,t){return Et(t,function(t){return Qa(e[t])})}function vr(t,n){for(var r=0,o=(n=wo(n,t)).length;null!=t&&r<o;)t=t[Li(n[r++])];return r&&r==o?t:e}function Ar(e,t,n){var r=t(e);return ja(e)?r:St(r,n(e))}function kr(t){return null==t?t===e?"[object Undefined]":"[object Null]":at&&at in Ee(t)?function(t){var n=Oe.call(t,at),r=t[at];try{t[at]=e;var o=!0}catch(a){}var i=Le.call(t);return o&&(n?t[at]=r:delete t[at]),i}(t):function(e){return Le.call(e)}(t)}function Tr(e,t){return e>t}function Er(e,t){return null!=e&&Oe.call(e,t)}function xr(e,t){return null!=e&&t in Ee(e)}function Cr(t,n,r){for(var o=r?Ct:xt,i=t[0].length,a=t.length,s=a,c=be(a),u=1/0,l=[];s--;){var f=t[s];s&&n&&(f=It(f,zt(n))),u=wn(f.length,u),c[s]=!r&&(n||i>=120&&f.length>=120)?new zn(s&&f):e}f=t[0];var d=-1,h=c[0];e:for(;++d<i&&l.length<u;){var p=f[d],m=n?n(p):p;if(p=r||0!==p?p:0,!(h?Jt(h,m):o(l,m,r))){for(s=a;--s;){var w=c[s];if(!(w?Jt(w,m):o(t[s],m,r)))continue e}h&&h.push(m),l.push(p)}}return l}function Ir(t,n,r){var o=null==(t=Ei(t,n=wo(n,t)))?t:t[Li(Ki(n))];return null==o?e:bt(o,t,r)}function Sr(e){return es(e)&&kr(e)==f}function Nr(t,n,r,o,i){return t===n||(null==t||null==n||!es(t)&&!es(n)?t!=t&&n!=n:function(t,n,r,o,i,a){var s=ja(t),c=ja(n),u=s?d:fi(t),l=c?d:fi(n),w=(u=u==f?v:u)==v,g=(l=l==f?v:l)==v,A=u==l;if(A&&Ja(t)){if(!Ja(n))return!1;s=!0,w=!1}if(A&&!w)return a||(a=new Gn),s||cs(t)?_o(t,n,r,o,i,a):function(e,t,n,r,o,i,a){switch(n){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!i(new We(e),new We(t)));case h:case p:case b:return qa(+e,+t);case m:return e.name==t.name&&e.message==t.message;case k:case E:return e==t+"";case y:var s=en;case T:var c=1&r;if(s||(s=rn),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var l=_o(s(e),s(t),r,o,i,a);return a.delete(e),l;case x:if(Un)return Un.call(e)==Un.call(t)}return!1}(t,n,u,r,o,i,a);if(!(1&r)){var C=w&&Oe.call(t,"__wrapped__"),N=g&&Oe.call(n,"__wrapped__");if(C||N){var B=C?t.value():t,M=N?n.value():n;return a||(a=new Gn),i(B,M,r,o,a)}}return!!A&&(a||(a=new Gn),function(t,n,r,o,i,a){var s=1&r,c=ei(t),u=c.length;if(u!=ei(n).length&&!s)return!1;for(var l=u;l--;){var f=c[l];if(!(s?f in n:Oe.call(n,f)))return!1}var d=a.get(t),h=a.get(n);if(d&&h)return d==n&&h==t;var p=!0;a.set(t,n),a.set(n,t);for(var m=s;++l<u;){var w=t[f=c[l]],g=n[f];if(o)var y=s?o(g,w,f,n,t,a):o(w,g,f,t,n,a);if(!(y===e?w===g||i(w,g,r,o,a):y)){p=!1;break}m||(m="constructor"==f)}if(p&&!m){var b=t.constructor,v=n.constructor;b==v||!("constructor"in t)||!("constructor"in n)||"function"==typeof b&&b instanceof b&&"function"==typeof v&&v instanceof v||(p=!1)}return a.delete(t),a.delete(n),p}(t,n,r,o,i,a))}(t,n,r,o,Nr,i))}function Br(t,n,r,o){var i=r.length,a=i,s=!o;if(null==t)return!a;for(t=Ee(t);i--;){var c=r[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=r[i])[0],l=t[u],f=c[1];if(s&&c[2]){if(l===e&&!(u in t))return!1}else{var d=new Gn;if(o)var h=o(l,f,u,t,n,d);if(!(h===e?Nr(f,l,3,o,d):h))return!1}}return!0}function Mr(e){return!(!$a(e)||(t=e,Ue&&Ue in t))&&(Qa(e)?qe:fe).test(Di(e));var t}function Pr(e){return"function"==typeof e?e:null==e?nc:"object"==typeof e?ja(e)?Dr(e[0],e[1]):Lr(e):fc(e)}function Or(e){if(!vi(e))return pn(e);var t=[];for(var n in Ee(e))Oe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Rr(e,t){return e<t}function Ur(e,t){var n=-1,r=za(e)?be(e.length):[];return ur(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function Lr(e){var t=si(e);return 1==t.length&&t[0][2]?ki(t[0][0],t[0][1]):function(n){return n===e||Br(n,e,t)}}function Dr(t,n){return gi(t)&&Ai(n)?ki(Li(t),n):function(r){var o=xs(r,t);return o===e&&o===n?Cs(r,t):Nr(n,o,3)}}function Fr(t,n,r,o,i){t!==n&&mr(n,function(a,s){if(i||(i=new Gn),$a(a))!function(t,n,r,o,i,a,s){var c=xi(t,r),u=xi(n,r),l=s.get(u);if(l)Zn(t,r,l);else{var f=a?a(c,u,r+"",t,n,s):e,d=f===e;if(d){var h=ja(u),p=!h&&Ja(u),m=!h&&!p&&cs(u);f=u,h||p||m?ja(c)?f=c:Ga(c)?f=Co(c):p?(d=!1,f=vo(u,!0)):m?(d=!1,f=ko(u,!0)):f=[]:rs(u)||Wa(u)?(f=c,Wa(c)?f=ws(c):$a(c)&&!Qa(c)||(f=hi(u))):d=!1}d&&(s.set(u,f),i(f,u,o,a,s),s.delete(u)),Zn(t,r,f)}}(t,n,s,r,Fr,o,i);else{var c=o?o(xi(t,s),a,s+"",t,n,i):e;c===e&&(c=a),Zn(t,s,c)}},Ms)}function qr(t,n){var r=t.length;if(r)return mi(n+=n<0?r:0,r)?t[n]:e}function Hr(e,t,n){t=t.length?It(t,function(e){return ja(e)?function(t){return vr(t,1===e.length?e[0]:e)}:e}):[nc];var r=-1;return t=It(t,zt(ii())),function(e){var t=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var c=To(o[r],i[r]);if(c)return r>=s?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(Ur(e,function(e,n,o){return{criteria:It(t,function(t){return t(e)}),index:++r,value:e}}))}function Vr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=vr(e,a);n(s,a)&&Kr(i,wo(a,e),s)}return i}function Wr(e,t,n,r){var o=r?Lt:Ut,i=-1,a=t.length,s=e;for(e===t&&(t=Co(t)),n&&(s=It(e,zt(n)));++i<a;)for(var c=0,u=t[i],l=n?n(u):u;(c=o(s,l,c,r))>-1;)s!==e&&Qe.call(s,c,1),Qe.call(e,c,1);return e}function jr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;mi(o)?Qe.call(e,o,1):so(e,o)}}return e}function Yr(e,t){return e+Ht(bn()*(t-e+1))}function zr(e,t){var n="";if(!e||t<1||t>s)return n;do{t%2&&(n+=e),(t=Ht(t/2))&&(e+=e)}while(t);return n}function Gr(e,t){return Si(Ti(e,t,nc),e+"")}function Jr(e){return Xn(qs(e))}function Xr(e,t){var n=qs(e);return Mi(n,or(t,0,n.length))}function Kr(t,n,r,o){if(!$a(t))return t;for(var i=-1,a=(n=wo(n,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=Li(n[i]),l=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(i!=s){var f=c[u];(l=o?o(f,u,c):e)===e&&(l=$a(f)?f:mi(n[i+1])?[]:{})}_n(c,u,l),c=c[u]}return t}var Qr=In?function(e,t){return In.set(e,t),e}:nc,Zr=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:$s(t),writable:!0})}:nc;function _r(e){return Mi(qs(e))}function $r(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=be(o);++r<o;)i[r]=e[r+t];return i}function eo(e,t){var n;return ur(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function to(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!ss(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return no(e,t,nc,n)}function no(t,n,r,o){var i=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(n=r(n))!=n,c=null===n,u=ss(n),l=n===e;i<a;){var f=Ht((i+a)/2),d=r(t[f]),h=d!==e,p=null===d,m=d==d,w=ss(d);if(s)var g=o||m;else g=l?m&&(o||h):c?m&&h&&(o||!p):u?m&&h&&!p&&(o||!w):!p&&!w&&(o?d<=n:d<n);g?i=f+1:a=f}return wn(a,4294967294)}function ro(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!qa(s,c)){var c=s;i[o++]=0===a?0:a}}return i}function oo(e){return"number"==typeof e?e:ss(e)?c:+e}function io(e){if("string"==typeof e)return e;if(ja(e))return It(e,io)+"";if(ss(e))return Ln?Ln.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ao(e,t,n){var r=-1,o=xt,i=e.length,a=!0,s=[],c=s;if(n)a=!1,o=Ct;else if(i>=200){var u=t?null:Go(e);if(u)return rn(u);a=!1,o=Jt,c=new zn}else c=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var d=c.length;d--;)if(c[d]===f)continue e;t&&c.push(f),s.push(l)}else o(c,f,n)||(c!==s&&c.push(f),s.push(l))}return s}function so(e,t){var n=-1,r=(t=wo(t,e)).length;if(!r)return!0;for(var o=null==e||"object"!=typeof e&&"function"!=typeof e;++n<r;){var i=t[n];if("string"==typeof i){if("__proto__"===i&&!Oe.call(e,"__proto__"))return!1;if("constructor"===i&&n+1<r&&"string"==typeof t[n+1]&&"prototype"===t[n+1]){if(o&&0===n)continue;return!1}}}var a=Ei(e,t);return null==a||delete a[Li(Ki(t))]}function co(e,t,n,r){return Kr(e,t,n(vr(e,t)),r)}function uo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?$r(e,r?0:i,r?i+1:o):$r(e,r?i+1:0,r?o:i)}function lo(e,t){var n=e;return n instanceof Vn&&(n=n.value()),Nt(t,function(e,t){return t.func.apply(t.thisArg,St([e],t.args))},n)}function fo(e,t,n){var r=e.length;if(r<2)return r?ao(e[0]):[];for(var o=-1,i=be(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=cr(i[o]||a,e[s],t,n));return ao(pr(i,1),t,n)}function ho(t,n,r){for(var o=-1,i=t.length,a=n.length,s={};++o<i;){var c=o<a?n[o]:e;r(s,t[o],c)}return s}function po(e){return Ga(e)?e:[]}function mo(e){return"function"==typeof e?e:nc}function wo(e,t){return ja(e)?e:gi(e,t)?[e]:Ui(gs(e))}var go=Gr;function yo(t,n,r){var o=t.length;return r=r===e?o:r,!n&&r>=o?t:$r(t,n,r)}var bo=ut||function(e){return st.clearTimeout(e)};function vo(e,t){if(t)return e.slice();var n=e.length,r=je?je(n):new e.constructor(n);return e.copy(r),r}function Ao(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function ko(e,t){var n=t?Ao(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function To(t,n){if(t!==n){var r=t!==e,o=null===t,i=t==t,a=ss(t),s=n!==e,c=null===n,u=n==n,l=ss(n);if(!c&&!l&&!a&&t>n||a&&s&&u&&!c&&!l||o&&s&&u||!r&&u||!i)return 1;if(!o&&!a&&!l&&t<n||l&&r&&i&&!o&&!a||c&&r&&i||!s&&i||!u)return-1}return 0}function Eo(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,c=t.length,u=mn(i-a,0),l=be(c+u),f=!r;++s<c;)l[s]=t[s];for(;++o<a;)(f||o<i)&&(l[n[o]]=e[o]);for(;u--;)l[s++]=e[o++];return l}function xo(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,c=-1,u=t.length,l=mn(i-s,0),f=be(l+u),d=!r;++o<l;)f[o]=e[o];for(var h=o;++c<u;)f[h+c]=t[c];for(;++a<s;)(d||o<i)&&(f[h+n[a]]=e[o++]);return f}function Co(e,t){var n=-1,r=e.length;for(t||(t=be(r));++n<r;)t[n]=e[n];return t}function Io(t,n,r,o){var i=!r;r||(r={});for(var a=-1,s=n.length;++a<s;){var c=n[a],u=o?o(r[c],t[c],c,r,t):e;u===e&&(u=t[c]),i?nr(r,c,u):_n(r,c,u)}return r}function So(e,t){return function(n,r){var o=ja(n)?vt:er,i=t?t():{};return o(n,e,ii(r,2),i)}}function No(t){return Gr(function(n,r){var o=-1,i=r.length,a=i>1?r[i-1]:e,s=i>2?r[2]:e;for(a=t.length>3&&"function"==typeof a?(i--,a):e,s&&wi(r[0],r[1],s)&&(a=i<3?e:a,i=1),n=Ee(n);++o<i;){var c=r[o];c&&t(n,c,o,a)}return n})}function Bo(e,t){return function(n,r){if(null==n)return n;if(!za(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ee(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Mo(e){return function(t,n,r){for(var o=-1,i=Ee(t),a=r(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===n(i[c],c,i))break}return t}}function Po(t){return function(n){var r=$t(n=gs(n))?an(n):e,o=r?r[0]:n.charAt(0),i=r?yo(r,1).join(""):n.slice(1);return o[t]()+i}}function Oo(e){return function(t){return Nt(Qs(Ws(t).replace(Ge,"")),e,"")}}function Ro(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return $a(r)?r:n}}function Uo(t){return function(n,r,o){var i=Ee(n);if(!za(n)){var a=ii(r,3);n=Bs(n),r=function(e){return a(i[e],e,i)}}var s=t(n,r,o);return s>-1?i[a?n[s]:s]:e}}function Lo(n){return $o(function(r){var o=r.length,i=o,a=Hn.prototype.thru;for(n&&r.reverse();i--;){var s=r[i];if("function"!=typeof s)throw new Ie(t);if(a&&!c&&"wrapper"==ri(s))var c=new Hn([],!0)}for(i=c?i:o;++i<o;){var u=ri(s=r[i]),l="wrapper"==u?ni(s):e;c=l&&yi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[ri(l[0])].apply(c,l[3]):1==s.length&&yi(s)?c[u]():c.thru(s)}return function(){var e=arguments,t=e[0];if(c&&1==e.length&&ja(t))return c.plant(t).value();for(var n=0,i=o?r[n].apply(this,e):t;++n<o;)i=r[n].call(this,i);return i}})}function Do(t,n,r,o,a,s,c,u,l,f){var d=n&i,h=1&n,p=2&n,m=24&n,w=512&n,g=p?e:Ro(t);return function i(){for(var y=arguments.length,b=be(y),v=y;v--;)b[v]=arguments[v];if(m)var A=oi(i),k=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,A);if(o&&(b=Eo(b,o,a,m)),s&&(b=xo(b,s,c,m)),y-=k,m&&y<f){var T=nn(b,A);return Yo(t,n,Do,i.placeholder,r,b,T,u,l,f-y)}var E=h?r:this,x=p?E[t]:t;return y=b.length,u?b=function(t,n){for(var r=t.length,o=wn(n.length,r),i=Co(t);o--;){var a=n[o];t[o]=mi(a,r)?i[a]:e}return t}(b,u):w&&y>1&&b.reverse(),d&&l<y&&(b.length=l),this&&this!==st&&this instanceof i&&(x=g||Ro(x)),x.apply(E,b)}}function Fo(e,t){return function(n,r){return function(e,t,n,r){return gr(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}function qo(t,n){return function(r,o){var i;if(r===e&&o===e)return n;if(r!==e&&(i=r),o!==e){if(i===e)return o;"string"==typeof r||"string"==typeof o?(r=io(r),o=io(o)):(r=oo(r),o=oo(o)),i=t(r,o)}return i}}function Ho(e){return $o(function(t){return t=It(t,zt(ii())),Gr(function(n){var r=this;return e(t,function(e){return bt(e,r,n)})})})}function Vo(t,n){var r=(n=n===e?" ":io(n)).length;if(r<2)return r?zr(n,t):n;var o=zr(n,Pt(t/on(n)));return $t(n)?yo(an(o),0,t).join(""):o.slice(0,t)}function Wo(t){return function(n,r,o){return o&&"number"!=typeof o&&wi(n,r,o)&&(r=o=e),n=ds(n),r===e?(r=n,n=0):r=ds(r),function(e,t,n,r){for(var o=-1,i=mn(Pt((t-e)/(n||1)),0),a=be(i);i--;)a[r?i:++o]=e,e+=n;return a}(n,r,o=o===e?n<r?1:-1:ds(o),t)}}function jo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function Yo(t,n,r,i,a,s,c,u,l,f){var d=8&n;n|=d?o:64,4&(n&=~(d?64:o))||(n&=-4);var h=[t,n,a,d?s:e,d?c:e,d?e:s,d?e:c,u,l,f],p=r.apply(e,h);return yi(t)&&Ci(p,h),p.placeholder=i,Ni(p,t,n)}function zo(e){var t=Te[e];return function(e,n){if(e=ms(e),(n=null==n?0:wn(hs(n),292))&&dn(e)){var r=(gs(e)+"e").split("e");return+((r=(gs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Go=En&&1/rn(new En([,-0]))[1]==a?function(e){return new En(e)}:sc;function Jo(e){return function(t){var n,r,o,i=fi(t);return i==y?en(t):i==T?(n=t,r=-1,o=Array(n.size),n.forEach(function(e){o[++r]=[e,e]}),o):function(e,t){return It(t,function(t){return[t,e[t]]})}(t,e(t))}}function Xo(n,a,s,c,u,l,f,d){var h=2&a;if(!h&&"function"!=typeof n)throw new Ie(t);var p=c?c.length:0;if(p||(a&=-97,c=u=e),f=f===e?f:mn(hs(f),0),d=d===e?d:hs(d),p-=u?u.length:0,64&a){var m=c,w=u;c=u=e}var g=h?e:ni(n),y=[n,a,s,c,u,m,w,l,f,d];if(g&&function(e,t){var n=e[1],o=t[1],a=n|o,s=a<131,c=o==i&&8==n||o==i&&256==n&&e[7].length<=t[8]||384==o&&t[7].length<=t[8]&&8==n;if(!s&&!c)return e;1&o&&(e[2]=t[2],a|=1&n?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Eo(l,u,t[4]):u,e[4]=l?nn(e[3],r):t[4]}(u=t[5])&&(l=e[5],e[5]=l?xo(l,u,t[6]):u,e[6]=l?nn(e[5],r):t[6]),(u=t[7])&&(e[7]=u),o&i&&(e[8]=null==e[8]?t[8]:wn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=a}(y,g),n=y[0],a=y[1],s=y[2],c=y[3],u=y[4],!(d=y[9]=y[9]===e?h?0:n.length:mn(y[9]-p,0))&&24&a&&(a&=-25),a&&1!=a)b=8==a||16==a?function(t,n,r){var o=Ro(t);return function i(){for(var a=arguments.length,s=be(a),c=a,u=oi(i);c--;)s[c]=arguments[c];var l=a<3&&s[0]!==u&&s[a-1]!==u?[]:nn(s,u);return(a-=l.length)<r?Yo(t,n,Do,i.placeholder,e,s,l,e,e,r-a):bt(this&&this!==st&&this instanceof i?o:t,this,s)}}(n,a,d):a!=o&&33!=a||u.length?Do.apply(e,y):function(e,t,n,r){var o=1&t,i=Ro(e);return function t(){for(var a=-1,s=arguments.length,c=-1,u=r.length,l=be(u+s),f=this&&this!==st&&this instanceof t?i:e;++c<u;)l[c]=r[c];for(;s--;)l[c++]=arguments[++a];return bt(f,o?n:this,l)}}(n,a,s,c);else var b=function(e,t,n){var r=1&t,o=Ro(e);return function t(){return(this&&this!==st&&this instanceof t?o:e).apply(r?n:this,arguments)}}(n,a,s);return Ni((g?Qr:Ci)(b,y),n,a)}function Ko(t,n,r,o){return t===e||qa(t,Be[r])&&!Oe.call(o,r)?n:t}function Qo(t,n,r,o,i,a){return $a(t)&&$a(n)&&(a.set(n,t),Fr(t,n,e,Qo,a),a.delete(n)),t}function Zo(t){return rs(t)?e:t}function _o(t,n,r,o,i,a){var s=1&r,c=t.length,u=n.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t),f=a.get(n);if(l&&f)return l==n&&f==t;var d=-1,h=!0,p=2&r?new zn:e;for(a.set(t,n),a.set(n,t);++d<c;){var m=t[d],w=n[d];if(o)var g=s?o(w,m,d,n,t,a):o(m,w,d,t,n,a);if(g!==e){if(g)continue;h=!1;break}if(p){if(!Mt(n,function(e,t){if(!Jt(p,t)&&(m===e||i(m,e,r,o,a)))return p.push(t)})){h=!1;break}}else if(m!==w&&!i(m,w,r,o,a)){h=!1;break}}return a.delete(t),a.delete(n),h}function $o(t){return Si(Ti(t,e,Yi),t+"")}function ei(e){return Ar(e,Bs,ui)}function ti(e){return Ar(e,Ms,li)}var ni=In?function(e){return In.get(e)}:sc;function ri(e){for(var t=e.name+"",n=Sn[t],r=Oe.call(Sn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function oi(e){return(Oe.call(Dn,"placeholder")?Dn:e).placeholder}function ii(){var e=Dn.iteratee||rc;return e=e===rc?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function ai(e,t){var n,r,o=e.qe;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function si(e){for(var t=Bs(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Ai(o)]}return t}function ci(t,n){var r=function(t,n){return null==t?e:t[n]}(t,n);return Mr(r)?r:e}var ui=ln?function(e){return null==e?[]:(e=Ee(e),Et(ln(e),function(t){return Xe.call(e,t)}))}:pc,li=ln?function(e){for(var t=[];e;)St(t,ui(e)),e=Ye(e);return t}:pc,fi=kr;function di(e,t,n){for(var r=-1,o=(t=wo(t,e)).length,i=!1;++r<o;){var a=Li(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&_a(o)&&mi(a,o)&&(ja(e)||Wa(e))}function hi(e){return"function"!=typeof e.constructor||vi(e)?{}:Fn(Ye(e))}function pi(e){return ja(e)||Wa(e)||!!(nt&&e&&e[nt])}function mi(e,t){var n=typeof e;return!!(t=null==t?s:t)&&("number"==n||"symbol"!=n&&he.test(e))&&e>-1&&e%1==0&&e<t}function wi(e,t,n){if(!$a(n))return!1;var r=typeof t;return!!("number"==r?za(n)&&mi(t,n.length):"string"==r&&t in n)&&qa(n[t],e)}function gi(e,t){if(ja(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||K.test(e)||!X.test(e)||null!=t&&e in Ee(t)}function yi(e){var t=ri(e),n=Dn[t];if("function"!=typeof n||!(t in Vn.prototype))return!1;if(e===n)return!0;var r=ni(n);return!!r&&e===r[0]}(An&&fi(new An(new ArrayBuffer(1)))!=S||kn&&fi(new kn)!=y||Tn&&fi(Tn.resolve())!=A||En&&fi(new En)!=T||xn&&fi(new xn)!=C)&&(fi=function(t){var n=kr(t),r=n==v?t.constructor:e,o=r?Di(r):"";if(o)switch(o){case Nn:return S;case Bn:return y;case Mn:return A;case Pn:return T;case On:return C}return n});var bi=Me?Qa:mc;function vi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Be)}function Ai(e){return e==e&&!$a(e)}function ki(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in Ee(r))}}function Ti(t,n,r){return n=mn(n===e?t.length-1:n,0),function(){for(var e=arguments,o=-1,i=mn(e.length-n,0),a=be(i);++o<i;)a[o]=e[n+o];o=-1;for(var s=be(n+1);++o<n;)s[o]=e[o];return s[n]=r(a),bt(t,this,s)}}function Ei(e,t){return t.length<2?e:vr(e,$r(t,0,-1))}function xi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ci=Bi(Qr),Ii=dt||function(e,t){return st.setTimeout(e,t)},Si=Bi(Zr);function Ni(e,t,n){var r=t+"";return Si(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(te,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return At(l,function(n){var r="_."+n[0];t&n[1]&&!xt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ne);return t?t[1].split(re):[]}(r),n)))}function Bi(t){var n=0,r=0;return function(){var o=gn(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Mi(t,n){var r=-1,o=t.length,i=o-1;for(n=n===e?o:n;++r<n;){var a=Yr(r,i),s=t[a];t[a]=t[r],t[r]=s}return t.length=n,t}var Pi,Oi,Ri,Ui=(Pi=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,n,r,o){t.push(r?o.replace(ae,"$1"):n||e)}),t},Oi=Oa(Pi,function(e){return 500===Ri.size&&Ri.clear(),e}),Ri=Oi.cache,Oi);function Li(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Di(e){if(null!=e){try{return Pe.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Fi(e){if(e instanceof Vn)return e.clone();var t=new Hn(e.Ne,e.Me);return t.Be=Co(e.Be),t.Pe=e.Pe,t.Oe=e.Oe,t}var qi=Gr(function(e,t){return Ga(e)?cr(e,pr(t,1,Ga,!0)):[]}),Hi=Gr(function(t,n){var r=Ki(n);return Ga(r)&&(r=e),Ga(t)?cr(t,pr(n,1,Ga,!0),ii(r,2)):[]}),Vi=Gr(function(t,n){var r=Ki(n);return Ga(r)&&(r=e),Ga(t)?cr(t,pr(n,1,Ga,!0),e,r):[]});function Wi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=mn(r+o,0)),Rt(e,ii(t,3),o)}function ji(t,n,r){var o=null==t?0:t.length;if(!o)return-1;var i=o-1;return r!==e&&(i=hs(r),i=r<0?mn(o+i,0):wn(i,o-1)),Rt(t,ii(n,3),i,!0)}function Yi(e){return null!=e&&e.length?pr(e,1):[]}function zi(t){return t&&t.length?t[0]:e}var Gi=Gr(function(e){var t=It(e,po);return t.length&&t[0]===e[0]?Cr(t):[]}),Ji=Gr(function(t){var n=Ki(t),r=It(t,po);return n===Ki(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Cr(r,ii(n,2)):[]}),Xi=Gr(function(t){var n=Ki(t),r=It(t,po);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Cr(r,e,n):[]});function Ki(t){var n=null==t?0:t.length;return n?t[n-1]:e}var Qi=Gr(Zi);function Zi(e,t){return e&&e.length&&t&&t.length?Wr(e,t):e}var _i=$o(function(e,t){var n=null==e?0:e.length,r=rr(e,t);return jr(e,It(t,function(e){return mi(e,n)?+e:e}).sort(To)),r});function $i(e){return null==e?e:vn.call(e)}var ea=Gr(function(e){return ao(pr(e,1,Ga,!0))}),ta=Gr(function(t){var n=Ki(t);return Ga(n)&&(n=e),ao(pr(t,1,Ga,!0),ii(n,2))}),na=Gr(function(t){var n=Ki(t);return n="function"==typeof n?n:e,ao(pr(t,1,Ga,!0),e,n)});function ra(e){if(!e||!e.length)return[];var t=0;return e=Et(e,function(e){if(Ga(e))return t=mn(e.length,t),!0}),jt(t,function(t){return It(e,qt(t))})}function oa(t,n){if(!t||!t.length)return[];var r=ra(t);return null==n?r:It(r,function(t){return bt(n,e,t)})}var ia=Gr(function(e,t){return Ga(e)?cr(e,t):[]}),aa=Gr(function(e){return fo(Et(e,Ga))}),sa=Gr(function(t){var n=Ki(t);return Ga(n)&&(n=e),fo(Et(t,Ga),ii(n,2))}),ca=Gr(function(t){var n=Ki(t);return n="function"==typeof n?n:e,fo(Et(t,Ga),e,n)}),ua=Gr(ra),la=Gr(function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,oa(t,r)});function fa(e){var t=Dn(e);return t.Me=!0,t}function da(e,t){return t(e)}var ha=$o(function(t){var n=t.length,r=n?t[0]:0,o=this.Ne,i=function(e){return rr(e,t)};return!(n>1||this.Be.length)&&o instanceof Vn&&mi(r)?((o=o.slice(r,+r+(n?1:0))).Be.push({func:da,args:[i],thisArg:e}),new Hn(o,this.Me).thru(function(t){return n&&!t.length&&t.push(e),t})):this.thru(i)}),pa=So(function(e,t,n){Oe.call(e,n)?++e[n]:nr(e,n,1)}),ma=Uo(Wi),wa=Uo(ji);function ga(e,t){return(ja(e)?At:ur)(e,ii(t,3))}function ya(e,t){return(ja(e)?kt:lr)(e,ii(t,3))}var ba=So(function(e,t,n){Oe.call(e,n)?e[n].push(t):nr(e,n,[t])}),va=Gr(function(e,t,n){var r=-1,o="function"==typeof t,i=za(e)?be(e.length):[];return ur(e,function(e){i[++r]=o?bt(t,e,n):Ir(e,t,n)}),i}),Aa=So(function(e,t,n){nr(e,n,t)});function ka(e,t){return(ja(e)?It:Ur)(e,ii(t,3))}var Ta=So(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Ea=Gr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&wi(e,t[0],t[1])?t=[]:n>2&&wi(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,pr(t,1),[])}),xa=ft||function(){return st.Date.now()};function Ca(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,Xo(t,i,e,e,e,e,n)}function Ia(n,r){var o;if("function"!=typeof r)throw new Ie(t);return n=hs(n),function(){return--n>0&&(o=r.apply(this,arguments)),n<=1&&(r=e),o}}var Sa=Gr(function(e,t,n){var r=1;if(n.length){var i=nn(n,oi(Sa));r|=o}return Xo(e,r,t,n,i)}),Na=Gr(function(e,t,n){var r=3;if(n.length){var i=nn(n,oi(Na));r|=o}return Xo(t,r,e,n,i)});function Ba(n,r,o){var i,a,s,c,u,l,f=0,d=!1,h=!1,p=!0;if("function"!=typeof n)throw new Ie(t);function m(t){var r=i,o=a;return i=a=e,f=t,c=n.apply(o,r)}function w(t){var n=t-l;return l===e||n>=r||n<0||h&&t-f>=s}function g(){var e=xa();if(w(e))return y(e);u=Ii(g,function(e){var t=r-(e-l);return h?wn(t,s-(e-f)):t}(e))}function y(t){return u=e,p&&i?m(t):(i=a=e,c)}function b(){var t=xa(),n=w(t);if(i=arguments,a=this,l=t,n){if(u===e)return function(e){return f=e,u=Ii(g,r),d?m(e):c}(l);if(h)return bo(u),u=Ii(g,r),m(l)}return u===e&&(u=Ii(g,r)),c}return r=ms(r)||0,$a(o)&&(d=!!o.leading,s=(h="maxWait"in o)?mn(ms(o.maxWait)||0,r):s,p="trailing"in o?!!o.trailing:p),b.cancel=function(){u!==e&&bo(u),f=0,i=l=a=u=e},b.flush=function(){return u===e?c:y(xa())},b}var Ma=Gr(function(e,t){return sr(e,1,t)}),Pa=Gr(function(e,t,n){return sr(e,ms(t)||0,n)});function Oa(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new Ie(t);var r=function(){var t=arguments,o=n?n.apply(this,t):t[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,t);return r.cache=i.set(o,a)||i,a};return r.cache=new(Oa.Cache||Yn),r}function Ra(e){if("function"!=typeof e)throw new Ie(t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=Yn;var Ua=go(function(e,t){var n=(t=1==t.length&&ja(t[0])?It(t[0],zt(ii())):It(pr(t,1),zt(ii()))).length;return Gr(function(r){for(var o=-1,i=wn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return bt(e,this,r)})}),La=Gr(function(t,n){var r=nn(n,oi(La));return Xo(t,o,e,n,r)}),Da=Gr(function(t,n){var r=nn(n,oi(Da));return Xo(t,64,e,n,r)}),Fa=$o(function(t,n){return Xo(t,256,e,e,e,n)});function qa(e,t){return e===t||e!=e&&t!=t}var Ha=jo(Tr),Va=jo(function(e,t){return e>=t}),Wa=Sr(/* @__PURE__ */function(){return arguments}())?Sr:function(e){return es(e)&&Oe.call(e,"callee")&&!Xe.call(e,"callee")},ja=be.isArray,Ya=ht?zt(ht):function(e){return es(e)&&kr(e)==I};function za(e){return null!=e&&_a(e.length)&&!Qa(e)}function Ga(e){return es(e)&&za(e)}var Ja=fn||mc,Xa=pt?zt(pt):function(e){return es(e)&&kr(e)==p};function Ka(e){if(!es(e))return!1;var t=kr(e);return t==m||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function Qa(e){if(!$a(e))return!1;var t=kr(e);return t==w||t==g||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==hs(e)}function _a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function $a(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=mt?zt(mt):function(e){return es(e)&&fi(e)==y};function ns(e){return"number"==typeof e||es(e)&&kr(e)==b}function rs(e){if(!es(e)||kr(e)!=v)return!1;var t=Ye(e);if(null===t)return!0;var n=Oe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Pe.call(n)==De}var os=wt?zt(wt):function(e){return es(e)&&kr(e)==k},is=gt?zt(gt):function(e){return es(e)&&fi(e)==T};function as(e){return"string"==typeof e||!ja(e)&&es(e)&&kr(e)==E}function ss(e){return"symbol"==typeof e||es(e)&&kr(e)==x}var cs=yt?zt(yt):function(e){return es(e)&&_a(e.length)&&!!et[kr(e)]},us=jo(Rr),ls=jo(function(e,t){return e<=t});function fs(e){if(!e)return[];if(za(e))return as(e)?an(e):Co(e);if(it&&e[it])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[it]());var t=fi(e);return(t==y?en:t==T?rn:qs)(e)}function ds(e){return e?(e=ms(e))===a||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=ds(e),n=t%1;return t==t?n?t-n:t:0}function ps(e){return e?or(hs(e),0,u):0}function ms(e){if("number"==typeof e)return e;if(ss(e))return c;if($a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=$a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var n=le.test(e);return n||de.test(e)?ot(e.slice(2),n?2:8):ue.test(e)?c:+e}function ws(e){return Io(e,Ms(e))}function gs(e){return null==e?"":io(e)}var ys=No(function(e,t){if(vi(t)||za(t))Io(t,Bs(t),e);else for(var n in t)Oe.call(t,n)&&_n(e,n,t[n])}),bs=No(function(e,t){Io(t,Ms(t),e)}),vs=No(function(e,t,n,r){Io(t,Ms(t),e,r)}),As=No(function(e,t,n,r){Io(t,Bs(t),e,r)}),ks=$o(rr),Ts=Gr(function(t,n){t=Ee(t);var r=-1,o=n.length,i=o>2?n[2]:e;for(i&&wi(n[0],n[1],i)&&(o=1);++r<o;)for(var a=n[r],s=Ms(a),c=-1,u=s.length;++c<u;){var l=s[c],f=t[l];(f===e||qa(f,Be[l])&&!Oe.call(t,l))&&(t[l]=a[l])}return t}),Es=Gr(function(t){return t.push(e,Qo),bt(Os,e,t)});function xs(t,n,r){var o=null==t?e:vr(t,n);return o===e?r:o}function Cs(e,t){return null!=e&&di(e,t,xr)}var Is=Fo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=n},$s(nc)),Ss=Fo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),Oe.call(e,t)?e[t].push(n):e[t]=[n]},ii),Ns=Gr(Ir);function Bs(e){return za(e)?Jn(e):Or(e)}function Ms(e){return za(e)?Jn(e,!0):function(e){if(!$a(e))return function(e){var t=[];if(null!=e)for(var n in Ee(e))t.push(n);return t}(e);var t=vi(e),n=[];for(var r in e)("constructor"!=r||!t&&Oe.call(e,r))&&n.push(r);return n}(e)}var Ps=No(function(e,t,n){Fr(e,t,n)}),Os=No(function(e,t,n,r){Fr(e,t,n,r)}),Rs=$o(function(e,t){var n={};if(null==e)return n;var r=!1;t=It(t,function(t){return t=wo(t,e),r||(r=t.length>1),t}),Io(e,ti(e),n),r&&(n=ir(n,7,Zo));for(var o=t.length;o--;)so(n,t[o]);return n}),Us=$o(function(e,t){return null==e?{}:function(e,t){return Vr(e,t,function(t,n){return Cs(e,n)})}(e,t)});function Ls(e,t){if(null==e)return{};var n=It(ti(e),function(e){return[e]});return t=ii(t),Vr(e,n,function(e,n){return t(e,n[0])})}var Ds=Jo(Bs),Fs=Jo(Ms);function qs(e){return null==e?[]:Gt(e,Bs(e))}var Hs=Oo(function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)});function Vs(e){return Ks(gs(e).toLowerCase())}function Ws(e){return(e=gs(e))&&e.replace(pe,Qt).replace(Je,"")}var js=Oo(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ys=Oo(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),zs=Po("toLowerCase"),Gs=Oo(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Js=Oo(function(e,t,n){return e+(n?" ":"")+Ks(t)}),Xs=Oo(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ks=Po("toUpperCase");function Qs(t,n,r){return t=gs(t),(n=r?e:n)===e?function(e){return Ze.test(e)}(t)?function(e){return e.match(Ke)||[]}(t):function(e){return e.match(oe)||[]}(t):t.match(n)||[]}var Zs=Gr(function(t,n){try{return bt(t,e,n)}catch(r){return Ka(r)?r:new Ae(r)}}),_s=$o(function(e,t){return At(t,function(t){t=Li(t),nr(e,t,Sa(e[t],e))}),e});function $s(e){return function(){return e}}var ec=Lo(),tc=Lo(!0);function nc(e){return e}function rc(e){return Pr("function"==typeof e?e:ir(e,1))}var oc=Gr(function(e,t){return function(n){return Ir(n,e,t)}}),ic=Gr(function(e,t){return function(n){return Ir(e,n,t)}});function ac(e,t,n){var r=Bs(t),o=br(t,r);null!=n||$a(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=br(t,Bs(t)));var i=!($a(n)&&"chain"in n&&!n.chain),a=Qa(e);return At(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.Me;if(i||t){var n=e(this.Ne);return(n.Be=Co(this.Be)).push({func:r,args:arguments,thisArg:e}),n.Me=t,n}return r.apply(e,St([this.value()],arguments))})}),e}function sc(){}var cc=Ho(It),uc=Ho(Tt),lc=Ho(Mt);function fc(e){return gi(e)?qt(Li(e)):function(e){return function(t){return vr(t,e)}}(e)}var dc=Wo(),hc=Wo(!0);function pc(){return[]}function mc(){return!1}var wc,gc=qo(function(e,t){return e+t},0),yc=zo("ceil"),bc=qo(function(e,t){return e/t},1),vc=zo("floor"),Ac=qo(function(e,t){return e*t},1),kc=zo("round"),Tc=qo(function(e,t){return e-t},0);return Dn.after=function(e,n){if("function"!=typeof n)throw new Ie(t);return e=hs(e),function(){if(--e<1)return n.apply(this,arguments)}},Dn.ary=Ca,Dn.assign=ys,Dn.assignIn=bs,Dn.assignInWith=vs,Dn.assignWith=As,Dn.at=ks,Dn.before=Ia,Dn.bind=Sa,Dn.bindAll=_s,Dn.bindKey=Na,Dn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return ja(e)?e:[e]},Dn.chain=fa,Dn.chunk=function(t,n,r){n=(r?wi(t,n,r):n===e)?1:mn(hs(n),0);var o=null==t?0:t.length;if(!o||n<1)return[];for(var i=0,a=0,s=be(Pt(o/n));i<o;)s[a++]=$r(t,i,i+=n);return s},Dn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Dn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=be(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return St(ja(n)?Co(n):[n],pr(t,1))},Dn.cond=function(e){var n=null==e?0:e.length,r=ii();return e=n?It(e,function(e){if("function"!=typeof e[1])throw new Ie(t);return[r(e[0]),e[1]]}):[],Gr(function(t){for(var r=-1;++r<n;){var o=e[r];if(bt(o[0],this,t))return bt(o[1],this,t)}})},Dn.conforms=function(e){return function(e){var t=Bs(e);return function(n){return ar(n,e,t)}}(ir(e,1))},Dn.constant=$s,Dn.countBy=pa,Dn.create=function(e,t){var n=Fn(e);return null==t?n:tr(n,t)},Dn.curry=function t(n,r,o){var i=Xo(n,8,e,e,e,e,e,r=o?e:r);return i.placeholder=t.placeholder,i},Dn.curryRight=function t(n,r,o){var i=Xo(n,16,e,e,e,e,e,r=o?e:r);return i.placeholder=t.placeholder,i},Dn.debounce=Ba,Dn.defaults=Ts,Dn.defaultsDeep=Es,Dn.defer=Ma,Dn.delay=Pa,Dn.difference=qi,Dn.differenceBy=Hi,Dn.differenceWith=Vi,Dn.drop=function(t,n,r){var o=null==t?0:t.length;return o?$r(t,(n=r||n===e?1:hs(n))<0?0:n,o):[]},Dn.dropRight=function(t,n,r){var o=null==t?0:t.length;return o?$r(t,0,(n=o-(n=r||n===e?1:hs(n)))<0?0:n):[]},Dn.dropRightWhile=function(e,t){return e&&e.length?uo(e,ii(t,3),!0,!0):[]},Dn.dropWhile=function(e,t){return e&&e.length?uo(e,ii(t,3),!0):[]},Dn.fill=function(t,n,r,o){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&wi(t,n,r)&&(r=0,o=i),function(t,n,r,o){var i=t.length;for((r=hs(r))<0&&(r=-r>i?0:i+r),(o=o===e||o>i?i:hs(o))<0&&(o+=i),o=r>o?0:ps(o);r<o;)t[r++]=n;return t}(t,n,r,o)):[]},Dn.filter=function(e,t){return(ja(e)?Et:hr)(e,ii(t,3))},Dn.flatMap=function(e,t){return pr(ka(e,t),1)},Dn.flatMapDeep=function(e,t){return pr(ka(e,t),a)},Dn.flatMapDepth=function(t,n,r){return r=r===e?1:hs(r),pr(ka(t,n),r)},Dn.flatten=Yi,Dn.flattenDeep=function(e){return null!=e&&e.length?pr(e,a):[]},Dn.flattenDepth=function(t,n){return null!=t&&t.length?pr(t,n=n===e?1:hs(n)):[]},Dn.flip=function(e){return Xo(e,512)},Dn.flow=ec,Dn.flowRight=tc,Dn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Dn.functions=function(e){return null==e?[]:br(e,Bs(e))},Dn.functionsIn=function(e){return null==e?[]:br(e,Ms(e))},Dn.groupBy=ba,Dn.initial=function(e){return null!=e&&e.length?$r(e,0,-1):[]},Dn.intersection=Gi,Dn.intersectionBy=Ji,Dn.intersectionWith=Xi,Dn.invert=Is,Dn.invertBy=Ss,Dn.invokeMap=va,Dn.iteratee=rc,Dn.keyBy=Aa,Dn.keys=Bs,Dn.keysIn=Ms,Dn.map=ka,Dn.mapKeys=function(e,t){var n={};return t=ii(t,3),gr(e,function(e,r,o){nr(n,t(e,r,o),e)}),n},Dn.mapValues=function(e,t){var n={};return t=ii(t,3),gr(e,function(e,r,o){nr(n,r,t(e,r,o))}),n},Dn.matches=function(e){return Lr(ir(e,1))},Dn.matchesProperty=function(e,t){return Dr(e,ir(t,1))},Dn.memoize=Oa,Dn.merge=Ps,Dn.mergeWith=Os,Dn.method=oc,Dn.methodOf=ic,Dn.mixin=ac,Dn.negate=Ra,Dn.nthArg=function(e){return e=hs(e),Gr(function(t){return qr(t,e)})},Dn.omit=Rs,Dn.omitBy=function(e,t){return Ls(e,Ra(ii(t)))},Dn.once=function(e){return Ia(2,e)},Dn.orderBy=function(t,n,r,o){return null==t?[]:(ja(n)||(n=null==n?[]:[n]),ja(r=o?e:r)||(r=null==r?[]:[r]),Hr(t,n,r))},Dn.over=cc,Dn.overArgs=Ua,Dn.overEvery=uc,Dn.overSome=lc,Dn.partial=La,Dn.partialRight=Da,Dn.partition=Ta,Dn.pick=Us,Dn.pickBy=Ls,Dn.property=fc,Dn.propertyOf=function(t){return function(n){return null==t?e:vr(t,n)}},Dn.pull=Qi,Dn.pullAll=Zi,Dn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,ii(n,2)):e},Dn.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?Wr(t,n,e,r):t},Dn.pullAt=_i,Dn.range=dc,Dn.rangeRight=hc,Dn.rearg=Fa,Dn.reject=function(e,t){return(ja(e)?Et:hr)(e,Ra(ii(t,3)))},Dn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ii(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return jr(e,o),n},Dn.rest=function(n,r){if("function"!=typeof n)throw new Ie(t);return Gr(n,r=r===e?r:hs(r))},Dn.reverse=$i,Dn.sampleSize=function(t,n,r){return n=(r?wi(t,n,r):n===e)?1:hs(n),(ja(t)?Kn:Xr)(t,n)},Dn.set=function(e,t,n){return null==e?e:Kr(e,t,n)},Dn.setWith=function(t,n,r,o){return o="function"==typeof o?o:e,null==t?t:Kr(t,n,r,o)},Dn.shuffle=function(e){return(ja(e)?Qn:_r)(e)},Dn.slice=function(t,n,r){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&wi(t,n,r)?(n=0,r=o):(n=null==n?0:hs(n),r=r===e?o:hs(r)),$r(t,n,r)):[]},Dn.sortBy=Ea,Dn.sortedUniq=function(e){return e&&e.length?ro(e):[]},Dn.sortedUniqBy=function(e,t){return e&&e.length?ro(e,ii(t,2)):[]},Dn.split=function(t,n,r){return r&&"number"!=typeof r&&wi(t,n,r)&&(n=r=e),(r=r===e?u:r>>>0)?(t=gs(t))&&("string"==typeof n||null!=n&&!os(n))&&!(n=io(n))&&$t(t)?yo(an(t),0,r):t.split(n,r):[]},Dn.spread=function(e,n){if("function"!=typeof e)throw new Ie(t);return n=null==n?0:mn(hs(n),0),Gr(function(t){var r=t[n],o=yo(t,0,n);return r&&St(o,r),bt(e,this,o)})},Dn.tail=function(e){var t=null==e?0:e.length;return t?$r(e,1,t):[]},Dn.take=function(t,n,r){return t&&t.length?$r(t,0,(n=r||n===e?1:hs(n))<0?0:n):[]},Dn.takeRight=function(t,n,r){var o=null==t?0:t.length;return o?$r(t,(n=o-(n=r||n===e?1:hs(n)))<0?0:n,o):[]},Dn.takeRightWhile=function(e,t){return e&&e.length?uo(e,ii(t,3),!1,!0):[]},Dn.takeWhile=function(e,t){return e&&e.length?uo(e,ii(t,3)):[]},Dn.tap=function(e,t){return t(e),e},Dn.throttle=function(e,n,r){var o=!0,i=!0;if("function"!=typeof e)throw new Ie(t);return $a(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),Ba(e,n,{leading:o,maxWait:n,trailing:i})},Dn.thru=da,Dn.toArray=fs,Dn.toPairs=Ds,Dn.toPairsIn=Fs,Dn.toPath=function(e){return ja(e)?It(e,Li):ss(e)?[e]:Co(Ui(gs(e)))},Dn.toPlainObject=ws,Dn.transform=function(e,t,n){var r=ja(e),o=r||Ja(e)||cs(e);if(t=ii(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:$a(e)&&Qa(i)?Fn(Ye(e)):{}}return(o?At:gr)(e,function(e,r,o){return t(n,e,r,o)}),n},Dn.unary=function(e){return Ca(e,1)},Dn.union=ea,Dn.unionBy=ta,Dn.unionWith=na,Dn.uniq=function(e){return e&&e.length?ao(e):[]},Dn.uniqBy=function(e,t){return e&&e.length?ao(e,ii(t,2)):[]},Dn.uniqWith=function(t,n){return n="function"==typeof n?n:e,t&&t.length?ao(t,e,n):[]},Dn.unset=function(e,t){return null==e||so(e,t)},Dn.unzip=ra,Dn.unzipWith=oa,Dn.update=function(e,t,n){return null==e?e:co(e,t,mo(n))},Dn.updateWith=function(t,n,r,o){return o="function"==typeof o?o:e,null==t?t:co(t,n,mo(r),o)},Dn.values=qs,Dn.valuesIn=function(e){return null==e?[]:Gt(e,Ms(e))},Dn.without=ia,Dn.words=Qs,Dn.wrap=function(e,t){return La(mo(t),e)},Dn.xor=aa,Dn.xorBy=sa,Dn.xorWith=ca,Dn.zip=ua,Dn.zipObject=function(e,t){return ho(e||[],t||[],_n)},Dn.zipObjectDeep=function(e,t){return ho(e||[],t||[],Kr)},Dn.zipWith=la,Dn.entries=Ds,Dn.entriesIn=Fs,Dn.extend=bs,Dn.extendWith=vs,ac(Dn,Dn),Dn.add=gc,Dn.attempt=Zs,Dn.camelCase=Hs,Dn.capitalize=Vs,Dn.ceil=yc,Dn.clamp=function(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=ms(r))==r?r:0),n!==e&&(n=(n=ms(n))==n?n:0),or(ms(t),n,r)},Dn.clone=function(e){return ir(e,4)},Dn.cloneDeep=function(e){return ir(e,5)},Dn.cloneDeepWith=function(t,n){return ir(t,5,n="function"==typeof n?n:e)},Dn.cloneWith=function(t,n){return ir(t,4,n="function"==typeof n?n:e)},Dn.conformsTo=function(e,t){return null==t||ar(e,t,Bs(t))},Dn.deburr=Ws,Dn.defaultTo=function(e,t){return null==e||e!=e?t:e},Dn.divide=bc,Dn.endsWith=function(t,n,r){t=gs(t),n=io(n);var o=t.length,i=r=r===e?o:or(hs(r),0,o);return(r-=n.length)>=0&&t.slice(r,i)==n},Dn.eq=qa,Dn.escape=function(e){return(e=gs(e))&&Y.test(e)?e.replace(W,Zt):e},Dn.escapeRegExp=function(e){return(e=gs(e))&&_.test(e)?e.replace(Z,"\\$&"):e},Dn.every=function(t,n,r){var o=ja(t)?Tt:fr;return r&&wi(t,n,r)&&(n=e),o(t,ii(n,3))},Dn.find=ma,Dn.findIndex=Wi,Dn.findKey=function(e,t){return Ot(e,ii(t,3),gr)},Dn.findLast=wa,Dn.findLastIndex=ji,Dn.findLastKey=function(e,t){return Ot(e,ii(t,3),yr)},Dn.floor=vc,Dn.forEach=ga,Dn.forEachRight=ya,Dn.forIn=function(e,t){return null==e?e:mr(e,ii(t,3),Ms)},Dn.forInRight=function(e,t){return null==e?e:wr(e,ii(t,3),Ms)},Dn.forOwn=function(e,t){return e&&gr(e,ii(t,3))},Dn.forOwnRight=function(e,t){return e&&yr(e,ii(t,3))},Dn.get=xs,Dn.gt=Ha,Dn.gte=Va,Dn.has=function(e,t){return null!=e&&di(e,t,Er)},Dn.hasIn=Cs,Dn.head=zi,Dn.identity=nc,Dn.includes=function(e,t,n,r){e=za(e)?e:qs(e),n=n&&!r?hs(n):0;var o=e.length;return n<0&&(n=mn(o+n,0)),as(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ut(e,t,n)>-1},Dn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=mn(r+o,0)),Ut(e,t,o)},Dn.inRange=function(t,n,r){return n=ds(n),r===e?(r=n,n=0):r=ds(r),function(e,t,n){return e>=wn(t,n)&&e<mn(t,n)}(t=ms(t),n,r)},Dn.invoke=Ns,Dn.isArguments=Wa,Dn.isArray=ja,Dn.isArrayBuffer=Ya,Dn.isArrayLike=za,Dn.isArrayLikeObject=Ga,Dn.isBoolean=function(e){return!0===e||!1===e||es(e)&&kr(e)==h},Dn.isBuffer=Ja,Dn.isDate=Xa,Dn.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},Dn.isEmpty=function(e){if(null==e)return!0;if(za(e)&&(ja(e)||"string"==typeof e||"function"==typeof e.splice||Ja(e)||cs(e)||Wa(e)))return!e.length;var t=fi(e);if(t==y||t==T)return!e.size;if(vi(e))return!Or(e).length;for(var n in e)if(Oe.call(e,n))return!1;return!0},Dn.isEqual=function(e,t){return Nr(e,t)},Dn.isEqualWith=function(t,n,r){var o=(r="function"==typeof r?r:e)?r(t,n):e;return o===e?Nr(t,n,e,r):!!o},Dn.isError=Ka,Dn.isFinite=function(e){return"number"==typeof e&&dn(e)},Dn.isFunction=Qa,Dn.isInteger=Za,Dn.isLength=_a,Dn.isMap=ts,Dn.isMatch=function(e,t){return e===t||Br(e,t,si(t))},Dn.isMatchWith=function(t,n,r){return r="function"==typeof r?r:e,Br(t,n,si(n),r)},Dn.isNaN=function(e){return ns(e)&&e!=+e},Dn.isNative=function(e){if(bi(e))throw new Ae("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(e)},Dn.isNil=function(e){return null==e},Dn.isNull=function(e){return null===e},Dn.isNumber=ns,Dn.isObject=$a,Dn.isObjectLike=es,Dn.isPlainObject=rs,Dn.isRegExp=os,Dn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=s},Dn.isSet=is,Dn.isString=as,Dn.isSymbol=ss,Dn.isTypedArray=cs,Dn.isUndefined=function(t){return t===e},Dn.isWeakMap=function(e){return es(e)&&fi(e)==C},Dn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==kr(e)},Dn.join=function(e,t){return null==e?"":hn.call(e,t)},Dn.kebabCase=js,Dn.last=Ki,Dn.lastIndexOf=function(t,n,r){var o=null==t?0:t.length;if(!o)return-1;var i=o;return r!==e&&(i=(i=hs(r))<0?mn(o+i,0):wn(i,o-1)),n==n?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(t,n,i):Rt(t,Dt,i,!0)},Dn.lowerCase=Ys,Dn.lowerFirst=zs,Dn.lt=us,Dn.lte=ls,Dn.max=function(t){return t&&t.length?dr(t,nc,Tr):e},Dn.maxBy=function(t,n){return t&&t.length?dr(t,ii(n,2),Tr):e},Dn.mean=function(e){return Ft(e,nc)},Dn.meanBy=function(e,t){return Ft(e,ii(t,2))},Dn.min=function(t){return t&&t.length?dr(t,nc,Rr):e},Dn.minBy=function(t,n){return t&&t.length?dr(t,ii(n,2),Rr):e},Dn.stubArray=pc,Dn.stubFalse=mc,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=Ac,Dn.nth=function(t,n){return t&&t.length?qr(t,hs(n)):e},Dn.noConflict=function(){return st.Se===this&&(st.Se=Fe),this},Dn.noop=sc,Dn.now=xa,Dn.pad=function(e,t,n){e=gs(e);var r=(t=hs(t))?on(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Vo(Ht(o),n)+e+Vo(Pt(o),n)},Dn.padEnd=function(e,t,n){e=gs(e);var r=(t=hs(t))?on(e):0;return t&&r<t?e+Vo(t-r,n):e},Dn.padStart=function(e,t,n){e=gs(e);var r=(t=hs(t))?on(e):0;return t&&r<t?Vo(t-r,n)+e:e},Dn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),yn(gs(e).replace($,""),t||0)},Dn.random=function(t,n,r){if(r&&"boolean"!=typeof r&&wi(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=ds(t),n===e?(n=t,t=0):n=ds(n)),t>n){var o=t;t=n,n=o}if(r||t%1||n%1){var i=bn();return wn(t+i*(n-t+rt("1e-"+((i+"").length-1))),n)}return Yr(t,n)},Dn.reduce=function(e,t,n){var r=ja(e)?Nt:Vt,o=arguments.length<3;return r(e,ii(t,4),n,o,ur)},Dn.reduceRight=function(e,t,n){var r=ja(e)?Bt:Vt,o=arguments.length<3;return r(e,ii(t,4),n,o,lr)},Dn.repeat=function(t,n,r){return n=(r?wi(t,n,r):n===e)?1:hs(n),zr(gs(t),n)},Dn.replace=function(){var e=arguments,t=gs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dn.result=function(t,n,r){var o=-1,i=(n=wo(n,t)).length;for(i||(i=1,t=e);++o<i;){var a=null==t?e:t[Li(n[o])];a===e&&(o=i,a=r),t=Qa(a)?a.call(t):a}return t},Dn.round=kc,Dn.runInContext=ee,Dn.sample=function(e){return(ja(e)?Xn:Jr)(e)},Dn.size=function(e){if(null==e)return 0;if(za(e))return as(e)?on(e):e.length;var t=fi(e);return t==y||t==T?e.size:Or(e).length},Dn.snakeCase=Gs,Dn.some=function(t,n,r){var o=ja(t)?Mt:eo;return r&&wi(t,n,r)&&(n=e),o(t,ii(n,3))},Dn.sortedIndex=function(e,t){return to(e,t)},Dn.sortedIndexBy=function(e,t,n){return no(e,t,ii(n,2))},Dn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=to(e,t);if(r<n&&qa(e[r],t))return r}return-1},Dn.sortedLastIndex=function(e,t){return to(e,t,!0)},Dn.sortedLastIndexBy=function(e,t,n){return no(e,t,ii(n,2),!0)},Dn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=to(e,t,!0)-1;if(qa(e[n],t))return n}return-1},Dn.startCase=Js,Dn.startsWith=function(e,t,n){return e=gs(e),n=null==n?0:or(hs(n),0,e.length),t=io(t),e.slice(n,n+t.length)==t},Dn.subtract=Tc,Dn.sum=function(e){return e&&e.length?Wt(e,nc):0},Dn.sumBy=function(e,t){return e&&e.length?Wt(e,ii(t,2)):0},Dn.template=function(t,n,r){var o=Dn.templateSettings;r&&wi(t,n,r)&&(n=e),t=gs(t),n=vs({},n,o,Ko);var i,a,s=vs({},n.imports,o.imports,Ko),c=Bs(s),u=Gt(s,c),l=0,f=n.interpolate||me,d="__p += '",h=xe((n.escape||me).source+"|"+f.source+"|"+(f===J?se:me).source+"|"+(n.evaluate||me).source+"|$","g"),p="//# sourceURL="+(Oe.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++$e+"]")+"\n";t.replace(h,function(e,n,r,o,s,c){return r||(r=o),d+=t.slice(l,c).replace(we,_t),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e}),d+="';\n";var m=Oe.call(n,"variable")&&n.variable;if(m){if(ie.test(m))throw new Ae("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(F,""):d).replace(q,"$1").replace(H,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var w=Zs(function(){return ke(c,p+"return "+d).apply(e,u)});if(w.source=d,Ka(w))throw w;return w},Dn.times=function(e,t){if((e=hs(e))<1||e>s)return[];var n=u,r=wn(e,u);t=ii(t),e-=u;for(var o=jt(r,t);++n<e;)t(n);return o},Dn.toFinite=ds,Dn.toInteger=hs,Dn.toLength=ps,Dn.toLower=function(e){return gs(e).toLowerCase()},Dn.toNumber=ms,Dn.toSafeInteger=function(e){return e?or(hs(e),-9007199254740991,s):0===e?e:0},Dn.toString=gs,Dn.toUpper=function(e){return gs(e).toUpperCase()},Dn.trim=function(t,n,r){if((t=gs(t))&&(r||n===e))return Yt(t);if(!t||!(n=io(n)))return t;var o=an(t),i=an(n);return yo(o,Xt(o,i),Kt(o,i)+1).join("")},Dn.trimEnd=function(t,n,r){if((t=gs(t))&&(r||n===e))return t.slice(0,sn(t)+1);if(!t||!(n=io(n)))return t;var o=an(t);return yo(o,0,Kt(o,an(n))+1).join("")},Dn.trimStart=function(t,n,r){if((t=gs(t))&&(r||n===e))return t.replace($,"");if(!t||!(n=io(n)))return t;var o=an(t);return yo(o,Xt(o,an(n))).join("")},Dn.truncate=function(t,n){var r=30,o="...";if($a(n)){var i="separator"in n?n.separator:i;r="length"in n?hs(n.length):r,o="omission"in n?io(n.omission):o}var a=(t=gs(t)).length;if($t(t)){var s=an(t);a=s.length}if(r>=a)return t;var c=r-on(o);if(c<1)return o;var u=s?yo(s,0,c).join(""):t.slice(0,c);if(i===e)return u+o;if(s&&(c+=u.length-c),os(i)){if(t.slice(c).search(i)){var l,f=u;for(i.global||(i=xe(i.source,gs(ce.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var d=l.index;u=u.slice(0,d===e?c:d)}}else if(t.indexOf(io(i),c)!=c){var h=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}return u+o},Dn.unescape=function(e){return(e=gs(e))&&j.test(e)?e.replace(V,cn):e},Dn.uniqueId=function(e){var t=++Re;return gs(e)+t},Dn.upperCase=Xs,Dn.upperFirst=Ks,Dn.each=ga,Dn.eachRight=ya,Dn.first=zi,ac(Dn,(wc={},gr(Dn,function(e,t){Oe.call(Dn.prototype,t)||(wc[t]=e)}),wc),{chain:!1}),Dn.VERSION="4.17.23",At(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Dn[e].placeholder=Dn}),At(["drop","take"],function(t,n){Vn.prototype[t]=function(r){r=r===e?1:mn(hs(r),0);var o=this.Ue&&!n?new Vn(this):this.clone();return o.Ue?o.De=wn(r,o.De):o.Fe.push({size:wn(r,u),type:t+(o.Re<0?"Right":"")}),o},Vn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),At(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.Le.push({iteratee:ii(e,3),type:n}),t.Ue=t.Ue||r,t}}),At(["head","last"],function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}}),At(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.Ue?new Vn(this):this[n](1)}}),Vn.prototype.compact=function(){return this.filter(nc)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=Gr(function(e,t){return"function"==typeof e?new Vn(this):this.map(function(n){return Ir(n,e,t)})}),Vn.prototype.reject=function(e){return this.filter(Ra(ii(e)))},Vn.prototype.slice=function(t,n){t=hs(t);var r=this;return r.Ue&&(t>0||n<0)?new Vn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=hs(n))<0?r.dropRight(-n):r.take(n-t)),r)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(u)},gr(Vn.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),i=Dn[o?"take"+("last"==n?"Right":""):n],a=o||/^find/.test(n);i&&(Dn.prototype[n]=function(){var n=this.Ne,s=o?[1]:arguments,c=n instanceof Vn,u=s[0],l=c||ja(n),f=function(e){var t=i.apply(Dn,St([e],s));return o&&d?t[0]:t};l&&r&&"function"==typeof u&&1!=u.length&&(c=l=!1);var d=this.Me,h=!!this.Be.length,p=a&&!d,m=c&&!h;if(!a&&l){n=m?n:new Vn(this);var w=t.apply(n,s);return w.Be.push({func:da,args:[f],thisArg:e}),new Hn(w,d)}return p&&m?t.apply(this,s):(w=this.thru(f),p?o?w.value()[0]:w.value():w)})}),At(["pop","push","shift","sort","splice","unshift"],function(e){var t=Se[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Dn.prototype[e]=function(){var e=arguments;if(r&&!this.Me){var o=this.value();return t.apply(ja(o)?o:[],e)}return this[n](function(n){return t.apply(ja(n)?n:[],e)})}}),gr(Vn.prototype,function(e,t){var n=Dn[t];if(n){var r=n.name+"";Oe.call(Sn,r)||(Sn[r]=[]),Sn[r].push({name:t,func:n})}}),Sn[Do(e,2).name]=[{name:"wrapper",func:e}],Vn.prototype.clone=function(){var e=new Vn(this.Ne);return e.Be=Co(this.Be),e.Re=this.Re,e.Ue=this.Ue,e.Le=Co(this.Le),e.De=this.De,e.Fe=Co(this.Fe),e},Vn.prototype.reverse=function(){if(this.Ue){var e=new Vn(this);e.Re=-1,e.Ue=!0}else(e=this.clone()).Re*=-1;return e},Vn.prototype.value=function(){var e=this.Ne.value(),t=this.Re,n=ja(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=wn(t,e+a);break;case"takeRight":e=mn(e,t-a)}}return{start:e,end:t}}(0,o,this.Fe),a=i.start,s=i.end,c=s-a,u=r?s:a-1,l=this.Le,f=l.length,d=0,h=wn(c,this.De);if(!n||!r&&o==c&&h==c)return lo(e,this.Be);var p=[];e:for(;c--&&d<h;){for(var m=-1,w=e[u+=t];++m<f;){var g=l[m],y=g.iteratee,b=g.type,v=y(w);if(2==b)w=v;else if(!v){if(1==b)continue e;break e}}p[d++]=w}return p},Dn.prototype.at=ha,Dn.prototype.chain=function(){return fa(this)},Dn.prototype.commit=function(){return new Hn(this.value(),this.Me)},Dn.prototype.next=function(){this.Oe===e&&(this.Oe=fs(this.value()));var t=this.Pe>=this.Oe.length;return{done:t,value:t?e:this.Oe[this.Pe++]}},Dn.prototype.plant=function(t){for(var n,r=this;r instanceof qn;){var o=Fi(r);o.Pe=0,o.Oe=e,n?i.Ne=o:n=o;var i=o;r=r.Ne}return i.Ne=t,n},Dn.prototype.reverse=function(){var t=this.Ne;if(t instanceof Vn){var n=t;return this.Be.length&&(n=new Vn(this)),(n=n.reverse()).Be.push({func:da,args:[$i],thisArg:e}),new Hn(n,this.Me)}return this.thru($i)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return lo(this.Ne,this.Be)},Dn.prototype.first=Dn.prototype.head,it&&(Dn.prototype[it]=function(){return this}),Dn}();ut?((ut.exports=un).Se=un,ct.Se=un):st.Se=un}.call(ep.exports)),ep.exports);const np=Ad()?.webAppUrl||"https://nft.keyring.app";function rp(e){const t=e.poolDayData?.[0];return!!t&&0!==parseFloat(t.volumeToken0||"0")&&0!==parseFloat(t.volumeToken1||"0")&&0!==parseFloat(t.volumeUSD||"0")}const op={ethereum:"https://gateway.thegraph.com/api/subgraphs/id/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV",arbitrum:"https://gateway.thegraph.com/api/subgraphs/id/FbCGRftH4a3yZugY7TnbYgPJVEv2LvMT6oF1fxPe9aJM",polygon:"https://gateway.thegraph.com/api/subgraphs/id/3hCPRGf4z88VC5rsBKU5AA9FBBq5nF3jbKJG7VZCbhjm",bsc:"https://gateway.thegraph.com/api/subgraphs/id/GcKPSgHoY42xNYVAkSPDhXSzi6aJDRQSKqBSXezL47gV",base:"https://gateway.thegraph.com/api/subgraphs/id/HMuAwufqZ1YCRmzL2SfHTVkzZovC9VL2UAKhjvRqKiR1",optimism:"https://gateway.thegraph.com/api/subgraphs/id/Cghf4LfVqPiFw6fp6Y5X5Ubc8UpmUhSfJL82zwiBFLaj",avalanche:"https://gateway.thegraph.com/api/subgraphs/id/GVH9h9KZ9CqheUEL93qMbq7QwgoBu32QXQDPR6bev4Eo"},ip={eth:"ethereum",ethereum:"ethereum",mainnet:"ethereum",1:"ethereum",arb:"arbitrum",arbitrum:"arbitrum",42161:"arbitrum",polygon:"polygon",matic:"polygon",137:"polygon",bsc:"bsc",bnb:"bsc",56:"bsc",base:"base",8453:"base",optimism:"optimism",10:"optimism",avax:"avalanche",avalanche:"avalanche",43114:"avalanche"},ap={ethereum:1,arbitrum:42161,polygon:137,bsc:56,base:8453,optimism:10,avalanche:43114},sp={100:.01,500:.05,3e3:.3,1e4:1};function cp(e){return e&&ip[e.toLowerCase()]||"ethereum"}function up(e){const t=e.toLowerCase();return t in ip||t in op}async function lp(e,t,n={},r){const o=function(e){const t=cp(e);return op[t]||null}(e);if(!o)throw new Error(`No subgraph available for chain: ${e}`);const i=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer 4c67ac7a75b21befbd28dc9120c709f1"},body:JSON.stringify({query:t,variables:n}),signal:r});if(!i.ok)throw new Error(`Subgraph query failed: HTTP ${i.status}`);const a=await i.json();if(a.errors)throw new Error(`Subgraph error: ${a.errors[0]?.message||"Unknown"}`);return a.data}function fp(e){return!isFinite(e)||isNaN(e)||e>1e11?0:e}function dp(e,t){const n=Number(e.feeTier||0),r=sp[n]??n/1e4,o=fp(parseFloat(e.totalValueLockedUSD||"0")),i=e.poolDayData?.[0],a=parseFloat(i?.volumeUSD||"0"),s=parseFloat(i?.feesUSD||"0");let c=null;return o>0&&s>0&&(c=parseFloat((365*s*100/o).toFixed(2))),{pair:`${e.token0.symbol}/${e.token1.symbol}`,poolAddress:e.id,token0:{symbol:e.token0.symbol,address:e.token0.id},token1:{symbol:e.token1.symbol,address:e.token1.id},tvl:o,volumePastDay:a,apr:c,fee:r,liquidity:e.liquidity||"0",chain:cp(t)}}let hp=null,pp=0;const mp={ethereum:"ethereum","arbitrum one":"arbitrum",arbitrum:"arbitrum",polygon:"polygon",bsc:"bsc",base:"base",optimism:"optimism","avalanche c-chain":"avalanche",avalanche:"avalanche"};async function wp(){const e=Date.now();if(hp&&e-pp<3e5)return hp;try{const t=await fetch("https://yields.llama.fi/pools");if(!t.ok)throw new Error(`DefiLlama HTTP ${t.status}`);const n=((await t.json()).data||[]).filter(e=>"uniswap-v3"===e.project);return hp=n,pp=e,n}catch(t){return hp??[]}}function gp(e){if(!e)return null;const t=e.match(/^([\d.]+)%/);return t?Math.round(1e4*parseFloat(t[1])):null}function yp(e,t){return t.length?e.map(e=>{const n=e.chain.toLowerCase(),r=Math.round(1e4*e.fee),o=e.token0.address.toLowerCase(),i=e.token1.address.toLowerCase(),a=t.filter(e=>mp[e.chain.toLowerCase()]===n);let s=a.find(e=>{if(!e.underlyingTokens||e.underlyingTokens.length<2)return!1;const t=e.underlyingTokens.map(e=>e.toLowerCase());if(!t.includes(o)||!t.includes(i))return!1;const n=gp(e.poolMeta);return null===n||n===r});if(!s){const t=[e.token0.symbol.toUpperCase(),e.token1.symbol.toUpperCase()].sort().join("-");s=a.find(e=>{if([...e.symbol.split("-").map(e=>e.toUpperCase())].sort().join("-")!==t)return!1;const n=gp(e.poolMeta);return null===n||n===r})}if(s){const t=s.apyBase??s.apyBase??s.apy??null,n=s.tvlUsd??null,r=s.volumeUsd1d??null;return{...e,...null!==t&&{apr:parseFloat(t.toFixed(2))},...null!==n&&{tvl:fp(n)},...null!==r&&{volumePastDay:fp(r)}}}return e}):e}async function bp(e){const{tokens:t,chain:n,sortBy:r,filters:o,signal:i}=e,a=cp(n),s=t.map(e=>{const t=e.toUpperCase(),n=/* @__PURE__ */new Set([t]);return t.startsWith("W")||n.add("W"+t),t.startsWith("W")&&t.length>1&&n.add(t.slice(1)),[...n]}),c=['totalValueLockedUSD_gt: "10000"','liquidity_gt: "0", volumeUSD_gt: "0"'];o?.feeTier&&c.push(`feeTier: "${o.feeTier}"`);let u="totalValueLockedUSD";"volume"===r?u="volumeUSD":"fee"===r?u="feeTier":"liquidity"===r&&(u="liquidity");const l="fee"===r?"asc":"desc",f=e=>1===e.length?`symbol: "${e[0]}"`:`symbol_in: [${e.map(e=>`"${e}"`).join(", ")}]`,d=(e,t)=>`{\n pools(\n first: ${t}\n orderBy: ${u}\n orderDirection: ${l}\n where: { ${[...c,...e].join(", ")} }\n ) {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }`;let h;if(s.length>0){const e=100;let t,n;s.length>=2?(t=d([`token0_: { ${f(s[0])} }`,`token1_: { ${f(s[1])} }`],e),n=d([`token0_: { ${f(s[1])} }`,`token1_: { ${f(s[0])} }`],e)):(t=d([`token0_: { ${f(s[0])} }`],e),n=d([`token1_: { ${f(s[0])} }`],e));const[r,o]=await Promise.allSettled([lp(a,t,{},i),lp(a,n,{},i)]),c="fulfilled"===r.status?(r.value?.pools||[]).filter(rp).map(e=>dp(e,a)):[],u="fulfilled"===o.status?(o.value?.pools||[]).filter(rp).map(e=>dp(e,a)):[],l=new Set(c.map(e=>e.poolAddress));h=[...c,...u.filter(e=>!l.has(e.poolAddress))]}else{const e=await lp(a,d([],100),{},i);h=(e?.pools||[]).filter(rp).map(e=>dp(e,a))}const p=await wp();return p.length>0&&(h=yp(h,p)),o?.minTVL&&(h=h.filter(e=>e.tvl>=o.minTVL)),o?.maxTVL&&(h=h.filter(e=>e.tvl<=o.maxTVL)),o?.minAPR&&(h=h.filter(e=>null!==e.apr&&e.apr>=o.minAPR)),o?.maxAPR&&(h=h.filter(e=>null!==e.apr&&e.apr<=o.maxAPR)),"apr"===r?h.sort((e,t)=>(t.apr??0)-(e.apr??0)):"liquidity"===r&&h.sort((e,t)=>{const n=BigInt(t.liquidity||"0")-BigInt(e.liquidity||"0");return n>0n?1:n<0n?-1:0}),h}async function vp(e){const{poolId:t,chain:n,signal:r}=e,o=cp(n),i=`{\n position(id: "${t}") {\n pool {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }\n }`,a=await lp(o,i,{},r);return a?.position?.pool?dp(a.position.pool,o):null}async function Ap(e){const{chain:t,signal:n}=e,r=cp(t),o=await lp(r,'{\n pools(\n first: 100\n orderBy: volumeUSD\n orderDirection: desc\n where: { totalValueLockedUSD_gt: "10000", liquidity_gt: "0", volumeUSD_gt: "0" }\n ) {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }',{},n);return(o?.pools||[]).filter(rp).map(e=>dp(e,r))}const kp=new gh(np),Tp=[{alias:"op",token:"OP",chain:"optimism"},{alias:"arb",token:"ARB",chain:"arbitrum"},{alias:"eth",token:"ETH",chain:"ethereum"},{alias:"bnb",token:"BNB",chain:"bsc"},{alias:"matic",token:"MATIC",chain:"polygon"}];function Ep(e){return e instanceof Error&&("AbortError"===e.name||e.message.toLowerCase().includes("aborted")||e.message.toLowerCase().includes("canceled"))}function xp(e,t){return new Promise((n,r)=>{if(t?.aborted)return void r(new Error("Aborted"));const o=setTimeout(()=>{t?.removeEventListener("abort",i),n()},e),i=()=>{clearTimeout(o),t?.removeEventListener("abort",i),r(new Error("Aborted"))};t?.addEventListener("abort",i,{once:!0})})}function Cp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ip(e,t,n){const r=Cp(t),o=Cp(n);return new RegExp(`\\b(?:on|in|at|from|to|across|via|using|tr[eê]n|tai|tại)\\s+${r}\\b`,"i").test(e)||new RegExp(`\\b(?:on|in|at|from|to|across|via|using|tr[eê]n|tai|tại)\\s+${o}\\b`,"i").test(e)||new RegExp(`\\b${r}\\s+(?:chain|network)\\b`,"i").test(e)||new RegExp(`\\b${o}\\s+(?:chain|network)\\b`,"i").test(e)}const Sp=Ad()?.linkAddLiquidity,Np=`You are a knowledgeable DeFi assistant helping users find the best liquidity pools.\n\nYou will receive structured pool data and must answer the user's question in a helpful, natural, conversational tone — like an expert friend explaining DeFi, not a robot listing data.\n\nGuidelines:\n- Respond in the exact language of LANGUAGE.\n- **FOLLOW-UP / CONTINUATION**: If the user's question is a short follow-up (e.g., "yes", "ok", "sure", "tell me more", "details", "go ahead"), look at the CONVERSATION HISTORY to understand what they are responding to. Provide a relevant, detailed follow-up answer based on the last assistant message. NEVER say "too vague" or ask for clarification when history clearly shows the context.\n- Use ONLY the provided pool data. Never invent or estimate numbers.\n- Intelligently select and highlight the most relevant pools for the user's question. You don't need to list all pools — pick the ones that best answer what they asked.\n- When recommending pools, briefly explain WHY they stand out (e.g. high APR, deep liquidity, low fee, well-known pair).\n- Include key metrics naturally in your answer: TVL, volume past day, APR, fee tier.\n- Use the provided uniswapUrl for each pool you mention. Do NOT construct URLs yourself.\n- If position data is available, include the provided uniswapPositionUrl for each position.\n- If UNSUPPORTED_CHAINS is present (not "none"), respond ONLY with a notice informing the user that those chain(s) are not currently supported for pool data queries (translate this notice naturally into LANGUAGE). Then list the SUPPORTED_CHAINS so the user knows which chains they can query. Do NOT add any other information, pool data, or suggestions after this notice.\n- If POOLS_FOUND is 0 and POSITIONS_FOUND is 0 and COINPOOL_PAIRS_FOUND is 0 and UNSUPPORTED_CHAINS is "none", start your response with the UNISWAP_V3_NOTICE (provided below, already translated to LANGUAGE), then continue with your helpful response.\n- If POOLS_FOUND is 0 but COINPOOL_PAIRS_FOUND > 0, do NOT show the UNISWAP_V3_NOTICE. Instead, answer naturally using the CoinPool data available.\n- When POOLS_FOUND > 0 (i.e. pool data from Subgraph is shown), prepend the phrase "According to the latest data from Subgraph Uniswap V3 " (translated naturally into LANGUAGE) at the very beginning of your response, before any other content. Keep the word "Subgraph" as-is (do not translate it).\n- If no suitable data is available, acknowledge it naturally and suggest how to refine the search.\n- Keep the response focused and easy to read. Use markdown (bold, bullet points) to structure when helpful, but keep the tone warm and human.\n${Sp&&`- If the user mentions adding liquidity / adding a pool / adding a position (including phrases like "add liquidity", "add pool", "add position", "create pool", "create pair", "thêm thanh khoản", "thêm pool", "thêm position"), keep your normal answer content and append this exact link at the end of the response: ${Sp}`}\n- Never output raw JSON or data dumps.\n\n## CoinPool Data Rules (COINPOOL_PAIRS section)\nCOINPOOL_PAIRS contains liquidity positions from the CoinPool platform, each with a SPECIFIC price range.\n\n**CRITICAL: CoinPool APR is NOT the overall pool APR.** It is the APR earned ONLY within that specific price range. You MUST always show the price range together with the APR. Never present CoinPool APR as if it were the general pool APR — this would mislead users.\n\n### When to use POOL_DATA vs COINPOOL_PAIRS:\n- **POOL_DATA** (from Uniswap subgraph): Use for general pool info — TVL, volume past day, overall pool APR, fee tier. This is the default data source.\n- **COINPOOL_PAIRS**: Use ONLY when the user specifically asks about price ranges, concentrated liquidity strategies, or which price range to choose. Each entry represents a specific price range with its own APR.\n\n### Display rules:\n1. **User asks general pool info** (e.g. "show ETH/USDC pools") → Show POOL_DATA. Mention CoinPool ranges only briefly as additional info if available.\n2. **User asks about price ranges / which range to pick** (e.g. "what price range should I use?", "gợi ý khoảng giá", "best range for ETH/USDC") → Show CoinPool ranges sorted by APR. Clearly label: "APR for this price range: X%" with the min–max prices.\n3. **User provides a specific price range** → Check if any CoinPool entry covers that range. If yes, show its APR. If no, suggest the range with the highest APR from CoinPool data.\n4. **Always format CoinPool APR as**: "APR **X%** (for range: minPrice – maxPrice baseToken/quoteToken)" — never show APR alone without its range.\n5. **Best range suggestion**: When suggesting, pick the entry with the highest APR and explain why (higher concentration = higher returns but narrower range = higher risk of going out of range).`;function Bp(e){return 0===e?"$0":e>=1e9?`$${(e/1e9).toFixed(2)}B`:e>=1e6?`$${(e/1e6).toFixed(2)}M`:e>=1e3?`$${(e/1e3).toFixed(2)}K`:`$${e.toFixed(2)}`}const Mp={ethereum:"ethereum",arbitrum:"arbitrum",polygon:"polygon",bsc:"bnb",base:"base",optimism:"optimism",avalanche:"avalanche"};async function Pp(e,t,n){const r=Op(t);try{const a=e.data.pools.length,s=e.data.positions?.length??0,c=e.data.coinpoolPairs?.length??0;let u="";if(e.chatHistory&&e.chatHistory.length>0){u="\n\nCONVERSATION HISTORY (last messages for context):\n";for(const t of e.chatHistory){u+=`${"user"===t.role?"User":"Assistant"}: ${t.content}\n`}u+="---"}const l=`${Np}${u}\n\nLANGUAGE: ${t||"en"}\nINTENT: ${e.parsed.intent}\nQUESTION: ${e.question}\nPOOLS_FOUND: ${a}\nPOSITIONS_FOUND: ${s}\nCOINPOOL_PAIRS_FOUND: ${c}\nUNSUPPORTED_CHAINS: ${e.parsed.unsupportedChains&&e.parsed.unsupportedChains.length>0?e.parsed.unsupportedChains.join(", "):"none"}\nSUPPORTED_CHAINS: ${Object.keys(op).join(", ")}\nUNISWAP_V3_NOTICE: ${r.uniswapV3Only}\n\nPARSED_QUERY:\n${JSON.stringify({...e.parsed,limit:void 0},null,2)}\n\nPOOL_DATA:\n${o=[...e.data.pools].sort((e,t)=>(t.apr??0)-(e.apr??0)||t.tvl-e.tvl).slice(0,100),JSON.stringify(o.map(e=>{return{...e,tvl:Bp(e.tvl),volumePastDay:Bp(e.volumePastDay),apr:null!==e.apr?`${e.apr}%`:null,liquidity:e.liquidity,uniswapUrl:(t=e,`https://app.uniswap.org/explore/pools/${Mp[t.chain]||t.chain}/${t.poolAddress}`)};var t}),null,2)}\n${e.data.positions&&e.data.positions.length>0?`\n\nUSER_POSITIONS:\n${JSON.stringify(e.data.positions.slice(0,100).map(e=>{return{...e,uniswapPositionUrl:(t=e,`https://app.uniswap.org/positions/v3/${Mp[t.chain]||t.chain}/${t.positionId}`)};var t}),null,2)}`:""}\n${e.data.coinpoolPairs&&e.data.coinpoolPairs.length>0?(()=>{const t=[...e.data.coinpoolPairs].sort((e,t)=>(t.apr??-1/0)-(e.apr??-1/0));return`\n\nCOINPOOL_PAIRS (price-range-specific data from CoinPool — APR here is per-range, NOT overall pool APR):\nBest range APR: ${null!==t[0]?.apr?t[0].apr.toFixed(2)+"%":"N/A"}\n${n=e.data.coinpoolPairs,[...n].sort((e,t)=>(t.apr??-1/0)-(e.apr??-1/0)).map((e,t)=>`#${t+1} ${e.pair} | pool: ${e.poolId} | fee: ${e.fee} | Range APR : ${null!==e.aprAvg?e.aprAvg.toFixed(2)+"%":"N/A"} | token prices: ${Bp(e.token0Price)} / ${Bp(e.token1Price)} | price range (${e.priceRange.baseToken}/${e.priceRange.quoteToken}): ${e.priceRange.minPrice} – ${e.priceRange.maxPrice} (current: ${e.priceRange.currentPrice})`).join("\n")}`;var n})():""}\n\nGenerate the final response for the end user now.`,f=5,d=1e3;let h=null,p=null;for(let e=1;e<=f;e++)try{h=await kp.post("api/moralis-cortex/proxy/chat",{prompt:l,model:"gpt-4.1-mini",stream:!1},{headers:{Accept:"application/json","Content-Type":"application/json"},signal:n}),p=null;break}catch(i){if(p=i,Ep(i))throw i;e<f&&await xp(d,n)}if(p)throw p;const m=h?.data?.text?.trim();if(m)return m}catch(i){}var o;return function(e,t){const n=e.data?.pools||[],r=e.data?.positions||[],o=e.data?.coinpoolPairs||[],i=Op(t);return 0===n.length&&0===r.length&&0===o.length?e.parsed.unsupportedChains&&e.parsed.unsupportedChains.length>0?i.unsupportedChain:`${i.uniswapV3Only} No pool data found for this query.`:["I cannot generate the final AI response right now. Here is the raw pool data:","```json",JSON.stringify({intent:e.parsed.intent,tokens:e.parsed.tokens,chains:e.parsed.chains,pools:n},null,2),"```"].join("\n")}(e,t)}function Op(e){const t=e||"en";return{unsupportedChain:h("poolUnsupportedChain",t),uniswapV3Only:h("poolUniswapV3Only",t)}}async function Rp(e){const{question:t,language:n,currentChain:r,walletAddress:o,chatHistory:i,signal:a}=e,s=await async function(e,t,n){try{let o="";if(n&&n.length>0){o="\n\n## CONVERSATION HISTORY:\n";for(const e of n)o+=`${"user"===e.role?"User":"Assistant"}: ${e.content}\n`;o+="---\n"}const i=`You are a DeFi Pool Query Parser. You understand ALL languages.\n\nConvert the user question into a structured JSON object. Return ONLY valid JSON — no explanation, no markdown.\n\n## OUTPUT FORMAT\n{\n "intent": string,\n "tokens": string[],\n "chains": string[],\n "poolAddress": string | null,\n "poolId": string | null,\n "walletAddress": string | null,\n "toAddress": string | null,\n "filters": {\n "minTVL": number | null,\n "maxTVL": number | null,\n "minAPR": number | null,\n "maxAPR": number | null,\n "feeTier": number | null\n },\n "sortBy": string | null,\n "limit": number | null\n}\n\n## INTENT TYPES\n- "search_pool" — find/list/show pools, optionally filtered by token(s) or chain\n- "best_pool" — best pool by TVL, volume, etc.\n- "compare_pool" — compare multiple pools or fee tiers\n- "pool_detail" — specific pool by address, pool id, or exact token pair\n- "trending_pool" — hot/trending/most active pools\n- "new_pool" — recently created pools\n- "high_apr_pool" — highest APR/yield pools\n- "low_fee_pool" — lowest fee pools\n- "safe_pool" — high TVL/low risk/stable pools\n- "general_pool_info" — educational questions (what is a pool, how pools work)\n- "user_positions" — user's own LP positions ("my pools", "my positions", "my liquidity")\n- "position_detail" — specific position by numeric id ("position 962961", "position id 12345", "tell me about position 962961")\n- "send_position" — user wants to send/transfer their LP position NFT to another address ("send position 12345 to 0x...", "transfer my position", "gửi position", "chuyển LP position")\n- "unknown" — truly unrelated to pools\n\n## TOKEN EXTRACTION\n- Extract token symbols mentioned: ETH, USDC, BTC, LINK, ARB, OP, etc.\n- Normalize wrapped variants: WETH→ETH, WBTC→BTC\n- "stablecoin pool" → tokens: ["USDC", "USDT"]\n- No tokens mentioned → tokens: []\n- One token mentioned → tokens: ["TOKEN"] (single-token search is valid)\n- Two tokens mentioned → tokens: ["TOKEN_A", "TOKEN_B"]\n\n## CHAIN vs TOKEN DISAMBIGUATION (CRITICAL)\nSome short names can be EITHER a chain name OR a token symbol.\nAmbiguous aliases: OP, ARB, ETH, BNB, MATIC\n\n**Rule: Use chain only with EXPLICIT chain context.**\nExplicit chain context = prepositions like "on", "in", "from", "across", "trên", "tại" + alias, OR alias + "chain"/"network".\n\nExamples:\n- "show me pool OP" → tokens: ["OP"], chains: [] (OP = token)\n- "show me pools on OP" → tokens: [], chains: ["optimism"] (on OP = chain)\n- "find ETH pools" → tokens: ["ETH"], chains: [] (ETH = token)\n- "find pools on ETH" → tokens: [], chains: ["ethereum"] (on ETH = chain)\n- "OP/USDC pool on ARB" → tokens: ["OP", "USDC"], chains: ["arbitrum"] (OP = token, on ARB = chain)\n- "show me pools on OP and ARB" → tokens: [], chains: ["optimism", "arbitrum"]\n- "ETH/USDC trên Arbitrum" → tokens: ["ETH", "USDC"], chains: ["arbitrum"]\n\nChain canonical names: ethereum, arbitrum, polygon, bsc, base, optimism, avalanche\n\n**UNSUPPORTED CHAIN HANDLING**: If the user mentions a chain NOT in the list above (e.g. solana, fantom, cronos, sui, tron, near, etc.), you MUST still include it in the "chains" array exactly as mentioned. Do NOT silently ignore unsupported chains. The system will detect and notify the user.\n\n## SORT RULES\n- "best", "top", "largest", "highest TVL" → "tvl"\n- "most active", "highest volume" → "volume"\n- "highest yield", "best APR", "largest APR" → "apr"\n- "cheapest", "lowest fee" → "fee"\n- "highest liquidity", "most liquid", "deepest liquidity" → "liquidity"\n- Not specified → null\n\n## LIMIT\n- Default: 5 | "top 10" → 10 | "top 3" → 3 | Max: 20\n\n## ADDRESS / ID DETECTION\n- Hex address (0x...) with pool context → poolAddress, intent "pool_detail"\n- Numeric id ("pool id 962961", "position 12345", "position id 962961") → poolId as string, intent "position_detail"\n- "my pools"/"my positions"/"my liquidity" → intent "user_positions", walletAddress null\n- Hex address with position context → walletAddress, intent "user_positions"\n- "send/transfer position <id> to <0x...>" → poolId as string, toAddress as the recipient 0x address, intent "send_position"\n- "send position" / "transfer my position" without an id → poolId: null, toAddress: null, intent "send_position"\n\n## user_positions CHAIN RULES\n- No chain specified → chains: [] (system uses connected chain)\n- Chains specified → add all to chains array\n- "all chains" → chains: []\n\n## EXAMPLES\n"Show me ETH/USDC pools on Base" → {"intent":"search_pool","tokens":["ETH","USDC"],"chains":["base"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"Show me pool OP" → {"intent":"search_pool","tokens":["OP"],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"Show me pools on OP" → {"intent":"search_pool","tokens":[],"chains":["optimism"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"OP/USDC pool on ARB" → {"intent":"search_pool","tokens":["OP","USDC"],"chains":["arbitrum"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"What are trending pools?" → {"intent":"trending_pool","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":"volume","limit":5}\n"Best pool for ETH with high APR" → {"intent":"high_apr_pool","tokens":["ETH"],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":"apr","limit":5}\n"Pool la gi?" → {"intent":"general_pool_info","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"Show me pools" → {"intent":"search_pool","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":"tvl","limit":5}\n"Show my pools" → {"intent":"user_positions","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":20}\n"Pool của tôi trên Arbitrum" → {"intent":"user_positions","tokens":[],"chains":["arbitrum"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":20}\n"Show my liquidity on OP and ARB" → {"intent":"user_positions","tokens":[],"chains":["optimism","arbitrum"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":20}\n"Tell me about pool id 962961" → {"intent":"position_detail","tokens":[],"chains":[],"poolAddress":null,"poolId":"962961","walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"Position 12345 on Arbitrum" → {"intent":"position_detail","tokens":[],"chains":["arbitrum"],"poolAddress":null,"poolId":"12345","walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"find ETH pools" → {"intent":"search_pool","tokens":["ETH"],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":"tvl","limit":5}\n"Send position 962961 to 0xAbC123..." → {"intent":"send_position","tokens":[],"chains":[],"poolAddress":null,"poolId":"962961","walletAddress":null,"toAddress":"0xAbC123...","filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"Transfer my LP position to 0xdef..." → {"intent":"send_position","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"toAddress":"0xdef...","filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"Gửi position 12345" → {"intent":"send_position","tokens":[],"chains":[],"poolAddress":null,"poolId":"12345","walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"Send position" → {"intent":"send_position","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n\n## FOLLOW-UP / CONTINUATION DETECTION (CRITICAL)\nIf the user question is vague, short, or cannot stand alone (e.g., "yes", "show me ranges", "tell me more", "details", "go ahead", "the first one", "what about fees?", "show me ranges or get help adding liquidity"), you MUST:\n1. Look at the CONVERSATION HISTORY provided below the question.\n2. Extract tokens, chains, and intent from the previous messages (especially the last assistant message and the last user question that mentioned specific tokens/pools).\n3. Use that context to fill in tokens, chains, and intent — as if the user explicitly repeated their earlier query with the follow-up refinement.\n4. Example: If history shows user asked about "WBTC/ETH pools" and now says "show me ranges" → tokens: ["BTC", "ETH"], intent: appropriate intent for the follow-up.\n5. NEVER return tokens: [] for a follow-up when history clearly shows which tokens were discussed.\n\n## RULES\n- ALWAYS return valid JSON\n- NEVER hallucinate addresses\n- Detect intent from ANY language\n- When in doubt between intents, prefer "search_pool" over "unknown"${o}\n\n---\nUser question: "${e}"`;let a=null,s=null;for(let e=1;e<=5;e++)try{a=await kp.post("/api/gemini-cortex/proxy",{model:"gemini-2.5-flash-lite",data:{contents:[{parts:[{text:i}]}],generationConfig:{responseMimeType:"application/json"}}},{signal:t}),s=null;break}catch(r){if(s=r,Ep(r))throw r;e<5&&await xp(1e3,t)}if(!a)throw s instanceof Error?s:new Error("Pool parser API failed after retries");const c=a?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||a?.data?.candidates?.[0]?.content?.parts?.[0]?.text;if(!c)return null;let u=c.trim();u.startsWith("```json")?u=u.replace(/^```json\s*/,"").replace(/\s*```$/,""):u.startsWith("```")&&(u=u.replace(/^```\s*/,"").replace(/\s*```$/,""));const l=u.match(/\{[\s\S]*\}/);if(!l)return null;const f=function(e,t){const n=e.toLowerCase();if("user_positions"!==t.intent)for(const{alias:o,token:i,chain:a}of Tp)new RegExp(`\\b${Cp(o)}\\b`,"i").test(n)&&(Ip(n,o,a)?(t.chains.includes(a)||t.chains.push(a),t.tokens=t.tokens.filter(e=>e.toUpperCase()!==i)):(t.tokens.some(e=>e.toUpperCase()===i)||t.tokens.push(i),t.chains=t.chains.filter(e=>e!==a)));const r=t.chains.filter(e=>!up(e));return r.length>0&&(t.unsupportedChains=r),t.tokens=[...new Set(t.tokens.map(e=>e.toUpperCase()))],t.chains=[...new Set(t.chains.filter(e=>up(e)).map(e=>cp(e)))],t}(e,JSON.parse(l[0]));return(!f.limit||f.limit<1)&&(f.limit=5),f.limit>20&&(f.limit=20),Array.isArray(f.chains)||(f.chains=[]),void 0===f.poolId&&(f.poolId=null),void 0===f.walletAddress&&(f.walletAddress=null),void 0===f.toAddress&&(f.toAddress=null),f}catch(r){return null}}(t,a,i);if(!s)return null;if("unknown"===s.intent&&(s.intent="general_pool_info"),o&&!s.walletAddress&&(s.walletAddress=o),"send_position"===s.intent)return{response:"",parsed:s,pools:[],positions:[],sendPositionData:{positionId:s.poolId||""}};let c,u=[],l=[];if("position_detail"===s.intent&&s.poolId){const e=s.chains&&s.chains.length>0?s.chains:r?[r]:["ethereum"],t=await Promise.allSettled(e.map(e=>async function(e){const{positionId:t,chain:n,signal:r}=e,o=cp(n),i=`{\n position(id: "${t}") {\n id\n liquidity\n depositedToken0\n depositedToken1\n withdrawnToken0\n withdrawnToken1\n collectedFeesToken0\n collectedFeesToken1\n pool {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }\n }`,a=await lp(o,i,{},r);if(!a?.position?.pool)return null;const s=a.position,c=dp(s.pool,o),u=Number(s.pool?.feeTier||0),l=sp[u]??u/1e4;return{position:{positionId:s.id,poolAddress:s.pool?.id||"",pair:`${s.pool?.token0?.symbol}/${s.pool?.token1?.symbol}`,token0:{symbol:s.pool?.token0?.symbol||"",address:s.pool?.token0?.id||""},token1:{symbol:s.pool?.token1?.symbol||"",address:s.pool?.token1?.id||""},fee:l,chain:o,liquidity:s.liquidity,depositedToken0:s.depositedToken0,depositedToken1:s.depositedToken1,withdrawnToken0:s.withdrawnToken0,withdrawnToken1:s.withdrawnToken1,collectedFeesToken0:s.collectedFeesToken0,collectedFeesToken1:s.collectedFeesToken1},pool:c}}({positionId:s.poolId,chain:cp(e),signal:a})));for(const n of t)if("fulfilled"===n.status&&n.value){l.push(n.value.position);const e=n.value.pool.poolAddress;u.some(t=>t.poolAddress===e)||u.push(n.value.pool)}}else if("user_positions"===s.intent){if(s.walletAddress){const e=s.chains&&s.chains.length>0?s.chains:r?[r]:[];l=await async function(e){const{walletAddress:t,chains:n,signal:r}=e,o=n&&n.length>0?n:Object.keys(op),i=await Promise.allSettled(o.map(e=>async function(e,t,n){const r=`{\n positions(\n where: { owner: "${e.toLowerCase()}" }\n orderBy: id\n orderDirection: desc\n first: 100\n ) {\n id\n liquidity\n depositedToken0\n depositedToken1\n withdrawnToken0\n withdrawnToken1\n collectedFeesToken0\n collectedFeesToken1\n pool {\n id\n feeTier\n token0 { id symbol }\n token1 { id symbol }\n }\n }\n }`,o=await lp(t,r,{},n);return(o?.positions||[]).map(e=>{const n=Number(e.pool?.feeTier||0),r=sp[n]??n/1e4;return{positionId:e.id,poolAddress:e.pool?.id||"",pair:`${e.pool?.token0?.symbol}/${e.pool?.token1?.symbol}`,token0:{symbol:e.pool?.token0?.symbol||"",address:e.pool?.token0?.id||""},token1:{symbol:e.pool?.token1?.symbol||"",address:e.pool?.token1?.id||""},fee:r,chain:t,liquidity:e.liquidity,depositedToken0:e.depositedToken0,depositedToken1:e.depositedToken1,withdrawnToken0:e.withdrawnToken0,withdrawnToken1:e.withdrawnToken1,collectedFeesToken0:e.collectedFeesToken0,collectedFeesToken1:e.collectedFeesToken1}})}(t,e,r)));return i.filter(e=>"fulfilled"===e.status).flatMap(e=>e.value)}({walletAddress:s.walletAddress,chains:e,signal:a})}}else u=await async function(e,t,n){try{const r=e.chains&&e.chains.length>0?e.chains:[t||"ethereum"],o=await Promise.allSettled(r.map(t=>async function(e,t,n){switch(e.intent){case"pool_detail":if(e.poolAddress){const r=await async function(e){const{poolAddress:t,chain:n,signal:r}=e,o=cp(n),i=`{\n pool(id: "${t.toLowerCase()}") {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }`,a=await lp(o,i,{},r);return a?.pool?dp(a.pool,o):null}({poolAddress:e.poolAddress,chain:t,signal:n});return r?[r]:[]}if(e.poolId){const r=await vp({poolId:e.poolId,chain:t,signal:n});return r?[r]:[]}return bp({tokens:e.tokens,chain:t,sortBy:e.sortBy,filters:e.filters,signal:n});case"trending_pool":return Ap({chain:t,signal:n});case"best_pool":case"safe_pool":return bp({tokens:e.tokens,chain:t,sortBy:"tvl",filters:e.filters,signal:n});case"high_apr_pool":return bp({tokens:e.tokens,chain:t,sortBy:"apr",filters:e.filters,signal:n});case"low_fee_pool":return bp({tokens:e.tokens,chain:t,sortBy:"fee",filters:e.filters,signal:n});case"general_pool_info":return e.tokens.length>0?bp({tokens:e.tokens,chain:t,sortBy:"tvl",filters:e.filters,signal:n}):Ap({chain:t,signal:n});case"position_detail":if(e.poolId){const r=await vp({poolId:e.poolId,chain:t,signal:n});return r?[r]:[]}return[];default:return bp({tokens:e.tokens,chain:t,sortBy:e.sortBy||"tvl",filters:e.filters,signal:n})}}(e,t,n)));let i=o.filter(e=>"fulfilled"===e.status).flatMap(e=>e.value);const a=await wp();return a.length>0&&(i=yp(i,a)),"apr"===e.sortBy&&i.sort((e,t)=>(t.apr??0)-(e.apr??0)),i}catch(r){return[]}}(s,r,a);if(s.tokens.length>=2)try{const e=s.chains[0]||r||"ethereum",t=ap[cp(e)];if(t){const e=await Dp(t),n=s.tokens[0].toUpperCase(),r=s.tokens[1].toUpperCase(),o=e.filter(e=>{const t=e.token0.symbol.toUpperCase(),o=e.token1.symbol.toUpperCase();return t.includes(n)&&o.includes(r)||t.includes(r)&&o.includes(n)||n.includes(t)&&r.includes(o)||n.includes(o)&&r.includes(t)});o.length>0&&(c=o.map(e=>{const t=e.selectorAddress.toLowerCase()===e.token0.address.toLowerCase(),n=null!==e.priceMin?Number(e.priceMin):0,r=null!==e.priceMax?Number(e.priceMax):0,o=null!==e.priceCurrent?Number(e.priceCurrent):0,i=t?n:r>0?1/r:0,a=t?r:n>0?1/n:0,s=t?o:o>0?1/o:0,c=t?e.token0.symbol:e.token1.symbol,u=t?e.token1.symbol:e.token0.symbol;return{poolId:e.poolId,pair:`${e.token0.symbol}/${e.token1.symbol}`,token0Price:e.token0.price,token1Price:e.token1.price,fee:`${sp[Number(e.fee)]??Number(e.fee)/1e4}%`,apr:e.apr,aprAvg:e.aprAvg,priceRange:{minPrice:i,maxPrice:a,currentPrice:s,baseToken:c,quoteToken:u}}}).filter(e=>{const{minPrice:t,maxPrice:n,currentPrice:r}=e.priceRange;if(!r||!t&&!n)return!1;const o=Math.min(t,n),i=Math.max(t,n);return r>=o&&r<=i}),0===c.length&&(c=void 0))}}catch(d){}const f={question:t,parsed:s,chatHistory:i,data:{pools:u,positions:l.length>0?l:void 0,coinpoolPairs:c}};return{response:await Pp(f,n,a),parsed:s,pools:u,positions:l}}const Up=Ad()?.apiExternal?.keyringPool,Lp=Ad()?.apiExternal?.baseUrl,Dp=async e=>{try{const t=await fetch(`${Lp}/pair/pure-list?chainId=${encodeURIComponent(e)}`);if(!t.ok)throw new Error(`HTTP ${t.status}`);const n=await t.json(),r=n?.pairs||[],o=await(async e=>{if(e?.length>0){const t=e[0]?.chainId,n=[];if(e.forEach(e=>{e?.transaction?.length>0&&e.transaction.forEach(e=>{e?.nftId&&n.push(e.nftId)})}),n.length>0)return(async(e,t)=>{const n=tp.chunk(t,200);return(await Promise.allSettled(n.map(async t=>{const n=new URLSearchParams({tokenIds:t.join(","),chainId:String(e)}),r=await fetch(`${Up}/user/positions-details/v3?${n}`);if(!r.ok)throw new Error(`HTTP ${r.status}`);return r.json()}))).map(e=>"fulfilled"===e?.status&&(e?.value?.data||e?.value)||[]).flat()})(t,n)}return[]})(r.map(t=>({...t,chainId:e}))),i=/* @__PURE__ */new Map;for(const e of o){const t=String(e?.tokenId||"");t&&i.set(t,e)}return r.map(e=>{let t=null;for(const n of e.transaction||[])if(n.nftId&&(t=i.get(n.nftId),t))break;return{...e,apr:t?.apr??null,aprAvg:t?.aprAvg??null,priceCurrent:t?.tick?.currentTick??null,priceMin:t?.tick?.minTick??null,priceMax:t?.tick?.maxTick??null}})}catch(t){return[]}},Fp=e=>e?`**CRITICAL - LANGUAGE**: Respond in the specified language: "${e||"detect from current question"}". Do NOT follow language from conversation history.`:"**CRITICAL - LANGUAGE**: You MUST detect the language of the user's CURRENT question and respond ONLY in that exact language. Ignore the language of previous messages in conversation history — only the current question matters. If the current question is in English, respond in English. If in Vietnamese, respond in Vietnamese. NEVER default to Chinese or any other language.";function qp(e,t,n){if(!e)return e;const r=e.toLowerCase().trim();if("max"===r||"all"===r)return t||e;const o=r.match(/^(\d+(?:\.\d+)?)%$/);if(o){const e=parseFloat(o[1])/100;return((parseFloat(t)||0)*e).toFixed(8).replace(/\.?0+$/,"")||"0"}const i=r.match(/^\$?(\d+(?:\.\d+)?)\$?$/),a=r.startsWith("$")||r.endsWith("$")||/\d(usd|dollar|dollars|đô|đồng)$/.test(r);if(i&&a){const t=parseFloat(i[1]);return n&&n>0?(t/n).toFixed(8).replace(/\.?0+$/,"")||"0":e}const s=r.match(/^(\d+(?:\.\d+)?)\s*(?:usd|dollar|dollars|đô|đồng)$/);if(s){const t=parseFloat(s[1]);return n&&n>0?(t/n).toFixed(8).replace(/\.?0+$/,"")||"0":e}return e}function Hp(e){try{let t=e?.trim()||"";return t.startsWith("```json")?t=t.replace(/^```json\s*/,"").replace(/\s*```$/,""):t.startsWith("```")&&(t=t.replace(/^```\s*/,"").replace(/\s*```$/,"")),JSON.parse(function(e){const t=e.indexOf("{");if(-1===t)return e;let n=0,r=!1,o=!1;for(let i=t;i<e.length;i++){const a=e[i];if(o)o=!1;else if("\\"===a&&r)o=!0;else if('"'!==a){if(!r)if("{"===a)n++;else if("}"===a&&(n--,0===n))return e.slice(t,i+1)}else r=!r}return e}(t))}catch{return null}}function Vp(t){const n=[],r=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]*)\]\(([^)]+)\)|(https?:\/\/[^\s<>]+)|\*\*(.+?)\*\*|__(.+?)__|\*(.+?)\*|_(.+?)_|~~(.+?)~~|`([^`]+)`/g;let o,i=0;for(;null!==(o=r.exec(t));)o.index>i&&n.push(t.slice(i,o.index)),void 0!==o[1]||void 0!==o[2]?n.push(
15
+ /* @__PURE__ */n("div",{className:"action-form-field-label",children:[f(o.label),o.required&&" *"]}),"amount"===o.key&&u&&"send_nft"!==t&&/* @__PURE__ */n("div",{className:"action-form-pct-btns",children:[[25,50,75].map(e=>/* @__PURE__ */n("button",{type:"button",className:"action-form-pct-btn",onClick:()=>A("amount",rh(u.balanceFormatted).multipliedBy(e).dividedBy(100).decimalPlaces(u.decimals,rh.ROUND_DOWN).toFixed()),disabled:c||d,children:[e,"%"]},e)),
16
+ /* @__PURE__ */e("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>A("amount",u.balanceFormatted),disabled:c||d,children:f("formMax")})]}),"amount"===o.key&&"send_nft"===t&&l&&/* @__PURE__ */e("div",{className:"action-form-pct-btns",children:/* @__PURE__ */e("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>A("amount",r.maxAmount||""),disabled:c||d,children:f("formMax")})})]}),(()=>{const t=!1===o.editable&&!!r[o.key]||d,n=c||t,i=[b[o.key]?"error":"",t?"readonly":""].filter(Boolean).join(" ");return"address"===o.type?/* @__PURE__ */e("textarea",{rows:2,placeholder:o.placeholder,value:m[o.key]||"",onChange:e=>A(o.key,e.target.value),className:i,disabled:n||d}):/* @__PURE__ */e("input",{type:"number"===o.type?"number":"text",placeholder:o.placeholder,value:m[o.key]||"",onChange:e=>A(o.key,e.target.value),className:i,disabled:n||d})})(),b[o.key]&&/* @__PURE__ */e("span",{className:"field-error",children:b[o.key]})]},o.key))}),!d&&/* @__PURE__ */n("div",{className:"action-form-actions",children:[
17
+ /* @__PURE__ */e("button",{className:"message-button",onClick:s,type:"button",disabled:c,children:f("formCancel")}),
18
+ /* @__PURE__ */e("button",{className:"message-button",onClick:T,type:"button",disabled:c,children:f(c?"formProcessing":"formExecute")})]})]}):null},ih=({scrollContainerRef:t,threshold:n=200})=>{const[r,a]=o(!1);return i(()=>{const e=t.current;if(!e)return;const r=()=>{const{scrollTop:t,scrollHeight:r,clientHeight:o}=e;a(r-t-o>n)};return e.addEventListener("scroll",r,{passive:!0}),r(),()=>{e.removeEventListener("scroll",r)}},[t,n]),r?/* @__PURE__ */e("button",{className:"scroll-to-bottom-btn",onClick:()=>{t.current?.scrollTo({top:t.current.scrollHeight,behavior:"smooth"})},"aria-label":"Scroll to bottom",type:"button",children:/* @__PURE__ */e("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:/* @__PURE__ */e("path",{d:"M9 3V15M9 15L4 10M9 15L14 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}):null};var ah,sh,ch={},uh={exports:{}},lh=uh.exports;var dh=function(){if(sh)return ch;sh=1,Object.defineProperty(ch,"S",{value:!0});var e,t=r,n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,o=function(){return ah||(ah=1,e=uh,t=uh.exports,function(n,r){var o="function",i="undefined",a="object",s="string",c="major",u="model",l="name",d="type",f="vendor",h="version",p="architecture",m="console",w="mobile",g="tablet",y="smarttv",b="wearable",v="embedded",A="Amazon",k="Apple",T="ASUS",E="BlackBerry",x="Browser",C="Chrome",I="Firefox",S="Google",N="Honor",B="Huawei",M="LG",P="Microsoft",O="Motorola",R="Nvidia",U="OnePlus",L="Opera",D="OPPO",F="Samsung",q="Sharp",H="Sony",V="Xiaomi",W="Zebra",j="Facebook",Y="Chromium OS",z="Mac OS",G=" Browser",J=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},X=function(e,t){return typeof e===s&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},Q=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===i?e:e.substring(0,500)},Z=function(e,t){for(var n,i,s,c,u,l,d=0;d<t.length&&!u;){var f=t[d],h=t[d+1];for(n=i=0;n<f.length&&!u&&f[n];)if(u=f[n++].exec(e))for(s=0;s<h.length;s++)l=u[++i],typeof(c=h[s])===a&&c.length>0?2===c.length?typeof c[1]==o?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:3===c.length?typeof c[1]!==o||c[1].exec&&c[1].test?this[c[0]]=l?l.replace(c[1],c[2]):r:this[c[0]]=l?c[1].call(this,l,c[2]):r:4===c.length&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):r):this[c]=l||r;d+=2}},_=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var o=0;o<t[n].length;o++)if(X(t[n][o],e))return"?"===n?r:n}else if(X(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},$={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ee={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,h],[/opios[\/ ]+([\w\.]+)/i],[h,[l,L+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[l,L+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[l,L]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[l,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[l,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[h,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[l,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[l,"Smart Lenovo "+x]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+x],h],[/\bfocus\/([\w\.]+)/i],[h,[l,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[l,L+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[l,L+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[l,"MIUI"+G]],[/fxios\/([\w\.-]+)/i],[h,[l,I]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[l,"360"]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+G],h],[/samsungbrowser\/([\w\.]+)/i],[h,[l,F+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[h,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[l,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,j],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[l,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[l,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,C+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[l,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[h,_,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[l,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[l,I+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[l,[h,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[h,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[p,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[p,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[p,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[p,/ower/,"",K]],[/ sun4\w[;\)]/i],[[p,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[p,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[f,F],[d,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[u,[f,F],[d,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[f,k],[d,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[f,k],[d,g]],[/(macintosh);/i],[u,[f,k]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[f,q],[d,w]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[u,[f,N],[d,g]],[/honor([-\w ]+)[;\)]/i],[u,[f,N],[d,w]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[u,[f,B],[d,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[f,B],[d,w]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[u,/_/g," "],[f,V],[d,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[u,/_/g," "],[f,V],[d,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[f,D],[d,w]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[u,[f,_,{OnePlus:["304","403","203"],"*":D}],[d,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[f,"Vivo"],[d,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[f,"Realme"],[d,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[f,O],[d,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[f,O],[d,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[f,M],[d,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[f,M],[d,w]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[u,[f,"Lenovo"],[d,g]],[/(nokia) (t[12][01])/i],[f,u,[d,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[u,/_/g," "],[d,w],[f,"Nokia"]],[/(pixel (c|tablet))\b/i],[u,[f,S],[d,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[f,S],[d,w]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[f,H],[d,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[f,H],[d,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[f,U],[d,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[f,A],[d,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[f,A],[d,w]],[/(playbook);[-\w\),; ]+(rim)/i],[u,f,[d,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[f,E],[d,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[f,T],[d,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[f,T],[d,w]],[/(nexus 9)/i],[u,[f,"HTC"],[d,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[u,/_/g," "],[d,w]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[u,[f,"TCL"],[d,g]],[/(itel) ((\w+))/i],[[f,K],u,[d,_,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[f,"Acer"],[d,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[f,"Meizu"],[d,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[f,"Ulefone"],[d,w]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[u,[f,"Energizer"],[d,w]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[u,[f,"Cat"],[d,w]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[u,[f,"Smartfren"],[d,w]],[/droid.+; (a(?:015|06[35]|142p?))/i],[u,[f,"Nothing"],[d,w]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[u,[f,"Archos"],[d,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[u,[f,"Archos"],[d,w]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[f,u,[d,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[f,u,[d,w]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,u,[d,g]],[/(surface duo)/i],[u,[f,P],[d,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[f,"Fairphone"],[d,w]],[/(u304aa)/i],[u,[f,"AT&T"],[d,w]],[/\bsie-(\w*)/i],[u,[f,"Siemens"],[d,w]],[/\b(rct\w+) b/i],[u,[f,"RCA"],[d,g]],[/\b(venue[\d ]{2,7}) b/i],[u,[f,"Dell"],[d,g]],[/\b(q(?:mv|ta)\w+) b/i],[u,[f,"Verizon"],[d,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[f,"Barnes & Noble"],[d,g]],[/\b(tm\d{3}\w+) b/i],[u,[f,"NuVision"],[d,g]],[/\b(k88) b/i],[u,[f,"ZTE"],[d,g]],[/\b(nx\d{3}j) b/i],[u,[f,"ZTE"],[d,w]],[/\b(gen\d{3}) b.+49h/i],[u,[f,"Swiss"],[d,w]],[/\b(zur\d{3}) b/i],[u,[f,"Swiss"],[d,g]],[/\b((zeki)?tb.*\b) b/i],[u,[f,"Zeki"],[d,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],u,[d,g]],[/\b(ns-?\w{0,9}) b/i],[u,[f,"Insignia"],[d,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[f,"NextBook"],[d,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],u,[d,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],u,[d,w]],[/\b(ph-1) /i],[u,[f,"Essential"],[d,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[f,"Envizen"],[d,g]],[/\b(trio[-\w\. ]+) b/i],[u,[f,"MachSpeed"],[d,g]],[/\btu_(1491) b/i],[u,[f,"Rotor"],[d,g]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[u,[f,R],[d,g]],[/(sprint) (\w+)/i],[f,u,[d,w]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[f,P],[d,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[f,W],[d,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[f,W],[d,w]],[/smart-tv.+(samsung)/i],[f,[d,y]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[f,F],[d,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,M],[d,y]],[/(apple) ?tv/i],[f,[u,k+" TV"],[d,y]],[/crkey/i],[[u,C+"cast"],[f,S],[d,y]],[/droid.+aft(\w+)( bui|\))/i],[u,[f,A],[d,y]],[/(shield \w+ tv)/i],[u,[f,R],[d,y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[f,q],[d,y]],[/(bravia[\w ]+)( bui|\))/i],[u,[f,H],[d,y]],[/(mi(tv|box)-?\w+) bui/i],[u,[f,V],[d,y]],[/Hbbtv.*(technisat) (.*);/i],[f,u,[d,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,Q],[u,Q],[d,y]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[u,[d,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,u,[d,m]],[/droid.+; (shield)( bui|\))/i],[u,[f,R],[d,m]],[/(playstation \w+)/i],[u,[f,H],[d,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[f,P],[d,m]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[u,[f,F],[d,b]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[f,u,[d,b]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[u,[f,D],[d,b]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[f,k],[d,b]],[/(opwwe\d{3})/i],[u,[f,U],[d,b]],[/(moto 360)/i],[u,[f,O],[d,b]],[/(smartwatch 3)/i],[u,[f,H],[d,b]],[/(g watch r)/i],[u,[f,M],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[f,W],[d,b]],[/droid.+; (glass) \d/i],[u,[f,S],[d,b]],[/(pico) (4|neo3(?: link|pro)?)/i],[f,u,[d,b]],[/; (quest( \d| pro)?)/i],[u,[f,j],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[d,v]],[/(aeobc)\b/i],[u,[f,A],[d,v]],[/(homepod).+mac os/i],[u,[f,k],[d,v]],[/windows iot/i],[[d,v]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[d,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,w]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[u,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[l,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[l,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,h],[/ladybird\//i],[[l,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,h],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[l,[h,_,$]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,_,$],[l,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,z],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,l],[/(ubuntu) ([\w\.]+) like android/i],[[l,/(.+)/,"$1 Touch"],h],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[l,h],[/\(bb(10);/i],[h,[l,E]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[h,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[l,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[l,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,Y],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,h],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,h]]},te=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof te))return new te(e,t).getResult();var m=typeof n!==i&&n.navigator?n.navigator:r,y=e||(m&&m.userAgent?m.userAgent:""),b=m&&m.userAgentData?m.userAgentData:r,v=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(ee,t):ee,A=m&&m.userAgent==y;return this.getBrowser=function(){var e,t={};return t[l]=r,t[h]=r,Z.call(t,y,v.browser),t[c]=typeof(e=t[h])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r,A&&m&&m.brave&&typeof m.brave.isBrave==o&&(t[l]="Brave"),t},this.getCPU=function(){var e={};return e[p]=r,Z.call(e,y,v.cpu),e},this.getDevice=function(){var e={};return e[f]=r,e[u]=r,e[d]=r,Z.call(e,y,v.device),A&&!e[d]&&b&&b.mobile&&(e[d]=w),A&&"Macintosh"==e[u]&&m&&typeof m.standalone!==i&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[u]="iPad",e[d]=g),e},this.getEngine=function(){var e={};return e[l]=r,e[h]=r,Z.call(e,y,v.engine),e},this.getOS=function(){var e={};return e[l]=r,e[h]=r,Z.call(e,y,v.os),A&&!e[l]&&b&&b.platform&&"Unknown"!=b.platform&&(e[l]=b.platform.replace(/chrome os/i,Y).replace(/macos/i,z)),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 y},this.setUA=function(e){return y=typeof e===s&&e.length>500?Q(e,500):e,this},this.setUA(y),this};te.VERSION="1.0.41",te.BROWSER=J([l,h,c]),te.CPU=J([p]),te.DEVICE=J([u,f,d,m,w,y,g,b,v]),te.ENGINE=te.OS=J([l,h]),e.exports&&(t=e.exports=te),t.UAParser=te;var ne=typeof n!==i&&(n.jQuery||n.Zepto);if(ne&&!ne.ua){var re=new te;ne.ua=re.getResult(),ne.ua.get=function(){return re.getUA()},ne.ua.set=function(e){re.setUA(e);var t=re.getResult();for(var n in t)ne.ua[n]=t[n]}}}("object"==typeof window?window:lh)),uh.exports;var e,t}(),i=new o,a=i.getBrowser(),s=i.getCPU(),c=i.getDevice(),u=i.getEngine(),l=i.getOS(),d=i.getUA(),f=function(e){return i.setUA(e)},h=function(e){if(e){var t=new o(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}},p=/* @__PURE__ */Object.freeze({ClientUAInstance:i,browser:a,cpu:s,device:c,engine:u,os:l,ua:d,setUa:f,parseUserAgent:h});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 w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E="mobile",x="tablet",C="smarttv",I="console",S="wearable",N="embedded",B=void 0,M={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},P={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},O={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},R=function(e){return e||(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none")},U=function(){return!("undefined"==typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},L=function(e){var t=U();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},D=function(e){return e.type===E},F=function(e){return e.type===x},q=function(e){var t=e.type;return t===E||t===x},H=function(e){return e.type===C},V=function(e){return e.type===B},W=function(e){return e.type===S},j=function(e){return e.type===I},Y=function(e){return e.type===N},z=function(e){var t=e.vendor;return R(t)},G=function(e){var t=e.model;return R(t)},J=function(e){var t=e.type;return R(t,"browser")},X=function(e){return e.name===P.Android},K=function(e){return e.name===P.Windows},Q=function(e){return e.name===P.MAC_OS},Z=function(e){return e.name===P.WindowsPhone},_=function(e){return e.name===P.IOS},$=function(e){var t=e.version;return R(t)},ee=function(e){var t=e.name;return R(t)},te=function(e){return e.name===M.Chrome},ne=function(e){return e.name===M.Firefox},re=function(e){return e.name===M.Chromium},oe=function(e){return e.name===M.Edge},ie=function(e){return e.name===M.Yandex},ae=function(e){var t=e.name;return t===M.Safari||t===M.MobileSafari},se=function(e){return e.name===M.MobileSafari},ce=function(e){return e.name===M.Opera},ue=function(e){var t=e.name;return t===M.InternetExplorer||t===M.Ie},le=function(e){return e.name===M.MIUI},de=function(e){return e.name===M.SamsungBrowser},fe=function(e){var t=e.version;return R(t)},he=function(e){var t=e.major;return R(t)},pe=function(e){var t=e.name;return R(t)},me=function(e){var t=e.name;return R(t)},we=function(e){var t=e.version;return R(t)},ge=function(){var e=U(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"==typeof t&&/electron/.test(t)},ye=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},be=function(){var e=U();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream},ve=function(){return L("iPad")},Ae=function(){return L("iPhone")},ke=function(){return L("iPod")},Te=function(e){return R(e)};function Ee(e){var t=e||p,n=t.device,r=t.browser,o=t.os,i=t.engine,a=t.ua;return{isSmartTV:H(n),isConsole:j(n),isWearable:W(n),isEmbedded:Y(n),isMobileSafari:se(r)||ve(),isChromium:re(r),isMobile:q(n)||ve(),isMobileOnly:D(n),isTablet:F(n)||ve(),isBrowser:V(n),isDesktop:V(n),isAndroid:X(o),isWinPhone:Z(o),isIOS:_(o)||ve(),isChrome:te(r),isFirefox:ne(r),isSafari:ae(r),isOpera:ce(r),isIE:ue(r),osVersion:$(o),osName:ee(o),fullBrowserVersion:fe(r),browserVersion:he(r),browserName:pe(r),mobileVendor:z(n),mobileModel:G(n),engineName:me(i),engineVersion:we(i),getUA:Te(a),isEdge:oe(r)||ye(a),isYandex:ie(r),deviceType:J(n),isIOS13:be(),isIPad13:ve(),isIPhone13:Ae(),isIPod13:ke(),isElectron:ge(),isEdgeChromium:ye(a),isLegacyEdge:oe(r)&&!ye(a),isWindows:K(o),isMacOs:Q(o),isMIUI:le(r),isSamsungBrowser:de(r)}}var xe=H(c),Ce=j(c),Ie=W(c),Se=Y(c),Ne=se(a)||ve(),Be=re(a),Me=q(c)||ve(),Pe=D(c),Oe=F(c)||ve(),Re=V(c),Ue=V(c),Le=X(l),De=Z(l),Fe=_(l)||ve(),qe=te(a),He=ne(a),Ve=ae(a),We=ce(a),je=ue(a),Ye=$(l),ze=ee(l),Ge=fe(a),Je=he(a),Xe=pe(a),Ke=z(c),Qe=G(c),Ze=me(u),_e=we(u),$e=Te(d),et=oe(a)||ye(d),tt=ie(a),nt=J(c),rt=be(),ot=ve(),it=Ae(),at=ke(),st=ge(),ct=ye(d),ut=oe(a)&&!ye(d),lt=K(l),dt=Q(l),ft=le(a),ht=de(a);function pt(e){var t=e||window.navigator.userAgent;return h(t)}return ch.AndroidView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Le?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.BrowserTypes=M,ch.BrowserView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Re?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.ConsoleView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Ce?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.CustomView=function(e){var r=e.renderWithFragment,o=e.children;e.viewClassName,e.style;var i=e.condition,a=A(e,["renderWithFragment","children","viewClassName","style","condition"]);return i?r?n.createElement(t.Fragment,null,o):n.createElement("div",a,o):null},ch.IEView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return je?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.IOSView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Fe?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.MobileOnlyView=function(e){var r=e.renderWithFragment,o=e.children;e.viewClassName,e.style;var i=A(e,["renderWithFragment","children","viewClassName","style"]);return Pe?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.MobileView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Me?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.OsTypes=P,ch.SmartTVView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return xe?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.TabletView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Oe?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.WearableView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return Ie?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.WinPhoneView=function(e){var r=e.renderWithFragment,o=e.children,i=A(e,["renderWithFragment","children"]);return De?r?n.createElement(t.Fragment,null,o):n.createElement("div",i,o):null},ch.browserName=Xe,ch.browserVersion=Je,ch.deviceDetect=function(e){var t=e?h(e):p,n=t.device,r=t.browser,o=t.engine,i=t.os,a=t.ua,s=function(e){switch(e){case E:return{isMobile:!0};case x:return{isTablet:!0};case C:return{isSmartTV:!0};case I:return{isConsole:!0};case S:return{isWearable:!0};case B:return{isBrowser:!0};case N:return{isEmbedded:!0};default:return O}}(n.type),c=s.isBrowser,u=s.isMobile,l=s.isTablet,d=s.isSmartTV,f=s.isConsole,w=s.isWearable,y=s.isEmbedded;return c?function(e,t,n,r,o){return{isBrowser:e,browserMajorVersion:R(t.major),browserFullVersion:R(t.version),browserName:R(t.name),engineName:R(n.name),engineVersion:R(n.version),osName:R(r.name),osVersion:R(r.version),userAgent:R(o)}}(c,r,o,i,a):d?function(e,t,n,r){return{isSmartTV:e,engineName:R(t.name),engineVersion:R(t.version),osName:R(n.name),osVersion:R(n.version),userAgent:R(r)}}(d,o,i,a):f?function(e,t,n,r){return{isConsole:e,engineName:R(t.name),engineVersion:R(t.version),osName:R(n.name),osVersion:R(n.version),userAgent:R(r)}}(f,o,i,a):u||l?function(e,t,n,r){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e,{vendor:R(t.vendor),model:R(t.model),os:R(n.name),osVersion:R(n.version),ua:R(r)})}(s,n,i,a):w?function(e,t,n,r){return{isWearable:e,engineName:R(t.name),engineVersion:R(t.version),osName:R(n.name),osVersion:R(n.version),userAgent:R(r)}}(w,o,i,a):y?function(e,t,n,r,o){return{isEmbedded:e,vendor:R(t.vendor),model:R(t.model),engineName:R(n.name),engineVersion:R(n.version),osName:R(r.name),osVersion:R(r.version),userAgent:R(o)}}(y,n,o,i,a):void 0},ch.deviceType=nt,ch.engineName=Ze,ch.engineVersion=_e,ch.fullBrowserVersion=Ge,ch.getSelectorsByUserAgent=function(e){if(e&&"string"==typeof e){var t=h(e);return Ee({device:t.device,browser:t.browser,os:t.os,engine:t.engine,ua:t.ua})}},ch.getUA=$e,ch.isAndroid=Le,ch.isBrowser=Re,ch.isChrome=qe,ch.isChromium=Be,ch.isConsole=Ce,ch.isDesktop=Ue,ch.isEdge=et,ch.isEdgeChromium=ct,ch.isElectron=st,ch.isEmbedded=Se,ch.isFirefox=He,ch.isIE=je,ch.isIOS=Fe,ch.isIOS13=rt,ch.isIPad13=ot,ch.isIPhone13=it,ch.isIPod13=at,ch.isLegacyEdge=ut,ch.isMIUI=ft,ch.isMacOs=dt,ch.isMobile=Me,ch.isMobileOnly=Pe,ch.isMobileSafari=Ne,ch.isOpera=We,ch.isSafari=Ve,ch.isSamsungBrowser=ht,ch.isSmartTV=xe,ch.isTablet=Oe,ch.isWearable=Ie,ch.isWinPhone=De,ch.isWindows=lt,ch.isYandex=tt,ch.mobileModel=Qe,ch.mobileVendor=Ke,ch.osName=ze,ch.osVersion=Ye,ch.parseUserAgent=h,ch.setUserAgent=function(e){return f(e)},ch.useDeviceData=pt,ch.useDeviceSelectors=function(e){var t=pt(e||window.navigator.userAgent);return[Ee(t),t]},ch.useMobileOrientation=function(){var e=function(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){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(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.")}()}(t.useState(function(){var e=window.innerWidth>window.innerHeight?90:0;return{isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"}}),2),n=e[0],r=e[1],o=t.useCallback(function(){var e=window.innerWidth>window.innerHeight?90:0,t={isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"};n.orientation!==t.orientation&&r(t)},[n.orientation]);return t.useEffect(function(){return void 0!==("undefined"==typeof window?"undefined":w(window))&&Me&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),n},ch.withOrientationChange=function(e){/* @__PURE__ */
19
+ return function(t){function r(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(t=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}(this,b(r).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(k(t)),t.onOrientationChange=t.onOrientationChange.bind(k(t)),t.onPageLoad=t.onPageLoad.bind(k(t)),t.state={isLandscape:!1,isPortrait:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(r,t),o=r,(i=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"==typeof window?"undefined":w(window))&&Me&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return n.createElement(e,y({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,i),r;var o,i}(n.Component)},ch}();let fh=null;function hh(){fh?.()}function ph(e){fh=e}const mh="dataBuyToken",wh={srcTokenAddress:"",descTokenAddress:"",amount:"",srcTokenDecimals:18,descTokenDecimals:18};class gh{baseUrl;constructor(e){this.baseUrl=e}buildUrl(e,t){const n=new URL(e,this.baseUrl);return t&&Object.entries(t).forEach(([e,t])=>{null!=t&&n.searchParams.append(e,String(t))}),n.toString()}async get(e,t={}){const n=this.buildUrl(e,t.query),r=await fetch(n,{method:"GET",headers:t.headers||{},signal:t.signal});if(!r.ok){let e=null;try{e=await r.json()}catch{try{const t=await r.text();t&&(e={message:t})}catch{}}const t=new Error(e?.message||e?.errorMessage||`HTTP ${r.status}: ${r.statusText}`);throw t.status=r.status,t.statusText=r.statusText,e&&(t.data=e),t}return{data:await r.json(),status:r.status}}async post(e,t,n={}){const r=this.buildUrl(e,n.query),o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",...n.headers},body:JSON.stringify(t),signal:n.signal});if(!o.ok){let e=null;try{e=await o.json()}catch{try{const t=await o.text();t&&(e={message:t})}catch{}}const t=new Error(e?.message||e?.errorMessage||`HTTP ${o.status}: ${o.statusText}`);throw t.status=o.status,t.statusText=o.statusText,e&&(t.data=e),t}return{data:await o.json(),status:o.status}}}const yh=new class extends gh{constructor(){super("https://wallet-api.pantograph.app")}async getTokensDetails(e,t="base"){try{if(!e||!Array.isArray(e)||0===e.length)throw new Error("Addresses must be a non-empty array");const n=e.join(","),r=await this.get(`/keyrings/tokens/${t}/v2`,{query:{addresses:n}});return Array.isArray(r.data)&&(r.data=r.data.filter((e,t,n)=>t===n.findIndex(t=>t.address.toLowerCase()===e.address.toLowerCase())),Array.isArray(e)&&e.length>0&&(r.data=r.data.filter(t=>e.some(e=>e.toLowerCase()===t.address.toLowerCase())),r.data.sort((t,n)=>e.findIndex(e=>e.toLowerCase()===t.address.toLowerCase())-e.findIndex(e=>e.toLowerCase()===n.address.toLowerCase())))),r}catch(n){throw n}}async getTokenDetail(e,t="base"){try{if(!e)throw new Error("Address is required");const n=await this.getTokensDetails([e],t);return{data:n.data[0]||null,status:n.status}}catch(n){throw n}}async getTopGainers(e="base",t="24h",n=3){try{return await this.get(`/token-list/top-gainers/${e}`,{query:{duration:t,limit:n}})}catch(r){throw r}}async searchTokensByKey(e,t){try{if(!e)throw new Error("key is required");const n=await this.get("/token-list",{query:{chainId:t,key:e}});let r=n.data;return r=Object.values(r).flat(),Array.isArray(r)&&(r=r.map(e=>({...e,decimals:null!=e.decimals?Number(e.decimals):18,price:null!=e.price?Number(e.price):void 0}))),n.data=r,n}catch(n){throw n}}};function bh(e,t){return new Promise(n=>{const r=setTimeout(n,e);t?.addEventListener("abort",()=>{clearTimeout(r),n()},{once:!0})})}const vh=Af()?.webAppUrl||"https://nft.keyring.app",Ah=new gh("https://wallet-api.pantograph.app"),kh=vh,Th=new gh(kh);async function Eh(e){const{address:t,chain:n="base",token_addresses:r,exclude_spam:o,exclude_unverified_contracts:i}=e;if(!t)throw new Error("Address is required");let a="Unknown error";for(let u=1;u<=5;u++)try{const e={chain:n,exclude_spam:o??!1,exclude_unverified_contracts:i??!1};r&&(e.token_addresses=r);const a=(await Th.get(`api/moralis/proxy/wallets/${encodeURIComponent(t)}/tokens`,{query:e})).data;if(a?.result?.length>0){a.result=a.result.filter(e=>new rh(e?.balance||0).gt(0)),a.result=a.result.map(e=>({...e,token_address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"===e.token_address?ko:e.token_address}));try{if(a.result.length>0){const e=Uo(n)??n,t=a.result.map(e=>e.token_address),r=await Ah.get(`/keyrings/tokens/${e}/v2`,{query:{addresses:t.join(",")}});if(Array.isArray(r.data)){const e=/* @__PURE__ */new Map;for(const t of r.data)t.address&&e.set(t.address.toLowerCase(),{price:null!=t.price?parseFloat(String(t.price)):NaN,icon_image:t.icon_image});a.result=a.result.map(t=>{const n=e.get(t.token_address.toLowerCase());if(!n)return t;const r={...t};return n.icon_image&&(r.logo=n.icon_image,r.thumbnail=n.icon_image),isNaN(n.price)||(r.usd_price=n.price,r.usd_value=rh(t.balance_formatted||"0").multipliedBy(n.price).toNumber()),r}),a.result=a.result.filter(e=>null==e.usd_value||new rh(e.usd_value).gte(.01))}}}catch(s){}}return{success:!0,data:a}}catch(c){a=c instanceof Error?c.message:"Unknown error",u<5&&await bh(1e3)}return{success:!1,error:a}}async function xh(e){const{address:t,chain:n="base",signal:r}=e;if(!t)throw new Error("Token address is required");let o="Unknown error";for(let a=1;a<=5;a++){if(r?.aborted)return{success:!1,error:"Request cancelled"};try{const e=Uo(n)??n,i=await Ah.get(`/keyrings/tokens/${e}/v2`,{query:{addresses:t},signal:r}),s=t===ko,c=(Array.isArray(i.data)?i.data:[]).find(e=>e.address?.toLowerCase()===t.toLowerCase()||s&&""===e.address)??null;if(c)return{success:!0,data:{token_address:c.address??t,name:c.name??"",symbol:c.symbol??"",decimals:null!=c.decimals?Number(c.decimals):18,logo:c.icon_image||c.logo,thumbnail:c.icon_image||c.logo,usd_price:null!=c.price?parseFloat(c.price):void 0,usd_price_24hr_percent_change:c.price_change_percentage_24h??void 0,usd_price_24hr_usd_change:c.price_change_24h??void 0}};const[u,l]=await Promise.allSettled([Th.get("api/moralis/proxy/erc20/metadata",{query:{chain:n,addresses:[t]},signal:r}),Th.get(`api/moralis/proxy/erc20/${encodeURIComponent(t)}/price`,{query:{chain:n,include:"percent_change"},signal:r})]),d="fulfilled"===u.status?u.value.data:[];if(!d||0===d.length){if(o="Token metadata not found",a<5&&await bh(1e3,r),r?.aborted)return{success:!1,error:"Request cancelled"};continue}const f=d[0],h="fulfilled"===l.status?l.value.data:void 0;return{success:!0,data:{token_address:f.token_address,name:f.name,symbol:f.symbol,decimals:f.decimals,logo:f.logo||f.thumbnail,thumbnail:f.thumbnail,usd_price:h?.usdPrice??void 0,usd_price_24hr_percent_change:h?.["24hrPercentChange"]?parseFloat(h["24hrPercentChange"]):void 0,usd_price_24hr_usd_change:h?.usdPriceChange24hr??void 0}}}catch(i){if(r?.aborted)return{success:!1,error:"Request cancelled"};if(o=i instanceof Error?i.message:"Unknown error",a<5&&await bh(1e3,r),r?.aborted)return{success:!1,error:"Request cancelled"}}}return{success:!1,error:o}}async function Ch(e){const{prompt:t,model:n="gpt-4.1-mini",stream:r=!1,systemPrompt:o,signal:i}=e;if(!t)throw new Error("Prompt is required");const a=new gh(kh),s=o?`${o}\n\n---\n\n Current User's question: ${t}`:t;let c="Unknown error";for(let l=1;l<=5;l++){if(i?.aborted)return{success:!1,error:"Request cancelled"};try{const e=(await a.post("api/moralis-cortex/proxy/chat",{prompt:s,model:n,stream:r},{headers:{Accept:"application/json","Content-Type":"application/json"},signal:i})).data;if(!e?.text?.trim()){if(c="Empty response from Cortex AI",l<5&&await bh(1e3,i),i?.aborted)return{success:!1,error:"Request cancelled"};continue}return{success:!0,data:e}}catch(u){if(i?.aborted)return{success:!1,error:"Request cancelled"};if(c=u instanceof Error?u.message:"Unknown error",l<5&&await bh(1e3,i),i?.aborted)return{success:!1,error:"Request cancelled"}}}return{success:!1,error:c}}async function Ih(e){const{address:t,chain:n="base",limit:r=100,exclude_spam:o=!0,cursor:i,signal:a}=e;if(!t)throw new Error("Address is required");let s="Unknown error";for(let u=1;u<=5;u++){if(a?.aborted)return{success:!1,error:"Request cancelled"};try{const e={chain:n,format:"decimal",limit:r,exclude_spam:o,media_items:!0,normalizeMetadata:!0};i&&(e.cursor=i);return{success:!0,data:(await Th.get(`api/moralis/proxy/${encodeURIComponent(t)}/nft`,{query:e,signal:a})).data}}catch(c){if(a?.aborted)return{success:!1,error:"Request cancelled"};if(s=c instanceof Error?c.message:"Unknown error",u<5&&await bh(1e3,a),a?.aborted)return{success:!1,error:"Request cancelled"}}}return{success:!1,error:s}}const Sh=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,chatWithCortex:Ch,getNftContractMetadata:async function(e){const{address:t,chain:n="base"}=e;if(!t)throw new Error("Contract address is required");try{return{success:!0,data:(await Th.get(`api/moralis/proxy/nft/${encodeURIComponent(t)}/metadata`,{query:{chain:n}})).data}}catch(r){return{success:!1,error:r instanceof Error?r.message:"Unknown error"}}},getTokenMetadata:xh,getWalletNFTs:Ih,getWalletTokenBalances:Eh,moralisApi:Th},Symbol.toStringTag,{value:"Module"})),Nh=new gh("https://dln.debridge.finance");async function Bh(e){const{chainId:t,tokenIn:n,tokenInAmount:r,tokenOut:o,accesstoken:i,slippage:a="auto",tokenOutRecipient:s}=e;if(!(t&&n&&r&&o))throw new Error("Missing required parameters: chainId, tokenIn, tokenInAmount, tokenOut");try{const e=await fetch("https://exchange-api.keyring.app/admin/setting?configs=others",{method:"GET"}),c=await e.json(),u=c?.others||{},l=u?.AFFILIATE_FEE_PERENT,d=u?.AFFILIATE_FEE_RECIPIENT,f=await Nh.get("/v1.0/chain/transaction",{query:{chainId:String(t),tokenIn:n,tokenInAmount:r,tokenOut:o,slippage:String(a),tokenOutRecipient:s,accesstoken:i,affiliateFeePercent:l,affiliateFeeRecipient:d}});if(f.data?.error)throw new Error(`DeBridge API Error: ${f.data.error}`);return{success:!0,data:f.data}}catch(c){let e=c instanceof Error?c.message:"Unknown error";const t=c;t.data?.errorMessage?e=t.data.errorMessage:t.response?.data?.errorMessage?e=t.response.data.errorMessage:t.data?.message?e=t.data.message:t.response?.data?.message&&(e=t.response.data.message);const n=t.status||t.response?.status||t.statusCode||t.data?.status;return{success:!1,error:c instanceof Error?c.message:"Unknown error",status:n,errorMessage:e,errorCode:t.data?.errorCode,errorId:t.data?.errorId}}}const Mh={1:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",10:"0x4200000000000000000000000000000000000006",56:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",137:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",8453:"0x4200000000000000000000000000000000000006",42161:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"},Ph=[{name:"transfer",type:"function",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"approve",type:"function",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"allowance",type:"function",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]}],Oh=[{name:"deposit",type:"function",stateMutability:"payable",inputs:[],outputs:[]},{name:"withdraw",type:"function",stateMutability:"nonpayable",inputs:[{name:"wad",type:"uint256"}],outputs:[]}],Rh=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],Uh=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"amount",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]}];function Lh(e,t){if(t)return t;const n=Ro[e];return n?.rpcUrls?.default?.http?.[0]}function Dh(e){const{action:t,parameters:n,fromAddress:r,chainId:o}=e;switch(t){case"send_native":return function(e,t,n){const{to_address:r,amount:o}=e;if(!r)throw new Error("Recipient address is required");if(!o)throw new Error("Amount is required");return{from:t,to:r,data:"0x",value:Ao(rh(o).decimalPlaces(18,rh.ROUND_DOWN).toFixed(),18).toString(),chainId:n,description:`Send ${o} native token to ${r}`}}(n,r,o);case"send_token":return function(e,t,n){const{contract_address:r,to_address:o,amount:i,decimals:a,token_symbol:s}=e;if(!r)throw new Error("Token contract address is required");if(!o)throw new Error("Recipient address is required");if(!i)throw new Error("Amount is required");const c=parseInt(a)||18,u=Ao(rh(i).decimalPlaces(c,rh.ROUND_DOWN).toFixed(),c);return{from:t,to:r,data:xt({abi:Ph,functionName:"transfer",args:[o,u]}),value:"0",chainId:n,description:`Send ${i} ${s||"tokens"} to ${o}`}}(n,r,o);case"approve_token":return function(e,t,n){const{contract_address:r,spender_address:o,amount:i,decimals:a,token_symbol:s}=e;if(!r)throw new Error("Token contract address is required");if(!o)throw new Error("Spender address is required");const c=parseInt(a)||18,u=i&&""!==i?.trim()?Ao(rh(i).decimalPlaces(c,rh.ROUND_DOWN).toFixed(),c):cn;return{from:t,to:r,data:xt({abi:Ph,functionName:"approve",args:[o,u]}),value:"0",chainId:n,description:`Approve ${i||"unlimited"} ${s||"tokens"} for ${o}`}}(n,r,o);case"wrap_native":return function(e,t,n){const{amount:r}=e;if(!r)throw new Error("Amount is required");const o=Mh[n];if(!o)throw new Error(`WETH not supported on chain ${n}`);const i=Ao(rh(r).decimalPlaces(18,rh.ROUND_DOWN).toFixed(),18).toString();return{from:t,to:o,data:xt({abi:Oh,functionName:"deposit"}),value:i,chainId:n,description:`Wrap ${r} native token`}}(n,r,o);case"unwrap_native":return function(e,t,n){const{amount:r}=e;if(!r)throw new Error("Amount is required");const o=Mh[n];if(!o)throw new Error(`WETH not supported on chain ${n}`);const i=Ao(rh(r).decimalPlaces(18,rh.ROUND_DOWN).toFixed(),18);return{from:t,to:o,data:xt({abi:Oh,functionName:"withdraw",args:[i]}),value:"0",chainId:n,description:`Unwrap ${r} WETH`}}(n,r,o);case"send_nft":return function(e,t,n){const{contract_address:r,token_id:o,to_address:i,token_standard:a,amount:s,nft_name:c}=e;if(!r)throw new Error("NFT contract address is required");if(!o)throw new Error("Token ID is required");if(!i)throw new Error("Recipient address is required");const u=(a||"ERC721").toUpperCase(),l=BigInt(o);let d,f;if("ERC1155"===u){const e=BigInt(s||"1");d=xt({abi:Uh,functionName:"safeTransferFrom",args:[t,i,l,e,"0x"]}),f=`Send ${e>1n?e.toString()+"x ":""}${c||"NFT"} (ERC1155 #${o}) to ${i}`}else d=xt({abi:Rh,functionName:"safeTransferFrom",args:[t,i,l]}),f=`Send ${c||"NFT"} (ERC721 #${o}) to ${i}`;return{from:t,to:r,data:d,value:"0",chainId:n,description:f}}(n,r,o);default:throw new Error(`Action "${t}" does not produce a transaction`)}}async function Fh(e){const{transactionHash:t,chainId:n,pollingInterval:r=3e3,timeout:o=12e4,rpcUrl:i}=e,a=Lh(n,i);if(!a)throw new Error(`No RPC endpoint for chain ${n}`);const s=Date.now();for(;Date.now()-s<o;){try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getTransactionReceipt",params:[t]})}),n=await e.json();if(n.result){const e=n.result;return{status:"0x1"===e.status?"success":"fail",blockNumber:e.blockNumber,gasUsed:e.gasUsed,effectiveGasPrice:e.effectiveGasPrice}}}catch(c){}await new Promise(e=>setTimeout(e,r))}throw new Error(`Transaction ${t} was not mined within ${o/1e3}s`)}async function qh(e){const{tokenAddress:t,ownerAddress:n,spenderAddress:r,chainId:o,rpcUrl:i}=e,a=Lh(o,i);if(!a)return BigInt(0);try{const e=xt({abi:Ph,functionName:"allowance",args:[n,r]}),o=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_call",params:[{to:t,data:e},"latest"]})}),i=await o.json();return i.result&&"0x"!==i.result?BigInt(i.result):BigInt(0)}catch(s){return BigInt(0)}}function Hh(e){const{tokenAddress:t,spenderAddress:n,fromAddress:r,chainId:o,tokenSymbol:i,amount:a}=e,s=a&&BigInt(a)>0n?BigInt(a):cn;return{from:r,to:t,data:xt({abi:Ph,functionName:"approve",args:[n,s]}),value:"0",chainId:o,description:`Approve ${i||"token"} for swap`}}async function Vh(e){const{address:t,chainId:n,rpcUrl:r}=e,o=Lh(n,r);if(!o)return new rh(0);try{const e=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getBalance",params:[t,"latest"]})}),n=await e.json();return n.result&&"0x"!==n.result?new rh(BigInt(n.result).toString()):new rh(0)}catch(i){return new rh(0)}}async function Wh(e){const{from:t,to:n,data:r,value:o,chainId:i,rpcUrl:a}=e,s=Lh(i,a);if(!s)return new rh(0);try{const[e,i]=await Promise.all([fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_estimateGas",params:[{from:t,to:n,data:r,...o&&"0"!==o?{value:o}:{}}]})}),fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:2,method:"eth_gasPrice",params:[]})})]),[a,c]=await Promise.all([e.json(),i.json()]),u=a.result?new rh(BigInt(a.result).toString()):new rh(0),l=c.result?new rh(BigInt(c.result).toString()):new rh(0);return u.times(l).times(1.1)}catch(c){return new rh(0)}}async function jh(e){const{chainId:t,rpcUrl:n}=e,r=Lh(t,n);if(!r)return new rh(0);try{const e=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_gasPrice",params:[]})}),t=await e.json();return t.result&&"0x"!==t.result?new rh(BigInt(t.result).toString()):new rh(0)}catch(o){return new rh(0)}}const Yh=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,buildApproveForSwap:Hh,buildTransaction:Dh,checkAllowance:qh,estimateTransactionFee:Wh,getGasPrice:jh,getNativeBalance:Vh,getRpcUrl:Lh,isTransactionAction:function(e){return["send_native","send_token","approve_token","wrap_native","unwrap_native","send_nft"].includes(e)},waitForTransactionReceipt:Fh},Symbol.toStringTag,{value:"Module"})),zh="gemini-2.5-flash-lite";let Gh=null,Jh=null;const Xh=Af()?.webAppUrl||"https://nft.keyring.app",Kh=["faq","pool","general","crypto"],Qh=new class extends gh{enableGoogleSearch=!0;constructor(){super(Xh)}getRuleLanguage(e){return e?`**LANGUAGE ADHERENCE**: You MUST respond ONLY in the language specified as: "${e||"the language of the user's current question"}". Ignore any language bias from context or history. If no language is explicitly provided, detect and follow the current question's language.`:'\n **LANGUAGE ADHERENCE**:\n - **DETECT** the language of the section labeled "CURRENT USER QUESTION" below.\n - **RESPOND ONLY** in that same language.\n - **IGNORE** any language bias from the context or history.\n '}async generateContent(e,t,n){try{const r=`\nBelow is the system context and conversation history. Use it for context but prioritize the instructions at the end.\n---\nSYSTEM CONTEXT & HISTORY:\n${t}\n---\n\n---\nCURRENT USER QUESTION:\n${e}\n---\n\n---\n### MANDATORY RULES:\n1. ${this.getRuleLanguage(n)}\n2. **FOLLOW-UP / CONTINUATION**: If CURRENT USER QUESTION is a short follow-up (e.g. "yes", "ok", "sure", "tell me more", "details", "go ahead", "why?", "how?"), look at the CONVERSATION HISTORY above to understand what the user is responding to. Provide a relevant, detailed follow-up answer based on the LAST assistant message. NEVER say "too vague" or "please clarify" when history clearly shows the context.\n3. **HISTORY CLEANING**:\n - If any assistant response in the conversation history says it **"doesn't know"**, **"doesn't have data"**, **"cannot find info"**, or similar, you MUST **IGNORE that specific history segment**. \n - Do not let previous data failures prevent you from answering the CURRENT USER QUESTION if the information is available now or in your core knowledge.\n4. **BREVITY**: Keep your answer extremely concise (under 3000 characters).\n5. **DATA INTEGRITY**: Do not mention data gaps or historical missing info; just answer based on available info.\n---\n`,o="/api/gemini-cortex/proxy",i={model:zh,data:{contents:[{parts:[{text:r}]}],tools:[{googleSearch:{}}]}};this.enableGoogleSearch||delete i.data.tools;const a=await this.post(o,i);return a?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||a?.data?.candidates?.[0]?.content?.parts?.[0]?.text}catch(r){if((r?.message?.includes("search_grounding_request_per_project_per_day")||r?.data?.error?.message?.includes("search_grounding_request_per_project_per_day"))&&this.enableGoogleSearch)return this.enableGoogleSearch=!1,await this.generateContent(e,t,n);throw r}}async checkInfoQuestion(e,t){try{const r=await async function(){if(null!==Gh)return Gh;const e=await async function(){if(Jh)return Jh;const e=Af(),t=[],n=e?.faqInternal;n&&Array.isArray(n.data)&&t.push(...n.data);const r=e?.faqUrl||"";if(r)try{const e=await fetch(r),n=await e.json();Array.isArray(n?.data)&&t.push(...n.data)}catch(o){}return Jh=t,t}();return 0===e.length?(Gh="",""):(Gh=e.map((e,t)=>{const n=Object.keys(e.question),r=n.map(t=>e.question[t]?.trim()).filter(Boolean),o=n.map(t=>e.answer[t]?.trim()).filter(Boolean),i=r.join(" | ")||"",a=o[0]||"";return i?`[${t}] Q: ${i}\n A: ${a}`:""}).filter(Boolean).join("\n"),Gh)}(),o=t+`---\nCURRENT USER QUESTION:\n${e}\n---`+(r?`\n\n## FAQ KNOWLEDGE BASE\n${r}\n\n`:"\n\n")+'Classify this question. Return ONLY a JSON object — no markdown, no explanation.\n\n## OUTPUT FORMAT\n{\n "model": "faq" | "pool" | "general" | "crypto",\n "language": "<ISO 639-1 code>",\n "faqAnswer": "<string>" | null\n}\n\n## FIELD DEFINITIONS\n- **model**: The AI pipeline route for this question (see classification steps below).\n- **language**: ISO 639-1 code detected from CURRENT USER QUESTION text only (en, vi, ja, zh, ko, es, fr, id, th, ru, etc.).\n- **faqAnswer**: Translated FAQ answer when model="faq"; always null otherwise.\n\n## CLASSIFICATION STEPS (follow in order)\n\n**Step 1 — Detect language**: Detect from CURRENT USER QUESTION text ONLY. Ignore language from history, system prompt, or FAQ data. For very short follow-ups (e.g. "yes", "ok"), detect language from the LAST user message in CONVERSATION HISTORY instead.\n\n**Step 1.5 — Detect Follow-up / Continuation**: If CURRENT USER QUESTION is a very short or vague follow-up that CANNOT stand alone (e.g., "yes", "no", "sure", "ok", "go ahead", "tell me more", "details", "please", "continue", "explain", "why?", "how?", "what about that?", "vâng", "ừ", "có", "tiếp", "はい", "對", single-word confirmations, affirmations, emojis, or any message that clearly references the previous assistant reply rather than introducing a new topic), then:\n - Look at the LAST assistant message in CONVERSATION HISTORY to determine the topic.\n - Route to the model that matches that topic: pool/liquidity/APR/positions → "pool", crypto/token/wallet/DeFi → "crypto", non-crypto topic → "general".\n - Do NOT classify the follow-up independently — the user is continuing the previous conversation.\n - Set faqAnswer = null (follow-ups are never FAQ).\n - STOP here, do not proceed to Step 2.\n - If there is NO CONVERSATION HISTORY, skip this step and proceed to Step 2.\n\n**Step 2 — Check FAQ FIRST**: Compare the CURRENT USER QUESTION against the FAQ KNOWLEDGE BASE above. Match by MEANING, not exact words — if the user asks in any language but a FAQ entry covers the same topic, it counts as a match. If the question semantically matches a FAQ entry:\n - Set model = "faq"\n - Set faqAnswer = the FAQ answer, translated/rewritten naturally into the user\'s detected language. Never output Vietnamese when language is "en".\n - STOP here, do not proceed further.\n\n**Step 3 — Check Pool (only if Step 2 did not match)**: Set model = "pool" ONLY when the user wants LIVE/REAL-TIME pool data that FAQ cannot answer:\n - Search/list/show actual pools with live data\n - Personal LP positions ("my pools", "my positions", "my liquidity")\n - Trending pools, pool by address/id, compare actual pool data\n - Live APR/TVL/volume numbers for specific pools\n - Send/transfer an LP position NFT ("send position 12345", "transfer my position to 0x...", "gửi position", "chuyển LP position")\n **NOT pool**: "show my NFTs", "view my NFTs", "what NFTs do I have", "xem NFT" — these are regular NFT collection queries → use "crypto".\n Use "general" or "crypto" for: token prices, swap/send/buy regular tokens, general wallet questions, educational pool questions already in FAQ, viewing/sending regular NFTs (non-LP-position).\n\n**Step 4 — Check if non-crypto (only if Steps 2 and 3 did not match)**: Set model = "general" ONLY if the question is completely unrelated to crypto, DeFi, NFT, wallet, blockchain, tokens, greetings, or financial topics (e.g. pure cooking, sports, unrelated coding).\n\n**Step 5 — Default**: Set model = "crypto" for everything crypto-related (tokens, DeFi, NFT, wallet, blockchain, greetings, chains, gas, smart contracts, send/swap/bridge/buy).\n\n## VALIDATION RULES\n- model="faq" requires faqAnswer != null\n- model != "faq" requires faqAnswer = null\n- If FAQ KNOWLEDGE BASE is empty, model must NOT be "faq"\n\nReturn only the JSON object.',i="/api/gemini-cortex/proxy",a={model:zh,data:{contents:[{parts:[{text:o}]}],generationConfig:{responseMimeType:"application/json"}}},s=await this.post(i,a),c=s?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||s?.data?.candidates?.[0]?.content?.parts?.[0]?.text;let u={model:"crypto",language:"en",faqAnswer:null};try{let e=c?.trim()||"";e.startsWith("```json")?e=e.replace(/^```json\s*/,"").replace(/\s*```$/,""):e.startsWith("```")&&(e=e.replace(/^```\s*/,"").replace(/\s*```$/,""));const t=e.match(/\{[\s\S]*\}/);t&&(u=function(e){const t=Kh.includes(e?.model)?e.model:"crypto",n="string"==typeof e?.language&&e.language.trim().length>0?e.language.trim().toLowerCase():"en",r="string"==typeof e?.faqAnswer&&e.faqAnswer.trim().length>0?e.faqAnswer.trim():null;return"faq"!==t||r?"faq"!==t?{model:t,language:n,faqAnswer:null}:{model:t,language:n,faqAnswer:r}:{model:"crypto",language:n,faqAnswer:null}}(JSON.parse(t[0])))}catch(n){}return u}catch(r){throw r}}async checkIsQuestionActionWeb3(e,t){try{const n=t+`---\nCURRENT USER QUESTION:\n${e}\n---\n\n #### Analyze this question and determine its category.\nIMPORTANT: The following topics should ALWAYS be classified as "yes" (action-oriented):\n- Greetings (in ANY language): hello, hi, xin chào, bonjour, etc.\n- Action phrases (in ANY language): send token, swap token, buy token, bridge token, send nft, burn nft, mint nft.\n- Wallet/Account questions (in ANY language): account, wallet, address, balance, portfolio, holdings\n- Registration/Sign-up questions (in ANY language): register, sign up, create account, create wallet, new account, new wallet, registration\n- Wallet access questions (in ANY language): open wallet, open account, start wallet, launch wallet, access wallet, access account\n\nIMPORTANT: The user may ask in their native language, so recognize the MEANING, not just specific words.\n\nOtherwise, respond with ONLY the word "no" (lowercase, nothing else).\nDo not provide any explanation or additional text.`,r="/api/gemini-cortex/proxy",o={model:zh,data:{contents:[{parts:[{text:n}]}]}},i=await this.post(r,o),a=i?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||i?.data?.candidates?.[0]?.content?.parts?.[0]?.text;return a?.toLowerCase()?.startsWith("yes")}catch(n){throw n}}};var Zh,_h,$h,ep={exports:{}},tp=(Zh||(Zh=1,_h=ep,$h=ep.exports,function(){var e,t="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",o=32,i=128,a=1/0,s=9007199254740991,c=NaN,u=4294967295,l=[["ary",i],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",o],["partialRight",64],["rearg",256]],d="[object Arguments]",f="[object Array]",h="[object Boolean]",p="[object Date]",m="[object Error]",w="[object Function]",g="[object GeneratorFunction]",y="[object Map]",b="[object Number]",v="[object Object]",A="[object Promise]",k="[object RegExp]",T="[object Set]",E="[object String]",x="[object Symbol]",C="[object WeakMap]",I="[object ArrayBuffer]",S="[object DataView]",N="[object Float32Array]",B="[object Float64Array]",M="[object Int8Array]",P="[object Int16Array]",O="[object Int32Array]",R="[object Uint8Array]",U="[object Uint8ClampedArray]",L="[object Uint16Array]",D="[object Uint32Array]",F=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,j=RegExp(V.source),Y=RegExp(W.source),z=/<%-([\s\S]+?)%>/g,G=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,_=RegExp(Z.source),$=/^\s+/,ee=/\s/,te=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ne=/\{\n\/\* \[wrapped with (.+)\] \*/,re=/,? & /,oe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ie=/[()=,{}\[\]\/\s]/,ae=/\\(\\)?/g,se=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ce=/\w*$/,ue=/^[-+]0x[0-9a-f]+$/i,le=/^0b[01]+$/i,de=/^\[object .+?Constructor\]$/,fe=/^0o[0-7]+$/i,he=/^(?:0|[1-9]\d*)$/,pe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,me=/($^)/,we=/['\n\r\u2028\u2029\\]/g,ge="\\ud800-\\udfff",ye="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",be="\\u2700-\\u27bf",ve="a-z\\xdf-\\xf6\\xf8-\\xff",Ae="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\ufe0e\\ufe0f",Te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="["+ge+"]",xe="["+Te+"]",Ce="["+ye+"]",Ie="\\d+",Se="["+be+"]",Ne="["+ve+"]",Be="[^"+ge+Te+Ie+be+ve+Ae+"]",Me="\\ud83c[\\udffb-\\udfff]",Pe="[^"+ge+"]",Oe="(?:\\ud83c[\\udde6-\\uddff]){2}",Re="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Ae+"]",Le="\\u200d",De="(?:"+Ne+"|"+Be+")",Fe="(?:"+Ue+"|"+Be+")",qe="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ve="(?:"+Ce+"|"+Me+")?",We="["+ke+"]?",je=We+Ve+"(?:"+Le+"(?:"+[Pe,Oe,Re].join("|")+")"+We+Ve+")*",Ye="(?:"+[Se,Oe,Re].join("|")+")"+je,ze="(?:"+[Pe+Ce+"?",Ce,Oe,Re,Ee].join("|")+")",Ge=RegExp("['’]","g"),Je=RegExp(Ce,"g"),Xe=RegExp(Me+"(?="+Me+")|"+ze+je,"g"),Ke=RegExp([Ue+"?"+Ne+"+"+qe+"(?="+[xe,Ue,"$"].join("|")+")",Fe+"+"+He+"(?="+[xe,Ue+De,"$"].join("|")+")",Ue+"?"+De+"+"+qe,Ue+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Ye].join("|"),"g"),Qe=RegExp("["+Le+ge+ye+ke+"]"),Ze=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_e=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],$e=-1,et={};et[N]=et[B]=et[M]=et[P]=et[O]=et[R]=et[U]=et[L]=et[D]=!0,et[d]=et[f]=et[I]=et[h]=et[S]=et[p]=et[m]=et[w]=et[y]=et[b]=et[v]=et[k]=et[T]=et[E]=et[C]=!1;var tt={};tt[d]=tt[f]=tt[I]=tt[S]=tt[h]=tt[p]=tt[N]=tt[B]=tt[M]=tt[P]=tt[O]=tt[y]=tt[b]=tt[v]=tt[k]=tt[T]=tt[E]=tt[x]=tt[R]=tt[U]=tt[L]=tt[D]=!0,tt[m]=tt[w]=tt[C]=!1;var nt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rt=parseFloat,ot=parseInt,it="object"==typeof Lo&&Lo&&Lo.Object===Object&&Lo,at="object"==typeof self&&self&&self.Object===Object&&self,st=it||at||Function("return this")(),ct=$h&&!$h.nodeType&&$h,ut=ct&&_h&&!_h.nodeType&&_h,lt=ut&&ut.exports===ct,dt=lt&&it.process,ft=function(){try{return ut&&ut.require&&ut.require("util").types||dt&&dt.binding&&dt.binding("util")}catch(e){}}(),ht=ft&&ft.isArrayBuffer,pt=ft&&ft.isDate,mt=ft&&ft.isMap,wt=ft&&ft.isRegExp,gt=ft&&ft.isSet,yt=ft&&ft.isTypedArray;function bt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function vt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function kt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Et(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function xt(e,t){return!(null==e||!e.length)&&Ut(e,t,0)>-1}function Ct(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function It(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function St(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Nt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Bt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Mt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Pt=qt("length");function Ot(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function Rt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Ut(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Rt(e,Dt,n)}function Lt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Dt(e){return e!=e}function Ft(e,t){var n=null==e?0:e.length;return n?Wt(e,t)/n:c}function qt(t){return function(n){return null==n?e:n[t]}}function Ht(t){return function(n){return null==t?e:t[n]}}function Vt(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function Wt(t,n){for(var r,o=-1,i=t.length;++o<i;){var a=n(t[o]);a!==e&&(r=r===e?a:r+a)}return r}function jt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Yt(e){return e?e.slice(0,sn(e)+1).replace($,""):e}function zt(e){return function(t){return e(t)}}function Gt(e,t){return It(t,function(t){return e[t]})}function Jt(e,t){return e.has(t)}function Xt(e,t){for(var n=-1,r=e.length;++n<r&&Ut(t,e[n],0)>-1;);return n}function Kt(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var Qt=Ht({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Zt=Ht({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function _t(e){return"\\"+nt[e]}function $t(e){return Qe.test(e)}function en(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function tn(e,t){return function(n){return e(t(n))}}function nn(e,t){for(var n=-1,o=e.length,i=0,a=[];++n<o;){var s=e[n];s!==t&&s!==r||(e[n]=r,a[i++]=n)}return a}function rn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function on(e){return $t(e)?function(e){for(var t=Xe.lastIndex=0;Xe.test(e);)++t;return t}(e):Pt(e)}function an(e){return $t(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.split("")}(e)}function sn(e){for(var t=e.length;t--&&ee.test(e.charAt(t)););return t}var cn=Ht({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),un=function ee(ge){var ye,be=(ge=null==ge?st:un.defaults(st.Object(),ge,un.pick(st,_e))).Array,ve=ge.Date,Ae=ge.Error,ke=ge.Function,Te=ge.Math,Ee=ge.Object,xe=ge.RegExp,Ce=ge.String,Ie=ge.TypeError,Se=be.prototype,Ne=ke.prototype,Be=Ee.prototype,Me=ge["Ce"],Pe=Ne.toString,Oe=Be.hasOwnProperty,Re=0,Ue=(ye=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(src)_1."+ye:"",Le=Be.toString,De=Pe.call(Ee),Fe=st.Se,qe=xe("^"+Pe.call(Oe).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=lt?ge.Buffer:e,Ve=ge.Symbol,We=ge.Uint8Array,je=He?He.allocUnsafe:e,Ye=tn(Ee.getPrototypeOf,Ee),ze=Ee.create,Xe=Be.propertyIsEnumerable,Qe=Se.splice,nt=Ve?Ve.isConcatSpreadable:e,it=Ve?Ve.iterator:e,at=Ve?Ve.toStringTag:e,ct=function(){try{var e=ci(Ee,"defineProperty");return e({},"",{}),e}catch(t){}}(),ut=ge.clearTimeout!==st.clearTimeout&&ge.clearTimeout,dt=ve&&ve.now!==st.Date.now&&ve.now,ft=ge.setTimeout!==st.setTimeout&&ge.setTimeout,Pt=Te.ceil,Ht=Te.floor,ln=Ee.getOwnPropertySymbols,dn=He?He.isBuffer:e,fn=ge.isFinite,hn=Se.join,pn=tn(Ee.keys,Ee),mn=Te.max,wn=Te.min,gn=ve.now,yn=ge.parseInt,bn=Te.random,vn=Se.reverse,An=ci(ge,"DataView"),kn=ci(ge,"Map"),Tn=ci(ge,"Promise"),En=ci(ge,"Set"),xn=ci(ge,"WeakMap"),Cn=ci(Ee,"create"),In=xn&&new xn,Sn={},Nn=Di(An),Bn=Di(kn),Mn=Di(Tn),Pn=Di(En),On=Di(xn),Rn=Ve?Ve.prototype:e,Un=Rn?Rn.valueOf:e,Ln=Rn?Rn.toString:e;function Dn(e){if(es(e)&&!ja(e)&&!(e instanceof Vn)){if(e instanceof Hn)return e;if(Oe.call(e,"__wrapped__"))return Fi(e)}return new Hn(e)}var Fn=/* @__PURE__ */function(){function t(){}return function(n){if(!$a(n))return{};if(ze)return ze(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function qn(){}function Hn(t,n){this.Ne=t,this.Be=[],this.Me=!!n,this.Pe=0,this.Oe=e}function Vn(e){this.Ne=e,this.Be=[],this.Re=1,this.Ue=!1,this.Le=[],this.De=u,this.Fe=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function jn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.qe=new Yn;++t<n;)this.add(e[t])}function Gn(e){var t=this.qe=new jn(e);this.size=t.size}function Jn(e,t){var n=ja(e),r=!n&&Wa(e),o=!n&&!r&&Ja(e),i=!n&&!r&&!o&&cs(e),a=n||r||o||i,s=a?jt(e.length,Ce):[],c=s.length;for(var u in e)!t&&!Oe.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||mi(u,c))||s.push(u);return s}function Xn(t){var n=t.length;return n?t[Yr(0,n-1)]:e}function Kn(e,t){return Mi(Co(e),or(t,0,e.length))}function Qn(e){return Mi(Co(e))}function Zn(t,n,r){(r!==e&&!qa(t[n],r)||r===e&&!(n in t))&&nr(t,n,r)}function _n(t,n,r){var o=t[n];Oe.call(t,n)&&qa(o,r)&&(r!==e||n in t)||nr(t,n,r)}function $n(e,t){for(var n=e.length;n--;)if(qa(e[n][0],t))return n;return-1}function er(e,t,n,r){return ur(e,function(e,o,i){t(r,e,n(e),i)}),r}function tr(e,t){return e&&Io(t,Bs(t),e)}function nr(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function rr(t,n){for(var r=-1,o=n.length,i=be(o),a=null==t;++r<o;)i[r]=a?e:xs(t,n[r]);return i}function or(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function ir(t,n,r,o,i,a){var s,c=1&n,u=2&n,l=4&n;if(r&&(s=i?r(t,o,i,a):r(t)),s!==e)return s;if(!$a(t))return t;var f=ja(t);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!c)return Co(t,s)}else{var m=di(t),A=m==w||m==g;if(Ja(t))return vo(t,c);if(m==v||m==d||A&&!i){if(s=u||A?{}:hi(t),!c)return u?function(e,t){return Io(e,li(e),t)}(t,function(e,t){return e&&Io(t,Ms(t),e)}(s,t)):function(e,t){return Io(e,ui(e),t)}(t,tr(s,t))}else{if(!tt[m])return i?t:{};s=function(e,t,n){var r,o=e.constructor;switch(t){case I:return Ao(e);case h:case p:return new o(+e);case S:return function(e,t){var n=t?Ao(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case B:case M:case P:case O:case R:case U:case L:case D:return ko(e,n);case y:return new o;case b:case E:return new o(e);case k:return function(e){var t=new e.constructor(e.source,ce.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new o;case x:return r=e,Un?Ee(Un.call(r)):{}}}(t,m,c)}}a||(a=new Gn);var C=a.get(t);if(C)return C;a.set(t,s),is(t)?t.forEach(function(e){s.add(ir(e,n,r,e,t,a))}):ts(t)&&t.forEach(function(e,o){s.set(o,ir(e,n,r,o,t,a))});var F=f?e:(l?u?ti:ei:u?Ms:Bs)(t);return At(F||t,function(e,o){F&&(e=t[o=e]),_n(s,o,ir(e,n,r,o,t,a))}),s}function ar(t,n,r){var o=r.length;if(null==t)return!o;for(t=Ee(t);o--;){var i=r[o],a=n[i],s=t[i];if(s===e&&!(i in t)||!a(s))return!1}return!0}function sr(n,r,o){if("function"!=typeof n)throw new Ie(t);return Ii(function(){n.apply(e,o)},r)}function cr(e,t,n,r){var o=-1,i=xt,a=!0,s=e.length,c=[],u=t.length;if(!s)return c;n&&(t=It(t,zt(n))),r?(i=Ct,a=!1):t.length>=200&&(i=Jt,a=!1,t=new zn(t));e:for(;++o<s;){var l=e[o],d=null==n?l:n(l);if(l=r||0!==l?l:0,a&&d==d){for(var f=u;f--;)if(t[f]===d)continue e;c.push(l)}else i(t,d,r)||c.push(l)}return c}Dn.templateSettings={escape:z,evaluate:G,interpolate:J,variable:"",imports:{Se:Dn}},Dn.prototype=qn.prototype,Dn.prototype.constructor=Dn,Hn.prototype=Fn(qn.prototype),Hn.prototype.constructor=Hn,Vn.prototype=Fn(qn.prototype),Vn.prototype.constructor=Vn,Wn.prototype.clear=function(){this.qe=Cn?Cn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.qe[e];return this.size-=t?1:0,t},Wn.prototype.get=function(t){var r=this.qe;if(Cn){var o=r[t];return o===n?e:o}return Oe.call(r,t)?r[t]:e},Wn.prototype.has=function(t){var n=this.qe;return Cn?n[t]!==e:Oe.call(n,t)},Wn.prototype.set=function(t,r){var o=this.qe;return this.size+=this.has(t)?0:1,o[t]=Cn&&r===e?n:r,this},jn.prototype.clear=function(){this.qe=[],this.size=0},jn.prototype.delete=function(e){var t=this.qe,n=$n(t,e);return!(n<0||(n==t.length-1?t.pop():Qe.call(t,n,1),--this.size,0))},jn.prototype.get=function(t){var n=this.qe,r=$n(n,t);return r<0?e:n[r][1]},jn.prototype.has=function(e){return $n(this.qe,e)>-1},jn.prototype.set=function(e,t){var n=this.qe,r=$n(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Yn.prototype.clear=function(){this.size=0,this.qe={hash:new Wn,map:new(kn||jn),string:new Wn}},Yn.prototype.delete=function(e){var t=ai(this,e).delete(e);return this.size-=t?1:0,t},Yn.prototype.get=function(e){return ai(this,e).get(e)},Yn.prototype.has=function(e){return ai(this,e).has(e)},Yn.prototype.set=function(e,t){var n=ai(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},zn.prototype.add=zn.prototype.push=function(e){return this.qe.set(e,n),this},zn.prototype.has=function(e){return this.qe.has(e)},Gn.prototype.clear=function(){this.qe=new jn,this.size=0},Gn.prototype.delete=function(e){var t=this.qe,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.qe.get(e)},Gn.prototype.has=function(e){return this.qe.has(e)},Gn.prototype.set=function(e,t){var n=this.qe;if(n instanceof jn){var r=n.qe;if(!kn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.qe=new Yn(r)}return n.set(e,t),this.size=n.size,this};var ur=Bo(gr),lr=Bo(yr,!0);function dr(e,t){var n=!0;return ur(e,function(e,r,o){return n=!!t(e,r,o)}),n}function fr(t,n,r){for(var o=-1,i=t.length;++o<i;){var a=t[o],s=n(a);if(null!=s&&(c===e?s==s&&!ss(s):r(s,c)))var c=s,u=a}return u}function hr(e,t){var n=[];return ur(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function pr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=pi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?pr(s,t-1,n,r,o):St(o,s):r||(o[o.length]=s)}return o}var mr=Mo(),wr=Mo(!0);function gr(e,t){return e&&mr(e,t,Bs)}function yr(e,t){return e&&wr(e,t,Bs)}function br(e,t){return Et(t,function(t){return Qa(e[t])})}function vr(t,n){for(var r=0,o=(n=wo(n,t)).length;null!=t&&r<o;)t=t[Li(n[r++])];return r&&r==o?t:e}function Ar(e,t,n){var r=t(e);return ja(e)?r:St(r,n(e))}function kr(t){return null==t?t===e?"[object Undefined]":"[object Null]":at&&at in Ee(t)?function(t){var n=Oe.call(t,at),r=t[at];try{t[at]=e;var o=!0}catch(a){}var i=Le.call(t);return o&&(n?t[at]=r:delete t[at]),i}(t):function(e){return Le.call(e)}(t)}function Tr(e,t){return e>t}function Er(e,t){return null!=e&&Oe.call(e,t)}function xr(e,t){return null!=e&&t in Ee(e)}function Cr(t,n,r){for(var o=r?Ct:xt,i=t[0].length,a=t.length,s=a,c=be(a),u=1/0,l=[];s--;){var d=t[s];s&&n&&(d=It(d,zt(n))),u=wn(d.length,u),c[s]=!r&&(n||i>=120&&d.length>=120)?new zn(s&&d):e}d=t[0];var f=-1,h=c[0];e:for(;++f<i&&l.length<u;){var p=d[f],m=n?n(p):p;if(p=r||0!==p?p:0,!(h?Jt(h,m):o(l,m,r))){for(s=a;--s;){var w=c[s];if(!(w?Jt(w,m):o(t[s],m,r)))continue e}h&&h.push(m),l.push(p)}}return l}function Ir(t,n,r){var o=null==(t=Ei(t,n=wo(n,t)))?t:t[Li(Ki(n))];return null==o?e:bt(o,t,r)}function Sr(e){return es(e)&&kr(e)==d}function Nr(t,n,r,o,i){return t===n||(null==t||null==n||!es(t)&&!es(n)?t!=t&&n!=n:function(t,n,r,o,i,a){var s=ja(t),c=ja(n),u=s?f:di(t),l=c?f:di(n),w=(u=u==d?v:u)==v,g=(l=l==d?v:l)==v,A=u==l;if(A&&Ja(t)){if(!Ja(n))return!1;s=!0,w=!1}if(A&&!w)return a||(a=new Gn),s||cs(t)?_o(t,n,r,o,i,a):function(e,t,n,r,o,i,a){switch(n){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!i(new We(e),new We(t)));case h:case p:case b:return qa(+e,+t);case m:return e.name==t.name&&e.message==t.message;case k:case E:return e==t+"";case y:var s=en;case T:var c=1&r;if(s||(s=rn),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var l=_o(s(e),s(t),r,o,i,a);return a.delete(e),l;case x:if(Un)return Un.call(e)==Un.call(t)}return!1}(t,n,u,r,o,i,a);if(!(1&r)){var C=w&&Oe.call(t,"__wrapped__"),N=g&&Oe.call(n,"__wrapped__");if(C||N){var B=C?t.value():t,M=N?n.value():n;return a||(a=new Gn),i(B,M,r,o,a)}}return!!A&&(a||(a=new Gn),function(t,n,r,o,i,a){var s=1&r,c=ei(t),u=c.length;if(u!=ei(n).length&&!s)return!1;for(var l=u;l--;){var d=c[l];if(!(s?d in n:Oe.call(n,d)))return!1}var f=a.get(t),h=a.get(n);if(f&&h)return f==n&&h==t;var p=!0;a.set(t,n),a.set(n,t);for(var m=s;++l<u;){var w=t[d=c[l]],g=n[d];if(o)var y=s?o(g,w,d,n,t,a):o(w,g,d,t,n,a);if(!(y===e?w===g||i(w,g,r,o,a):y)){p=!1;break}m||(m="constructor"==d)}if(p&&!m){var b=t.constructor,v=n.constructor;b==v||!("constructor"in t)||!("constructor"in n)||"function"==typeof b&&b instanceof b&&"function"==typeof v&&v instanceof v||(p=!1)}return a.delete(t),a.delete(n),p}(t,n,r,o,i,a))}(t,n,r,o,Nr,i))}function Br(t,n,r,o){var i=r.length,a=i,s=!o;if(null==t)return!a;for(t=Ee(t);i--;){var c=r[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=r[i])[0],l=t[u],d=c[1];if(s&&c[2]){if(l===e&&!(u in t))return!1}else{var f=new Gn;if(o)var h=o(l,d,u,t,n,f);if(!(h===e?Nr(d,l,3,o,f):h))return!1}}return!0}function Mr(e){return!(!$a(e)||(t=e,Ue&&Ue in t))&&(Qa(e)?qe:de).test(Di(e));var t}function Pr(e){return"function"==typeof e?e:null==e?nc:"object"==typeof e?ja(e)?Dr(e[0],e[1]):Lr(e):dc(e)}function Or(e){if(!vi(e))return pn(e);var t=[];for(var n in Ee(e))Oe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Rr(e,t){return e<t}function Ur(e,t){var n=-1,r=za(e)?be(e.length):[];return ur(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function Lr(e){var t=si(e);return 1==t.length&&t[0][2]?ki(t[0][0],t[0][1]):function(n){return n===e||Br(n,e,t)}}function Dr(t,n){return gi(t)&&Ai(n)?ki(Li(t),n):function(r){var o=xs(r,t);return o===e&&o===n?Cs(r,t):Nr(n,o,3)}}function Fr(t,n,r,o,i){t!==n&&mr(n,function(a,s){if(i||(i=new Gn),$a(a))!function(t,n,r,o,i,a,s){var c=xi(t,r),u=xi(n,r),l=s.get(u);if(l)Zn(t,r,l);else{var d=a?a(c,u,r+"",t,n,s):e,f=d===e;if(f){var h=ja(u),p=!h&&Ja(u),m=!h&&!p&&cs(u);d=u,h||p||m?ja(c)?d=c:Ga(c)?d=Co(c):p?(f=!1,d=vo(u,!0)):m?(f=!1,d=ko(u,!0)):d=[]:rs(u)||Wa(u)?(d=c,Wa(c)?d=ws(c):$a(c)&&!Qa(c)||(d=hi(u))):f=!1}f&&(s.set(u,d),i(d,u,o,a,s),s.delete(u)),Zn(t,r,d)}}(t,n,s,r,Fr,o,i);else{var c=o?o(xi(t,s),a,s+"",t,n,i):e;c===e&&(c=a),Zn(t,s,c)}},Ms)}function qr(t,n){var r=t.length;if(r)return mi(n+=n<0?r:0,r)?t[n]:e}function Hr(e,t,n){t=t.length?It(t,function(e){return ja(e)?function(t){return vr(t,1===e.length?e[0]:e)}:e}):[nc];var r=-1;return t=It(t,zt(ii())),function(e){var t=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var c=To(o[r],i[r]);if(c)return r>=s?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(Ur(e,function(e,n,o){return{criteria:It(t,function(t){return t(e)}),index:++r,value:e}}))}function Vr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=vr(e,a);n(s,a)&&Kr(i,wo(a,e),s)}return i}function Wr(e,t,n,r){var o=r?Lt:Ut,i=-1,a=t.length,s=e;for(e===t&&(t=Co(t)),n&&(s=It(e,zt(n)));++i<a;)for(var c=0,u=t[i],l=n?n(u):u;(c=o(s,l,c,r))>-1;)s!==e&&Qe.call(s,c,1),Qe.call(e,c,1);return e}function jr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;mi(o)?Qe.call(e,o,1):so(e,o)}}return e}function Yr(e,t){return e+Ht(bn()*(t-e+1))}function zr(e,t){var n="";if(!e||t<1||t>s)return n;do{t%2&&(n+=e),(t=Ht(t/2))&&(e+=e)}while(t);return n}function Gr(e,t){return Si(Ti(e,t,nc),e+"")}function Jr(e){return Xn(qs(e))}function Xr(e,t){var n=qs(e);return Mi(n,or(t,0,n.length))}function Kr(t,n,r,o){if(!$a(t))return t;for(var i=-1,a=(n=wo(n,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=Li(n[i]),l=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(i!=s){var d=c[u];(l=o?o(d,u,c):e)===e&&(l=$a(d)?d:mi(n[i+1])?[]:{})}_n(c,u,l),c=c[u]}return t}var Qr=In?function(e,t){return In.set(e,t),e}:nc,Zr=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:$s(t),writable:!0})}:nc;function _r(e){return Mi(qs(e))}function $r(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=be(o);++r<o;)i[r]=e[r+t];return i}function eo(e,t){var n;return ur(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function to(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!ss(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return no(e,t,nc,n)}function no(t,n,r,o){var i=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(n=r(n))!=n,c=null===n,u=ss(n),l=n===e;i<a;){var d=Ht((i+a)/2),f=r(t[d]),h=f!==e,p=null===f,m=f==f,w=ss(f);if(s)var g=o||m;else g=l?m&&(o||h):c?m&&h&&(o||!p):u?m&&h&&!p&&(o||!w):!p&&!w&&(o?f<=n:f<n);g?i=d+1:a=d}return wn(a,4294967294)}function ro(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!qa(s,c)){var c=s;i[o++]=0===a?0:a}}return i}function oo(e){return"number"==typeof e?e:ss(e)?c:+e}function io(e){if("string"==typeof e)return e;if(ja(e))return It(e,io)+"";if(ss(e))return Ln?Ln.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ao(e,t,n){var r=-1,o=xt,i=e.length,a=!0,s=[],c=s;if(n)a=!1,o=Ct;else if(i>=200){var u=t?null:Go(e);if(u)return rn(u);a=!1,o=Jt,c=new zn}else c=t?[]:s;e:for(;++r<i;){var l=e[r],d=t?t(l):l;if(l=n||0!==l?l:0,a&&d==d){for(var f=c.length;f--;)if(c[f]===d)continue e;t&&c.push(d),s.push(l)}else o(c,d,n)||(c!==s&&c.push(d),s.push(l))}return s}function so(e,t){var n=-1,r=(t=wo(t,e)).length;if(!r)return!0;for(var o=null==e||"object"!=typeof e&&"function"!=typeof e;++n<r;){var i=t[n];if("string"==typeof i){if("__proto__"===i&&!Oe.call(e,"__proto__"))return!1;if("constructor"===i&&n+1<r&&"string"==typeof t[n+1]&&"prototype"===t[n+1]){if(o&&0===n)continue;return!1}}}var a=Ei(e,t);return null==a||delete a[Li(Ki(t))]}function co(e,t,n,r){return Kr(e,t,n(vr(e,t)),r)}function uo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?$r(e,r?0:i,r?i+1:o):$r(e,r?i+1:0,r?o:i)}function lo(e,t){var n=e;return n instanceof Vn&&(n=n.value()),Nt(t,function(e,t){return t.func.apply(t.thisArg,St([e],t.args))},n)}function fo(e,t,n){var r=e.length;if(r<2)return r?ao(e[0]):[];for(var o=-1,i=be(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=cr(i[o]||a,e[s],t,n));return ao(pr(i,1),t,n)}function ho(t,n,r){for(var o=-1,i=t.length,a=n.length,s={};++o<i;){var c=o<a?n[o]:e;r(s,t[o],c)}return s}function po(e){return Ga(e)?e:[]}function mo(e){return"function"==typeof e?e:nc}function wo(e,t){return ja(e)?e:gi(e,t)?[e]:Ui(gs(e))}var go=Gr;function yo(t,n,r){var o=t.length;return r=r===e?o:r,!n&&r>=o?t:$r(t,n,r)}var bo=ut||function(e){return st.clearTimeout(e)};function vo(e,t){if(t)return e.slice();var n=e.length,r=je?je(n):new e.constructor(n);return e.copy(r),r}function Ao(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function ko(e,t){var n=t?Ao(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function To(t,n){if(t!==n){var r=t!==e,o=null===t,i=t==t,a=ss(t),s=n!==e,c=null===n,u=n==n,l=ss(n);if(!c&&!l&&!a&&t>n||a&&s&&u&&!c&&!l||o&&s&&u||!r&&u||!i)return 1;if(!o&&!a&&!l&&t<n||l&&r&&i&&!o&&!a||c&&r&&i||!s&&i||!u)return-1}return 0}function Eo(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,c=t.length,u=mn(i-a,0),l=be(c+u),d=!r;++s<c;)l[s]=t[s];for(;++o<a;)(d||o<i)&&(l[n[o]]=e[o]);for(;u--;)l[s++]=e[o++];return l}function xo(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,c=-1,u=t.length,l=mn(i-s,0),d=be(l+u),f=!r;++o<l;)d[o]=e[o];for(var h=o;++c<u;)d[h+c]=t[c];for(;++a<s;)(f||o<i)&&(d[h+n[a]]=e[o++]);return d}function Co(e,t){var n=-1,r=e.length;for(t||(t=be(r));++n<r;)t[n]=e[n];return t}function Io(t,n,r,o){var i=!r;r||(r={});for(var a=-1,s=n.length;++a<s;){var c=n[a],u=o?o(r[c],t[c],c,r,t):e;u===e&&(u=t[c]),i?nr(r,c,u):_n(r,c,u)}return r}function So(e,t){return function(n,r){var o=ja(n)?vt:er,i=t?t():{};return o(n,e,ii(r,2),i)}}function No(t){return Gr(function(n,r){var o=-1,i=r.length,a=i>1?r[i-1]:e,s=i>2?r[2]:e;for(a=t.length>3&&"function"==typeof a?(i--,a):e,s&&wi(r[0],r[1],s)&&(a=i<3?e:a,i=1),n=Ee(n);++o<i;){var c=r[o];c&&t(n,c,o,a)}return n})}function Bo(e,t){return function(n,r){if(null==n)return n;if(!za(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ee(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Mo(e){return function(t,n,r){for(var o=-1,i=Ee(t),a=r(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===n(i[c],c,i))break}return t}}function Po(t){return function(n){var r=$t(n=gs(n))?an(n):e,o=r?r[0]:n.charAt(0),i=r?yo(r,1).join(""):n.slice(1);return o[t]()+i}}function Oo(e){return function(t){return Nt(Qs(Ws(t).replace(Ge,"")),e,"")}}function Ro(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return $a(r)?r:n}}function Uo(t){return function(n,r,o){var i=Ee(n);if(!za(n)){var a=ii(r,3);n=Bs(n),r=function(e){return a(i[e],e,i)}}var s=t(n,r,o);return s>-1?i[a?n[s]:s]:e}}function Lo(n){return $o(function(r){var o=r.length,i=o,a=Hn.prototype.thru;for(n&&r.reverse();i--;){var s=r[i];if("function"!=typeof s)throw new Ie(t);if(a&&!c&&"wrapper"==ri(s))var c=new Hn([],!0)}for(i=c?i:o;++i<o;){var u=ri(s=r[i]),l="wrapper"==u?ni(s):e;c=l&&yi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[ri(l[0])].apply(c,l[3]):1==s.length&&yi(s)?c[u]():c.thru(s)}return function(){var e=arguments,t=e[0];if(c&&1==e.length&&ja(t))return c.plant(t).value();for(var n=0,i=o?r[n].apply(this,e):t;++n<o;)i=r[n].call(this,i);return i}})}function Do(t,n,r,o,a,s,c,u,l,d){var f=n&i,h=1&n,p=2&n,m=24&n,w=512&n,g=p?e:Ro(t);return function i(){for(var y=arguments.length,b=be(y),v=y;v--;)b[v]=arguments[v];if(m)var A=oi(i),k=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,A);if(o&&(b=Eo(b,o,a,m)),s&&(b=xo(b,s,c,m)),y-=k,m&&y<d){var T=nn(b,A);return Yo(t,n,Do,i.placeholder,r,b,T,u,l,d-y)}var E=h?r:this,x=p?E[t]:t;return y=b.length,u?b=function(t,n){for(var r=t.length,o=wn(n.length,r),i=Co(t);o--;){var a=n[o];t[o]=mi(a,r)?i[a]:e}return t}(b,u):w&&y>1&&b.reverse(),f&&l<y&&(b.length=l),this&&this!==st&&this instanceof i&&(x=g||Ro(x)),x.apply(E,b)}}function Fo(e,t){return function(n,r){return function(e,t,n,r){return gr(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}function qo(t,n){return function(r,o){var i;if(r===e&&o===e)return n;if(r!==e&&(i=r),o!==e){if(i===e)return o;"string"==typeof r||"string"==typeof o?(r=io(r),o=io(o)):(r=oo(r),o=oo(o)),i=t(r,o)}return i}}function Ho(e){return $o(function(t){return t=It(t,zt(ii())),Gr(function(n){var r=this;return e(t,function(e){return bt(e,r,n)})})})}function Vo(t,n){var r=(n=n===e?" ":io(n)).length;if(r<2)return r?zr(n,t):n;var o=zr(n,Pt(t/on(n)));return $t(n)?yo(an(o),0,t).join(""):o.slice(0,t)}function Wo(t){return function(n,r,o){return o&&"number"!=typeof o&&wi(n,r,o)&&(r=o=e),n=fs(n),r===e?(r=n,n=0):r=fs(r),function(e,t,n,r){for(var o=-1,i=mn(Pt((t-e)/(n||1)),0),a=be(i);i--;)a[r?i:++o]=e,e+=n;return a}(n,r,o=o===e?n<r?1:-1:fs(o),t)}}function jo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function Yo(t,n,r,i,a,s,c,u,l,d){var f=8&n;n|=f?o:64,4&(n&=~(f?64:o))||(n&=-4);var h=[t,n,a,f?s:e,f?c:e,f?e:s,f?e:c,u,l,d],p=r.apply(e,h);return yi(t)&&Ci(p,h),p.placeholder=i,Ni(p,t,n)}function zo(e){var t=Te[e];return function(e,n){if(e=ms(e),(n=null==n?0:wn(hs(n),292))&&fn(e)){var r=(gs(e)+"e").split("e");return+((r=(gs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Go=En&&1/rn(new En([,-0]))[1]==a?function(e){return new En(e)}:sc;function Jo(e){return function(t){var n,r,o,i=di(t);return i==y?en(t):i==T?(n=t,r=-1,o=Array(n.size),n.forEach(function(e){o[++r]=[e,e]}),o):function(e,t){return It(t,function(t){return[t,e[t]]})}(t,e(t))}}function Xo(n,a,s,c,u,l,d,f){var h=2&a;if(!h&&"function"!=typeof n)throw new Ie(t);var p=c?c.length:0;if(p||(a&=-97,c=u=e),d=d===e?d:mn(hs(d),0),f=f===e?f:hs(f),p-=u?u.length:0,64&a){var m=c,w=u;c=u=e}var g=h?e:ni(n),y=[n,a,s,c,u,m,w,l,d,f];if(g&&function(e,t){var n=e[1],o=t[1],a=n|o,s=a<131,c=o==i&&8==n||o==i&&256==n&&e[7].length<=t[8]||384==o&&t[7].length<=t[8]&&8==n;if(!s&&!c)return e;1&o&&(e[2]=t[2],a|=1&n?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Eo(l,u,t[4]):u,e[4]=l?nn(e[3],r):t[4]}(u=t[5])&&(l=e[5],e[5]=l?xo(l,u,t[6]):u,e[6]=l?nn(e[5],r):t[6]),(u=t[7])&&(e[7]=u),o&i&&(e[8]=null==e[8]?t[8]:wn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=a}(y,g),n=y[0],a=y[1],s=y[2],c=y[3],u=y[4],!(f=y[9]=y[9]===e?h?0:n.length:mn(y[9]-p,0))&&24&a&&(a&=-25),a&&1!=a)b=8==a||16==a?function(t,n,r){var o=Ro(t);return function i(){for(var a=arguments.length,s=be(a),c=a,u=oi(i);c--;)s[c]=arguments[c];var l=a<3&&s[0]!==u&&s[a-1]!==u?[]:nn(s,u);return(a-=l.length)<r?Yo(t,n,Do,i.placeholder,e,s,l,e,e,r-a):bt(this&&this!==st&&this instanceof i?o:t,this,s)}}(n,a,f):a!=o&&33!=a||u.length?Do.apply(e,y):function(e,t,n,r){var o=1&t,i=Ro(e);return function t(){for(var a=-1,s=arguments.length,c=-1,u=r.length,l=be(u+s),d=this&&this!==st&&this instanceof t?i:e;++c<u;)l[c]=r[c];for(;s--;)l[c++]=arguments[++a];return bt(d,o?n:this,l)}}(n,a,s,c);else var b=function(e,t,n){var r=1&t,o=Ro(e);return function t(){return(this&&this!==st&&this instanceof t?o:e).apply(r?n:this,arguments)}}(n,a,s);return Ni((g?Qr:Ci)(b,y),n,a)}function Ko(t,n,r,o){return t===e||qa(t,Be[r])&&!Oe.call(o,r)?n:t}function Qo(t,n,r,o,i,a){return $a(t)&&$a(n)&&(a.set(n,t),Fr(t,n,e,Qo,a),a.delete(n)),t}function Zo(t){return rs(t)?e:t}function _o(t,n,r,o,i,a){var s=1&r,c=t.length,u=n.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t),d=a.get(n);if(l&&d)return l==n&&d==t;var f=-1,h=!0,p=2&r?new zn:e;for(a.set(t,n),a.set(n,t);++f<c;){var m=t[f],w=n[f];if(o)var g=s?o(w,m,f,n,t,a):o(m,w,f,t,n,a);if(g!==e){if(g)continue;h=!1;break}if(p){if(!Mt(n,function(e,t){if(!Jt(p,t)&&(m===e||i(m,e,r,o,a)))return p.push(t)})){h=!1;break}}else if(m!==w&&!i(m,w,r,o,a)){h=!1;break}}return a.delete(t),a.delete(n),h}function $o(t){return Si(Ti(t,e,Yi),t+"")}function ei(e){return Ar(e,Bs,ui)}function ti(e){return Ar(e,Ms,li)}var ni=In?function(e){return In.get(e)}:sc;function ri(e){for(var t=e.name+"",n=Sn[t],r=Oe.call(Sn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function oi(e){return(Oe.call(Dn,"placeholder")?Dn:e).placeholder}function ii(){var e=Dn.iteratee||rc;return e=e===rc?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function ai(e,t){var n,r,o=e.qe;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function si(e){for(var t=Bs(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Ai(o)]}return t}function ci(t,n){var r=function(t,n){return null==t?e:t[n]}(t,n);return Mr(r)?r:e}var ui=ln?function(e){return null==e?[]:(e=Ee(e),Et(ln(e),function(t){return Xe.call(e,t)}))}:pc,li=ln?function(e){for(var t=[];e;)St(t,ui(e)),e=Ye(e);return t}:pc,di=kr;function fi(e,t,n){for(var r=-1,o=(t=wo(t,e)).length,i=!1;++r<o;){var a=Li(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&_a(o)&&mi(a,o)&&(ja(e)||Wa(e))}function hi(e){return"function"!=typeof e.constructor||vi(e)?{}:Fn(Ye(e))}function pi(e){return ja(e)||Wa(e)||!!(nt&&e&&e[nt])}function mi(e,t){var n=typeof e;return!!(t=null==t?s:t)&&("number"==n||"symbol"!=n&&he.test(e))&&e>-1&&e%1==0&&e<t}function wi(e,t,n){if(!$a(n))return!1;var r=typeof t;return!!("number"==r?za(n)&&mi(t,n.length):"string"==r&&t in n)&&qa(n[t],e)}function gi(e,t){if(ja(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||K.test(e)||!X.test(e)||null!=t&&e in Ee(t)}function yi(e){var t=ri(e),n=Dn[t];if("function"!=typeof n||!(t in Vn.prototype))return!1;if(e===n)return!0;var r=ni(n);return!!r&&e===r[0]}(An&&di(new An(new ArrayBuffer(1)))!=S||kn&&di(new kn)!=y||Tn&&di(Tn.resolve())!=A||En&&di(new En)!=T||xn&&di(new xn)!=C)&&(di=function(t){var n=kr(t),r=n==v?t.constructor:e,o=r?Di(r):"";if(o)switch(o){case Nn:return S;case Bn:return y;case Mn:return A;case Pn:return T;case On:return C}return n});var bi=Me?Qa:mc;function vi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Be)}function Ai(e){return e==e&&!$a(e)}function ki(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in Ee(r))}}function Ti(t,n,r){return n=mn(n===e?t.length-1:n,0),function(){for(var e=arguments,o=-1,i=mn(e.length-n,0),a=be(i);++o<i;)a[o]=e[n+o];o=-1;for(var s=be(n+1);++o<n;)s[o]=e[o];return s[n]=r(a),bt(t,this,s)}}function Ei(e,t){return t.length<2?e:vr(e,$r(t,0,-1))}function xi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ci=Bi(Qr),Ii=ft||function(e,t){return st.setTimeout(e,t)},Si=Bi(Zr);function Ni(e,t,n){var r=t+"";return Si(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(te,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return At(l,function(n){var r="_."+n[0];t&n[1]&&!xt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ne);return t?t[1].split(re):[]}(r),n)))}function Bi(t){var n=0,r=0;return function(){var o=gn(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Mi(t,n){var r=-1,o=t.length,i=o-1;for(n=n===e?o:n;++r<n;){var a=Yr(r,i),s=t[a];t[a]=t[r],t[r]=s}return t.length=n,t}var Pi,Oi,Ri,Ui=(Pi=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,n,r,o){t.push(r?o.replace(ae,"$1"):n||e)}),t},Oi=Oa(Pi,function(e){return 500===Ri.size&&Ri.clear(),e}),Ri=Oi.cache,Oi);function Li(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Di(e){if(null!=e){try{return Pe.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Fi(e){if(e instanceof Vn)return e.clone();var t=new Hn(e.Ne,e.Me);return t.Be=Co(e.Be),t.Pe=e.Pe,t.Oe=e.Oe,t}var qi=Gr(function(e,t){return Ga(e)?cr(e,pr(t,1,Ga,!0)):[]}),Hi=Gr(function(t,n){var r=Ki(n);return Ga(r)&&(r=e),Ga(t)?cr(t,pr(n,1,Ga,!0),ii(r,2)):[]}),Vi=Gr(function(t,n){var r=Ki(n);return Ga(r)&&(r=e),Ga(t)?cr(t,pr(n,1,Ga,!0),e,r):[]});function Wi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=mn(r+o,0)),Rt(e,ii(t,3),o)}function ji(t,n,r){var o=null==t?0:t.length;if(!o)return-1;var i=o-1;return r!==e&&(i=hs(r),i=r<0?mn(o+i,0):wn(i,o-1)),Rt(t,ii(n,3),i,!0)}function Yi(e){return null!=e&&e.length?pr(e,1):[]}function zi(t){return t&&t.length?t[0]:e}var Gi=Gr(function(e){var t=It(e,po);return t.length&&t[0]===e[0]?Cr(t):[]}),Ji=Gr(function(t){var n=Ki(t),r=It(t,po);return n===Ki(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Cr(r,ii(n,2)):[]}),Xi=Gr(function(t){var n=Ki(t),r=It(t,po);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Cr(r,e,n):[]});function Ki(t){var n=null==t?0:t.length;return n?t[n-1]:e}var Qi=Gr(Zi);function Zi(e,t){return e&&e.length&&t&&t.length?Wr(e,t):e}var _i=$o(function(e,t){var n=null==e?0:e.length,r=rr(e,t);return jr(e,It(t,function(e){return mi(e,n)?+e:e}).sort(To)),r});function $i(e){return null==e?e:vn.call(e)}var ea=Gr(function(e){return ao(pr(e,1,Ga,!0))}),ta=Gr(function(t){var n=Ki(t);return Ga(n)&&(n=e),ao(pr(t,1,Ga,!0),ii(n,2))}),na=Gr(function(t){var n=Ki(t);return n="function"==typeof n?n:e,ao(pr(t,1,Ga,!0),e,n)});function ra(e){if(!e||!e.length)return[];var t=0;return e=Et(e,function(e){if(Ga(e))return t=mn(e.length,t),!0}),jt(t,function(t){return It(e,qt(t))})}function oa(t,n){if(!t||!t.length)return[];var r=ra(t);return null==n?r:It(r,function(t){return bt(n,e,t)})}var ia=Gr(function(e,t){return Ga(e)?cr(e,t):[]}),aa=Gr(function(e){return fo(Et(e,Ga))}),sa=Gr(function(t){var n=Ki(t);return Ga(n)&&(n=e),fo(Et(t,Ga),ii(n,2))}),ca=Gr(function(t){var n=Ki(t);return n="function"==typeof n?n:e,fo(Et(t,Ga),e,n)}),ua=Gr(ra),la=Gr(function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,oa(t,r)});function da(e){var t=Dn(e);return t.Me=!0,t}function fa(e,t){return t(e)}var ha=$o(function(t){var n=t.length,r=n?t[0]:0,o=this.Ne,i=function(e){return rr(e,t)};return!(n>1||this.Be.length)&&o instanceof Vn&&mi(r)?((o=o.slice(r,+r+(n?1:0))).Be.push({func:fa,args:[i],thisArg:e}),new Hn(o,this.Me).thru(function(t){return n&&!t.length&&t.push(e),t})):this.thru(i)}),pa=So(function(e,t,n){Oe.call(e,n)?++e[n]:nr(e,n,1)}),ma=Uo(Wi),wa=Uo(ji);function ga(e,t){return(ja(e)?At:ur)(e,ii(t,3))}function ya(e,t){return(ja(e)?kt:lr)(e,ii(t,3))}var ba=So(function(e,t,n){Oe.call(e,n)?e[n].push(t):nr(e,n,[t])}),va=Gr(function(e,t,n){var r=-1,o="function"==typeof t,i=za(e)?be(e.length):[];return ur(e,function(e){i[++r]=o?bt(t,e,n):Ir(e,t,n)}),i}),Aa=So(function(e,t,n){nr(e,n,t)});function ka(e,t){return(ja(e)?It:Ur)(e,ii(t,3))}var Ta=So(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Ea=Gr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&wi(e,t[0],t[1])?t=[]:n>2&&wi(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,pr(t,1),[])}),xa=dt||function(){return st.Date.now()};function Ca(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,Xo(t,i,e,e,e,e,n)}function Ia(n,r){var o;if("function"!=typeof r)throw new Ie(t);return n=hs(n),function(){return--n>0&&(o=r.apply(this,arguments)),n<=1&&(r=e),o}}var Sa=Gr(function(e,t,n){var r=1;if(n.length){var i=nn(n,oi(Sa));r|=o}return Xo(e,r,t,n,i)}),Na=Gr(function(e,t,n){var r=3;if(n.length){var i=nn(n,oi(Na));r|=o}return Xo(t,r,e,n,i)});function Ba(n,r,o){var i,a,s,c,u,l,d=0,f=!1,h=!1,p=!0;if("function"!=typeof n)throw new Ie(t);function m(t){var r=i,o=a;return i=a=e,d=t,c=n.apply(o,r)}function w(t){var n=t-l;return l===e||n>=r||n<0||h&&t-d>=s}function g(){var e=xa();if(w(e))return y(e);u=Ii(g,function(e){var t=r-(e-l);return h?wn(t,s-(e-d)):t}(e))}function y(t){return u=e,p&&i?m(t):(i=a=e,c)}function b(){var t=xa(),n=w(t);if(i=arguments,a=this,l=t,n){if(u===e)return function(e){return d=e,u=Ii(g,r),f?m(e):c}(l);if(h)return bo(u),u=Ii(g,r),m(l)}return u===e&&(u=Ii(g,r)),c}return r=ms(r)||0,$a(o)&&(f=!!o.leading,s=(h="maxWait"in o)?mn(ms(o.maxWait)||0,r):s,p="trailing"in o?!!o.trailing:p),b.cancel=function(){u!==e&&bo(u),d=0,i=l=a=u=e},b.flush=function(){return u===e?c:y(xa())},b}var Ma=Gr(function(e,t){return sr(e,1,t)}),Pa=Gr(function(e,t,n){return sr(e,ms(t)||0,n)});function Oa(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new Ie(t);var r=function(){var t=arguments,o=n?n.apply(this,t):t[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,t);return r.cache=i.set(o,a)||i,a};return r.cache=new(Oa.Cache||Yn),r}function Ra(e){if("function"!=typeof e)throw new Ie(t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=Yn;var Ua=go(function(e,t){var n=(t=1==t.length&&ja(t[0])?It(t[0],zt(ii())):It(pr(t,1),zt(ii()))).length;return Gr(function(r){for(var o=-1,i=wn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return bt(e,this,r)})}),La=Gr(function(t,n){var r=nn(n,oi(La));return Xo(t,o,e,n,r)}),Da=Gr(function(t,n){var r=nn(n,oi(Da));return Xo(t,64,e,n,r)}),Fa=$o(function(t,n){return Xo(t,256,e,e,e,n)});function qa(e,t){return e===t||e!=e&&t!=t}var Ha=jo(Tr),Va=jo(function(e,t){return e>=t}),Wa=Sr(/* @__PURE__ */function(){return arguments}())?Sr:function(e){return es(e)&&Oe.call(e,"callee")&&!Xe.call(e,"callee")},ja=be.isArray,Ya=ht?zt(ht):function(e){return es(e)&&kr(e)==I};function za(e){return null!=e&&_a(e.length)&&!Qa(e)}function Ga(e){return es(e)&&za(e)}var Ja=dn||mc,Xa=pt?zt(pt):function(e){return es(e)&&kr(e)==p};function Ka(e){if(!es(e))return!1;var t=kr(e);return t==m||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function Qa(e){if(!$a(e))return!1;var t=kr(e);return t==w||t==g||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==hs(e)}function _a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function $a(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=mt?zt(mt):function(e){return es(e)&&di(e)==y};function ns(e){return"number"==typeof e||es(e)&&kr(e)==b}function rs(e){if(!es(e)||kr(e)!=v)return!1;var t=Ye(e);if(null===t)return!0;var n=Oe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Pe.call(n)==De}var os=wt?zt(wt):function(e){return es(e)&&kr(e)==k},is=gt?zt(gt):function(e){return es(e)&&di(e)==T};function as(e){return"string"==typeof e||!ja(e)&&es(e)&&kr(e)==E}function ss(e){return"symbol"==typeof e||es(e)&&kr(e)==x}var cs=yt?zt(yt):function(e){return es(e)&&_a(e.length)&&!!et[kr(e)]},us=jo(Rr),ls=jo(function(e,t){return e<=t});function ds(e){if(!e)return[];if(za(e))return as(e)?an(e):Co(e);if(it&&e[it])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[it]());var t=di(e);return(t==y?en:t==T?rn:qs)(e)}function fs(e){return e?(e=ms(e))===a||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=fs(e),n=t%1;return t==t?n?t-n:t:0}function ps(e){return e?or(hs(e),0,u):0}function ms(e){if("number"==typeof e)return e;if(ss(e))return c;if($a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=$a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var n=le.test(e);return n||fe.test(e)?ot(e.slice(2),n?2:8):ue.test(e)?c:+e}function ws(e){return Io(e,Ms(e))}function gs(e){return null==e?"":io(e)}var ys=No(function(e,t){if(vi(t)||za(t))Io(t,Bs(t),e);else for(var n in t)Oe.call(t,n)&&_n(e,n,t[n])}),bs=No(function(e,t){Io(t,Ms(t),e)}),vs=No(function(e,t,n,r){Io(t,Ms(t),e,r)}),As=No(function(e,t,n,r){Io(t,Bs(t),e,r)}),ks=$o(rr),Ts=Gr(function(t,n){t=Ee(t);var r=-1,o=n.length,i=o>2?n[2]:e;for(i&&wi(n[0],n[1],i)&&(o=1);++r<o;)for(var a=n[r],s=Ms(a),c=-1,u=s.length;++c<u;){var l=s[c],d=t[l];(d===e||qa(d,Be[l])&&!Oe.call(t,l))&&(t[l]=a[l])}return t}),Es=Gr(function(t){return t.push(e,Qo),bt(Os,e,t)});function xs(t,n,r){var o=null==t?e:vr(t,n);return o===e?r:o}function Cs(e,t){return null!=e&&fi(e,t,xr)}var Is=Fo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=n},$s(nc)),Ss=Fo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),Oe.call(e,t)?e[t].push(n):e[t]=[n]},ii),Ns=Gr(Ir);function Bs(e){return za(e)?Jn(e):Or(e)}function Ms(e){return za(e)?Jn(e,!0):function(e){if(!$a(e))return function(e){var t=[];if(null!=e)for(var n in Ee(e))t.push(n);return t}(e);var t=vi(e),n=[];for(var r in e)("constructor"!=r||!t&&Oe.call(e,r))&&n.push(r);return n}(e)}var Ps=No(function(e,t,n){Fr(e,t,n)}),Os=No(function(e,t,n,r){Fr(e,t,n,r)}),Rs=$o(function(e,t){var n={};if(null==e)return n;var r=!1;t=It(t,function(t){return t=wo(t,e),r||(r=t.length>1),t}),Io(e,ti(e),n),r&&(n=ir(n,7,Zo));for(var o=t.length;o--;)so(n,t[o]);return n}),Us=$o(function(e,t){return null==e?{}:function(e,t){return Vr(e,t,function(t,n){return Cs(e,n)})}(e,t)});function Ls(e,t){if(null==e)return{};var n=It(ti(e),function(e){return[e]});return t=ii(t),Vr(e,n,function(e,n){return t(e,n[0])})}var Ds=Jo(Bs),Fs=Jo(Ms);function qs(e){return null==e?[]:Gt(e,Bs(e))}var Hs=Oo(function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)});function Vs(e){return Ks(gs(e).toLowerCase())}function Ws(e){return(e=gs(e))&&e.replace(pe,Qt).replace(Je,"")}var js=Oo(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ys=Oo(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),zs=Po("toLowerCase"),Gs=Oo(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Js=Oo(function(e,t,n){return e+(n?" ":"")+Ks(t)}),Xs=Oo(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ks=Po("toUpperCase");function Qs(t,n,r){return t=gs(t),(n=r?e:n)===e?function(e){return Ze.test(e)}(t)?function(e){return e.match(Ke)||[]}(t):function(e){return e.match(oe)||[]}(t):t.match(n)||[]}var Zs=Gr(function(t,n){try{return bt(t,e,n)}catch(r){return Ka(r)?r:new Ae(r)}}),_s=$o(function(e,t){return At(t,function(t){t=Li(t),nr(e,t,Sa(e[t],e))}),e});function $s(e){return function(){return e}}var ec=Lo(),tc=Lo(!0);function nc(e){return e}function rc(e){return Pr("function"==typeof e?e:ir(e,1))}var oc=Gr(function(e,t){return function(n){return Ir(n,e,t)}}),ic=Gr(function(e,t){return function(n){return Ir(e,n,t)}});function ac(e,t,n){var r=Bs(t),o=br(t,r);null!=n||$a(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=br(t,Bs(t)));var i=!($a(n)&&"chain"in n&&!n.chain),a=Qa(e);return At(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.Me;if(i||t){var n=e(this.Ne);return(n.Be=Co(this.Be)).push({func:r,args:arguments,thisArg:e}),n.Me=t,n}return r.apply(e,St([this.value()],arguments))})}),e}function sc(){}var cc=Ho(It),uc=Ho(Tt),lc=Ho(Mt);function dc(e){return gi(e)?qt(Li(e)):function(e){return function(t){return vr(t,e)}}(e)}var fc=Wo(),hc=Wo(!0);function pc(){return[]}function mc(){return!1}var wc,gc=qo(function(e,t){return e+t},0),yc=zo("ceil"),bc=qo(function(e,t){return e/t},1),vc=zo("floor"),Ac=qo(function(e,t){return e*t},1),kc=zo("round"),Tc=qo(function(e,t){return e-t},0);return Dn.after=function(e,n){if("function"!=typeof n)throw new Ie(t);return e=hs(e),function(){if(--e<1)return n.apply(this,arguments)}},Dn.ary=Ca,Dn.assign=ys,Dn.assignIn=bs,Dn.assignInWith=vs,Dn.assignWith=As,Dn.at=ks,Dn.before=Ia,Dn.bind=Sa,Dn.bindAll=_s,Dn.bindKey=Na,Dn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return ja(e)?e:[e]},Dn.chain=da,Dn.chunk=function(t,n,r){n=(r?wi(t,n,r):n===e)?1:mn(hs(n),0);var o=null==t?0:t.length;if(!o||n<1)return[];for(var i=0,a=0,s=be(Pt(o/n));i<o;)s[a++]=$r(t,i,i+=n);return s},Dn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Dn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=be(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return St(ja(n)?Co(n):[n],pr(t,1))},Dn.cond=function(e){var n=null==e?0:e.length,r=ii();return e=n?It(e,function(e){if("function"!=typeof e[1])throw new Ie(t);return[r(e[0]),e[1]]}):[],Gr(function(t){for(var r=-1;++r<n;){var o=e[r];if(bt(o[0],this,t))return bt(o[1],this,t)}})},Dn.conforms=function(e){return function(e){var t=Bs(e);return function(n){return ar(n,e,t)}}(ir(e,1))},Dn.constant=$s,Dn.countBy=pa,Dn.create=function(e,t){var n=Fn(e);return null==t?n:tr(n,t)},Dn.curry=function t(n,r,o){var i=Xo(n,8,e,e,e,e,e,r=o?e:r);return i.placeholder=t.placeholder,i},Dn.curryRight=function t(n,r,o){var i=Xo(n,16,e,e,e,e,e,r=o?e:r);return i.placeholder=t.placeholder,i},Dn.debounce=Ba,Dn.defaults=Ts,Dn.defaultsDeep=Es,Dn.defer=Ma,Dn.delay=Pa,Dn.difference=qi,Dn.differenceBy=Hi,Dn.differenceWith=Vi,Dn.drop=function(t,n,r){var o=null==t?0:t.length;return o?$r(t,(n=r||n===e?1:hs(n))<0?0:n,o):[]},Dn.dropRight=function(t,n,r){var o=null==t?0:t.length;return o?$r(t,0,(n=o-(n=r||n===e?1:hs(n)))<0?0:n):[]},Dn.dropRightWhile=function(e,t){return e&&e.length?uo(e,ii(t,3),!0,!0):[]},Dn.dropWhile=function(e,t){return e&&e.length?uo(e,ii(t,3),!0):[]},Dn.fill=function(t,n,r,o){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&wi(t,n,r)&&(r=0,o=i),function(t,n,r,o){var i=t.length;for((r=hs(r))<0&&(r=-r>i?0:i+r),(o=o===e||o>i?i:hs(o))<0&&(o+=i),o=r>o?0:ps(o);r<o;)t[r++]=n;return t}(t,n,r,o)):[]},Dn.filter=function(e,t){return(ja(e)?Et:hr)(e,ii(t,3))},Dn.flatMap=function(e,t){return pr(ka(e,t),1)},Dn.flatMapDeep=function(e,t){return pr(ka(e,t),a)},Dn.flatMapDepth=function(t,n,r){return r=r===e?1:hs(r),pr(ka(t,n),r)},Dn.flatten=Yi,Dn.flattenDeep=function(e){return null!=e&&e.length?pr(e,a):[]},Dn.flattenDepth=function(t,n){return null!=t&&t.length?pr(t,n=n===e?1:hs(n)):[]},Dn.flip=function(e){return Xo(e,512)},Dn.flow=ec,Dn.flowRight=tc,Dn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Dn.functions=function(e){return null==e?[]:br(e,Bs(e))},Dn.functionsIn=function(e){return null==e?[]:br(e,Ms(e))},Dn.groupBy=ba,Dn.initial=function(e){return null!=e&&e.length?$r(e,0,-1):[]},Dn.intersection=Gi,Dn.intersectionBy=Ji,Dn.intersectionWith=Xi,Dn.invert=Is,Dn.invertBy=Ss,Dn.invokeMap=va,Dn.iteratee=rc,Dn.keyBy=Aa,Dn.keys=Bs,Dn.keysIn=Ms,Dn.map=ka,Dn.mapKeys=function(e,t){var n={};return t=ii(t,3),gr(e,function(e,r,o){nr(n,t(e,r,o),e)}),n},Dn.mapValues=function(e,t){var n={};return t=ii(t,3),gr(e,function(e,r,o){nr(n,r,t(e,r,o))}),n},Dn.matches=function(e){return Lr(ir(e,1))},Dn.matchesProperty=function(e,t){return Dr(e,ir(t,1))},Dn.memoize=Oa,Dn.merge=Ps,Dn.mergeWith=Os,Dn.method=oc,Dn.methodOf=ic,Dn.mixin=ac,Dn.negate=Ra,Dn.nthArg=function(e){return e=hs(e),Gr(function(t){return qr(t,e)})},Dn.omit=Rs,Dn.omitBy=function(e,t){return Ls(e,Ra(ii(t)))},Dn.once=function(e){return Ia(2,e)},Dn.orderBy=function(t,n,r,o){return null==t?[]:(ja(n)||(n=null==n?[]:[n]),ja(r=o?e:r)||(r=null==r?[]:[r]),Hr(t,n,r))},Dn.over=cc,Dn.overArgs=Ua,Dn.overEvery=uc,Dn.overSome=lc,Dn.partial=La,Dn.partialRight=Da,Dn.partition=Ta,Dn.pick=Us,Dn.pickBy=Ls,Dn.property=dc,Dn.propertyOf=function(t){return function(n){return null==t?e:vr(t,n)}},Dn.pull=Qi,Dn.pullAll=Zi,Dn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,ii(n,2)):e},Dn.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?Wr(t,n,e,r):t},Dn.pullAt=_i,Dn.range=fc,Dn.rangeRight=hc,Dn.rearg=Fa,Dn.reject=function(e,t){return(ja(e)?Et:hr)(e,Ra(ii(t,3)))},Dn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ii(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return jr(e,o),n},Dn.rest=function(n,r){if("function"!=typeof n)throw new Ie(t);return Gr(n,r=r===e?r:hs(r))},Dn.reverse=$i,Dn.sampleSize=function(t,n,r){return n=(r?wi(t,n,r):n===e)?1:hs(n),(ja(t)?Kn:Xr)(t,n)},Dn.set=function(e,t,n){return null==e?e:Kr(e,t,n)},Dn.setWith=function(t,n,r,o){return o="function"==typeof o?o:e,null==t?t:Kr(t,n,r,o)},Dn.shuffle=function(e){return(ja(e)?Qn:_r)(e)},Dn.slice=function(t,n,r){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&wi(t,n,r)?(n=0,r=o):(n=null==n?0:hs(n),r=r===e?o:hs(r)),$r(t,n,r)):[]},Dn.sortBy=Ea,Dn.sortedUniq=function(e){return e&&e.length?ro(e):[]},Dn.sortedUniqBy=function(e,t){return e&&e.length?ro(e,ii(t,2)):[]},Dn.split=function(t,n,r){return r&&"number"!=typeof r&&wi(t,n,r)&&(n=r=e),(r=r===e?u:r>>>0)?(t=gs(t))&&("string"==typeof n||null!=n&&!os(n))&&!(n=io(n))&&$t(t)?yo(an(t),0,r):t.split(n,r):[]},Dn.spread=function(e,n){if("function"!=typeof e)throw new Ie(t);return n=null==n?0:mn(hs(n),0),Gr(function(t){var r=t[n],o=yo(t,0,n);return r&&St(o,r),bt(e,this,o)})},Dn.tail=function(e){var t=null==e?0:e.length;return t?$r(e,1,t):[]},Dn.take=function(t,n,r){return t&&t.length?$r(t,0,(n=r||n===e?1:hs(n))<0?0:n):[]},Dn.takeRight=function(t,n,r){var o=null==t?0:t.length;return o?$r(t,(n=o-(n=r||n===e?1:hs(n)))<0?0:n,o):[]},Dn.takeRightWhile=function(e,t){return e&&e.length?uo(e,ii(t,3),!1,!0):[]},Dn.takeWhile=function(e,t){return e&&e.length?uo(e,ii(t,3)):[]},Dn.tap=function(e,t){return t(e),e},Dn.throttle=function(e,n,r){var o=!0,i=!0;if("function"!=typeof e)throw new Ie(t);return $a(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),Ba(e,n,{leading:o,maxWait:n,trailing:i})},Dn.thru=fa,Dn.toArray=ds,Dn.toPairs=Ds,Dn.toPairsIn=Fs,Dn.toPath=function(e){return ja(e)?It(e,Li):ss(e)?[e]:Co(Ui(gs(e)))},Dn.toPlainObject=ws,Dn.transform=function(e,t,n){var r=ja(e),o=r||Ja(e)||cs(e);if(t=ii(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:$a(e)&&Qa(i)?Fn(Ye(e)):{}}return(o?At:gr)(e,function(e,r,o){return t(n,e,r,o)}),n},Dn.unary=function(e){return Ca(e,1)},Dn.union=ea,Dn.unionBy=ta,Dn.unionWith=na,Dn.uniq=function(e){return e&&e.length?ao(e):[]},Dn.uniqBy=function(e,t){return e&&e.length?ao(e,ii(t,2)):[]},Dn.uniqWith=function(t,n){return n="function"==typeof n?n:e,t&&t.length?ao(t,e,n):[]},Dn.unset=function(e,t){return null==e||so(e,t)},Dn.unzip=ra,Dn.unzipWith=oa,Dn.update=function(e,t,n){return null==e?e:co(e,t,mo(n))},Dn.updateWith=function(t,n,r,o){return o="function"==typeof o?o:e,null==t?t:co(t,n,mo(r),o)},Dn.values=qs,Dn.valuesIn=function(e){return null==e?[]:Gt(e,Ms(e))},Dn.without=ia,Dn.words=Qs,Dn.wrap=function(e,t){return La(mo(t),e)},Dn.xor=aa,Dn.xorBy=sa,Dn.xorWith=ca,Dn.zip=ua,Dn.zipObject=function(e,t){return ho(e||[],t||[],_n)},Dn.zipObjectDeep=function(e,t){return ho(e||[],t||[],Kr)},Dn.zipWith=la,Dn.entries=Ds,Dn.entriesIn=Fs,Dn.extend=bs,Dn.extendWith=vs,ac(Dn,Dn),Dn.add=gc,Dn.attempt=Zs,Dn.camelCase=Hs,Dn.capitalize=Vs,Dn.ceil=yc,Dn.clamp=function(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=ms(r))==r?r:0),n!==e&&(n=(n=ms(n))==n?n:0),or(ms(t),n,r)},Dn.clone=function(e){return ir(e,4)},Dn.cloneDeep=function(e){return ir(e,5)},Dn.cloneDeepWith=function(t,n){return ir(t,5,n="function"==typeof n?n:e)},Dn.cloneWith=function(t,n){return ir(t,4,n="function"==typeof n?n:e)},Dn.conformsTo=function(e,t){return null==t||ar(e,t,Bs(t))},Dn.deburr=Ws,Dn.defaultTo=function(e,t){return null==e||e!=e?t:e},Dn.divide=bc,Dn.endsWith=function(t,n,r){t=gs(t),n=io(n);var o=t.length,i=r=r===e?o:or(hs(r),0,o);return(r-=n.length)>=0&&t.slice(r,i)==n},Dn.eq=qa,Dn.escape=function(e){return(e=gs(e))&&Y.test(e)?e.replace(W,Zt):e},Dn.escapeRegExp=function(e){return(e=gs(e))&&_.test(e)?e.replace(Z,"\\$&"):e},Dn.every=function(t,n,r){var o=ja(t)?Tt:dr;return r&&wi(t,n,r)&&(n=e),o(t,ii(n,3))},Dn.find=ma,Dn.findIndex=Wi,Dn.findKey=function(e,t){return Ot(e,ii(t,3),gr)},Dn.findLast=wa,Dn.findLastIndex=ji,Dn.findLastKey=function(e,t){return Ot(e,ii(t,3),yr)},Dn.floor=vc,Dn.forEach=ga,Dn.forEachRight=ya,Dn.forIn=function(e,t){return null==e?e:mr(e,ii(t,3),Ms)},Dn.forInRight=function(e,t){return null==e?e:wr(e,ii(t,3),Ms)},Dn.forOwn=function(e,t){return e&&gr(e,ii(t,3))},Dn.forOwnRight=function(e,t){return e&&yr(e,ii(t,3))},Dn.get=xs,Dn.gt=Ha,Dn.gte=Va,Dn.has=function(e,t){return null!=e&&fi(e,t,Er)},Dn.hasIn=Cs,Dn.head=zi,Dn.identity=nc,Dn.includes=function(e,t,n,r){e=za(e)?e:qs(e),n=n&&!r?hs(n):0;var o=e.length;return n<0&&(n=mn(o+n,0)),as(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ut(e,t,n)>-1},Dn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=mn(r+o,0)),Ut(e,t,o)},Dn.inRange=function(t,n,r){return n=fs(n),r===e?(r=n,n=0):r=fs(r),function(e,t,n){return e>=wn(t,n)&&e<mn(t,n)}(t=ms(t),n,r)},Dn.invoke=Ns,Dn.isArguments=Wa,Dn.isArray=ja,Dn.isArrayBuffer=Ya,Dn.isArrayLike=za,Dn.isArrayLikeObject=Ga,Dn.isBoolean=function(e){return!0===e||!1===e||es(e)&&kr(e)==h},Dn.isBuffer=Ja,Dn.isDate=Xa,Dn.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},Dn.isEmpty=function(e){if(null==e)return!0;if(za(e)&&(ja(e)||"string"==typeof e||"function"==typeof e.splice||Ja(e)||cs(e)||Wa(e)))return!e.length;var t=di(e);if(t==y||t==T)return!e.size;if(vi(e))return!Or(e).length;for(var n in e)if(Oe.call(e,n))return!1;return!0},Dn.isEqual=function(e,t){return Nr(e,t)},Dn.isEqualWith=function(t,n,r){var o=(r="function"==typeof r?r:e)?r(t,n):e;return o===e?Nr(t,n,e,r):!!o},Dn.isError=Ka,Dn.isFinite=function(e){return"number"==typeof e&&fn(e)},Dn.isFunction=Qa,Dn.isInteger=Za,Dn.isLength=_a,Dn.isMap=ts,Dn.isMatch=function(e,t){return e===t||Br(e,t,si(t))},Dn.isMatchWith=function(t,n,r){return r="function"==typeof r?r:e,Br(t,n,si(n),r)},Dn.isNaN=function(e){return ns(e)&&e!=+e},Dn.isNative=function(e){if(bi(e))throw new Ae("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(e)},Dn.isNil=function(e){return null==e},Dn.isNull=function(e){return null===e},Dn.isNumber=ns,Dn.isObject=$a,Dn.isObjectLike=es,Dn.isPlainObject=rs,Dn.isRegExp=os,Dn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=s},Dn.isSet=is,Dn.isString=as,Dn.isSymbol=ss,Dn.isTypedArray=cs,Dn.isUndefined=function(t){return t===e},Dn.isWeakMap=function(e){return es(e)&&di(e)==C},Dn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==kr(e)},Dn.join=function(e,t){return null==e?"":hn.call(e,t)},Dn.kebabCase=js,Dn.last=Ki,Dn.lastIndexOf=function(t,n,r){var o=null==t?0:t.length;if(!o)return-1;var i=o;return r!==e&&(i=(i=hs(r))<0?mn(o+i,0):wn(i,o-1)),n==n?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(t,n,i):Rt(t,Dt,i,!0)},Dn.lowerCase=Ys,Dn.lowerFirst=zs,Dn.lt=us,Dn.lte=ls,Dn.max=function(t){return t&&t.length?fr(t,nc,Tr):e},Dn.maxBy=function(t,n){return t&&t.length?fr(t,ii(n,2),Tr):e},Dn.mean=function(e){return Ft(e,nc)},Dn.meanBy=function(e,t){return Ft(e,ii(t,2))},Dn.min=function(t){return t&&t.length?fr(t,nc,Rr):e},Dn.minBy=function(t,n){return t&&t.length?fr(t,ii(n,2),Rr):e},Dn.stubArray=pc,Dn.stubFalse=mc,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=Ac,Dn.nth=function(t,n){return t&&t.length?qr(t,hs(n)):e},Dn.noConflict=function(){return st.Se===this&&(st.Se=Fe),this},Dn.noop=sc,Dn.now=xa,Dn.pad=function(e,t,n){e=gs(e);var r=(t=hs(t))?on(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Vo(Ht(o),n)+e+Vo(Pt(o),n)},Dn.padEnd=function(e,t,n){e=gs(e);var r=(t=hs(t))?on(e):0;return t&&r<t?e+Vo(t-r,n):e},Dn.padStart=function(e,t,n){e=gs(e);var r=(t=hs(t))?on(e):0;return t&&r<t?Vo(t-r,n)+e:e},Dn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),yn(gs(e).replace($,""),t||0)},Dn.random=function(t,n,r){if(r&&"boolean"!=typeof r&&wi(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=fs(t),n===e?(n=t,t=0):n=fs(n)),t>n){var o=t;t=n,n=o}if(r||t%1||n%1){var i=bn();return wn(t+i*(n-t+rt("1e-"+((i+"").length-1))),n)}return Yr(t,n)},Dn.reduce=function(e,t,n){var r=ja(e)?Nt:Vt,o=arguments.length<3;return r(e,ii(t,4),n,o,ur)},Dn.reduceRight=function(e,t,n){var r=ja(e)?Bt:Vt,o=arguments.length<3;return r(e,ii(t,4),n,o,lr)},Dn.repeat=function(t,n,r){return n=(r?wi(t,n,r):n===e)?1:hs(n),zr(gs(t),n)},Dn.replace=function(){var e=arguments,t=gs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dn.result=function(t,n,r){var o=-1,i=(n=wo(n,t)).length;for(i||(i=1,t=e);++o<i;){var a=null==t?e:t[Li(n[o])];a===e&&(o=i,a=r),t=Qa(a)?a.call(t):a}return t},Dn.round=kc,Dn.runInContext=ee,Dn.sample=function(e){return(ja(e)?Xn:Jr)(e)},Dn.size=function(e){if(null==e)return 0;if(za(e))return as(e)?on(e):e.length;var t=di(e);return t==y||t==T?e.size:Or(e).length},Dn.snakeCase=Gs,Dn.some=function(t,n,r){var o=ja(t)?Mt:eo;return r&&wi(t,n,r)&&(n=e),o(t,ii(n,3))},Dn.sortedIndex=function(e,t){return to(e,t)},Dn.sortedIndexBy=function(e,t,n){return no(e,t,ii(n,2))},Dn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=to(e,t);if(r<n&&qa(e[r],t))return r}return-1},Dn.sortedLastIndex=function(e,t){return to(e,t,!0)},Dn.sortedLastIndexBy=function(e,t,n){return no(e,t,ii(n,2),!0)},Dn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=to(e,t,!0)-1;if(qa(e[n],t))return n}return-1},Dn.startCase=Js,Dn.startsWith=function(e,t,n){return e=gs(e),n=null==n?0:or(hs(n),0,e.length),t=io(t),e.slice(n,n+t.length)==t},Dn.subtract=Tc,Dn.sum=function(e){return e&&e.length?Wt(e,nc):0},Dn.sumBy=function(e,t){return e&&e.length?Wt(e,ii(t,2)):0},Dn.template=function(t,n,r){var o=Dn.templateSettings;r&&wi(t,n,r)&&(n=e),t=gs(t),n=vs({},n,o,Ko);var i,a,s=vs({},n.imports,o.imports,Ko),c=Bs(s),u=Gt(s,c),l=0,d=n.interpolate||me,f="__p += '",h=xe((n.escape||me).source+"|"+d.source+"|"+(d===J?se:me).source+"|"+(n.evaluate||me).source+"|$","g"),p="//# sourceURL="+(Oe.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++$e+"]")+"\n";t.replace(h,function(e,n,r,o,s,c){return r||(r=o),f+=t.slice(l,c).replace(we,_t),n&&(i=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e}),f+="';\n";var m=Oe.call(n,"variable")&&n.variable;if(m){if(ie.test(m))throw new Ae("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(F,""):f).replace(q,"$1").replace(H,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var w=Zs(function(){return ke(c,p+"return "+f).apply(e,u)});if(w.source=f,Ka(w))throw w;return w},Dn.times=function(e,t){if((e=hs(e))<1||e>s)return[];var n=u,r=wn(e,u);t=ii(t),e-=u;for(var o=jt(r,t);++n<e;)t(n);return o},Dn.toFinite=fs,Dn.toInteger=hs,Dn.toLength=ps,Dn.toLower=function(e){return gs(e).toLowerCase()},Dn.toNumber=ms,Dn.toSafeInteger=function(e){return e?or(hs(e),-9007199254740991,s):0===e?e:0},Dn.toString=gs,Dn.toUpper=function(e){return gs(e).toUpperCase()},Dn.trim=function(t,n,r){if((t=gs(t))&&(r||n===e))return Yt(t);if(!t||!(n=io(n)))return t;var o=an(t),i=an(n);return yo(o,Xt(o,i),Kt(o,i)+1).join("")},Dn.trimEnd=function(t,n,r){if((t=gs(t))&&(r||n===e))return t.slice(0,sn(t)+1);if(!t||!(n=io(n)))return t;var o=an(t);return yo(o,0,Kt(o,an(n))+1).join("")},Dn.trimStart=function(t,n,r){if((t=gs(t))&&(r||n===e))return t.replace($,"");if(!t||!(n=io(n)))return t;var o=an(t);return yo(o,Xt(o,an(n))).join("")},Dn.truncate=function(t,n){var r=30,o="...";if($a(n)){var i="separator"in n?n.separator:i;r="length"in n?hs(n.length):r,o="omission"in n?io(n.omission):o}var a=(t=gs(t)).length;if($t(t)){var s=an(t);a=s.length}if(r>=a)return t;var c=r-on(o);if(c<1)return o;var u=s?yo(s,0,c).join(""):t.slice(0,c);if(i===e)return u+o;if(s&&(c+=u.length-c),os(i)){if(t.slice(c).search(i)){var l,d=u;for(i.global||(i=xe(i.source,gs(ce.exec(i))+"g")),i.lastIndex=0;l=i.exec(d);)var f=l.index;u=u.slice(0,f===e?c:f)}}else if(t.indexOf(io(i),c)!=c){var h=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}return u+o},Dn.unescape=function(e){return(e=gs(e))&&j.test(e)?e.replace(V,cn):e},Dn.uniqueId=function(e){var t=++Re;return gs(e)+t},Dn.upperCase=Xs,Dn.upperFirst=Ks,Dn.each=ga,Dn.eachRight=ya,Dn.first=zi,ac(Dn,(wc={},gr(Dn,function(e,t){Oe.call(Dn.prototype,t)||(wc[t]=e)}),wc),{chain:!1}),Dn.VERSION="4.17.23",At(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Dn[e].placeholder=Dn}),At(["drop","take"],function(t,n){Vn.prototype[t]=function(r){r=r===e?1:mn(hs(r),0);var o=this.Ue&&!n?new Vn(this):this.clone();return o.Ue?o.De=wn(r,o.De):o.Fe.push({size:wn(r,u),type:t+(o.Re<0?"Right":"")}),o},Vn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),At(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.Le.push({iteratee:ii(e,3),type:n}),t.Ue=t.Ue||r,t}}),At(["head","last"],function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}}),At(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.Ue?new Vn(this):this[n](1)}}),Vn.prototype.compact=function(){return this.filter(nc)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=Gr(function(e,t){return"function"==typeof e?new Vn(this):this.map(function(n){return Ir(n,e,t)})}),Vn.prototype.reject=function(e){return this.filter(Ra(ii(e)))},Vn.prototype.slice=function(t,n){t=hs(t);var r=this;return r.Ue&&(t>0||n<0)?new Vn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=hs(n))<0?r.dropRight(-n):r.take(n-t)),r)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(u)},gr(Vn.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),i=Dn[o?"take"+("last"==n?"Right":""):n],a=o||/^find/.test(n);i&&(Dn.prototype[n]=function(){var n=this.Ne,s=o?[1]:arguments,c=n instanceof Vn,u=s[0],l=c||ja(n),d=function(e){var t=i.apply(Dn,St([e],s));return o&&f?t[0]:t};l&&r&&"function"==typeof u&&1!=u.length&&(c=l=!1);var f=this.Me,h=!!this.Be.length,p=a&&!f,m=c&&!h;if(!a&&l){n=m?n:new Vn(this);var w=t.apply(n,s);return w.Be.push({func:fa,args:[d],thisArg:e}),new Hn(w,f)}return p&&m?t.apply(this,s):(w=this.thru(d),p?o?w.value()[0]:w.value():w)})}),At(["pop","push","shift","sort","splice","unshift"],function(e){var t=Se[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Dn.prototype[e]=function(){var e=arguments;if(r&&!this.Me){var o=this.value();return t.apply(ja(o)?o:[],e)}return this[n](function(n){return t.apply(ja(n)?n:[],e)})}}),gr(Vn.prototype,function(e,t){var n=Dn[t];if(n){var r=n.name+"";Oe.call(Sn,r)||(Sn[r]=[]),Sn[r].push({name:t,func:n})}}),Sn[Do(e,2).name]=[{name:"wrapper",func:e}],Vn.prototype.clone=function(){var e=new Vn(this.Ne);return e.Be=Co(this.Be),e.Re=this.Re,e.Ue=this.Ue,e.Le=Co(this.Le),e.De=this.De,e.Fe=Co(this.Fe),e},Vn.prototype.reverse=function(){if(this.Ue){var e=new Vn(this);e.Re=-1,e.Ue=!0}else(e=this.clone()).Re*=-1;return e},Vn.prototype.value=function(){var e=this.Ne.value(),t=this.Re,n=ja(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=wn(t,e+a);break;case"takeRight":e=mn(e,t-a)}}return{start:e,end:t}}(0,o,this.Fe),a=i.start,s=i.end,c=s-a,u=r?s:a-1,l=this.Le,d=l.length,f=0,h=wn(c,this.De);if(!n||!r&&o==c&&h==c)return lo(e,this.Be);var p=[];e:for(;c--&&f<h;){for(var m=-1,w=e[u+=t];++m<d;){var g=l[m],y=g.iteratee,b=g.type,v=y(w);if(2==b)w=v;else if(!v){if(1==b)continue e;break e}}p[f++]=w}return p},Dn.prototype.at=ha,Dn.prototype.chain=function(){return da(this)},Dn.prototype.commit=function(){return new Hn(this.value(),this.Me)},Dn.prototype.next=function(){this.Oe===e&&(this.Oe=ds(this.value()));var t=this.Pe>=this.Oe.length;return{done:t,value:t?e:this.Oe[this.Pe++]}},Dn.prototype.plant=function(t){for(var n,r=this;r instanceof qn;){var o=Fi(r);o.Pe=0,o.Oe=e,n?i.Ne=o:n=o;var i=o;r=r.Ne}return i.Ne=t,n},Dn.prototype.reverse=function(){var t=this.Ne;if(t instanceof Vn){var n=t;return this.Be.length&&(n=new Vn(this)),(n=n.reverse()).Be.push({func:fa,args:[$i],thisArg:e}),new Hn(n,this.Me)}return this.thru($i)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return lo(this.Ne,this.Be)},Dn.prototype.first=Dn.prototype.head,it&&(Dn.prototype[it]=function(){return this}),Dn}();ut?((ut.exports=un).Se=un,ct.Se=un):st.Se=un}.call(ep.exports)),ep.exports);const np=Af()?.webAppUrl||"https://nft.keyring.app";function rp(e){const t=e.poolDayData?.[0];return!!t&&0!==parseFloat(t.volumeToken0||"0")&&0!==parseFloat(t.volumeToken1||"0")&&0!==parseFloat(t.volumeUSD||"0")}const op={ethereum:"https://gateway.thegraph.com/api/subgraphs/id/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV",arbitrum:"https://gateway.thegraph.com/api/subgraphs/id/FbCGRftH4a3yZugY7TnbYgPJVEv2LvMT6oF1fxPe9aJM",polygon:"https://gateway.thegraph.com/api/subgraphs/id/3hCPRGf4z88VC5rsBKU5AA9FBBq5nF3jbKJG7VZCbhjm",bsc:"https://gateway.thegraph.com/api/subgraphs/id/GcKPSgHoY42xNYVAkSPDhXSzi6aJDRQSKqBSXezL47gV",base:"https://gateway.thegraph.com/api/subgraphs/id/HMuAwufqZ1YCRmzL2SfHTVkzZovC9VL2UAKhjvRqKiR1",optimism:"https://gateway.thegraph.com/api/subgraphs/id/Cghf4LfVqPiFw6fp6Y5X5Ubc8UpmUhSfJL82zwiBFLaj",avalanche:"https://gateway.thegraph.com/api/subgraphs/id/GVH9h9KZ9CqheUEL93qMbq7QwgoBu32QXQDPR6bev4Eo"},ip={eth:"ethereum",ethereum:"ethereum",mainnet:"ethereum",1:"ethereum",arb:"arbitrum",arbitrum:"arbitrum",42161:"arbitrum",polygon:"polygon",matic:"polygon",137:"polygon",bsc:"bsc",bnb:"bsc",56:"bsc",base:"base",8453:"base",optimism:"optimism",10:"optimism",avax:"avalanche",avalanche:"avalanche",43114:"avalanche"},ap={ethereum:1,arbitrum:42161,polygon:137,bsc:56,base:8453,optimism:10,avalanche:43114},sp={100:.01,500:.05,3e3:.3,1e4:1};function cp(e){return e&&ip[e.toLowerCase()]||"ethereum"}function up(e){const t=e.toLowerCase();return t in ip||t in op}async function lp(e,t,n={},r){const o=function(e){const t=cp(e);return op[t]||null}(e);if(!o)throw new Error(`No subgraph available for chain: ${e}`);const i=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer 4c67ac7a75b21befbd28dc9120c709f1"},body:JSON.stringify({query:t,variables:n}),signal:r});if(!i.ok)throw new Error(`Subgraph query failed: HTTP ${i.status}`);const a=await i.json();if(a.errors)throw new Error(`Subgraph error: ${a.errors[0]?.message||"Unknown"}`);return a.data}function dp(e){return!isFinite(e)||isNaN(e)||e>1e11?0:e}function fp(e,t){const n=Number(e.feeTier||0),r=sp[n]??n/1e4,o=dp(parseFloat(e.totalValueLockedUSD||"0")),i=e.poolDayData?.[0],a=parseFloat(i?.volumeUSD||"0"),s=parseFloat(i?.feesUSD||"0");let c=null;return o>0&&s>0&&(c=parseFloat((365*s*100/o).toFixed(2))),{pair:`${e.token0.symbol}/${e.token1.symbol}`,poolAddress:e.id,token0:{symbol:e.token0.symbol,address:e.token0.id},token1:{symbol:e.token1.symbol,address:e.token1.id},tvl:o,volumePastDay:a,apr:c,fee:r,liquidity:e.liquidity||"0",chain:cp(t)}}let hp=null,pp=0;const mp={ethereum:"ethereum","arbitrum one":"arbitrum",arbitrum:"arbitrum",polygon:"polygon",bsc:"bsc",base:"base",optimism:"optimism","avalanche c-chain":"avalanche",avalanche:"avalanche"};async function wp(){const e=Date.now();if(hp&&e-pp<3e5)return hp;try{const t=await fetch("https://yields.llama.fi/pools");if(!t.ok)throw new Error(`DefiLlama HTTP ${t.status}`);const n=((await t.json()).data||[]).filter(e=>"uniswap-v3"===e.project);return hp=n,pp=e,n}catch(t){return hp??[]}}function gp(e){if(!e)return null;const t=e.match(/^([\d.]+)%/);return t?Math.round(1e4*parseFloat(t[1])):null}function yp(e,t){return t.length?e.map(e=>{const n=e.chain.toLowerCase(),r=Math.round(1e4*e.fee),o=e.token0.address.toLowerCase(),i=e.token1.address.toLowerCase(),a=t.filter(e=>mp[e.chain.toLowerCase()]===n);let s=a.find(e=>{if(!e.underlyingTokens||e.underlyingTokens.length<2)return!1;const t=e.underlyingTokens.map(e=>e.toLowerCase());if(!t.includes(o)||!t.includes(i))return!1;const n=gp(e.poolMeta);return null===n||n===r});if(!s){const t=[e.token0.symbol.toUpperCase(),e.token1.symbol.toUpperCase()].sort().join("-");s=a.find(e=>{if([...e.symbol.split("-").map(e=>e.toUpperCase())].sort().join("-")!==t)return!1;const n=gp(e.poolMeta);return null===n||n===r})}if(s){const t=s.apyBase??s.apyBase??s.apy??null,n=s.tvlUsd??null,r=s.volumeUsd1d??null;return{...e,...null!==t&&{apr:parseFloat(t.toFixed(2))},...null!==n&&{tvl:dp(n)},...null!==r&&{volumePastDay:dp(r)}}}return e}):e}async function bp(e){const{tokens:t,chain:n,sortBy:r,filters:o,signal:i}=e,a=cp(n),s=t.map(e=>{const t=e.toUpperCase(),n=/* @__PURE__ */new Set([t]);return t.startsWith("W")||n.add("W"+t),t.startsWith("W")&&t.length>1&&n.add(t.slice(1)),[...n]}),c=['totalValueLockedUSD_gt: "10000"','liquidity_gt: "0", volumeUSD_gt: "0"'];o?.feeTier&&c.push(`feeTier: "${o.feeTier}"`);let u="totalValueLockedUSD";"volume"===r?u="volumeUSD":"fee"===r?u="feeTier":"liquidity"===r&&(u="liquidity");const l="fee"===r?"asc":"desc",d=e=>1===e.length?`symbol: "${e[0]}"`:`symbol_in: [${e.map(e=>`"${e}"`).join(", ")}]`,f=(e,t)=>`{\n pools(\n first: ${t}\n orderBy: ${u}\n orderDirection: ${l}\n where: { ${[...c,...e].join(", ")} }\n ) {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }`;let h;if(s.length>0){const e=100;let t,n;s.length>=2?(t=f([`token0_: { ${d(s[0])} }`,`token1_: { ${d(s[1])} }`],e),n=f([`token0_: { ${d(s[1])} }`,`token1_: { ${d(s[0])} }`],e)):(t=f([`token0_: { ${d(s[0])} }`],e),n=f([`token1_: { ${d(s[0])} }`],e));const[r,o]=await Promise.allSettled([lp(a,t,{},i),lp(a,n,{},i)]),c="fulfilled"===r.status?(r.value?.pools||[]).filter(rp).map(e=>fp(e,a)):[],u="fulfilled"===o.status?(o.value?.pools||[]).filter(rp).map(e=>fp(e,a)):[],l=new Set(c.map(e=>e.poolAddress));h=[...c,...u.filter(e=>!l.has(e.poolAddress))]}else{const e=await lp(a,f([],100),{},i);h=(e?.pools||[]).filter(rp).map(e=>fp(e,a))}const p=await wp();return p.length>0&&(h=yp(h,p)),o?.minTVL&&(h=h.filter(e=>e.tvl>=o.minTVL)),o?.maxTVL&&(h=h.filter(e=>e.tvl<=o.maxTVL)),o?.minAPR&&(h=h.filter(e=>null!==e.apr&&e.apr>=o.minAPR)),o?.maxAPR&&(h=h.filter(e=>null!==e.apr&&e.apr<=o.maxAPR)),"apr"===r?h.sort((e,t)=>(t.apr??0)-(e.apr??0)):"liquidity"===r&&h.sort((e,t)=>{const n=BigInt(t.liquidity||"0")-BigInt(e.liquidity||"0");return n>0n?1:n<0n?-1:0}),h}async function vp(e){const{poolId:t,chain:n,signal:r}=e,o=cp(n),i=`{\n position(id: "${t}") {\n pool {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }\n }`,a=await lp(o,i,{},r);return a?.position?.pool?fp(a.position.pool,o):null}async function Ap(e){const{chain:t,signal:n}=e,r=cp(t),o=await lp(r,'{\n pools(\n first: 100\n orderBy: volumeUSD\n orderDirection: desc\n where: { totalValueLockedUSD_gt: "10000", liquidity_gt: "0", volumeUSD_gt: "0" }\n ) {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }',{},n);return(o?.pools||[]).filter(rp).map(e=>fp(e,r))}const kp=new gh(np),Tp=[{alias:"op",token:"OP",chain:"optimism"},{alias:"arb",token:"ARB",chain:"arbitrum"},{alias:"eth",token:"ETH",chain:"ethereum"},{alias:"bnb",token:"BNB",chain:"bsc"},{alias:"matic",token:"MATIC",chain:"polygon"}];function Ep(e){return e instanceof Error&&("AbortError"===e.name||e.message.toLowerCase().includes("aborted")||e.message.toLowerCase().includes("canceled"))}function xp(e,t){return new Promise((n,r)=>{if(t?.aborted)return void r(new Error("Aborted"));const o=setTimeout(()=>{t?.removeEventListener("abort",i),n()},e),i=()=>{clearTimeout(o),t?.removeEventListener("abort",i),r(new Error("Aborted"))};t?.addEventListener("abort",i,{once:!0})})}function Cp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ip(e,t,n){const r=Cp(t),o=Cp(n);return new RegExp(`\\b(?:on|in|at|from|to|across|via|using|tr[eê]n|tai|tại)\\s+${r}\\b`,"i").test(e)||new RegExp(`\\b(?:on|in|at|from|to|across|via|using|tr[eê]n|tai|tại)\\s+${o}\\b`,"i").test(e)||new RegExp(`\\b${r}\\s+(?:chain|network)\\b`,"i").test(e)||new RegExp(`\\b${o}\\s+(?:chain|network)\\b`,"i").test(e)}const Sp=Af()?.linkAddLiquidity,Np=`You are a knowledgeable DeFi assistant helping users find the best liquidity pools.\n\nYou will receive structured pool data and must answer the user's question in a helpful, natural, conversational tone — like an expert friend explaining DeFi, not a robot listing data.\n\nGuidelines:\n- Respond in the exact language of LANGUAGE.\n- **FOLLOW-UP / CONTINUATION**: If the user's question is a short follow-up (e.g., "yes", "ok", "sure", "tell me more", "details", "go ahead"), look at the CONVERSATION HISTORY to understand what they are responding to. Provide a relevant, detailed follow-up answer based on the last assistant message. NEVER say "too vague" or ask for clarification when history clearly shows the context.\n- Use ONLY the provided pool data. Never invent or estimate numbers.\n- Intelligently select and highlight the most relevant pools for the user's question. You don't need to list all pools — pick the ones that best answer what they asked.\n- When recommending pools, briefly explain WHY they stand out (e.g. high APR, deep liquidity, low fee, well-known pair).\n- Include key metrics naturally in your answer: TVL, volume past day, APR, fee tier.\n- Use the provided uniswapUrl for each pool you mention. Do NOT construct URLs yourself.\n- If position data is available, include the provided uniswapPositionUrl for each position.\n- If UNSUPPORTED_CHAINS is present (not "none"), respond ONLY with a notice informing the user that those chain(s) are not currently supported for pool data queries (translate this notice naturally into LANGUAGE). Then list the SUPPORTED_CHAINS so the user knows which chains they can query. Do NOT add any other information, pool data, or suggestions after this notice.\n- If POOLS_FOUND is 0 and POSITIONS_FOUND is 0 and COINPOOL_PAIRS_FOUND is 0 and UNSUPPORTED_CHAINS is "none", start your response with the UNISWAP_V3_NOTICE (provided below, already translated to LANGUAGE), then continue with your helpful response.\n- If POOLS_FOUND is 0 but COINPOOL_PAIRS_FOUND > 0, do NOT show the UNISWAP_V3_NOTICE. Instead, answer naturally using the CoinPool data available.\n- When POOLS_FOUND > 0 (i.e. pool data from Subgraph is shown), prepend the phrase "According to the latest data from Subgraph Uniswap V3 " (translated naturally into LANGUAGE) at the very beginning of your response, before any other content. Keep the word "Subgraph" as-is (do not translate it).\n- If no suitable data is available, acknowledge it naturally and suggest how to refine the search.\n- Keep the response focused and easy to read. Use markdown (bold, bullet points) to structure when helpful, but keep the tone warm and human.\n${Sp&&`- If the user mentions adding liquidity / adding a pool / adding a position (including phrases like "add liquidity", "add pool", "add position", "create pool", "create pair", "thêm thanh khoản", "thêm pool", "thêm position"), keep your normal answer content and append this exact link at the end of the response: ${Sp}`}\n- Never output raw JSON or data dumps.\n\n## CoinPool Data Rules (COINPOOL_PAIRS section)\nCOINPOOL_PAIRS contains liquidity positions from the CoinPool platform, each with a SPECIFIC price range.\n\n**CRITICAL: CoinPool APR is NOT the overall pool APR.** It is the APR earned ONLY within that specific price range. You MUST always show the price range together with the APR. Never present CoinPool APR as if it were the general pool APR — this would mislead users.\n\n### When to use POOL_DATA vs COINPOOL_PAIRS:\n- **POOL_DATA** (from Uniswap subgraph): Use for general pool info — TVL, volume past day, overall pool APR, fee tier. This is the default data source.\n- **COINPOOL_PAIRS**: Use ONLY when the user specifically asks about price ranges, concentrated liquidity strategies, or which price range to choose. Each entry represents a specific price range with its own APR.\n\n### Display rules:\n1. **User asks general pool info** (e.g. "show ETH/USDC pools") → Show POOL_DATA. Mention CoinPool ranges only briefly as additional info if available.\n2. **User asks about price ranges / which range to pick** (e.g. "what price range should I use?", "gợi ý khoảng giá", "best range for ETH/USDC") → Show CoinPool ranges sorted by APR. Clearly label: "APR for this price range: X%" with the min–max prices.\n3. **User provides a specific price range** → Check if any CoinPool entry covers that range. If yes, show its APR. If no, suggest the range with the highest APR from CoinPool data.\n4. **Always format CoinPool APR as**: "APR **X%** (for range: minPrice – maxPrice baseToken/quoteToken)" — never show APR alone without its range.\n5. **Best range suggestion**: When suggesting, pick the entry with the highest APR and explain why (higher concentration = higher returns but narrower range = higher risk of going out of range).`;function Bp(e){return 0===e?"$0":e>=1e9?`$${(e/1e9).toFixed(2)}B`:e>=1e6?`$${(e/1e6).toFixed(2)}M`:e>=1e3?`$${(e/1e3).toFixed(2)}K`:`$${e.toFixed(2)}`}const Mp={ethereum:"ethereum",arbitrum:"arbitrum",polygon:"polygon",bsc:"bnb",base:"base",optimism:"optimism",avalanche:"avalanche"};async function Pp(e,t,n){const r=Op(t);try{const a=e.data.pools.length,s=e.data.positions?.length??0,c=e.data.coinpoolPairs?.length??0;let u="";if(e.chatHistory&&e.chatHistory.length>0){u="\n\nCONVERSATION HISTORY (last messages for context):\n";for(const t of e.chatHistory){u+=`${"user"===t.role?"User":"Assistant"}: ${t.content}\n`}u+="---"}const l=`${Np}${u}\n\nLANGUAGE: ${t||"en"}\nINTENT: ${e.parsed.intent}\nQUESTION: ${e.question}\nPOOLS_FOUND: ${a}\nPOSITIONS_FOUND: ${s}\nCOINPOOL_PAIRS_FOUND: ${c}\nUNSUPPORTED_CHAINS: ${e.parsed.unsupportedChains&&e.parsed.unsupportedChains.length>0?e.parsed.unsupportedChains.join(", "):"none"}\nSUPPORTED_CHAINS: ${Object.keys(op).join(", ")}\nUNISWAP_V3_NOTICE: ${r.uniswapV3Only}\n\nPARSED_QUERY:\n${JSON.stringify({...e.parsed,limit:void 0},null,2)}\n\nPOOL_DATA:\n${o=[...e.data.pools].sort((e,t)=>(t.apr??0)-(e.apr??0)||t.tvl-e.tvl).slice(0,100),JSON.stringify(o.map(e=>{return{...e,tvl:Bp(e.tvl),volumePastDay:Bp(e.volumePastDay),apr:null!==e.apr?`${e.apr}%`:null,liquidity:e.liquidity,uniswapUrl:(t=e,`https://app.uniswap.org/explore/pools/${Mp[t.chain]||t.chain}/${t.poolAddress}`)};var t}),null,2)}\n${e.data.positions&&e.data.positions.length>0?`\n\nUSER_POSITIONS:\n${JSON.stringify(e.data.positions.slice(0,100).map(e=>{return{...e,uniswapPositionUrl:(t=e,`https://app.uniswap.org/positions/v3/${Mp[t.chain]||t.chain}/${t.positionId}`)};var t}),null,2)}`:""}\n${e.data.coinpoolPairs&&e.data.coinpoolPairs.length>0?(()=>{const t=[...e.data.coinpoolPairs].sort((e,t)=>(t.apr??-1/0)-(e.apr??-1/0));return`\n\nCOINPOOL_PAIRS (price-range-specific data from CoinPool — APR here is per-range, NOT overall pool APR):\nBest range APR: ${null!==t[0]?.apr?t[0].apr.toFixed(2)+"%":"N/A"}\n${n=e.data.coinpoolPairs,[...n].sort((e,t)=>(t.apr??-1/0)-(e.apr??-1/0)).map((e,t)=>`#${t+1} ${e.pair} | pool: ${e.poolId} | fee: ${e.fee} | Range APR : ${null!==e.aprAvg?e.aprAvg.toFixed(2)+"%":"N/A"} | token prices: ${Bp(e.token0Price)} / ${Bp(e.token1Price)} | price range (${e.priceRange.baseToken}/${e.priceRange.quoteToken}): ${e.priceRange.minPrice} – ${e.priceRange.maxPrice} (current: ${e.priceRange.currentPrice})`).join("\n")}`;var n})():""}\n\nGenerate the final response for the end user now.`,d=5,f=1e3;let h=null,p=null;for(let e=1;e<=d;e++)try{h=await kp.post("api/moralis-cortex/proxy/chat",{prompt:l,model:"gpt-4.1-mini",stream:!1},{headers:{Accept:"application/json","Content-Type":"application/json"},signal:n}),p=null;break}catch(i){if(p=i,Ep(i))throw i;e<d&&await xp(f,n)}if(p)throw p;const m=h?.data?.text?.trim();if(m)return m}catch(i){}var o;return function(e,t){const n=e.data?.pools||[],r=e.data?.positions||[],o=e.data?.coinpoolPairs||[],i=Op(t);return 0===n.length&&0===r.length&&0===o.length?e.parsed.unsupportedChains&&e.parsed.unsupportedChains.length>0?i.unsupportedChain:`${i.uniswapV3Only} No pool data found for this query.`:["I cannot generate the final AI response right now. Here is the raw pool data:","```json",JSON.stringify({intent:e.parsed.intent,tokens:e.parsed.tokens,chains:e.parsed.chains,pools:n},null,2),"```"].join("\n")}(e,t)}function Op(e){const t=e||"en";return{unsupportedChain:h("poolUnsupportedChain",t),uniswapV3Only:h("poolUniswapV3Only",t)}}async function Rp(e){const{question:t,language:n,currentChain:r,walletAddress:o,chatHistory:i,signal:a}=e,s=await async function(e,t,n){try{let o="";if(n&&n.length>0){o="\n\n## CONVERSATION HISTORY:\n";for(const e of n)o+=`${"user"===e.role?"User":"Assistant"}: ${e.content}\n`;o+="---\n"}const i=`You are a DeFi Pool Query Parser. You understand ALL languages.\n\nConvert the user question into a structured JSON object. Return ONLY valid JSON — no explanation, no markdown.\n\n## OUTPUT FORMAT\n{\n "intent": string,\n "tokens": string[],\n "chains": string[],\n "poolAddress": string | null,\n "poolId": string | null,\n "walletAddress": string | null,\n "toAddress": string | null,\n "filters": {\n "minTVL": number | null,\n "maxTVL": number | null,\n "minAPR": number | null,\n "maxAPR": number | null,\n "feeTier": number | null\n },\n "sortBy": string | null,\n "limit": number | null\n}\n\n## INTENT TYPES\n- "search_pool" — find/list/show pools, optionally filtered by token(s) or chain\n- "best_pool" — best pool by TVL, volume, etc.\n- "compare_pool" — compare multiple pools or fee tiers\n- "pool_detail" — specific pool by address, pool id, or exact token pair\n- "trending_pool" — hot/trending/most active pools\n- "new_pool" — recently created pools\n- "high_apr_pool" — highest APR/yield pools\n- "low_fee_pool" — lowest fee pools\n- "safe_pool" — high TVL/low risk/stable pools\n- "general_pool_info" — educational questions (what is a pool, how pools work)\n- "user_positions" — user's own LP positions ("my pools", "my positions", "my liquidity")\n- "position_detail" — specific position by numeric id ("position 962961", "position id 12345", "tell me about position 962961")\n- "send_position" — user wants to send/transfer their LP position NFT to another address ("send position 12345 to 0x...", "transfer my position", "gửi position", "chuyển LP position")\n- "unknown" — truly unrelated to pools\n\n## TOKEN EXTRACTION\n- Extract token symbols mentioned: ETH, USDC, BTC, LINK, ARB, OP, etc.\n- Normalize wrapped variants: WETH→ETH, WBTC→BTC\n- "stablecoin pool" → tokens: ["USDC", "USDT"]\n- No tokens mentioned → tokens: []\n- One token mentioned → tokens: ["TOKEN"] (single-token search is valid)\n- Two tokens mentioned → tokens: ["TOKEN_A", "TOKEN_B"]\n\n## CHAIN vs TOKEN DISAMBIGUATION (CRITICAL)\nSome short names can be EITHER a chain name OR a token symbol.\nAmbiguous aliases: OP, ARB, ETH, BNB, MATIC\n\n**Rule: Use chain only with EXPLICIT chain context.**\nExplicit chain context = prepositions like "on", "in", "from", "across", "trên", "tại" + alias, OR alias + "chain"/"network".\n\nExamples:\n- "show me pool OP" → tokens: ["OP"], chains: [] (OP = token)\n- "show me pools on OP" → tokens: [], chains: ["optimism"] (on OP = chain)\n- "find ETH pools" → tokens: ["ETH"], chains: [] (ETH = token)\n- "find pools on ETH" → tokens: [], chains: ["ethereum"] (on ETH = chain)\n- "OP/USDC pool on ARB" → tokens: ["OP", "USDC"], chains: ["arbitrum"] (OP = token, on ARB = chain)\n- "show me pools on OP and ARB" → tokens: [], chains: ["optimism", "arbitrum"]\n- "ETH/USDC trên Arbitrum" → tokens: ["ETH", "USDC"], chains: ["arbitrum"]\n\nChain canonical names: ethereum, arbitrum, polygon, bsc, base, optimism, avalanche\n\n**UNSUPPORTED CHAIN HANDLING**: If the user mentions a chain NOT in the list above (e.g. solana, fantom, cronos, sui, tron, near, etc.), you MUST still include it in the "chains" array exactly as mentioned. Do NOT silently ignore unsupported chains. The system will detect and notify the user.\n\n## SORT RULES\n- "best", "top", "largest", "highest TVL" → "tvl"\n- "most active", "highest volume" → "volume"\n- "highest yield", "best APR", "largest APR" → "apr"\n- "cheapest", "lowest fee" → "fee"\n- "highest liquidity", "most liquid", "deepest liquidity" → "liquidity"\n- Not specified → null\n\n## LIMIT\n- Default: 5 | "top 10" → 10 | "top 3" → 3 | Max: 20\n\n## ADDRESS / ID DETECTION\n- Hex address (0x...) with pool context → poolAddress, intent "pool_detail"\n- Numeric id ("pool id 962961", "position 12345", "position id 962961") → poolId as string, intent "position_detail"\n- "my pools"/"my positions"/"my liquidity" → intent "user_positions", walletAddress null\n- Hex address with position context → walletAddress, intent "user_positions"\n- "send/transfer position <id> to <0x...>" → poolId as string, toAddress as the recipient 0x address, intent "send_position"\n- "send position" / "transfer my position" without an id → poolId: null, toAddress: null, intent "send_position"\n\n## user_positions CHAIN RULES\n- No chain specified → chains: [] (system uses connected chain)\n- Chains specified → add all to chains array\n- "all chains" → chains: []\n\n## EXAMPLES\n"Show me ETH/USDC pools on Base" → {"intent":"search_pool","tokens":["ETH","USDC"],"chains":["base"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"Show me pool OP" → {"intent":"search_pool","tokens":["OP"],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"Show me pools on OP" → {"intent":"search_pool","tokens":[],"chains":["optimism"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"OP/USDC pool on ARB" → {"intent":"search_pool","tokens":["OP","USDC"],"chains":["arbitrum"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"What are trending pools?" → {"intent":"trending_pool","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":"volume","limit":5}\n"Best pool for ETH with high APR" → {"intent":"high_apr_pool","tokens":["ETH"],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":"apr","limit":5}\n"Pool la gi?" → {"intent":"general_pool_info","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"Show me pools" → {"intent":"search_pool","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":"tvl","limit":5}\n"Show my pools" → {"intent":"user_positions","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":20}\n"Pool của tôi trên Arbitrum" → {"intent":"user_positions","tokens":[],"chains":["arbitrum"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":20}\n"Show my liquidity on OP and ARB" → {"intent":"user_positions","tokens":[],"chains":["optimism","arbitrum"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":20}\n"Tell me about pool id 962961" → {"intent":"position_detail","tokens":[],"chains":[],"poolAddress":null,"poolId":"962961","walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"Position 12345 on Arbitrum" → {"intent":"position_detail","tokens":[],"chains":["arbitrum"],"poolAddress":null,"poolId":"12345","walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"find ETH pools" → {"intent":"search_pool","tokens":["ETH"],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":"tvl","limit":5}\n"Send position 962961 to 0xAbC123..." → {"intent":"send_position","tokens":[],"chains":[],"poolAddress":null,"poolId":"962961","walletAddress":null,"toAddress":"0xAbC123...","filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"Transfer my LP position to 0xdef..." → {"intent":"send_position","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"toAddress":"0xdef...","filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"Gửi position 12345" → {"intent":"send_position","tokens":[],"chains":[],"poolAddress":null,"poolId":"12345","walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"Send position" → {"intent":"send_position","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n\n## FOLLOW-UP / CONTINUATION DETECTION (CRITICAL)\nIf the user question is vague, short, or cannot stand alone (e.g., "yes", "show me ranges", "tell me more", "details", "go ahead", "the first one", "what about fees?", "show me ranges or get help adding liquidity"), you MUST:\n1. Look at the CONVERSATION HISTORY provided below the question.\n2. Extract tokens, chains, and intent from the previous messages (especially the last assistant message and the last user question that mentioned specific tokens/pools).\n3. Use that context to fill in tokens, chains, and intent — as if the user explicitly repeated their earlier query with the follow-up refinement.\n4. Example: If history shows user asked about "WBTC/ETH pools" and now says "show me ranges" → tokens: ["BTC", "ETH"], intent: appropriate intent for the follow-up.\n5. NEVER return tokens: [] for a follow-up when history clearly shows which tokens were discussed.\n\n## RULES\n- ALWAYS return valid JSON\n- NEVER hallucinate addresses\n- Detect intent from ANY language\n- When in doubt between intents, prefer "search_pool" over "unknown"${o}\n\n---\nUser question: "${e}"`;let a=null,s=null;for(let e=1;e<=5;e++)try{a=await kp.post("/api/gemini-cortex/proxy",{model:"gemini-2.5-flash-lite",data:{contents:[{parts:[{text:i}]}],generationConfig:{responseMimeType:"application/json"}}},{signal:t}),s=null;break}catch(r){if(s=r,Ep(r))throw r;e<5&&await xp(1e3,t)}if(!a)throw s instanceof Error?s:new Error("Pool parser API failed after retries");const c=a?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||a?.data?.candidates?.[0]?.content?.parts?.[0]?.text;if(!c)return null;let u=c.trim();u.startsWith("```json")?u=u.replace(/^```json\s*/,"").replace(/\s*```$/,""):u.startsWith("```")&&(u=u.replace(/^```\s*/,"").replace(/\s*```$/,""));const l=u.match(/\{[\s\S]*\}/);if(!l)return null;const d=function(e,t){const n=e.toLowerCase();if("user_positions"!==t.intent)for(const{alias:o,token:i,chain:a}of Tp)new RegExp(`\\b${Cp(o)}\\b`,"i").test(n)&&(Ip(n,o,a)?(t.chains.includes(a)||t.chains.push(a),t.tokens=t.tokens.filter(e=>e.toUpperCase()!==i)):(t.tokens.some(e=>e.toUpperCase()===i)||t.tokens.push(i),t.chains=t.chains.filter(e=>e!==a)));const r=t.chains.filter(e=>!up(e));return r.length>0&&(t.unsupportedChains=r),t.tokens=[...new Set(t.tokens.map(e=>e.toUpperCase()))],t.chains=[...new Set(t.chains.filter(e=>up(e)).map(e=>cp(e)))],t}(e,JSON.parse(l[0]));return(!d.limit||d.limit<1)&&(d.limit=5),d.limit>20&&(d.limit=20),Array.isArray(d.chains)||(d.chains=[]),void 0===d.poolId&&(d.poolId=null),void 0===d.walletAddress&&(d.walletAddress=null),void 0===d.toAddress&&(d.toAddress=null),d}catch(r){return null}}(t,a,i);if(!s)return null;if("unknown"===s.intent&&(s.intent="general_pool_info"),o&&!s.walletAddress&&(s.walletAddress=o),"send_position"===s.intent)return{response:"",parsed:s,pools:[],positions:[],sendPositionData:{positionId:s.poolId||""}};if(s.unsupportedChains&&s.unsupportedChains.length>0&&0===s.chains.length)return{response:Op(n).unsupportedChain,parsed:s,pools:[],positions:[]};let c,u=[],l=[];if("position_detail"===s.intent&&s.poolId){const e=!(s.chains&&s.chains.length>0)&&s.unsupportedChains&&s.unsupportedChains.length>0?[]:s.chains&&s.chains.length>0?s.chains:r&&up(r)?[r]:["ethereum"],t=await Promise.allSettled(e.map(e=>async function(e){const{positionId:t,chain:n,signal:r}=e,o=cp(n),i=`{\n position(id: "${t}") {\n id\n liquidity\n depositedToken0\n depositedToken1\n withdrawnToken0\n withdrawnToken1\n collectedFeesToken0\n collectedFeesToken1\n pool {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }\n }`,a=await lp(o,i,{},r);if(!a?.position?.pool)return null;const s=a.position,c=fp(s.pool,o),u=Number(s.pool?.feeTier||0),l=sp[u]??u/1e4;return{position:{positionId:s.id,poolAddress:s.pool?.id||"",pair:`${s.pool?.token0?.symbol}/${s.pool?.token1?.symbol}`,token0:{symbol:s.pool?.token0?.symbol||"",address:s.pool?.token0?.id||""},token1:{symbol:s.pool?.token1?.symbol||"",address:s.pool?.token1?.id||""},fee:l,chain:o,liquidity:s.liquidity,depositedToken0:s.depositedToken0,depositedToken1:s.depositedToken1,withdrawnToken0:s.withdrawnToken0,withdrawnToken1:s.withdrawnToken1,collectedFeesToken0:s.collectedFeesToken0,collectedFeesToken1:s.collectedFeesToken1},pool:c}}({positionId:s.poolId,chain:cp(e),signal:a})));for(const n of t)if("fulfilled"===n.status&&n.value){l.push(n.value.position);const e=n.value.pool.poolAddress;u.some(t=>t.poolAddress===e)||u.push(n.value.pool)}}else if("user_positions"===s.intent){const e=!(s.chains&&s.chains.length>0)&&s.unsupportedChains&&s.unsupportedChains.length>0;if(s.walletAddress&&!e){const e=s.chains&&s.chains.length>0?s.chains:r&&up(r)?[r]:[];l=await async function(e){const{walletAddress:t,chains:n,signal:r}=e,o=n&&n.length>0?n:Object.keys(op),i=await Promise.allSettled(o.map(e=>async function(e,t,n){if(!up(t))return[];const r=`{\n positions(\n where: { owner: "${e.toLowerCase()}" }\n orderBy: id\n orderDirection: desc\n first: 100\n ) {\n id\n liquidity\n depositedToken0\n depositedToken1\n withdrawnToken0\n withdrawnToken1\n collectedFeesToken0\n collectedFeesToken1\n pool {\n id\n feeTier\n token0 { id symbol }\n token1 { id symbol }\n }\n }\n }`,o=await lp(t,r,{},n);return(o?.positions||[]).map(e=>{const n=Number(e.pool?.feeTier||0),r=sp[n]??n/1e4;return{positionId:e.id,poolAddress:e.pool?.id||"",pair:`${e.pool?.token0?.symbol}/${e.pool?.token1?.symbol}`,token0:{symbol:e.pool?.token0?.symbol||"",address:e.pool?.token0?.id||""},token1:{symbol:e.pool?.token1?.symbol||"",address:e.pool?.token1?.id||""},fee:r,chain:t,liquidity:e.liquidity,depositedToken0:e.depositedToken0,depositedToken1:e.depositedToken1,withdrawnToken0:e.withdrawnToken0,withdrawnToken1:e.withdrawnToken1,collectedFeesToken0:e.collectedFeesToken0,collectedFeesToken1:e.collectedFeesToken1}})}(t,e,r)));return i.filter(e=>"fulfilled"===e.status).flatMap(e=>e.value)}({walletAddress:s.walletAddress,chains:e,signal:a})}}else u=await async function(e,t,n){try{const r=e.chains&&e.chains.length>0;if(!r&&e.unsupportedChains&&e.unsupportedChains.length>0)return[];const o=r?e.chains:t&&up(t)?[t]:["ethereum"],i=await Promise.allSettled(o.map(t=>async function(e,t,n){if(!up(t))return[];switch(e.intent){case"pool_detail":if(e.poolAddress){const r=await async function(e){const{poolAddress:t,chain:n,signal:r}=e,o=cp(n),i=`{\n pool(id: "${t.toLowerCase()}") {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }`,a=await lp(o,i,{},r);return a?.pool?fp(a.pool,o):null}({poolAddress:e.poolAddress,chain:t,signal:n});return r?[r]:[]}if(e.poolId){const r=await vp({poolId:e.poolId,chain:t,signal:n});return r?[r]:[]}return bp({tokens:e.tokens,chain:t,sortBy:e.sortBy,filters:e.filters,signal:n});case"trending_pool":return Ap({chain:t,signal:n});case"best_pool":case"safe_pool":return bp({tokens:e.tokens,chain:t,sortBy:"tvl",filters:e.filters,signal:n});case"high_apr_pool":return bp({tokens:e.tokens,chain:t,sortBy:"apr",filters:e.filters,signal:n});case"low_fee_pool":return bp({tokens:e.tokens,chain:t,sortBy:"fee",filters:e.filters,signal:n});case"general_pool_info":return e.tokens.length>0?bp({tokens:e.tokens,chain:t,sortBy:"tvl",filters:e.filters,signal:n}):Ap({chain:t,signal:n});case"position_detail":if(e.poolId){const r=await vp({poolId:e.poolId,chain:t,signal:n});return r?[r]:[]}return[];default:return bp({tokens:e.tokens,chain:t,sortBy:e.sortBy||"tvl",filters:e.filters,signal:n})}}(e,t,n)));let a=i.filter(e=>"fulfilled"===e.status).flatMap(e=>e.value);const s=await wp();return s.length>0&&(a=yp(a,s)),"apr"===e.sortBy&&a.sort((e,t)=>(t.apr??0)-(e.apr??0)),a}catch(r){return[]}}(s,r,a);if(s.tokens.length>=2)try{const e=s.chains[0]||r||"ethereum",t=ap[cp(e)];if(t){const e=await Dp(t),n=s.tokens[0].toUpperCase(),r=s.tokens[1].toUpperCase(),o=e.filter(e=>{const t=e.token0.symbol.toUpperCase(),o=e.token1.symbol.toUpperCase();return t.includes(n)&&o.includes(r)||t.includes(r)&&o.includes(n)||n.includes(t)&&r.includes(o)||n.includes(o)&&r.includes(t)});o.length>0&&(c=o.map(e=>{const t=e.selectorAddress.toLowerCase()===e.token0.address.toLowerCase(),n=null!==e.priceMin?Number(e.priceMin):0,r=null!==e.priceMax?Number(e.priceMax):0,o=null!==e.priceCurrent?Number(e.priceCurrent):0,i=t?n:r>0?1/r:0,a=t?r:n>0?1/n:0,s=t?o:o>0?1/o:0,c=t?e.token0.symbol:e.token1.symbol,u=t?e.token1.symbol:e.token0.symbol;return{poolId:e.poolId,pair:`${e.token0.symbol}/${e.token1.symbol}`,token0Price:e.token0.price,token1Price:e.token1.price,fee:`${sp[Number(e.fee)]??Number(e.fee)/1e4}%`,apr:e.apr,aprAvg:e.aprAvg,priceRange:{minPrice:i,maxPrice:a,currentPrice:s,baseToken:c,quoteToken:u}}}).filter(e=>{const{minPrice:t,maxPrice:n,currentPrice:r}=e.priceRange;if(!r||!t&&!n)return!1;const o=Math.min(t,n),i=Math.max(t,n);return r>=o&&r<=i}),0===c.length&&(c=void 0))}}catch(f){}const d={question:t,parsed:s,chatHistory:i,data:{pools:u,positions:l.length>0?l:void 0,coinpoolPairs:c}};return{response:await Pp(d,n,a),parsed:s,pools:u,positions:l}}const Up=Af()?.apiExternal?.keyringPool,Lp=Af()?.apiExternal?.baseUrl,Dp=async e=>{try{const t=await fetch(`${Lp}/pair/pure-list?chainId=${encodeURIComponent(e)}`);if(!t.ok)throw new Error(`HTTP ${t.status}`);const n=await t.json(),r=n?.pairs||[],o=await(async e=>{if(e?.length>0){const t=e[0]?.chainId,n=[];if(e.forEach(e=>{e?.transaction?.length>0&&e.transaction.forEach(e=>{e?.nftId&&n.push(e.nftId)})}),n.length>0)return(async(e,t)=>{const n=tp.chunk(t,200);return(await Promise.allSettled(n.map(async t=>{const n=new URLSearchParams({tokenIds:t.join(","),chainId:String(e)}),r=await fetch(`${Up}/user/positions-details/v3?${n}`);if(!r.ok)throw new Error(`HTTP ${r.status}`);return r.json()}))).map(e=>"fulfilled"===e?.status&&(e?.value?.data||e?.value)||[]).flat()})(t,n)}return[]})(r.map(t=>({...t,chainId:e}))),i=/* @__PURE__ */new Map;for(const e of o){const t=String(e?.tokenId||"");t&&i.set(t,e)}return r.map(e=>{let t=null;for(const n of e.transaction||[])if(n.nftId&&(t=i.get(n.nftId),t))break;return{...e,apr:t?.apr??null,aprAvg:t?.aprAvg??null,priceCurrent:t?.tick?.currentTick??null,priceMin:t?.tick?.minTick??null,priceMax:t?.tick?.maxTick??null}})}catch(t){return[]}},Fp=e=>e?`**CRITICAL - LANGUAGE**: Respond in the specified language: "${e||"detect from current question"}". Do NOT follow language from conversation history.`:"**CRITICAL - LANGUAGE**: You MUST detect the language of the user's CURRENT question and respond ONLY in that exact language. Ignore the language of previous messages in conversation history — only the current question matters. If the current question is in English, respond in English. If in Vietnamese, respond in Vietnamese. NEVER default to Chinese or any other language.";function qp(e,t,n){if(!e)return e;const r=e.toLowerCase().trim();if("max"===r||"all"===r)return t||e;const o=r.match(/^(\d+(?:\.\d+)?)%$/);if(o){const e=parseFloat(o[1])/100;return((parseFloat(t)||0)*e).toFixed(8).replace(/\.?0+$/,"")||"0"}const i=r.match(/^\$?(\d+(?:\.\d+)?)\$?$/),a=r.startsWith("$")||r.endsWith("$")||/\d(usd|dollar|dollars|đô|đồng)$/.test(r);if(i&&a){const t=parseFloat(i[1]);return n&&n>0?(t/n).toFixed(8).replace(/\.?0+$/,"")||"0":e}const s=r.match(/^(\d+(?:\.\d+)?)\s*(?:usd|dollar|dollars|đô|đồng)$/);if(s){const t=parseFloat(s[1]);return n&&n>0?(t/n).toFixed(8).replace(/\.?0+$/,"")||"0":e}return e}function Hp(e){try{let t=e?.trim()||"";return t.startsWith("```json")?t=t.replace(/^```json\s*/,"").replace(/\s*```$/,""):t.startsWith("```")&&(t=t.replace(/^```\s*/,"").replace(/\s*```$/,"")),JSON.parse(function(e){const t=e.indexOf("{");if(-1===t)return e;let n=0,r=!1,o=!1;for(let i=t;i<e.length;i++){const a=e[i];if(o)o=!1;else if("\\"===a&&r)o=!0;else if('"'!==a){if(!r)if("{"===a)n++;else if("}"===a&&(n--,0===n))return e.slice(t,i+1)}else r=!r}return e}(t))}catch{return null}}function Vp(t){const n=[],r=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]*)\]\(([^)]+)\)|(https?:\/\/[^\s<>]+)|\*\*(.+?)\*\*|__(.+?)__|\*(.+?)\*|_(.+?)_|~~(.+?)~~|`([^`]+)`/g;let o,i=0;for(;null!==(o=r.exec(t));)o.index>i&&n.push(t.slice(i,o.index)),void 0!==o[1]||void 0!==o[2]?n.push(
20
20
  /* @__PURE__ */e("img",{src:o[2],alt:o[1],className:"mc-image",onError:e=>{e.target.src="data:image/svg+xml,%3csvg%20width='180'%20height='180'%20viewBox='0%200%20180%20180'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.1'%3e%3cpath%20d='M102.392%20118.157L102.417%20109.35L89.7594%20102.042C89.5768%20101.937%2089.3953%20101.826%2089.2149%20101.71L89.1861%20101.692C89.012%20101.581%2088.839%20101.47%2088.666%20101.346C88.6061%20101.305%2088.5473%20101.262%2088.4874%20101.22C88.3765%20101.139%2088.259%20101.057%2088.1459%20100.972C88.0749%20100.919%2088.0051%20100.861%2087.9352%20100.811C87.8321%20100.733%2087.73%20100.653%2087.6291%20100.571C87.5552%20100.51%2087.4813%20100.449%2087.4073%20100.387C87.3098%20100.306%2087.2125%20100.224%2087.1157%20100.141C87.0418%20100.075%2086.9678%20100.009%2086.8939%2099.9421C86.7985%2099.8578%2086.7039%2099.772%2086.61%2099.6848C86.5346%2099.6149%2086.4592%2099.5462%2086.3882%2099.4752C86.2929%2099.3843%2086.1986%2099.2922%2086.1044%2099.2002C86.0356%2099.1325%2085.9657%2099.0649%2085.897%2098.9961C85.7983%2098.8963%2085.7007%2098.7954%2085.6031%2098.6934C85.541%2098.628%2085.4778%2098.5637%2085.4168%2098.4982C85.3059%2098.3763%2085.195%2098.2521%2085.0786%2098.1267L84.9533%2097.9881C84.7995%2097.8137%2084.648%2097.6366%2084.4986%2097.457C84.4643%2097.4159%2084.4321%2097.3738%2084.3977%2097.3328C84.2868%2097.1919%2084.1671%2097.05%2084.054%2096.9069C83.9172%2096.7325%2083.7826%2096.5558%2083.6503%2096.3769L83.5827%2096.2881C83.3675%2095.9965%2083.1591%2095.6971%2082.955%2095.3943L82.8441%2095.228C82.5876%2094.8421%2082.341%2094.4495%2082.1045%2094.0503L82.0135%2093.8984C81.8487%2093.616%2081.6886%2093.3306%2081.5334%2093.0423C81.4768%2092.937%2081.4225%2092.8316%2081.3681%2092.7263C81.3138%2092.6209%2081.2572%2092.5045%2081.1952%2092.3936C81.1164%2092.2361%2081.0399%2092.0787%2080.9634%2091.9201C80.939%2091.8691%2080.9135%2091.8181%2080.8891%2091.7671C80.793%2091.5623%2080.6995%2091.3564%2080.6085%2091.1494C80.5852%2091.095%2080.562%2091.0385%2080.5398%2090.9875C80.4732%2090.8337%2080.4082%2090.6792%2080.3446%2090.524L80.2592%2090.3121C80.2008%2090.1643%2080.1435%2090.0164%2080.0873%2089.8686C80.0629%2089.8043%2080.0385%2089.7388%2080.0141%2089.6745C79.9454%2089.486%2079.8789%2089.2971%2079.8145%2089.1079L79.789%2089.0347C79.7151%2088.8218%2079.6471%2088.6088%2079.585%2088.3959C79.5639%2088.3283%2079.5451%2088.2606%2079.5262%2088.193C79.483%2088.0444%2079.4397%2087.8958%2079.3998%2087.7494C79.3776%2087.6685%2079.3566%2087.5875%2079.3355%2087.5066C79.3%2087.3691%2079.2656%2087.2319%2079.2324%2087.0952C79.2131%2087.0138%2079.1943%2086.9325%2079.1758%2086.8512C79.1436%2086.7104%2079.1137%2086.5695%2079.0849%2086.4298C79.0693%2086.3555%2079.0538%2086.2801%2079.0394%2086.208C79.0047%2086.0276%2078.9725%2085.848%2078.9429%2085.6691C78.9429%2085.638%2078.9318%2085.607%2078.9274%2085.5759C78.8941%2085.366%2078.8646%2085.1564%2078.8387%2084.9472C78.832%2084.8906%2078.8265%2084.8363%2078.8198%2084.7775C78.8028%2084.6259%2078.7873%2084.4748%2078.7733%2084.3239C78.7666%2084.253%2078.7622%2084.182%2078.7566%2084.1121C78.7455%2083.9702%2078.7378%2083.8294%2078.7311%2083.6885C78.7311%2083.622%2078.7245%2083.5544%2078.7222%2083.4878C78.7156%2083.2882%2078.71%2083.0897%2078.7112%2082.8934L78.7466%2069.3645L77.6377%2068.7258L71.9567%2065.45C70.7912%2064.7503%2069.5073%2064.2703%2068.1686%2064.0339V64.0417C68.1597%2064.1105%2068.1542%2064.1825%2068.1464%2064.2513C68.1387%2064.32%2068.1298%2064.4021%2068.1231%2064.4797C68.1231%2064.5119%2068.1165%2064.5418%2068.1132%2064.574C68.1043%2064.676%2068.0999%2064.7802%2068.0943%2064.8845C68.0943%2064.941%2068.0865%2064.9954%2068.0843%2065.0541V65.0952C68.0769%2065.2704%2068.0729%2065.4482%2068.0721%2065.6286V65.6607L68.0078%2089.1023C68.0078%2089.2679%2068.01%2089.4339%2068.0145%2089.6002C68.0145%2089.6324%2068.0145%2089.6634%2068.0145%2089.6956C68.0145%2089.7632%2068.0211%2089.832%2068.0244%2089.8996C68.0278%2089.9673%2068.03%2090.056%2068.0355%2090.1347C68.0355%2090.1957%2068.0455%2090.2578%2068.05%2090.3199C68.0544%2090.382%2068.061%2090.463%2068.0677%2090.535C68.0677%2090.5805%2068.0743%2090.6271%2068.0788%2090.6725C68.0888%2090.7757%2068.1021%2090.8799%2068.1132%2090.9842C68.1198%2091.0418%2068.1254%2091.095%2068.132%2091.1583L68.1387%2091.2137C68.1623%2091.3985%2068.1886%2091.5833%2068.2174%2091.7682V91.7837C68.2174%2091.8147%2068.2285%2091.8469%2068.234%2091.8779C68.2584%2092.0277%2068.2839%2092.1774%2068.3117%2092.3282C68.3172%2092.357%2068.3239%2092.3858%2068.3294%2092.4147C68.3438%2092.4901%2068.3604%2092.5655%2068.376%2092.6365C68.3915%2092.7074%2068.4104%2092.8128%2068.4292%2092.9004C68.4403%2092.9525%2068.4536%2093.0046%2068.4658%2093.0556C68.4843%2093.1362%2068.5031%2093.2172%2068.5224%2093.2985C68.5368%2093.3595%2068.5501%2093.4205%2068.5645%2093.4803C68.5789%2093.5402%2068.6055%2093.6345%2068.6255%2093.711C68.6454%2093.7875%2068.6676%2093.8729%2068.6887%2093.9527C68.6998%2093.9916%2068.7087%2094.0304%2068.7186%2094.0636C68.7486%2094.1745%2068.7818%2094.2854%2068.8151%2094.3963C68.8351%2094.464%2068.8539%2094.5316%2068.8739%2094.5993L68.8894%2094.6547C68.9478%2094.8462%2069.0092%2095.0376%2069.0735%2095.2291V95.2391L69.099%2095.3123C69.1533%2095.4731%2069.2099%2095.6339%2069.2676%2095.7947C69.2775%2095.8224%2069.2886%2095.8501%2069.2986%2095.8778C69.3219%2095.9422%2069.3463%2096.0054%2069.3707%2096.0697C69.4039%2096.1595%2069.4372%2096.2482%2069.4716%2096.338C69.4949%2096.3979%2069.5193%2096.4567%2069.5437%2096.5166L69.628%2096.7262C69.649%2096.7761%2069.6679%2096.8271%2069.6889%2096.877C69.7322%2096.9812%2069.7777%2097.0855%2069.8231%2097.1897C69.8464%2097.244%2069.8686%2097.3006%2069.893%2097.3516L69.9174%2097.4082C69.9972%2097.5878%2070.0789%2097.7671%2070.1625%2097.946L70.1735%2097.9704C70.1979%2098.0214%2070.2234%2098.0724%2070.2478%2098.1234C70.3133%2098.2598%2070.3776%2098.3973%2070.4452%2098.5326L70.4785%2098.5969C70.5351%2098.7078%2070.5894%2098.8187%2070.6515%2098.9296C70.6981%2099.0194%2070.7424%2099.1093%2070.7901%2099.198L70.8167%2099.2456C70.9712%2099.534%2071.1313%2099.8193%2071.2969%20100.102C71.3113%20100.126%2071.3235%20100.151%2071.3379%20100.175C71.3523%20100.199%2071.3723%20100.227%2071.3878%20100.254C71.6244%20100.653%2071.8709%20101.045%2072.1275%20101.431C72.1419%20101.452%2072.1541%20101.475%2072.1685%20101.497C72.1829%20101.519%2072.2173%20101.564%2072.2406%20101.6C72.4446%20101.902%2072.652%20102.201%2072.8682%20102.493L72.9314%20102.575C73.0645%20102.754%2073.1994%20102.931%2073.3362%20103.107L73.3595%20103.137C73.4704%20103.272%2073.5746%20103.405%2073.6833%20103.537L73.7798%20103.656L73.7875%20103.665C73.9287%20103.835%2074.0718%20104.002%2074.2167%20104.167L74.2344%20104.187L74.3597%20104.326C74.4551%20104.437%2074.5516%20104.541%2074.6481%20104.646L74.698%20104.698C74.7601%20104.764%2074.8222%20104.828%2074.8843%20104.893C74.9464%20104.959%2075.0284%20105.046%2075.106%20105.122L75.1814%20105.197C75.2502%20105.266%2075.319%20105.334%2075.3888%20105.401C75.4587%20105.469%2075.5108%20105.524%2075.5729%20105.583L75.6727%20105.676C75.747%20105.747%2075.8224%20105.817%2075.8945%20105.886C75.9488%20105.936%2076.0054%20105.987%2076.0564%20106.036L76.1784%20106.146L76.4002%20106.345C76.4478%20106.386%2076.4944%20106.429%2076.5432%20106.469C76.592%20106.509%2076.643%20106.55%2076.6918%20106.59L76.9136%20106.774C76.9535%20106.806%2076.9923%20106.84%2077.0322%20106.872C77.0943%20106.921%2077.1576%20106.967%2077.2197%20107.015C77.2818%20107.062%2077.3594%20107.126%2077.4292%20107.174L77.5168%20107.241C77.6011%20107.303%2077.6876%20107.362%2077.7719%20107.423C77.8307%20107.465%2077.8894%20107.508%2077.9493%20107.549L77.997%20107.584C78.1523%20107.69%2078.3086%20107.794%2078.4661%20107.894L78.4905%20107.91C78.6357%20108.002%2078.7821%20108.092%2078.9341%20108.178L79.0449%20108.241L98.4999%20119.478C98.6175%20119.546%2098.7346%20119.611%2098.8515%20119.674L98.9867%20119.744L99.1653%20119.836C99.2119%20119.859%2099.2584%20119.885%2099.3039%20119.908C99.3793%20119.946%2099.4547%20119.979%2099.5257%20120.019L99.6832%20120.093L99.7464%20120.123C99.8942%20120.19%20100.042%20120.252%20100.19%20120.311L100.208%20120.317C100.35%20120.374%20100.492%20120.428%20100.633%20120.477L100.693%20120.497L100.856%20120.55C100.93%20120.575%20101.004%20120.6%20101.078%20120.622L101.189%20120.655L101.385%20120.709C101.434%20120.722%20101.484%20120.738%20101.532%20120.75C101.579%20120.762%20101.643%20120.773%20101.693%20120.785L101.888%20120.829L101.986%20120.851L102.085%20120.867C102.158%20120.553%20102.219%20120.227%20102.266%20119.886C102.346%20119.313%20102.388%20118.736%20102.392%20118.157Z'%20fill='url(%23paint0_linear_302_6100)'/%3e%3cpath%20d='M91.4307%2064.3019L78.0005%2056.5472L75.8214%2055.2885L71.9957%2053.0796C59.9427%2046.1222%2050.1032%2051.73%2050.0633%2065.5794L50.0001%2087.9076C49.9613%20101.769%2059.7365%20118.694%2071.7894%20125.652L91.2244%20136.872C103.276%20143.831%20113.117%20138.227%20113.156%20124.373L113.183%20114.546V113.668L113.217%20102.041C113.259%2088.1926%20103.482%2071.2604%2091.4307%2064.3019ZM102.419%20108.881V109.349L102.395%20118.156C102.394%20118.733%20102.355%20119.309%20102.278%20119.881C102.232%20120.222%20102.167%20120.547%20102.097%20120.863C100.943%20125.853%2096.5184%20127.534%2091.2621%20124.5L71.8249%20113.283C65.708%20109.753%2060.7478%20101.16%2060.7678%2094.1275L60.831%2071.7949C60.8454%2066.777%2063.3948%2063.8927%2067.0787%2063.9382C67.4454%2063.9447%2067.8112%2063.9777%2068.1732%2064.0369C69.5103%2064.2737%2070.7927%2064.7537%2071.9568%2065.453L77.6312%2068.7232L78.7401%2069.3619L91.3974%2076.6697C97.512%2080.205%20102.476%2088.7947%20102.452%2095.8275L102.419%20108.881Z'%20fill='url(%23paint1_linear_302_6100)'/%3e%3cpath%20d='M129.993%2090.9695C129.993%2090.9063%20129.987%2090.842%20129.985%2090.7788C129.985%2090.648%20129.972%2090.516%20129.966%2090.3851C129.958%2090.2288%20129.953%2090.0746%20129.944%2089.9172C129.936%2089.7952%20129.924%2089.671%20129.914%2089.5479C129.904%2089.4248%20129.892%2089.2707%20129.88%2089.1309C129.873%2089.04%20129.867%2088.9491%20129.858%2088.8582C129.838%2088.6519%20129.813%2088.4445%20129.789%2088.2383C129.776%2088.1274%20129.766%2088.0165%20129.752%2087.9056C129.752%2087.869%20129.744%2087.8324%20129.739%2087.7947C129.694%2087.431%20129.642%2087.0658%20129.583%2086.6991L129.578%2086.6669C129.568%2086.6037%20129.555%2086.5405%20129.544%2086.4773C129.497%2086.1845%20129.448%2085.8918%20129.392%2085.5979C129.381%2085.5391%20129.368%2085.4815%20129.357%2085.4227C129.328%2085.2752%20129.297%2085.1277%20129.267%2084.9791C129.232%2084.805%20129.199%2084.632%20129.156%2084.459C129.134%2084.3559%20129.107%2084.2528%20129.084%2084.1497C129.048%2083.99%20129.011%2083.8303%20128.973%2083.6706C128.944%2083.5519%20128.92%2083.4333%20128.89%2083.3146C128.852%2083.1627%20128.809%2083.0097%20128.77%2082.8566C128.731%2082.7036%20128.688%2082.5395%20128.645%2082.3809C128.625%2082.3055%20128.606%2082.2301%20128.585%2082.1591C128.524%2081.9373%20128.458%2081.7222%20128.393%2081.5038C128.354%2081.3729%20128.318%2081.2409%20128.282%2081.1101C128.271%2081.0746%20128.262%2081.0391%20128.251%2080.9992C128.135%2080.6214%20128.014%2080.244%20127.889%2079.867L127.881%2079.8448C127.863%2079.7927%20127.844%2079.7417%20127.827%2079.6896C127.716%2079.3768%20127.613%2079.063%20127.494%2078.7503C127.474%2078.6948%20127.452%2078.6394%20127.432%2078.584C127.385%2078.4564%20127.336%2078.3289%20127.288%2078.2014C127.222%2078.0273%20127.159%2077.8532%20127.091%2077.6791C127.046%2077.5615%20126.997%2077.4451%20126.949%2077.3275C126.894%2077.1886%20126.838%2077.0499%20126.782%2076.9117C126.742%2076.813%20126.704%2076.7143%20126.663%2076.6167C126.577%2076.4094%20126.487%2076.2042%20126.398%2075.9979C126.353%2075.8871%20126.308%2075.7861%20126.262%2075.6797L126.215%2075.5688C126.059%2075.2147%20125.898%2074.8617%20125.733%2074.5098L125.711%2074.4632C125.661%2074.3523%20125.608%2074.2525%20125.558%2074.146C125.431%2073.881%20125.305%2073.616%20125.174%2073.3532C125.153%2073.311%20125.13%2073.2689%20125.109%2073.2256C124.998%2073.0038%20124.887%2072.7821%20124.768%2072.5669C124.677%2072.3906%20124.589%2072.2143%20124.495%2072.0391C124.478%2072.0069%20124.459%2071.9759%20124.441%2071.9426C124.136%2071.3756%20123.821%2070.8137%20123.495%2070.257C123.467%2070.2094%20123.443%2070.1617%20123.415%2070.114C123.333%2069.9743%20123.247%2069.8379%20123.164%2069.6992C123.024%2069.4675%20122.885%2069.2357%20122.742%2069.0062C122.618%2068.8066%20122.492%2068.6092%20122.365%2068.4118C122.22%2068.19%20122.076%2067.9604%20121.927%2067.7364C121.877%2067.6599%20121.829%2067.5823%20121.778%2067.5069C121.727%2067.4315%20121.682%2067.3727%20121.635%2067.304C121.233%2066.7085%20120.824%2066.1196%20120.4%2065.5441L120.395%2065.5352C120.354%2065.4787%20120.309%2065.4243%20120.268%2065.3689C120.006%2065.017%20119.741%2064.6688%20119.472%2064.3243L119.425%2064.2633C119.215%2063.996%20119%2063.7343%20118.786%2063.4715C118.722%2063.395%20118.661%2063.3163%20118.598%2063.2398L118.584%2063.222C118.306%2062.8879%20118.024%2062.5581%20117.739%2062.2328L117.702%2062.1929C117.621%2062.0998%20117.537%2062.0111%20117.455%2061.919C117.266%2061.7083%20117.078%2061.4954%20116.886%2061.2892L116.788%2061.1871C116.666%2061.0563%20116.542%2060.9288%20116.418%2060.799C116.276%2060.6504%20116.135%2060.4985%20115.991%2060.3554C115.942%2060.3055%20115.891%2060.2579%20115.841%2060.208C115.706%2060.0716%20115.57%2059.9385%20115.433%2059.8043C115.297%2059.6701%20115.193%2059.5626%20115.071%2059.445C115.005%2059.3829%20114.939%2059.323%20114.873%2059.2609C114.726%2059.1212%20114.577%2058.9837%20114.43%2058.8473C114.319%2058.7497%20114.219%2058.6488%20114.112%2058.5523C114.034%2058.4814%20113.953%2058.4137%20113.873%2058.3427C113.725%2058.2104%20113.575%2058.0796%20113.424%2057.9502C113.33%2057.8692%20113.238%2057.7849%20113.142%2057.7051C113.047%2057.6253%20112.946%2057.5465%20112.848%2057.4656C112.7%2057.3443%20112.553%2057.2242%20112.405%2057.1052C112.326%2057.042%20112.248%2056.9754%20112.169%2056.9122C112.045%2056.8157%20111.921%2056.7248%20111.798%2056.6294C111.675%2056.5341%20111.523%2056.4176%20111.386%2056.3145C111.328%2056.2713%20111.275%2056.2258%20111.213%2056.1826C111.045%2056.0595%20110.88%2055.943%20110.707%2055.8233C110.596%2055.7412%20110.476%2055.6569%20110.36%2055.5771L110.265%2055.5094C109.958%2055.2995%20109.651%2055.0958%20109.341%2054.8984H109.334L109.288%2054.8696C109%2054.6877%20108.711%2054.5092%20108.42%2054.3384L108.206%2054.2142L88.7824%2042.9941C88.551%2042.8603%2088.3204%2042.7313%2088.0904%2042.6071C88.0017%2042.5594%2087.9141%2042.5162%2087.8254%2042.4696L87.4717%2042.2866C87.3807%2042.24%2087.2887%2042.1901%2087.1989%2042.1447C87.0492%2042.0704%2086.9017%2042.0049%2086.7553%2041.9351C86.6511%2041.8863%2086.5479%2041.8353%2086.4448%2041.7887L86.3195%2041.7299C86.0238%2041.5991%2085.7332%2041.476%2085.4479%2041.3607L85.4035%2041.344C85.1252%2041.2331%2084.8491%2041.1289%2084.5729%2041.0313L84.4465%2040.9847C84.3356%2040.9481%2084.2336%2040.9149%2084.1271%2040.8805C83.9819%2040.8328%2083.8366%2040.7818%2083.6924%2040.7385C83.6159%2040.7153%2083.5405%2040.6975%2083.464%2040.6753C83.3354%2040.6376%2083.2078%2040.6033%2083.0792%2040.5644C82.9827%2040.5389%2082.8851%2040.5079%2082.7898%2040.4846C82.6944%2040.4613%2082.5802%2040.4436%2082.4737%2040.4192C82.3462%2040.3903%2082.2176%2040.3604%2082.0912%2040.3327C82.0268%2040.3194%2081.9603%2040.3016%2081.896%2040.2894C81.7729%2040.265%2081.6531%2040.2506%2081.53%2040.2295C81.3826%2040.204%2081.234%2040.1774%2081.0865%2040.1564C81.0388%2040.1508%2080.9878%2040.1397%2080.939%2040.1331C80.8148%2040.1109%2080.6928%2040.1109%2080.5697%2040.0954C80.4122%2040.0776%2080.2548%2040.0599%2080.0995%2040.0477C80.0563%2040.0477%2080.0108%2040.0377%2079.9676%2040.0344C79.8567%2040.0266%2079.7558%2040.0288%2079.6482%2040.0233C79.4608%2040.0144%2079.2756%2040.0067%2079.0893%2040C79.0394%2040%2078.9884%2040%2078.9385%2040C78.8575%2040%2078.7799%2040.01%2078.699%2040.0111C78.4661%2040.0111%2078.2354%2040.0266%2078.0081%2040.0432C77.9405%2040.0432%2077.8706%2040.0432%2077.8041%2040.0532C77.7054%2040.0621%2077.61%2040.0765%2077.5124%2040.0876L77.3017%2040.1109C77.0455%2040.1453%2076.7916%2040.1841%2076.5421%2040.2351L76.5144%2040.244C76.4401%2040.2595%2076.368%2040.2794%2076.2926%2040.2961C76.0897%2040.3415%2075.8878%2040.3892%2075.6904%2040.4447C75.5895%2040.4735%2075.4919%2040.5068%2075.3921%2040.5389C75.2646%2040.5789%2075.1349%2040.6143%2075.0085%2040.6598C74.9752%2040.6709%2074.9441%2040.6875%2074.912%2040.6986C74.7146%2040.7707%2074.5239%2040.8517%2074.332%2040.9348C74.2389%2040.9747%2074.1435%2041.0113%2074.0526%2041.0535C73.7731%2041.1843%2073.4981%2041.3252%2073.2331%2041.4793L62.5375%2047.6893C62.8036%2047.5351%2063.0775%2047.3943%2063.3559%2047.2635C63.4479%2047.2202%2063.5433%2047.1847%2063.6364%2047.1437C63.8272%2047.0605%2064.019%2046.9796%2064.2153%2046.9075C64.3727%2046.8498%2064.5335%2046.7966%2064.6954%2046.7478C64.7952%2046.7168%2064.8928%2046.6824%2064.9937%2046.6536C65.1911%2046.5981%2065.3941%2046.5504%2065.5959%2046.505C65.6691%2046.4883%2065.7412%2046.4684%2065.8177%2046.4528C66.0761%2046.4007%2066.3389%2046.3586%2066.605%2046.3231C66.6749%2046.3142%2066.7458%2046.3065%2066.8157%2046.2987C66.9798%2046.2798%2067.1484%2046.2665%2067.3114%2046.2543C67.5387%2046.2366%2067.7694%2046.2266%2068.0023%2046.2211C68.132%2046.2211%2068.2606%2046.2133%2068.3915%2046.2144C68.5756%2046.2144%2068.763%2046.2244%2068.946%2046.2333C69.0957%2046.2399%2069.2454%2046.2455%2069.3973%2046.2577C69.5492%2046.2699%2069.71%2046.2887%2069.8675%2046.3054C70.0249%2046.322%2070.2112%2046.3431%2070.3865%2046.3675C70.5328%2046.3885%2070.6803%2046.4151%2070.83%2046.4406C71.0163%2046.4728%2071.2026%2046.505%2071.3911%2046.5449C71.5176%2046.5715%2071.6462%2046.6003%2071.7737%2046.6303C71.9748%2046.6768%2072.177%2046.7271%2072.3803%2046.7811C72.5078%2046.8155%2072.6365%2046.8498%2072.764%2046.892C72.9858%2046.9552%2073.2076%2047.025%2073.4293%2047.0971C73.5402%2047.1315%2073.6411%2047.1648%2073.7476%2047.2014C74.0625%2047.3123%2074.3786%2047.4231%2074.698%2047.5529L74.7423%2047.5695C75.075%2047.7026%2075.4077%2047.8479%2075.7403%2047.9998C75.8435%2048.0464%2075.9466%2048.0974%2076.0508%2048.1462C76.2896%2048.2585%2076.5295%2048.3757%2076.7705%2048.4977C76.8881%2048.5576%2077.006%2048.6186%2077.1243%2048.6807C77.4414%2048.8481%2077.7597%2049.0189%2078.0802%2049.2041L97.5219%2060.4253C97.8834%2060.6338%2098.2427%2060.8515%2098.5997%2061.0785L98.6507%2061.1095C98.9945%2061.3313%2099.3361%2061.5531%2099.6754%2061.7915C99.7918%2061.8724%2099.9072%2061.9567%20100.022%2062.0388C100.244%2062.1996%20100.476%2062.3626%20100.701%2062.53C100.839%2062.6332%20100.975%2062.7385%20101.113%2062.8439C101.316%2062.9999%20101.518%2063.1588%20101.72%2063.3207C101.868%2063.439%20102.016%2063.5588%20102.164%2063.68C102.357%2063.8397%20102.549%2064.0016%20102.739%2064.1657C102.887%2064.2951%20103.035%2064.4256%20103.183%2064.5572C103.37%2064.7228%20103.555%2064.8909%20103.737%2065.0617C103.886%2065.1981%20104.035%2065.3356%20104.181%2065.4753C104.369%2065.6539%20104.557%2065.8357%20104.743%2066.0187C104.878%2066.1518%20105.015%2066.2849%20105.149%2066.4202C105.343%2066.6153%20105.534%2066.8149%20105.726%2067.0145C105.85%2067.1443%20105.974%2067.2718%20106.097%2067.4038C106.319%2067.6433%20106.541%2067.8884%20106.763%2068.1334C106.845%2068.2255%20106.929%2068.3153%20107.011%2068.4085C107.313%2068.7522%20107.612%2069.1015%20107.907%2069.4564C107.97%2069.5329%20108.031%2069.6116%20108.094%2069.6882C108.325%2069.9698%20108.556%2070.2526%20108.781%2070.5409C109.05%2070.8847%20109.315%2071.2329%20109.576%2071.5855C109.619%2071.6443%20109.665%2071.6964%20109.709%2071.7607C110.133%2072.3363%20110.543%2072.9251%20110.944%2073.5195C111.042%2073.6637%20111.141%2073.8078%20111.236%2073.9531C111.383%2074.1749%20111.529%2074.4022%20111.674%2074.6284C111.8%2074.8258%20111.927%2075.0232%20112.051%2075.2228C112.194%2075.4524%20112.333%2075.6841%20112.472%2075.9159C112.583%2076.1011%20112.694%2076.2863%20112.805%2076.4703C113.13%2077.027%20113.446%2077.5893%20113.751%2078.157C113.862%2078.3633%20113.973%2078.5706%20114.076%2078.7769C114.179%2078.9832%20114.307%2079.2205%20114.417%2079.4423C114.57%2079.7472%20114.72%2080.0544%20114.867%2080.3616C114.918%2080.4725%20114.97%2080.5723%20115.02%2080.6787C115.209%2081.0816%20115.394%2081.4882%20115.574%2081.8985C115.621%2082.0094%20115.666%2082.1126%20115.712%2082.2201C115.842%2082.5232%20115.97%2082.8274%20116.095%2083.1328C116.152%2083.2718%20116.208%2083.4104%20116.263%2083.5486C116.379%2083.8399%20116.49%2084.1315%20116.595%2084.4236C116.643%2084.5511%20116.692%2084.6786%20116.74%2084.8061C116.874%2085.1758%20117.004%2085.5454%20117.129%2085.9151C117.147%2085.9661%20117.165%2086.0182%20117.183%2086.0692C117.324%2086.4891%20117.457%2086.909%20117.585%2087.3289C117.624%2087.4609%20117.661%2087.5929%20117.695%2087.7248C117.782%2088.0176%20117.866%2088.3103%20117.945%2088.6031C117.988%2088.7628%20118.029%2088.9225%20118.071%2089.0833C118.142%2089.3531%20118.209%2089.6229%20118.273%2089.8928C118.312%2090.0532%20118.349%2090.2133%20118.384%2090.3729C118.447%2090.6494%20118.506%2090.9259%20118.561%2091.2024C118.591%2091.3499%20118.622%2091.4974%20118.651%2091.646C118.719%2091.9986%20118.782%2092.3502%20118.839%2092.7006C118.849%2092.7638%20118.862%2092.827%20118.872%2092.8902C118.938%2093.3042%20118.996%2093.7167%20119.046%2094.1278C119.061%2094.2387%20119.07%2094.3496%20119.084%2094.4604C119.118%2094.7562%20119.148%2095.0537%20119.175%2095.3531C119.187%2095.4929%20119.198%2095.6315%20119.208%2095.7701C119.229%2096.0495%20119.246%2096.3279%20119.259%2096.6051C119.266%2096.7371%20119.272%2096.869%20119.278%2097.001C119.292%2097.3936%20119.301%2097.7839%20119.3%2098.172L119.237%20120.505C119.237%20120.912%20119.225%20121.31%20119.207%20121.702C119.207%20121.813%20119.192%20121.924%20119.187%20122.035C119.171%20122.304%20119.154%20122.572%20119.129%20122.835C119.116%20122.986%20119.099%20123.135%20119.083%20123.285C119.058%20123.507%20119.033%20123.728%20119.003%20123.95C118.981%20124.11%20118.957%20124.266%20118.932%20124.423C118.9%20124.624%20118.866%20124.822%20118.829%20125.018C118.795%20125.193%20118.761%20125.367%20118.725%20125.538C118.688%20125.71%20118.648%20125.884%20118.605%20126.06C118.556%20126.262%20118.504%20126.461%20118.449%20126.657C118.406%20126.811%20118.363%20126.964%20118.316%20127.115C118.244%20127.349%20118.168%20127.577%20118.088%20127.804C118.044%20127.928%20118.001%20128.053%20117.956%20128.175C117.811%20128.557%20117.657%20128.928%20117.488%20129.284C117.357%20129.561%20117.221%20129.832%20117.077%20130.092C117.061%20130.121%20117.042%20130.148%20117.027%20130.177C116.895%20130.412%20116.758%20130.64%20116.616%20130.862C116.582%20130.915%20116.545%20130.966%20116.506%20131.02C116.386%20131.199%20116.263%20131.375%20116.136%20131.546C116.084%20131.616%20116.031%20131.686%20115.978%20131.755C115.855%20131.913%20115.729%20132.067%20115.6%20132.216C115.552%20132.273%20115.504%20132.327%20115.455%20132.385C115.279%20132.582%20115.097%20132.774%20114.91%20132.956C114.881%20132.983%20114.85%20133.01%20114.821%20133.038C114.66%20133.191%20114.495%20133.339%20114.327%20133.481C114.264%20133.533%20114.2%20133.584%20114.137%20133.635C113.989%20133.753%20113.841%20133.866%20113.693%20133.975C113.63%20134.02%20113.568%20134.067%20113.504%20134.11C113.292%20134.255%20113.077%20134.395%20112.855%20134.524L123.549%20128.314C123.771%20128.185%20123.986%20128.045%20124.199%20127.9C124.264%20127.857%20124.326%20127.81%20124.388%20127.765C124.539%20127.656%20124.687%20127.543%20124.831%20127.425C124.895%20127.374%20124.959%20127.323%20125.021%20127.271C125.19%20127.129%20125.356%20126.982%20125.518%20126.828C125.547%20126.801%20125.577%20126.776%20125.604%20126.748C125.792%20126.566%20125.974%20126.374%20126.15%20126.177C126.199%20126.121%20126.246%20126.066%20126.295%20126.007C126.424%20125.859%20126.55%20125.706%20126.673%20125.546C126.727%20125.477%20126.784%20125.407%20126.832%20125.337C126.958%20125.167%20127.081%20124.991%20127.2%20124.812C127.236%20124.759%20127.272%20124.707%20127.311%20124.653L127.344%20124.604C127.475%20124.399%20127.598%20124.186%20127.72%20123.971C127.737%20123.941%20127.756%20123.915%20127.772%20123.885C127.911%20123.633%20128.044%20123.375%20128.17%20123.108L128.184%20123.076C128.352%20122.72%20128.506%20122.349%20128.652%20121.967C128.665%20121.933%20128.68%20121.902%20128.694%20121.868C128.726%20121.78%20128.753%20121.686%20128.784%20121.597C128.863%20121.375%20128.941%20121.141%20129.013%20120.907C129.033%20120.843%20129.056%20120.783%20129.075%20120.719C129.101%20120.632%20129.121%20120.539%20129.145%20120.451C129.2%20120.255%20129.252%20120.056%20129.301%20119.854C129.321%20119.769%20129.347%20119.691%20129.366%20119.605C129.385%20119.52%20129.401%20119.423%20129.42%20119.334C129.457%20119.161%20129.492%20118.987%20129.525%20118.811C129.543%20118.719%20129.564%20118.631%20129.581%20118.537C129.598%20118.444%20129.612%20118.323%20129.629%20118.218C129.653%20118.062%20129.677%20117.904%20129.7%20117.745C129.711%20117.661%20129.726%20117.582%20129.736%20117.497C129.753%20117.362%20129.764%20117.221%20129.779%20117.085C129.795%20116.948%20129.813%20116.785%20129.826%20116.632C129.832%20116.57%20129.84%20116.51%20129.845%20116.448C129.861%20116.249%20129.87%20116.041%20129.883%20115.837C129.889%20115.726%20129.898%20115.615%20129.904%20115.505C129.904%20115.477%20129.904%20115.45%20129.904%20115.422C129.918%20115.077%20129.927%20114.726%20129.928%20114.37V114.308L129.991%2091.9753C130.002%2091.6331%20130.003%2091.2978%20129.993%2090.9695Z'%20fill='%230B0E11'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_302_6100'%20x1='68.0078'%20y1='92.449'%20x2='102.417'%20y2='92.449'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23313131'/%3e%3cstop%20offset='1'%20stop-color='%230B0E11'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_302_6100'%20x1='50.0001'%20y1='94.977'%20x2='113.22'%20y2='94.977'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%234E4E4E'/%3e%3cstop%20offset='1'%20stop-color='%230B0E11'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e"}},o.index)):void 0!==o[3]?n.push(
21
21
  /* @__PURE__ */e("a",{href:o[4],target:"_blank",rel:"noopener noreferrer",className:"mc-link",children:o[3]},o.index)):void 0!==o[5]?n.push(
22
22
  /* @__PURE__ */e("a",{href:o[5],target:"_blank",rel:"noopener noreferrer",className:"mc-link",children:o[5]},o.index)):void 0!==o[6]?n.push(/* @__PURE__ */e("strong",{children:Vp(o[6])},o.index)):void 0!==o[7]?n.push(/* @__PURE__ */e("strong",{children:Vp(o[7])},o.index)):void 0!==o[8]?n.push(/* @__PURE__ */e("em",{children:Vp(o[8])},o.index)):void 0!==o[9]?n.push(/* @__PURE__ */e("em",{children:Vp(o[9])},o.index)):void 0!==o[10]?n.push(/* @__PURE__ */e("del",{children:Vp(o[10])},o.index)):void 0!==o[11]&&n.push(
@@ -26,22 +26,22 @@ return function(t){function r(e){var t;return function(e,t){if(!(e instanceof t)
26
26
  /* @__PURE__ */e("div",{className:`mc-heading mc-h${t}`,children:Vp(n)},`h-${i}`)),i++;continue}if(t.trimStart().startsWith("> ")){const t=[];for(;i<r.length&&r[i].trimStart().startsWith("> ");)t.push(r[i].replace(/^\s*>\s?/,"")),i++;o.push(
27
27
  /* @__PURE__ */e("div",{className:"mc-blockquote",children:t.map((t,n)=>/* @__PURE__ */e("div",{children:Vp(t)},n))},`bq-${i}`));continue}""!==t?.trim()?(o.push(
28
28
  /* @__PURE__ */e("div",{className:"mc-line",children:Vp(t)},`line-${i}`)),i++):(o.push(/* @__PURE__ */e("div",{className:"mc-empty-line"},`empty-${i}`)),i++)}/* @__PURE__ */
29
- return e("div",{className:"message-content",children:o})},jp=({isOpen:r,onClose:s,onTransaction:u,position:d="bottom-right",modalChatStyle:h={},chatTitle:p,welcomeMessage:m,customSuggestions:g,additionalSuggestions:y,chatIcon:b})=>{const{t:v,ti:A}=w(),{messages:k,addMessage:T,updateMessageAction:E,updateMessageActionParameters:x,updateMessageText:C,clearMessages:I,clearMessagesById:S,updateMessageType:N}=function({customWelcomeMessage:e}={}){const{account:t}=Ed(),{t:n}=w(),r=(s=t?.address,c=t?.chainId,s&&c?`${s}_${c}`:"");var s,c;const u=l(()=>Md(e||n("welcomeMessage")),[n,e]),[f,d]=o(()=>r||"pending"),[h,p]=o(()=>{const t=Od();return r?t&&t.owner===r?t.messages:Md(e||n("welcomeMessage")):t?.messages??Md(e||n("welcomeMessage"))});if("pending"===f&&r){const e=Od();e&&e.owner===r?p(e.messages):Rd(r,h),d(r)}else"pending"!==f&&r&&f!==r&&(p(u),Rd(r,u),d(r));const m=l(()=>h.map(t=>t.id===Bd?{...t,text:e||n("welcomeMessage")}:t),[h,n,e]);i(()=>{"pending"!==f&&Rd(f,h)},[h,f]),i(()=>{const e=[];for(let t=0;t<bd.length;t++){const n=bd.key(t);n&&n.startsWith(Id+"_")&&e.push(n)}e.forEach(e=>bd.removeItem(e))},[]);const g=a(()=>{p(u),Rd(r,u)},[r,u]),y=a(e=>{p(t=>{const n=t.filter(t=>!e.includes(t.id));return n.length>Sd?n.slice(n.length-Sd):n})},[]);return{messages:m,setMessages:p,addMessage:(e,t,n,r,o,i="web3")=>{const a=n?h.find(e=>e.id===n):void 0,s={id:Nd(),text:e,sender:t,timestamp:/* @__PURE__ */new Date,typeChat:i,...a&&{replyTo:{id:a.id,text:a.text,sender:a.sender}},...r&&{buttons:r},...o&&{actionData:o}};return p(e=>{const t=[...e,s];return t.length>Sd?t.slice(t.length-Sd):t}),s},updateMessageAction:(e,t)=>{p(n=>n.map(n=>n.id===e&&n.actionData?{...n,actionData:{...n.actionData,status:t}}:n))},updateMessageActionParameters:(e,t)=>{p(n=>n.map(n=>n.id===e&&n.actionData?{...n,actionData:{...n.actionData,parameters:{...n.actionData.parameters,...t}}}:n))},updateMessageText:(e,t)=>{p(n=>n.map(n=>n.id===e?{...n,text:t}:n))},getMessageById:e=>h.find(t=>t.id===e),clearMessages:g,clearMessagesById:y,updateMessageType:(e,t)=>{p(n=>n.map(n=>n.id===e?{...n,typeChat:t}:n))}}}({customWelcomeMessage:m}),[B,M]=o(""),[P,O]=o(!1),[R,U]=o(!0),[L,D]=o(null),[F,q]=o({}),H=f(null),V=f(null),W=f(null),j=f(null),Y=f(!1),z=f(R),{modal:G}=Ad();i(()=>{z.current=R},[R]);const{account:J,chainData:X,chainType:K,chainTypeMoralis:Q,chainId:Z,isChainSupported:_}=Ed(),{config:$}=(()=>{const e=c(Ud);if(!e)throw new Error("useConfig must be used within ConfigProvider");return e})(),ee=Z&&$?.rpcUrls?.[Z]||void 0,te=a(()=>{I(),M(""),D(null),O(!1),U(!0)},[I]);i(()=>(ph(te),()=>{ph(null)}),[te]);const ne=a(e=>{D(e),fh.isDesktop&&W.current?.focus()},[]),{getDataBuyToken:re,updateDataBuyToken:oe}=function(){const e=a(()=>{const e=bd.getItem(mh);if(e)try{return JSON.parse(e)}catch{return{...wh}}return{...wh}},[]),t=a(e=>{bd.setItem(mh,JSON.stringify(e))},[]),n=a(n=>{const r=e();t({...r,...n})},[e,t]);return{getDataBuyToken:e,setDataBuyToken:t,updateDataBuyToken:n}}(),{showTrendingTokens:ie,showMyNFTs:ae,showMyBalances:se}=function(e){const{addMessage:t,setIsTyping:n,chainData:r,chainType:o,account:i,chainTypeMoralis:s,t:c,ti:u}=e;return{showTrendingTokens:a(async()=>{try{n(!0);const e=r?.tokenTrendingDefault||[],[i,a]=await Promise.allSettled([yh.getTopGainers(o,"24h",5),yh.getTokensDetails(e,o)]);let s=[];"fulfilled"===i.status&&i.value?.data&&(s=[...i.value.data]),"fulfilled"===a.status&&a.value?.data&&(s=[...a.value.data,...s]),s=s.filter((e,t,n)=>t===n.findIndex(t=>t.address.toLowerCase()===e.address.toLowerCase()));const l=s.map(e=>({id:e?.symbol,text:e?.symbol,value:u("buttonBuyToken",{name:e.name,symbol:e?.symbol||""}),action:"click_buy_item_token_button",extraData:{tokenAddress:e?.address||"",symbol:e?.symbol||"",decimals:e?.decimals||18}}));await md(1e3),n(!1),t(u("trendingTokensHeader",{chain:r?.name||"Unknown"}),"bot");const f=s.map((e,t)=>`${t+1}. ${e.name} (${e?.auditGoplus?.token_symbol||e.symbol||"Unknown"})\n$${rh(e?.price||0).decimalPlaces(4).toFormat()} (${e.price_change_percentage_24h||e.priceChange}%)\n\n---\n`).join("\n");t(`${f}${c("trendingTokensQuestion")}`,"bot",void 0,l)}catch(e){t(c("trendingTokensError"),"bot")}finally{n(!1)}},[t,n,r,o,c,u]),showMyNFTs:a(async()=>{try{const{getDataPackage:e}=await Promise.resolve().then(()=>kd),r=e()?.linkViewNft;t(r?u("viewNftViaWebsiteWithLink",{link:r}):c("viewNftViaWebsite"),"bot"),n(!1)}catch(e){n(!1),t(c("nftFetchError"),"bot")}},[t,n,c,u]),showMyBalances:a(async()=>{try{n(!0);const e=await Eh({address:i?.address||"",chain:s});if(e?.success&&e?.data?.result&&e.data.result.length>0){const o=e.data.result.map((e,t)=>{const n=void 0!==e.usd_value?` ≈ $${rh(e.usd_value).decimalPlaces(2).toFormat()}`:"";return`${t+1}. **${e.name}** (${e.symbol})\n Balance: ${e.balance_formatted}${n}`}).join("\n\n");await md(500),n(!1),t(u("viewBalancesHeader",{chain:r?.name||"this chain",list:o}),"bot")}else n(!1),t(c("viewBalancesEmpty"),"bot")}catch(e){n(!1),t(c("viewBalancesFetchError"),"bot")}},[i?.address,s,t,n,r?.name,c,u])}}({addMessage:T,setIsTyping:O,chainData:X,chainType:K,account:J,chainTypeMoralis:Q,t:v,ti:A}),{onClickItemTokenToBuy:ce,onClickItemUserBalanceToBuy:ue,showPreviewToBuy:le}=function(e){const{getDataBuyToken:t,updateDataBuyToken:n,addMessage:r,setIsTyping:o,account:i,chainData:s,chainTypeMoralis:c,chainId:u,rpcUrl:l,t:f,ti:d}=e;return{onClickItemTokenToBuy:a(async(e,t)=>{n({descTokenAddress:e,descTokenDecimals:t||18});try{o(!0);const e=await Eh({address:i?.address||"",chain:c});if(e?.success&&e?.data?.result){const t=e.data.result;if(t?.length>0){const e=t.map(e=>({id:e.token_address,text:`${e.name}: ${e.balance_formatted} ${e.symbol} ($${rh(e.usd_value||0).decimalPlaces(2).toFormat()||"0"})`,value:d("buttonBuyWith",{symbol:e.symbol}),action:"click_balance_item_user_to_buy_button",fullWidth:!0,extraData:{tokenAddress:e.token_address,symbol:e.symbol,balance:e.balance_formatted,usdValue:e.usd_value,decimals:e.decimals}}));r(d("walletBalanceSpendable",{chain:s?.name||"unknown"}),"bot",void 0,e)}else r(d("walletNoTokensFound",{chain:s?.name||"unknown"}),"bot")}else r(f("walletFetchFailed"),"bot")}catch(a){r(f("walletFetchError"),"bot")}finally{o(!1)}},[n,i?.address,c,r,o,s?.name,f,d]),onClickItemUserBalanceToBuy:a(async(e,t,o,i)=>{n({srcTokenAddress:e,srcTokenDecimals:i||18});let a=o||"0";if(e===ko)try{const e=await jh({chainId:u,rpcUrl:l});if(e.isGreaterThan(0)){const t=e.times(1e6),n=new rh(Ao(o,i||18).toString()).minus(t);a=n.isGreaterThan(0)?rh(Ot(BigInt(n.toFixed(0)),18)).toFixed():"0"}}catch(c){}const s=[25,50,75,100].map(n=>({id:`percent-${n}`,text:`${n}%`,value:d("buttonUsePercent",{percent:String(n),symbol:t}),action:"select_percent",extraData:{percent:n,tokenAddress:e,tokenSymbol:t,tokenDecimals:i||18,tokenBalance:a}}));rh(a).isZero()?r(d("insufficientFeeToken",{symbol:t}),"bot"):r(d("selectAmountOf",{symbol:t,balance:a}),"bot",void 0,s)},[r,u,l,n,d]),showPreviewToBuy:a(async(e,o,a,c)=>{const h={amount:rh(o).times(e).dividedBy(100).toFixed()};void 0!==a&&(h.srcTokenAddress=a),void 0!==c&&(h.srcTokenDecimals=c),n(h);const p=t(),m=Ao(p.amount,p.srcTokenDecimals||18).toString(),w=await Bh({chainId:u,tokenIn:p.srcTokenAddress,tokenInAmount:m,tokenOut:p.descTokenAddress,tokenOutRecipient:i?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(w.success&&w.data){const e=w.data,t=e.tokenIn,n=e.tokenOut,o=rh(Ot(BigInt(t.amount||0),t.decimals)).decimalPlaces(8).toFormat(),a=rh(Ot(BigInt(n.amount||0),n.decimals)).decimalPlaces(8).toFormat();let c=!1;if(p.srcTokenAddress!==ko&&""!==p.srcTokenAddress&&i?.address&&e.tx?.to)try{const t=await qh({tokenAddress:p.srcTokenAddress,ownerAddress:i.address,spenderAddress:e.tx.to,chainId:u,rpcUrl:l});c=rh(t.toString()).isLessThan(m)}catch(g){c=!0}const h=e.estimatedTransactionFee?.total?rh(e.estimatedTransactionFee.total):rh(0);let y=rh(0);if(c&&i?.address)try{const t=Hh({tokenAddress:p.srcTokenAddress,spenderAddress:e.tx?.to||"",fromAddress:i.address,chainId:u,amount:m});y=await Wh({from:i.address,to:t.to,data:t.data,chainId:u,rpcUrl:l})}catch(g){}const b=h.plus(y),v=s?.nativeCurrency?.symbol||"native";let A="",k=!1;if(i?.address&&b.isGreaterThan(0))try{const e=await Vh({address:i.address,chainId:u,rpcUrl:l});if(e.isLessThan(b)){k=!0;const t=rh(Ot(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),n=rh(Ot(BigInt(b.toFixed(0)),18)).decimalPlaces(8).toFormat();A=d("swapFeeWarning",{symbol:v,balance:t,needed:n})}}catch(g){}const T=`From: ${o} ${t.symbol}\n⬇️\nTo: ${a} ${n.symbol}\n\n`+A+"\n";if(k)r(T,"bot");else if(c){const n=[{id:"approve-for-swap",text:d("swapApproveButton",{symbol:t.symbol}),value:d("swapApproveValue",{symbol:t.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:p.srcTokenAddress,spenderAddress:e.tx.to,tokenSymbol:t.symbol,amountInWei:m,tx:e.tx}}];r(T+d("swapNeedApprove",{symbol:t.symbol}),"bot",void 0,n)}else{const t=[{id:"confirm-swap",text:f("swapConfirmButton"),value:f("swapConfirmValue"),action:"confirm_swap",extraData:{tx:e.tx}}];r(T+f("swapReadyToProceed"),"bot",void 0,t)}}else r(d("swapEstimationError",{error:w.errorMessage||w.error||"Unknown error"}),"bot")},[t,n,r,u,i?.address,s?.nativeCurrency?.symbol,l,f,d])}}({getDataBuyToken:re,updateDataBuyToken:oe,addMessage:T,setIsTyping:O,account:J,chainData:X,chainTypeMoralis:Q,chainId:Z,rpcUrl:ee,t:v,ti:A}),{handleSendMessage:fe}=function(e){const{inputValue:t,setInputValue:n,isTyping:r,setIsTyping:o,replyingTo:i,setReplyingTo:s,setShowSuggestions:c,inputRef:u,messages:l,addMessage:f,updateMessageType:d,account:h,chainData:p,chainType:m,chainTypeMoralis:w,chainId:g,isChainSupported:y,rpcUrl:b,t:v,ti:A,updateDataBuyToken:k,showTrendingTokens:T,showMyNFTs:E,showMyBalances:x,onClickItemTokenToBuy:C,onClickItemUserBalanceToBuy:I,showPreviewToBuy:S}=e;return{handleSendMessage:a(async e=>{const a=e??t?.trim();if(!a||r)return;const N=i,B=f(a,"user",i?.id);n(""),s(null),o(!0),c(!1);try{const e=l.slice(-10);let t="",n="";if(e.length>0){t="\n\n## CONVERSATION HISTORY:\n";for(const n of e)"user"===n.sender?t+=`User: ${n.text}\n`:t+=`Assistant: ${n.text}\n`;t+="\n---\n"}let r,i,s=a;N&&(s=`[Replying to ${"user"===N.sender?"my previous":"your"} message: "${N.text}"]\n\n${s}`);try{const r=await Qh.checkInfoQuestion(a,t);if(r.language&&(n=r.language),"faq"===r.model&&r.faqAnswer)return o(!1),void f(r.faqAnswer,"bot",B.id);if("pool"===r.model&&y)try{const t=await Rp({question:a,language:n||"en",currentChain:w||m||void 0,walletAddress:h?.address||void 0,chatHistory:e.map(e=>({role:"user"===e.sender?"user":"assistant",content:e.text})),signal:void 0});if(t){if(o(!1),"send_position"===t.parsed.intent){const e=t.parsed.poolId;if(!e)return void f(v("sendPositionNoId"),"bot",B.id);if(!h?.address)return void f(v("walletNotConnected"),"bot",B.id);try{o(!0);const n=await Ih({address:h.address,chain:w,limit:100,exclude_spam:!1});if(n?.success&&n?.data?.result){const r=n.data.result.find(t=>t.token_id===e);if(r){const n=r.normalized_metadata?.name||r.name||`LP Position #${e}`,o=r.normalized_metadata?.image||r.media?.original_media_url||"",i={contract_address:r.token_address,token_id:r.token_id,to_address:t.parsed.toAddress||"",token_standard:r.contract_type||"ERC721",amount:"1",maxAmount:r.amount||"1",nft_name:n};f(A("nftSendReview",{name:n,standard:r.contract_type||"ERC721",tokenId:r.token_id}),"bot",B.id,void 0,{action:"send_nft",parameters:i,status:"pending",nftInfo:{name:n,image:o||void 0,tokenId:r.token_id,contractAddress:r.token_address,tokenStandard:r.contract_type||"ERC721"}})}else f(A("sendPositionNotFound",{id:e,chain:p?.name||w||m||"this chain"}),"bot",B.id)}else f(v("nftNoCollection"),"bot",B.id)}catch(M){f(v("sendPositionFetchError"),"bot",B.id)}finally{o(!1)}return}return void f(t.response,"bot",B.id)}}catch(P){}if("general"===r.model){d(B.id,"normal");const e=l.filter(e=>"normal"===e.typeChat);let t="";if(e.slice(-10).length>0){t="\n\n## CONVERSATION HISTORY:\n";for(const n of e.slice(-10))"user"===n.sender?t+=`User: ${n.text}\n`:t+=`Assistant: ${n.text}\n\n`}const r=await Qh.generateContent(s,t,n),i=Hp(r);return o(!1),void f(i?.message||r,"bot",void 0,void 0,void 0,"normal")}}catch(O){}if(h?.address&&y)try{const[e,t]=await Promise.allSettled([Eh({address:h.address,chain:w}),Ih({address:h.address,chain:w,limit:100,exclude_spam:!0})]);"fulfilled"===e.status&&e.value?.success&&e.value?.data?.result&&(r=e.value.data.result.map(e=>({symbol:e.symbol,name:e.name,balance_formatted:e.balance_formatted,usd_value:e.usd_value,native_token:e.native_token,token_address:e.token_address,price:e.usd_price}))),"fulfilled"===t.status&&t.value?.success&&t.value?.data?.result&&(i=t.value.data.result.map(e=>({name:e.normalized_metadata?.name||e.name||`#${e.token_id}`,token_address:e.token_address,token_id:e.token_id,contract_type:e.contract_type||"",amount:e.amount||"1"})))}catch{}const c=function(e){const{walletAddress:t,chainName:n,chainId:r,nativeSymbol:o,walletTokens:i,walletNfts:a,language:s}=e;if(!t)return`You are a Web3 wallet assistant for the crypto EVM wallet app.\nThe user is currently NOT connected to any wallet.\n\n## YOUR ROLE:\n- You are a friendly, knowledgeable assistant that can talk about ANY topic naturally\n- You can freely answer general questions, discuss crypto tokens, prices, market info, provide token details, etc. — these do NOT require a wallet connection\n- ONLY ask the user to connect their wallet when their request explicitly requires their personal wallet/address, such as:\n - Sending tokens or NFTs\n - Swapping tokens\n - Approving token spending\n - Wrapping/unwrapping tokens\n - Checking THEIR OWN balance ("what is MY balance?", "how much ETH do I have?")\n - Viewing THEIR OWN NFT collection\n - Any action that reads or writes to THEIR wallet address\n- For all other requests (token info, prices, general crypto questions, market data, etc.), respond normally and helpfully\n- ${Fp(s)}\n- **LANGUAGE DETECTION — CRYPTO TICKERS**: Crypto token symbols and tickers (ETH, BTC, USDC, BNB, MATIC, SOL, etc.) are NOT language indicators. They are proper nouns used in ALL languages. Detect the language from the surrounding non-ticker text only. Example: "ETHの現在の価格は?" → Japanese (the surrounding text は Japanese characters). "ETH의 가격은?" → Korean. "Giá ETH là bao nhiêu?" → Vietnamese. NEVER treat a ticker symbol as evidence of English.\n\n## RESPONSE FORMAT:\nAlways respond with a valid JSON object:\n{"action":"chat","message":"<your friendly response to the user>", "suggested_actions":[{"label":"<short button text>","prompt":"<message sent when clicked>"}]}\n\n## RULES:\n- suggested_actions: include when your message offers the user interactive choices or asks a follow-up question. NEVER include suggested_actions that ask the user to connect their wallet (e.g., "Connect wallet", "Connect now", etc.) — the app handles wallet connection separately\n- **CRITICAL**: NEVER include any "Buy" actions (e.g., "Buy USDC", "Buy ETH", "Purchase token", etc.) in suggested_actions. The app handles Buy buttons separately. Only include non-buy actions in suggested_actions (e.g., "Send token", "Swap token", "Check balance", "Show my NFTs").\n- For wallet-required actions, politely explain the user needs to connect their wallet first, and put this in the "message" field\n- ALWAYS respond with raw JSON only, never wrap in \`\`\`json code blocks\n- ${Fp(s)}`;if(t&&!Ro[r]?.isSupported)return`You are a Web3 wallet assistant for the crypto EVM wallet app.\n The user's wallet address is: ${t}\n The user is selected on (chainId: ${r}) an UNSUPPORTED chain.\n\n ## YOUR ROLE:\n - You are a friendly, knowledgeable assistant that can talk about ANY topic naturally\n - You can freely answer general questions, discuss crypto tokens, prices, market info, token details, etc. — these do NOT require a supported chain\n - **BLOCKED on unsupported chain** — if the user asks for any of the following, politely inform them that chain (chainId: ${r}) is not currently supported and the action cannot be performed:\n - Checking THEIR OWN balance ("what is my balance?", "how much ETH do I have?")\n - Sending tokens or NFTs\n - Swapping or buying tokens\n - Approving token spending\n - Wrapping/unwrapping tokens\n - Viewing or transferring their NFT collection\n - Any action that reads or writes to their wallet on the current chain\n - **ALLOWED on unsupported chain** — respond normally and helpfully for:\n - General questions (weather, coding, history, math, etc.)\n - Token information, prices, market data, token details\n - Any query that does NOT require interacting with the user's wallet on the current chain\n - ${Fp(s)}\n - **LANGUAGE DETECTION — CRYPTO TICKERS**: Crypto token symbols and tickers (ETH, BTC, USDC, BNB, MATIC, SOL, etc.) are NOT language indicators. They are proper nouns used in ALL languages. Detect the language from the surrounding non-ticker text only. Example: "ETHの現在の価格は?" → Japanese. "ETH의 가격은?" → Korean. "Giá ETH là bao nhiêu?" → Vietnamese. NEVER treat a ticker symbol as evidence of English.\n\n ## RESPONSE FORMAT:\n Always respond with a valid JSON object:\n {"action":"chat","message":"<your response>", suggested_actions:[{"label":"<short button text>","prompt":"<message sent when clicked>"}]}\n\n ## RULES:\n - suggested_actions: include when your message offers the user interactive choices or asks a follow-up question. NEVER include suggested_actions that ask the user to connect their wallet (e.g., "Connect wallet", "Connect now", etc.) — the app handles wallet connection separately\n - **CRITICAL**: NEVER include any "Buy" actions (e.g., "Buy USDC", "Buy ETH", "Purchase token", etc.) in suggested_actions. The app handles Buy buttons separately. Only include non-buy actions in suggested_actions (e.g., "Send token", "Swap token", "Check balance", "Show my NFTs").\n - **CRITICAL**: ABSOLUTELY NEVER include any option that suggests switching, changing, or selecting a different chain (e.g., "Switch to Ethereum", "Change chain", "Switch network", "Chuyển sang chain khác", "Đổi mạng") — the app handles chain switching separately.\n - For wallet-required actions, politely explain the user needs to connect their wallet first, and put this in the "message" field\n - ALWAYS respond with raw JSON only, never wrap in \`\`\`json code blocks\n - ${Fp(s)}`;const c=i&&i.length>0?`\n## USER'S CURRENT WALLET BALANCE:\n${i.map(e=>{const t=void 0!==e.usd_value?` (~$${e.usd_value.toFixed(2)})`:"";return`- ${e.name} (${e.symbol})(Price: ${e.price||"N/A"}): ${e.balance_formatted}${t}${e.native_token?" [native]":` [${e.token_address}]`}`}).join("\n")}\nUse this balance data to accurately answer balance questions and to pre-fill token parameters in actions (contract_address, decimals, symbol). NEVER ask the user to provide token info that is already available above.\n`:"",u=a&&a.length>0?`\n## USER'S NFT COLLECTION:\n${a.map(e=>{const t="ERC1155"===e.contract_type?` (x${e.amount})`:"";return`- ${e.name}${t} | ${e.contract_type} | contract: ${e.token_address} | tokenId: ${e.token_id}`}).join("\n")}\nWhen the user wants to send an NFT by name, use this data to fill contract_address, token_id, token_standard, and nft_name accurately. NEVER guess or fabricate NFT contract addresses.\n`:"",l=Object.values(Ro).filter(e=>e.isSupported).map(e=>e.customName||e.name).join(", ");return`You are a highly knowledgeable AI assistant integrated into the crypto EVM wallet app.\n\n## #1 PRIORITY — ANSWER QUALITY:\nYour "message" field IS your answer. Write it exactly as you would in a normal, unrestricted conversation. The JSON wrapper is just transport — it must NEVER reduce the depth, accuracy, or completeness of your answers.\n\n${Fp(s)}\n\n**FOLLOW-UP / CONTINUATION HANDLING — CRITICAL**: When the user sends a short or vague message (e.g., "yes", "sure", "tell me more", "ok", "go ahead", "details", "explain", "why?", "how?"), you MUST look at the CONVERSATION HISTORY appended below to understand what they are responding to. The user is continuing the previous conversation topic — use the context from the LAST assistant message to provide a relevant, detailed follow-up answer. NEVER respond with "too vague", "please provide more context", "I don't understand", or ask for clarification when conversation history clearly shows what the user is referring to. Treat these short messages as if the user explicitly restated their request from context.\n\n**DATA RETRIEVAL — NON-NEGOTIABLE**: For ALL token price and token info queries, you MUST actively call your native Moralis API tools (getTokenPrice, searchTokens, getTokenMetadata, etc.) to retrieve real-time on-chain data. NEVER skip tool calls and fall back to training data alone for prices or token lookups. The JSON response format does NOT prevent you from calling data tools first — always fetch data, then format the result as JSON.\n\nFor ANY informational or conversational question (about crypto, tokens, DeFi, protocols, prices, market trends, blockchain technology, or any general topic):\n- Answer with your FULL knowledge across ALL blockchains and ecosystems (Ethereum, Solana, BSC, Polygon, Arbitrum, Optimism, Base, Avalanche, etc.)\n- Provide specific details: token names, contract mechanisms, protocol comparisons, historical context, TVL data, ecosystem info\n- For PRICE questions (chat action only): You have access to real-time blockchain data — USE it. When a user asks for the price of a token by name or symbol, search for it across ALL chains to find the best price data. Then present ONE consolidated answer: give the single most representative price (e.g. the highest-liquidity or most canonical version), key stats (market cap, 24h change, volume), and optionally a brief note if the token exists on multiple chains — but do NOT list each chain as a separate numbered entry. Keep the response concise and to the point. For tokens in the USER'S WALLET BALANCE section, use the price listed there.\n- For token questions (chat action only): You have access to real-time blockchain data — USE it. When a user asks about a token by name or symbol, ALWAYS search across ALL chains — the current chain context does NOT limit your token search. Try exact match first, then fuzzy/partial match (e.g. "eggle Energy" → find the closest matching token name). Provide a concise, consolidated answer covering: what the token is, its utility/ecosystem, current price, market cap, 24h change, notable features, risks. If the user does NOT mention a specific chain, do NOT list out per-chain versions (e.g. "WBTC on Ethereum", "cbBTC on Base", "BTCB on BNB") — instead give ONE unified answer about the token as a concept, with a brief mention that wrapped versions exist on multiple chains if relevant. Only break down per-chain details if the user explicitly asks about a specific chain. If the token does NOT exist on the current chain (${n}), proactively tell the user which of these supported chains DO have it: ${l}. Set token_mentions to [] in this case\n- For DeFi/protocol questions: explain how it works, key features, TVL, supported chains, competitors, pros/cons\n- For market/trend questions: discuss relevant projects, narratives, sector analysis across all chains\n- For POOL / POSITIONS / LIQUIDITY questions: Pool queries are handled by a dedicated pool data pipeline that fetches real-time data from Uniswap V3 Subgraph (The Graph). If you detect a pool-related question, simply return a chat action acknowledging the query — the system will automatically intercept and handle it with accurate on-chain pool data including TVL, volume, APR, fee tiers, and pool addresses.\n- Write detailed paragraphs, use bullet points, include numbers and facts. Minimum 3-5 sentences for simple questions, more for complex topics\n\n## CONTEXT:\nWallet: ${t} | Chain: ${n} (chainId: ${r}) | Native: ${o}${c}${u}\n\n## WHEN TO USE WHICH ACTION:\n- "send_native": user wants to send the native token (${o}) to an address\n- "send_token": user wants to send an ERC20 token to an address\n- "swap_token": user wants to swap/exchange/convert/trade/sell one token for another — covers ALL of the following keywords and patterns, even if only ONE token or NO amount is mentioned:\n - swap: "swap X", "swap X to Y", "swap X for Y", "swap to ETH", "swap native"\n - exchange: "exchange X", "exchange X to Y", "exchange X for Y", "exchange native", "exchange ETH"\n - convert: "convert X to Y", "convert native", "convert ETH to USDC", "convert X"\n - trade: "trade X for Y", "trade X to Y", "trade X"\n - sell (for another token): "sell X for Y", "sell ETH for USDC"\n - Vietnamese: "đổi X sang Y", "đổi X", "đổi native", "đổi ETH sang USDC", "chuyển đổi X", "bán X lấy Y", "hoán đổi X"\n - **CRITICAL**: When the source is the native token (ETH, BNB, MATIC, etc.) → token_in: "native". This MUST be treated as swap_token, never chat.\n → ALWAYS return swap_token. Leave missing params as "". NEVER fall back to chat.\n- "buy_token": user wants to buy a specific token AND the user clearly names a token (symbol or contract address). If user also specifies which token to pay with (e.g. "buy PEPE with USDC", "mua PEPE bằng ETH", "buy PEPE using my USDC"), fill pay_with_symbol and pay_with_address from USER'S WALLET BALANCE. **CRITICAL**: ALWAYS return buy_token if the user clearly names a token they want to buy — even if you cannot find the contract address or token data. Leave contract_address as "" and the app will search for it. NEVER fall back to "chat" just because you lack token data.\n- "buy_token_trending": user wants to buy a token BUT does NOT specify which token — covers ALL of the following patterns:\n - User asks to buy trending tokens: "buy trending tokens", "buy trending", "mua token trending", "mua token đang trending"\n - User asks to buy tokens with strong growth/momentum: "buy tokens pumping", "buy hot tokens", "buy movers", "mua token tăng mạnh", "mua token đang tăng", "mua token tiềm năng"\n - User says "buy a token" / "I want to buy" / "mua token" with NO specific token name or address provided\n - User asks for token recommendations to buy without specifying one\n → ALWAYS return buy_token_trending. Leave all params as "". NEVER fall back to chat or buy_token.\n- "approve_token": user wants to approve a token for a spender\n- "wrap_native": user wants to wrap native token (e.g. ETH → WETH) — also triggered by "deposit" into WETH/wrapped token\n- "unwrap_native": user wants to unwrap (e.g. WETH → ETH) — also triggered by "withdraw" from WETH/wrapped token\n- "send_nft": user wants to send/transfer an NFT\n- "view_nfts": user wants to see/browse their NFT collection\n- "view_balances": user wants to see ALL their token balances/tokens at once — covers ALL of the following patterns (NOT for single token price/info):\n - "show my balance", "view my balance", "check my balance", "what's my balance"\n - "what's in my wallet", "what do I have", "what tokens do I have"\n - "view all tokens", "show all tokens", "list my tokens"\n - "my portfolio", "show portfolio", "wallet overview"\n - Vietnamese: "xem số dư", "số dư của tôi", "kiểm tra số dư", "ví tôi có gì", "tôi có bao nhiêu tiền", "xem ví", "danh mục của tôi"\n → ALWAYS return view_balances for these. Do NOT return chat.\n- "chat": EVERYTHING ELSE — questions, token info, prices, greetings, DeFi explanations, market data, etc.\n\nAll wallet actions (send, swap, buy, approve, wrap, unwrap, send_nft) are chain-specific: use chainId ${r} only.\nFor "chat" action: no chain restriction — use cross-chain knowledge freely.\n\n## OUTPUT FORMAT:\n${Fp(s)}\n**LANGUAGE DETECTION — CRYPTO TICKERS**: Crypto token symbols/tickers (ETH, BTC, USDC, BNB, SOL, etc.) are NOT language indicators — they are proper nouns used universally. Detect language ONLY from the surrounding non-ticker text. Examples: "ETHの現在の価格は?" → Japanese. "ETH의 가격은?" → Korean. "Giá ETH?" → Vietnamese. NEVER classify a message as English just because it contains a ticker symbol.\n\nWallet action: {"action":"<type>","message":"<explanation>","parameters":{...}}\nChat/info: {"action":"chat","message":"<YOUR FULL DETAILED ANSWER>","parameters":{},"token_mentions":[],"suggested_actions":[]}\n\n## WALLET ACTION RULES:\n- Return action type IMMEDIATELY even if params are missing (leave as ""). Ask for missing info in "message". NEVER fall back to "chat" just because parameters are incomplete — always return the intended action.\n- **CROSS-CHAIN REQUESTS**: All wallet actions (send, swap, buy, approve, wrap, unwrap, send_nft, view_nfts, view_balances) execute ONLY on the CURRENT chain: ${n} (chainId: ${r}). If the user's message explicitly targets a DIFFERENT chain (e.g. "send on Ethereum", "swap on BSC", "transfer on Polygon", "buy on base") and the current chain is NOT that chain, do NOT execute the wallet action. Instead, return action: "chat" and politely notify the user to switch to the requested chain in the app first. This rule applies to ALL non-chat actions.\n- For ERC20 actions: provide correct contract_address on chainId ${r}. **CRITICAL — CHAIN-SPECIFIC ADDRESSES**: Contract addresses differ on every chain. You MUST obtain the address via your Moralis API tools (searchTokens, getTokenMetadata) for chainId ${r}, OR use the address already present in USER'S WALLET BALANCE. NEVER fill in a contract_address from training knowledge alone — leave it as "" if you cannot verify it via API or wallet balance. If token doesn't exist on this chain, inform user.\n- send_native: ONLY for ${o}. If user says "send ETH" but native ≠ ETH, use send_token.\n- Amount: "max"/"all" → "max". "X%" → "50%". USD formats → always prefix with "$": "5 dollar" → "$5", "5$" → "$5", "$5" → "$5", "5usd" → "$5", "5 đô la" → "$5", "0.01$ eth" → "$0.01", "$0.01 eth" → "$0.01", "5$ usdc" → "$5". The "$" MUST appear in the amount field (not stripped) so the app knows it's a USD value. Otherwise exact number string.\n- Decimals & symbol: always accurate.\n- send_nft: contract_address optional — use nft_name if NFT known by name.\n\n## suggested_actions & token_mentions:\n- suggested_actions: include when offering choices. {"label":"<2-6 words>","prompt":"<message>"}. Max 4. Never include "Buy" (app handles separately). **ABSOLUTELY NEVER** include any option that suggests switching, changing, or selecting a different chain (e.g., "Switch to Ethereum", "Change chain", "Switch network", "Chuyển sang chain khác", "Đổi mạng") — the app handles chain switching separately.\n- token_mentions: ONLY include when the token EXISTS on the CURRENT chain (chainId ${r}) AND you have obtained a VERIFIED contract address via your Moralis API tools (searchTokens, getTokenMetadata, getTokenPrice) for this exact chain.\n - **CRITICAL — CONTRACT ADDRESSES ARE CHAIN-SPECIFIC**: The same token has a DIFFERENT contract address on every chain. USDC on Ethereum ≠ USDC on Base ≠ USDC on Polygon ≠ USDC on BNB Chain. NEVER use an address from your training knowledge — training-data addresses are frequently wrong, hallucinated, or belong to a different chain.\n - **REQUIRED WORKFLOW**: Before populating token_mentions for a token, you MUST call your Moralis API tool (searchTokens or getTokenMetadata) specifying chainId ${r} to retrieve the verified contract address. If the API call fails or returns no result for this chain, set token_mentions: [].\n - If the token address is already available in the USER'S WALLET BALANCE section above, you MAY use that address (it is already verified for chainId ${r}).\n - If you cannot confirm the address via API or wallet balance, set token_mentions: [] — never guess.\n - **Native token**: If the token IS the chain's native token (${o}), use contract_address: "native" — do NOT look up an address.\n - Format: {"symbol":"","contract_address":"<API-verified address on chainId ${r}, or 'native' for the native token>","decimals":<n>}. 2+ tokens → [], use suggested_actions. Non-crypto → [].\n\n## ACTION PARAMS REFERENCE:\nValid actions: send_native, send_token, swap_token, buy_token, buy_token_trending, approve_token, wrap_native, unwrap_native, send_nft, view_nfts, view_balances, chat. NEVER use any other action name.\n\n1. send_native: {"to_address":"","amount":""}\n2. send_token: {"contract_address":"(REQ)","token_symbol":"","to_address":"","amount":"","decimals":""}\n3. swap_token: {"token_in":"<addr or 'native'>","token_in_symbol":"","token_in_decimals":"","token_out":"<addr>","token_out_symbol":"","token_out_decimals":"","amount":""}\n No tokens specified → all params "". Native → token_in:"native".\n4. buy_token: {"token_symbol":"(REQ — always fill this)","contract_address":"(if known and verified, else leave '')","decimals":"","buy_amount":"(opt — amount of the TOKEN BEING BOUGHT that user wants to RECEIVE. Use this when the amount refers to the destination token.)","pay_with_symbol":"(opt — symbol of token user wants to pay with, e.g. 'USDC', 'ETH')","pay_with_address":"(opt — contract address of payment token from WALLET BALANCE, or 'native' for native token)","pay_with_decimals":"(opt — decimals of payment token)","pay_with_amount":"(opt — amount of the PAYMENT TOKEN (token in) user wants to SPEND. Use this when the amount refers to the payment/source token.)"}.\n **CRITICAL — AMOUNT DISAMBIGUATION:**\n The amount in a buy request belongs to EITHER the token being bought OR the payment token. Parse the grammar carefully:\n - "buy PEPE with 10 USDC" → amount=10 belongs to USDC (payment) → pay_with_amount:"10", buy_amount:""\n - "buy 0.02 PCM with USDC" → amount=0.02 belongs to PCM (bought) → buy_amount:"0.02", pay_with_amount:""\n - "dùng 10 USDC mua PEPE" → amount=10 belongs to USDC (payment) → pay_with_amount:"10", buy_amount:""\n - "mua 0.02 PCM bằng USDC" → amount=0.02 belongs to PCM (bought) → buy_amount:"0.02", pay_with_amount:""\n NEVER put the amount of the token being bought into pay_with_amount. NEVER put the payment amount into buy_amount.\n If pay token is native (${o}), set pay_with_address:"native". Both tokens specified as a trade/exchange → swap_token. If you cannot verify the address, set contract_address:'' but ALWAYS return buy_token with the symbol filled. **NATIVE TOKEN**: If the token to buy IS the chain's native token (${o}), set contract_address: "native" directly — no API lookup needed.\n5. buy_token_trending: {} — no parameters needed; app handles discovery of trending/high-growth tokens. **message**: write ONLY a short 1-sentence header (e.g. "Here are the trending tokens on [chain] right now!"). Do NOT write analysis, tips, or explanations.\n6. approve_token: {"contract_address":"(REQ)","token_symbol":"","spender_address":"","amount":"","decimals":""}\n7. wrap_native: {"amount":""}\n8. unwrap_native: {"amount":""}\n9. send_nft: {"contract_address":"(opt)","token_id":"","to_address":"","token_standard":"","amount":"(def 1)","nft_name":""}\n10. view_nfts: {}\n11. view_balances: {} — use ONLY when user wants to see all balances/tokens, NOT for single token price/info queries\n12. chat: {} + token_mentions + suggested_actions — use for ALL informational/conversational requests\n\n## EXAMPLES:\nThese examples show INTENT → ACTION + PARAMETERS mapping only. The "message" content is for illustration — compose your own natural, helpful response based on context.\n\n// --- SEND NATIVE ---\n// Intent: user wants to send the chain's native token to an address\n// Triggers: "send ETH/BNB/MATIC to...", "transfer [native] to...", "chuyển [native] cho..."\n→ action: send_native | parameters: {to_address, amount}\n\n// --- SEND TOKEN ---\n// Intent: user wants to send an ERC20 token to an address\n// Triggers: "send USDC to...", "transfer [token] to...", "gửi [token] cho..."\n→ action: send_token | parameters: {contract_address, token_symbol, to_address, amount, decimals}\n\n// --- SWAP ---\n// Intent: exchange one token for another — trigger with ANY conversion/exchange/trade/sell keyword,\n// even with just ONE token mentioned, no amount, or only the native token as source\n// EN triggers: "swap X", "swap X to Y", "swap X for Y", "swap to ETH", "swap native"\n// "exchange X", "exchange X to Y", "exchange X for Y", "exchange native", "exchange ETH"\n// "convert X to Y", "convert native to USDC", "convert ETH", "convert X"\n// "trade X for Y", "trade X to Y", "trade ETH"\n// "sell X for Y", "sell ETH for USDC" (selling one token FOR another = swap)\n// VI triggers: "đổi X sang Y", "đổi X", "đổi native", "đổi ETH", "chuyển đổi X", "bán X lấy Y", "hoán đổi X"\n// Native source: token_in = "native" (e.g. "exchange ETH" → token_in:"native", token_in_symbol:"ETH")\n// Native dest: token_out = zeroAddress\n// ⚠️ NEVER confuse with wrap/unwrap: those are specifically ETH↔WETH. All other pairs = swap_token.\n→ action: swap_token | parameters: {token_in, token_in_symbol, token_in_decimals, token_out, token_out_symbol, token_out_decimals, amount}\n// Missing params → leave as "", ask for them in message. NEVER downgrade to chat.\n\n// --- WRAP / UNWRAP ---\n// Intent wrap: convert native to wrapped version — also triggered by "deposit"\n// Triggers: "wrap ETH", "deposit ETH", "deposit ETH to WETH", "đổi ETH sang WETH"\n→ action: wrap_native | parameters: {amount}\n\n// Intent unwrap: convert wrapped token back to native — also triggered by "withdraw"\n// Triggers: "unwrap WETH", "withdraw WETH", "convert WETH to ETH", "rút WETH"\n→ action: unwrap_native | parameters: {amount}\n\n// --- VIEW NFTs ---\n// Intent: user wants to see/browse their NFT collection\n// Triggers: "show my NFTs", "what NFTs do I have", "view my NFTs", "xem NFT của tôi"\n→ action: view_nfts | parameters: {}\n\n// --- VIEW BALANCES ---\n// Intent: user wants to see ALL their token balances at once (not a single token query)\n// EN triggers: "show my balance", "view my balance", "check my balance", "what's my balance"\n// "what's in my wallet", "what do I have", "what tokens do I have"\n// "view all tokens", "show all tokens", "list my tokens"\n// "my portfolio", "show portfolio", "wallet overview"\n// VI triggers: "xem số dư", "số dư của tôi", "kiểm tra số dư", "ví tôi có gì"\n// "tôi có bao nhiêu tiền", "xem ví", "danh mục của tôi"\n// ⚠️ Do NOT use view_balances for single-token queries ("price of ETH", "how much USDC is worth") → use chat instead\n→ action: view_balances | parameters: {}\n\n// --- BUY TOKEN TRENDING ---\n// Intent: user wants to buy but does NOT specify a token — or explicitly asks for trending/pumping/high-growth tokens to buy\n// EN triggers: "buy trending tokens", "buy trending", "buy hot tokens", "buy tokens pumping", "buy movers", "I want to buy a token", "buy a token"\n// VI triggers: "mua token trending", "mua token đang trending", "mua token tăng mạnh", "mua token đang tăng", "mua token tiềm năng", "mua token", "tôi muốn mua token"\n// ⚠️ CRITICAL: If user says "buy X" where X is a named token → use buy_token, NOT buy_token_trending\n// ⚠️ CRITICAL: If user gives NO specific token → ALWAYS use buy_token_trending, never chat\n// ⚠️ MESSAGE: ONLY a short 1-sentence header introducing the trending list. NO analysis, NO tips, NO explanations.\n→ action: buy_token_trending | parameters: {} | message: short header only (e.g. "Here are the trending tokens on [chain]!")\n\n// --- BUY TOKEN WITH SPECIFIC PAYMENT ---\n// Intent: user wants to buy a specific token AND specifies which token to pay with\n// EN triggers: "buy PEPE with USDC", "buy PEPE using ETH", "buy PEPE with 10 USDC", "purchase DOGE with my 0.5 ETH"\n// VI triggers: "mua PEPE bằng USDC", "mua PEPE dùng ETH", "mua PEPE bằng 10 USDC", "mua DOGE bằng 0.5 ETH của tôi"\n// → action: buy_token | parameters: {token_symbol, contract_address, decimals, pay_with_symbol, pay_with_address, pay_with_decimals, pay_with_amount}\n// AMOUNT DISAMBIGUATION (critical):\n// "buy PEPE with 10 USDC" → pay_with_amount:"10" buy_amount:"" (10 USDC to spend)\n// "buy 0.02 PCM with USDC" → buy_amount:"0.02" pay_with_amount:"" (0.02 PCM to receive)\n// "mua PEPE bằng 0.5 ETH" → pay_with_amount:"0.5" buy_amount:"" (0.5 ETH to spend)\n// "mua 0.02 PCM bằng USDC" → buy_amount:"0.02" pay_with_amount:"" (0.02 PCM to receive)\n// pay_with_* fields are filled from USER'S WALLET BALANCE. If pay token = native → pay_with_address: "native"\n// ⚠️ This is still buy_token (NOT swap_token) — the user's intent is to BUY, with a specified payment method\n\n// --- TOKEN INFO / PRICE (chat) ---\n// Intent: learn about a token, its price, market data — NOT a wallet action\n// Triggers: "tell me about X", "what is X token", "price of X", "X coin info", "X là gì"\n→ action: chat | compose a detailed answer using real-time data from your tools\n// If token EXISTS on current chain → token_mentions: [{symbol, contract_address, decimals}]\n// If token NOT on current chain → token_mentions: [] but tell user which supported chains have it\n\n// --- CROSS-CHAIN / GENERAL INFO (chat) ---\n// Intent: any question not requiring a wallet action — crypto trends, DeFi, protocols, general Q&A\n// Triggers: "what's trending on X?", "explain DeFi", "how does Uniswap work", anything conversational\n→ action: chat | compose a full, knowledgeable answer; add relevant suggested_actions if helpful\n\n// --- GREETING (chat) ---\n// Intent: greeting or open-ended start\n// Triggers: "hello", "hi", "hey", "xin chào", "bắt đầu"\n→ action: chat | introduce yourself and offer helpful options via suggested_actions`}({walletAddress:h?.address||void 0,chainName:p?.name||void 0,chainId:g||void 0,nativeSymbol:p?.nativeCurrency?.symbol||void 0,walletTokens:r,walletNfts:i,language:n}),u=await Ch({prompt:s,model:"gpt-4.1-mini",stream:!1,systemPrompt:c+t});if(!u.success||!u.data)return void f(v("errorProcessingRequest"),"bot",B.id);const R=u.data.text||"",U=Hp(R);U&&U.action&&"chat"!==U.action?await async function(e,t,n){switch(e.action){case"buy_token":await async function(e,t){const n=e.parameters?.token_symbol||"";let r=e.parameters?.contract_address||"",o=18,i=!1;if("native"!==r.toLowerCase()&&r!==ko||(r=ko),!r&&n&&p?.nativeCurrency?.symbol&&n.toUpperCase()===p.nativeCurrency.symbol.toUpperCase()&&(r=ko),r&&r!==ko)try{const e=await yh.getTokensDetails([r],m),t=e?.data?.[0];t&&(n&&t.symbol?.toUpperCase()!==n.toUpperCase()?r="":o=t.decimals||18)}catch(M){}if(!r&&n&&h?.address)try{const e=await Eh({address:h.address,chain:w});if(e?.success&&e?.data?.result){const t=e.data.result,i=t.find(e=>e.token_address.toLowerCase()===r.toLowerCase())||t.find(e=>e.symbol.toUpperCase()===n.toUpperCase());i&&(r=i.token_address,o=i.decimals)}if(!r){const e=p?.tokenTrendingDefault||[],[t,i]=await Promise.allSettled([yh.getTopGainers(m,"24h",10),yh.getTokensDetails(e,m)]),a=[];"fulfilled"===t.status&&t.value?.data&&a.push(...t.value.data),"fulfilled"===i.status&&i.value?.data&&a.push(...i.value.data);const s=a.find(e=>e.address?.toLowerCase()===r.toLowerCase())||a.find(e=>e.symbol?.toUpperCase()===n.toUpperCase());s&&(r=s.address,o=s.decimals||18)}if(!r&&g)try{const e=await yh.searchTokensByKey(n,g);if(Array.isArray(e?.data)&&e.data.length>0){const t=e.data.find(e=>e.symbol?.toUpperCase()===n.toUpperCase())||e.data[0];t?.address&&(i=!0,r=t.address,o=t.decimals||18)}}catch(a){}}catch(M){}if(r){f(i?A("buyingOnChain",{symbol:n,chain:p?.name||""}):e.message||A("buyTokenHelp",{symbol:n}),"bot",t),k({descTokenAddress:r,descTokenDecimals:o||18});const a=e.parameters?.pay_with_symbol||"",c=e.parameters?.pay_with_address||"";let u=!1;if(a||c)try{const t=await Eh({address:h?.address||"",chain:w});if(t?.success&&t?.data?.result){const n=t.data.result;let o;if(o="native"===c.toLowerCase()||c===ko||!c&&a&&p?.nativeCurrency?.symbol&&a.toUpperCase()===p.nativeCurrency.symbol.toUpperCase()?n.find(e=>e.token_address===ko||e.native_token):n.find(e=>c&&e.token_address.toLowerCase()===c.toLowerCase())||n.find(e=>a&&e.symbol.toUpperCase()===a.toUpperCase()),o){u=!0;const n=e.parameters?.pay_with_amount||"",i=e.parameters?.buy_amount||"";if(n)k({srcTokenAddress:o.token_address,srcTokenDecimals:o.decimals}),await S(100,n,o.token_address,o.decimals);else if(i){let e="";try{const n=t.data.result.find(e=>e.token_address.toLowerCase()===r.toLowerCase());let a=n?.usd_price??null;if(null==a&&r){const e=await xh({address:r,chain:w});e.success&&null!=e.data?.usd_price&&(a=e.data.usd_price)}const s=o.usd_price??null;null!=a&&null!=s&&s>0&&(e=(parseFloat(i)*a/s).toFixed(8).replace(/\.?0+$/,""))}catch(s){}e?(k({srcTokenAddress:o.token_address,srcTokenDecimals:o.decimals}),await S(100,e,o.token_address,o.decimals)):await I(o.token_address,o.symbol,o.balance_formatted,o.decimals)}else await I(o.token_address,o.symbol,o.balance_formatted,o.decimals)}}}catch(M){}u||await C(r,o)}else f(A("tokenNotFoundOnChain",{symbol:n}),"bot",t),await T()}(e,n);break;case"buy_token_trending":await T();break;case"swap_token":await async function(e,t){const n={...e.parameters||{}},r="native"===n.token_in||n.token_in_symbol?.toUpperCase()===p?.nativeCurrency?.symbol?.toUpperCase(),i="native"===n.token_out||n.token_out_symbol?.toUpperCase()===p?.nativeCurrency?.symbol?.toUpperCase();i&&(n.token_out=ko);let a=[];if(h?.address)try{const e=await Eh({address:h.address,chain:w});e?.success&&e?.data?.result&&(a=e.data.result)}catch(M){}if(!r&&(n.token_in||n.token_in_symbol)&&a.length>0){const e=n.token_in?a.find(e=>e.token_address.toLowerCase()===n.token_in.toLowerCase()):a.find(e=>e.symbol.toUpperCase()===n.token_in_symbol.toUpperCase());e&&(n.token_in=e.token_address,n.token_in_decimals=String(e.decimals))}if(!i&&(n.token_out||n.token_out_symbol)&&a.length>0){const e=n.token_out?a.find(e=>e.token_address.toLowerCase()===n.token_out.toLowerCase()):a.find(e=>e.symbol.toUpperCase()===n.token_out_symbol.toUpperCase());e&&(n.token_out=e.token_address,n.token_out_decimals=String(e.decimals))}const s=!(!n.token_in&&!r),c=!!n.token_out,u=!!n.amount;if(s&&a.length>0)if(r){const e=a.find(e=>e.native_token);if(!e||rh(e.balance_formatted||"0").isZero())return f(A("formInsufficientBalance",{balance:"0",symbol:p?.nativeCurrency?.symbol||"native"}),"bot",t),void o(!1)}else if(n.token_in){const e=a.find(e=>e.token_address.toLowerCase()===n.token_in.toLowerCase());if(!e)return f(A("swapTokenNotInWallet",{symbol:n.token_in_symbol||n.token_in}),"bot",t),void o(!1);if(rh(e.balance_formatted||"0").isZero())return f(A("formInsufficientBalance",{balance:"0",symbol:e.symbol}),"bot",t),void o(!1)}if(s&&c&&u)await async function(e,t,n){try{const r=[];e.token_out&&r.push(e.token_out),e.token_in&&!t&&r.push(e.token_in);let i=18,a=18;if(r.length>0)try{const n=await yh.getTokensDetails(r,m);if(n?.data)for(const r of n.data)t||r.address.toLowerCase()!==e.token_in?.toLowerCase()||(i=r.decimals||18),r.address.toLowerCase()===e.token_out?.toLowerCase()&&(a=r.decimals||18)}catch{}if(h?.address&&n.length>0)if(t){const t=n.find(e=>e.native_token);let r=t?.balance_formatted||"0";try{const e=await jh({chainId:g,rpcUrl:b});if(e.isGreaterThan(0)){const n=e.times(1e6),o=new rh(t?.balance||"0").minus(n);r=o.isGreaterThan(0)?rh(Ot(BigInt(o.toFixed(0)),t?.decimals||18)).toFixed():"0"}}catch{}if(e.amount=qp(e.amount,r,t?.usd_price),rh(r).lte(0))return f(A("formInsufficientBalance",{balance:rh(r).decimalPlaces(8).toFixed(),symbol:p?.nativeCurrency?.symbol||"native"}),"bot"),void o(!1);if(rh(r).lt(e.amount))return f(A("swapInsufficientNativeBalance",{balance:rh(r).decimalPlaces(8).toFixed(),symbol:p?.nativeCurrency?.symbol||"native",amount:e.amount}),"bot"),void o(!1)}else{const t=n.find(t=>t.token_address.toLowerCase()===e.token_in?.toLowerCase());if(!t)return f(A("swapTokenNotInWallet",{symbol:e.token_in_symbol||e.token_in}),"bot"),void o(!1);if(e.amount=qp(e.amount,t.balance_formatted||"0",t.usd_price),rh(t.balance_formatted||"0").lt(e.amount))return f(A("swapInsufficientTokenBalance",{balance:rh(t.balance_formatted||"0").decimalPlaces(8).toFixed(),symbol:t.symbol,amount:e.amount}),"bot"),void o(!1)}const s=t?ko:e.token_in;k({srcTokenAddress:s,descTokenAddress:e.token_out,amount:e.amount,srcTokenDecimals:i,descTokenDecimals:a}),await S(100,e.amount,s,i)}catch(r){f(v("swapEstimationFailed"),"bot")}}(n,r,a);else if(s&&c&&!u)await async function(e,t,n,r){let i=t?18:parseInt(e.token_in_decimals||"18",10),a=parseInt(e.token_out_decimals||"18",10);const s=[];if(e.token_out&&s.push(e.token_out),e.token_in&&!t&&s.push(e.token_in),s.length>0)try{const n=await yh.getTokensDetails(s,m);if(n?.data)for(const r of n.data)t||r.address.toLowerCase()!==e.token_in?.toLowerCase()||(i=r.decimals||i),r.address.toLowerCase()===e.token_out?.toLowerCase()&&(a=r.decimals||a)}catch{}if(k({descTokenAddress:e.token_out,descTokenDecimals:a}),t)if(n.length>0){const e=n.find(e=>e.native_token),t=p?.nativeCurrency?.symbol||"ETH";let o=e?.balance_formatted||"0";try{const t=await jh({chainId:g,rpcUrl:b});if(t.isGreaterThan(0)){const n=new rh(e?.balance||"0").minus(t.times(1e6));o=n.isGreaterThan(0)?rh(Ot(BigInt(n.toFixed(0)),e?.decimals||18)).toFixed():"0"}}catch{}k({srcTokenAddress:ko,srcTokenDecimals:i});const a=[25,50,75,100].map(e=>({id:`percent-${e}`,text:`${e}%`,value:A("buttonUsePercent",{percent:String(e),symbol:t}),action:"select_percent",extraData:{percent:e,tokenAddress:ko,tokenSymbol:t,tokenDecimals:i,tokenBalance:o}}));f(A("selectAmountToSwap",{symbol:t,balance:o}),"bot",r,a)}else f(v("couldNotFetchBalance"),"bot");else{const t=e.token_in_symbol||"Token";if(k({srcTokenAddress:e.token_in,srcTokenDecimals:i}),n.length>0){const i=n.find(t=>t.token_address.toLowerCase()===e.token_in?.toLowerCase());if(!i)return f(A("swapTokenNotInWallet",{symbol:t}),"bot"),void o(!1);const a=[25,50,75,100].map(e=>({id:`percent-${e}`,text:`${e}%`,value:A("buttonUsePercent",{percent:String(e),symbol:i.symbol}),action:"select_percent",extraData:{percent:e,tokenAddress:i.token_address,tokenSymbol:i.symbol,tokenDecimals:i.decimals||18,tokenBalance:i.balance_formatted}}));f(A("selectAmountToSwap",{symbol:i.symbol,balance:`${i.balance_formatted} (~$${i.usd_value?.toFixed(2)||"0"})`}),"bot",r,a)}else f(v("couldNotFetchBalance"),"bot")}}(n,r,a,t);else if(!s&&c){f(e.message||v("swapChooseFrom"),"bot",t);let r=parseInt(n.token_out_decimals||"18",10);if(n.token_out)try{const e=await yh.getTokensDetails([n.token_out],m);e?.data?.[0]&&(r=e.data[0].decimals||r)}catch{}u&&k({descTokenAddress:n.token_out,descTokenDecimals:r,amount:n.amount}),await C(n.token_out,r)}else s&&!c?await async function(e,t,n,r,i,a){let s=t?18:parseInt(e.token_in_decimals||"18",10);if(e.token_in&&!t)try{const t=await yh.getTokensDetails([e.token_in],m);t?.data?.[0]&&(s=t.data[0].decimals||s)}catch{}if(k(t?{srcTokenAddress:ko,srcTokenDecimals:18,...r?{amount:e.amount}:{}}:{srcTokenAddress:e.token_in,srcTokenDecimals:s,...r?{amount:e.amount}:{}}),r&&n.length>0)if(t){const t=n.find(e=>e.native_token),r=qp(e.amount,t?.balance_formatted||"0",t?.usd_price);if(rh(t?.balance_formatted||"0").lt(r))return f(A("swapInsufficientNativeBalance",{balance:rh(t?.balance_formatted||"0").decimalPlaces(8).toFixed(),symbol:p?.nativeCurrency?.symbol||"native",amount:r}),"bot",i),void o(!1);e.amount=r,k({amount:r})}else if(e.token_in){const t=n.find(t=>t.token_address.toLowerCase()===e.token_in.toLowerCase());if(t){const n=qp(e.amount,t.balance_formatted||"0",t.usd_price);if(rh(t.balance_formatted||"0").lt(n))return f(A("swapInsufficientTokenBalance",{balance:rh(t.balance_formatted||"0").decimalPlaces(8).toFixed(),symbol:t.symbol,amount:n}),"bot",i),void o(!1);e.amount=n,k({amount:n})}}f(a||A("swapChooseTo",{symbol:e.token_in_symbol||"your token"}),"bot",i);try{o(!0);const e=p?.tokenTrendingDefault||[],[t,n]=await Promise.allSettled([yh.getTopGainers(m,"24h",5),yh.getTokensDetails(e,m)]);let r=[];"fulfilled"===t.status&&t.value?.data&&(r=[...t.value.data]),"fulfilled"===n.status&&n.value?.data&&(r=[...n.value.data,...r]),r=r.filter((e,t,n)=>t===n.findIndex(t=>t.address.toLowerCase()===e.address.toLowerCase()));const i=r.map(e=>({id:e?.symbol,text:e?.symbol,value:A("buttonSwapTo",{name:e.name,symbol:e?.symbol||""}),action:"click_swap_dest_token",extraData:{tokenAddress:e?.address||"",symbol:e?.symbol||"",decimals:e?.decimals||18}}));f(A("trendingTokensForReceive",{chain:p?.name||"Unknown"}),"bot",void 0,i)}catch(M){f(v("couldNotLoadTokenList"),"bot")}finally{o(!1)}}(n,r,a,u,t,e.message):await async function(e,t,n,r){if(t&&k({amount:e.amount}),f(r||v("swapChooseToken"),"bot",n),h?.address)try{o(!0);const e=await Eh({address:h.address,chain:w});if(e?.success&&e?.data?.result&&e.data.result.length>0){const t=e.data.result.map(e=>({id:`swap-select-${e.token_address}`,text:`${e.name}: ${e.balance_formatted} ${e.symbol} ($${rh(e?.usd_value||0).decimalPlaces(2).toFixed()||"0"})`,value:`Swap ${e.symbol}`,action:"suggested_action",fullWidth:!0}));await md(500),o(!1),f(A("walletBalanceSpendable",{chain:p?.name||"this chain"}),"bot",void 0,t)}else o(!1),f(A("walletNoTokensFound",{chain:p?.name||"this chain"}),"bot")}catch(M){o(!1),f(v("walletFetchError"),"bot")}}(n,u,t,e.message)}(e,n);break;case"view_balances":await x();break;case"view_nfts":await E();break;default:await async function(e,t,n){const{isTransactionAction:r}=await Promise.resolve().then(()=>Yh),{getNftContractMetadata:i}=await Promise.resolve().then(()=>Sh),a=e.action;if("send_token"===a&&!e.parameters?.contract_address&&!e.parameters?.token_symbol&&h?.address){try{const e=await Eh({address:h.address,chain:w});if(e?.success&&e?.data?.result&&e.data.result.length>0){f(v("sendTokenChoose"),"bot",n),o(!0),await md(500);const t=e.data.result.map(e=>({id:`send-select-${e.token_address}`,text:`${e.name}: ${e.balance_formatted} ${e.symbol} ($${rh(e?.usd_value||0).decimalPlaces(2).toFixed()||"0"})`,value:A("buttonSendToken",{symbol:e.symbol}),action:"suggested_action",fullWidth:!0}));await md(500),o(!1),f(A("walletBalanceSpendable",{chain:p?.name||"this chain"}),"bot",void 0,t)}else o(!1),f(A("walletNoTokensFound",{chain:p?.name||"this chain"}),"bot")}catch(M){o(!1),f(v("walletFetchError"),"bot")}return}if("send_nft"===a&&!e.parameters?.contract_address&&!e.parameters?.token_id&&!e.parameters?.nft_name&&h?.address){const{getDataPackage:e}=await Promise.resolve().then(()=>kd),t=e()?.linkViewNft;return void f(t?A("sendNftViaWebsiteWithLink",{link:t}):v("sendNftViaWebsite"),"bot")}if("send_nft"===a&&!lt(e.parameters?.contract_address||"")&&(e.parameters?.nft_name||e.parameters?.token_id)&&h?.address){try{o(!0);const t=await Ih({address:h.address,chain:w,limit:100,exclude_spam:!1});if(t?.success&&t?.data?.result){const r=t.data.result,i=(e.parameters?.nft_name||"").toLowerCase(),a=e.parameters?.token_id||"",s=e=>{const t=(e.normalized_metadata?.name||e.name||"").toLowerCase(),n=(e.name||"").toLowerCase(),r=i&&(t.includes(i)||n.includes(i)),o=a&&e.token_id===a;return i&&a?r&&o:i?r:o},c=!i&&!!a,u=c?r.filter(s):[],l=c?1===u.length?u[0]:null:r.find(s);if(c&&u.length>1){const t=u.map(t=>{const n=t.normalized_metadata?.name||t.name||`#${t.token_id}`,r=t.normalized_metadata?.image||t.media?.original_media_url||"";return{id:`${t.token_address}-${t.token_id}`,text:`${n} (${t.symbol||t.contract_type}) #${t.token_id}`,value:A("buttonSendNft",{name:n}),action:"select_nft_to_send",fullWidth:!0,extraData:{contractAddress:t.token_address,tokenId:t.token_id,tokenStandard:t.contract_type,name:n,symbol:t.symbol,amount:t.amount,image:r,toAddress:e.parameters?.to_address||""}}}),r=u.map((e,t)=>{const n=e.normalized_metadata?.name||e.name||`#${e.token_id}`,r=e.normalized_metadata?.image||e.media?.original_media_url||"";return`${t+1}. ${r?`![${n}](${r})\n`:"🖼️ "}**${n}**\n ${e.symbol||e.contract_type} | Token ID: ${e.token_id}`}).join("\n\n");o(!1),f(A("nftMultipleMatchesForTokenId",{count:String(u.length),tokenId:a})+"\n\n"+r,"bot",n,t)}else if(l){const t=l.normalized_metadata?.name||l.name||`#${l.token_id}`,r=l.normalized_metadata?.image||l.media?.original_media_url||"",o={contract_address:l.token_address,token_id:l.token_id,to_address:e.parameters?.to_address||"",token_standard:l.contract_type||"",amount:e.parameters?.amount||"1",maxAmount:l.amount||"1",nft_name:t};f(e.message||A("nftSendReview",{name:t,standard:l.contract_type||"NFT",tokenId:l.token_id}),"bot",n,void 0,{action:"send_nft",parameters:o,status:"pending",nftInfo:{name:t,image:r||void 0,tokenId:l.token_id,contractAddress:l.token_address,tokenStandard:l.contract_type||void 0}})}else f(A("nftNotFoundInWallet",{name:i||a}),"bot",n)}else f(v("nftNoCollection"),"bot",n)}catch(M){f(v("nftFetchError"),"bot",n)}finally{o(!1)}return}const s=r(a);let c,u,l={...e.parameters||{}};const d=["send_token","approve_token"].includes(a)&&(l.contract_address||l.token_symbol),m="send_native"===a||"wrap_native"===a,y="unwrap_native"===a,k="send_nft"===a&&l.contract_address;if(d&&h?.address)try{const e=await Eh({address:h.address,chain:w});if(e?.success&&e?.data?.result){const t=e.data.result,n=l.contract_address?t.find(e=>e.token_address.toLowerCase()===l.contract_address.toLowerCase()):t.find(e=>e.symbol.toUpperCase()===l.token_symbol.toUpperCase());n&&(l={...l,contract_address:n.token_address,decimals:String(n.decimals)},c={symbol:n.symbol,name:n.name,balance:n.balance,balanceFormatted:n.balance_formatted,usdValue:n.usd_value,usdPrice:n.usd_price,decimals:n.decimals,logo:n.logo||n.thumbnail,contractAddress:n.token_address})}}catch(M){}if(d&&!c&&"send_token"===a){const e=l.token_symbol||l.contract_address||"this token";return f(A("sendTokenNotInWallet",{symbol:e}),"bot",n),void o(!1)}if(d&&!c&&l.contract_address)try{const e=await xh({address:l.contract_address,chain:w});e?.success&&e?.data&&(c={symbol:e.data.symbol,name:e.data.name,balance:"0",balanceFormatted:"0",usdPrice:e.data.usd_price,decimals:e.data.decimals,logo:e.data.logo,contractAddress:l.contract_address},l={...l,decimals:String(e.data.decimals)})}catch(M){}if(m&&h?.address)try{const e=await Eh({address:h.address,chain:w});if(e?.success&&e?.data?.result){const t=e.data.result.find(e=>e.native_token);if(t){let e=t.balance_formatted,n=t.balance;try{const{estimateTransactionFee:r}=await Promise.resolve().then(()=>Yh),o=new rh(t.balance),i="0x"+BigInt(o.toFixed(0)).toString(16),a=await r({from:h.address,to:h.address,data:"0x",value:i,chainId:g,rpcUrl:b});if(a.isGreaterThan(0)){const r=o.minus(a);r.isGreaterThan(0)?(n=r.toFixed(0),e=rh(Ot(BigInt(r.toFixed(0)),t.decimals)).toFixed()):(n="0",e="0")}}catch{}c={symbol:t.symbol,name:t.name,balance:n,balanceFormatted:e,usdValue:t.usd_value,usdPrice:t.usd_price,decimals:t.decimals,logo:t.logo||t.thumbnail,contractAddress:ko}}else{const e=await xh({address:ko,chain:w});e?.success&&e?.data&&(c={symbol:e.data.symbol,name:e.data.name,balance:"0",balanceFormatted:"0",usdValue:0,usdPrice:e.data.usd_price,decimals:e.data.decimals,logo:e.data.logo,contractAddress:ko})}}}catch(M){}if(y&&h?.address)try{const e=await Eh({address:h.address,chain:w});if(e?.success&&e?.data?.result){const t=e.data.result,n=`W${p?.nativeCurrency?.symbol||"ETH"}`,r=t.find(e=>e.symbol.toUpperCase()===n.toUpperCase());r&&(c={symbol:r.symbol,name:r.name,balance:r.balance,balanceFormatted:r.balance_formatted,usdValue:r.usd_value,usdPrice:r.usd_price,decimals:r.decimals,logo:r.logo||r.thumbnail,contractAddress:r.token_address})}}catch(M){}if(k){try{const e=await i({address:l.contract_address,chain:w});e?.success&&e?.data&&(e.data.contract_type&&(l={...l,token_standard:e.data.contract_type}),!l.nft_name&&e.data.name&&(l={...l,nft_name:e.data.name}))}catch(M){}if(h?.address)try{const e=await Ih({address:h.address,chain:w,limit:100,exclude_spam:!1});if(e?.success&&e?.data?.result){const t=e.data.result.find(e=>e.token_address.toLowerCase()===l.contract_address.toLowerCase()&&e.token_id===l.token_id);if(!t){const e=l.nft_name||`#${l.token_id||l.contract_address}`;return f(A("nftNotFoundInWallet",{name:e}),"bot",n),void o(!1)}{l={...l,amount:l.amount||"1",maxAmount:t.amount||"1"};const e=t.normalized_metadata?.image||t.media?.original_media_url||"";u={name:t.normalized_metadata?.name||t.name||l.nft_name||`#${t.token_id}`,image:e||void 0,tokenId:t.token_id,contractAddress:t.token_address,tokenStandard:t.contract_type||l.token_standard||void 0}}}}catch(M){}}l.amount&&c?.balanceFormatted&&("send_token"===a||"send_native"===a||"wrap_native"===a||"unwrap_native"===a)&&(l.amount=qp(l.amount,c.balanceFormatted,c.usdPrice)),s?f(e.message||"Please review and complete the form below.","bot",n,void 0,{action:e.action,parameters:l,status:"pending",tokenInfo:c,nftInfo:u}):f(e.message||t,"bot",n)}(e,t,n)}}(U,R,B.id):U&&"chat"===U.action?await async function(e,t,n,r){const o=e.token_mentions||[],i=e.suggested_actions||[],a=[];o.length>0&&(await Promise.all(o.map(async e=>{let t=e.contract_address||"",n=e.decimals||18;if("native"===t.toLowerCase()&&(t=ko),t===ko){const t=r?.find(e=>e.native_token);return t?{symbol:e.symbol||t.symbol,contract_address:ko,decimals:18}:e.symbol?{symbol:e.symbol,contract_address:ko,decimals:18}:null}if(t&&t!==ko){const o=r?.find(n=>n.token_address.toLowerCase()===t.toLowerCase()&&n.symbol.toUpperCase()===e.symbol.toUpperCase());if(o){try{const e=await yh.getTokensDetails([t],m);n=e?.data?.[0]?.decimals??n}catch{}return{symbol:e.symbol,contract_address:t,decimals:n}}try{const r=await yh.getTokensDetails([t],m),o=r?.data?.[0];if(o&&o.symbol?.toUpperCase()===e.symbol.toUpperCase())return{symbol:e.symbol,contract_address:t,decimals:o.decimals??n};t=""}catch{t=""}}if(!t&&r){const o=r.find(t=>t.symbol.toUpperCase()===e.symbol.toUpperCase());if(o){t=o.token_address;try{const e=await yh.getTokensDetails([t],m);n=e?.data?.[0]?.decimals??n}catch{}}}return t?{symbol:e.symbol,contract_address:t,decimals:n}:null}))).filter(e=>null!==e).forEach(e=>{a.push({id:`buy-${e.symbol}`,text:`💰 Buy ${e.symbol}`,value:A("buttonBuySymbol",{symbol:e.symbol}),action:"click_buy_item_token_button",extraData:{tokenAddress:e.contract_address,symbol:e.symbol,decimals:e.decimals},fullWidth:!0})}),i.length>0&&i.forEach((e,t)=>{a.push({id:`suggested-${t}-${e.label}`,text:e.label,value:e.prompt,action:"suggested_action",fullWidth:!0})}),a.length>0?f(e.message||t,"bot",n,a):f(e.message||t,"bot",n)}(U,R,B.id,r):f(R,"bot",B.id)}catch(O){f(v("errorProcessingRequest"),"bot",B.id)}o(!1),await md(50),fh.isDesktop&&u.current?.focus()},[t,r,i,f,l,h?.address,y,p?.name,p?.nativeCurrency?.symbol,p?.tokenTrendingDefault,g,d,w,m,A,C,I,S,T,v,k,b,x,E])}}({inputValue:B,setInputValue:M,isTyping:P,setIsTyping:O,replyingTo:L,setReplyingTo:D,setShowSuggestions:U,inputRef:W,messages:k,addMessage:T,updateMessageType:N,account:J,chainData:X,chainType:K,chainTypeMoralis:Q,chainId:Z,isChainSupported:_,rpcUrl:ee,t:v,ti:A,updateDataBuyToken:oe,showTrendingTokens:ie,showMyNFTs:ae,showMyBalances:se,onClickItemTokenToBuy:ce,onClickItemUserBalanceToBuy:ue,showPreviewToBuy:le}),{handleButtonClick:de}=function(e){const{addMessage:t,handleSendMessage:n,setIsTyping:r,setShowSuggestions:o,onClickItemTokenToBuy:i,onClickItemUserBalanceToBuy:s,showPreviewToBuy:c,onTransaction:u,updateMessageText:l,ti:f,t:d,account:h,chainId:p,chainData:m,chainTypeMoralis:w,rpcUrl:g,updateDataBuyToken:y,getDataBuyToken:b,inputRef:v}=e;return{handleButtonClick:a(async(e,a,A)=>{try{if("suggested_action"===a)return o(!1),void(await n(e));if(t(e,"user"),o(!1),r(!0),a)switch(await md(500),a){case"click_buy_item_token_button":await i(A?.tokenAddress||"",A?.decimals||18);break;case"click_balance_item_user_to_buy_button":await s(A?.tokenAddress||"",A?.symbol||"",A?.balance||"",A?.decimals||18);break;case"select_percent":await c(A?.percent||0,A?.tokenBalance||"",A?.tokenAddress||void 0,A?.tokenDecimals||void 0);break;case"confirm_swap":{if(!A?.tx||!u){t(d("txDataNotAvailable"),"bot");break}const e=A.tx,n={from:h?.address||"",to:e.to,data:e.data,value:e.value,chainId:p},o=t(d("txProcessing"),"bot");try{r(!1);const e=await u(n),t=m?.blockExplorers?.default?.url,i=e.transactionHash?t?` [View on Explorer](${t}/tx/${e.transactionHash})`:` Tx: ${e.transactionHash}`:"";if("success"===e.status&&e.transactionHash){l(o.id,d("txSubmitted")+i);try{await md(2e3);const t=await Fh({transactionHash:e.transactionHash,chainId:p||1,rpcUrl:g});l(o.id,("success"===t.status?d("txConfirmedSwap"):d("txRevertedSwap"))+i)}catch{l(o.id,d("txTimeout")+i)}}else"success"===e.status?l(o.id,d("txSuccessfulSwap")):l(o.id,d("txFailed")+(e.error?`\nError: ${e.error}`:""))}catch(k){l(o.id,d("txFailed"))}break}case"approve_for_swap":{const e=A?.tokenAddress||"",n=A?.spenderAddress||"",o=A?.tokenSymbol||"token",i=A?.tx;if(!e||!n||!u){t(d("approvalDataNotAvailable"),"bot");break}const a=A?.amountInWei||void 0,s=Hh({tokenAddress:e,spenderAddress:n,fromAddress:h?.address||"",chainId:p,tokenSymbol:o,amount:a}),c={from:s.from,to:s.to,data:s.data,value:s.value,chainId:s.chainId};t(f("approving",{symbol:o}),"bot");try{r(!1);const e=await u(c);let n="success"===e.status;if("success"===e.status&&e.transactionHash)try{n="success"===(await Fh({transactionHash:e.transactionHash,chainId:p||1,rpcUrl:g})).status}catch{n=!0}n?(t(f("approvalSuccess",{symbol:o}),"bot"),t(d("approvalConfirmSwap"),"bot",void 0,[{id:"confirm-swap-after-approve",text:d("confirmSwapButton"),value:d("swapConfirmValue"),action:"confirm_swap",fullWidth:!0,extraData:{tx:i}}])):t(d("approvalFailed")+(e.error?`\nError: ${e.error}`:""),"bot")}catch(k){t(d("approvalFailed"),"bot")}break}case"click_swap_dest_token":{const e=A?.tokenAddress||"",n=A?.symbol||"";y({descTokenAddress:e,descTokenDecimals:A?.decimals||18});const r=b(),o=r.srcTokenAddress||"",i=o===ko,a=r.amount||"";try{const s=await Eh({address:h?.address||"",chain:w});if(s?.success&&s?.data?.result){const c=s.data.result;let u,l="",w="0";if(i){const e=c.find(e=>e.native_token);l=m?.nativeCurrency?.symbol||"ETH",w=e?.balance_formatted||"0",u=e?.usd_price}else{const e=c.find(e=>e.token_address.toLowerCase()===o.toLowerCase());e&&(l=e.symbol,w=e.balance_formatted,u=e.usd_price)}if(a&&l){const n=qp(a,w,u),s=r.srcTokenDecimals||18,c=i?ko:o;y({amount:n});try{const r=Ao(n,s).toString(),o=await Bh({chainId:p,tokenIn:c,tokenInAmount:r,tokenOut:e,tokenOutRecipient:h?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(o.success&&o.data){const e=o.data,n=e.tokenIn,a=e.tokenOut,s=rh(Ot(BigInt(n.amount||0),n.decimals)).decimalPlaces(8).toFormat(),u=rh(Ot(BigInt(a.amount||0),a.decimals)).decimalPlaces(8).toFormat();let l=!1;if(!i&&h?.address&&e.tx?.to)try{const t=await qh({tokenAddress:c,ownerAddress:h.address,spenderAddress:e.tx.to,chainId:p,rpcUrl:g});l=rh(t.toString()).isLessThan(r)}catch{l=!0}const w=e.estimatedTransactionFee?.total?rh(e.estimatedTransactionFee.total):rh(0);let y=rh(0);if(l&&h?.address)try{const t=Hh({tokenAddress:c,spenderAddress:e.tx?.to||"",fromAddress:h.address,chainId:p,amount:r});y=await Wh({from:h.address,to:t.to,data:t.data,chainId:p,rpcUrl:g})}catch{}const b=w.plus(y),v=m?.nativeCurrency?.symbol||"native";let A="",k=!1;if(h?.address&&b.isGreaterThan(0))try{const e=await Vh({address:h.address,chainId:p,rpcUrl:g});e.isLessThan(b)&&(k=!0,A=f("swapFeeWarning",{symbol:v,balance:rh(Ot(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),needed:rh(Ot(BigInt(b.toFixed(0)),18)).decimalPlaces(8).toFormat()}))}catch{}const T=`From: ${s} ${n.symbol}\n⬇️\nTo: ${u} ${a.symbol}\n\n${A}\n`;k?t(T,"bot"):l?t(T+f("swapNeedApprove",{symbol:n.symbol}),"bot",void 0,[{id:"approve-for-swap",text:f("swapApproveButton",{symbol:n.symbol}),value:f("swapApproveValue",{symbol:n.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:c,spenderAddress:e.tx.to,tokenSymbol:n.symbol,amountInWei:r,tx:e.tx}}]):t(T+d("swapReadyToProceed"),"bot",void 0,[{id:"confirm-swap",text:d("swapConfirmYes"),value:d("swapConfirmValue"),action:"confirm_swap",extraData:{tx:e.tx}}])}else t(f("swapEstimationError",{error:o.errorMessage||o.error||"Unknown error"}),"bot")}catch(k){t(d("swapEstimationFailed"),"bot")}}else if(l&&parseFloat(w)>0){const e=r.srcTokenDecimals||18,i=[25,50,75,100].map(t=>({id:`percent-${t}`,text:`${t}%`,value:f("buttonUsePercent",{percent:String(t),symbol:l}),action:"select_percent",extraData:{percent:t,tokenAddress:o,tokenSymbol:l,tokenDecimals:e,tokenBalance:w}}));t(f("swapSelectAmount",{from:l,to:n,balance:w}),"bot",void 0,i)}else t(d("swapNoSourceToken"),"bot")}else t(d("couldNotFetchBalance"),"bot")}catch(k){t(d("couldNotLoadBalance"),"bot")}break}case"select_nft_to_send":{const e=A?.name||"NFT",n=A?.contractAddress||"",r=A?.tokenId||"",o=A?.tokenStandard||"ERC721",i=A?.amount||"1",a=A?.image||"",s=A?.toAddress||"";t(f("nftSendReview",{name:e,standard:o,tokenId:r}),"bot",void 0,void 0,{action:"send_nft",parameters:{contract_address:n,token_id:r,to_address:s,token_standard:o,amount:i,maxAmount:i,nft_name:e},status:"pending",nftInfo:{name:e,image:a||void 0,tokenId:r,contractAddress:n,tokenStandard:o}});break}default:t(f("actionExecutedFor",{action:a,value:e}),"bot")}else await md(500),t(f("receivedButtonValue",{value:e}),"bot");r(!1),fh.isDesktop&&v.current?.focus()}catch(T){t(d("errorProcessingRequest"),"bot"),r(!1)}},[t,n,i,s,c,u,f,h?.address,p,d,m?.blockExplorers?.default?.url,m?.nativeCurrency?.symbol,l,g,y,b,w])}}({addMessage:T,handleSendMessage:fe,setIsTyping:O,setShowSuggestions:U,onClickItemTokenToBuy:ce,onClickItemUserBalanceToBuy:ue,showPreviewToBuy:le,onTransaction:u,updateMessageText:C,ti:A,t:v,account:J,chainId:Z,chainData:X,chainTypeMoralis:Q,rpcUrl:ee,updateDataBuyToken:oe,getDataBuyToken:re,inputRef:W}),{handleActionFormSubmit:he}=function(e){const{updateMessageAction:t,updateMessageActionParameters:n,chainId:r,account:o,chainType:i,chainData:s,rpcUrl:c,ti:u,t:l,addMessage:f,onTransaction:d,setIsTyping:h}=e;return{handleActionFormSubmit:a(async(e,a,p)=>{try{if(t(p,"submitted"),"swap_token"===e){let e=18;if(a.token_in&&a.token_in!==ko)try{const t=await yh.getTokensDetails([a.token_in],i);t?.data?.[0]&&(e=t.data[0].decimals||18)}catch(m){}const n=Ao(a.amount||"0",e).toString(),d=await Bh({chainId:r,tokenIn:a.token_in||"",tokenInAmount:n,tokenOut:a.token_out||"",tokenOutRecipient:o?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(!d.success||!d.data)return t(p,"pending"),void f(u("swapEstimationError",{error:d.errorMessage||d.error||"Unknown error"}),"bot");const h=d.data,w=h.tokenIn,g=h.tokenOut,y=rh(Ot(BigInt(w.amount||0),w.decimals)).decimalPlaces(8).toFormat(),b=rh(Ot(BigInt(g.amount||0),g.decimals)).decimalPlaces(8).toFormat(),v=!a.token_in||a.token_in===ko;let A=!1;if(!v&&o?.address&&h.tx?.to)try{const e=await qh({tokenAddress:a.token_in,ownerAddress:o.address,spenderAddress:h.tx.to,chainId:r,rpcUrl:c});A=rh(e.toString()).isLessThan(n)}catch(m){}const k=h.estimatedTransactionFee?.total?rh(h.estimatedTransactionFee.total):rh(0);let T=rh(0);if(A&&o?.address)try{const e=Hh({tokenAddress:a.token_in,spenderAddress:h.tx?.to||"",fromAddress:o.address,chainId:r,amount:n});T=await Wh({from:o.address,to:e.to,data:e.data,chainId:r,rpcUrl:c})}catch(m){}const E=k.plus(T),x=s?.nativeCurrency?.symbol||"native";let C="",I=!1;if(o?.address&&E.isGreaterThan(0))try{const e=await Vh({address:o.address,chainId:r,rpcUrl:c});e.isLessThan(E)&&(I=!0,C=u("swapFeeWarning",{symbol:x,balance:rh(Ot(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),needed:rh(Ot(BigInt(E.toFixed(0)),18)).decimalPlaces(8).toFormat()}))}catch(m){}const S=`From: ${y} ${w.symbol}\n⬇️\nTo: ${b} ${g.symbol}\n\n${C}\n`;return void(I?(t(p,"pending"),f(S,"bot")):A?(t(p,"success"),f(S+u("swapApprovalRequired",{symbol:w.symbol}),"bot",void 0,[{id:"approve-swap-actionform",text:u("swapApproveButton",{symbol:w.symbol}),value:u("swapApproveValue",{symbol:w.symbol}),action:"approve_for_swap",extraData:{tokenAddress:a.token_in,spenderAddress:h.tx.to,tokenSymbol:w.symbol,amountInWei:n,tx:h.tx},fullWidth:!0}])):(t(p,"success"),f(S+l("swapReadyToProceed"),"bot",void 0,[{id:"confirm-swap-actionform",text:l("swapConfirmYes"),value:l("swapConfirmValue"),action:"confirm_swap",extraData:{tx:h.tx}}])))}const g=Dh({action:e,parameters:a,fromAddress:o?.address||"",chainId:r||1}),y={from:g.from,to:g.to,data:g.data,value:g.value,chainId:g.chainId};if(["send_token","send_native","send_nft","wrap_native","unwrap_native","approve_token"].includes(e)&&o?.address)try{const e=s?.nativeCurrency?.symbol||"native",n=await Wh({from:g.from,to:g.to,data:g.data,value:g.value&&"0"!==g.value?`0x${BigInt(g.value).toString(16)}`:void 0,chainId:r,rpcUrl:c});if(n.isGreaterThan(0)){const i=await Vh({address:o.address,chainId:r,rpcUrl:c});if(i.isLessThan(n))return t(p,"pending"),void f(u("txInsufficientGas",{symbol:e,balance:rh(Ot(BigInt(i.toFixed(0)),18)).decimalPlaces(8).toFormat(),fee:rh(Ot(BigInt(n.toFixed(0)),18)).decimalPlaces(8).toFormat()}),"bot")}}catch(w){}if(!d)return t(p,"pending"),void f(l("txNoHandler"),"bot");h(!1);const b=await d(y);if("success"===b.status&&b.transactionHash){const o=s?.blockExplorers?.default?.url,i=o?` [View on Explorer](${o}/tx/${b.transactionHash})`:` Tx: ${b.transactionHash}`;try{if(await md(4e3),"success"===(await Fh({transactionHash:b.transactionHash,chainId:r||1,rpcUrl:c})).status){if(t(p,"success"),n(p,a),"approve_token"===e)f(u("approvalSuccess",{symbol:a.token_symbol||a.contract_address||"Token"})+i,"bot");else if("send_nft"===e){const e=a.to_address||a.recipient||"",t=e?`${e.slice(0,6)}...${e.slice(-4)}`:"";f(u("txSuccessfulSendNft",{name:a.nft_name||a.token_symbol||"NFT",tokenId:a.token_id||"",to:t})+i,"bot")}else if("send_token"===e||"send_native"===e){const t=a.to_address||a.recipient||"",n=t?`${t.slice(0,6)}...${t.slice(-4)}`:"";f(u("send_native"===e?"txSuccessfulSendNative":"txSuccessfulSendToken",{amount:a.amount||"",symbol:a.token_symbol||("send_native"===e?s?.nativeCurrency?.symbol||"native":"Token"),to:n})+i,"bot")}else if("wrap_native"===e){const e=s?.nativeCurrency?.symbol||"native";f(u("txSuccessfulWrapNative",{amount:a.amount||"",from:e,to:`W${e}`})+i,"bot")}else if("unwrap_native"===e){const e=s?.nativeCurrency?.symbol||"native";f(u("txSuccessfulUnwrapNative",{amount:a.amount||"",from:`W${e}`,to:e})+i,"bot")}}else t(p,"pending"),f(l("txReverted")+"\n"+i,"bot")}catch{t(p,"success"),f(l("txTimeout")+"\n"+i,"bot")}}else"success"===b.status?t(p,"success"):(t(p,"pending"),f(l("txFailed")+(b.error?`\nError: ${b.error}`:""),"bot"))}catch(g){t(p,"pending"),f(u("txError",{message:g instanceof Error?g.message:"Unknown error"}),"bot")}},[t,n,r,o?.address,i,s?.nativeCurrency?.symbol,s?.blockExplorers?.default?.url,c,u,l,f,d])}}({updateMessageAction:E,updateMessageActionParameters:x,chainId:Z,account:J,chainType:K,chainData:X,rpcUrl:ee,ti:A,t:v,addMessage:T,onTransaction:u,setIsTyping:O}),pe=l(()=>{const e=(e=[])=>e.map(e=>({...e,id:Nd(),action:async()=>{U(!1),await de(e.text,"suggested_action")}})),t=[{id:"ask",icon:"❓",text:v("suggestionAskText"),action:async()=>{U(!1),O(!0),T(v("suggestionAskUserMessage"),"user"),await md(1e3),O(!1),T(v("suggestionAskBotReply"),"bot")}},{id:"buy",icon:"💰",text:v("suggestionBuyText"),action:async()=>{U(!1),T(v("suggestionBuyText"),"user"),lt(J?.address||"")&&_?await ie():(O(!0),await md(1e3),lt(J?.address||"")&&!_?T(v("walletConnectedChainUnsupported"),"bot"):T(v("walletNotConnected"),"bot"),O(!1))}}],n=g?e(g):t;return y?.length?[...n,...e(y)]:n},[g,y,de,T,J?.address,ie,v,_]),me=a(async(e,t,n)=>{U(!1),q(e=>({...e,[n]:!0}));try{await he(e,t,n)}finally{q(e=>({...e,[n]:!1}))}},[he]),we=a(e=>{S([e])},[S]),ge=a(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),fe())},[fe]),ye=a(()=>{const e=window.getSelection();e&&e.toString().length>0||s()},[s]),be=e=>{if(0===e)return!0;const t=new Date(k[e].timestamp),n=new Date(k[e-1].timestamp);return t.setHours(0,0,0,0),n.setHours(0,0,0,0),t.getTime()!==n.getTime()};return i(()=>{H.current?.scrollIntoView({behavior:"smooth"})},[k]),i(()=>{r?(W.current&&fh.isDesktop&&W.current.focus(),H.current?.scrollIntoView({behavior:"instant"}),Y.current&&j.current?Date.now()-j.current>12e5&&U(!0):U(!0),j.current=null,Y.current=!1,setTimeout(()=>{H.current?.scrollIntoView({behavior:"smooth"})},50)):(j.current=Date.now(),Y.current=!z.current)},[r]),i(()=>{const e=e=>{"Escape"===e.key&&r&&s()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,s]),r?/* @__PURE__ */e("div",{className:"chat-modal-overlay"+("bottom-left"===d?" chat-modal-overlay--left":""),onClick:ye,role:"dialog","aria-modal":"true","aria-labelledby":"chat-modal-title",children:/* @__PURE__ */n("div",{className:"chat-modal",style:h,onClick:e=>e.stopPropagation(),children:[
29
+ return e("div",{className:"message-content",children:o})},jp=({isOpen:r,onClose:s,onTransaction:u,position:f="bottom-right",modalChatStyle:h={},chatTitle:p,welcomeMessage:m,customSuggestions:g,additionalSuggestions:y,chatIcon:b})=>{const{t:v,ti:A}=w(),{messages:k,addMessage:T,updateMessageAction:E,updateMessageActionParameters:x,updateMessageText:C,clearMessages:I,clearMessagesById:S,updateMessageType:N}=function({customWelcomeMessage:e}={}){const{account:t}=Ef(),{t:n}=w(),r=(s=t?.address,c=t?.chainId,s&&c?`${s}_${c}`:"");var s,c;const u=l(()=>Mf(e||n("welcomeMessage")),[n,e]),[d,f]=o(()=>r||"pending"),[h,p]=o(()=>{const t=Of();return r?t&&t.owner===r?t.messages:Mf(e||n("welcomeMessage")):t?.messages??Mf(e||n("welcomeMessage"))});if("pending"===d&&r){const e=Of();e&&e.owner===r?p(e.messages):Rf(r,h),f(r)}else"pending"!==d&&r&&d!==r&&(p(u),Rf(r,u),f(r));const m=l(()=>h.map(t=>t.id===Bf?{...t,text:e||n("welcomeMessage")}:t),[h,n,e]);i(()=>{"pending"!==d&&Rf(d,h)},[h,d]),i(()=>{const e=[];for(let t=0;t<bf.length;t++){const n=bf.key(t);n&&n.startsWith(If+"_")&&e.push(n)}e.forEach(e=>bf.removeItem(e))},[]);const g=a(()=>{p(u),Rf(r,u)},[r,u]),y=a(e=>{p(t=>{const n=t.filter(t=>!e.includes(t.id));return n.length>Sf?n.slice(n.length-Sf):n})},[]);return{messages:m,setMessages:p,addMessage:(e,t,n,r,o,i="web3")=>{const a=n?h.find(e=>e.id===n):void 0,s={id:Nf(),text:e,sender:t,timestamp:/* @__PURE__ */new Date,typeChat:i,...a&&{replyTo:{id:a.id,text:a.text,sender:a.sender}},...r&&{buttons:r},...o&&{actionData:o}};return p(e=>{const t=[...e,s];return t.length>Sf?t.slice(t.length-Sf):t}),s},updateMessageAction:(e,t)=>{p(n=>n.map(n=>n.id===e&&n.actionData?{...n,actionData:{...n.actionData,status:t}}:n))},updateMessageActionParameters:(e,t)=>{p(n=>n.map(n=>n.id===e&&n.actionData?{...n,actionData:{...n.actionData,parameters:{...n.actionData.parameters,...t}}}:n))},updateMessageText:(e,t)=>{p(n=>n.map(n=>n.id===e?{...n,text:t}:n))},getMessageById:e=>h.find(t=>t.id===e),clearMessages:g,clearMessagesById:y,updateMessageType:(e,t)=>{p(n=>n.map(n=>n.id===e?{...n,typeChat:t}:n))}}}({customWelcomeMessage:m}),[B,M]=o(""),[P,O]=o(!1),[R,U]=o(!0),[L,D]=o(null),[F,q]=o({}),H=d(null),V=d(null),W=d(null),j=d(null),Y=d(!1),z=d(R),{modal:G}=Af();i(()=>{z.current=R},[R]);const{account:J,chainData:X,chainType:K,chainTypeMoralis:Q,chainId:Z,isChainSupported:_}=Ef(),{config:$}=(()=>{const e=c(Uf);if(!e)throw new Error("useConfig must be used within ConfigProvider");return e})(),ee=Z&&$?.rpcUrls?.[Z]||void 0,te=a(()=>{I(),M(""),D(null),O(!1),U(!0)},[I]);i(()=>(ph(te),()=>{ph(null)}),[te]);const ne=a(e=>{D(e),dh.isDesktop&&W.current?.focus()},[]),{getDataBuyToken:re,updateDataBuyToken:oe}=function(){const e=a(()=>{const e=bf.getItem(mh);if(e)try{return JSON.parse(e)}catch{return{...wh}}return{...wh}},[]),t=a(e=>{bf.setItem(mh,JSON.stringify(e))},[]),n=a(n=>{const r=e();t({...r,...n})},[e,t]);return{getDataBuyToken:e,setDataBuyToken:t,updateDataBuyToken:n}}(),{showTrendingTokens:ie,showMyNFTs:ae,showMyBalances:se}=function(e){const{addMessage:t,setIsTyping:n,chainData:r,chainType:o,account:i,chainTypeMoralis:s,t:c,ti:u}=e;return{showTrendingTokens:a(async()=>{try{n(!0);const e=r?.tokenTrendingDefault||[],[i,a]=await Promise.allSettled([yh.getTopGainers(o,"24h",5),yh.getTokensDetails(e,o)]);let s=[];"fulfilled"===i.status&&i.value?.data&&(s=[...i.value.data]),"fulfilled"===a.status&&a.value?.data&&(s=[...a.value.data,...s]),s=s.filter((e,t,n)=>t===n.findIndex(t=>t.address.toLowerCase()===e.address.toLowerCase()));const l=s.map(e=>({id:e?.symbol,text:e?.symbol,value:u("buttonBuyToken",{name:e.name,symbol:e?.symbol||""}),action:"click_buy_item_token_button",extraData:{tokenAddress:e?.address||"",symbol:e?.symbol||"",decimals:e?.decimals||18}}));await mf(1e3),n(!1),t(u("trendingTokensHeader",{chain:r?.name||"Unknown"}),"bot");const d=s.map((e,t)=>`${t+1}. ${e.name} (${e?.auditGoplus?.token_symbol||e.symbol||"Unknown"})\n$${rh(e?.price||0).decimalPlaces(4).toFormat()} (${e.price_change_percentage_24h||e.priceChange}%)\n\n---\n`).join("\n");t(`${d}${c("trendingTokensQuestion")}`,"bot",void 0,l)}catch(e){t(c("trendingTokensError"),"bot")}finally{n(!1)}},[t,n,r,o,c,u]),showMyNFTs:a(async()=>{try{const{getDataPackage:e}=await Promise.resolve().then(()=>kf),r=e()?.linkViewNft;t(r?u("viewNftViaWebsiteWithLink",{link:r}):c("viewNftViaWebsite"),"bot"),n(!1)}catch(e){n(!1),t(c("nftFetchError"),"bot")}},[t,n,c,u]),showMyBalances:a(async()=>{try{n(!0);const e=await Eh({address:i?.address||"",chain:s});if(e?.success&&e?.data?.result&&e.data.result.length>0){const o=e.data.result.map((e,t)=>{const n=void 0!==e.usd_value?` ≈ $${rh(e.usd_value).decimalPlaces(2).toFormat()}`:"";return`${t+1}. **${e.name}** (${e.symbol})\n Balance: ${e.balance_formatted}${n}`}).join("\n\n");await mf(500),n(!1),t(u("viewBalancesHeader",{chain:r?.name||"this chain",list:o}),"bot")}else n(!1),t(c("viewBalancesEmpty"),"bot")}catch(e){n(!1),t(c("viewBalancesFetchError"),"bot")}},[i?.address,s,t,n,r?.name,c,u])}}({addMessage:T,setIsTyping:O,chainData:X,chainType:K,account:J,chainTypeMoralis:Q,t:v,ti:A}),{onClickItemTokenToBuy:ce,onClickItemUserBalanceToBuy:ue,showPreviewToBuy:le}=function(e){const{getDataBuyToken:t,updateDataBuyToken:n,addMessage:r,setIsTyping:o,account:i,chainData:s,chainTypeMoralis:c,chainId:u,rpcUrl:l,t:d,ti:f}=e;return{onClickItemTokenToBuy:a(async(e,t)=>{n({descTokenAddress:e,descTokenDecimals:t||18});try{o(!0);const e=await Eh({address:i?.address||"",chain:c});if(e?.success&&e?.data?.result){const t=e.data.result;if(t?.length>0){const e=t.map(e=>({id:e.token_address,text:`${e.name}: ${e.balance_formatted} ${e.symbol} ($${rh(e.usd_value||0).decimalPlaces(2).toFormat()||"0"})`,value:f("buttonBuyWith",{symbol:e.symbol}),action:"click_balance_item_user_to_buy_button",fullWidth:!0,extraData:{tokenAddress:e.token_address,symbol:e.symbol,balance:e.balance_formatted,usdValue:e.usd_value,decimals:e.decimals}}));r(f("walletBalanceSpendable",{chain:s?.name||"unknown"}),"bot",void 0,e)}else r(f("walletNoTokensFound",{chain:s?.name||"unknown"}),"bot")}else r(d("walletFetchFailed"),"bot")}catch(a){r(d("walletFetchError"),"bot")}finally{o(!1)}},[n,i?.address,c,r,o,s?.name,d,f]),onClickItemUserBalanceToBuy:a(async(e,t,o,i)=>{n({srcTokenAddress:e,srcTokenDecimals:i||18});let a=o||"0";if(e===ko)try{const e=await jh({chainId:u,rpcUrl:l});if(e.isGreaterThan(0)){const t=e.times(1e6),n=new rh(Ao(o,i||18).toString()).minus(t);a=n.isGreaterThan(0)?rh(Ot(BigInt(n.toFixed(0)),18)).toFixed():"0"}}catch(c){}const s=[25,50,75,100].map(n=>({id:`percent-${n}`,text:`${n}%`,value:f("buttonUsePercent",{percent:String(n),symbol:t}),action:"select_percent",extraData:{percent:n,tokenAddress:e,tokenSymbol:t,tokenDecimals:i||18,tokenBalance:a}}));rh(a).isZero()?r(f("insufficientFeeToken",{symbol:t}),"bot"):r(f("selectAmountOf",{symbol:t,balance:a}),"bot",void 0,s)},[r,u,l,n,f]),showPreviewToBuy:a(async(e,o,a,c)=>{const h={amount:rh(o).times(e).dividedBy(100).toFixed()};void 0!==a&&(h.srcTokenAddress=a),void 0!==c&&(h.srcTokenDecimals=c),n(h);const p=t(),m=Ao(p.amount,p.srcTokenDecimals||18).toString(),w=await Bh({chainId:u,tokenIn:p.srcTokenAddress,tokenInAmount:m,tokenOut:p.descTokenAddress,tokenOutRecipient:i?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(w.success&&w.data){const e=w.data,t=e.tokenIn,n=e.tokenOut,o=rh(Ot(BigInt(t.amount||0),t.decimals)).decimalPlaces(8).toFormat(),a=rh(Ot(BigInt(n.amount||0),n.decimals)).decimalPlaces(8).toFormat();let c=!1;if(p.srcTokenAddress!==ko&&""!==p.srcTokenAddress&&i?.address&&e.tx?.to)try{const t=await qh({tokenAddress:p.srcTokenAddress,ownerAddress:i.address,spenderAddress:e.tx.to,chainId:u,rpcUrl:l});c=rh(t.toString()).isLessThan(m)}catch(g){c=!0}const h=e.estimatedTransactionFee?.total?rh(e.estimatedTransactionFee.total):rh(0);let y=rh(0);if(c&&i?.address)try{const t=Hh({tokenAddress:p.srcTokenAddress,spenderAddress:e.tx?.to||"",fromAddress:i.address,chainId:u,amount:m});y=await Wh({from:i.address,to:t.to,data:t.data,chainId:u,rpcUrl:l})}catch(g){}const b=h.plus(y),v=s?.nativeCurrency?.symbol||"native";let A="",k=!1;if(i?.address&&b.isGreaterThan(0))try{const e=await Vh({address:i.address,chainId:u,rpcUrl:l});if(e.isLessThan(b)){k=!0;const t=rh(Ot(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),n=rh(Ot(BigInt(b.toFixed(0)),18)).decimalPlaces(8).toFormat();A=f("swapFeeWarning",{symbol:v,balance:t,needed:n})}}catch(g){}const T=`From: ${o} ${t.symbol}\n⬇️\nTo: ${a} ${n.symbol}\n\n`+A+"\n";if(k)r(T,"bot");else if(c){const n=[{id:"approve-for-swap",text:f("swapApproveButton",{symbol:t.symbol}),value:f("swapApproveValue",{symbol:t.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:p.srcTokenAddress,spenderAddress:e.tx.to,tokenSymbol:t.symbol,amountInWei:m,tx:e.tx}}];r(T+f("swapNeedApprove",{symbol:t.symbol}),"bot",void 0,n)}else{const t=[{id:"confirm-swap",text:d("swapConfirmButton"),value:d("swapConfirmValue"),action:"confirm_swap",extraData:{tx:e.tx}}];r(T+d("swapReadyToProceed"),"bot",void 0,t)}}else r(f("swapEstimationError",{error:w.errorMessage||w.error||"Unknown error"}),"bot")},[t,n,r,u,i?.address,s?.nativeCurrency?.symbol,l,d,f])}}({getDataBuyToken:re,updateDataBuyToken:oe,addMessage:T,setIsTyping:O,account:J,chainData:X,chainTypeMoralis:Q,chainId:Z,rpcUrl:ee,t:v,ti:A}),{handleSendMessage:de}=function(e){const{inputValue:t,setInputValue:n,isTyping:r,setIsTyping:o,replyingTo:i,setReplyingTo:s,setShowSuggestions:c,inputRef:u,messages:l,addMessage:d,updateMessageType:f,account:h,chainData:p,chainType:m,chainTypeMoralis:w,chainId:g,isChainSupported:y,rpcUrl:b,t:v,ti:A,updateDataBuyToken:k,showTrendingTokens:T,showMyNFTs:E,showMyBalances:x,onClickItemTokenToBuy:C,onClickItemUserBalanceToBuy:I,showPreviewToBuy:S}=e;return{handleSendMessage:a(async e=>{const a=e??t?.trim();if(!a||r)return;const N=i,B=d(a,"user",i?.id);n(""),s(null),o(!0),c(!1);try{const e=l.slice(-10);let t="",n="";if(e.length>0){t="\n\n## CONVERSATION HISTORY:\n";for(const n of e)"user"===n.sender?t+=`User: ${n.text}\n`:t+=`Assistant: ${n.text}\n`;t+="\n---\n"}let r,i,s=a;N&&(s=`[Replying to ${"user"===N.sender?"my previous":"your"} message: "${N.text}"]\n\n${s}`);try{const r=await Qh.checkInfoQuestion(a,t);if(r.language&&(n=r.language),"faq"===r.model&&r.faqAnswer)return o(!1),void d(r.faqAnswer,"bot",B.id);if("pool"===r.model&&y)try{const t=await Rp({question:a,language:n||"en",currentChain:w||m||void 0,walletAddress:h?.address||void 0,chatHistory:e.map(e=>({role:"user"===e.sender?"user":"assistant",content:e.text})),signal:void 0});if(t){if(o(!1),"send_position"===t.parsed.intent){const e=t.parsed.poolId;if(!e)return void d(v("sendPositionNoId"),"bot",B.id);if(!h?.address)return void d(v("walletNotConnected"),"bot",B.id);try{o(!0);const n=await Ih({address:h.address,chain:w,limit:100,exclude_spam:!1});if(n?.success&&n?.data?.result){const r=n.data.result.find(t=>t.token_id===e);if(r){const n=r.normalized_metadata?.name||r.name||`LP Position #${e}`,o=r.normalized_metadata?.image||r.media?.original_media_url||"",i={contract_address:r.token_address,token_id:r.token_id,to_address:t.parsed.toAddress||"",token_standard:r.contract_type||"ERC721",amount:"1",maxAmount:r.amount||"1",nft_name:n};d(A("nftSendReview",{name:n,standard:r.contract_type||"ERC721",tokenId:r.token_id}),"bot",B.id,void 0,{action:"send_nft",parameters:i,status:"pending",nftInfo:{name:n,image:o||void 0,tokenId:r.token_id,contractAddress:r.token_address,tokenStandard:r.contract_type||"ERC721"}})}else d(A("sendPositionNotFound",{id:e,chain:p?.name||w||m||"this chain"}),"bot",B.id)}else d(v("nftNoCollection"),"bot",B.id)}catch(M){d(v("sendPositionFetchError"),"bot",B.id)}finally{o(!1)}return}return void d(t.response,"bot",B.id)}}catch(P){}if("general"===r.model){f(B.id,"normal");const e=l.filter(e=>"normal"===e.typeChat);let t="";if(e.slice(-10).length>0){t="\n\n## CONVERSATION HISTORY:\n";for(const n of e.slice(-10))"user"===n.sender?t+=`User: ${n.text}\n`:t+=`Assistant: ${n.text}\n\n`}const r=await Qh.generateContent(s,t,n),i=Hp(r);return o(!1),void d(i?.message||r,"bot",void 0,void 0,void 0,"normal")}}catch(O){}if(h?.address&&y)try{const[e,t]=await Promise.allSettled([Eh({address:h.address,chain:w}),Ih({address:h.address,chain:w,limit:100,exclude_spam:!0})]);"fulfilled"===e.status&&e.value?.success&&e.value?.data?.result&&(r=e.value.data.result.map(e=>({symbol:e.symbol,name:e.name,balance_formatted:e.balance_formatted,usd_value:e.usd_value,native_token:e.native_token,token_address:e.token_address,price:e.usd_price}))),"fulfilled"===t.status&&t.value?.success&&t.value?.data?.result&&(i=t.value.data.result.map(e=>({name:e.normalized_metadata?.name||e.name||`#${e.token_id}`,token_address:e.token_address,token_id:e.token_id,contract_type:e.contract_type||"",amount:e.amount||"1"})))}catch{}const c=function(e){const{walletAddress:t,chainName:n,chainId:r,nativeSymbol:o,walletTokens:i,walletNfts:a,language:s}=e;if(!t)return`You are a Web3 wallet assistant for the crypto EVM wallet app.\nThe user is currently NOT connected to any wallet.\n\n## YOUR ROLE:\n- You are a friendly, knowledgeable assistant that can talk about ANY topic naturally\n- You can freely answer general questions, discuss crypto tokens, prices, market info, provide token details, etc. — these do NOT require a wallet connection\n- ONLY ask the user to connect their wallet when their request explicitly requires their personal wallet/address, such as:\n - Sending tokens or NFTs\n - Swapping tokens\n - Approving token spending\n - Wrapping/unwrapping tokens\n - Checking THEIR OWN balance ("what is MY balance?", "how much ETH do I have?")\n - Viewing THEIR OWN NFT collection\n - Any action that reads or writes to THEIR wallet address\n- For all other requests (token info, prices, general crypto questions, market data, etc.), respond normally and helpfully\n- ${Fp(s)}\n- **LANGUAGE DETECTION — CRYPTO TICKERS**: Crypto token symbols and tickers (ETH, BTC, USDC, BNB, MATIC, SOL, etc.) are NOT language indicators. They are proper nouns used in ALL languages. Detect the language from the surrounding non-ticker text only. Example: "ETHの現在の価格は?" → Japanese (the surrounding text は Japanese characters). "ETH의 가격은?" → Korean. "Giá ETH là bao nhiêu?" → Vietnamese. NEVER treat a ticker symbol as evidence of English.\n\n## RESPONSE FORMAT:\nAlways respond with a valid JSON object:\n{"action":"chat","message":"<your friendly response to the user>", "suggested_actions":[{"label":"<short button text>","prompt":"<message sent when clicked>"}]}\n\n## RULES:\n- suggested_actions: include when your message offers the user interactive choices or asks a follow-up question. NEVER include suggested_actions that ask the user to connect their wallet (e.g., "Connect wallet", "Connect now", etc.) — the app handles wallet connection separately\n- **CRITICAL**: NEVER include any "Buy" actions (e.g., "Buy USDC", "Buy ETH", "Purchase token", etc.) in suggested_actions. The app handles Buy buttons separately. Only include non-buy actions in suggested_actions (e.g., "Send token", "Swap token", "Check balance", "Show my NFTs").\n- For wallet-required actions, politely explain the user needs to connect their wallet first, and put this in the "message" field\n- ALWAYS respond with raw JSON only, never wrap in \`\`\`json code blocks\n- ${Fp(s)}`;if(t&&!Ro[r]?.isSupported)return`You are a Web3 wallet assistant for the crypto EVM wallet app.\n The user's wallet address is: ${t}\n The user is selected on (chainId: ${r}) an UNSUPPORTED chain.\n\n ## YOUR ROLE:\n - You are a friendly, knowledgeable assistant that can talk about ANY topic naturally\n - You can freely answer general questions, discuss crypto tokens, prices, market info, token details, etc. — these do NOT require a supported chain\n - **BLOCKED on unsupported chain** — if the user asks for any of the following, politely inform them that chain (chainId: ${r}) is not currently supported and the action cannot be performed:\n - Checking THEIR OWN balance ("what is my balance?", "how much ETH do I have?")\n - Sending tokens or NFTs\n - Swapping or buying tokens\n - Approving token spending\n - Wrapping/unwrapping tokens\n - Viewing or transferring their NFT collection\n - Any action that reads or writes to their wallet on the current chain\n - **ALLOWED on unsupported chain** — respond normally and helpfully for:\n - General questions (weather, coding, history, math, etc.)\n - Token information, prices, market data, token details\n - Any query that does NOT require interacting with the user's wallet on the current chain\n - ${Fp(s)}\n - **LANGUAGE DETECTION — CRYPTO TICKERS**: Crypto token symbols and tickers (ETH, BTC, USDC, BNB, MATIC, SOL, etc.) are NOT language indicators. They are proper nouns used in ALL languages. Detect the language from the surrounding non-ticker text only. Example: "ETHの現在の価格は?" → Japanese. "ETH의 가격은?" → Korean. "Giá ETH là bao nhiêu?" → Vietnamese. NEVER treat a ticker symbol as evidence of English.\n\n ## RESPONSE FORMAT:\n Always respond with a valid JSON object:\n {"action":"chat","message":"<your response>", suggested_actions:[{"label":"<short button text>","prompt":"<message sent when clicked>"}]}\n\n ## RULES:\n - suggested_actions: include when your message offers the user interactive choices or asks a follow-up question. NEVER include suggested_actions that ask the user to connect their wallet (e.g., "Connect wallet", "Connect now", etc.) — the app handles wallet connection separately\n - **CRITICAL**: NEVER include any "Buy" actions (e.g., "Buy USDC", "Buy ETH", "Purchase token", etc.) in suggested_actions. The app handles Buy buttons separately. Only include non-buy actions in suggested_actions (e.g., "Send token", "Swap token", "Check balance", "Show my NFTs").\n - **CRITICAL**: ABSOLUTELY NEVER include any option that suggests switching, changing, or selecting a different chain (e.g., "Switch to Ethereum", "Change chain", "Switch network", "Chuyển sang chain khác", "Đổi mạng") — the app handles chain switching separately.\n - For wallet-required actions, politely explain the user needs to connect their wallet first, and put this in the "message" field\n - ALWAYS respond with raw JSON only, never wrap in \`\`\`json code blocks\n - ${Fp(s)}`;const c=i&&i.length>0?`\n## USER'S CURRENT WALLET BALANCE:\n${i.map(e=>{const t=void 0!==e.usd_value?` (~$${e.usd_value.toFixed(2)})`:"";return`- ${e.name} (${e.symbol})(Price: ${e.price||"N/A"}): ${e.balance_formatted}${t}${e.native_token?" [native]":` [${e.token_address}]`}`}).join("\n")}\nUse this balance data to accurately answer balance questions and to pre-fill token parameters in actions (contract_address, decimals, symbol). NEVER ask the user to provide token info that is already available above.\n`:"",u=a&&a.length>0?`\n## USER'S NFT COLLECTION:\n${a.map(e=>{const t="ERC1155"===e.contract_type?` (x${e.amount})`:"";return`- ${e.name}${t} | ${e.contract_type} | contract: ${e.token_address} | tokenId: ${e.token_id}`}).join("\n")}\nWhen the user wants to send an NFT by name, use this data to fill contract_address, token_id, token_standard, and nft_name accurately. NEVER guess or fabricate NFT contract addresses.\n`:"",l=Object.values(Ro).filter(e=>e.isSupported).map(e=>e.customName||e.name).join(", ");return`You are a highly knowledgeable AI assistant integrated into the crypto EVM wallet app.\n\n## #1 PRIORITY — ANSWER QUALITY:\nYour "message" field IS your answer. Write it exactly as you would in a normal, unrestricted conversation. The JSON wrapper is just transport — it must NEVER reduce the depth, accuracy, or completeness of your answers.\n\n${Fp(s)}\n\n**FOLLOW-UP / CONTINUATION HANDLING — CRITICAL**: When the user sends a short or vague message (e.g., "yes", "sure", "tell me more", "ok", "go ahead", "details", "explain", "why?", "how?"), you MUST look at the CONVERSATION HISTORY appended below to understand what they are responding to. The user is continuing the previous conversation topic — use the context from the LAST assistant message to provide a relevant, detailed follow-up answer. NEVER respond with "too vague", "please provide more context", "I don't understand", or ask for clarification when conversation history clearly shows what the user is referring to. Treat these short messages as if the user explicitly restated their request from context.\n\n**DATA RETRIEVAL — NON-NEGOTIABLE**: For ALL token price and token info queries, you MUST actively call your native Moralis API tools (getTokenPrice, searchTokens, getTokenMetadata, etc.) to retrieve real-time on-chain data. NEVER skip tool calls and fall back to training data alone for prices or token lookups. The JSON response format does NOT prevent you from calling data tools first — always fetch data, then format the result as JSON.\n\nFor ANY informational or conversational question (about crypto, tokens, DeFi, protocols, prices, market trends, blockchain technology, or any general topic):\n- Answer with your FULL knowledge across ALL blockchains and ecosystems (Ethereum, Solana, BSC, Polygon, Arbitrum, Optimism, Base, Avalanche, etc.)\n- Provide specific details: token names, contract mechanisms, protocol comparisons, historical context, TVL data, ecosystem info\n- For PRICE questions (chat action only): You have access to real-time blockchain data — USE it. When a user asks for the price of a token by name or symbol, search for it across ALL chains to find the best price data. Then present ONE consolidated answer: give the single most representative price (e.g. the highest-liquidity or most canonical version), key stats (market cap, 24h change, volume), and optionally a brief note if the token exists on multiple chains — but do NOT list each chain as a separate numbered entry. Keep the response concise and to the point. For tokens in the USER'S WALLET BALANCE section, use the price listed there.\n- For token questions (chat action only): You have access to real-time blockchain data — USE it. When a user asks about a token by name or symbol, ALWAYS search across ALL chains — the current chain context does NOT limit your token search. Try exact match first, then fuzzy/partial match (e.g. "eggle Energy" → find the closest matching token name). Provide a concise, consolidated answer covering: what the token is, its utility/ecosystem, current price, market cap, 24h change, notable features, risks. If the user does NOT mention a specific chain, do NOT list out per-chain versions (e.g. "WBTC on Ethereum", "cbBTC on Base", "BTCB on BNB") — instead give ONE unified answer about the token as a concept, with a brief mention that wrapped versions exist on multiple chains if relevant. Only break down per-chain details if the user explicitly asks about a specific chain. If the token does NOT exist on the current chain (${n}), proactively tell the user which of these supported chains DO have it: ${l}. Set token_mentions to [] in this case\n- For DeFi/protocol questions: explain how it works, key features, TVL, supported chains, competitors, pros/cons\n- For market/trend questions: discuss relevant projects, narratives, sector analysis across all chains\n- For POOL / POSITIONS / LIQUIDITY questions: Pool queries are handled by a dedicated pool data pipeline that fetches real-time data from Uniswap V3 Subgraph (The Graph). If you detect a pool-related question, simply return a chat action acknowledging the query — the system will automatically intercept and handle it with accurate on-chain pool data including TVL, volume, APR, fee tiers, and pool addresses.\n- Write detailed paragraphs, use bullet points, include numbers and facts. Minimum 3-5 sentences for simple questions, more for complex topics\n\n## CONTEXT:\nWallet: ${t} | Chain: ${n} (chainId: ${r}) | Native: ${o}${c}${u}\n\n## WHEN TO USE WHICH ACTION:\n- "send_native": user wants to send the native token (${o}) to an address\n- "send_token": user wants to send an ERC20 token to an address\n- "swap_token": user wants to swap/exchange/convert/trade/sell one token for another — covers ALL of the following keywords and patterns, even if only ONE token or NO amount is mentioned:\n - swap: "swap X", "swap X to Y", "swap X for Y", "swap to ETH", "swap native"\n - exchange: "exchange X", "exchange X to Y", "exchange X for Y", "exchange native", "exchange ETH"\n - convert: "convert X to Y", "convert native", "convert ETH to USDC", "convert X"\n - trade: "trade X for Y", "trade X to Y", "trade X"\n - sell (for another token): "sell X for Y", "sell ETH for USDC"\n - Vietnamese: "đổi X sang Y", "đổi X", "đổi native", "đổi ETH sang USDC", "chuyển đổi X", "bán X lấy Y", "hoán đổi X"\n - **CRITICAL**: When the source is the native token (ETH, BNB, MATIC, etc.) → token_in: "native". This MUST be treated as swap_token, never chat.\n → ALWAYS return swap_token. Leave missing params as "". NEVER fall back to chat.\n- "buy_token": user wants to buy a specific token AND the user clearly names a token (symbol or contract address). If user also specifies which token to pay with (e.g. "buy PEPE with USDC", "mua PEPE bằng ETH", "buy PEPE using my USDC"), fill pay_with_symbol and pay_with_address from USER'S WALLET BALANCE. **CRITICAL**: ALWAYS return buy_token if the user clearly names a token they want to buy — even if you cannot find the contract address or token data. Leave contract_address as "" and the app will search for it. NEVER fall back to "chat" just because you lack token data.\n- "buy_token_trending": user wants to buy a token BUT does NOT specify which token — covers ALL of the following patterns:\n - User asks to buy trending tokens: "buy trending tokens", "buy trending", "mua token trending", "mua token đang trending"\n - User asks to buy tokens with strong growth/momentum: "buy tokens pumping", "buy hot tokens", "buy movers", "mua token tăng mạnh", "mua token đang tăng", "mua token tiềm năng"\n - User says "buy a token" / "I want to buy" / "mua token" with NO specific token name or address provided\n - User asks for token recommendations to buy without specifying one\n → ALWAYS return buy_token_trending. Leave all params as "". NEVER fall back to chat or buy_token.\n- "approve_token": user wants to approve a token for a spender\n- "wrap_native": user wants to wrap native token (e.g. ETH → WETH) — also triggered by "deposit" into WETH/wrapped token\n- "unwrap_native": user wants to unwrap (e.g. WETH → ETH) — also triggered by "withdraw" from WETH/wrapped token\n- "send_nft": user wants to send/transfer an NFT\n- "view_nfts": user wants to see/browse their NFT collection\n- "view_balances": user wants to see ALL their token balances/tokens at once — covers ALL of the following patterns (NOT for single token price/info):\n - "show my balance", "view my balance", "check my balance", "what's my balance"\n - "what's in my wallet", "what do I have", "what tokens do I have"\n - "view all tokens", "show all tokens", "list my tokens"\n - "my portfolio", "show portfolio", "wallet overview"\n - Vietnamese: "xem số dư", "số dư của tôi", "kiểm tra số dư", "ví tôi có gì", "tôi có bao nhiêu tiền", "xem ví", "danh mục của tôi"\n → ALWAYS return view_balances for these. Do NOT return chat.\n- "chat": EVERYTHING ELSE — questions, token info, prices, greetings, DeFi explanations, market data, etc.\n\nAll wallet actions (send, swap, buy, approve, wrap, unwrap, send_nft) are chain-specific: use chainId ${r} only.\nFor "chat" action: no chain restriction — use cross-chain knowledge freely.\n\n## OUTPUT FORMAT:\n${Fp(s)}\n**LANGUAGE DETECTION — CRYPTO TICKERS**: Crypto token symbols/tickers (ETH, BTC, USDC, BNB, SOL, etc.) are NOT language indicators — they are proper nouns used universally. Detect language ONLY from the surrounding non-ticker text. Examples: "ETHの現在の価格は?" → Japanese. "ETH의 가격은?" → Korean. "Giá ETH?" → Vietnamese. NEVER classify a message as English just because it contains a ticker symbol.\n\nWallet action: {"action":"<type>","message":"<explanation>","parameters":{...}}\nChat/info: {"action":"chat","message":"<YOUR FULL DETAILED ANSWER>","parameters":{},"token_mentions":[],"suggested_actions":[]}\n\n## WALLET ACTION RULES:\n- Return action type IMMEDIATELY even if params are missing (leave as ""). Ask for missing info in "message". NEVER fall back to "chat" just because parameters are incomplete — always return the intended action.\n- **CROSS-CHAIN REQUESTS**: All wallet actions (send, swap, buy, approve, wrap, unwrap, send_nft, view_nfts, view_balances) execute ONLY on the CURRENT chain: ${n} (chainId: ${r}). If the user's message explicitly targets a DIFFERENT chain (e.g. "send on Ethereum", "swap on BSC", "transfer on Polygon", "buy on base") and the current chain is NOT that chain, do NOT execute the wallet action. Instead, return action: "chat" and politely notify the user to switch to the requested chain in the app first. This rule applies to ALL non-chat actions.\n- For ERC20 actions: provide correct contract_address on chainId ${r}. **CRITICAL — CHAIN-SPECIFIC ADDRESSES**: Contract addresses differ on every chain. You MUST obtain the address via your Moralis API tools (searchTokens, getTokenMetadata) for chainId ${r}, OR use the address already present in USER'S WALLET BALANCE. NEVER fill in a contract_address from training knowledge alone — leave it as "" if you cannot verify it via API or wallet balance. If token doesn't exist on this chain, inform user.\n- send_native: ONLY for ${o}. If user says "send ETH" but native ≠ ETH, use send_token.\n- Amount: "max"/"all" → "max". "X%" → "50%". USD formats → always prefix with "$": "5 dollar" → "$5", "5$" → "$5", "$5" → "$5", "5usd" → "$5", "5 đô la" → "$5", "0.01$ eth" → "$0.01", "$0.01 eth" → "$0.01", "5$ usdc" → "$5". The "$" MUST appear in the amount field (not stripped) so the app knows it's a USD value. Otherwise exact number string.\n- Decimals & symbol: always accurate.\n- send_nft: contract_address optional — use nft_name if NFT known by name.\n\n## suggested_actions & token_mentions:\n- suggested_actions: include when offering choices. {"label":"<2-6 words>","prompt":"<message>"}. Max 4. Never include "Buy" (app handles separately). **ABSOLUTELY NEVER** include any option that suggests switching, changing, or selecting a different chain (e.g., "Switch to Ethereum", "Change chain", "Switch network", "Chuyển sang chain khác", "Đổi mạng") — the app handles chain switching separately.\n- token_mentions: ONLY include when the token EXISTS on the CURRENT chain (chainId ${r}) AND you have obtained a VERIFIED contract address via your Moralis API tools (searchTokens, getTokenMetadata, getTokenPrice) for this exact chain.\n - **CRITICAL — CONTRACT ADDRESSES ARE CHAIN-SPECIFIC**: The same token has a DIFFERENT contract address on every chain. USDC on Ethereum ≠ USDC on Base ≠ USDC on Polygon ≠ USDC on BNB Chain. NEVER use an address from your training knowledge — training-data addresses are frequently wrong, hallucinated, or belong to a different chain.\n - **REQUIRED WORKFLOW**: Before populating token_mentions for a token, you MUST call your Moralis API tool (searchTokens or getTokenMetadata) specifying chainId ${r} to retrieve the verified contract address. If the API call fails or returns no result for this chain, set token_mentions: [].\n - If the token address is already available in the USER'S WALLET BALANCE section above, you MAY use that address (it is already verified for chainId ${r}).\n - If you cannot confirm the address via API or wallet balance, set token_mentions: [] — never guess.\n - **Native token**: If the token IS the chain's native token (${o}), use contract_address: "native" — do NOT look up an address.\n - Format: {"symbol":"","contract_address":"<API-verified address on chainId ${r}, or 'native' for the native token>","decimals":<n>}. 2+ tokens → [], use suggested_actions. Non-crypto → [].\n\n## ACTION PARAMS REFERENCE:\nValid actions: send_native, send_token, swap_token, buy_token, buy_token_trending, approve_token, wrap_native, unwrap_native, send_nft, view_nfts, view_balances, chat. NEVER use any other action name.\n\n1. send_native: {"to_address":"","amount":""}\n2. send_token: {"contract_address":"(REQ)","token_symbol":"","to_address":"","amount":"","decimals":""}\n3. swap_token: {"token_in":"<addr or 'native'>","token_in_symbol":"","token_in_decimals":"","token_out":"<addr>","token_out_symbol":"","token_out_decimals":"","amount":""}\n No tokens specified → all params "". Native → token_in:"native".\n4. buy_token: {"token_symbol":"(REQ — always fill this)","contract_address":"(if known and verified, else leave '')","decimals":"","buy_amount":"(opt — amount of the TOKEN BEING BOUGHT that user wants to RECEIVE. Use this when the amount refers to the destination token.)","pay_with_symbol":"(opt — symbol of token user wants to pay with, e.g. 'USDC', 'ETH')","pay_with_address":"(opt — contract address of payment token from WALLET BALANCE, or 'native' for native token)","pay_with_decimals":"(opt — decimals of payment token)","pay_with_amount":"(opt — amount of the PAYMENT TOKEN (token in) user wants to SPEND. Use this when the amount refers to the payment/source token.)"}.\n **CRITICAL — AMOUNT DISAMBIGUATION:**\n The amount in a buy request belongs to EITHER the token being bought OR the payment token. Parse the grammar carefully:\n - "buy PEPE with 10 USDC" → amount=10 belongs to USDC (payment) → pay_with_amount:"10", buy_amount:""\n - "buy 0.02 PCM with USDC" → amount=0.02 belongs to PCM (bought) → buy_amount:"0.02", pay_with_amount:""\n - "dùng 10 USDC mua PEPE" → amount=10 belongs to USDC (payment) → pay_with_amount:"10", buy_amount:""\n - "mua 0.02 PCM bằng USDC" → amount=0.02 belongs to PCM (bought) → buy_amount:"0.02", pay_with_amount:""\n NEVER put the amount of the token being bought into pay_with_amount. NEVER put the payment amount into buy_amount.\n If pay token is native (${o}), set pay_with_address:"native". Both tokens specified as a trade/exchange → swap_token. If you cannot verify the address, set contract_address:'' but ALWAYS return buy_token with the symbol filled. **NATIVE TOKEN**: If the token to buy IS the chain's native token (${o}), set contract_address: "native" directly — no API lookup needed.\n5. buy_token_trending: {} — no parameters needed; app handles discovery of trending/high-growth tokens. **message**: write ONLY a short 1-sentence header (e.g. "Here are the trending tokens on [chain] right now!"). Do NOT write analysis, tips, or explanations.\n6. approve_token: {"contract_address":"(REQ)","token_symbol":"","spender_address":"","amount":"","decimals":""}\n7. wrap_native: {"amount":""}\n8. unwrap_native: {"amount":""}\n9. send_nft: {"contract_address":"(opt)","token_id":"","to_address":"","token_standard":"","amount":"(def 1)","nft_name":""}\n10. view_nfts: {}\n11. view_balances: {} — use ONLY when user wants to see all balances/tokens, NOT for single token price/info queries\n12. chat: {} + token_mentions + suggested_actions — use for ALL informational/conversational requests\n\n## EXAMPLES:\nThese examples show INTENT → ACTION + PARAMETERS mapping only. The "message" content is for illustration — compose your own natural, helpful response based on context.\n\n// --- SEND NATIVE ---\n// Intent: user wants to send the chain's native token to an address\n// Triggers: "send ETH/BNB/MATIC to...", "transfer [native] to...", "chuyển [native] cho..."\n→ action: send_native | parameters: {to_address, amount}\n\n// --- SEND TOKEN ---\n// Intent: user wants to send an ERC20 token to an address\n// Triggers: "send USDC to...", "transfer [token] to...", "gửi [token] cho..."\n→ action: send_token | parameters: {contract_address, token_symbol, to_address, amount, decimals}\n\n// --- SWAP ---\n// Intent: exchange one token for another — trigger with ANY conversion/exchange/trade/sell keyword,\n// even with just ONE token mentioned, no amount, or only the native token as source\n// EN triggers: "swap X", "swap X to Y", "swap X for Y", "swap to ETH", "swap native"\n// "exchange X", "exchange X to Y", "exchange X for Y", "exchange native", "exchange ETH"\n// "convert X to Y", "convert native to USDC", "convert ETH", "convert X"\n// "trade X for Y", "trade X to Y", "trade ETH"\n// "sell X for Y", "sell ETH for USDC" (selling one token FOR another = swap)\n// VI triggers: "đổi X sang Y", "đổi X", "đổi native", "đổi ETH", "chuyển đổi X", "bán X lấy Y", "hoán đổi X"\n// Native source: token_in = "native" (e.g. "exchange ETH" → token_in:"native", token_in_symbol:"ETH")\n// Native dest: token_out = zeroAddress\n// ⚠️ NEVER confuse with wrap/unwrap: those are specifically ETH↔WETH. All other pairs = swap_token.\n→ action: swap_token | parameters: {token_in, token_in_symbol, token_in_decimals, token_out, token_out_symbol, token_out_decimals, amount}\n// Missing params → leave as "", ask for them in message. NEVER downgrade to chat.\n\n// --- WRAP / UNWRAP ---\n// Intent wrap: convert native to wrapped version — also triggered by "deposit"\n// Triggers: "wrap ETH", "deposit ETH", "deposit ETH to WETH", "đổi ETH sang WETH"\n→ action: wrap_native | parameters: {amount}\n\n// Intent unwrap: convert wrapped token back to native — also triggered by "withdraw"\n// Triggers: "unwrap WETH", "withdraw WETH", "convert WETH to ETH", "rút WETH"\n→ action: unwrap_native | parameters: {amount}\n\n// --- VIEW NFTs ---\n// Intent: user wants to see/browse their NFT collection\n// Triggers: "show my NFTs", "what NFTs do I have", "view my NFTs", "xem NFT của tôi"\n→ action: view_nfts | parameters: {}\n\n// --- VIEW BALANCES ---\n// Intent: user wants to see ALL their token balances at once (not a single token query)\n// EN triggers: "show my balance", "view my balance", "check my balance", "what's my balance"\n// "what's in my wallet", "what do I have", "what tokens do I have"\n// "view all tokens", "show all tokens", "list my tokens"\n// "my portfolio", "show portfolio", "wallet overview"\n// VI triggers: "xem số dư", "số dư của tôi", "kiểm tra số dư", "ví tôi có gì"\n// "tôi có bao nhiêu tiền", "xem ví", "danh mục của tôi"\n// ⚠️ Do NOT use view_balances for single-token queries ("price of ETH", "how much USDC is worth") → use chat instead\n→ action: view_balances | parameters: {}\n\n// --- BUY TOKEN TRENDING ---\n// Intent: user wants to buy but does NOT specify a token — or explicitly asks for trending/pumping/high-growth tokens to buy\n// EN triggers: "buy trending tokens", "buy trending", "buy hot tokens", "buy tokens pumping", "buy movers", "I want to buy a token", "buy a token"\n// VI triggers: "mua token trending", "mua token đang trending", "mua token tăng mạnh", "mua token đang tăng", "mua token tiềm năng", "mua token", "tôi muốn mua token"\n// ⚠️ CRITICAL: If user says "buy X" where X is a named token → use buy_token, NOT buy_token_trending\n// ⚠️ CRITICAL: If user gives NO specific token → ALWAYS use buy_token_trending, never chat\n// ⚠️ MESSAGE: ONLY a short 1-sentence header introducing the trending list. NO analysis, NO tips, NO explanations.\n→ action: buy_token_trending | parameters: {} | message: short header only (e.g. "Here are the trending tokens on [chain]!")\n\n// --- BUY TOKEN WITH SPECIFIC PAYMENT ---\n// Intent: user wants to buy a specific token AND specifies which token to pay with\n// EN triggers: "buy PEPE with USDC", "buy PEPE using ETH", "buy PEPE with 10 USDC", "purchase DOGE with my 0.5 ETH"\n// VI triggers: "mua PEPE bằng USDC", "mua PEPE dùng ETH", "mua PEPE bằng 10 USDC", "mua DOGE bằng 0.5 ETH của tôi"\n// → action: buy_token | parameters: {token_symbol, contract_address, decimals, pay_with_symbol, pay_with_address, pay_with_decimals, pay_with_amount}\n// AMOUNT DISAMBIGUATION (critical):\n// "buy PEPE with 10 USDC" → pay_with_amount:"10" buy_amount:"" (10 USDC to spend)\n// "buy 0.02 PCM with USDC" → buy_amount:"0.02" pay_with_amount:"" (0.02 PCM to receive)\n// "mua PEPE bằng 0.5 ETH" → pay_with_amount:"0.5" buy_amount:"" (0.5 ETH to spend)\n// "mua 0.02 PCM bằng USDC" → buy_amount:"0.02" pay_with_amount:"" (0.02 PCM to receive)\n// pay_with_* fields are filled from USER'S WALLET BALANCE. If pay token = native → pay_with_address: "native"\n// ⚠️ This is still buy_token (NOT swap_token) — the user's intent is to BUY, with a specified payment method\n\n// --- TOKEN INFO / PRICE (chat) ---\n// Intent: learn about a token, its price, market data — NOT a wallet action\n// Triggers: "tell me about X", "what is X token", "price of X", "X coin info", "X là gì"\n→ action: chat | compose a detailed answer using real-time data from your tools\n// If token EXISTS on current chain → token_mentions: [{symbol, contract_address, decimals}]\n// If token NOT on current chain → token_mentions: [] but tell user which supported chains have it\n\n// --- CROSS-CHAIN / GENERAL INFO (chat) ---\n// Intent: any question not requiring a wallet action — crypto trends, DeFi, protocols, general Q&A\n// Triggers: "what's trending on X?", "explain DeFi", "how does Uniswap work", anything conversational\n→ action: chat | compose a full, knowledgeable answer; add relevant suggested_actions if helpful\n\n// --- GREETING (chat) ---\n// Intent: greeting or open-ended start\n// Triggers: "hello", "hi", "hey", "xin chào", "bắt đầu"\n→ action: chat | introduce yourself and offer helpful options via suggested_actions`}({walletAddress:h?.address||void 0,chainName:p?.name||void 0,chainId:g||void 0,nativeSymbol:p?.nativeCurrency?.symbol||void 0,walletTokens:r,walletNfts:i,language:n}),u=await Ch({prompt:s,model:"gpt-4.1-mini",stream:!1,systemPrompt:c+t});if(!u.success||!u.data)return void d(v("errorProcessingRequest"),"bot",B.id);const R=u.data.text||"",U=Hp(R);U&&U.action&&"chat"!==U.action?await async function(e,t,n){switch(e.action){case"buy_token":await async function(e,t){const n=e.parameters?.token_symbol||"";let r=e.parameters?.contract_address||"",o=18,i=!1;if("native"!==r.toLowerCase()&&r!==ko||(r=ko),!r&&n&&p?.nativeCurrency?.symbol&&n.toUpperCase()===p.nativeCurrency.symbol.toUpperCase()&&(r=ko),r&&r!==ko)try{const e=await yh.getTokensDetails([r],m),t=e?.data?.[0];t&&(n&&t.symbol?.toUpperCase()!==n.toUpperCase()?r="":o=t.decimals||18)}catch(M){}if(!r&&n&&h?.address)try{const e=await Eh({address:h.address,chain:w});if(e?.success&&e?.data?.result){const t=e.data.result,i=t.find(e=>e.token_address.toLowerCase()===r.toLowerCase())||t.find(e=>e.symbol.toUpperCase()===n.toUpperCase());i&&(r=i.token_address,o=i.decimals)}if(!r){const e=p?.tokenTrendingDefault||[],[t,i]=await Promise.allSettled([yh.getTopGainers(m,"24h",10),yh.getTokensDetails(e,m)]),a=[];"fulfilled"===t.status&&t.value?.data&&a.push(...t.value.data),"fulfilled"===i.status&&i.value?.data&&a.push(...i.value.data);const s=a.find(e=>e.address?.toLowerCase()===r.toLowerCase())||a.find(e=>e.symbol?.toUpperCase()===n.toUpperCase());s&&(r=s.address,o=s.decimals||18)}if(!r&&g)try{const e=await yh.searchTokensByKey(n,g);if(Array.isArray(e?.data)&&e.data.length>0){const t=e.data.find(e=>e.symbol?.toUpperCase()===n.toUpperCase())||e.data[0];t?.address&&(i=!0,r=t.address,o=t.decimals||18)}}catch(a){}}catch(M){}if(r){d(i?A("buyingOnChain",{symbol:n,chain:p?.name||""}):e.message||A("buyTokenHelp",{symbol:n}),"bot",t),k({descTokenAddress:r,descTokenDecimals:o||18});const a=e.parameters?.pay_with_symbol||"",c=e.parameters?.pay_with_address||"";let u=!1;if(a||c)try{const t=await Eh({address:h?.address||"",chain:w});if(t?.success&&t?.data?.result){const n=t.data.result;let o;if(o="native"===c.toLowerCase()||c===ko||!c&&a&&p?.nativeCurrency?.symbol&&a.toUpperCase()===p.nativeCurrency.symbol.toUpperCase()?n.find(e=>e.token_address===ko||e.native_token):n.find(e=>c&&e.token_address.toLowerCase()===c.toLowerCase())||n.find(e=>a&&e.symbol.toUpperCase()===a.toUpperCase()),o){u=!0;const n=e.parameters?.pay_with_amount||"",i=e.parameters?.buy_amount||"";if(n)k({srcTokenAddress:o.token_address,srcTokenDecimals:o.decimals}),await S(100,n,o.token_address,o.decimals);else if(i){let e="";try{const n=t.data.result.find(e=>e.token_address.toLowerCase()===r.toLowerCase());let a=n?.usd_price??null;if(null==a&&r){const e=await xh({address:r,chain:w});e.success&&null!=e.data?.usd_price&&(a=e.data.usd_price)}const s=o.usd_price??null;null!=a&&null!=s&&s>0&&(e=(parseFloat(i)*a/s).toFixed(8).replace(/\.?0+$/,""))}catch(s){}e?(k({srcTokenAddress:o.token_address,srcTokenDecimals:o.decimals}),await S(100,e,o.token_address,o.decimals)):await I(o.token_address,o.symbol,o.balance_formatted,o.decimals)}else await I(o.token_address,o.symbol,o.balance_formatted,o.decimals)}}}catch(M){}u||await C(r,o)}else d(A("tokenNotFoundOnChain",{symbol:n}),"bot",t),await T()}(e,n);break;case"buy_token_trending":await T();break;case"swap_token":await async function(e,t){const n={...e.parameters||{}},r="native"===n.token_in||n.token_in_symbol?.toUpperCase()===p?.nativeCurrency?.symbol?.toUpperCase(),i="native"===n.token_out||n.token_out_symbol?.toUpperCase()===p?.nativeCurrency?.symbol?.toUpperCase();i&&(n.token_out=ko);let a=[];if(h?.address)try{const e=await Eh({address:h.address,chain:w});e?.success&&e?.data?.result&&(a=e.data.result)}catch(M){}if(!r&&(n.token_in||n.token_in_symbol)&&a.length>0){const e=n.token_in?a.find(e=>e.token_address.toLowerCase()===n.token_in.toLowerCase()):a.find(e=>e.symbol.toUpperCase()===n.token_in_symbol.toUpperCase());e&&(n.token_in=e.token_address,n.token_in_decimals=String(e.decimals))}if(!i&&(n.token_out||n.token_out_symbol)&&a.length>0){const e=n.token_out?a.find(e=>e.token_address.toLowerCase()===n.token_out.toLowerCase()):a.find(e=>e.symbol.toUpperCase()===n.token_out_symbol.toUpperCase());e&&(n.token_out=e.token_address,n.token_out_decimals=String(e.decimals))}const s=!(!n.token_in&&!r),c=!!n.token_out,u=!!n.amount;if(s&&a.length>0)if(r){const e=a.find(e=>e.native_token);if(!e||rh(e.balance_formatted||"0").isZero())return d(A("formInsufficientBalance",{balance:"0",symbol:p?.nativeCurrency?.symbol||"native"}),"bot",t),void o(!1)}else if(n.token_in){const e=a.find(e=>e.token_address.toLowerCase()===n.token_in.toLowerCase());if(!e)return d(A("swapTokenNotInWallet",{symbol:n.token_in_symbol||n.token_in}),"bot",t),void o(!1);if(rh(e.balance_formatted||"0").isZero())return d(A("formInsufficientBalance",{balance:"0",symbol:e.symbol}),"bot",t),void o(!1)}if(s&&c&&u)await async function(e,t,n){try{const r=[];e.token_out&&r.push(e.token_out),e.token_in&&!t&&r.push(e.token_in);let i=18,a=18;if(r.length>0)try{const n=await yh.getTokensDetails(r,m);if(n?.data)for(const r of n.data)t||r.address.toLowerCase()!==e.token_in?.toLowerCase()||(i=r.decimals||18),r.address.toLowerCase()===e.token_out?.toLowerCase()&&(a=r.decimals||18)}catch{}if(h?.address&&n.length>0)if(t){const t=n.find(e=>e.native_token);let r=t?.balance_formatted||"0";try{const e=await jh({chainId:g,rpcUrl:b});if(e.isGreaterThan(0)){const n=e.times(1e6),o=new rh(t?.balance||"0").minus(n);r=o.isGreaterThan(0)?rh(Ot(BigInt(o.toFixed(0)),t?.decimals||18)).toFixed():"0"}}catch{}if(e.amount=qp(e.amount,r,t?.usd_price),rh(r).lte(0))return d(A("formInsufficientBalance",{balance:rh(r).decimalPlaces(8).toFixed(),symbol:p?.nativeCurrency?.symbol||"native"}),"bot"),void o(!1);if(rh(r).lt(e.amount))return d(A("swapInsufficientNativeBalance",{balance:rh(r).decimalPlaces(8).toFixed(),symbol:p?.nativeCurrency?.symbol||"native",amount:e.amount}),"bot"),void o(!1)}else{const t=n.find(t=>t.token_address.toLowerCase()===e.token_in?.toLowerCase());if(!t)return d(A("swapTokenNotInWallet",{symbol:e.token_in_symbol||e.token_in}),"bot"),void o(!1);if(e.amount=qp(e.amount,t.balance_formatted||"0",t.usd_price),rh(t.balance_formatted||"0").lt(e.amount))return d(A("swapInsufficientTokenBalance",{balance:rh(t.balance_formatted||"0").decimalPlaces(8).toFixed(),symbol:t.symbol,amount:e.amount}),"bot"),void o(!1)}const s=t?ko:e.token_in;k({srcTokenAddress:s,descTokenAddress:e.token_out,amount:e.amount,srcTokenDecimals:i,descTokenDecimals:a}),await S(100,e.amount,s,i)}catch(r){d(v("swapEstimationFailed"),"bot")}}(n,r,a);else if(s&&c&&!u)await async function(e,t,n,r){let i=t?18:parseInt(e.token_in_decimals||"18",10),a=parseInt(e.token_out_decimals||"18",10);const s=[];if(e.token_out&&s.push(e.token_out),e.token_in&&!t&&s.push(e.token_in),s.length>0)try{const n=await yh.getTokensDetails(s,m);if(n?.data)for(const r of n.data)t||r.address.toLowerCase()!==e.token_in?.toLowerCase()||(i=r.decimals||i),r.address.toLowerCase()===e.token_out?.toLowerCase()&&(a=r.decimals||a)}catch{}if(k({descTokenAddress:e.token_out,descTokenDecimals:a}),t)if(n.length>0){const e=n.find(e=>e.native_token),t=p?.nativeCurrency?.symbol||"ETH";let o=e?.balance_formatted||"0";try{const t=await jh({chainId:g,rpcUrl:b});if(t.isGreaterThan(0)){const n=new rh(e?.balance||"0").minus(t.times(1e6));o=n.isGreaterThan(0)?rh(Ot(BigInt(n.toFixed(0)),e?.decimals||18)).toFixed():"0"}}catch{}k({srcTokenAddress:ko,srcTokenDecimals:i});const a=[25,50,75,100].map(e=>({id:`percent-${e}`,text:`${e}%`,value:A("buttonUsePercent",{percent:String(e),symbol:t}),action:"select_percent",extraData:{percent:e,tokenAddress:ko,tokenSymbol:t,tokenDecimals:i,tokenBalance:o}}));d(A("selectAmountToSwap",{symbol:t,balance:o}),"bot",r,a)}else d(v("couldNotFetchBalance"),"bot");else{const t=e.token_in_symbol||"Token";if(k({srcTokenAddress:e.token_in,srcTokenDecimals:i}),n.length>0){const i=n.find(t=>t.token_address.toLowerCase()===e.token_in?.toLowerCase());if(!i)return d(A("swapTokenNotInWallet",{symbol:t}),"bot"),void o(!1);const a=[25,50,75,100].map(e=>({id:`percent-${e}`,text:`${e}%`,value:A("buttonUsePercent",{percent:String(e),symbol:i.symbol}),action:"select_percent",extraData:{percent:e,tokenAddress:i.token_address,tokenSymbol:i.symbol,tokenDecimals:i.decimals||18,tokenBalance:i.balance_formatted}}));d(A("selectAmountToSwap",{symbol:i.symbol,balance:`${i.balance_formatted} (~$${i.usd_value?.toFixed(2)||"0"})`}),"bot",r,a)}else d(v("couldNotFetchBalance"),"bot")}}(n,r,a,t);else if(!s&&c){d(e.message||v("swapChooseFrom"),"bot",t);let r=parseInt(n.token_out_decimals||"18",10);if(n.token_out)try{const e=await yh.getTokensDetails([n.token_out],m);e?.data?.[0]&&(r=e.data[0].decimals||r)}catch{}u&&k({descTokenAddress:n.token_out,descTokenDecimals:r,amount:n.amount}),await C(n.token_out,r)}else s&&!c?await async function(e,t,n,r,i,a){let s=t?18:parseInt(e.token_in_decimals||"18",10);if(e.token_in&&!t)try{const t=await yh.getTokensDetails([e.token_in],m);t?.data?.[0]&&(s=t.data[0].decimals||s)}catch{}if(k(t?{srcTokenAddress:ko,srcTokenDecimals:18,...r?{amount:e.amount}:{}}:{srcTokenAddress:e.token_in,srcTokenDecimals:s,...r?{amount:e.amount}:{}}),r&&n.length>0)if(t){const t=n.find(e=>e.native_token),r=qp(e.amount,t?.balance_formatted||"0",t?.usd_price);if(rh(t?.balance_formatted||"0").lt(r))return d(A("swapInsufficientNativeBalance",{balance:rh(t?.balance_formatted||"0").decimalPlaces(8).toFixed(),symbol:p?.nativeCurrency?.symbol||"native",amount:r}),"bot",i),void o(!1);e.amount=r,k({amount:r})}else if(e.token_in){const t=n.find(t=>t.token_address.toLowerCase()===e.token_in.toLowerCase());if(t){const n=qp(e.amount,t.balance_formatted||"0",t.usd_price);if(rh(t.balance_formatted||"0").lt(n))return d(A("swapInsufficientTokenBalance",{balance:rh(t.balance_formatted||"0").decimalPlaces(8).toFixed(),symbol:t.symbol,amount:n}),"bot",i),void o(!1);e.amount=n,k({amount:n})}}d(a||A("swapChooseTo",{symbol:e.token_in_symbol||"your token"}),"bot",i);try{o(!0);const e=p?.tokenTrendingDefault||[],[t,n]=await Promise.allSettled([yh.getTopGainers(m,"24h",5),yh.getTokensDetails(e,m)]);let r=[];"fulfilled"===t.status&&t.value?.data&&(r=[...t.value.data]),"fulfilled"===n.status&&n.value?.data&&(r=[...n.value.data,...r]),r=r.filter((e,t,n)=>t===n.findIndex(t=>t.address.toLowerCase()===e.address.toLowerCase()));const i=r.map(e=>({id:e?.symbol,text:e?.symbol,value:A("buttonSwapTo",{name:e.name,symbol:e?.symbol||""}),action:"click_swap_dest_token",extraData:{tokenAddress:e?.address||"",symbol:e?.symbol||"",decimals:e?.decimals||18}}));d(A("trendingTokensForReceive",{chain:p?.name||"Unknown"}),"bot",void 0,i)}catch(M){d(v("couldNotLoadTokenList"),"bot")}finally{o(!1)}}(n,r,a,u,t,e.message):await async function(e,t,n,r){if(t&&k({amount:e.amount}),d(r||v("swapChooseToken"),"bot",n),h?.address)try{o(!0);const e=await Eh({address:h.address,chain:w});if(e?.success&&e?.data?.result&&e.data.result.length>0){const t=e.data.result.map(e=>({id:`swap-select-${e.token_address}`,text:`${e.name}: ${e.balance_formatted} ${e.symbol} ($${rh(e?.usd_value||0).decimalPlaces(2).toFixed()||"0"})`,value:`Swap ${e.symbol}`,action:"suggested_action",fullWidth:!0}));await mf(500),o(!1),d(A("walletBalanceSpendable",{chain:p?.name||"this chain"}),"bot",void 0,t)}else o(!1),d(A("walletNoTokensFound",{chain:p?.name||"this chain"}),"bot")}catch(M){o(!1),d(v("walletFetchError"),"bot")}}(n,u,t,e.message)}(e,n);break;case"view_balances":await x();break;case"view_nfts":await E();break;default:await async function(e,t,n){const{isTransactionAction:r}=await Promise.resolve().then(()=>Yh),{getNftContractMetadata:i}=await Promise.resolve().then(()=>Sh),a=e.action;if("send_token"===a&&!e.parameters?.contract_address&&!e.parameters?.token_symbol&&h?.address){try{const e=await Eh({address:h.address,chain:w});if(e?.success&&e?.data?.result&&e.data.result.length>0){d(v("sendTokenChoose"),"bot",n),o(!0),await mf(500);const t=e.data.result.map(e=>({id:`send-select-${e.token_address}`,text:`${e.name}: ${e.balance_formatted} ${e.symbol} ($${rh(e?.usd_value||0).decimalPlaces(2).toFixed()||"0"})`,value:A("buttonSendToken",{symbol:e.symbol}),action:"suggested_action",fullWidth:!0}));await mf(500),o(!1),d(A("walletBalanceSpendable",{chain:p?.name||"this chain"}),"bot",void 0,t)}else o(!1),d(A("walletNoTokensFound",{chain:p?.name||"this chain"}),"bot")}catch(M){o(!1),d(v("walletFetchError"),"bot")}return}if("send_nft"===a&&!e.parameters?.contract_address&&!e.parameters?.token_id&&!e.parameters?.nft_name&&h?.address){const{getDataPackage:e}=await Promise.resolve().then(()=>kf),t=e()?.linkViewNft;return void d(t?A("sendNftViaWebsiteWithLink",{link:t}):v("sendNftViaWebsite"),"bot")}if("send_nft"===a&&!lt(e.parameters?.contract_address||"")&&(e.parameters?.nft_name||e.parameters?.token_id)&&h?.address){try{o(!0);const t=await Ih({address:h.address,chain:w,limit:100,exclude_spam:!1});if(t?.success&&t?.data?.result){const r=t.data.result,i=(e.parameters?.nft_name||"").toLowerCase(),a=e.parameters?.token_id||"",s=e=>{const t=(e.normalized_metadata?.name||e.name||"").toLowerCase(),n=(e.name||"").toLowerCase(),r=i&&(t.includes(i)||n.includes(i)),o=a&&e.token_id===a;return i&&a?r&&o:i?r:o},c=!i&&!!a,u=c?r.filter(s):[],l=c?1===u.length?u[0]:null:r.find(s);if(c&&u.length>1){const t=u.map(t=>{const n=t.normalized_metadata?.name||t.name||`#${t.token_id}`,r=t.normalized_metadata?.image||t.media?.original_media_url||"";return{id:`${t.token_address}-${t.token_id}`,text:`${n} (${t.symbol||t.contract_type}) #${t.token_id}`,value:A("buttonSendNft",{name:n}),action:"select_nft_to_send",fullWidth:!0,extraData:{contractAddress:t.token_address,tokenId:t.token_id,tokenStandard:t.contract_type,name:n,symbol:t.symbol,amount:t.amount,image:r,toAddress:e.parameters?.to_address||""}}}),r=u.map((e,t)=>{const n=e.normalized_metadata?.name||e.name||`#${e.token_id}`,r=e.normalized_metadata?.image||e.media?.original_media_url||"";return`${t+1}. ${r?`![${n}](${r})\n`:"🖼️ "}**${n}**\n ${e.symbol||e.contract_type} | Token ID: ${e.token_id}`}).join("\n\n");o(!1),d(A("nftMultipleMatchesForTokenId",{count:String(u.length),tokenId:a})+"\n\n"+r,"bot",n,t)}else if(l){const t=l.normalized_metadata?.name||l.name||`#${l.token_id}`,r=l.normalized_metadata?.image||l.media?.original_media_url||"",o={contract_address:l.token_address,token_id:l.token_id,to_address:e.parameters?.to_address||"",token_standard:l.contract_type||"",amount:e.parameters?.amount||"1",maxAmount:l.amount||"1",nft_name:t};d(e.message||A("nftSendReview",{name:t,standard:l.contract_type||"NFT",tokenId:l.token_id}),"bot",n,void 0,{action:"send_nft",parameters:o,status:"pending",nftInfo:{name:t,image:r||void 0,tokenId:l.token_id,contractAddress:l.token_address,tokenStandard:l.contract_type||void 0}})}else d(A("nftNotFoundInWallet",{name:i||a}),"bot",n)}else d(v("nftNoCollection"),"bot",n)}catch(M){d(v("nftFetchError"),"bot",n)}finally{o(!1)}return}const s=r(a);let c,u,l={...e.parameters||{}};const f=["send_token","approve_token"].includes(a)&&(l.contract_address||l.token_symbol),m="send_native"===a||"wrap_native"===a,y="unwrap_native"===a,k="send_nft"===a&&l.contract_address;if(f&&h?.address)try{const e=await Eh({address:h.address,chain:w});if(e?.success&&e?.data?.result){const t=e.data.result,n=l.contract_address?t.find(e=>e.token_address.toLowerCase()===l.contract_address.toLowerCase()):t.find(e=>e.symbol.toUpperCase()===l.token_symbol.toUpperCase());n&&(l={...l,contract_address:n.token_address,decimals:String(n.decimals)},c={symbol:n.symbol,name:n.name,balance:n.balance,balanceFormatted:n.balance_formatted,usdValue:n.usd_value,usdPrice:n.usd_price,decimals:n.decimals,logo:n.logo||n.thumbnail,contractAddress:n.token_address})}}catch(M){}if(f&&!c&&"send_token"===a){const e=l.token_symbol||l.contract_address||"this token";return d(A("sendTokenNotInWallet",{symbol:e}),"bot",n),void o(!1)}if(f&&!c&&l.contract_address)try{const e=await xh({address:l.contract_address,chain:w});e?.success&&e?.data&&(c={symbol:e.data.symbol,name:e.data.name,balance:"0",balanceFormatted:"0",usdPrice:e.data.usd_price,decimals:e.data.decimals,logo:e.data.logo,contractAddress:l.contract_address},l={...l,decimals:String(e.data.decimals)})}catch(M){}if(m&&h?.address)try{const e=await Eh({address:h.address,chain:w});if(e?.success&&e?.data?.result){const t=e.data.result.find(e=>e.native_token);if(t){let e=t.balance_formatted,n=t.balance;try{const{estimateTransactionFee:r}=await Promise.resolve().then(()=>Yh),o=new rh(t.balance),i="0x"+BigInt(o.toFixed(0)).toString(16),a=await r({from:h.address,to:h.address,data:"0x",value:i,chainId:g,rpcUrl:b});if(a.isGreaterThan(0)){const r=o.minus(a);r.isGreaterThan(0)?(n=r.toFixed(0),e=rh(Ot(BigInt(r.toFixed(0)),t.decimals)).toFixed()):(n="0",e="0")}}catch{}c={symbol:t.symbol,name:t.name,balance:n,balanceFormatted:e,usdValue:t.usd_value,usdPrice:t.usd_price,decimals:t.decimals,logo:t.logo||t.thumbnail,contractAddress:ko}}else{const e=await xh({address:ko,chain:w});e?.success&&e?.data&&(c={symbol:e.data.symbol,name:e.data.name,balance:"0",balanceFormatted:"0",usdValue:0,usdPrice:e.data.usd_price,decimals:e.data.decimals,logo:e.data.logo,contractAddress:ko})}}}catch(M){}if(y&&h?.address)try{const e=await Eh({address:h.address,chain:w});if(e?.success&&e?.data?.result){const t=e.data.result,n=`W${p?.nativeCurrency?.symbol||"ETH"}`,r=t.find(e=>e.symbol.toUpperCase()===n.toUpperCase());r&&(c={symbol:r.symbol,name:r.name,balance:r.balance,balanceFormatted:r.balance_formatted,usdValue:r.usd_value,usdPrice:r.usd_price,decimals:r.decimals,logo:r.logo||r.thumbnail,contractAddress:r.token_address})}}catch(M){}if(k){try{const e=await i({address:l.contract_address,chain:w});e?.success&&e?.data&&(e.data.contract_type&&(l={...l,token_standard:e.data.contract_type}),!l.nft_name&&e.data.name&&(l={...l,nft_name:e.data.name}))}catch(M){}if(h?.address)try{const e=await Ih({address:h.address,chain:w,limit:100,exclude_spam:!1});if(e?.success&&e?.data?.result){const t=e.data.result.find(e=>e.token_address.toLowerCase()===l.contract_address.toLowerCase()&&e.token_id===l.token_id);if(!t){const e=l.nft_name||`#${l.token_id||l.contract_address}`;return d(A("nftNotFoundInWallet",{name:e}),"bot",n),void o(!1)}{l={...l,amount:l.amount||"1",maxAmount:t.amount||"1"};const e=t.normalized_metadata?.image||t.media?.original_media_url||"";u={name:t.normalized_metadata?.name||t.name||l.nft_name||`#${t.token_id}`,image:e||void 0,tokenId:t.token_id,contractAddress:t.token_address,tokenStandard:t.contract_type||l.token_standard||void 0}}}}catch(M){}}l.amount&&c?.balanceFormatted&&("send_token"===a||"send_native"===a||"wrap_native"===a||"unwrap_native"===a)&&(l.amount=qp(l.amount,c.balanceFormatted,c.usdPrice)),s?d(e.message||"Please review and complete the form below.","bot",n,void 0,{action:e.action,parameters:l,status:"pending",tokenInfo:c,nftInfo:u}):d(e.message||t,"bot",n)}(e,t,n)}}(U,R,B.id):U&&"chat"===U.action?await async function(e,t,n,r){const o=e.token_mentions||[],i=e.suggested_actions||[],a=[];o.length>0&&(await Promise.all(o.map(async e=>{let t=e.contract_address||"",n=e.decimals||18;if("native"===t.toLowerCase()&&(t=ko),t===ko){const t=r?.find(e=>e.native_token);return t?{symbol:e.symbol||t.symbol,contract_address:ko,decimals:18}:e.symbol?{symbol:e.symbol,contract_address:ko,decimals:18}:null}if(t&&t!==ko){const o=r?.find(n=>n.token_address.toLowerCase()===t.toLowerCase()&&n.symbol.toUpperCase()===e.symbol.toUpperCase());if(o){try{const e=await yh.getTokensDetails([t],m);n=e?.data?.[0]?.decimals??n}catch{}return{symbol:e.symbol,contract_address:t,decimals:n}}try{const r=await yh.getTokensDetails([t],m),o=r?.data?.[0];if(o&&o.symbol?.toUpperCase()===e.symbol.toUpperCase())return{symbol:e.symbol,contract_address:t,decimals:o.decimals??n};t=""}catch{t=""}}if(!t&&r){const o=r.find(t=>t.symbol.toUpperCase()===e.symbol.toUpperCase());if(o){t=o.token_address;try{const e=await yh.getTokensDetails([t],m);n=e?.data?.[0]?.decimals??n}catch{}}}return t?{symbol:e.symbol,contract_address:t,decimals:n}:null}))).filter(e=>null!==e).forEach(e=>{a.push({id:`buy-${e.symbol}`,text:`💰 Buy ${e.symbol}`,value:A("buttonBuySymbol",{symbol:e.symbol}),action:"click_buy_item_token_button",extraData:{tokenAddress:e.contract_address,symbol:e.symbol,decimals:e.decimals},fullWidth:!0})}),i.length>0&&i.forEach((e,t)=>{a.push({id:`suggested-${t}-${e.label}`,text:e.label,value:e.prompt,action:"suggested_action",fullWidth:!0})}),a.length>0?d(e.message||t,"bot",n,a):d(e.message||t,"bot",n)}(U,R,B.id,r):d(R,"bot",B.id)}catch(O){d(v("errorProcessingRequest"),"bot",B.id)}o(!1),await mf(50),dh.isDesktop&&u.current?.focus()},[t,r,i,d,l,h?.address,y,p?.name,p?.nativeCurrency?.symbol,p?.tokenTrendingDefault,g,f,w,m,A,C,I,S,T,v,k,b,x,E])}}({inputValue:B,setInputValue:M,isTyping:P,setIsTyping:O,replyingTo:L,setReplyingTo:D,setShowSuggestions:U,inputRef:W,messages:k,addMessage:T,updateMessageType:N,account:J,chainData:X,chainType:K,chainTypeMoralis:Q,chainId:Z,isChainSupported:_,rpcUrl:ee,t:v,ti:A,updateDataBuyToken:oe,showTrendingTokens:ie,showMyNFTs:ae,showMyBalances:se,onClickItemTokenToBuy:ce,onClickItemUserBalanceToBuy:ue,showPreviewToBuy:le}),{handleButtonClick:fe}=function(e){const{addMessage:t,handleSendMessage:n,setIsTyping:r,setShowSuggestions:o,onClickItemTokenToBuy:i,onClickItemUserBalanceToBuy:s,showPreviewToBuy:c,onTransaction:u,updateMessageText:l,ti:d,t:f,account:h,chainId:p,chainData:m,chainTypeMoralis:w,rpcUrl:g,updateDataBuyToken:y,getDataBuyToken:b,inputRef:v}=e;return{handleButtonClick:a(async(e,a,A)=>{try{if("suggested_action"===a)return o(!1),void(await n(e));if(t(e,"user"),o(!1),r(!0),a)switch(await mf(500),a){case"click_buy_item_token_button":await i(A?.tokenAddress||"",A?.decimals||18);break;case"click_balance_item_user_to_buy_button":await s(A?.tokenAddress||"",A?.symbol||"",A?.balance||"",A?.decimals||18);break;case"select_percent":await c(A?.percent||0,A?.tokenBalance||"",A?.tokenAddress||void 0,A?.tokenDecimals||void 0);break;case"confirm_swap":{if(!A?.tx||!u){t(f("txDataNotAvailable"),"bot");break}const e=A.tx,n={from:h?.address||"",to:e.to,data:e.data,value:e.value,chainId:p},o=t(f("txProcessing"),"bot");try{r(!1);const e=await u(n),t=m?.blockExplorers?.default?.url,i=e.transactionHash?t?` [View on Explorer](${t}/tx/${e.transactionHash})`:` Tx: ${e.transactionHash}`:"";if("success"===e.status&&e.transactionHash){l(o.id,f("txSubmitted")+i);try{await mf(2e3);const t=await Fh({transactionHash:e.transactionHash,chainId:p||1,rpcUrl:g});l(o.id,("success"===t.status?f("txConfirmedSwap"):f("txRevertedSwap"))+i)}catch{l(o.id,f("txTimeout")+i)}}else"success"===e.status?l(o.id,f("txSuccessfulSwap")):l(o.id,f("txFailed")+(e.error?`\nError: ${e.error}`:""))}catch(k){l(o.id,f("txFailed"))}break}case"approve_for_swap":{const e=A?.tokenAddress||"",n=A?.spenderAddress||"",o=A?.tokenSymbol||"token",i=A?.tx;if(!e||!n||!u){t(f("approvalDataNotAvailable"),"bot");break}const a=A?.amountInWei||void 0,s=Hh({tokenAddress:e,spenderAddress:n,fromAddress:h?.address||"",chainId:p,tokenSymbol:o,amount:a}),c={from:s.from,to:s.to,data:s.data,value:s.value,chainId:s.chainId};t(d("approving",{symbol:o}),"bot");try{r(!1);const e=await u(c);let n="success"===e.status;if("success"===e.status&&e.transactionHash)try{n="success"===(await Fh({transactionHash:e.transactionHash,chainId:p||1,rpcUrl:g})).status}catch{n=!0}n?(t(d("approvalSuccess",{symbol:o}),"bot"),t(f("approvalConfirmSwap"),"bot",void 0,[{id:"confirm-swap-after-approve",text:f("confirmSwapButton"),value:f("swapConfirmValue"),action:"confirm_swap",fullWidth:!0,extraData:{tx:i}}])):t(f("approvalFailed")+(e.error?`\nError: ${e.error}`:""),"bot")}catch(k){t(f("approvalFailed"),"bot")}break}case"click_swap_dest_token":{const e=A?.tokenAddress||"",n=A?.symbol||"";y({descTokenAddress:e,descTokenDecimals:A?.decimals||18});const r=b(),o=r.srcTokenAddress||"",i=o===ko,a=r.amount||"";try{const s=await Eh({address:h?.address||"",chain:w});if(s?.success&&s?.data?.result){const c=s.data.result;let u,l="",w="0";if(i){const e=c.find(e=>e.native_token);l=m?.nativeCurrency?.symbol||"ETH",w=e?.balance_formatted||"0",u=e?.usd_price}else{const e=c.find(e=>e.token_address.toLowerCase()===o.toLowerCase());e&&(l=e.symbol,w=e.balance_formatted,u=e.usd_price)}if(a&&l){const n=qp(a,w,u),s=r.srcTokenDecimals||18,c=i?ko:o;y({amount:n});try{const r=Ao(n,s).toString(),o=await Bh({chainId:p,tokenIn:c,tokenInAmount:r,tokenOut:e,tokenOutRecipient:h?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(o.success&&o.data){const e=o.data,n=e.tokenIn,a=e.tokenOut,s=rh(Ot(BigInt(n.amount||0),n.decimals)).decimalPlaces(8).toFormat(),u=rh(Ot(BigInt(a.amount||0),a.decimals)).decimalPlaces(8).toFormat();let l=!1;if(!i&&h?.address&&e.tx?.to)try{const t=await qh({tokenAddress:c,ownerAddress:h.address,spenderAddress:e.tx.to,chainId:p,rpcUrl:g});l=rh(t.toString()).isLessThan(r)}catch{l=!0}const w=e.estimatedTransactionFee?.total?rh(e.estimatedTransactionFee.total):rh(0);let y=rh(0);if(l&&h?.address)try{const t=Hh({tokenAddress:c,spenderAddress:e.tx?.to||"",fromAddress:h.address,chainId:p,amount:r});y=await Wh({from:h.address,to:t.to,data:t.data,chainId:p,rpcUrl:g})}catch{}const b=w.plus(y),v=m?.nativeCurrency?.symbol||"native";let A="",k=!1;if(h?.address&&b.isGreaterThan(0))try{const e=await Vh({address:h.address,chainId:p,rpcUrl:g});e.isLessThan(b)&&(k=!0,A=d("swapFeeWarning",{symbol:v,balance:rh(Ot(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),needed:rh(Ot(BigInt(b.toFixed(0)),18)).decimalPlaces(8).toFormat()}))}catch{}const T=`From: ${s} ${n.symbol}\n⬇️\nTo: ${u} ${a.symbol}\n\n${A}\n`;k?t(T,"bot"):l?t(T+d("swapNeedApprove",{symbol:n.symbol}),"bot",void 0,[{id:"approve-for-swap",text:d("swapApproveButton",{symbol:n.symbol}),value:d("swapApproveValue",{symbol:n.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:c,spenderAddress:e.tx.to,tokenSymbol:n.symbol,amountInWei:r,tx:e.tx}}]):t(T+f("swapReadyToProceed"),"bot",void 0,[{id:"confirm-swap",text:f("swapConfirmYes"),value:f("swapConfirmValue"),action:"confirm_swap",extraData:{tx:e.tx}}])}else t(d("swapEstimationError",{error:o.errorMessage||o.error||"Unknown error"}),"bot")}catch(k){t(f("swapEstimationFailed"),"bot")}}else if(l&&parseFloat(w)>0){const e=r.srcTokenDecimals||18,i=[25,50,75,100].map(t=>({id:`percent-${t}`,text:`${t}%`,value:d("buttonUsePercent",{percent:String(t),symbol:l}),action:"select_percent",extraData:{percent:t,tokenAddress:o,tokenSymbol:l,tokenDecimals:e,tokenBalance:w}}));t(d("swapSelectAmount",{from:l,to:n,balance:w}),"bot",void 0,i)}else t(f("swapNoSourceToken"),"bot")}else t(f("couldNotFetchBalance"),"bot")}catch(k){t(f("couldNotLoadBalance"),"bot")}break}case"select_nft_to_send":{const e=A?.name||"NFT",n=A?.contractAddress||"",r=A?.tokenId||"",o=A?.tokenStandard||"ERC721",i=A?.amount||"1",a=A?.image||"",s=A?.toAddress||"";t(d("nftSendReview",{name:e,standard:o,tokenId:r}),"bot",void 0,void 0,{action:"send_nft",parameters:{contract_address:n,token_id:r,to_address:s,token_standard:o,amount:i,maxAmount:i,nft_name:e},status:"pending",nftInfo:{name:e,image:a||void 0,tokenId:r,contractAddress:n,tokenStandard:o}});break}default:t(d("actionExecutedFor",{action:a,value:e}),"bot")}else await mf(500),t(d("receivedButtonValue",{value:e}),"bot");r(!1),dh.isDesktop&&v.current?.focus()}catch(T){t(f("errorProcessingRequest"),"bot"),r(!1)}},[t,n,i,s,c,u,d,h?.address,p,f,m?.blockExplorers?.default?.url,m?.nativeCurrency?.symbol,l,g,y,b,w])}}({addMessage:T,handleSendMessage:de,setIsTyping:O,setShowSuggestions:U,onClickItemTokenToBuy:ce,onClickItemUserBalanceToBuy:ue,showPreviewToBuy:le,onTransaction:u,updateMessageText:C,ti:A,t:v,account:J,chainId:Z,chainData:X,chainTypeMoralis:Q,rpcUrl:ee,updateDataBuyToken:oe,getDataBuyToken:re,inputRef:W}),{handleActionFormSubmit:he}=function(e){const{updateMessageAction:t,updateMessageActionParameters:n,chainId:r,account:o,chainType:i,chainData:s,rpcUrl:c,ti:u,t:l,addMessage:d,onTransaction:f,setIsTyping:h}=e;return{handleActionFormSubmit:a(async(e,a,p)=>{try{if(t(p,"submitted"),"swap_token"===e){let e=18;if(a.token_in&&a.token_in!==ko)try{const t=await yh.getTokensDetails([a.token_in],i);t?.data?.[0]&&(e=t.data[0].decimals||18)}catch(m){}const n=Ao(a.amount||"0",e).toString(),f=await Bh({chainId:r,tokenIn:a.token_in||"",tokenInAmount:n,tokenOut:a.token_out||"",tokenOutRecipient:o?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(!f.success||!f.data)return t(p,"pending"),void d(u("swapEstimationError",{error:f.errorMessage||f.error||"Unknown error"}),"bot");const h=f.data,w=h.tokenIn,g=h.tokenOut,y=rh(Ot(BigInt(w.amount||0),w.decimals)).decimalPlaces(8).toFormat(),b=rh(Ot(BigInt(g.amount||0),g.decimals)).decimalPlaces(8).toFormat(),v=!a.token_in||a.token_in===ko;let A=!1;if(!v&&o?.address&&h.tx?.to)try{const e=await qh({tokenAddress:a.token_in,ownerAddress:o.address,spenderAddress:h.tx.to,chainId:r,rpcUrl:c});A=rh(e.toString()).isLessThan(n)}catch(m){}const k=h.estimatedTransactionFee?.total?rh(h.estimatedTransactionFee.total):rh(0);let T=rh(0);if(A&&o?.address)try{const e=Hh({tokenAddress:a.token_in,spenderAddress:h.tx?.to||"",fromAddress:o.address,chainId:r,amount:n});T=await Wh({from:o.address,to:e.to,data:e.data,chainId:r,rpcUrl:c})}catch(m){}const E=k.plus(T),x=s?.nativeCurrency?.symbol||"native";let C="",I=!1;if(o?.address&&E.isGreaterThan(0))try{const e=await Vh({address:o.address,chainId:r,rpcUrl:c});e.isLessThan(E)&&(I=!0,C=u("swapFeeWarning",{symbol:x,balance:rh(Ot(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),needed:rh(Ot(BigInt(E.toFixed(0)),18)).decimalPlaces(8).toFormat()}))}catch(m){}const S=`From: ${y} ${w.symbol}\n⬇️\nTo: ${b} ${g.symbol}\n\n${C}\n`;return void(I?(t(p,"pending"),d(S,"bot")):A?(t(p,"success"),d(S+u("swapApprovalRequired",{symbol:w.symbol}),"bot",void 0,[{id:"approve-swap-actionform",text:u("swapApproveButton",{symbol:w.symbol}),value:u("swapApproveValue",{symbol:w.symbol}),action:"approve_for_swap",extraData:{tokenAddress:a.token_in,spenderAddress:h.tx.to,tokenSymbol:w.symbol,amountInWei:n,tx:h.tx},fullWidth:!0}])):(t(p,"success"),d(S+l("swapReadyToProceed"),"bot",void 0,[{id:"confirm-swap-actionform",text:l("swapConfirmYes"),value:l("swapConfirmValue"),action:"confirm_swap",extraData:{tx:h.tx}}])))}const g=Dh({action:e,parameters:a,fromAddress:o?.address||"",chainId:r||1}),y={from:g.from,to:g.to,data:g.data,value:g.value,chainId:g.chainId};if(["send_token","send_native","send_nft","wrap_native","unwrap_native","approve_token"].includes(e)&&o?.address)try{const e=s?.nativeCurrency?.symbol||"native",n=await Wh({from:g.from,to:g.to,data:g.data,value:g.value&&"0"!==g.value?`0x${BigInt(g.value).toString(16)}`:void 0,chainId:r,rpcUrl:c});if(n.isGreaterThan(0)){const i=await Vh({address:o.address,chainId:r,rpcUrl:c});if(i.isLessThan(n))return t(p,"pending"),void d(u("txInsufficientGas",{symbol:e,balance:rh(Ot(BigInt(i.toFixed(0)),18)).decimalPlaces(8).toFormat(),fee:rh(Ot(BigInt(n.toFixed(0)),18)).decimalPlaces(8).toFormat()}),"bot")}}catch(w){}if(!f)return t(p,"pending"),void d(l("txNoHandler"),"bot");h(!1);const b=await f(y);if("success"===b.status&&b.transactionHash){const o=s?.blockExplorers?.default?.url,i=o?` [View on Explorer](${o}/tx/${b.transactionHash})`:` Tx: ${b.transactionHash}`;try{if(await mf(4e3),"success"===(await Fh({transactionHash:b.transactionHash,chainId:r||1,rpcUrl:c})).status){if(t(p,"success"),n(p,a),"approve_token"===e)d(u("approvalSuccess",{symbol:a.token_symbol||a.contract_address||"Token"})+i,"bot");else if("send_nft"===e){const e=a.to_address||a.recipient||"",t=e?`${e.slice(0,6)}...${e.slice(-4)}`:"";d(u("txSuccessfulSendNft",{name:a.nft_name||a.token_symbol||"NFT",tokenId:a.token_id||"",to:t})+i,"bot")}else if("send_token"===e||"send_native"===e){const t=a.to_address||a.recipient||"",n=t?`${t.slice(0,6)}...${t.slice(-4)}`:"";d(u("send_native"===e?"txSuccessfulSendNative":"txSuccessfulSendToken",{amount:a.amount||"",symbol:a.token_symbol||("send_native"===e?s?.nativeCurrency?.symbol||"native":"Token"),to:n})+i,"bot")}else if("wrap_native"===e){const e=s?.nativeCurrency?.symbol||"native";d(u("txSuccessfulWrapNative",{amount:a.amount||"",from:e,to:`W${e}`})+i,"bot")}else if("unwrap_native"===e){const e=s?.nativeCurrency?.symbol||"native";d(u("txSuccessfulUnwrapNative",{amount:a.amount||"",from:`W${e}`,to:e})+i,"bot")}}else t(p,"pending"),d(l("txReverted")+"\n"+i,"bot")}catch{t(p,"success"),d(l("txTimeout")+"\n"+i,"bot")}}else"success"===b.status?t(p,"success"):(t(p,"pending"),d(l("txFailed")+(b.error?`\nError: ${b.error}`:""),"bot"))}catch(g){t(p,"pending"),d(u("txError",{message:g instanceof Error?g.message:"Unknown error"}),"bot")}},[t,n,r,o?.address,i,s?.nativeCurrency?.symbol,s?.blockExplorers?.default?.url,c,u,l,d,f])}}({updateMessageAction:E,updateMessageActionParameters:x,chainId:Z,account:J,chainType:K,chainData:X,rpcUrl:ee,ti:A,t:v,addMessage:T,onTransaction:u,setIsTyping:O}),pe=l(()=>{const e=(e=[])=>e.map(e=>({...e,id:Nf(),action:async()=>{U(!1),await fe(e.text,"suggested_action")}})),t=[{id:"ask",icon:"❓",text:v("suggestionAskText"),action:async()=>{U(!1),O(!0),T(v("suggestionAskUserMessage"),"user"),await mf(1e3),O(!1),T(v("suggestionAskBotReply"),"bot")}},{id:"buy",icon:"💰",text:v("suggestionBuyText"),action:async()=>{U(!1),T(v("suggestionBuyText"),"user"),lt(J?.address||"")&&_?await ie():(O(!0),await mf(1e3),lt(J?.address||"")&&!_?T(v("walletConnectedChainUnsupported"),"bot"):T(v("walletNotConnected"),"bot"),O(!1))}}],n=g?e(g):t;return y?.length?[...n,...e(y)]:n},[g,y,fe,T,J?.address,ie,v,_]),me=a(async(e,t,n)=>{U(!1),q(e=>({...e,[n]:!0}));try{await he(e,t,n)}finally{q(e=>({...e,[n]:!1}))}},[he]),we=a(e=>{S([e])},[S]),ge=a(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),de())},[de]),ye=a(()=>{const e=window.getSelection();e&&e.toString().length>0||s()},[s]),be=e=>{if(0===e)return!0;const t=new Date(k[e].timestamp),n=new Date(k[e-1].timestamp);return t.setHours(0,0,0,0),n.setHours(0,0,0,0),t.getTime()!==n.getTime()};return i(()=>{H.current?.scrollIntoView({behavior:"smooth"})},[k]),i(()=>{r?(W.current&&dh.isDesktop&&W.current.focus(),H.current?.scrollIntoView({behavior:"instant"}),Y.current&&j.current?Date.now()-j.current>12e5&&U(!0):U(!0),j.current=null,Y.current=!1,setTimeout(()=>{H.current?.scrollIntoView({behavior:"smooth"})},50)):(j.current=Date.now(),Y.current=!z.current)},[r]),i(()=>{const e=e=>{"Escape"===e.key&&r&&s()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,s]),r?/* @__PURE__ */e("div",{className:"chat-modal-overlay"+("bottom-left"===f?" chat-modal-overlay--left":""),onClick:ye,role:"dialog","aria-modal":"true","aria-labelledby":"chat-modal-title",children:/* @__PURE__ */n("div",{className:"chat-modal",style:h,onClick:e=>e.stopPropagation(),children:[
30
30
  /* @__PURE__ */n("div",{className:"chat-modal-header",children:[
31
31
  /* @__PURE__ */n("div",{className:"chat-modal-header-title",children:[
32
32
  /* @__PURE__ */n("div",{className:"chat-modal-header-left",children:[
33
33
  /* @__PURE__ */e("div",{className:"keyring-logo",children:/* @__PURE__ */e("img",{src:b||G?.icon||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAA8CAYAAAAdUliaAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAADAhJREFUeAHtWUtsnNUVPufOw2NAjS3Uqq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KAfcnj+uAiPLt5gZt5Yoi+SXHv356YXHj7TSRMmNs3fM+w0cZWQlVcN39Z0tgjZmDSBUktv/QNxUW1yd8yAF+nbFZxplkDXrxUL/EEtCcYL5vV584fRscbYV+E0v31774svfyPOJ00C9R1ScyTN43B5cVGzK64Aba++s18XlNINObKV3MNhS9L3JkSBsVF/FZA8mTj33XHt+r23LwIWkzJrZsubX4kpiIr7o3Fy6cgJL5lMXUhnfUT81tisvEHMIxt4GWUocsRrGAPmw8OLh1Q9ffSYEXn7i/UEBiXIY2EC4mlk88qOJQXjuZ8qWcO/xt7sG7OS3dw4tks/7Z6DCzFAwmpEjuJOLrDqbfuPgKvF26zpiqsrfboHANJhhozHSTRzG6EElb4I3ZtzDZQFWos7nju0f4v0zOcDR0ZKze2CvaFIAu09k/Afa4zQderj9crAOxdg39CCj03t9CA+6PEeQvBH43/iZB8JnlB++tpJLe2I6LWF7ho/I+DSKeswpFLpzkYw5MyF1fsLnIhiePulzEuQzkVr2laEBDfjE3iqPjLdhvbaHjp8ZsJMnjpyZ5kOdHCek2/XJkwYYgjYnU+qcjyB6YsXvKOXJxYHXduXdLiXuP1np1M8VA6xEmbQM4DSfSOX0MZiHsaMyPnGitISIhvmZT53SKEcHXm4947vqgJ3MHlrJpkGUGdxgxk27Bdxjzv/QUSVNMP6lI0NL3bZ9VQA7ee3plVzSw4leiSPRU1ULupaRMv/lF4Yrl9PmVQXs5GiRqeKJwd4GbU9JOsdHw7Wvz10e0GtyTTrIJznoNVtvIOH9AAAAAElFTkSuQmCC",alt:"Keyring Logo",width:22,height:30})}),
34
34
  /* @__PURE__ */e("h3",{id:"chat-modal-title",children:p||G?.title||v("chatTitle")})]}),
35
35
  /* @__PURE__ */e("button",{className:"close-button",onClick:s,"aria-label":v("closeChat"),type:"button",children:/* @__PURE__ */e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:/* @__PURE__ */e("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),
36
- /* @__PURE__ */e(Cd,{address:J?.address,chainId:J?.chainId})]}),
36
+ /* @__PURE__ */e(Cf,{address:J?.address,chainId:J?.chainId})]}),
37
37
  /* @__PURE__ */n("div",{className:"chat-modal-messages-wrapper",children:[
38
- /* @__PURE__ */n("div",{className:"chat-modal-messages",ref:V,role:"log","aria-live":"polite",children:[k.map((t,r)=>/* @__PURE__ */n("div",{children:[be(r)&&/* @__PURE__ */e("div",{className:"date-separator",children:pd(t.timestamp)}),
38
+ /* @__PURE__ */n("div",{className:"chat-modal-messages",ref:V,role:"log","aria-live":"polite",children:[k.map((t,r)=>/* @__PURE__ */n("div",{children:[be(r)&&/* @__PURE__ */e("div",{className:"date-separator",children:pf(t.timestamp)}),
39
39
  /* @__PURE__ */n("div",{className:"message "+("user"===t.sender?"message-user":"message-bot"),role:"article",children:[
40
- /* @__PURE__ */e("button",{disabled:fh.isMobile,className:"message-reply-button",onClick:()=>ne(t),"aria-label":v("replyToMessage"),type:"button",children:/* @__PURE__ */e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:/* @__PURE__ */e("path",{d:"M3.5 8.5L1 6L3.5 3.5M1.5 6H10C12.2091 6 14 7.79086 14 10V13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),
40
+ /* @__PURE__ */e("button",{disabled:dh.isMobile,className:"message-reply-button",onClick:()=>ne(t),"aria-label":v("replyToMessage"),type:"button",children:/* @__PURE__ */e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:/* @__PURE__ */e("path",{d:"M3.5 8.5L1 6L3.5 3.5M1.5 6H10C12.2091 6 14 7.79086 14 10V13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),
41
41
  /* @__PURE__ */n("div",{className:"message-bubble",children:[t.replyTo&&/* @__PURE__ */n("div",{className:"message-reply-to",children:[
42
42
  /* @__PURE__ */n("div",{className:"message-reply-to-label",children:[v("replyingTo")," ","user"===t.replyTo.sender?v("replyingToYou"):p||v("replyingToAgent")]}),
43
43
  /* @__PURE__ */e("div",{className:"message-reply-to-text",children:t.replyTo.text})]}),
44
- /* @__PURE__ */e("div",{className:"message-text",children:/* @__PURE__ */e(Wp,{content:t.text})}),t.buttons&&t.buttons.length>0&&/* @__PURE__ */e("div",{className:"message-buttons",children:t.buttons.map(t=>/* @__PURE__ */e("button",{className:`message-button ${t.fullWidth?"full-width":""} ${"suggested_action"===t.action?"suggested-action":""}`,onClick:()=>de(t.value,t.action,t?.extraData),type:"button",children:t.text},t.id))}),t.actionData&&("pending"===t.actionData.status||"success"===t.actionData.status||"submitted"===t.actionData.status)&&/* @__PURE__ */e(oh,{disabled:"success"===t.actionData.status||"submitted"===t.actionData.status,action:t.actionData.action,initialValues:t.actionData.parameters,onSubmit:(e,n)=>{me(e,n,t.id),setTimeout(()=>{H.current?.scrollIntoView({behavior:"smooth"})},100)},onCancel:()=>we(t.id),isSubmitting:F[t.id]||!1,tokenInfo:t.actionData.tokenInfo,nftInfo:t.actionData.nftInfo}),t.actionData&&"submitted"===t.actionData.status&&/* @__PURE__ */e("div",{className:"action-status action-status-submitted",children:v("txProcessing")}),t.actionData&&"fail"===t.actionData.status&&/* @__PURE__ */e("div",{className:"action-status action-status-fail",children:v("actionFail")}),
44
+ /* @__PURE__ */e("div",{className:"message-text",children:/* @__PURE__ */e(Wp,{content:t.text})}),t.buttons&&t.buttons.length>0&&/* @__PURE__ */e("div",{className:"message-buttons",children:t.buttons.map(t=>/* @__PURE__ */e("button",{className:`message-button ${t.fullWidth?"full-width":""} ${"suggested_action"===t.action?"suggested-action":""}`,onClick:()=>fe(t.value,t.action,t?.extraData),type:"button",children:t.text},t.id))}),t.actionData&&("pending"===t.actionData.status||"success"===t.actionData.status||"submitted"===t.actionData.status)&&/* @__PURE__ */e(oh,{disabled:"success"===t.actionData.status||"submitted"===t.actionData.status,action:t.actionData.action,initialValues:t.actionData.parameters,onSubmit:(e,n)=>{me(e,n,t.id),setTimeout(()=>{H.current?.scrollIntoView({behavior:"smooth"})},100)},onCancel:()=>we(t.id),isSubmitting:F[t.id]||!1,tokenInfo:t.actionData.tokenInfo,nftInfo:t.actionData.nftInfo}),t.actionData&&"submitted"===t.actionData.status&&/* @__PURE__ */e("div",{className:"action-status action-status-submitted",children:v("txProcessing")}),t.actionData&&"fail"===t.actionData.status&&/* @__PURE__ */e("div",{className:"action-status action-status-fail",children:v("actionFail")}),
45
45
  /* @__PURE__ */n("div",{className:"message-timestamp",children:[t.timestamp.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),"user"===t.sender&&/* @__PURE__ */e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"check-icon",children:/* @__PURE__ */e("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})]},t.id)),P&&/* @__PURE__ */e("div",{className:"message message-bot typing-indicator",role:"status","aria-label":v("botIsTyping"),children:/* @__PURE__ */n("div",{className:"message-bubble",children:[
46
46
  /* @__PURE__ */e("span",{className:"typing-dot"}),
47
47
  /* @__PURE__ */e("span",{className:"typing-dot"}),
@@ -57,6 +57,6 @@ return e("div",{className:"message-content",children:o})},jp=({isOpen:r,onClose:
57
57
  /* @__PURE__ */e("button",{className:"reply-preview-close",onClick:()=>D(null),"aria-label":v("cancelReply"),type:"button",children:/* @__PURE__ */e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:/* @__PURE__ */e("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),
58
58
  /* @__PURE__ */n("div",{className:"chat-modal-input-row",children:[
59
59
  /* @__PURE__ */e("input",{ref:W,type:"text",placeholder:v("messagePlaceholder"),value:B,onChange:e=>M(e.target.value),onKeyPress:ge,disabled:P,"aria-label":"Message input"}),
60
- /* @__PURE__ */e("button",{className:"send-button",onClick:()=>{fe()},"aria-label":v("sendMessage"),disabled:P||""===B?.trim(),type:"button",children:/* @__PURE__ */e("img",{src:"data:image/svg+xml,%3csvg%20width='36'%20height='36'%20viewBox='0%200%2036%2036'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='36'%20height='36'%20rx='18'%20fill='%232358B2'/%3e%3cmask%20id='mask0_1924_16177'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='11'%20y='10'%20width='17'%20height='16'%3e%3crect%20x='11.334'%20y='10'%20width='16'%20height='16'%20fill='url(%23pattern0_1924_16177)'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1924_16177)'%3e%3crect%20x='11.334'%20y='10'%20width='16'%20height='16'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cpattern%20id='pattern0_1924_16177'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_1924_16177'%20transform='scale(0.00195312)'/%3e%3c/pattern%3e%3cimage%20id='image0_1924_16177'%20width='512'%20height='512'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOgAAADoABlffMYAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d13uGRlme7/79M0ijnrKM6ImHAMmHXGgB7zKJhzAAMgZjFg4DfnzO8ISM4gKIKIEgwImAAjiAQRCSoCCgaCgOQcn/PHu5reNHt37121qt61qr6f6+pLbLr3vi/Seuqtp947MhNJkjRdFtUOIEmSxs8BQJKkKeQAIEnSFHIAkCRpCjkASJI0hRbXDjCoiFgMPBB40Iwf9wZimV96E/AP4PzmxwWZeeMYo0qS1DnRl48BRsSqwFrA85ofa3DHh/18JHAxcCrwmyU/MvPslqJKkt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ACsBP8UbAms7D9gG2DMzr60dRpLUT/MeAAAi4sHAycADR5ZIc/kLsCWwd2beUDmLJKnnFjQAAETEcylXyK4ykkRa1pnA5sDXbeWTJLVlwQMAQESsA3wHWKn1RFriNGAz4Ju28kmS2rbcewDmkpmHAu+l3Cuvdp0IvBpYMzMP9OEvSRqFgQYAgMzcB/hUe1Gm3i+Bl2Xm0zPzkBzkaEaSpHka6C2A232BiI8DW+MdAYP6MaWS9xe1g0iSpsfQAwBARLwZ+Co2By7E9ygP/uNrB5EkTZ9WBgCAiHgBcDAWBy3PrcC3KZW8p9QOI0maXq0NAAAR8QTgEODhrX3RyXAL8A1gi8w8vXYYSZJaHQAAIuKewJ7Am1r9wv10I+WtkS9k5tm1w0iStETrA8BtXzjiPZSSmruO5Bt023XAl4GtMvPc2mEkSVrWyAYAgIhYA9gPeOrIvkm3XA3sDmybmRfWDiNJ0lxGOgAARMQiYH3g88D9R/rN6rkc2BnYITMvrR1GkqQVGfkAcNs3irgP8P8DGzE5Vwj/E9ge2CUzr6wdRpKk+RrbAHDbNyyfFPgf4FUMcRNhZRdQLj/aw0peSVIfjX0AuO0bRzwK2BhYF7hLlRALdwKwG3CAlbySpD6rNgDcFiDiAcAHgXcCq1UNM7trKZ/h3z0zT6odRpKkNlQfAGaKiH8HXtH8eDawuFKUG4GjgO8C+2XmFZVySJI0Ep0aAGaKiHsBL6EMAy8HHjjib3ku8EPg+8BPMvPqEX8/SZKq6ewAMFNEBPB0ykCwOvDgGT/uz8KWCW8G/gT8fsaP07yiV5I0TXoxACxPRCymnA7MHAoeAFwPXAFcOeN/LwPOycwb66SVJKkbej8ASJKkhevr5/AlSdIQHAAkSZpCDgCSJE0hBwBJkqaQA4AkSVPo/wH9hnZgmG1pVwAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",alt:"Send",width:44,height:44})})]})]})]})}):null},Yp=({position:r,theme:s,defaultOpen:c,onOpen:u,onClose:l,onTransaction:f,chatTitle:d,welcomeMessage:h,customSuggestions:p,additionalSuggestions:m,buttonIcon:w,chatIcon:y,customChatButton:b,styleButtonChat:A})=>{const{account:k,chainId:T}=Ed(),[E,x]=o(c),C=v;i(()=>{c&&u&&u()},[]),i(()=>{if("undefined"==typeof window)return;const e=document.body,t=document.documentElement,n=e.style.overscrollBehavior,r=t.style.overscrollBehavior,o=e.style.overflow;return E&&(e.style.overscrollBehavior="none",t.style.overscrollBehavior="none",e.style.overflow="hidden"),()=>{e.style.overscrollBehavior=n,t.style.overscrollBehavior=r,e.style.overflow=o}},[E]);const I=a(()=>{x(!0),u?.()},[u]),S=a(()=>{x(!1),l?.()},[l]),N=a(()=>{E?S():I()},[E,I,S]),B={position:"fixed",["bottom-right"===r?"right":"left"]:s.offset?.x??20,bottom:s.offset?.y??20,zIndex:s.zIndex??9999};return vd(k?.address||"")&&T?C.length>0&&!C.includes(window.location.origin)&&!window.location.href.startsWith("http://localhost")?/* @__PURE__ */e(t,{}):/* @__PURE__ */n("div",{style:{...B,...A},role:"complementary","aria-label":"Chat widget",children:[
60
+ /* @__PURE__ */e("button",{className:"send-button",onClick:()=>{de()},"aria-label":v("sendMessage"),disabled:P||""===B?.trim(),type:"button",children:/* @__PURE__ */e("img",{src:"data:image/svg+xml,%3csvg%20width='36'%20height='36'%20viewBox='0%200%2036%2036'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='36'%20height='36'%20rx='18'%20fill='%232358B2'/%3e%3cmask%20id='mask0_1924_16177'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='11'%20y='10'%20width='17'%20height='16'%3e%3crect%20x='11.334'%20y='10'%20width='16'%20height='16'%20fill='url(%23pattern0_1924_16177)'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1924_16177)'%3e%3crect%20x='11.334'%20y='10'%20width='16'%20height='16'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cpattern%20id='pattern0_1924_16177'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_1924_16177'%20transform='scale(0.00195312)'/%3e%3c/pattern%3e%3cimage%20id='image0_1924_16177'%20width='512'%20height='512'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOgAAADoABlffMYAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d13uGRlme7/79M0ijnrKM6ImHAMmHXGgB7zKJhzAAMgZjFg4DfnzO8ISM4gKIKIEgwImAAjiAQRCSoCCgaCgOQcn/PHu5reNHt37121qt61qr6f6+pLbLr3vi/Seuqtp947MhNJkjRdFtUOIEmSxs8BQJKkKeQAIEnSFHIAkCRpCjkASJI0hRbXDjCoiFgMPBB40Iwf9wZimV96E/AP4PzmxwWZeeMYo0qS1DnRl48BRsSqwFrA85ofa3DHh/18JHAxcCrwmyU/MvPslqJKktR5nR0AImJ1lj7s1wJWH/G3vAw4EjgE+EFmXj7i7ydJUjWdGgAi4uXA2ykP/YdWjHITcBRlGDggMy+umEWSpNZVHwAiYmXgrcAngMdXDTO7G4ADgZ0z88TaYSRJakO1ASAi7glsAHwUWLVKiIU7FtgZ+FZm3lQ7jCRJgxr7ABARDwE+AmwI3Gus37w9fwW2AvbKzBtqh5EkaaHGNgBExKOBz1CO++80lm86ehcA2wB7ZOY1tcNIkjRfIx8Ams/rbwL8f8CdR/rN6vknsD2wS2ZeWTuMJEkrMtIBICKeCuwFrDmyb9Itl1N2BHbMzEtqh5EkaS4jGQCaV/3/F/gksFLr36D7rgZ2B7bNzAtrh5EkaVmtDwAR8UDgIMrlPdPueuDLwFaZ+ffaYSRJWqLVASAing58h7qX+HTRjcC+wBcy88+1w0iS1NoAEBHvohx7T+qiXxtuAfYHNs/M02uHkSRNr1YGgIj4BLD18HGmRgLfBjbLzJNrh5E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2BnYITMvrR1GkqQVGfkAcNs3irgP8P8DGzE5Vwj/E9ge2CUzr6wdRpKk+RrbAHDbNyyfFPgf4FUMcRNhZRdQLj/aw0peSVIfjX0AuO0bRzwK2BhYF7hLlRALdwKwG3CAlbySpD6rNgDcFiDiAcAHgXcCq1UNM7trKZ/h3z0zT6odRpKkNlQfAGaKiH8HXtH8eDawuFKUG4GjgO8C+2XmFZVySJI0Ep0aAGaKiHsBL6EMAy8HHjjib3ku8EPg+8BPMvPqEX8/SZKq6ewAMFNEBPB0ykCwOvDgGT/uz8KWCW8G/gT8fsaP07yiV5I0TXoxACxPRCymnA7MHAoeAFwPXAFcOeN/LwPOycwb66SVJKkbej8ASJKkhevr5/AlSdIQHAAkSZpCDgCSJE0hBwBJkqaQA4AkSVPo/wH9hnZgmG1pVwAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",alt:"Send",width:44,height:44})})]})]})]})}):null},Yp=({position:r,theme:s,defaultOpen:c,onOpen:u,onClose:l,onTransaction:d,chatTitle:f,welcomeMessage:h,customSuggestions:p,additionalSuggestions:m,buttonIcon:w,chatIcon:y,customChatButton:b,styleButtonChat:A})=>{const{account:k,chainId:T}=Ef(),[E,x]=o(c),C=v;i(()=>{c&&u&&u()},[]),i(()=>{if("undefined"==typeof window)return;const e=document.body,t=document.documentElement,n=e.style.overscrollBehavior,r=t.style.overscrollBehavior,o=e.style.overflow;return E&&(e.style.overscrollBehavior="none",t.style.overscrollBehavior="none",e.style.overflow="hidden"),()=>{e.style.overscrollBehavior=n,t.style.overscrollBehavior=r,e.style.overflow=o}},[E]);const I=a(()=>{x(!0),u?.()},[u]),S=a(()=>{x(!1),l?.()},[l]),N=a(()=>{E?S():I()},[E,I,S]),B={position:"fixed",["bottom-right"===r?"right":"left"]:s.offset?.x??20,bottom:s.offset?.y??20,zIndex:s.zIndex??9999};return vf(k?.address||"")&&T?C.length>0&&!C.includes(window.location.origin)&&!window.location.href.startsWith("http://localhost")?/* @__PURE__ */e(t,{}):/* @__PURE__ */n("div",{style:{...B,...A},role:"complementary","aria-label":"Chat widget",children:[
61
61
  /* @__PURE__ */e(g,{buttonSize:s.buttonSize,onClick:N,customIcon:w,customChatButton:b}),
62
- /* @__PURE__ */e(jp,{isOpen:E,onClose:S,onTransaction:f,position:r,modalChatStyle:s.modalChatStyle,chatTitle:d,welcomeMessage:h,customSuggestions:p,additionalSuggestions:m,chatIcon:y})]}):/* @__PURE__ */e(t,{})},zp=({position:t="bottom-right",theme:n={},defaultOpen:r=!1,onOpen:o,onClose:i,account:a,onTransaction:s,language:c="en",rpcUrls:u,chatTitle:l,welcomeMessage:f,customSuggestions:d,additionalSuggestions:h,buttonIcon:p,chatIcon:w,customChatButton:g,styleButtonChat:y})=>"undefined"==typeof window?null:/* @__PURE__ */e(Ld,{initialConfig:{position:t,theme:n,rpcUrls:u},children:/* @__PURE__ */e(xd,{initialAccount:a,children:/* @__PURE__ */e(m,{initialLanguage:c,children:/* @__PURE__ */e(Yp,{position:t,theme:n,defaultOpen:r,onOpen:o,onClose:i,onTransaction:s,chatTitle:l,welcomeMessage:f,customSuggestions:d,additionalSuggestions:h,buttonIcon:p,chatIcon:w,customChatButton:g,styleButtonChat:y})})})});export{zp as ChatWidget,hh as clearChat};
62
+ /* @__PURE__ */e(jp,{isOpen:E,onClose:S,onTransaction:d,position:r,modalChatStyle:s.modalChatStyle,chatTitle:f,welcomeMessage:h,customSuggestions:p,additionalSuggestions:m,chatIcon:y})]}):/* @__PURE__ */e(t,{})},zp=({position:t="bottom-right",theme:n={},defaultOpen:r=!1,onOpen:o,onClose:i,account:a,onTransaction:s,language:c="en",rpcUrls:u,chatTitle:l,welcomeMessage:d,customSuggestions:f,additionalSuggestions:h,buttonIcon:p,chatIcon:w,customChatButton:g,styleButtonChat:y})=>"undefined"==typeof window?null:/* @__PURE__ */e(Lf,{initialConfig:{position:t,theme:n,rpcUrls:u},children:/* @__PURE__ */e(xf,{initialAccount:a,children:/* @__PURE__ */e(m,{initialLanguage:c,children:/* @__PURE__ */e(Yp,{position:t,theme:n,defaultOpen:r,onOpen:o,onClose:i,onTransaction:s,chatTitle:l,welcomeMessage:d,customSuggestions:f,additionalSuggestions:h,buttonIcon:p,chatIcon:w,customChatButton:g,styleButtonChat:y})})})});export{zp as ChatWidget,hh as clearChat};