@dhedge/trading-widget 3.5.2 → 3.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{index-56e1579c.js → index-03be1f78.js} +7 -4
- package/{index-ba7b91f3.cjs → index-c3ce9289.cjs} +2 -2
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/{pyth-adapter-7ae3452f.js → pyth-adapter-55ee37f4.js} +1 -1
- package/{pyth-adapter-a31a3696.cjs → pyth-adapter-6fb3a3f6.cjs} +1 -1
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-ba7b91f3.cjs"),s=require("viem"),t=require("wagmi");require("react");require("@tanstack/react-query");exports.AAVE_LENDING_POOL_V2_ADDRESS_POLYGON=e.AAVE_LENDING_POOL_V2_ADDRESS_POLYGON;exports.AAVE_LENDING_POOL_V3_ADDRESS_ARBITRUM=e.AAVE_LENDING_POOL_V3_ADDRESS_ARBITRUM;exports.AAVE_LENDING_POOL_V3_ADDRESS_BASE=e.AAVE_LENDING_POOL_V3_ADDRESS_BASE;exports.AAVE_LENDING_POOL_V3_ADDRESS_OPTIMISM=e.AAVE_LENDING_POOL_V3_ADDRESS_OPTIMISM;exports.AAVE_LENDING_POOL_V3_ADDRESS_POLYGON=e.AAVE_LENDING_POOL_V3_ADDRESS_POLYGON;exports.ALCHEMY_RPC_URL_MAP=e.ALCHEMY_RPC_URL_MAP;exports.AaveLendingPoolAbi=e.AaveLendingPoolAbi;exports.AddressZero=e.AddressZero;exports.BRIDGED_TOKENS_SYMBOLS=e.BRIDGED_TOKENS_SYMBOLS;exports.BRIDGED_USDC_ARBITRUM=e.BRIDGED_USDC_ARBITRUM;exports.BRIDGED_USDC_OPTIMISM=e.BRIDGED_USDC_OPTIMISM;exports.BRIDGED_USDC_POLYGON=e.BRIDGED_USDC_POLYGON;exports.CBETH_BASE=e.CBETH_BASE;exports.CHAIN_MAP=e.CHAIN_MAP;exports.CHAIN_NATIVE_TOKENS=e.CHAIN_NATIVE_TOKENS;exports.CURRENCY_SYMBOL_MAP=e.CURRENCY_SYMBOL_MAP;exports.DAI_OPTIMISM=e.DAI_OPTIMISM;exports.DAI_POLYGON=e.DAI_POLYGON;exports.DEFAULT_DEPOSIT_METHOD=e.DEFAULT_DEPOSIT_METHOD;exports.DEFAULT_DEPOSIT_SLIPPAGE=e.DEFAULT_DEPOSIT_SLIPPAGE;exports.DEFAULT_DEPOSIT_SLIPPAGE_SCALE=e.DEFAULT_DEPOSIT_SLIPPAGE_SCALE;exports.DEFAULT_ERROR_MESSAGE=e.DEFAULT_ERROR_MESSAGE;exports.DEFAULT_LOCK_TIME=e.DEFAULT_LOCK_TIME;exports.DEFAULT_MULTI_ASSET_WITHDRAW_METHOD=e.DEFAULT_MULTI_ASSET_WITHDRAW_METHOD;exports.DEFAULT_POLLING_INTERVAL=e.DEFAULT_POLLING_INTERVAL;exports.DEFAULT_PRECISION=e.DEFAULT_PRECISION;exports.DEFAULT_PROMISE_TIMEOUT_MS=e.DEFAULT_PROMISE_TIMEOUT_MS;exports.DEFAULT_SIMULATION_ERROR=e.DEFAULT_SIMULATION_ERROR;exports.DEFAULT_WITHDRAW_SLIPPAGE=e.DEFAULT_WITHDRAW_SLIPPAGE;exports.DHEDGE_SYNTHETIX_V3_ASSETS_MAP=e.DHEDGE_SYNTHETIX_V3_ASSETS_MAP;exports.DHEDGE_SYNTHETIX_V3_VAULT_ADDRESSES=e.DHEDGE_SYNTHETIX_V3_VAULT_ADDRESSES;exports.DHedgeStakingV2Abi=e.DHedgeStakingV2Abi;exports.EASY_SWAPPER_V2_ADDRESS_ARBITRUM=e.EASY_SWAPPER_V2_ADDRESS_ARBITRUM;exports.EASY_SWAPPER_V2_ADDRESS_BASE=e.EASY_SWAPPER_V2_ADDRESS_BASE;exports.EASY_SWAPPER_V2_ADDRESS_OPTIMISM=e.EASY_SWAPPER_V2_ADDRESS_OPTIMISM;exports.EASY_SWAPPER_V2_ADDRESS_POLYGON=e.EASY_SWAPPER_V2_ADDRESS_POLYGON;exports.EMPTY_POOL_CONFIG=e.EMPTY_POOL_CONFIG;exports.EasySwapperV2Abi=e.EasySwapperV2Abi;exports.EstimationError=e.EstimationError;exports.FACTORY_ADDRESS_ARBITRUM=e.FACTORY_ADDRESS_ARBITRUM;exports.FACTORY_ADDRESS_BASE=e.FACTORY_ADDRESS_BASE;exports.FACTORY_ADDRESS_OPTIMISM=e.FACTORY_ADDRESS_OPTIMISM;exports.FACTORY_ADDRESS_POLYGON=e.FACTORY_ADDRESS_POLYGON;exports.GAS_ESTIMATION_ERROR=e.GAS_ESTIMATION_ERROR;exports.GAS_LIMIT_BUFFER_COEFF=e.GAS_LIMIT_BUFFER_COEFF;exports.IERC7412Abi=e.IERC7412Abi;exports.ITrustedMulticallForwarderAbi=e.ITrustedMulticallForwarderAbi;exports.LINK_OPTIMISM=e.LINK_OPTIMISM;exports.MANAGER_FEE_DENOMINATOR=e.MANAGER_FEE_DENOMINATOR;exports.MAX_GAS_LIMIT_MAP=e.MAX_GAS_LIMIT_MAP;exports.MULTI_ASSET_TOKEN=e.MULTI_ASSET_TOKEN;exports.MaxUint256=e.MaxUint256;exports.NATIVE_TOKEN_DEPOSIT_GAS_LIMIT=e.NATIVE_TOKEN_DEPOSIT_GAS_LIMIT;exports.PAXG_POLYGON=e.PAXG_POLYGON;exports.PYTH_API_LINK=e.PYTH_API_LINK;exports.PoolFactoryAbi=e.PoolFactoryAbi;exports.PoolLogicAbi=e.PoolLogicAbi;exports.PoolManagerLogicAbi=e.PoolManagerLogicAbi;exports.RETH_BASE=e.RETH_BASE;exports.REWARD_DISTRIBUTION_ADDRESS_OPTIMISM=e.REWARD_DISTRIBUTION_ADDRESS_OPTIMISM;exports.RewardDistributionAbi=e.RewardDistributionAbi;exports.SETH_OPTIMISM=e.SETH_OPTIMISM;exports.SHORTEN_POLLING_INTERVAL=e.SHORTEN_POLLING_INTERVAL;exports.SIMULATION_TIMEOUT_ERROR=e.SIMULATION_TIMEOUT_ERROR;exports.STAKING_V2_ADDRESS_OPTIMISM=e.STAKING_V2_ADDRESS_OPTIMISM;exports.SUSD_OPTIMISM=e.SUSD_OPTIMISM;exports.SYNTHETIX_V3_CORE_ADDRESS_ARBITRUM=e.SYNTHETIX_V3_CORE_ADDRESS_ARBITRUM;exports.SYNTHETIX_V3_CORE_ADDRESS_BASE=e.SYNTHETIX_V3_CORE_ADDRESS_BASE;exports.SYNTHETIX_V3_POSITION_DEBT_ARGUMENTS=e.SYNTHETIX_V3_POSITION_DEBT_ARGUMENTS;exports.SynthetixV3AssetGuard=e.SynthetixV3AssetGuard;exports.SynthetixV3ContractGuard=e.SynthetixV3ContractGuard;exports.SynthetixV3CoreAbi=e.SynthetixV3CoreAbi;exports.TBTC_ARBITRUM=e.TBTC_ARBITRUM;exports.TBTC_BASE=e.TBTC_BASE;exports.TBTC_OPTIMISM=e.TBTC_OPTIMISM;exports.TBTC_POLYGON=e.TBTC_POLYGON;exports.TRADING_LOG_EVENT_PARAM=e.TRADING_LOG_EVENT_PARAM;exports.TRADING_PANEL_LOG_EVENT=e.TRADING_PANEL_LOG_EVENT;exports.TradingPanelProvider=e.TradingPanelProvider;exports.TradingWidget=e.TradingWidget;exports.USDCBC_BASE=e.USDCBC_BASE;exports.USDC_ARBITRUM=e.USDC_ARBITRUM;exports.USDC_BASE=e.USDC_BASE;exports.USDC_OPTIMISM=e.USDC_OPTIMISM;exports.USDC_POLYGON=e.USDC_POLYGON;exports.USDT_ARBITRUM=e.USDT_ARBITRUM;exports.USDT_OPTIMISM=e.USDT_OPTIMISM;exports.USDT_POLYGON=e.USDT_POLYGON;exports.WBTC_ARBITRUM=e.WBTC_ARBITRUM;exports.WBTC_OPTIMISM=e.WBTC_OPTIMISM;exports.WBTC_POLYGON=e.WBTC_POLYGON;exports.WETH_ARBITRUM=e.WETH_ARBITRUM;exports.WETH_BASE=e.WETH_BASE;exports.WETH_BY_CHAIN_ID=e.WETH_BY_CHAIN_ID;exports.WETH_OPTIMISM=e.WETH_OPTIMISM;exports.WETH_POLYGON=e.WETH_POLYGON;exports.WPOL_POLYGON=e.WPOL_POLYGON;exports.WSTETH_ARBITRUM=e.WSTETH_ARBITRUM;exports.WSTETH_BASE=e.WSTETH_BASE;exports.WSTETH_OPTIMISM=e.WSTETH_OPTIMISM;exports.arbitrum=e.arbitrum;exports.base=e.base;exports.clientSide=e.clientSide;exports.commify=e.commify;exports.contractsAbisMap=e.contractsAbisMap;exports.contractsAddressesMap=e.contractsAddressesMap;exports.formatByCurrency=e.formatByCurrency;exports.formatNumberToLimitedDecimals=e.formatNumberToLimitedDecimals;exports.formatNumeratorToPercentage=e.formatNumeratorToPercentage;exports.formatPercentage=e.formatPercentage;exports.formatToUsd=e.formatToUsd;exports.getContractAbiById=e.getContractAbiById;exports.getContractAddressById=e.getContractAddressById;exports.getConventionalTokenPriceDecimals=e.getConventionalTokenPriceDecimals;exports.getErrorMessage=e.getErrorMessage;exports.getExplorerLink=e.getExplorerLink;exports.getNativeTokenInvestableBalance=e.getNativeTokenInvestableBalance;exports.getPercent=e.getPercent;exports.getPoolFraction=e.getPoolFraction;exports.isBigInt=e.isBigInt;exports.isEqualAddress=e.isEqualAddress;exports.isErrorWithMessage=e.isErrorWithMessage;exports.isFmpAirdropVaultAddress=e.isFmpAirdropVaultAddress;exports.isNativeToken=e.isNativeToken;exports.isNumeric=e.isNumeric;exports.isSynthetixV3Asset=e.isSynthetixV3Asset;exports.isSynthetixV3Vault=e.isSynthetixV3Vault;exports.isZeroAddress=e.isZeroAddress;exports.normalizeNumber=e.normalizeNumber;exports.optimism=e.optimism;exports.polygon=e.polygon;exports.removeInsignificantTrailingZeros=e.removeInsignificantTrailingZeros;exports.shiftBy=e.shiftBy;exports.shortenAddress=e.shortenAddress;exports.toErrorWithMessage=e.toErrorWithMessage;exports.transformAddressForAnalytics=e.transformAddressForAnalytics;exports.useAccount=e.useAccount;exports.useAssetPrice=e.useAssetPrice;exports.useAvailableWithdrawLiquidity=e.useAvailableWithdrawLiquidity;exports.useBalance=e.useBalance;exports.useBrowserStorage=e.useBrowserStorage;exports.useCheckWhitelist=e.useCheckWhitelist;exports.useCompleteWithdrawSwapData=e.useCompleteWithdrawSwapData;exports.useCompleteWithdrawTrackedAssets=e.useCompleteWithdrawTrackedAssets;exports.useContractFunction=e.useContractFunction;exports.useContractPoolComposition=e.useContractPoolComposition;exports.useContractReadErrorLogging=e.useContractReadErrorLogging;exports.useContractReadsErrorLogging=e.useContractReadsErrorLogging;exports.useDebounce=e.useDebounce;exports.useDepositLockTime=e.useDepositLockTime;exports.useDepositProjectedEarnings=e.useDepositProjectedEarnings;exports.useEasySwapperTrackedAssets=e.useEasySwapperTrackedAssets;exports.useExchangeRate=e.useExchangeRate;exports.useFlatmoneyPointsUserBalances=e.useFlatmoneyPointsUserBalances;exports.useGasPrice=e.useGasPrice;exports.useHasNestedVaultInComposition=e.useHasNestedVaultInComposition;exports.useInvalidateOnBlock=e.useInvalidateOnBlock;exports.useInvalidatePoolContractData=e.useInvalidatePoolContractData;exports.useInvalidateTradingQueries=e.useInvalidateTradingQueries;exports.useIsCompleteWithdrawStep=e.useIsCompleteWithdrawStep;exports.useIsDepositTradingPanelType=e.useIsDepositTradingPanelType;exports.useIsDhedgeVaultConnected=e.useIsDhedgeVaultConnected;exports.useIsInsufficientBalance=e.useIsInsufficientBalance;exports.useIsPoolAddress=e.useIsPoolAddress;exports.useIsTradingEnabled=e.useIsTradingEnabled;exports.useIsWalletConnected=e.useIsWalletConnected;exports.useManagerLogicAddress=e.useManagerLogicAddress;exports.useNetwork=e.useNetwork;exports.useOnSimulateTransaction=e.useOnSimulateTransaction;exports.useOnTokenSelector=e.useOnTokenSelector;exports.useOnTransactionError=e.useOnTransactionError;exports.useOnTransactionEstimationError=e.useOnTransactionEstimationError;exports.useOnTransactionSuccess=e.useOnTransactionSuccess;exports.usePoolComposition=e.usePoolComposition;exports.usePoolCompositionWithFraction=e.usePoolCompositionWithFraction;exports.usePoolDynamicContractData=e.usePoolDynamicContractData;exports.usePoolFees=e.usePoolFees;exports.usePoolManagerLogicData=e.usePoolManagerLogicData;exports.usePoolTokenPrice=e.usePoolTokenPrice;exports.usePoolsDynamic=e.usePoolsDynamic;exports.useProjectedEarningsCore=e.useProjectedEarningsCore;exports.useRawAssetPrice=e.useRawAssetPrice;exports.useReceiveTokenInput=e.useReceiveTokenInput;exports.useReferralProgram=e.useReferralProgram;exports.useSendTokenInput=e.useSendTokenInput;exports.useSetPoolAddress=e.useSetPoolAddress;exports.useSetTradingType=e.useSetTradingType;exports.useStaticCallQuery=e.useStaticCallQuery;exports.useSynthetixV3AssetBalance=e.useSynthetixV3AssetBalance;exports.useSynthetixV3OraclesUpdate=e.useSynthetixV3OraclesUpdate;exports.useTokenAllowance=e.useTokenAllowance;exports.useTotalFundValueMutable=e.useTotalFundValueMutable;exports.useTradingPanelActions=e.useTradingPanelActions;exports.useTradingPanelLogger=e.useTradingPanelLogger;exports.useTradingPanelModal=e.useTradingPanelModal;exports.useTradingPanelPoolAddress=e.useTradingPanelPoolAddress;exports.useTradingPanelPoolConfig=e.useTradingPanelPoolConfig;exports.useTradingPanelPoolConfigs=e.useTradingPanelPoolConfigs;exports.useTradingPanelPoolFallbackData=e.useTradingPanelPoolFallbackData;exports.useTradingPanelSettings=e.useTradingPanelSettings;exports.useTradingPanelState=e.useTradingPanelState;exports.useTradingPanelTransactions=e.useTradingPanelTransactions;exports.useTradingPanelType=e.useTradingPanelType;exports.useTradingResultHandling=e.useTradingResultHandling;exports.useTradingSettleHandler=e.useTradingSettleHandler;exports.useUpdatePoolConfig=e.useUpdatePoolConfig;exports.useUpdatePoolFallbackData=e.useUpdatePoolFallbackData;exports.useUpdateReceiveTokenInput=e.useUpdateReceiveTokenInput;exports.useUpdateSendTokenInput=e.useUpdateSendTokenInput;exports.useUpdateTradingModal=e.useUpdateTradingModal;exports.useUpdateTradingSettings=e.useUpdateTradingSettings;exports.useUserTokenBalance=e.useUserTokenBalance;exports.useVaultDepositTokens=e.useVaultDepositTokens;exports.useVaultVestedPoints=e.useVaultVestedPoints;exports.validateLoggerEventParams=e.validateLoggerEventParams;Object.defineProperty(exports,"decodeErrorResult",{enumerable:!0,get:()=>s.decodeErrorResult});Object.defineProperty(exports,"encodeFunctionData",{enumerable:!0,get:()=>s.encodeFunctionData});Object.defineProperty(exports,"erc20Abi",{enumerable:!0,get:()=>s.erc20Abi});Object.defineProperty(exports,"formatEther",{enumerable:!0,get:()=>s.formatEther});Object.defineProperty(exports,"formatUnits",{enumerable:!0,get:()=>s.formatUnits});Object.defineProperty(exports,"hexToString",{enumerable:!0,get:()=>s.hexToString});Object.defineProperty(exports,"trim",{enumerable:!0,get:()=>s.trim});Object.defineProperty(exports,"useBlockNumber",{enumerable:!0,get:()=>t.useBlockNumber});Object.defineProperty(exports,"useConnect",{enumerable:!0,get:()=>t.useConnect});Object.defineProperty(exports,"useDisconnect",{enumerable:!0,get:()=>t.useDisconnect});Object.defineProperty(exports,"usePublicClient",{enumerable:!0,get:()=>t.usePublicClient});Object.defineProperty(exports,"useReadContract",{enumerable:!0,get:()=>t.useReadContract});Object.defineProperty(exports,"useReadContracts",{enumerable:!0,get:()=>t.useReadContracts});Object.defineProperty(exports,"useSendTransaction",{enumerable:!0,get:()=>t.useSendTransaction});Object.defineProperty(exports,"useWaitForTransactionReceipt",{enumerable:!0,get:()=>t.useWaitForTransactionReceipt});Object.defineProperty(exports,"useWalletClient",{enumerable:!0,get:()=>t.useWalletClient});Object.defineProperty(exports,"useWriteContract",{enumerable:!0,get:()=>t.useWriteContract});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-c3ce9289.cjs"),s=require("viem"),t=require("wagmi");require("react");require("@tanstack/react-query");exports.AAVE_LENDING_POOL_V2_ADDRESS_POLYGON=e.AAVE_LENDING_POOL_V2_ADDRESS_POLYGON;exports.AAVE_LENDING_POOL_V3_ADDRESS_ARBITRUM=e.AAVE_LENDING_POOL_V3_ADDRESS_ARBITRUM;exports.AAVE_LENDING_POOL_V3_ADDRESS_BASE=e.AAVE_LENDING_POOL_V3_ADDRESS_BASE;exports.AAVE_LENDING_POOL_V3_ADDRESS_OPTIMISM=e.AAVE_LENDING_POOL_V3_ADDRESS_OPTIMISM;exports.AAVE_LENDING_POOL_V3_ADDRESS_POLYGON=e.AAVE_LENDING_POOL_V3_ADDRESS_POLYGON;exports.ALCHEMY_RPC_URL_MAP=e.ALCHEMY_RPC_URL_MAP;exports.AaveLendingPoolAbi=e.AaveLendingPoolAbi;exports.AddressZero=e.AddressZero;exports.BRIDGED_TOKENS_SYMBOLS=e.BRIDGED_TOKENS_SYMBOLS;exports.BRIDGED_USDC_ARBITRUM=e.BRIDGED_USDC_ARBITRUM;exports.BRIDGED_USDC_OPTIMISM=e.BRIDGED_USDC_OPTIMISM;exports.BRIDGED_USDC_POLYGON=e.BRIDGED_USDC_POLYGON;exports.CBETH_BASE=e.CBETH_BASE;exports.CHAIN_MAP=e.CHAIN_MAP;exports.CHAIN_NATIVE_TOKENS=e.CHAIN_NATIVE_TOKENS;exports.CURRENCY_SYMBOL_MAP=e.CURRENCY_SYMBOL_MAP;exports.DAI_OPTIMISM=e.DAI_OPTIMISM;exports.DAI_POLYGON=e.DAI_POLYGON;exports.DEFAULT_DEPOSIT_METHOD=e.DEFAULT_DEPOSIT_METHOD;exports.DEFAULT_DEPOSIT_SLIPPAGE=e.DEFAULT_DEPOSIT_SLIPPAGE;exports.DEFAULT_DEPOSIT_SLIPPAGE_SCALE=e.DEFAULT_DEPOSIT_SLIPPAGE_SCALE;exports.DEFAULT_ERROR_MESSAGE=e.DEFAULT_ERROR_MESSAGE;exports.DEFAULT_LOCK_TIME=e.DEFAULT_LOCK_TIME;exports.DEFAULT_MULTI_ASSET_WITHDRAW_METHOD=e.DEFAULT_MULTI_ASSET_WITHDRAW_METHOD;exports.DEFAULT_POLLING_INTERVAL=e.DEFAULT_POLLING_INTERVAL;exports.DEFAULT_PRECISION=e.DEFAULT_PRECISION;exports.DEFAULT_PROMISE_TIMEOUT_MS=e.DEFAULT_PROMISE_TIMEOUT_MS;exports.DEFAULT_SIMULATION_ERROR=e.DEFAULT_SIMULATION_ERROR;exports.DEFAULT_WITHDRAW_SLIPPAGE=e.DEFAULT_WITHDRAW_SLIPPAGE;exports.DHEDGE_SYNTHETIX_V3_ASSETS_MAP=e.DHEDGE_SYNTHETIX_V3_ASSETS_MAP;exports.DHEDGE_SYNTHETIX_V3_VAULT_ADDRESSES=e.DHEDGE_SYNTHETIX_V3_VAULT_ADDRESSES;exports.DHedgeStakingV2Abi=e.DHedgeStakingV2Abi;exports.EASY_SWAPPER_V2_ADDRESS_ARBITRUM=e.EASY_SWAPPER_V2_ADDRESS_ARBITRUM;exports.EASY_SWAPPER_V2_ADDRESS_BASE=e.EASY_SWAPPER_V2_ADDRESS_BASE;exports.EASY_SWAPPER_V2_ADDRESS_OPTIMISM=e.EASY_SWAPPER_V2_ADDRESS_OPTIMISM;exports.EASY_SWAPPER_V2_ADDRESS_POLYGON=e.EASY_SWAPPER_V2_ADDRESS_POLYGON;exports.EMPTY_POOL_CONFIG=e.EMPTY_POOL_CONFIG;exports.EasySwapperV2Abi=e.EasySwapperV2Abi;exports.EstimationError=e.EstimationError;exports.FACTORY_ADDRESS_ARBITRUM=e.FACTORY_ADDRESS_ARBITRUM;exports.FACTORY_ADDRESS_BASE=e.FACTORY_ADDRESS_BASE;exports.FACTORY_ADDRESS_OPTIMISM=e.FACTORY_ADDRESS_OPTIMISM;exports.FACTORY_ADDRESS_POLYGON=e.FACTORY_ADDRESS_POLYGON;exports.GAS_ESTIMATION_ERROR=e.GAS_ESTIMATION_ERROR;exports.GAS_LIMIT_BUFFER_COEFF=e.GAS_LIMIT_BUFFER_COEFF;exports.IERC7412Abi=e.IERC7412Abi;exports.ITrustedMulticallForwarderAbi=e.ITrustedMulticallForwarderAbi;exports.LINK_OPTIMISM=e.LINK_OPTIMISM;exports.MANAGER_FEE_DENOMINATOR=e.MANAGER_FEE_DENOMINATOR;exports.MAX_GAS_LIMIT_MAP=e.MAX_GAS_LIMIT_MAP;exports.MULTI_ASSET_TOKEN=e.MULTI_ASSET_TOKEN;exports.MaxUint256=e.MaxUint256;exports.NATIVE_TOKEN_DEPOSIT_GAS_LIMIT=e.NATIVE_TOKEN_DEPOSIT_GAS_LIMIT;exports.PAXG_POLYGON=e.PAXG_POLYGON;exports.PYTH_API_LINK=e.PYTH_API_LINK;exports.PoolFactoryAbi=e.PoolFactoryAbi;exports.PoolLogicAbi=e.PoolLogicAbi;exports.PoolManagerLogicAbi=e.PoolManagerLogicAbi;exports.RETH_BASE=e.RETH_BASE;exports.REWARD_DISTRIBUTION_ADDRESS_OPTIMISM=e.REWARD_DISTRIBUTION_ADDRESS_OPTIMISM;exports.RewardDistributionAbi=e.RewardDistributionAbi;exports.SETH_OPTIMISM=e.SETH_OPTIMISM;exports.SHORTEN_POLLING_INTERVAL=e.SHORTEN_POLLING_INTERVAL;exports.SIMULATION_TIMEOUT_ERROR=e.SIMULATION_TIMEOUT_ERROR;exports.STAKING_V2_ADDRESS_OPTIMISM=e.STAKING_V2_ADDRESS_OPTIMISM;exports.SUSD_OPTIMISM=e.SUSD_OPTIMISM;exports.SYNTHETIX_V3_CORE_ADDRESS_ARBITRUM=e.SYNTHETIX_V3_CORE_ADDRESS_ARBITRUM;exports.SYNTHETIX_V3_CORE_ADDRESS_BASE=e.SYNTHETIX_V3_CORE_ADDRESS_BASE;exports.SYNTHETIX_V3_POSITION_DEBT_ARGUMENTS=e.SYNTHETIX_V3_POSITION_DEBT_ARGUMENTS;exports.SynthetixV3AssetGuard=e.SynthetixV3AssetGuard;exports.SynthetixV3ContractGuard=e.SynthetixV3ContractGuard;exports.SynthetixV3CoreAbi=e.SynthetixV3CoreAbi;exports.TBTC_ARBITRUM=e.TBTC_ARBITRUM;exports.TBTC_BASE=e.TBTC_BASE;exports.TBTC_OPTIMISM=e.TBTC_OPTIMISM;exports.TBTC_POLYGON=e.TBTC_POLYGON;exports.TRADING_LOG_EVENT_PARAM=e.TRADING_LOG_EVENT_PARAM;exports.TRADING_PANEL_LOG_EVENT=e.TRADING_PANEL_LOG_EVENT;exports.TradingPanelProvider=e.TradingPanelProvider;exports.TradingWidget=e.TradingWidget;exports.USDCBC_BASE=e.USDCBC_BASE;exports.USDC_ARBITRUM=e.USDC_ARBITRUM;exports.USDC_BASE=e.USDC_BASE;exports.USDC_OPTIMISM=e.USDC_OPTIMISM;exports.USDC_POLYGON=e.USDC_POLYGON;exports.USDT_ARBITRUM=e.USDT_ARBITRUM;exports.USDT_OPTIMISM=e.USDT_OPTIMISM;exports.USDT_POLYGON=e.USDT_POLYGON;exports.WBTC_ARBITRUM=e.WBTC_ARBITRUM;exports.WBTC_OPTIMISM=e.WBTC_OPTIMISM;exports.WBTC_POLYGON=e.WBTC_POLYGON;exports.WETH_ARBITRUM=e.WETH_ARBITRUM;exports.WETH_BASE=e.WETH_BASE;exports.WETH_BY_CHAIN_ID=e.WETH_BY_CHAIN_ID;exports.WETH_OPTIMISM=e.WETH_OPTIMISM;exports.WETH_POLYGON=e.WETH_POLYGON;exports.WPOL_POLYGON=e.WPOL_POLYGON;exports.WSTETH_ARBITRUM=e.WSTETH_ARBITRUM;exports.WSTETH_BASE=e.WSTETH_BASE;exports.WSTETH_OPTIMISM=e.WSTETH_OPTIMISM;exports.arbitrum=e.arbitrum;exports.base=e.base;exports.clientSide=e.clientSide;exports.commify=e.commify;exports.contractsAbisMap=e.contractsAbisMap;exports.contractsAddressesMap=e.contractsAddressesMap;exports.formatByCurrency=e.formatByCurrency;exports.formatNumberToLimitedDecimals=e.formatNumberToLimitedDecimals;exports.formatNumeratorToPercentage=e.formatNumeratorToPercentage;exports.formatPercentage=e.formatPercentage;exports.formatToUsd=e.formatToUsd;exports.getContractAbiById=e.getContractAbiById;exports.getContractAddressById=e.getContractAddressById;exports.getConventionalTokenPriceDecimals=e.getConventionalTokenPriceDecimals;exports.getErrorMessage=e.getErrorMessage;exports.getExplorerLink=e.getExplorerLink;exports.getNativeTokenInvestableBalance=e.getNativeTokenInvestableBalance;exports.getPercent=e.getPercent;exports.getPoolFraction=e.getPoolFraction;exports.isBigInt=e.isBigInt;exports.isEqualAddress=e.isEqualAddress;exports.isErrorWithMessage=e.isErrorWithMessage;exports.isFmpAirdropVaultAddress=e.isFmpAirdropVaultAddress;exports.isNativeToken=e.isNativeToken;exports.isNumeric=e.isNumeric;exports.isSynthetixV3Asset=e.isSynthetixV3Asset;exports.isSynthetixV3Vault=e.isSynthetixV3Vault;exports.isZeroAddress=e.isZeroAddress;exports.normalizeNumber=e.normalizeNumber;exports.optimism=e.optimism;exports.polygon=e.polygon;exports.removeInsignificantTrailingZeros=e.removeInsignificantTrailingZeros;exports.shiftBy=e.shiftBy;exports.shortenAddress=e.shortenAddress;exports.toErrorWithMessage=e.toErrorWithMessage;exports.transformAddressForAnalytics=e.transformAddressForAnalytics;exports.useAccount=e.useAccount;exports.useAssetPrice=e.useAssetPrice;exports.useAvailableWithdrawLiquidity=e.useAvailableWithdrawLiquidity;exports.useBalance=e.useBalance;exports.useBrowserStorage=e.useBrowserStorage;exports.useCheckWhitelist=e.useCheckWhitelist;exports.useCompleteWithdrawSwapData=e.useCompleteWithdrawSwapData;exports.useCompleteWithdrawTrackedAssets=e.useCompleteWithdrawTrackedAssets;exports.useContractFunction=e.useContractFunction;exports.useContractPoolComposition=e.useContractPoolComposition;exports.useContractReadErrorLogging=e.useContractReadErrorLogging;exports.useContractReadsErrorLogging=e.useContractReadsErrorLogging;exports.useDebounce=e.useDebounce;exports.useDepositLockTime=e.useDepositLockTime;exports.useDepositProjectedEarnings=e.useDepositProjectedEarnings;exports.useEasySwapperTrackedAssets=e.useEasySwapperTrackedAssets;exports.useExchangeRate=e.useExchangeRate;exports.useFlatmoneyPointsUserBalances=e.useFlatmoneyPointsUserBalances;exports.useGasPrice=e.useGasPrice;exports.useHasNestedVaultInComposition=e.useHasNestedVaultInComposition;exports.useInvalidateOnBlock=e.useInvalidateOnBlock;exports.useInvalidatePoolContractData=e.useInvalidatePoolContractData;exports.useInvalidateTradingQueries=e.useInvalidateTradingQueries;exports.useIsCompleteWithdrawStep=e.useIsCompleteWithdrawStep;exports.useIsDepositTradingPanelType=e.useIsDepositTradingPanelType;exports.useIsDhedgeVaultConnected=e.useIsDhedgeVaultConnected;exports.useIsInsufficientBalance=e.useIsInsufficientBalance;exports.useIsPoolAddress=e.useIsPoolAddress;exports.useIsTradingEnabled=e.useIsTradingEnabled;exports.useIsWalletConnected=e.useIsWalletConnected;exports.useManagerLogicAddress=e.useManagerLogicAddress;exports.useNetwork=e.useNetwork;exports.useOnSimulateTransaction=e.useOnSimulateTransaction;exports.useOnTokenSelector=e.useOnTokenSelector;exports.useOnTransactionError=e.useOnTransactionError;exports.useOnTransactionEstimationError=e.useOnTransactionEstimationError;exports.useOnTransactionSuccess=e.useOnTransactionSuccess;exports.usePoolComposition=e.usePoolComposition;exports.usePoolCompositionWithFraction=e.usePoolCompositionWithFraction;exports.usePoolDynamicContractData=e.usePoolDynamicContractData;exports.usePoolFees=e.usePoolFees;exports.usePoolManagerLogicData=e.usePoolManagerLogicData;exports.usePoolTokenPrice=e.usePoolTokenPrice;exports.usePoolsDynamic=e.usePoolsDynamic;exports.useProjectedEarningsCore=e.useProjectedEarningsCore;exports.useRawAssetPrice=e.useRawAssetPrice;exports.useReceiveTokenInput=e.useReceiveTokenInput;exports.useReferralProgram=e.useReferralProgram;exports.useSendTokenInput=e.useSendTokenInput;exports.useSetPoolAddress=e.useSetPoolAddress;exports.useSetTradingType=e.useSetTradingType;exports.useStaticCallQuery=e.useStaticCallQuery;exports.useSynthetixV3AssetBalance=e.useSynthetixV3AssetBalance;exports.useSynthetixV3OraclesUpdate=e.useSynthetixV3OraclesUpdate;exports.useTokenAllowance=e.useTokenAllowance;exports.useTotalFundValueMutable=e.useTotalFundValueMutable;exports.useTradingPanelActions=e.useTradingPanelActions;exports.useTradingPanelLogger=e.useTradingPanelLogger;exports.useTradingPanelModal=e.useTradingPanelModal;exports.useTradingPanelPoolAddress=e.useTradingPanelPoolAddress;exports.useTradingPanelPoolConfig=e.useTradingPanelPoolConfig;exports.useTradingPanelPoolConfigs=e.useTradingPanelPoolConfigs;exports.useTradingPanelPoolFallbackData=e.useTradingPanelPoolFallbackData;exports.useTradingPanelSettings=e.useTradingPanelSettings;exports.useTradingPanelState=e.useTradingPanelState;exports.useTradingPanelTransactions=e.useTradingPanelTransactions;exports.useTradingPanelType=e.useTradingPanelType;exports.useTradingResultHandling=e.useTradingResultHandling;exports.useTradingSettleHandler=e.useTradingSettleHandler;exports.useUpdatePoolConfig=e.useUpdatePoolConfig;exports.useUpdatePoolFallbackData=e.useUpdatePoolFallbackData;exports.useUpdateReceiveTokenInput=e.useUpdateReceiveTokenInput;exports.useUpdateSendTokenInput=e.useUpdateSendTokenInput;exports.useUpdateTradingModal=e.useUpdateTradingModal;exports.useUpdateTradingSettings=e.useUpdateTradingSettings;exports.useUserTokenBalance=e.useUserTokenBalance;exports.useVaultDepositTokens=e.useVaultDepositTokens;exports.useVaultVestedPoints=e.useVaultVestedPoints;exports.validateLoggerEventParams=e.validateLoggerEventParams;Object.defineProperty(exports,"decodeErrorResult",{enumerable:!0,get:()=>s.decodeErrorResult});Object.defineProperty(exports,"encodeFunctionData",{enumerable:!0,get:()=>s.encodeFunctionData});Object.defineProperty(exports,"erc20Abi",{enumerable:!0,get:()=>s.erc20Abi});Object.defineProperty(exports,"formatEther",{enumerable:!0,get:()=>s.formatEther});Object.defineProperty(exports,"formatUnits",{enumerable:!0,get:()=>s.formatUnits});Object.defineProperty(exports,"hexToString",{enumerable:!0,get:()=>s.hexToString});Object.defineProperty(exports,"trim",{enumerable:!0,get:()=>s.trim});Object.defineProperty(exports,"useBlockNumber",{enumerable:!0,get:()=>t.useBlockNumber});Object.defineProperty(exports,"useConnect",{enumerable:!0,get:()=>t.useConnect});Object.defineProperty(exports,"useDisconnect",{enumerable:!0,get:()=>t.useDisconnect});Object.defineProperty(exports,"usePublicClient",{enumerable:!0,get:()=>t.usePublicClient});Object.defineProperty(exports,"useReadContract",{enumerable:!0,get:()=>t.useReadContract});Object.defineProperty(exports,"useReadContracts",{enumerable:!0,get:()=>t.useReadContracts});Object.defineProperty(exports,"useSendTransaction",{enumerable:!0,get:()=>t.useSendTransaction});Object.defineProperty(exports,"useWaitForTransactionReceipt",{enumerable:!0,get:()=>t.useWaitForTransactionReceipt});Object.defineProperty(exports,"useWalletClient",{enumerable:!0,get:()=>t.useWalletClient});Object.defineProperty(exports,"useWriteContract",{enumerable:!0,get:()=>t.useWriteContract});
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ac as o, ab as n, aP as r, aa as T, a9 as _, a7 as i, A, af as S, a5 as E, $ as I, _ as u, Z as c, a3 as P, a8 as D, a6 as l, a0 as O, Y as d, X as R, Q as b, J as M, O as L, z as g, W as N, N as C, ag as U, ae as B, V as m, y as G, K as p, H as V, C as F, D as W, aN as Y, aM as H, aL as y, aO as k, B as h, E as f, aR as v, w as x, x as w, F as K, v as X, t as j, G as q, e as Z, I as Q, L as z, q as J, s as $, M as aa, ad as sa, ai as ea, l as ta, ak as oa, P as na, b as ra, d as Ta, a4 as _a, al as ia, R as Aa, k as Sa, ah as Ea, r as Ia, u as ua, aj as ca, an as Pa, am as Da, ap as la, f as Oa, h as da, S as Ra, aF as ba, aG as Ma, aE as La, aH as ga, aC as Na, aD as Ca, a as Ua, T as Ba, aq as ma, U as Ga, ao as pa, m as Va, n as Fa, aQ as Wa, ar as Ya, as as Ha, aB as ya, at as ka, au as ha, av as fa, aw as va, az as xa, ax as wa, ay as Ka, aA as Xa, aI as ja, aJ as qa, aK as Za, i as Qa, j as za, a$ as Ja, b0 as $a, a2 as as, a1 as ss, aV as es, aS as ts, aU as os, aT as ns, aW as rs, a_ as Ts, b2 as _s, b4 as is, b5 as As, b3 as Ss, b8 as Es, ba as Is, bb as us, bc as cs, aZ as Ps, b6 as Ds, bk as ls, b9 as Os, b1 as ds, bg as Rs, bh as bs, aY as Ms, be as Ls, o as gs, p as Ns, aX as Cs, bf as Us, bd as Bs, b7 as ms, bj as Gs, cr as ps, c3 as Vs, ca as Fs, cq as Ws, cm as Ys, bq as Hs, cf as ys, cg as ks, ct as hs, bn as fs, cu as vs, cv as xs, cl as ws, cd as Ks, c4 as Xs, cb as js, c2 as qs, ck as Zs, cw as Qs, bz as zs, cp as Js, bm as $s, co as ae, ce as se, bB as ee, cj as te, ch as oe, bC as ne, c6 as re, cs as Te, bv as _e, cn as ie, bD as Ae, bH as Se, bE as Ee, bF as Ie, bG as ue, br as ce, bt as Pe, bl as De, bs as le, bu as Oe, bx as de, bw as Re, c1 as be, c7 as Me, bL as Le, bA as ge, bM as Ne, bI as Ce, bJ as Ue, cx as Be, bp as me, c5 as Ge, cy as pe, bo as Ve, bK as Fe, bN as We, bO as Ye, bP as He, bQ as ye, bT as ke, bR as he, bU as fe, bS as ve, bV as xe, bW as we, c8 as Ke, c9 as Xe, c0 as je, bX as qe, bY as Ze, bZ as Qe, b_ as ze, b$ as Je, ci as $e, cc as at, by as st, bi as et } from "./index-
|
|
1
|
+
import { ac as o, ab as n, aP as r, aa as T, a9 as _, a7 as i, A, af as S, a5 as E, $ as I, _ as u, Z as c, a3 as P, a8 as D, a6 as l, a0 as O, Y as d, X as R, Q as b, J as M, O as L, z as g, W as N, N as C, ag as U, ae as B, V as m, y as G, K as p, H as V, C as F, D as W, aN as Y, aM as H, aL as y, aO as k, B as h, E as f, aR as v, w as x, x as w, F as K, v as X, t as j, G as q, e as Z, I as Q, L as z, q as J, s as $, M as aa, ad as sa, ai as ea, l as ta, ak as oa, P as na, b as ra, d as Ta, a4 as _a, al as ia, R as Aa, k as Sa, ah as Ea, r as Ia, u as ua, aj as ca, an as Pa, am as Da, ap as la, f as Oa, h as da, S as Ra, aF as ba, aG as Ma, aE as La, aH as ga, aC as Na, aD as Ca, a as Ua, T as Ba, aq as ma, U as Ga, ao as pa, m as Va, n as Fa, aQ as Wa, ar as Ya, as as Ha, aB as ya, at as ka, au as ha, av as fa, aw as va, az as xa, ax as wa, ay as Ka, aA as Xa, aI as ja, aJ as qa, aK as Za, i as Qa, j as za, a$ as Ja, b0 as $a, a2 as as, a1 as ss, aV as es, aS as ts, aU as os, aT as ns, aW as rs, a_ as Ts, b2 as _s, b4 as is, b5 as As, b3 as Ss, b8 as Es, ba as Is, bb as us, bc as cs, aZ as Ps, b6 as Ds, bk as ls, b9 as Os, b1 as ds, bg as Rs, bh as bs, aY as Ms, be as Ls, o as gs, p as Ns, aX as Cs, bf as Us, bd as Bs, b7 as ms, bj as Gs, cr as ps, c3 as Vs, ca as Fs, cq as Ws, cm as Ys, bq as Hs, cf as ys, cg as ks, ct as hs, bn as fs, cu as vs, cv as xs, cl as ws, cd as Ks, c4 as Xs, cb as js, c2 as qs, ck as Zs, cw as Qs, bz as zs, cp as Js, bm as $s, co as ae, ce as se, bB as ee, cj as te, ch as oe, bC as ne, c6 as re, cs as Te, bv as _e, cn as ie, bD as Ae, bH as Se, bE as Ee, bF as Ie, bG as ue, br as ce, bt as Pe, bl as De, bs as le, bu as Oe, bx as de, bw as Re, c1 as be, c7 as Me, bL as Le, bA as ge, bM as Ne, bI as Ce, bJ as Ue, cx as Be, bp as me, c5 as Ge, cy as pe, bo as Ve, bK as Fe, bN as We, bO as Ye, bP as He, bQ as ye, bT as ke, bR as he, bU as fe, bS as ve, bV as xe, bW as we, c8 as Ke, c9 as Xe, c0 as je, bX as qe, bY as Ze, bZ as Qe, b_ as ze, b$ as Je, ci as $e, cc as at, by as st, bi as et } from "./index-03be1f78.js";
|
|
2
2
|
import { decodeErrorResult as ot, encodeFunctionData as nt, erc20Abi as rt, formatEther as Tt, formatUnits as _t, hexToString as it, trim as At } from "viem";
|
|
3
3
|
import { useBlockNumber as Et, useConnect as It, useDisconnect as ut, usePublicClient as ct, useReadContract as Pt, useReadContracts as Dt, useSendTransaction as lt, useWaitForTransactionReceipt as Ot, useWalletClient as dt, useWriteContract as Rt } from "wagmi";
|
|
4
4
|
import "react";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ci = Object.defineProperty;
|
|
2
2
|
var li = (e, t, a) => t in e ? ci(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
3
|
var Z = (e, t, a) => (li(e, typeof t != "symbol" ? t + "" : t, a), a);
|
|
4
|
-
import { g as hi, c as ze } from "./index-
|
|
4
|
+
import { g as hi, c as ze } from "./index-03be1f78.js";
|
|
5
5
|
import { decodeAbiParameters as er, encodeAbiParameters as en } from "viem";
|
|
6
6
|
import "react";
|
|
7
7
|
import "wagmi";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var ui=Object.defineProperty;var ci=(e,t,a)=>t in e?ui(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var Z=(e,t,a)=>(ci(e,typeof t!="symbol"?t+"":t,a),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $e=require("./index-ba7b91f3.cjs"),ut=require("viem");require("react");require("wagmi");require("@tanstack/react-query");var Rr={exports:{}};const li={},hi=Object.freeze(Object.defineProperty({__proto__:null,default:li},Symbol.toStringTag,{value:"Module"})),di=$e.getAugmentedNamespace(hi);Rr.exports;(function(e){(function(t,a){function s(E,r){if(!E)throw new Error(r||"Assertion failed")}function h(E,r){E.super_=r;var u=function(){};u.prototype=r.prototype,E.prototype=new u,E.prototype.constructor=E}function f(E,r,u){if(f.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&((r==="le"||r==="be")&&(u=r,r=10),this._init(E||0,r||10,u||"be"))}typeof t=="object"?t.exports=f:a.BN=f,f.BN=f,f.wordSize=26;var g;try{typeof window<"u"&&typeof window.Buffer<"u"?g=window.Buffer:g=di.Buffer}catch{}f.isBN=function(r){return r instanceof f?!0:r!==null&&typeof r=="object"&&r.constructor.wordSize===f.wordSize&&Array.isArray(r.words)},f.max=function(r,u){return r.cmp(u)>0?r:u},f.min=function(r,u){return r.cmp(u)<0?r:u},f.prototype._init=function(r,u,p){if(typeof r=="number")return this._initNumber(r,u,p);if(typeof r=="object")return this._initArray(r,u,p);u==="hex"&&(u=16),s(u===(u|0)&&u>=2&&u<=36),r=r.toString().replace(/\s+/g,"");var v=0;r[0]==="-"&&(v++,this.negative=1),v<r.length&&(u===16?this._parseHex(r,v,p):(this._parseBase(r,u,v),p==="le"&&this._initArray(this.toArray(),u,p)))},f.prototype._initNumber=function(r,u,p){r<0&&(this.negative=1,r=-r),r<67108864?(this.words=[r&67108863],this.length=1):r<4503599627370496?(this.words=[r&67108863,r/67108864&67108863],this.length=2):(s(r<9007199254740992),this.words=[r&67108863,r/67108864&67108863,1],this.length=3),p==="le"&&this._initArray(this.toArray(),u,p)},f.prototype._initArray=function(r,u,p){if(s(typeof r.length=="number"),r.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(r.length/3),this.words=new Array(this.length);for(var v=0;v<this.length;v++)this.words[v]=0;var x,w,b=0;if(p==="be")for(v=r.length-1,x=0;v>=0;v-=3)w=r[v]|r[v-1]<<8|r[v-2]<<16,this.words[x]|=w<<b&67108863,this.words[x+1]=w>>>26-b&67108863,b+=24,b>=26&&(b-=26,x++);else if(p==="le")for(v=0,x=0;v<r.length;v+=3)w=r[v]|r[v+1]<<8|r[v+2]<<16,this.words[x]|=w<<b&67108863,this.words[x+1]=w>>>26-b&67108863,b+=24,b>=26&&(b-=26,x++);return this._strip()};function d(E,r){var u=E.charCodeAt(r);if(u>=48&&u<=57)return u-48;if(u>=65&&u<=70)return u-55;if(u>=97&&u<=102)return u-87;s(!1,"Invalid character in "+E)}function A(E,r,u){var p=d(E,u);return u-1>=r&&(p|=d(E,u-1)<<4),p}f.prototype._parseHex=function(r,u,p){this.length=Math.ceil((r.length-u)/6),this.words=new Array(this.length);for(var v=0;v<this.length;v++)this.words[v]=0;var x=0,w=0,b;if(p==="be")for(v=r.length-1;v>=u;v-=2)b=A(r,u,v)<<x,this.words[w]|=b&67108863,x>=18?(x-=18,w+=1,this.words[w]|=b>>>26):x+=8;else{var l=r.length-u;for(v=l%2===0?u+1:u;v<r.length;v+=2)b=A(r,u,v)<<x,this.words[w]|=b&67108863,x>=18?(x-=18,w+=1,this.words[w]|=b>>>26):x+=8}this._strip()};function R(E,r,u,p){for(var v=0,x=0,w=Math.min(E.length,u),b=r;b<w;b++){var l=E.charCodeAt(b)-48;v*=p,l>=49?x=l-49+10:l>=17?x=l-17+10:x=l,s(l>=0&&x<p,"Invalid character"),v+=x}return v}f.prototype._parseBase=function(r,u,p){this.words=[0],this.length=1;for(var v=0,x=1;x<=67108863;x*=u)v++;v--,x=x/u|0;for(var w=r.length-p,b=w%v,l=Math.min(w,w-b)+p,i=0,y=p;y<l;y+=v)i=R(r,y,y+v,u),this.imuln(x),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i);if(b!==0){var D=1;for(i=R(r,y,r.length,u),y=0;y<b;y++)D*=u;this.imuln(D),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i)}this._strip()},f.prototype.copy=function(r){r.words=new Array(this.length);for(var u=0;u<this.length;u++)r.words[u]=this.words[u];r.length=this.length,r.negative=this.negative,r.red=this.red};function B(E,r){E.words=r.words,E.length=r.length,E.negative=r.negative,E.red=r.red}if(f.prototype._move=function(r){B(r,this)},f.prototype.clone=function(){var r=new f(null);return this.copy(r),r},f.prototype._expand=function(r){for(;this.length<r;)this.words[this.length++]=0;return this},f.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{f.prototype[Symbol.for("nodejs.util.inspect.custom")]=S}catch{f.prototype.inspect=S}else f.prototype.inspect=S;function S(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var I=["","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"],k=[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],T=[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];f.prototype.toString=function(r,u){r=r||10,u=u|0||1;var p;if(r===16||r==="hex"){p="";for(var v=0,x=0,w=0;w<this.length;w++){var b=this.words[w],l=((b<<v|x)&16777215).toString(16);x=b>>>24-v&16777215,v+=2,v>=26&&(v-=26,w--),x!==0||w!==this.length-1?p=I[6-l.length]+l+p:p=l+p}for(x!==0&&(p=x.toString(16)+p);p.length%u!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(r===(r|0)&&r>=2&&r<=36){var i=k[r],y=T[r];p="";var D=this.clone();for(D.negative=0;!D.isZero();){var O=D.modrn(y).toString(r);D=D.idivn(y),D.isZero()?p=O+p:p=I[i-O.length]+O+p}for(this.isZero()&&(p="0"+p);p.length%u!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}s(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var r=this.words[0];return this.length===2?r+=this.words[1]*67108864:this.length===3&&this.words[2]===1?r+=4503599627370496+this.words[1]*67108864:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-r:r},f.prototype.toJSON=function(){return this.toString(16,2)},g&&(f.prototype.toBuffer=function(r,u){return this.toArrayLike(g,r,u)}),f.prototype.toArray=function(r,u){return this.toArrayLike(Array,r,u)};var N=function(r,u){return r.allocUnsafe?r.allocUnsafe(u):new r(u)};f.prototype.toArrayLike=function(r,u,p){this._strip();var v=this.byteLength(),x=p||Math.max(1,v);s(v<=x,"byte array longer than desired length"),s(x>0,"Requested array length <= 0");var w=N(r,x),b=u==="le"?"LE":"BE";return this["_toArrayLike"+b](w,v),w},f.prototype._toArrayLikeLE=function(r,u){for(var p=0,v=0,x=0,w=0;x<this.length;x++){var b=this.words[x]<<w|v;r[p++]=b&255,p<r.length&&(r[p++]=b>>8&255),p<r.length&&(r[p++]=b>>16&255),w===6?(p<r.length&&(r[p++]=b>>24&255),v=0,w=0):(v=b>>>24,w+=2)}if(p<r.length)for(r[p++]=v;p<r.length;)r[p++]=0},f.prototype._toArrayLikeBE=function(r,u){for(var p=r.length-1,v=0,x=0,w=0;x<this.length;x++){var b=this.words[x]<<w|v;r[p--]=b&255,p>=0&&(r[p--]=b>>8&255),p>=0&&(r[p--]=b>>16&255),w===6?(p>=0&&(r[p--]=b>>24&255),v=0,w=0):(v=b>>>24,w+=2)}if(p>=0)for(r[p--]=v;p>=0;)r[p--]=0},Math.clz32?f.prototype._countBits=function(r){return 32-Math.clz32(r)}:f.prototype._countBits=function(r){var u=r,p=0;return u>=4096&&(p+=13,u>>>=13),u>=64&&(p+=7,u>>>=7),u>=8&&(p+=4,u>>>=4),u>=2&&(p+=2,u>>>=2),p+u},f.prototype._zeroBits=function(r){if(r===0)return 26;var u=r,p=0;return u&8191||(p+=13,u>>>=13),u&127||(p+=7,u>>>=7),u&15||(p+=4,u>>>=4),u&3||(p+=2,u>>>=2),u&1||p++,p},f.prototype.bitLength=function(){var r=this.words[this.length-1],u=this._countBits(r);return(this.length-1)*26+u};function P(E){for(var r=new Array(E.bitLength()),u=0;u<r.length;u++){var p=u/26|0,v=u%26;r[u]=E.words[p]>>>v&1}return r}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,u=0;u<this.length;u++){var p=this._zeroBits(this.words[u]);if(r+=p,p!==26)break}return r},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(r){return this.negative!==0?this.abs().inotn(r).iaddn(1):this.clone()},f.prototype.fromTwos=function(r){return this.testn(r-1)?this.notn(r).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(r){for(;this.length<r.length;)this.words[this.length++]=0;for(var u=0;u<r.length;u++)this.words[u]=this.words[u]|r.words[u];return this._strip()},f.prototype.ior=function(r){return s((this.negative|r.negative)===0),this.iuor(r)},f.prototype.or=function(r){return this.length>r.length?this.clone().ior(r):r.clone().ior(this)},f.prototype.uor=function(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},f.prototype.iuand=function(r){var u;this.length>r.length?u=r:u=this;for(var p=0;p<u.length;p++)this.words[p]=this.words[p]&r.words[p];return this.length=u.length,this._strip()},f.prototype.iand=function(r){return s((this.negative|r.negative)===0),this.iuand(r)},f.prototype.and=function(r){return this.length>r.length?this.clone().iand(r):r.clone().iand(this)},f.prototype.uand=function(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},f.prototype.iuxor=function(r){var u,p;this.length>r.length?(u=this,p=r):(u=r,p=this);for(var v=0;v<p.length;v++)this.words[v]=u.words[v]^p.words[v];if(this!==u)for(;v<u.length;v++)this.words[v]=u.words[v];return this.length=u.length,this._strip()},f.prototype.ixor=function(r){return s((this.negative|r.negative)===0),this.iuxor(r)},f.prototype.xor=function(r){return this.length>r.length?this.clone().ixor(r):r.clone().ixor(this)},f.prototype.uxor=function(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},f.prototype.inotn=function(r){s(typeof r=="number"&&r>=0);var u=Math.ceil(r/26)|0,p=r%26;this._expand(u),p>0&&u--;for(var v=0;v<u;v++)this.words[v]=~this.words[v]&67108863;return p>0&&(this.words[v]=~this.words[v]&67108863>>26-p),this._strip()},f.prototype.notn=function(r){return this.clone().inotn(r)},f.prototype.setn=function(r,u){s(typeof r=="number"&&r>=0);var p=r/26|0,v=r%26;return this._expand(p+1),u?this.words[p]=this.words[p]|1<<v:this.words[p]=this.words[p]&~(1<<v),this._strip()},f.prototype.iadd=function(r){var u;if(this.negative!==0&&r.negative===0)return this.negative=0,u=this.isub(r),this.negative^=1,this._normSign();if(this.negative===0&&r.negative!==0)return r.negative=0,u=this.isub(r),r.negative=1,u._normSign();var p,v;this.length>r.length?(p=this,v=r):(p=r,v=this);for(var x=0,w=0;w<v.length;w++)u=(p.words[w]|0)+(v.words[w]|0)+x,this.words[w]=u&67108863,x=u>>>26;for(;x!==0&&w<p.length;w++)u=(p.words[w]|0)+x,this.words[w]=u&67108863,x=u>>>26;if(this.length=p.length,x!==0)this.words[this.length]=x,this.length++;else if(p!==this)for(;w<p.length;w++)this.words[w]=p.words[w];return this},f.prototype.add=function(r){var u;return r.negative!==0&&this.negative===0?(r.negative=0,u=this.sub(r),r.negative^=1,u):r.negative===0&&this.negative!==0?(this.negative=0,u=r.sub(this),this.negative=1,u):this.length>r.length?this.clone().iadd(r):r.clone().iadd(this)},f.prototype.isub=function(r){if(r.negative!==0){r.negative=0;var u=this.iadd(r);return r.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var p=this.cmp(r);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,x;p>0?(v=this,x=r):(v=r,x=this);for(var w=0,b=0;b<x.length;b++)u=(v.words[b]|0)-(x.words[b]|0)+w,w=u>>26,this.words[b]=u&67108863;for(;w!==0&&b<v.length;b++)u=(v.words[b]|0)+w,w=u>>26,this.words[b]=u&67108863;if(w===0&&b<v.length&&v!==this)for(;b<v.length;b++)this.words[b]=v.words[b];return this.length=Math.max(this.length,b),v!==this&&(this.negative=1),this._strip()},f.prototype.sub=function(r){return this.clone().isub(r)};function J(E,r,u){u.negative=r.negative^E.negative;var p=E.length+r.length|0;u.length=p,p=p-1|0;var v=E.words[0]|0,x=r.words[0]|0,w=v*x,b=w&67108863,l=w/67108864|0;u.words[0]=b;for(var i=1;i<p;i++){for(var y=l>>>26,D=l&67108863,O=Math.min(i,r.length-1),U=Math.max(0,i-E.length+1);U<=O;U++){var V=i-U|0;v=E.words[V]|0,x=r.words[U]|0,w=v*x+D,y+=w/67108864|0,D=w&67108863}u.words[i]=D|0,l=y|0}return l!==0?u.words[i]=l|0:u.length--,u._strip()}var X=function(r,u,p){var v=r.words,x=u.words,w=p.words,b=0,l,i,y,D=v[0]|0,O=D&8191,U=D>>>13,V=v[1]|0,H=V&8191,W=V>>>13,Ie=v[2]|0,ae=Ie&8191,oe=Ie>>>13,Ve=v[3]|0,ee=Ve&8191,fe=Ve>>>13,pt=v[4]|0,ne=pt&8191,ue=pt>>>13,mt=v[5]|0,se=mt&8191,te=mt>>>13,Ue=v[6]|0,ie=Ue&8191,ce=Ue>>>13,ze=v[7]|0,le=ze&8191,c=ze>>>13,n=v[8]|0,o=n&8191,m=n>>>13,_=v[9]|0,M=_&8191,C=_>>>13,z=x[0]|0,q=z&8191,j=z>>>13,re=x[1]|0,L=re&8191,he=re>>>13,Jr=x[2]|0,de=Jr&8191,pe=Jr>>>13,Gr=x[3]|0,me=Gr&8191,ye=Gr>>>13,Vr=x[4]|0,ge=Vr&8191,we=Vr>>>13,Kr=x[5]|0,ve=Kr&8191,be=Kr>>>13,Zr=x[6]|0,xe=Zr&8191,Ee=Zr>>>13,Yr=x[7]|0,_e=Yr&8191,Me=Yr>>>13,Xr=x[8]|0,Ae=Xr&8191,Be=Xr>>>13,Qr=x[9]|0,Ce=Qr&8191,Fe=Qr>>>13;p.negative=r.negative^u.negative,p.length=19,l=Math.imul(O,q),i=Math.imul(O,j),i=i+Math.imul(U,q)|0,y=Math.imul(U,j);var Ut=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,l=Math.imul(H,q),i=Math.imul(H,j),i=i+Math.imul(W,q)|0,y=Math.imul(W,j),l=l+Math.imul(O,L)|0,i=i+Math.imul(O,he)|0,i=i+Math.imul(U,L)|0,y=y+Math.imul(U,he)|0;var Nt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,l=Math.imul(ae,q),i=Math.imul(ae,j),i=i+Math.imul(oe,q)|0,y=Math.imul(oe,j),l=l+Math.imul(H,L)|0,i=i+Math.imul(H,he)|0,i=i+Math.imul(W,L)|0,y=y+Math.imul(W,he)|0,l=l+Math.imul(O,de)|0,i=i+Math.imul(O,pe)|0,i=i+Math.imul(U,de)|0,y=y+Math.imul(U,pe)|0;var kt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,l=Math.imul(ee,q),i=Math.imul(ee,j),i=i+Math.imul(fe,q)|0,y=Math.imul(fe,j),l=l+Math.imul(ae,L)|0,i=i+Math.imul(ae,he)|0,i=i+Math.imul(oe,L)|0,y=y+Math.imul(oe,he)|0,l=l+Math.imul(H,de)|0,i=i+Math.imul(H,pe)|0,i=i+Math.imul(W,de)|0,y=y+Math.imul(W,pe)|0,l=l+Math.imul(O,me)|0,i=i+Math.imul(O,ye)|0,i=i+Math.imul(U,me)|0,y=y+Math.imul(U,ye)|0;var Lt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,l=Math.imul(ne,q),i=Math.imul(ne,j),i=i+Math.imul(ue,q)|0,y=Math.imul(ue,j),l=l+Math.imul(ee,L)|0,i=i+Math.imul(ee,he)|0,i=i+Math.imul(fe,L)|0,y=y+Math.imul(fe,he)|0,l=l+Math.imul(ae,de)|0,i=i+Math.imul(ae,pe)|0,i=i+Math.imul(oe,de)|0,y=y+Math.imul(oe,pe)|0,l=l+Math.imul(H,me)|0,i=i+Math.imul(H,ye)|0,i=i+Math.imul(W,me)|0,y=y+Math.imul(W,ye)|0,l=l+Math.imul(O,ge)|0,i=i+Math.imul(O,we)|0,i=i+Math.imul(U,ge)|0,y=y+Math.imul(U,we)|0;var jt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,l=Math.imul(se,q),i=Math.imul(se,j),i=i+Math.imul(te,q)|0,y=Math.imul(te,j),l=l+Math.imul(ne,L)|0,i=i+Math.imul(ne,he)|0,i=i+Math.imul(ue,L)|0,y=y+Math.imul(ue,he)|0,l=l+Math.imul(ee,de)|0,i=i+Math.imul(ee,pe)|0,i=i+Math.imul(fe,de)|0,y=y+Math.imul(fe,pe)|0,l=l+Math.imul(ae,me)|0,i=i+Math.imul(ae,ye)|0,i=i+Math.imul(oe,me)|0,y=y+Math.imul(oe,ye)|0,l=l+Math.imul(H,ge)|0,i=i+Math.imul(H,we)|0,i=i+Math.imul(W,ge)|0,y=y+Math.imul(W,we)|0,l=l+Math.imul(O,ve)|0,i=i+Math.imul(O,be)|0,i=i+Math.imul(U,ve)|0,y=y+Math.imul(U,be)|0;var qt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(qt>>>26)|0,qt&=67108863,l=Math.imul(ie,q),i=Math.imul(ie,j),i=i+Math.imul(ce,q)|0,y=Math.imul(ce,j),l=l+Math.imul(se,L)|0,i=i+Math.imul(se,he)|0,i=i+Math.imul(te,L)|0,y=y+Math.imul(te,he)|0,l=l+Math.imul(ne,de)|0,i=i+Math.imul(ne,pe)|0,i=i+Math.imul(ue,de)|0,y=y+Math.imul(ue,pe)|0,l=l+Math.imul(ee,me)|0,i=i+Math.imul(ee,ye)|0,i=i+Math.imul(fe,me)|0,y=y+Math.imul(fe,ye)|0,l=l+Math.imul(ae,ge)|0,i=i+Math.imul(ae,we)|0,i=i+Math.imul(oe,ge)|0,y=y+Math.imul(oe,we)|0,l=l+Math.imul(H,ve)|0,i=i+Math.imul(H,be)|0,i=i+Math.imul(W,ve)|0,y=y+Math.imul(W,be)|0,l=l+Math.imul(O,xe)|0,i=i+Math.imul(O,Ee)|0,i=i+Math.imul(U,xe)|0,y=y+Math.imul(U,Ee)|0;var $t=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+($t>>>26)|0,$t&=67108863,l=Math.imul(le,q),i=Math.imul(le,j),i=i+Math.imul(c,q)|0,y=Math.imul(c,j),l=l+Math.imul(ie,L)|0,i=i+Math.imul(ie,he)|0,i=i+Math.imul(ce,L)|0,y=y+Math.imul(ce,he)|0,l=l+Math.imul(se,de)|0,i=i+Math.imul(se,pe)|0,i=i+Math.imul(te,de)|0,y=y+Math.imul(te,pe)|0,l=l+Math.imul(ne,me)|0,i=i+Math.imul(ne,ye)|0,i=i+Math.imul(ue,me)|0,y=y+Math.imul(ue,ye)|0,l=l+Math.imul(ee,ge)|0,i=i+Math.imul(ee,we)|0,i=i+Math.imul(fe,ge)|0,y=y+Math.imul(fe,we)|0,l=l+Math.imul(ae,ve)|0,i=i+Math.imul(ae,be)|0,i=i+Math.imul(oe,ve)|0,y=y+Math.imul(oe,be)|0,l=l+Math.imul(H,xe)|0,i=i+Math.imul(H,Ee)|0,i=i+Math.imul(W,xe)|0,y=y+Math.imul(W,Ee)|0,l=l+Math.imul(O,_e)|0,i=i+Math.imul(O,Me)|0,i=i+Math.imul(U,_e)|0,y=y+Math.imul(U,Me)|0;var zt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,l=Math.imul(o,q),i=Math.imul(o,j),i=i+Math.imul(m,q)|0,y=Math.imul(m,j),l=l+Math.imul(le,L)|0,i=i+Math.imul(le,he)|0,i=i+Math.imul(c,L)|0,y=y+Math.imul(c,he)|0,l=l+Math.imul(ie,de)|0,i=i+Math.imul(ie,pe)|0,i=i+Math.imul(ce,de)|0,y=y+Math.imul(ce,pe)|0,l=l+Math.imul(se,me)|0,i=i+Math.imul(se,ye)|0,i=i+Math.imul(te,me)|0,y=y+Math.imul(te,ye)|0,l=l+Math.imul(ne,ge)|0,i=i+Math.imul(ne,we)|0,i=i+Math.imul(ue,ge)|0,y=y+Math.imul(ue,we)|0,l=l+Math.imul(ee,ve)|0,i=i+Math.imul(ee,be)|0,i=i+Math.imul(fe,ve)|0,y=y+Math.imul(fe,be)|0,l=l+Math.imul(ae,xe)|0,i=i+Math.imul(ae,Ee)|0,i=i+Math.imul(oe,xe)|0,y=y+Math.imul(oe,Ee)|0,l=l+Math.imul(H,_e)|0,i=i+Math.imul(H,Me)|0,i=i+Math.imul(W,_e)|0,y=y+Math.imul(W,Me)|0,l=l+Math.imul(O,Ae)|0,i=i+Math.imul(O,Be)|0,i=i+Math.imul(U,Ae)|0,y=y+Math.imul(U,Be)|0;var Ht=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,l=Math.imul(M,q),i=Math.imul(M,j),i=i+Math.imul(C,q)|0,y=Math.imul(C,j),l=l+Math.imul(o,L)|0,i=i+Math.imul(o,he)|0,i=i+Math.imul(m,L)|0,y=y+Math.imul(m,he)|0,l=l+Math.imul(le,de)|0,i=i+Math.imul(le,pe)|0,i=i+Math.imul(c,de)|0,y=y+Math.imul(c,pe)|0,l=l+Math.imul(ie,me)|0,i=i+Math.imul(ie,ye)|0,i=i+Math.imul(ce,me)|0,y=y+Math.imul(ce,ye)|0,l=l+Math.imul(se,ge)|0,i=i+Math.imul(se,we)|0,i=i+Math.imul(te,ge)|0,y=y+Math.imul(te,we)|0,l=l+Math.imul(ne,ve)|0,i=i+Math.imul(ne,be)|0,i=i+Math.imul(ue,ve)|0,y=y+Math.imul(ue,be)|0,l=l+Math.imul(ee,xe)|0,i=i+Math.imul(ee,Ee)|0,i=i+Math.imul(fe,xe)|0,y=y+Math.imul(fe,Ee)|0,l=l+Math.imul(ae,_e)|0,i=i+Math.imul(ae,Me)|0,i=i+Math.imul(oe,_e)|0,y=y+Math.imul(oe,Me)|0,l=l+Math.imul(H,Ae)|0,i=i+Math.imul(H,Be)|0,i=i+Math.imul(W,Ae)|0,y=y+Math.imul(W,Be)|0,l=l+Math.imul(O,Ce)|0,i=i+Math.imul(O,Fe)|0,i=i+Math.imul(U,Ce)|0,y=y+Math.imul(U,Fe)|0;var Wt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,l=Math.imul(M,L),i=Math.imul(M,he),i=i+Math.imul(C,L)|0,y=Math.imul(C,he),l=l+Math.imul(o,de)|0,i=i+Math.imul(o,pe)|0,i=i+Math.imul(m,de)|0,y=y+Math.imul(m,pe)|0,l=l+Math.imul(le,me)|0,i=i+Math.imul(le,ye)|0,i=i+Math.imul(c,me)|0,y=y+Math.imul(c,ye)|0,l=l+Math.imul(ie,ge)|0,i=i+Math.imul(ie,we)|0,i=i+Math.imul(ce,ge)|0,y=y+Math.imul(ce,we)|0,l=l+Math.imul(se,ve)|0,i=i+Math.imul(se,be)|0,i=i+Math.imul(te,ve)|0,y=y+Math.imul(te,be)|0,l=l+Math.imul(ne,xe)|0,i=i+Math.imul(ne,Ee)|0,i=i+Math.imul(ue,xe)|0,y=y+Math.imul(ue,Ee)|0,l=l+Math.imul(ee,_e)|0,i=i+Math.imul(ee,Me)|0,i=i+Math.imul(fe,_e)|0,y=y+Math.imul(fe,Me)|0,l=l+Math.imul(ae,Ae)|0,i=i+Math.imul(ae,Be)|0,i=i+Math.imul(oe,Ae)|0,y=y+Math.imul(oe,Be)|0,l=l+Math.imul(H,Ce)|0,i=i+Math.imul(H,Fe)|0,i=i+Math.imul(W,Ce)|0,y=y+Math.imul(W,Fe)|0;var Jt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,l=Math.imul(M,de),i=Math.imul(M,pe),i=i+Math.imul(C,de)|0,y=Math.imul(C,pe),l=l+Math.imul(o,me)|0,i=i+Math.imul(o,ye)|0,i=i+Math.imul(m,me)|0,y=y+Math.imul(m,ye)|0,l=l+Math.imul(le,ge)|0,i=i+Math.imul(le,we)|0,i=i+Math.imul(c,ge)|0,y=y+Math.imul(c,we)|0,l=l+Math.imul(ie,ve)|0,i=i+Math.imul(ie,be)|0,i=i+Math.imul(ce,ve)|0,y=y+Math.imul(ce,be)|0,l=l+Math.imul(se,xe)|0,i=i+Math.imul(se,Ee)|0,i=i+Math.imul(te,xe)|0,y=y+Math.imul(te,Ee)|0,l=l+Math.imul(ne,_e)|0,i=i+Math.imul(ne,Me)|0,i=i+Math.imul(ue,_e)|0,y=y+Math.imul(ue,Me)|0,l=l+Math.imul(ee,Ae)|0,i=i+Math.imul(ee,Be)|0,i=i+Math.imul(fe,Ae)|0,y=y+Math.imul(fe,Be)|0,l=l+Math.imul(ae,Ce)|0,i=i+Math.imul(ae,Fe)|0,i=i+Math.imul(oe,Ce)|0,y=y+Math.imul(oe,Fe)|0;var Gt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,l=Math.imul(M,me),i=Math.imul(M,ye),i=i+Math.imul(C,me)|0,y=Math.imul(C,ye),l=l+Math.imul(o,ge)|0,i=i+Math.imul(o,we)|0,i=i+Math.imul(m,ge)|0,y=y+Math.imul(m,we)|0,l=l+Math.imul(le,ve)|0,i=i+Math.imul(le,be)|0,i=i+Math.imul(c,ve)|0,y=y+Math.imul(c,be)|0,l=l+Math.imul(ie,xe)|0,i=i+Math.imul(ie,Ee)|0,i=i+Math.imul(ce,xe)|0,y=y+Math.imul(ce,Ee)|0,l=l+Math.imul(se,_e)|0,i=i+Math.imul(se,Me)|0,i=i+Math.imul(te,_e)|0,y=y+Math.imul(te,Me)|0,l=l+Math.imul(ne,Ae)|0,i=i+Math.imul(ne,Be)|0,i=i+Math.imul(ue,Ae)|0,y=y+Math.imul(ue,Be)|0,l=l+Math.imul(ee,Ce)|0,i=i+Math.imul(ee,Fe)|0,i=i+Math.imul(fe,Ce)|0,y=y+Math.imul(fe,Fe)|0;var Vt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,l=Math.imul(M,ge),i=Math.imul(M,we),i=i+Math.imul(C,ge)|0,y=Math.imul(C,we),l=l+Math.imul(o,ve)|0,i=i+Math.imul(o,be)|0,i=i+Math.imul(m,ve)|0,y=y+Math.imul(m,be)|0,l=l+Math.imul(le,xe)|0,i=i+Math.imul(le,Ee)|0,i=i+Math.imul(c,xe)|0,y=y+Math.imul(c,Ee)|0,l=l+Math.imul(ie,_e)|0,i=i+Math.imul(ie,Me)|0,i=i+Math.imul(ce,_e)|0,y=y+Math.imul(ce,Me)|0,l=l+Math.imul(se,Ae)|0,i=i+Math.imul(se,Be)|0,i=i+Math.imul(te,Ae)|0,y=y+Math.imul(te,Be)|0,l=l+Math.imul(ne,Ce)|0,i=i+Math.imul(ne,Fe)|0,i=i+Math.imul(ue,Ce)|0,y=y+Math.imul(ue,Fe)|0;var Kt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,l=Math.imul(M,ve),i=Math.imul(M,be),i=i+Math.imul(C,ve)|0,y=Math.imul(C,be),l=l+Math.imul(o,xe)|0,i=i+Math.imul(o,Ee)|0,i=i+Math.imul(m,xe)|0,y=y+Math.imul(m,Ee)|0,l=l+Math.imul(le,_e)|0,i=i+Math.imul(le,Me)|0,i=i+Math.imul(c,_e)|0,y=y+Math.imul(c,Me)|0,l=l+Math.imul(ie,Ae)|0,i=i+Math.imul(ie,Be)|0,i=i+Math.imul(ce,Ae)|0,y=y+Math.imul(ce,Be)|0,l=l+Math.imul(se,Ce)|0,i=i+Math.imul(se,Fe)|0,i=i+Math.imul(te,Ce)|0,y=y+Math.imul(te,Fe)|0;var Zt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,l=Math.imul(M,xe),i=Math.imul(M,Ee),i=i+Math.imul(C,xe)|0,y=Math.imul(C,Ee),l=l+Math.imul(o,_e)|0,i=i+Math.imul(o,Me)|0,i=i+Math.imul(m,_e)|0,y=y+Math.imul(m,Me)|0,l=l+Math.imul(le,Ae)|0,i=i+Math.imul(le,Be)|0,i=i+Math.imul(c,Ae)|0,y=y+Math.imul(c,Be)|0,l=l+Math.imul(ie,Ce)|0,i=i+Math.imul(ie,Fe)|0,i=i+Math.imul(ce,Ce)|0,y=y+Math.imul(ce,Fe)|0;var Yt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,l=Math.imul(M,_e),i=Math.imul(M,Me),i=i+Math.imul(C,_e)|0,y=Math.imul(C,Me),l=l+Math.imul(o,Ae)|0,i=i+Math.imul(o,Be)|0,i=i+Math.imul(m,Ae)|0,y=y+Math.imul(m,Be)|0,l=l+Math.imul(le,Ce)|0,i=i+Math.imul(le,Fe)|0,i=i+Math.imul(c,Ce)|0,y=y+Math.imul(c,Fe)|0;var Xt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,l=Math.imul(M,Ae),i=Math.imul(M,Be),i=i+Math.imul(C,Ae)|0,y=Math.imul(C,Be),l=l+Math.imul(o,Ce)|0,i=i+Math.imul(o,Fe)|0,i=i+Math.imul(m,Ce)|0,y=y+Math.imul(m,Fe)|0;var Qt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,l=Math.imul(M,Ce),i=Math.imul(M,Fe),i=i+Math.imul(C,Ce)|0,y=Math.imul(C,Fe);var er=(b+l|0)+((i&8191)<<13)|0;return b=(y+(i>>>13)|0)+(er>>>26)|0,er&=67108863,w[0]=Ut,w[1]=Nt,w[2]=kt,w[3]=Lt,w[4]=jt,w[5]=qt,w[6]=$t,w[7]=zt,w[8]=Ht,w[9]=Wt,w[10]=Jt,w[11]=Gt,w[12]=Vt,w[13]=Kt,w[14]=Zt,w[15]=Yt,w[16]=Xt,w[17]=Qt,w[18]=er,b!==0&&(w[19]=b,p.length++),p};Math.imul||(X=J);function G(E,r,u){u.negative=r.negative^E.negative,u.length=E.length+r.length;for(var p=0,v=0,x=0;x<u.length-1;x++){var w=v;v=0;for(var b=p&67108863,l=Math.min(x,r.length-1),i=Math.max(0,x-E.length+1);i<=l;i++){var y=x-i,D=E.words[y]|0,O=r.words[i]|0,U=D*O,V=U&67108863;w=w+(U/67108864|0)|0,V=V+b|0,b=V&67108863,w=w+(V>>>26)|0,v+=w>>>26,w&=67108863}u.words[x]=b,p=w,w=v}return p!==0?u.words[x]=p:u.length--,u._strip()}function De(E,r,u){return G(E,r,u)}f.prototype.mulTo=function(r,u){var p,v=this.length+r.length;return this.length===10&&r.length===10?p=X(this,r,u):v<63?p=J(this,r,u):v<1024?p=G(this,r,u):p=De(this,r,u),p},f.prototype.mul=function(r){var u=new f(null);return u.words=new Array(this.length+r.length),this.mulTo(r,u)},f.prototype.mulf=function(r){var u=new f(null);return u.words=new Array(this.length+r.length),De(this,r,u)},f.prototype.imul=function(r){return this.clone().mulTo(r,this)},f.prototype.imuln=function(r){var u=r<0;u&&(r=-r),s(typeof r=="number"),s(r<67108864);for(var p=0,v=0;v<this.length;v++){var x=(this.words[v]|0)*r,w=(x&67108863)+(p&67108863);p>>=26,p+=x/67108864|0,p+=w>>>26,this.words[v]=w&67108863}return p!==0&&(this.words[v]=p,this.length++),u?this.ineg():this},f.prototype.muln=function(r){return this.clone().imuln(r)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(r){var u=P(r);if(u.length===0)return new f(1);for(var p=this,v=0;v<u.length&&u[v]===0;v++,p=p.sqr());if(++v<u.length)for(var x=p.sqr();v<u.length;v++,x=x.sqr())u[v]!==0&&(p=p.mul(x));return p},f.prototype.iushln=function(r){s(typeof r=="number"&&r>=0);var u=r%26,p=(r-u)/26,v=67108863>>>26-u<<26-u,x;if(u!==0){var w=0;for(x=0;x<this.length;x++){var b=this.words[x]&v,l=(this.words[x]|0)-b<<u;this.words[x]=l|w,w=b>>>26-u}w&&(this.words[x]=w,this.length++)}if(p!==0){for(x=this.length-1;x>=0;x--)this.words[x+p]=this.words[x];for(x=0;x<p;x++)this.words[x]=0;this.length+=p}return this._strip()},f.prototype.ishln=function(r){return s(this.negative===0),this.iushln(r)},f.prototype.iushrn=function(r,u,p){s(typeof r=="number"&&r>=0);var v;u?v=(u-u%26)/26:v=0;var x=r%26,w=Math.min((r-x)/26,this.length),b=67108863^67108863>>>x<<x,l=p;if(v-=w,v=Math.max(0,v),l){for(var i=0;i<w;i++)l.words[i]=this.words[i];l.length=w}if(w!==0)if(this.length>w)for(this.length-=w,i=0;i<this.length;i++)this.words[i]=this.words[i+w];else this.words[0]=0,this.length=1;var y=0;for(i=this.length-1;i>=0&&(y!==0||i>=v);i--){var D=this.words[i]|0;this.words[i]=y<<26-x|D>>>x,y=D&b}return l&&y!==0&&(l.words[l.length++]=y),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},f.prototype.ishrn=function(r,u,p){return s(this.negative===0),this.iushrn(r,u,p)},f.prototype.shln=function(r){return this.clone().ishln(r)},f.prototype.ushln=function(r){return this.clone().iushln(r)},f.prototype.shrn=function(r){return this.clone().ishrn(r)},f.prototype.ushrn=function(r){return this.clone().iushrn(r)},f.prototype.testn=function(r){s(typeof r=="number"&&r>=0);var u=r%26,p=(r-u)/26,v=1<<u;if(this.length<=p)return!1;var x=this.words[p];return!!(x&v)},f.prototype.imaskn=function(r){s(typeof r=="number"&&r>=0);var u=r%26,p=(r-u)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(u!==0&&p++,this.length=Math.min(p,this.length),u!==0){var v=67108863^67108863>>>u<<u;this.words[this.length-1]&=v}return this._strip()},f.prototype.maskn=function(r){return this.clone().imaskn(r)},f.prototype.iaddn=function(r){return s(typeof r=="number"),s(r<67108864),r<0?this.isubn(-r):this.negative!==0?this.length===1&&(this.words[0]|0)<=r?(this.words[0]=r-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(r),this.negative=1,this):this._iaddn(r)},f.prototype._iaddn=function(r){this.words[0]+=r;for(var u=0;u<this.length&&this.words[u]>=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},f.prototype.isubn=function(r){if(s(typeof r=="number"),s(r<67108864),r<0)return this.iaddn(-r);if(this.negative!==0)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u<this.length&&this.words[u]<0;u++)this.words[u]+=67108864,this.words[u+1]-=1;return this._strip()},f.prototype.addn=function(r){return this.clone().iaddn(r)},f.prototype.subn=function(r){return this.clone().isubn(r)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(r,u,p){var v=r.length+p,x;this._expand(v);var w,b=0;for(x=0;x<r.length;x++){w=(this.words[x+p]|0)+b;var l=(r.words[x]|0)*u;w-=l&67108863,b=(w>>26)-(l/67108864|0),this.words[x+p]=w&67108863}for(;x<this.length-p;x++)w=(this.words[x+p]|0)+b,b=w>>26,this.words[x+p]=w&67108863;if(b===0)return this._strip();for(s(b===-1),b=0,x=0;x<this.length;x++)w=-(this.words[x]|0)+b,b=w>>26,this.words[x]=w&67108863;return this.negative=1,this._strip()},f.prototype._wordDiv=function(r,u){var p=this.length-r.length,v=this.clone(),x=r,w=x.words[x.length-1]|0,b=this._countBits(w);p=26-b,p!==0&&(x=x.ushln(p),v.iushln(p),w=x.words[x.length-1]|0);var l=v.length-x.length,i;if(u!=="mod"){i=new f(null),i.length=l+1,i.words=new Array(i.length);for(var y=0;y<i.length;y++)i.words[y]=0}var D=v.clone()._ishlnsubmul(x,1,l);D.negative===0&&(v=D,i&&(i.words[l]=1));for(var O=l-1;O>=0;O--){var U=(v.words[x.length+O]|0)*67108864+(v.words[x.length+O-1]|0);for(U=Math.min(U/w|0,67108863),v._ishlnsubmul(x,U,O);v.negative!==0;)U--,v.negative=0,v._ishlnsubmul(x,1,O),v.isZero()||(v.negative^=1);i&&(i.words[O]=U)}return i&&i._strip(),v._strip(),u!=="div"&&p!==0&&v.iushrn(p),{div:i||null,mod:v}},f.prototype.divmod=function(r,u,p){if(s(!r.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var v,x,w;return this.negative!==0&&r.negative===0?(w=this.neg().divmod(r,u),u!=="mod"&&(v=w.div.neg()),u!=="div"&&(x=w.mod.neg(),p&&x.negative!==0&&x.iadd(r)),{div:v,mod:x}):this.negative===0&&r.negative!==0?(w=this.divmod(r.neg(),u),u!=="mod"&&(v=w.div.neg()),{div:v,mod:w.mod}):this.negative&r.negative?(w=this.neg().divmod(r.neg(),u),u!=="div"&&(x=w.mod.neg(),p&&x.negative!==0&&x.isub(r)),{div:w.div,mod:x}):r.length>this.length||this.cmp(r)<0?{div:new f(0),mod:this}:r.length===1?u==="div"?{div:this.divn(r.words[0]),mod:null}:u==="mod"?{div:null,mod:new f(this.modrn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new f(this.modrn(r.words[0]))}:this._wordDiv(r,u)},f.prototype.div=function(r){return this.divmod(r,"div",!1).div},f.prototype.mod=function(r){return this.divmod(r,"mod",!1).mod},f.prototype.umod=function(r){return this.divmod(r,"mod",!0).mod},f.prototype.divRound=function(r){var u=this.divmod(r);if(u.mod.isZero())return u.div;var p=u.div.negative!==0?u.mod.isub(r):u.mod,v=r.ushrn(1),x=r.andln(1),w=p.cmp(v);return w<0||x===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},f.prototype.modrn=function(r){var u=r<0;u&&(r=-r),s(r<=67108863);for(var p=(1<<26)%r,v=0,x=this.length-1;x>=0;x--)v=(p*v+(this.words[x]|0))%r;return u?-v:v},f.prototype.modn=function(r){return this.modrn(r)},f.prototype.idivn=function(r){var u=r<0;u&&(r=-r),s(r<=67108863);for(var p=0,v=this.length-1;v>=0;v--){var x=(this.words[v]|0)+p*67108864;this.words[v]=x/r|0,p=x%r}return this._strip(),u?this.ineg():this},f.prototype.divn=function(r){return this.clone().idivn(r)},f.prototype.egcd=function(r){s(r.negative===0),s(!r.isZero());var u=this,p=r.clone();u.negative!==0?u=u.umod(r):u=u.clone();for(var v=new f(1),x=new f(0),w=new f(0),b=new f(1),l=0;u.isEven()&&p.isEven();)u.iushrn(1),p.iushrn(1),++l;for(var i=p.clone(),y=u.clone();!u.isZero();){for(var D=0,O=1;!(u.words[0]&O)&&D<26;++D,O<<=1);if(D>0)for(u.iushrn(D);D-- >0;)(v.isOdd()||x.isOdd())&&(v.iadd(i),x.isub(y)),v.iushrn(1),x.iushrn(1);for(var U=0,V=1;!(p.words[0]&V)&&U<26;++U,V<<=1);if(U>0)for(p.iushrn(U);U-- >0;)(w.isOdd()||b.isOdd())&&(w.iadd(i),b.isub(y)),w.iushrn(1),b.iushrn(1);u.cmp(p)>=0?(u.isub(p),v.isub(w),x.isub(b)):(p.isub(u),w.isub(v),b.isub(x))}return{a:w,b,gcd:p.iushln(l)}},f.prototype._invmp=function(r){s(r.negative===0),s(!r.isZero());var u=this,p=r.clone();u.negative!==0?u=u.umod(r):u=u.clone();for(var v=new f(1),x=new f(0),w=p.clone();u.cmpn(1)>0&&p.cmpn(1)>0;){for(var b=0,l=1;!(u.words[0]&l)&&b<26;++b,l<<=1);if(b>0)for(u.iushrn(b);b-- >0;)v.isOdd()&&v.iadd(w),v.iushrn(1);for(var i=0,y=1;!(p.words[0]&y)&&i<26;++i,y<<=1);if(i>0)for(p.iushrn(i);i-- >0;)x.isOdd()&&x.iadd(w),x.iushrn(1);u.cmp(p)>=0?(u.isub(p),v.isub(x)):(p.isub(u),x.isub(v))}var D;return u.cmpn(1)===0?D=v:D=x,D.cmpn(0)<0&&D.iadd(r),D},f.prototype.gcd=function(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var u=this.clone(),p=r.clone();u.negative=0,p.negative=0;for(var v=0;u.isEven()&&p.isEven();v++)u.iushrn(1),p.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;p.isEven();)p.iushrn(1);var x=u.cmp(p);if(x<0){var w=u;u=p,p=w}else if(x===0||p.cmpn(1)===0)break;u.isub(p)}while(!0);return p.iushln(v)},f.prototype.invm=function(r){return this.egcd(r).a.umod(r)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(r){return this.words[0]&r},f.prototype.bincn=function(r){s(typeof r=="number");var u=r%26,p=(r-u)/26,v=1<<u;if(this.length<=p)return this._expand(p+1),this.words[p]|=v,this;for(var x=v,w=p;x!==0&&w<this.length;w++){var b=this.words[w]|0;b+=x,x=b>>>26,b&=67108863,this.words[w]=b}return x!==0&&(this.words[w]=x,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(r){var u=r<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this._strip();var p;if(this.length>1)p=1;else{u&&(r=-r),s(r<=67108863,"Number is too big");var v=this.words[0]|0;p=v===r?0:v<r?-1:1}return this.negative!==0?-p|0:p},f.prototype.cmp=function(r){if(this.negative!==0&&r.negative===0)return-1;if(this.negative===0&&r.negative!==0)return 1;var u=this.ucmp(r);return this.negative!==0?-u|0:u},f.prototype.ucmp=function(r){if(this.length>r.length)return 1;if(this.length<r.length)return-1;for(var u=0,p=this.length-1;p>=0;p--){var v=this.words[p]|0,x=r.words[p]|0;if(v!==x){v<x?u=-1:v>x&&(u=1);break}}return u},f.prototype.gtn=function(r){return this.cmpn(r)===1},f.prototype.gt=function(r){return this.cmp(r)===1},f.prototype.gten=function(r){return this.cmpn(r)>=0},f.prototype.gte=function(r){return this.cmp(r)>=0},f.prototype.ltn=function(r){return this.cmpn(r)===-1},f.prototype.lt=function(r){return this.cmp(r)===-1},f.prototype.lten=function(r){return this.cmpn(r)<=0},f.prototype.lte=function(r){return this.cmp(r)<=0},f.prototype.eqn=function(r){return this.cmpn(r)===0},f.prototype.eq=function(r){return this.cmp(r)===0},f.red=function(r){return new Q(r)},f.prototype.toRed=function(r){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),r.convertTo(this)._forceRed(r)},f.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(r){return this.red=r,this},f.prototype.forceRed=function(r){return s(!this.red,"Already a number in reduction context"),this._forceRed(r)},f.prototype.redAdd=function(r){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},f.prototype.redIAdd=function(r){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},f.prototype.redSub=function(r){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},f.prototype.redISub=function(r){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},f.prototype.redShl=function(r){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},f.prototype.redMul=function(r){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},f.prototype.redIMul=function(r){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},f.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(r){return s(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var Y={k256:null,p224:null,p192:null,p25519:null};function K(E,r){this.name=E,this.p=new f(r,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}K.prototype._tmp=function(){var r=new f(null);return r.words=new Array(Math.ceil(this.n/13)),r},K.prototype.ireduce=function(r){var u=r,p;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),p=u.bitLength();while(p>this.n);var v=p<this.n?-1:u.ucmp(this.p);return v===0?(u.words[0]=0,u.length=1):v>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},K.prototype.split=function(r,u){r.iushrn(this.n,0,u)},K.prototype.imulK=function(r){return r.imul(this.k)};function Se(){K.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}h(Se,K),Se.prototype.split=function(r,u){for(var p=4194303,v=Math.min(r.length,9),x=0;x<v;x++)u.words[x]=r.words[x];if(u.length=v,r.length<=9){r.words[0]=0,r.length=1;return}var w=r.words[9];for(u.words[u.length++]=w&p,x=10;x<r.length;x++){var b=r.words[x]|0;r.words[x-10]=(b&p)<<4|w>>>22,w=b}w>>>=22,r.words[x-10]=w,w===0&&r.length>10?r.length-=10:r.length-=9},Se.prototype.imulK=function(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var u=0,p=0;p<r.length;p++){var v=r.words[p]|0;u+=v*977,r.words[p]=u&67108863,u=v*64+(u/67108864|0)}return r.words[r.length-1]===0&&(r.length--,r.words[r.length-1]===0&&r.length--),r};function Oe(){K.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}h(Oe,K);function Le(){K.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}h(Le,K);function je(){K.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}h(je,K),je.prototype.imulK=function(r){for(var u=0,p=0;p<r.length;p++){var v=(r.words[p]|0)*19+u,x=v&67108863;v>>>=26,r.words[p]=x,u=v}return u!==0&&(r.words[r.length++]=u),r},f._prime=function(r){if(Y[r])return Y[r];var u;if(r==="k256")u=new Se;else if(r==="p224")u=new Oe;else if(r==="p192")u=new Le;else if(r==="p25519")u=new je;else throw new Error("Unknown prime "+r);return Y[r]=u,u};function Q(E){if(typeof E=="string"){var r=f._prime(E);this.m=r.p,this.prime=r}else s(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}Q.prototype._verify1=function(r){s(r.negative===0,"red works only with positives"),s(r.red,"red works only with red numbers")},Q.prototype._verify2=function(r,u){s((r.negative|u.negative)===0,"red works only with positives"),s(r.red&&r.red===u.red,"red works only with red numbers")},Q.prototype.imod=function(r){return this.prime?this.prime.ireduce(r)._forceRed(this):(B(r,r.umod(this.m)._forceRed(this)),r)},Q.prototype.neg=function(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},Q.prototype.add=function(r,u){this._verify2(r,u);var p=r.add(u);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},Q.prototype.iadd=function(r,u){this._verify2(r,u);var p=r.iadd(u);return p.cmp(this.m)>=0&&p.isub(this.m),p},Q.prototype.sub=function(r,u){this._verify2(r,u);var p=r.sub(u);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},Q.prototype.isub=function(r,u){this._verify2(r,u);var p=r.isub(u);return p.cmpn(0)<0&&p.iadd(this.m),p},Q.prototype.shl=function(r,u){return this._verify1(r),this.imod(r.ushln(u))},Q.prototype.imul=function(r,u){return this._verify2(r,u),this.imod(r.imul(u))},Q.prototype.mul=function(r,u){return this._verify2(r,u),this.imod(r.mul(u))},Q.prototype.isqr=function(r){return this.imul(r,r.clone())},Q.prototype.sqr=function(r){return this.mul(r,r)},Q.prototype.sqrt=function(r){if(r.isZero())return r.clone();var u=this.m.andln(3);if(s(u%2===1),u===3){var p=this.m.add(new f(1)).iushrn(2);return this.pow(r,p)}for(var v=this.m.subn(1),x=0;!v.isZero()&&v.andln(1)===0;)x++,v.iushrn(1);s(!v.isZero());var w=new f(1).toRed(this),b=w.redNeg(),l=this.m.subn(1).iushrn(1),i=this.m.bitLength();for(i=new f(2*i*i).toRed(this);this.pow(i,l).cmp(b)!==0;)i.redIAdd(b);for(var y=this.pow(i,v),D=this.pow(r,v.addn(1).iushrn(1)),O=this.pow(r,v),U=x;O.cmp(w)!==0;){for(var V=O,H=0;V.cmp(w)!==0;H++)V=V.redSqr();s(H<U);var W=this.pow(y,new f(1).iushln(U-H-1));D=D.redMul(W),y=W.redSqr(),O=O.redMul(y),U=H}return D},Q.prototype.invm=function(r){var u=r._invmp(this.m);return u.negative!==0?(u.negative=0,this.imod(u).redNeg()):this.imod(u)},Q.prototype.pow=function(r,u){if(u.isZero())return new f(1).toRed(this);if(u.cmpn(1)===0)return r.clone();var p=4,v=new Array(1<<p);v[0]=new f(1).toRed(this),v[1]=r;for(var x=2;x<v.length;x++)v[x]=this.mul(v[x-1],r);var w=v[0],b=0,l=0,i=u.bitLength()%26;for(i===0&&(i=26),x=u.length-1;x>=0;x--){for(var y=u.words[x],D=i-1;D>=0;D--){var O=y>>D&1;if(w!==v[0]&&(w=this.sqr(w)),O===0&&b===0){l=0;continue}b<<=1,b|=O,l++,!(l!==p&&(x!==0||D!==0))&&(w=this.mul(w,v[b]),l=0,b=0)}i=26}return w},Q.prototype.convertTo=function(r){var u=r.umod(this.m);return u===r?u.clone():u},Q.prototype.convertFrom=function(r){var u=r.clone();return u.red=null,u},f.mont=function(r){return new Te(r)};function Te(E){Q.call(this,E),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h(Te,Q),Te.prototype.convertTo=function(r){return this.imod(r.ushln(this.shift))},Te.prototype.convertFrom=function(r){var u=this.imod(r.mul(this.rinv));return u.red=null,u},Te.prototype.imul=function(r,u){if(r.isZero()||u.isZero())return r.words[0]=0,r.length=1,r;var p=r.imul(u),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=p.isub(v).iushrn(this.shift),w=x;return x.cmp(this.m)>=0?w=x.isub(this.m):x.cmpn(0)<0&&(w=x.iadd(this.m)),w._forceRed(this)},Te.prototype.mul=function(r,u){if(r.isZero()||u.isZero())return new f(0)._forceRed(this);var p=r.mul(u),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=p.isub(v).iushrn(this.shift),w=x;return x.cmp(this.m)>=0?w=x.isub(this.m):x.cmpn(0)<0&&(w=x.iadd(this.m)),w._forceRed(this)},Te.prototype.invm=function(r){var u=this.imod(r._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(e,$e.commonjsGlobal)})(Rr);var pi=Rr.exports,Cn={},_t={};_t.byteLength=gi;_t.toByteArray=vi;_t.fromByteArray=Ei;var Je=[],qe=[],mi=typeof Uint8Array<"u"?Uint8Array:Array,tr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var rt=0,yi=tr.length;rt<yi;++rt)Je[rt]=tr[rt],qe[tr.charCodeAt(rt)]=rt;qe["-".charCodeAt(0)]=62;qe["_".charCodeAt(0)]=63;function Fn(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var a=e.indexOf("=");a===-1&&(a=t);var s=a===t?0:4-a%4;return[a,s]}function gi(e){var t=Fn(e),a=t[0],s=t[1];return(a+s)*3/4-s}function wi(e,t,a){return(t+a)*3/4-a}function vi(e){var t,a=Fn(e),s=a[0],h=a[1],f=new mi(wi(e,s,h)),g=0,d=h>0?s-4:s,A;for(A=0;A<d;A+=4)t=qe[e.charCodeAt(A)]<<18|qe[e.charCodeAt(A+1)]<<12|qe[e.charCodeAt(A+2)]<<6|qe[e.charCodeAt(A+3)],f[g++]=t>>16&255,f[g++]=t>>8&255,f[g++]=t&255;return h===2&&(t=qe[e.charCodeAt(A)]<<2|qe[e.charCodeAt(A+1)]>>4,f[g++]=t&255),h===1&&(t=qe[e.charCodeAt(A)]<<10|qe[e.charCodeAt(A+1)]<<4|qe[e.charCodeAt(A+2)]>>2,f[g++]=t>>8&255,f[g++]=t&255),f}function bi(e){return Je[e>>18&63]+Je[e>>12&63]+Je[e>>6&63]+Je[e&63]}function xi(e,t,a){for(var s,h=[],f=t;f<a;f+=3)s=(e[f]<<16&16711680)+(e[f+1]<<8&65280)+(e[f+2]&255),h.push(bi(s));return h.join("")}function Ei(e){for(var t,a=e.length,s=a%3,h=[],f=16383,g=0,d=a-s;g<d;g+=f)h.push(xi(e,g,g+f>d?d:g+f));return s===1?(t=e[a-1],h.push(Je[t>>2]+Je[t<<4&63]+"==")):s===2&&(t=(e[a-2]<<8)+e[a-1],h.push(Je[t>>10]+Je[t>>4&63]+Je[t<<2&63]+"=")),h.join("")}var Sr={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Sr.read=function(e,t,a,s,h){var f,g,d=h*8-s-1,A=(1<<d)-1,R=A>>1,B=-7,S=a?h-1:0,I=a?-1:1,k=e[t+S];for(S+=I,f=k&(1<<-B)-1,k>>=-B,B+=d;B>0;f=f*256+e[t+S],S+=I,B-=8);for(g=f&(1<<-B)-1,f>>=-B,B+=s;B>0;g=g*256+e[t+S],S+=I,B-=8);if(f===0)f=1-R;else{if(f===A)return g?NaN:(k?-1:1)*(1/0);g=g+Math.pow(2,s),f=f-R}return(k?-1:1)*g*Math.pow(2,f-s)};Sr.write=function(e,t,a,s,h,f){var g,d,A,R=f*8-h-1,B=(1<<R)-1,S=B>>1,I=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=s?0:f-1,T=s?1:-1,N=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(d=isNaN(t)?1:0,g=B):(g=Math.floor(Math.log(t)/Math.LN2),t*(A=Math.pow(2,-g))<1&&(g--,A*=2),g+S>=1?t+=I/A:t+=I*Math.pow(2,1-S),t*A>=2&&(g++,A/=2),g+S>=B?(d=0,g=B):g+S>=1?(d=(t*A-1)*Math.pow(2,h),g=g+S):(d=t*Math.pow(2,S-1)*Math.pow(2,h),g=0));h>=8;e[a+k]=d&255,k+=T,d/=256,h-=8);for(g=g<<h|d,R+=h;R>0;e[a+k]=g&255,k+=T,g/=256,R-=8);e[a+k-T]|=N*128};/*!
|
|
1
|
+
"use strict";var ui=Object.defineProperty;var ci=(e,t,a)=>t in e?ui(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var Z=(e,t,a)=>(ci(e,typeof t!="symbol"?t+"":t,a),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $e=require("./index-c3ce9289.cjs"),ut=require("viem");require("react");require("wagmi");require("@tanstack/react-query");var Rr={exports:{}};const li={},hi=Object.freeze(Object.defineProperty({__proto__:null,default:li},Symbol.toStringTag,{value:"Module"})),di=$e.getAugmentedNamespace(hi);Rr.exports;(function(e){(function(t,a){function s(E,r){if(!E)throw new Error(r||"Assertion failed")}function h(E,r){E.super_=r;var u=function(){};u.prototype=r.prototype,E.prototype=new u,E.prototype.constructor=E}function f(E,r,u){if(f.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&((r==="le"||r==="be")&&(u=r,r=10),this._init(E||0,r||10,u||"be"))}typeof t=="object"?t.exports=f:a.BN=f,f.BN=f,f.wordSize=26;var g;try{typeof window<"u"&&typeof window.Buffer<"u"?g=window.Buffer:g=di.Buffer}catch{}f.isBN=function(r){return r instanceof f?!0:r!==null&&typeof r=="object"&&r.constructor.wordSize===f.wordSize&&Array.isArray(r.words)},f.max=function(r,u){return r.cmp(u)>0?r:u},f.min=function(r,u){return r.cmp(u)<0?r:u},f.prototype._init=function(r,u,p){if(typeof r=="number")return this._initNumber(r,u,p);if(typeof r=="object")return this._initArray(r,u,p);u==="hex"&&(u=16),s(u===(u|0)&&u>=2&&u<=36),r=r.toString().replace(/\s+/g,"");var v=0;r[0]==="-"&&(v++,this.negative=1),v<r.length&&(u===16?this._parseHex(r,v,p):(this._parseBase(r,u,v),p==="le"&&this._initArray(this.toArray(),u,p)))},f.prototype._initNumber=function(r,u,p){r<0&&(this.negative=1,r=-r),r<67108864?(this.words=[r&67108863],this.length=1):r<4503599627370496?(this.words=[r&67108863,r/67108864&67108863],this.length=2):(s(r<9007199254740992),this.words=[r&67108863,r/67108864&67108863,1],this.length=3),p==="le"&&this._initArray(this.toArray(),u,p)},f.prototype._initArray=function(r,u,p){if(s(typeof r.length=="number"),r.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(r.length/3),this.words=new Array(this.length);for(var v=0;v<this.length;v++)this.words[v]=0;var x,w,b=0;if(p==="be")for(v=r.length-1,x=0;v>=0;v-=3)w=r[v]|r[v-1]<<8|r[v-2]<<16,this.words[x]|=w<<b&67108863,this.words[x+1]=w>>>26-b&67108863,b+=24,b>=26&&(b-=26,x++);else if(p==="le")for(v=0,x=0;v<r.length;v+=3)w=r[v]|r[v+1]<<8|r[v+2]<<16,this.words[x]|=w<<b&67108863,this.words[x+1]=w>>>26-b&67108863,b+=24,b>=26&&(b-=26,x++);return this._strip()};function d(E,r){var u=E.charCodeAt(r);if(u>=48&&u<=57)return u-48;if(u>=65&&u<=70)return u-55;if(u>=97&&u<=102)return u-87;s(!1,"Invalid character in "+E)}function A(E,r,u){var p=d(E,u);return u-1>=r&&(p|=d(E,u-1)<<4),p}f.prototype._parseHex=function(r,u,p){this.length=Math.ceil((r.length-u)/6),this.words=new Array(this.length);for(var v=0;v<this.length;v++)this.words[v]=0;var x=0,w=0,b;if(p==="be")for(v=r.length-1;v>=u;v-=2)b=A(r,u,v)<<x,this.words[w]|=b&67108863,x>=18?(x-=18,w+=1,this.words[w]|=b>>>26):x+=8;else{var l=r.length-u;for(v=l%2===0?u+1:u;v<r.length;v+=2)b=A(r,u,v)<<x,this.words[w]|=b&67108863,x>=18?(x-=18,w+=1,this.words[w]|=b>>>26):x+=8}this._strip()};function R(E,r,u,p){for(var v=0,x=0,w=Math.min(E.length,u),b=r;b<w;b++){var l=E.charCodeAt(b)-48;v*=p,l>=49?x=l-49+10:l>=17?x=l-17+10:x=l,s(l>=0&&x<p,"Invalid character"),v+=x}return v}f.prototype._parseBase=function(r,u,p){this.words=[0],this.length=1;for(var v=0,x=1;x<=67108863;x*=u)v++;v--,x=x/u|0;for(var w=r.length-p,b=w%v,l=Math.min(w,w-b)+p,i=0,y=p;y<l;y+=v)i=R(r,y,y+v,u),this.imuln(x),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i);if(b!==0){var D=1;for(i=R(r,y,r.length,u),y=0;y<b;y++)D*=u;this.imuln(D),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i)}this._strip()},f.prototype.copy=function(r){r.words=new Array(this.length);for(var u=0;u<this.length;u++)r.words[u]=this.words[u];r.length=this.length,r.negative=this.negative,r.red=this.red};function B(E,r){E.words=r.words,E.length=r.length,E.negative=r.negative,E.red=r.red}if(f.prototype._move=function(r){B(r,this)},f.prototype.clone=function(){var r=new f(null);return this.copy(r),r},f.prototype._expand=function(r){for(;this.length<r;)this.words[this.length++]=0;return this},f.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{f.prototype[Symbol.for("nodejs.util.inspect.custom")]=S}catch{f.prototype.inspect=S}else f.prototype.inspect=S;function S(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var I=["","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"],k=[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],T=[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];f.prototype.toString=function(r,u){r=r||10,u=u|0||1;var p;if(r===16||r==="hex"){p="";for(var v=0,x=0,w=0;w<this.length;w++){var b=this.words[w],l=((b<<v|x)&16777215).toString(16);x=b>>>24-v&16777215,v+=2,v>=26&&(v-=26,w--),x!==0||w!==this.length-1?p=I[6-l.length]+l+p:p=l+p}for(x!==0&&(p=x.toString(16)+p);p.length%u!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(r===(r|0)&&r>=2&&r<=36){var i=k[r],y=T[r];p="";var D=this.clone();for(D.negative=0;!D.isZero();){var O=D.modrn(y).toString(r);D=D.idivn(y),D.isZero()?p=O+p:p=I[i-O.length]+O+p}for(this.isZero()&&(p="0"+p);p.length%u!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}s(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var r=this.words[0];return this.length===2?r+=this.words[1]*67108864:this.length===3&&this.words[2]===1?r+=4503599627370496+this.words[1]*67108864:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-r:r},f.prototype.toJSON=function(){return this.toString(16,2)},g&&(f.prototype.toBuffer=function(r,u){return this.toArrayLike(g,r,u)}),f.prototype.toArray=function(r,u){return this.toArrayLike(Array,r,u)};var N=function(r,u){return r.allocUnsafe?r.allocUnsafe(u):new r(u)};f.prototype.toArrayLike=function(r,u,p){this._strip();var v=this.byteLength(),x=p||Math.max(1,v);s(v<=x,"byte array longer than desired length"),s(x>0,"Requested array length <= 0");var w=N(r,x),b=u==="le"?"LE":"BE";return this["_toArrayLike"+b](w,v),w},f.prototype._toArrayLikeLE=function(r,u){for(var p=0,v=0,x=0,w=0;x<this.length;x++){var b=this.words[x]<<w|v;r[p++]=b&255,p<r.length&&(r[p++]=b>>8&255),p<r.length&&(r[p++]=b>>16&255),w===6?(p<r.length&&(r[p++]=b>>24&255),v=0,w=0):(v=b>>>24,w+=2)}if(p<r.length)for(r[p++]=v;p<r.length;)r[p++]=0},f.prototype._toArrayLikeBE=function(r,u){for(var p=r.length-1,v=0,x=0,w=0;x<this.length;x++){var b=this.words[x]<<w|v;r[p--]=b&255,p>=0&&(r[p--]=b>>8&255),p>=0&&(r[p--]=b>>16&255),w===6?(p>=0&&(r[p--]=b>>24&255),v=0,w=0):(v=b>>>24,w+=2)}if(p>=0)for(r[p--]=v;p>=0;)r[p--]=0},Math.clz32?f.prototype._countBits=function(r){return 32-Math.clz32(r)}:f.prototype._countBits=function(r){var u=r,p=0;return u>=4096&&(p+=13,u>>>=13),u>=64&&(p+=7,u>>>=7),u>=8&&(p+=4,u>>>=4),u>=2&&(p+=2,u>>>=2),p+u},f.prototype._zeroBits=function(r){if(r===0)return 26;var u=r,p=0;return u&8191||(p+=13,u>>>=13),u&127||(p+=7,u>>>=7),u&15||(p+=4,u>>>=4),u&3||(p+=2,u>>>=2),u&1||p++,p},f.prototype.bitLength=function(){var r=this.words[this.length-1],u=this._countBits(r);return(this.length-1)*26+u};function P(E){for(var r=new Array(E.bitLength()),u=0;u<r.length;u++){var p=u/26|0,v=u%26;r[u]=E.words[p]>>>v&1}return r}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,u=0;u<this.length;u++){var p=this._zeroBits(this.words[u]);if(r+=p,p!==26)break}return r},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(r){return this.negative!==0?this.abs().inotn(r).iaddn(1):this.clone()},f.prototype.fromTwos=function(r){return this.testn(r-1)?this.notn(r).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(r){for(;this.length<r.length;)this.words[this.length++]=0;for(var u=0;u<r.length;u++)this.words[u]=this.words[u]|r.words[u];return this._strip()},f.prototype.ior=function(r){return s((this.negative|r.negative)===0),this.iuor(r)},f.prototype.or=function(r){return this.length>r.length?this.clone().ior(r):r.clone().ior(this)},f.prototype.uor=function(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},f.prototype.iuand=function(r){var u;this.length>r.length?u=r:u=this;for(var p=0;p<u.length;p++)this.words[p]=this.words[p]&r.words[p];return this.length=u.length,this._strip()},f.prototype.iand=function(r){return s((this.negative|r.negative)===0),this.iuand(r)},f.prototype.and=function(r){return this.length>r.length?this.clone().iand(r):r.clone().iand(this)},f.prototype.uand=function(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},f.prototype.iuxor=function(r){var u,p;this.length>r.length?(u=this,p=r):(u=r,p=this);for(var v=0;v<p.length;v++)this.words[v]=u.words[v]^p.words[v];if(this!==u)for(;v<u.length;v++)this.words[v]=u.words[v];return this.length=u.length,this._strip()},f.prototype.ixor=function(r){return s((this.negative|r.negative)===0),this.iuxor(r)},f.prototype.xor=function(r){return this.length>r.length?this.clone().ixor(r):r.clone().ixor(this)},f.prototype.uxor=function(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},f.prototype.inotn=function(r){s(typeof r=="number"&&r>=0);var u=Math.ceil(r/26)|0,p=r%26;this._expand(u),p>0&&u--;for(var v=0;v<u;v++)this.words[v]=~this.words[v]&67108863;return p>0&&(this.words[v]=~this.words[v]&67108863>>26-p),this._strip()},f.prototype.notn=function(r){return this.clone().inotn(r)},f.prototype.setn=function(r,u){s(typeof r=="number"&&r>=0);var p=r/26|0,v=r%26;return this._expand(p+1),u?this.words[p]=this.words[p]|1<<v:this.words[p]=this.words[p]&~(1<<v),this._strip()},f.prototype.iadd=function(r){var u;if(this.negative!==0&&r.negative===0)return this.negative=0,u=this.isub(r),this.negative^=1,this._normSign();if(this.negative===0&&r.negative!==0)return r.negative=0,u=this.isub(r),r.negative=1,u._normSign();var p,v;this.length>r.length?(p=this,v=r):(p=r,v=this);for(var x=0,w=0;w<v.length;w++)u=(p.words[w]|0)+(v.words[w]|0)+x,this.words[w]=u&67108863,x=u>>>26;for(;x!==0&&w<p.length;w++)u=(p.words[w]|0)+x,this.words[w]=u&67108863,x=u>>>26;if(this.length=p.length,x!==0)this.words[this.length]=x,this.length++;else if(p!==this)for(;w<p.length;w++)this.words[w]=p.words[w];return this},f.prototype.add=function(r){var u;return r.negative!==0&&this.negative===0?(r.negative=0,u=this.sub(r),r.negative^=1,u):r.negative===0&&this.negative!==0?(this.negative=0,u=r.sub(this),this.negative=1,u):this.length>r.length?this.clone().iadd(r):r.clone().iadd(this)},f.prototype.isub=function(r){if(r.negative!==0){r.negative=0;var u=this.iadd(r);return r.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var p=this.cmp(r);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,x;p>0?(v=this,x=r):(v=r,x=this);for(var w=0,b=0;b<x.length;b++)u=(v.words[b]|0)-(x.words[b]|0)+w,w=u>>26,this.words[b]=u&67108863;for(;w!==0&&b<v.length;b++)u=(v.words[b]|0)+w,w=u>>26,this.words[b]=u&67108863;if(w===0&&b<v.length&&v!==this)for(;b<v.length;b++)this.words[b]=v.words[b];return this.length=Math.max(this.length,b),v!==this&&(this.negative=1),this._strip()},f.prototype.sub=function(r){return this.clone().isub(r)};function J(E,r,u){u.negative=r.negative^E.negative;var p=E.length+r.length|0;u.length=p,p=p-1|0;var v=E.words[0]|0,x=r.words[0]|0,w=v*x,b=w&67108863,l=w/67108864|0;u.words[0]=b;for(var i=1;i<p;i++){for(var y=l>>>26,D=l&67108863,O=Math.min(i,r.length-1),U=Math.max(0,i-E.length+1);U<=O;U++){var V=i-U|0;v=E.words[V]|0,x=r.words[U]|0,w=v*x+D,y+=w/67108864|0,D=w&67108863}u.words[i]=D|0,l=y|0}return l!==0?u.words[i]=l|0:u.length--,u._strip()}var X=function(r,u,p){var v=r.words,x=u.words,w=p.words,b=0,l,i,y,D=v[0]|0,O=D&8191,U=D>>>13,V=v[1]|0,H=V&8191,W=V>>>13,Ie=v[2]|0,ae=Ie&8191,oe=Ie>>>13,Ve=v[3]|0,ee=Ve&8191,fe=Ve>>>13,pt=v[4]|0,ne=pt&8191,ue=pt>>>13,mt=v[5]|0,se=mt&8191,te=mt>>>13,Ue=v[6]|0,ie=Ue&8191,ce=Ue>>>13,ze=v[7]|0,le=ze&8191,c=ze>>>13,n=v[8]|0,o=n&8191,m=n>>>13,_=v[9]|0,M=_&8191,C=_>>>13,z=x[0]|0,q=z&8191,j=z>>>13,re=x[1]|0,L=re&8191,he=re>>>13,Jr=x[2]|0,de=Jr&8191,pe=Jr>>>13,Gr=x[3]|0,me=Gr&8191,ye=Gr>>>13,Vr=x[4]|0,ge=Vr&8191,we=Vr>>>13,Kr=x[5]|0,ve=Kr&8191,be=Kr>>>13,Zr=x[6]|0,xe=Zr&8191,Ee=Zr>>>13,Yr=x[7]|0,_e=Yr&8191,Me=Yr>>>13,Xr=x[8]|0,Ae=Xr&8191,Be=Xr>>>13,Qr=x[9]|0,Ce=Qr&8191,Fe=Qr>>>13;p.negative=r.negative^u.negative,p.length=19,l=Math.imul(O,q),i=Math.imul(O,j),i=i+Math.imul(U,q)|0,y=Math.imul(U,j);var Ut=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,l=Math.imul(H,q),i=Math.imul(H,j),i=i+Math.imul(W,q)|0,y=Math.imul(W,j),l=l+Math.imul(O,L)|0,i=i+Math.imul(O,he)|0,i=i+Math.imul(U,L)|0,y=y+Math.imul(U,he)|0;var Nt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,l=Math.imul(ae,q),i=Math.imul(ae,j),i=i+Math.imul(oe,q)|0,y=Math.imul(oe,j),l=l+Math.imul(H,L)|0,i=i+Math.imul(H,he)|0,i=i+Math.imul(W,L)|0,y=y+Math.imul(W,he)|0,l=l+Math.imul(O,de)|0,i=i+Math.imul(O,pe)|0,i=i+Math.imul(U,de)|0,y=y+Math.imul(U,pe)|0;var kt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,l=Math.imul(ee,q),i=Math.imul(ee,j),i=i+Math.imul(fe,q)|0,y=Math.imul(fe,j),l=l+Math.imul(ae,L)|0,i=i+Math.imul(ae,he)|0,i=i+Math.imul(oe,L)|0,y=y+Math.imul(oe,he)|0,l=l+Math.imul(H,de)|0,i=i+Math.imul(H,pe)|0,i=i+Math.imul(W,de)|0,y=y+Math.imul(W,pe)|0,l=l+Math.imul(O,me)|0,i=i+Math.imul(O,ye)|0,i=i+Math.imul(U,me)|0,y=y+Math.imul(U,ye)|0;var Lt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,l=Math.imul(ne,q),i=Math.imul(ne,j),i=i+Math.imul(ue,q)|0,y=Math.imul(ue,j),l=l+Math.imul(ee,L)|0,i=i+Math.imul(ee,he)|0,i=i+Math.imul(fe,L)|0,y=y+Math.imul(fe,he)|0,l=l+Math.imul(ae,de)|0,i=i+Math.imul(ae,pe)|0,i=i+Math.imul(oe,de)|0,y=y+Math.imul(oe,pe)|0,l=l+Math.imul(H,me)|0,i=i+Math.imul(H,ye)|0,i=i+Math.imul(W,me)|0,y=y+Math.imul(W,ye)|0,l=l+Math.imul(O,ge)|0,i=i+Math.imul(O,we)|0,i=i+Math.imul(U,ge)|0,y=y+Math.imul(U,we)|0;var jt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,l=Math.imul(se,q),i=Math.imul(se,j),i=i+Math.imul(te,q)|0,y=Math.imul(te,j),l=l+Math.imul(ne,L)|0,i=i+Math.imul(ne,he)|0,i=i+Math.imul(ue,L)|0,y=y+Math.imul(ue,he)|0,l=l+Math.imul(ee,de)|0,i=i+Math.imul(ee,pe)|0,i=i+Math.imul(fe,de)|0,y=y+Math.imul(fe,pe)|0,l=l+Math.imul(ae,me)|0,i=i+Math.imul(ae,ye)|0,i=i+Math.imul(oe,me)|0,y=y+Math.imul(oe,ye)|0,l=l+Math.imul(H,ge)|0,i=i+Math.imul(H,we)|0,i=i+Math.imul(W,ge)|0,y=y+Math.imul(W,we)|0,l=l+Math.imul(O,ve)|0,i=i+Math.imul(O,be)|0,i=i+Math.imul(U,ve)|0,y=y+Math.imul(U,be)|0;var qt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(qt>>>26)|0,qt&=67108863,l=Math.imul(ie,q),i=Math.imul(ie,j),i=i+Math.imul(ce,q)|0,y=Math.imul(ce,j),l=l+Math.imul(se,L)|0,i=i+Math.imul(se,he)|0,i=i+Math.imul(te,L)|0,y=y+Math.imul(te,he)|0,l=l+Math.imul(ne,de)|0,i=i+Math.imul(ne,pe)|0,i=i+Math.imul(ue,de)|0,y=y+Math.imul(ue,pe)|0,l=l+Math.imul(ee,me)|0,i=i+Math.imul(ee,ye)|0,i=i+Math.imul(fe,me)|0,y=y+Math.imul(fe,ye)|0,l=l+Math.imul(ae,ge)|0,i=i+Math.imul(ae,we)|0,i=i+Math.imul(oe,ge)|0,y=y+Math.imul(oe,we)|0,l=l+Math.imul(H,ve)|0,i=i+Math.imul(H,be)|0,i=i+Math.imul(W,ve)|0,y=y+Math.imul(W,be)|0,l=l+Math.imul(O,xe)|0,i=i+Math.imul(O,Ee)|0,i=i+Math.imul(U,xe)|0,y=y+Math.imul(U,Ee)|0;var $t=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+($t>>>26)|0,$t&=67108863,l=Math.imul(le,q),i=Math.imul(le,j),i=i+Math.imul(c,q)|0,y=Math.imul(c,j),l=l+Math.imul(ie,L)|0,i=i+Math.imul(ie,he)|0,i=i+Math.imul(ce,L)|0,y=y+Math.imul(ce,he)|0,l=l+Math.imul(se,de)|0,i=i+Math.imul(se,pe)|0,i=i+Math.imul(te,de)|0,y=y+Math.imul(te,pe)|0,l=l+Math.imul(ne,me)|0,i=i+Math.imul(ne,ye)|0,i=i+Math.imul(ue,me)|0,y=y+Math.imul(ue,ye)|0,l=l+Math.imul(ee,ge)|0,i=i+Math.imul(ee,we)|0,i=i+Math.imul(fe,ge)|0,y=y+Math.imul(fe,we)|0,l=l+Math.imul(ae,ve)|0,i=i+Math.imul(ae,be)|0,i=i+Math.imul(oe,ve)|0,y=y+Math.imul(oe,be)|0,l=l+Math.imul(H,xe)|0,i=i+Math.imul(H,Ee)|0,i=i+Math.imul(W,xe)|0,y=y+Math.imul(W,Ee)|0,l=l+Math.imul(O,_e)|0,i=i+Math.imul(O,Me)|0,i=i+Math.imul(U,_e)|0,y=y+Math.imul(U,Me)|0;var zt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,l=Math.imul(o,q),i=Math.imul(o,j),i=i+Math.imul(m,q)|0,y=Math.imul(m,j),l=l+Math.imul(le,L)|0,i=i+Math.imul(le,he)|0,i=i+Math.imul(c,L)|0,y=y+Math.imul(c,he)|0,l=l+Math.imul(ie,de)|0,i=i+Math.imul(ie,pe)|0,i=i+Math.imul(ce,de)|0,y=y+Math.imul(ce,pe)|0,l=l+Math.imul(se,me)|0,i=i+Math.imul(se,ye)|0,i=i+Math.imul(te,me)|0,y=y+Math.imul(te,ye)|0,l=l+Math.imul(ne,ge)|0,i=i+Math.imul(ne,we)|0,i=i+Math.imul(ue,ge)|0,y=y+Math.imul(ue,we)|0,l=l+Math.imul(ee,ve)|0,i=i+Math.imul(ee,be)|0,i=i+Math.imul(fe,ve)|0,y=y+Math.imul(fe,be)|0,l=l+Math.imul(ae,xe)|0,i=i+Math.imul(ae,Ee)|0,i=i+Math.imul(oe,xe)|0,y=y+Math.imul(oe,Ee)|0,l=l+Math.imul(H,_e)|0,i=i+Math.imul(H,Me)|0,i=i+Math.imul(W,_e)|0,y=y+Math.imul(W,Me)|0,l=l+Math.imul(O,Ae)|0,i=i+Math.imul(O,Be)|0,i=i+Math.imul(U,Ae)|0,y=y+Math.imul(U,Be)|0;var Ht=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,l=Math.imul(M,q),i=Math.imul(M,j),i=i+Math.imul(C,q)|0,y=Math.imul(C,j),l=l+Math.imul(o,L)|0,i=i+Math.imul(o,he)|0,i=i+Math.imul(m,L)|0,y=y+Math.imul(m,he)|0,l=l+Math.imul(le,de)|0,i=i+Math.imul(le,pe)|0,i=i+Math.imul(c,de)|0,y=y+Math.imul(c,pe)|0,l=l+Math.imul(ie,me)|0,i=i+Math.imul(ie,ye)|0,i=i+Math.imul(ce,me)|0,y=y+Math.imul(ce,ye)|0,l=l+Math.imul(se,ge)|0,i=i+Math.imul(se,we)|0,i=i+Math.imul(te,ge)|0,y=y+Math.imul(te,we)|0,l=l+Math.imul(ne,ve)|0,i=i+Math.imul(ne,be)|0,i=i+Math.imul(ue,ve)|0,y=y+Math.imul(ue,be)|0,l=l+Math.imul(ee,xe)|0,i=i+Math.imul(ee,Ee)|0,i=i+Math.imul(fe,xe)|0,y=y+Math.imul(fe,Ee)|0,l=l+Math.imul(ae,_e)|0,i=i+Math.imul(ae,Me)|0,i=i+Math.imul(oe,_e)|0,y=y+Math.imul(oe,Me)|0,l=l+Math.imul(H,Ae)|0,i=i+Math.imul(H,Be)|0,i=i+Math.imul(W,Ae)|0,y=y+Math.imul(W,Be)|0,l=l+Math.imul(O,Ce)|0,i=i+Math.imul(O,Fe)|0,i=i+Math.imul(U,Ce)|0,y=y+Math.imul(U,Fe)|0;var Wt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,l=Math.imul(M,L),i=Math.imul(M,he),i=i+Math.imul(C,L)|0,y=Math.imul(C,he),l=l+Math.imul(o,de)|0,i=i+Math.imul(o,pe)|0,i=i+Math.imul(m,de)|0,y=y+Math.imul(m,pe)|0,l=l+Math.imul(le,me)|0,i=i+Math.imul(le,ye)|0,i=i+Math.imul(c,me)|0,y=y+Math.imul(c,ye)|0,l=l+Math.imul(ie,ge)|0,i=i+Math.imul(ie,we)|0,i=i+Math.imul(ce,ge)|0,y=y+Math.imul(ce,we)|0,l=l+Math.imul(se,ve)|0,i=i+Math.imul(se,be)|0,i=i+Math.imul(te,ve)|0,y=y+Math.imul(te,be)|0,l=l+Math.imul(ne,xe)|0,i=i+Math.imul(ne,Ee)|0,i=i+Math.imul(ue,xe)|0,y=y+Math.imul(ue,Ee)|0,l=l+Math.imul(ee,_e)|0,i=i+Math.imul(ee,Me)|0,i=i+Math.imul(fe,_e)|0,y=y+Math.imul(fe,Me)|0,l=l+Math.imul(ae,Ae)|0,i=i+Math.imul(ae,Be)|0,i=i+Math.imul(oe,Ae)|0,y=y+Math.imul(oe,Be)|0,l=l+Math.imul(H,Ce)|0,i=i+Math.imul(H,Fe)|0,i=i+Math.imul(W,Ce)|0,y=y+Math.imul(W,Fe)|0;var Jt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,l=Math.imul(M,de),i=Math.imul(M,pe),i=i+Math.imul(C,de)|0,y=Math.imul(C,pe),l=l+Math.imul(o,me)|0,i=i+Math.imul(o,ye)|0,i=i+Math.imul(m,me)|0,y=y+Math.imul(m,ye)|0,l=l+Math.imul(le,ge)|0,i=i+Math.imul(le,we)|0,i=i+Math.imul(c,ge)|0,y=y+Math.imul(c,we)|0,l=l+Math.imul(ie,ve)|0,i=i+Math.imul(ie,be)|0,i=i+Math.imul(ce,ve)|0,y=y+Math.imul(ce,be)|0,l=l+Math.imul(se,xe)|0,i=i+Math.imul(se,Ee)|0,i=i+Math.imul(te,xe)|0,y=y+Math.imul(te,Ee)|0,l=l+Math.imul(ne,_e)|0,i=i+Math.imul(ne,Me)|0,i=i+Math.imul(ue,_e)|0,y=y+Math.imul(ue,Me)|0,l=l+Math.imul(ee,Ae)|0,i=i+Math.imul(ee,Be)|0,i=i+Math.imul(fe,Ae)|0,y=y+Math.imul(fe,Be)|0,l=l+Math.imul(ae,Ce)|0,i=i+Math.imul(ae,Fe)|0,i=i+Math.imul(oe,Ce)|0,y=y+Math.imul(oe,Fe)|0;var Gt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,l=Math.imul(M,me),i=Math.imul(M,ye),i=i+Math.imul(C,me)|0,y=Math.imul(C,ye),l=l+Math.imul(o,ge)|0,i=i+Math.imul(o,we)|0,i=i+Math.imul(m,ge)|0,y=y+Math.imul(m,we)|0,l=l+Math.imul(le,ve)|0,i=i+Math.imul(le,be)|0,i=i+Math.imul(c,ve)|0,y=y+Math.imul(c,be)|0,l=l+Math.imul(ie,xe)|0,i=i+Math.imul(ie,Ee)|0,i=i+Math.imul(ce,xe)|0,y=y+Math.imul(ce,Ee)|0,l=l+Math.imul(se,_e)|0,i=i+Math.imul(se,Me)|0,i=i+Math.imul(te,_e)|0,y=y+Math.imul(te,Me)|0,l=l+Math.imul(ne,Ae)|0,i=i+Math.imul(ne,Be)|0,i=i+Math.imul(ue,Ae)|0,y=y+Math.imul(ue,Be)|0,l=l+Math.imul(ee,Ce)|0,i=i+Math.imul(ee,Fe)|0,i=i+Math.imul(fe,Ce)|0,y=y+Math.imul(fe,Fe)|0;var Vt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,l=Math.imul(M,ge),i=Math.imul(M,we),i=i+Math.imul(C,ge)|0,y=Math.imul(C,we),l=l+Math.imul(o,ve)|0,i=i+Math.imul(o,be)|0,i=i+Math.imul(m,ve)|0,y=y+Math.imul(m,be)|0,l=l+Math.imul(le,xe)|0,i=i+Math.imul(le,Ee)|0,i=i+Math.imul(c,xe)|0,y=y+Math.imul(c,Ee)|0,l=l+Math.imul(ie,_e)|0,i=i+Math.imul(ie,Me)|0,i=i+Math.imul(ce,_e)|0,y=y+Math.imul(ce,Me)|0,l=l+Math.imul(se,Ae)|0,i=i+Math.imul(se,Be)|0,i=i+Math.imul(te,Ae)|0,y=y+Math.imul(te,Be)|0,l=l+Math.imul(ne,Ce)|0,i=i+Math.imul(ne,Fe)|0,i=i+Math.imul(ue,Ce)|0,y=y+Math.imul(ue,Fe)|0;var Kt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,l=Math.imul(M,ve),i=Math.imul(M,be),i=i+Math.imul(C,ve)|0,y=Math.imul(C,be),l=l+Math.imul(o,xe)|0,i=i+Math.imul(o,Ee)|0,i=i+Math.imul(m,xe)|0,y=y+Math.imul(m,Ee)|0,l=l+Math.imul(le,_e)|0,i=i+Math.imul(le,Me)|0,i=i+Math.imul(c,_e)|0,y=y+Math.imul(c,Me)|0,l=l+Math.imul(ie,Ae)|0,i=i+Math.imul(ie,Be)|0,i=i+Math.imul(ce,Ae)|0,y=y+Math.imul(ce,Be)|0,l=l+Math.imul(se,Ce)|0,i=i+Math.imul(se,Fe)|0,i=i+Math.imul(te,Ce)|0,y=y+Math.imul(te,Fe)|0;var Zt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,l=Math.imul(M,xe),i=Math.imul(M,Ee),i=i+Math.imul(C,xe)|0,y=Math.imul(C,Ee),l=l+Math.imul(o,_e)|0,i=i+Math.imul(o,Me)|0,i=i+Math.imul(m,_e)|0,y=y+Math.imul(m,Me)|0,l=l+Math.imul(le,Ae)|0,i=i+Math.imul(le,Be)|0,i=i+Math.imul(c,Ae)|0,y=y+Math.imul(c,Be)|0,l=l+Math.imul(ie,Ce)|0,i=i+Math.imul(ie,Fe)|0,i=i+Math.imul(ce,Ce)|0,y=y+Math.imul(ce,Fe)|0;var Yt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,l=Math.imul(M,_e),i=Math.imul(M,Me),i=i+Math.imul(C,_e)|0,y=Math.imul(C,Me),l=l+Math.imul(o,Ae)|0,i=i+Math.imul(o,Be)|0,i=i+Math.imul(m,Ae)|0,y=y+Math.imul(m,Be)|0,l=l+Math.imul(le,Ce)|0,i=i+Math.imul(le,Fe)|0,i=i+Math.imul(c,Ce)|0,y=y+Math.imul(c,Fe)|0;var Xt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,l=Math.imul(M,Ae),i=Math.imul(M,Be),i=i+Math.imul(C,Ae)|0,y=Math.imul(C,Be),l=l+Math.imul(o,Ce)|0,i=i+Math.imul(o,Fe)|0,i=i+Math.imul(m,Ce)|0,y=y+Math.imul(m,Fe)|0;var Qt=(b+l|0)+((i&8191)<<13)|0;b=(y+(i>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,l=Math.imul(M,Ce),i=Math.imul(M,Fe),i=i+Math.imul(C,Ce)|0,y=Math.imul(C,Fe);var er=(b+l|0)+((i&8191)<<13)|0;return b=(y+(i>>>13)|0)+(er>>>26)|0,er&=67108863,w[0]=Ut,w[1]=Nt,w[2]=kt,w[3]=Lt,w[4]=jt,w[5]=qt,w[6]=$t,w[7]=zt,w[8]=Ht,w[9]=Wt,w[10]=Jt,w[11]=Gt,w[12]=Vt,w[13]=Kt,w[14]=Zt,w[15]=Yt,w[16]=Xt,w[17]=Qt,w[18]=er,b!==0&&(w[19]=b,p.length++),p};Math.imul||(X=J);function G(E,r,u){u.negative=r.negative^E.negative,u.length=E.length+r.length;for(var p=0,v=0,x=0;x<u.length-1;x++){var w=v;v=0;for(var b=p&67108863,l=Math.min(x,r.length-1),i=Math.max(0,x-E.length+1);i<=l;i++){var y=x-i,D=E.words[y]|0,O=r.words[i]|0,U=D*O,V=U&67108863;w=w+(U/67108864|0)|0,V=V+b|0,b=V&67108863,w=w+(V>>>26)|0,v+=w>>>26,w&=67108863}u.words[x]=b,p=w,w=v}return p!==0?u.words[x]=p:u.length--,u._strip()}function De(E,r,u){return G(E,r,u)}f.prototype.mulTo=function(r,u){var p,v=this.length+r.length;return this.length===10&&r.length===10?p=X(this,r,u):v<63?p=J(this,r,u):v<1024?p=G(this,r,u):p=De(this,r,u),p},f.prototype.mul=function(r){var u=new f(null);return u.words=new Array(this.length+r.length),this.mulTo(r,u)},f.prototype.mulf=function(r){var u=new f(null);return u.words=new Array(this.length+r.length),De(this,r,u)},f.prototype.imul=function(r){return this.clone().mulTo(r,this)},f.prototype.imuln=function(r){var u=r<0;u&&(r=-r),s(typeof r=="number"),s(r<67108864);for(var p=0,v=0;v<this.length;v++){var x=(this.words[v]|0)*r,w=(x&67108863)+(p&67108863);p>>=26,p+=x/67108864|0,p+=w>>>26,this.words[v]=w&67108863}return p!==0&&(this.words[v]=p,this.length++),u?this.ineg():this},f.prototype.muln=function(r){return this.clone().imuln(r)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(r){var u=P(r);if(u.length===0)return new f(1);for(var p=this,v=0;v<u.length&&u[v]===0;v++,p=p.sqr());if(++v<u.length)for(var x=p.sqr();v<u.length;v++,x=x.sqr())u[v]!==0&&(p=p.mul(x));return p},f.prototype.iushln=function(r){s(typeof r=="number"&&r>=0);var u=r%26,p=(r-u)/26,v=67108863>>>26-u<<26-u,x;if(u!==0){var w=0;for(x=0;x<this.length;x++){var b=this.words[x]&v,l=(this.words[x]|0)-b<<u;this.words[x]=l|w,w=b>>>26-u}w&&(this.words[x]=w,this.length++)}if(p!==0){for(x=this.length-1;x>=0;x--)this.words[x+p]=this.words[x];for(x=0;x<p;x++)this.words[x]=0;this.length+=p}return this._strip()},f.prototype.ishln=function(r){return s(this.negative===0),this.iushln(r)},f.prototype.iushrn=function(r,u,p){s(typeof r=="number"&&r>=0);var v;u?v=(u-u%26)/26:v=0;var x=r%26,w=Math.min((r-x)/26,this.length),b=67108863^67108863>>>x<<x,l=p;if(v-=w,v=Math.max(0,v),l){for(var i=0;i<w;i++)l.words[i]=this.words[i];l.length=w}if(w!==0)if(this.length>w)for(this.length-=w,i=0;i<this.length;i++)this.words[i]=this.words[i+w];else this.words[0]=0,this.length=1;var y=0;for(i=this.length-1;i>=0&&(y!==0||i>=v);i--){var D=this.words[i]|0;this.words[i]=y<<26-x|D>>>x,y=D&b}return l&&y!==0&&(l.words[l.length++]=y),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},f.prototype.ishrn=function(r,u,p){return s(this.negative===0),this.iushrn(r,u,p)},f.prototype.shln=function(r){return this.clone().ishln(r)},f.prototype.ushln=function(r){return this.clone().iushln(r)},f.prototype.shrn=function(r){return this.clone().ishrn(r)},f.prototype.ushrn=function(r){return this.clone().iushrn(r)},f.prototype.testn=function(r){s(typeof r=="number"&&r>=0);var u=r%26,p=(r-u)/26,v=1<<u;if(this.length<=p)return!1;var x=this.words[p];return!!(x&v)},f.prototype.imaskn=function(r){s(typeof r=="number"&&r>=0);var u=r%26,p=(r-u)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(u!==0&&p++,this.length=Math.min(p,this.length),u!==0){var v=67108863^67108863>>>u<<u;this.words[this.length-1]&=v}return this._strip()},f.prototype.maskn=function(r){return this.clone().imaskn(r)},f.prototype.iaddn=function(r){return s(typeof r=="number"),s(r<67108864),r<0?this.isubn(-r):this.negative!==0?this.length===1&&(this.words[0]|0)<=r?(this.words[0]=r-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(r),this.negative=1,this):this._iaddn(r)},f.prototype._iaddn=function(r){this.words[0]+=r;for(var u=0;u<this.length&&this.words[u]>=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},f.prototype.isubn=function(r){if(s(typeof r=="number"),s(r<67108864),r<0)return this.iaddn(-r);if(this.negative!==0)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u<this.length&&this.words[u]<0;u++)this.words[u]+=67108864,this.words[u+1]-=1;return this._strip()},f.prototype.addn=function(r){return this.clone().iaddn(r)},f.prototype.subn=function(r){return this.clone().isubn(r)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(r,u,p){var v=r.length+p,x;this._expand(v);var w,b=0;for(x=0;x<r.length;x++){w=(this.words[x+p]|0)+b;var l=(r.words[x]|0)*u;w-=l&67108863,b=(w>>26)-(l/67108864|0),this.words[x+p]=w&67108863}for(;x<this.length-p;x++)w=(this.words[x+p]|0)+b,b=w>>26,this.words[x+p]=w&67108863;if(b===0)return this._strip();for(s(b===-1),b=0,x=0;x<this.length;x++)w=-(this.words[x]|0)+b,b=w>>26,this.words[x]=w&67108863;return this.negative=1,this._strip()},f.prototype._wordDiv=function(r,u){var p=this.length-r.length,v=this.clone(),x=r,w=x.words[x.length-1]|0,b=this._countBits(w);p=26-b,p!==0&&(x=x.ushln(p),v.iushln(p),w=x.words[x.length-1]|0);var l=v.length-x.length,i;if(u!=="mod"){i=new f(null),i.length=l+1,i.words=new Array(i.length);for(var y=0;y<i.length;y++)i.words[y]=0}var D=v.clone()._ishlnsubmul(x,1,l);D.negative===0&&(v=D,i&&(i.words[l]=1));for(var O=l-1;O>=0;O--){var U=(v.words[x.length+O]|0)*67108864+(v.words[x.length+O-1]|0);for(U=Math.min(U/w|0,67108863),v._ishlnsubmul(x,U,O);v.negative!==0;)U--,v.negative=0,v._ishlnsubmul(x,1,O),v.isZero()||(v.negative^=1);i&&(i.words[O]=U)}return i&&i._strip(),v._strip(),u!=="div"&&p!==0&&v.iushrn(p),{div:i||null,mod:v}},f.prototype.divmod=function(r,u,p){if(s(!r.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var v,x,w;return this.negative!==0&&r.negative===0?(w=this.neg().divmod(r,u),u!=="mod"&&(v=w.div.neg()),u!=="div"&&(x=w.mod.neg(),p&&x.negative!==0&&x.iadd(r)),{div:v,mod:x}):this.negative===0&&r.negative!==0?(w=this.divmod(r.neg(),u),u!=="mod"&&(v=w.div.neg()),{div:v,mod:w.mod}):this.negative&r.negative?(w=this.neg().divmod(r.neg(),u),u!=="div"&&(x=w.mod.neg(),p&&x.negative!==0&&x.isub(r)),{div:w.div,mod:x}):r.length>this.length||this.cmp(r)<0?{div:new f(0),mod:this}:r.length===1?u==="div"?{div:this.divn(r.words[0]),mod:null}:u==="mod"?{div:null,mod:new f(this.modrn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new f(this.modrn(r.words[0]))}:this._wordDiv(r,u)},f.prototype.div=function(r){return this.divmod(r,"div",!1).div},f.prototype.mod=function(r){return this.divmod(r,"mod",!1).mod},f.prototype.umod=function(r){return this.divmod(r,"mod",!0).mod},f.prototype.divRound=function(r){var u=this.divmod(r);if(u.mod.isZero())return u.div;var p=u.div.negative!==0?u.mod.isub(r):u.mod,v=r.ushrn(1),x=r.andln(1),w=p.cmp(v);return w<0||x===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},f.prototype.modrn=function(r){var u=r<0;u&&(r=-r),s(r<=67108863);for(var p=(1<<26)%r,v=0,x=this.length-1;x>=0;x--)v=(p*v+(this.words[x]|0))%r;return u?-v:v},f.prototype.modn=function(r){return this.modrn(r)},f.prototype.idivn=function(r){var u=r<0;u&&(r=-r),s(r<=67108863);for(var p=0,v=this.length-1;v>=0;v--){var x=(this.words[v]|0)+p*67108864;this.words[v]=x/r|0,p=x%r}return this._strip(),u?this.ineg():this},f.prototype.divn=function(r){return this.clone().idivn(r)},f.prototype.egcd=function(r){s(r.negative===0),s(!r.isZero());var u=this,p=r.clone();u.negative!==0?u=u.umod(r):u=u.clone();for(var v=new f(1),x=new f(0),w=new f(0),b=new f(1),l=0;u.isEven()&&p.isEven();)u.iushrn(1),p.iushrn(1),++l;for(var i=p.clone(),y=u.clone();!u.isZero();){for(var D=0,O=1;!(u.words[0]&O)&&D<26;++D,O<<=1);if(D>0)for(u.iushrn(D);D-- >0;)(v.isOdd()||x.isOdd())&&(v.iadd(i),x.isub(y)),v.iushrn(1),x.iushrn(1);for(var U=0,V=1;!(p.words[0]&V)&&U<26;++U,V<<=1);if(U>0)for(p.iushrn(U);U-- >0;)(w.isOdd()||b.isOdd())&&(w.iadd(i),b.isub(y)),w.iushrn(1),b.iushrn(1);u.cmp(p)>=0?(u.isub(p),v.isub(w),x.isub(b)):(p.isub(u),w.isub(v),b.isub(x))}return{a:w,b,gcd:p.iushln(l)}},f.prototype._invmp=function(r){s(r.negative===0),s(!r.isZero());var u=this,p=r.clone();u.negative!==0?u=u.umod(r):u=u.clone();for(var v=new f(1),x=new f(0),w=p.clone();u.cmpn(1)>0&&p.cmpn(1)>0;){for(var b=0,l=1;!(u.words[0]&l)&&b<26;++b,l<<=1);if(b>0)for(u.iushrn(b);b-- >0;)v.isOdd()&&v.iadd(w),v.iushrn(1);for(var i=0,y=1;!(p.words[0]&y)&&i<26;++i,y<<=1);if(i>0)for(p.iushrn(i);i-- >0;)x.isOdd()&&x.iadd(w),x.iushrn(1);u.cmp(p)>=0?(u.isub(p),v.isub(x)):(p.isub(u),x.isub(v))}var D;return u.cmpn(1)===0?D=v:D=x,D.cmpn(0)<0&&D.iadd(r),D},f.prototype.gcd=function(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var u=this.clone(),p=r.clone();u.negative=0,p.negative=0;for(var v=0;u.isEven()&&p.isEven();v++)u.iushrn(1),p.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;p.isEven();)p.iushrn(1);var x=u.cmp(p);if(x<0){var w=u;u=p,p=w}else if(x===0||p.cmpn(1)===0)break;u.isub(p)}while(!0);return p.iushln(v)},f.prototype.invm=function(r){return this.egcd(r).a.umod(r)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(r){return this.words[0]&r},f.prototype.bincn=function(r){s(typeof r=="number");var u=r%26,p=(r-u)/26,v=1<<u;if(this.length<=p)return this._expand(p+1),this.words[p]|=v,this;for(var x=v,w=p;x!==0&&w<this.length;w++){var b=this.words[w]|0;b+=x,x=b>>>26,b&=67108863,this.words[w]=b}return x!==0&&(this.words[w]=x,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(r){var u=r<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this._strip();var p;if(this.length>1)p=1;else{u&&(r=-r),s(r<=67108863,"Number is too big");var v=this.words[0]|0;p=v===r?0:v<r?-1:1}return this.negative!==0?-p|0:p},f.prototype.cmp=function(r){if(this.negative!==0&&r.negative===0)return-1;if(this.negative===0&&r.negative!==0)return 1;var u=this.ucmp(r);return this.negative!==0?-u|0:u},f.prototype.ucmp=function(r){if(this.length>r.length)return 1;if(this.length<r.length)return-1;for(var u=0,p=this.length-1;p>=0;p--){var v=this.words[p]|0,x=r.words[p]|0;if(v!==x){v<x?u=-1:v>x&&(u=1);break}}return u},f.prototype.gtn=function(r){return this.cmpn(r)===1},f.prototype.gt=function(r){return this.cmp(r)===1},f.prototype.gten=function(r){return this.cmpn(r)>=0},f.prototype.gte=function(r){return this.cmp(r)>=0},f.prototype.ltn=function(r){return this.cmpn(r)===-1},f.prototype.lt=function(r){return this.cmp(r)===-1},f.prototype.lten=function(r){return this.cmpn(r)<=0},f.prototype.lte=function(r){return this.cmp(r)<=0},f.prototype.eqn=function(r){return this.cmpn(r)===0},f.prototype.eq=function(r){return this.cmp(r)===0},f.red=function(r){return new Q(r)},f.prototype.toRed=function(r){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),r.convertTo(this)._forceRed(r)},f.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(r){return this.red=r,this},f.prototype.forceRed=function(r){return s(!this.red,"Already a number in reduction context"),this._forceRed(r)},f.prototype.redAdd=function(r){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},f.prototype.redIAdd=function(r){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},f.prototype.redSub=function(r){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},f.prototype.redISub=function(r){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},f.prototype.redShl=function(r){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},f.prototype.redMul=function(r){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},f.prototype.redIMul=function(r){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},f.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(r){return s(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var Y={k256:null,p224:null,p192:null,p25519:null};function K(E,r){this.name=E,this.p=new f(r,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}K.prototype._tmp=function(){var r=new f(null);return r.words=new Array(Math.ceil(this.n/13)),r},K.prototype.ireduce=function(r){var u=r,p;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),p=u.bitLength();while(p>this.n);var v=p<this.n?-1:u.ucmp(this.p);return v===0?(u.words[0]=0,u.length=1):v>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},K.prototype.split=function(r,u){r.iushrn(this.n,0,u)},K.prototype.imulK=function(r){return r.imul(this.k)};function Se(){K.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}h(Se,K),Se.prototype.split=function(r,u){for(var p=4194303,v=Math.min(r.length,9),x=0;x<v;x++)u.words[x]=r.words[x];if(u.length=v,r.length<=9){r.words[0]=0,r.length=1;return}var w=r.words[9];for(u.words[u.length++]=w&p,x=10;x<r.length;x++){var b=r.words[x]|0;r.words[x-10]=(b&p)<<4|w>>>22,w=b}w>>>=22,r.words[x-10]=w,w===0&&r.length>10?r.length-=10:r.length-=9},Se.prototype.imulK=function(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var u=0,p=0;p<r.length;p++){var v=r.words[p]|0;u+=v*977,r.words[p]=u&67108863,u=v*64+(u/67108864|0)}return r.words[r.length-1]===0&&(r.length--,r.words[r.length-1]===0&&r.length--),r};function Oe(){K.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}h(Oe,K);function Le(){K.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}h(Le,K);function je(){K.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}h(je,K),je.prototype.imulK=function(r){for(var u=0,p=0;p<r.length;p++){var v=(r.words[p]|0)*19+u,x=v&67108863;v>>>=26,r.words[p]=x,u=v}return u!==0&&(r.words[r.length++]=u),r},f._prime=function(r){if(Y[r])return Y[r];var u;if(r==="k256")u=new Se;else if(r==="p224")u=new Oe;else if(r==="p192")u=new Le;else if(r==="p25519")u=new je;else throw new Error("Unknown prime "+r);return Y[r]=u,u};function Q(E){if(typeof E=="string"){var r=f._prime(E);this.m=r.p,this.prime=r}else s(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}Q.prototype._verify1=function(r){s(r.negative===0,"red works only with positives"),s(r.red,"red works only with red numbers")},Q.prototype._verify2=function(r,u){s((r.negative|u.negative)===0,"red works only with positives"),s(r.red&&r.red===u.red,"red works only with red numbers")},Q.prototype.imod=function(r){return this.prime?this.prime.ireduce(r)._forceRed(this):(B(r,r.umod(this.m)._forceRed(this)),r)},Q.prototype.neg=function(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},Q.prototype.add=function(r,u){this._verify2(r,u);var p=r.add(u);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},Q.prototype.iadd=function(r,u){this._verify2(r,u);var p=r.iadd(u);return p.cmp(this.m)>=0&&p.isub(this.m),p},Q.prototype.sub=function(r,u){this._verify2(r,u);var p=r.sub(u);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},Q.prototype.isub=function(r,u){this._verify2(r,u);var p=r.isub(u);return p.cmpn(0)<0&&p.iadd(this.m),p},Q.prototype.shl=function(r,u){return this._verify1(r),this.imod(r.ushln(u))},Q.prototype.imul=function(r,u){return this._verify2(r,u),this.imod(r.imul(u))},Q.prototype.mul=function(r,u){return this._verify2(r,u),this.imod(r.mul(u))},Q.prototype.isqr=function(r){return this.imul(r,r.clone())},Q.prototype.sqr=function(r){return this.mul(r,r)},Q.prototype.sqrt=function(r){if(r.isZero())return r.clone();var u=this.m.andln(3);if(s(u%2===1),u===3){var p=this.m.add(new f(1)).iushrn(2);return this.pow(r,p)}for(var v=this.m.subn(1),x=0;!v.isZero()&&v.andln(1)===0;)x++,v.iushrn(1);s(!v.isZero());var w=new f(1).toRed(this),b=w.redNeg(),l=this.m.subn(1).iushrn(1),i=this.m.bitLength();for(i=new f(2*i*i).toRed(this);this.pow(i,l).cmp(b)!==0;)i.redIAdd(b);for(var y=this.pow(i,v),D=this.pow(r,v.addn(1).iushrn(1)),O=this.pow(r,v),U=x;O.cmp(w)!==0;){for(var V=O,H=0;V.cmp(w)!==0;H++)V=V.redSqr();s(H<U);var W=this.pow(y,new f(1).iushln(U-H-1));D=D.redMul(W),y=W.redSqr(),O=O.redMul(y),U=H}return D},Q.prototype.invm=function(r){var u=r._invmp(this.m);return u.negative!==0?(u.negative=0,this.imod(u).redNeg()):this.imod(u)},Q.prototype.pow=function(r,u){if(u.isZero())return new f(1).toRed(this);if(u.cmpn(1)===0)return r.clone();var p=4,v=new Array(1<<p);v[0]=new f(1).toRed(this),v[1]=r;for(var x=2;x<v.length;x++)v[x]=this.mul(v[x-1],r);var w=v[0],b=0,l=0,i=u.bitLength()%26;for(i===0&&(i=26),x=u.length-1;x>=0;x--){for(var y=u.words[x],D=i-1;D>=0;D--){var O=y>>D&1;if(w!==v[0]&&(w=this.sqr(w)),O===0&&b===0){l=0;continue}b<<=1,b|=O,l++,!(l!==p&&(x!==0||D!==0))&&(w=this.mul(w,v[b]),l=0,b=0)}i=26}return w},Q.prototype.convertTo=function(r){var u=r.umod(this.m);return u===r?u.clone():u},Q.prototype.convertFrom=function(r){var u=r.clone();return u.red=null,u},f.mont=function(r){return new Te(r)};function Te(E){Q.call(this,E),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h(Te,Q),Te.prototype.convertTo=function(r){return this.imod(r.ushln(this.shift))},Te.prototype.convertFrom=function(r){var u=this.imod(r.mul(this.rinv));return u.red=null,u},Te.prototype.imul=function(r,u){if(r.isZero()||u.isZero())return r.words[0]=0,r.length=1,r;var p=r.imul(u),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=p.isub(v).iushrn(this.shift),w=x;return x.cmp(this.m)>=0?w=x.isub(this.m):x.cmpn(0)<0&&(w=x.iadd(this.m)),w._forceRed(this)},Te.prototype.mul=function(r,u){if(r.isZero()||u.isZero())return new f(0)._forceRed(this);var p=r.mul(u),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=p.isub(v).iushrn(this.shift),w=x;return x.cmp(this.m)>=0?w=x.isub(this.m):x.cmpn(0)<0&&(w=x.iadd(this.m)),w._forceRed(this)},Te.prototype.invm=function(r){var u=this.imod(r._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(e,$e.commonjsGlobal)})(Rr);var pi=Rr.exports,Cn={},_t={};_t.byteLength=gi;_t.toByteArray=vi;_t.fromByteArray=Ei;var Je=[],qe=[],mi=typeof Uint8Array<"u"?Uint8Array:Array,tr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var rt=0,yi=tr.length;rt<yi;++rt)Je[rt]=tr[rt],qe[tr.charCodeAt(rt)]=rt;qe["-".charCodeAt(0)]=62;qe["_".charCodeAt(0)]=63;function Fn(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var a=e.indexOf("=");a===-1&&(a=t);var s=a===t?0:4-a%4;return[a,s]}function gi(e){var t=Fn(e),a=t[0],s=t[1];return(a+s)*3/4-s}function wi(e,t,a){return(t+a)*3/4-a}function vi(e){var t,a=Fn(e),s=a[0],h=a[1],f=new mi(wi(e,s,h)),g=0,d=h>0?s-4:s,A;for(A=0;A<d;A+=4)t=qe[e.charCodeAt(A)]<<18|qe[e.charCodeAt(A+1)]<<12|qe[e.charCodeAt(A+2)]<<6|qe[e.charCodeAt(A+3)],f[g++]=t>>16&255,f[g++]=t>>8&255,f[g++]=t&255;return h===2&&(t=qe[e.charCodeAt(A)]<<2|qe[e.charCodeAt(A+1)]>>4,f[g++]=t&255),h===1&&(t=qe[e.charCodeAt(A)]<<10|qe[e.charCodeAt(A+1)]<<4|qe[e.charCodeAt(A+2)]>>2,f[g++]=t>>8&255,f[g++]=t&255),f}function bi(e){return Je[e>>18&63]+Je[e>>12&63]+Je[e>>6&63]+Je[e&63]}function xi(e,t,a){for(var s,h=[],f=t;f<a;f+=3)s=(e[f]<<16&16711680)+(e[f+1]<<8&65280)+(e[f+2]&255),h.push(bi(s));return h.join("")}function Ei(e){for(var t,a=e.length,s=a%3,h=[],f=16383,g=0,d=a-s;g<d;g+=f)h.push(xi(e,g,g+f>d?d:g+f));return s===1?(t=e[a-1],h.push(Je[t>>2]+Je[t<<4&63]+"==")):s===2&&(t=(e[a-2]<<8)+e[a-1],h.push(Je[t>>10]+Je[t>>4&63]+Je[t<<2&63]+"=")),h.join("")}var Sr={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Sr.read=function(e,t,a,s,h){var f,g,d=h*8-s-1,A=(1<<d)-1,R=A>>1,B=-7,S=a?h-1:0,I=a?-1:1,k=e[t+S];for(S+=I,f=k&(1<<-B)-1,k>>=-B,B+=d;B>0;f=f*256+e[t+S],S+=I,B-=8);for(g=f&(1<<-B)-1,f>>=-B,B+=s;B>0;g=g*256+e[t+S],S+=I,B-=8);if(f===0)f=1-R;else{if(f===A)return g?NaN:(k?-1:1)*(1/0);g=g+Math.pow(2,s),f=f-R}return(k?-1:1)*g*Math.pow(2,f-s)};Sr.write=function(e,t,a,s,h,f){var g,d,A,R=f*8-h-1,B=(1<<R)-1,S=B>>1,I=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=s?0:f-1,T=s?1:-1,N=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(d=isNaN(t)?1:0,g=B):(g=Math.floor(Math.log(t)/Math.LN2),t*(A=Math.pow(2,-g))<1&&(g--,A*=2),g+S>=1?t+=I/A:t+=I*Math.pow(2,1-S),t*A>=2&&(g++,A/=2),g+S>=B?(d=0,g=B):g+S>=1?(d=(t*A-1)*Math.pow(2,h),g=g+S):(d=t*Math.pow(2,S-1)*Math.pow(2,h),g=0));h>=8;e[a+k]=d&255,k+=T,d/=256,h-=8);for(g=g<<h|d,R+=h;R>0;e[a+k]=g&255,k+=T,g/=256,R-=8);e[a+k-T]|=N*128};/*!
|
|
2
2
|
* The buffer module from node.js, for the browser.
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|